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