1 /*
2  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 /**
20  * DOC: wlan_hdd_wds.h
21  *
22  * WLAN Host Device Driver file for wds (4 address format in mac header when
23  * SA and TA are not same) support.
24  *
25  */
26 
27 #if !defined(WLAN_HDD_WDS_H)
28 #define WLAN_HDD_WDS_H
29 
30 struct wlan_objmgr_vdev;
31 struct hdd_adapter;
32 
33 #ifdef FEATURE_WDS
34 /**
35  * hdd_wds_config_dp_repeater_mode - Function to enable wds on the AP vdev
36  * @vdev: object manager vdev context
37  *
38  * Set the wds_enabled flag for dp vdev. The wds source port learning
39  * is triggered when this flag is enabled and AST entry for the remote
40  * station(wds node) is added to the AST list.
41  *
42  * Return: None
43  */
44 void hdd_wds_config_dp_repeater_mode(struct wlan_objmgr_vdev *vdev);
45 
46 /**
47  * hdd_wds_replace_peer_mac() - Replace the mac address for the wds next hop
48  * @soc: SOC TXRX handle
49  * @adapter: the pointer to adapter
50  * @mac_addr: mac address of the peer or wds station
51  *
52  * The wds stations are reachable through a directly connected peer.
53  * Replace the destination address with the mac address of the next
54  * hop peer to reach the wds station, if the destination is not a
55  * directly connected peer.
56  *
57  * Return: None
58  */
59 void hdd_wds_replace_peer_mac(void *soc, struct hdd_adapter *adapter,
60 			      uint8_t *mac_addr);
61 #else
62 static inline
hdd_wds_config_dp_repeater_mode(struct wlan_objmgr_vdev * vdev)63 void hdd_wds_config_dp_repeater_mode(struct wlan_objmgr_vdev *vdev)
64 {
65 }
66 
67 static inline
hdd_wds_replace_peer_mac(void * soc,struct hdd_adapter * adapter,uint8_t * mac_addr)68 void hdd_wds_replace_peer_mac(void *soc, struct hdd_adapter *adapter,
69 			      uint8_t *mac_addr)
70 {
71 }
72 #endif /* FEATURE_WDS*/
73 #endif /* if !defined(WLAN_HDD_WDS_H)*/
74