xref: /wlan-driver/qca-wifi-host-cmn/umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  *
6*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
7*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
8*5113495bSYour Name  * above copyright notice and this permission notice appear in all
9*5113495bSYour Name  * copies.
10*5113495bSYour Name  *
11*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
12*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
13*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
14*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
16*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
17*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
19*5113495bSYour Name  */
20*5113495bSYour Name 
21*5113495bSYour Name /**
22*5113495bSYour Name  * DOC: These APIs are used by DFS core functions to call mlme functions.
23*5113495bSYour Name  */
24*5113495bSYour Name 
25*5113495bSYour Name #ifndef _WLAN_DFS_MLME_API_H_
26*5113495bSYour Name #define _WLAN_DFS_MLME_API_H_
27*5113495bSYour Name 
28*5113495bSYour Name #include "wlan_dfs_ucfg_api.h"
29*5113495bSYour Name 
30*5113495bSYour Name extern struct dfs_to_mlme global_dfs_to_mlme;
31*5113495bSYour Name 
32*5113495bSYour Name /**
33*5113495bSYour Name  * dfs_mlme_start_rcsa() - Send RCSA to RootAP.
34*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
35*5113495bSYour Name  * @wait_for_csa: Wait for CSA from RootAP.
36*5113495bSYour Name  */
37*5113495bSYour Name #if defined(QCA_DFS_RCSA_SUPPORT)
38*5113495bSYour Name void dfs_mlme_start_rcsa(struct wlan_objmgr_pdev *pdev,
39*5113495bSYour Name 		bool *wait_for_csa);
40*5113495bSYour Name #endif
41*5113495bSYour Name 
42*5113495bSYour Name /**
43*5113495bSYour Name  * dfs_mlme_mark_dfs() - Mark the channel in the channel list.
44*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
45*5113495bSYour Name  * @ieee: Channel number.
46*5113495bSYour Name  * @freq: Channel frequency.
47*5113495bSYour Name  * @vhtop_ch_freq_seg2: VHT80 Cfreq2.
48*5113495bSYour Name  * @flags: channel flags.
49*5113495bSYour Name  * @dfs_radar_bitmap: Radar bitmap.
50*5113495bSYour Name  */
51*5113495bSYour Name void dfs_mlme_mark_dfs(struct wlan_objmgr_pdev *pdev,
52*5113495bSYour Name 			uint8_t ieee,
53*5113495bSYour Name 			uint16_t freq,
54*5113495bSYour Name 			uint16_t vhtop_ch_freq_seg2,
55*5113495bSYour Name 			uint64_t flags,
56*5113495bSYour Name 			uint16_t dfs_radar_bitmap);
57*5113495bSYour Name 
58*5113495bSYour Name #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
59*5113495bSYour Name /**
60*5113495bSYour Name  * dfs_mlme_proc_spoof_success() - Process Spoof Completion status
61*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
62*5113495bSYour Name  */
63*5113495bSYour Name void dfs_mlme_proc_spoof_success(struct wlan_objmgr_pdev *pdev);
64*5113495bSYour Name #else
65*5113495bSYour Name static inline void
dfs_mlme_proc_spoof_success(struct wlan_objmgr_pdev * pdev)66*5113495bSYour Name dfs_mlme_proc_spoof_success(struct wlan_objmgr_pdev *pdev)
67*5113495bSYour Name {
68*5113495bSYour Name }
69*5113495bSYour Name #endif
70*5113495bSYour Name 
71*5113495bSYour Name /**
72*5113495bSYour Name  * dfs_mlme_start_csa_for_freq() - Sends CSA in ieeeChan
73*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
74*5113495bSYour Name  * @ieee_chan: Channel number.
75*5113495bSYour Name  * @freq: Channel frequency.
76*5113495bSYour Name  * @cfreq2_mhz: HT80 cfreq2 in MHz.
77*5113495bSYour Name  * @flags: channel flags.
78*5113495bSYour Name  */
79*5113495bSYour Name #ifdef CONFIG_CHAN_FREQ_API
80*5113495bSYour Name void dfs_mlme_start_csa_for_freq(struct wlan_objmgr_pdev *pdev,
81*5113495bSYour Name 				 uint8_t ieee_chan,
82*5113495bSYour Name 				 uint16_t freq,
83*5113495bSYour Name 				 uint16_t cfreq2_mhz,
84*5113495bSYour Name 				 uint64_t flags);
85*5113495bSYour Name #endif
86*5113495bSYour Name /**
87*5113495bSYour Name  * dfs_mlme_proc_cac() - Process the CAC completion event.
88*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
89*5113495bSYour Name  * @vdev_id: vdev id.
90*5113495bSYour Name  */
91*5113495bSYour Name void dfs_mlme_proc_cac(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id);
92*5113495bSYour Name 
93*5113495bSYour Name /**
94*5113495bSYour Name  * dfs_mlme_deliver_event_up_after_cac() - Send a CAC timeout, VAP up event to
95*5113495bSYour Name  * userspace.
96*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
97*5113495bSYour Name  */
98*5113495bSYour Name void dfs_mlme_deliver_event_up_after_cac(struct wlan_objmgr_pdev *pdev);
99*5113495bSYour Name 
100*5113495bSYour Name /**
101*5113495bSYour Name  * dfs_mlme_get_extchan_for_freq() - Get extension channel.
102*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
103*5113495bSYour Name  * @dfs_chan_freq:                Frequency in Mhz.
104*5113495bSYour Name  * @dfs_chan_flags:               Channel flags.
105*5113495bSYour Name  * @dfs_chan_flagext:             Extended channel flags.
106*5113495bSYour Name  * @dfs_chan_ieee:                IEEE channel number.
107*5113495bSYour Name  * @dfs_chan_vhtop_ch_freq_seg1:  Channel Center IEEE.
108*5113495bSYour Name  * @dfs_chan_vhtop_ch_freq_seg2:  Channel Center IEEE applicable for 80+80MHz
109*5113495bSYour Name  *                                mode of operation.
110*5113495bSYour Name  * @dfs_chan_mhz_freq_seg1:       Primary channel center freq.
111*5113495bSYour Name  * @dfs_chan_mhz_freq_seg2:       Secondary channel center freq applicable for
112*5113495bSYour Name  *                                80+80 MHZ.
113*5113495bSYour Name  */
114*5113495bSYour Name 
115*5113495bSYour Name #ifdef CONFIG_CHAN_FREQ_API
116*5113495bSYour Name QDF_STATUS dfs_mlme_get_extchan_for_freq(struct wlan_objmgr_pdev *pdev,
117*5113495bSYour Name 					 uint16_t *dfs_chan_freq,
118*5113495bSYour Name 					 uint64_t *dfs_chan_flags,
119*5113495bSYour Name 					 uint16_t *dfs_chan_flagext,
120*5113495bSYour Name 					 uint8_t *dfs_chan_ieee,
121*5113495bSYour Name 					 uint8_t *dfs_chan_vhtop_ch_freq_seg1,
122*5113495bSYour Name 					 uint8_t *dfs_chan_vhtop_ch_freq_seg2,
123*5113495bSYour Name 					 uint16_t *dfs_chan_mhz_freq_seg1,
124*5113495bSYour Name 					 uint16_t *dfs_chan_mhz_freq_seg2);
125*5113495bSYour Name #endif
126*5113495bSYour Name 
127*5113495bSYour Name /**
128*5113495bSYour Name  * dfs_mlme_set_no_chans_available() - Set no_chans_available flag.
129*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
130*5113495bSYour Name  * @val: Set this value to no_chans_available flag.
131*5113495bSYour Name  */
132*5113495bSYour Name void dfs_mlme_set_no_chans_available(struct wlan_objmgr_pdev *pdev,
133*5113495bSYour Name 		int val);
134*5113495bSYour Name 
135*5113495bSYour Name /**
136*5113495bSYour Name  * dfs_mlme_ieee2mhz() - Get the frequency from channel number.
137*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
138*5113495bSYour Name  * @ieee: Channel number.
139*5113495bSYour Name  * @flag: Channel flag.
140*5113495bSYour Name  */
141*5113495bSYour Name int dfs_mlme_ieee2mhz(struct wlan_objmgr_pdev *pdev,
142*5113495bSYour Name 		int ieee,
143*5113495bSYour Name 		uint64_t flag);
144*5113495bSYour Name 
145*5113495bSYour Name /**
146*5113495bSYour Name  * dfs_mlme_find_dot11_chan_for_freq() - Find a channel pointer given the mode,
147*5113495bSYour Name  * frequency and channel flags.
148*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
149*5113495bSYour Name  * @chan_freq: Channel frequency.
150*5113495bSYour Name  * @des_cfreq2_mhz: cfreq2 in MHz.
151*5113495bSYour Name  * @mode: Phymode
152*5113495bSYour Name  * @dfs_chan_freq:                Frequency in MHz.
153*5113495bSYour Name  * @dfs_chan_flags:               Channel flags.
154*5113495bSYour Name  * @dfs_chan_flagext:             Extended channel flags.
155*5113495bSYour Name  * @dfs_chan_ieee:                IEEE channel number.
156*5113495bSYour Name  * @dfs_chan_vhtop_ch_freq_seg1:  Channel Center IEEE for primary 80 segment.
157*5113495bSYour Name  * @dfs_chan_vhtop_ch_freq_seg2:  Channel Center frequency applicable for
158*5113495bSYour Name  *                                80+80 MHz mode of operation.
159*5113495bSYour Name  * @dfs_chan_mhz_freq_seg1:       Channel center frequency of primary 80 segment.
160*5113495bSYour Name  * @dfs_chan_mhz_freq_seg2:       Channel center frequency for secondary 80
161*5113495bSYour Name  *                                segment applicable only for 80+80 MHz mode of
162*5113495bSYour Name  *                                operation.
163*5113495bSYour Name  *
164*5113495bSYour Name  * Return:
165*5113495bSYour Name  * * QDF_STATUS_SUCCESS  : Channel found.
166*5113495bSYour Name  * * QDF_STATUS_E_FAILURE: Channel not found.
167*5113495bSYour Name  */
168*5113495bSYour Name #ifdef CONFIG_CHAN_FREQ_API
169*5113495bSYour Name QDF_STATUS
170*5113495bSYour Name dfs_mlme_find_dot11_chan_for_freq(struct wlan_objmgr_pdev *pdev,
171*5113495bSYour Name 				  uint16_t chan_freq,
172*5113495bSYour Name 				  uint16_t des_cfreq2_mhz,
173*5113495bSYour Name 				  int mode,
174*5113495bSYour Name 				  uint16_t *dfs_chan_freq,
175*5113495bSYour Name 				  uint64_t *dfs_chan_flags,
176*5113495bSYour Name 				  uint16_t *dfs_chan_flagext,
177*5113495bSYour Name 				  uint8_t *dfs_chan_ieee,
178*5113495bSYour Name 				  uint8_t *dfs_chan_vhtop_ch_freq_seg1,
179*5113495bSYour Name 				  uint8_t *dfs_chan_vhtop_ch_freq_seg2,
180*5113495bSYour Name 				  uint16_t *dfs_chan_mhz_freq_seg1,
181*5113495bSYour Name 				  uint16_t *dfs_chan_mhz_freq_seg2);
182*5113495bSYour Name #endif
183*5113495bSYour Name 
184*5113495bSYour Name /**
185*5113495bSYour Name  * dfs_mlme_get_dfs_channels_for_freq() - Get DFS channel from channel list.
186*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
187*5113495bSYour Name  * @dfs_chan_freq:                Frequency in Mhz.
188*5113495bSYour Name  * @dfs_chan_flags:               Channel flags.
189*5113495bSYour Name  * @dfs_chan_flagext:             Extended channel flags.
190*5113495bSYour Name  * @dfs_chan_ieee:                IEEE channel number.
191*5113495bSYour Name  * @dfs_chan_vhtop_ch_freq_seg1:  Channel Center IEEE number.
192*5113495bSYour Name  * @dfs_chan_vhtop_ch_freq_seg2:  Channel Center IEEE applicable for 80+80MHz
193*5113495bSYour Name  *                                mode of operation.
194*5113495bSYour Name  * @dfs_chan_mhz_freq_seg1 :      Primary 80 Channel Center frequency.
195*5113495bSYour Name  * @dfs_chan_mhz_freq_seg2 :      Channel center frequency applicable only for
196*5113495bSYour Name  *                                80+80 mode of operation.
197*5113495bSYour Name  * @index: Index into channel list.
198*5113495bSYour Name  */
199*5113495bSYour Name #ifdef CONFIG_CHAN_FREQ_API
200*5113495bSYour Name void
201*5113495bSYour Name dfs_mlme_get_dfs_channels_for_freq(struct wlan_objmgr_pdev *pdev,
202*5113495bSYour Name 				   uint16_t *dfs_chan_freq,
203*5113495bSYour Name 				   uint64_t *dfs_chan_flags,
204*5113495bSYour Name 				   uint16_t *dfs_chan_flagext,
205*5113495bSYour Name 				   uint8_t *dfs_chan_ieee,
206*5113495bSYour Name 				   uint8_t *dfs_chan_vhtop_ch_freq_seg1,
207*5113495bSYour Name 				   uint8_t *dfs_chan_vhtop_ch_freq_seg2,
208*5113495bSYour Name 				   uint16_t *dfs_chan_mhz_freq_seg1,
209*5113495bSYour Name 				   uint16_t *dfs_chan_mhz_freq_seg2,
210*5113495bSYour Name 				   int index);
211*5113495bSYour Name #endif
212*5113495bSYour Name 
213*5113495bSYour Name /**
214*5113495bSYour Name  * dfs_mlme_dfs_ch_flags_ext() - Get extension channel flags.
215*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
216*5113495bSYour Name  */
217*5113495bSYour Name uint32_t dfs_mlme_dfs_ch_flags_ext(struct wlan_objmgr_pdev *pdev);
218*5113495bSYour Name 
219*5113495bSYour Name /**
220*5113495bSYour Name  * dfs_mlme_channel_change_by_precac() - Channel change by PreCAC.
221*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
222*5113495bSYour Name  */
223*5113495bSYour Name void dfs_mlme_channel_change_by_precac(struct wlan_objmgr_pdev *pdev);
224*5113495bSYour Name 
225*5113495bSYour Name /**
226*5113495bSYour Name  * dfs_mlme_nol_timeout_notification() - NOL timeout notification to userspace.
227*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
228*5113495bSYour Name  */
229*5113495bSYour Name void dfs_mlme_nol_timeout_notification(struct wlan_objmgr_pdev *pdev);
230*5113495bSYour Name 
231*5113495bSYour Name /**
232*5113495bSYour Name  * dfs_mlme_set_tx_flag() - Set the Vap flag to block Tx on Radar detection.
233*5113495bSYour Name  * @pdev:            Pointer to DFS pdev object.
234*5113495bSYour Name  * @is_tx_allowed:   Flag value to be set.
235*5113495bSYour Name  *                   True indicate data Tx is allowed
236*5113495bSYour Name  *                   False indicate data Tx is blocked;
237*5113495bSYour Name  */
238*5113495bSYour Name void dfs_mlme_set_tx_flag(struct wlan_objmgr_pdev *pdev, bool is_tx_allowed);
239*5113495bSYour Name 
240*5113495bSYour Name /**
241*5113495bSYour Name  * dfs_mlme_clist_update() - Mark the channel as RADAR.
242*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
243*5113495bSYour Name  * @nollist: Pointer to NOL list.
244*5113495bSYour Name  * @nentries: Number of channels in the NOL list.
245*5113495bSYour Name  */
246*5113495bSYour Name void dfs_mlme_clist_update(struct wlan_objmgr_pdev *pdev,
247*5113495bSYour Name 		void *nollist,
248*5113495bSYour Name 		int nentries);
249*5113495bSYour Name 
250*5113495bSYour Name /**
251*5113495bSYour Name  * dfs_mlme_get_cac_timeout_for_freq() - Get cac_timeout.
252*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
253*5113495bSYour Name  * @dfs_chan_freq:                Frequency in MHz.
254*5113495bSYour Name  * @dfs_chan_vhtop_freq_seg2_mhz: Channel Center frequency applicable for
255*5113495bSYour Name  *                                80+80 MHz mode of operation.
256*5113495bSYour Name  * @dfs_chan_flags:               Channel flags.
257*5113495bSYour Name  */
258*5113495bSYour Name #ifdef CONFIG_CHAN_FREQ_API
259*5113495bSYour Name int dfs_mlme_get_cac_timeout_for_freq(struct wlan_objmgr_pdev *pdev,
260*5113495bSYour Name 				      uint16_t dfs_chan_freq,
261*5113495bSYour Name 				      uint16_t dfs_chan_vhtop_freq_seg2_mhz,
262*5113495bSYour Name 				      uint64_t dfs_chan_flags);
263*5113495bSYour Name #endif
264*5113495bSYour Name /**
265*5113495bSYour Name  * dfs_mlme_rebuild_chan_list_with_non_dfs_channels() - Rebuild the channel list
266*5113495bSYour Name  * with only non DFS channels.
267*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
268*5113495bSYour Name  *
269*5113495bSYour Name  * return: On success return 1 or 0, else failure.
270*5113495bSYour Name  */
271*5113495bSYour Name #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
272*5113495bSYour Name int dfs_mlme_rebuild_chan_list_with_non_dfs_channels(
273*5113495bSYour Name 		struct wlan_objmgr_pdev *pdev);
274*5113495bSYour Name #else
dfs_mlme_rebuild_chan_list_with_non_dfs_channels(struct wlan_objmgr_pdev * pdev)275*5113495bSYour Name static inline int dfs_mlme_rebuild_chan_list_with_non_dfs_channels(
276*5113495bSYour Name 		struct wlan_objmgr_pdev *pdev)
277*5113495bSYour Name {
278*5113495bSYour Name 	return 0;
279*5113495bSYour Name }
280*5113495bSYour Name #endif
281*5113495bSYour Name 
282*5113495bSYour Name /**
283*5113495bSYour Name  * dfs_mlme_restart_vaps_with_non_dfs_chan() - Restart vaps with non DFS
284*5113495bSYour Name  * channels
285*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
286*5113495bSYour Name  * @no_chans_avail: Indicates if no channel is available.
287*5113495bSYour Name  */
288*5113495bSYour Name #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
289*5113495bSYour Name void dfs_mlme_restart_vaps_with_non_dfs_chan(struct wlan_objmgr_pdev *pdev,
290*5113495bSYour Name 					     int no_chans_avail);
291*5113495bSYour Name #else
292*5113495bSYour Name static inline
dfs_mlme_restart_vaps_with_non_dfs_chan(struct wlan_objmgr_pdev * pdev,int no_chans_avail)293*5113495bSYour Name void dfs_mlme_restart_vaps_with_non_dfs_chan(struct wlan_objmgr_pdev *pdev,
294*5113495bSYour Name 					     int no_chans_avail)
295*5113495bSYour Name {
296*5113495bSYour Name }
297*5113495bSYour Name #endif
298*5113495bSYour Name 
299*5113495bSYour Name /**
300*5113495bSYour Name  * dfs_mlme_check_allowed_prim_chanlist() - Check whether the given channel is
301*5113495bSYour Name  * present in the primary allowed channel list or not
302*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
303*5113495bSYour Name  * @chan_freq: Channel frequency
304*5113495bSYour Name  */
305*5113495bSYour Name #if defined(WLAN_SUPPORT_PRIMARY_ALLOWED_CHAN)
306*5113495bSYour Name bool dfs_mlme_check_allowed_prim_chanlist(struct wlan_objmgr_pdev *pdev,
307*5113495bSYour Name 					  uint32_t chan_freq);
308*5113495bSYour Name 
309*5113495bSYour Name #else
310*5113495bSYour Name static inline
dfs_mlme_check_allowed_prim_chanlist(struct wlan_objmgr_pdev * pdev,uint32_t chan_freq)311*5113495bSYour Name bool dfs_mlme_check_allowed_prim_chanlist(struct wlan_objmgr_pdev *pdev,
312*5113495bSYour Name 					  uint32_t chan_freq)
313*5113495bSYour Name {
314*5113495bSYour Name 	return true;
315*5113495bSYour Name }
316*5113495bSYour Name #endif
317*5113495bSYour Name 
318*5113495bSYour Name /**
319*5113495bSYour Name  * dfs_mlme_handle_dfs_scan_violation() - Handle scan start failure
320*5113495bSYour Name  * due to DFS violation (presence of NOL channel in scan channel list).
321*5113495bSYour Name  * @pdev: Pointer to pdev object.
322*5113495bSYour Name  */
323*5113495bSYour Name #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD)
324*5113495bSYour Name void dfs_mlme_handle_dfs_scan_violation(struct wlan_objmgr_pdev *pdev);
325*5113495bSYour Name #else
326*5113495bSYour Name static inline
dfs_mlme_handle_dfs_scan_violation(struct wlan_objmgr_pdev * pdev)327*5113495bSYour Name void dfs_mlme_handle_dfs_scan_violation(struct wlan_objmgr_pdev *pdev)
328*5113495bSYour Name {
329*5113495bSYour Name }
330*5113495bSYour Name #endif
331*5113495bSYour Name 
332*5113495bSYour Name /**
333*5113495bSYour Name  * dfs_mlme_is_opmode_sta() - Check if pdev opmode is STA.
334*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
335*5113495bSYour Name  *
336*5113495bSYour Name  * Return: true if pdev opmode is STA, else false.
337*5113495bSYour Name  */
338*5113495bSYour Name bool dfs_mlme_is_opmode_sta(struct wlan_objmgr_pdev *pdev);
339*5113495bSYour Name 
340*5113495bSYour Name /**
341*5113495bSYour Name  * dfs_mlme_is_inter_band_chan_switch_allowed() - Check if inter-band channel
342*5113495bSYour Name  * switch is allowed.
343*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
344*5113495bSYour Name  *
345*5113495bSYour Name  * Return: true if inter-band channel switch is allowed.
346*5113495bSYour Name  */
347*5113495bSYour Name bool dfs_mlme_is_inter_band_chan_switch_allowed(struct wlan_objmgr_pdev *pdev);
348*5113495bSYour Name 
349*5113495bSYour Name /**
350*5113495bSYour Name  * dfs_mlme_acquire_radar_mode_switch_lock() - Acquire lock for radar processing
351*5113495bSYour Name  * over mode switch handling.
352*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
353*5113495bSYour Name  *
354*5113495bSYour Name  * Return: void.
355*5113495bSYour Name  */
356*5113495bSYour Name #ifdef QCA_HW_MODE_SWITCH
357*5113495bSYour Name void dfs_mlme_acquire_radar_mode_switch_lock(struct wlan_objmgr_pdev *pdev);
358*5113495bSYour Name #else
359*5113495bSYour Name static inline
dfs_mlme_acquire_radar_mode_switch_lock(struct wlan_objmgr_pdev * pdev)360*5113495bSYour Name void dfs_mlme_acquire_radar_mode_switch_lock(struct wlan_objmgr_pdev *pdev)
361*5113495bSYour Name {
362*5113495bSYour Name }
363*5113495bSYour Name #endif
364*5113495bSYour Name 
365*5113495bSYour Name /**
366*5113495bSYour Name  * dfs_mlme_release_radar_mode_switch_lock() - Release lock taken for radar
367*5113495bSYour Name  * processing over mode switch handling.
368*5113495bSYour Name  * @pdev: Pointer to DFS pdev object.
369*5113495bSYour Name  *
370*5113495bSYour Name  * Return: void.
371*5113495bSYour Name  */
372*5113495bSYour Name #ifdef QCA_HW_MODE_SWITCH
373*5113495bSYour Name void dfs_mlme_release_radar_mode_switch_lock(struct wlan_objmgr_pdev *pdev);
374*5113495bSYour Name #else
375*5113495bSYour Name static inline
dfs_mlme_release_radar_mode_switch_lock(struct wlan_objmgr_pdev * pdev)376*5113495bSYour Name void dfs_mlme_release_radar_mode_switch_lock(struct wlan_objmgr_pdev *pdev)
377*5113495bSYour Name {
378*5113495bSYour Name }
379*5113495bSYour Name #endif
380*5113495bSYour Name #endif /* _WLAN_DFS_MLME_API_H_ */
381