xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/include/wlan_vdev_mlme.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 /*
2  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /**
18  * DOC: Define VDEV MLME structure and APIs
19  */
20 #ifndef _WLAN_VDEV_MLME_H_
21 #define _WLAN_VDEV_MLME_H_
22 
23 #include <wlan_vdev_mgr_tgt_if_rx_defs.h>
24 #include <wlan_objmgr_vdev_obj.h>
25 #include <wlan_vdev_mlme_api.h>
26 #include <wlan_ext_mlme_obj_types.h>
27 
28 struct vdev_mlme_obj;
29 struct cnx_mgr;
30 
31 /* Requestor ID for multiple vdev restart */
32 #define MULTIPLE_VDEV_RESTART_REQ_ID 0x1234
33 
34 /* values for vdev_type */
35 #define WLAN_VDEV_MLME_TYPE_UNKNOWN   0x0
36 #define WLAN_VDEV_MLME_TYPE_AP   0x1
37 #define WLAN_VDEV_MLME_TYPE_STA  0x2
38 #define WLAN_VDEV_MLME_TYPE_IBSS 0x3
39 #define WLAN_VDEV_MLME_TYPE_MONITOR 0x4
40 #define WLAN_VDEV_MLME_TYPE_NAN 0x5
41 #define WLAN_VDEV_MLME_TYPE_OCB 0x6
42 #define WLAN_VDEV_MLME_TYPE_NDI 0x7
43 
44 /* values for vdev_subtype */
45 #define WLAN_VDEV_MLME_SUBTYPE_UNKNOWN   0x0
46 #define WLAN_VDEV_MLME_SUBTYPE_P2P_DEVICE 0x1
47 #define WLAN_VDEV_MLME_SUBTYPE_P2P_CLIENT 0x2
48 #define WLAN_VDEV_MLME_SUBTYPE_P2P_GO 0x3
49 #define WLAN_VDEV_MLME_SUBTYPE_PROXY_STA 0x4
50 #define WLAN_VDEV_MLME_SUBTYPE_MESH 0x5
51 #define WLAN_VDEV_MLME_SUBTYPE_MESH_11S   0x6
52 #define WLAN_VDEV_MLME_SUBTYPE_SMART_MONITOR 0x7
53 
54 /* vdev control flags (per bits) */
55 #define WLAN_VDEV_MLME_FLAGS_NON_MBSSID_AP      0x00000001
56 #define WLAN_VDEV_MLME_FLAGS_TRANSMIT_AP        0x00000002
57 #define WLAN_VDEV_MLME_FLAGS_NON_TRANSMIT_AP    0x00000004
58 #define WLAN_VDEV_MLME_FLAGS_EMA_MODE           0x00000008
59 #define WLAN_VDEV_MLME_FLAGS_MBSS_CMN_PARAM     0x00000010
60 
61 /**
62  * struct vdev_mlme_proto_generic - generic mlme proto structure
63  * sent in frames
64  * @dtim_period: frequency of data transmissions per beacon 1-255
65  * @slot_time: slot time
66  * @protection_mode: rts cts protection mode
67  * @beacon_interval: beacon interval
68  * @ldpc: low density parity check value
69  * @nss: number of spatial stream
70  * @nss_2g: 2.4GHz number of spatial stream
71  * @nss_5g: 5GHz number of spatial stream
72  * @tsfadjust: adjusted timer sync value
73  */
74 struct vdev_mlme_proto_generic {
75 	uint8_t dtim_period;
76 	uint32_t slot_time;
77 	uint32_t protection_mode;
78 	uint16_t beacon_interval;
79 	uint8_t ldpc;
80 	uint8_t nss;
81 	uint8_t nss_2g;
82 	uint8_t nss_5g;
83 	uint64_t tsfadjust;
84 };
85 
86 /**
87  * struct vdev_mlme_proto_ap - ap specific mlme protocol
88  * @.
89  */
90 struct vdev_mlme_proto_ap {
91 };
92 
93 /**
94  * struct vdev_mlme_proto_sta - sta specific mlme protocol
95  * @assoc_id: association id of station
96  * @uapsd_cfg: uapsd configuration
97  */
98 struct vdev_mlme_proto_sta {
99 	uint16_t assoc_id;
100 	uint16_t uapsd_cfg;
101 };
102 
103 /**
104  * struct vdev_mlme_proto_bss_color - bss color cfg
105  * @flags: proposed for future use cases, currently not used.
106  * @evt_type: bss color collision event.
107  * @current_bss_color: current bss color.
108  * @detection_period_ms: scan interval for both AP and STA mode.
109  * @scan_period_ms: scan period for passive scan to detect collision.
110  * @free_slot_expiry_time_ms: FW to notify host at timer expiry after
111  *                            which Host will disable the bss color.
112  */
113 struct vdev_mlme_proto_bss_color {
114 	uint32_t flags;
115 	uint8_t  evt_type;
116 	uint32_t current_bss_color;
117 	uint32_t detection_period_ms;
118 	uint32_t scan_period_ms;
119 	uint32_t free_slot_expiry_time_ms;
120 };
121 
122 /**
123  * struct vdev_mlme_vht_info - vdev VHT information
124  * @caps: vht capabilities
125  * @subfer: su beam former capability
126  * @subfee: su beam formee capability
127  * @mubfer: mu beam former capability
128  * @mubfee: mu beam formee capability
129  * @implicit_bf: Implicit BF support
130  * @sounding_dimension: Beamformer number of sounding dimension
131  * @bfee_sts_cap: beam formee STA capability
132  * @allow_vht: vht capability status
133  */
134 struct vdev_mlme_vht_info {
135 	uint32_t caps;
136 	uint8_t  subfer;
137 	uint8_t  mubfer;
138 	uint8_t  subfee;
139 	uint8_t  mubfee;
140 	uint8_t  implicit_bf;
141 	uint8_t  sounding_dimension;
142 	uint8_t  bfee_sts_cap;
143 	bool     allow_vht;
144 };
145 
146 /**
147  * struct vdev_mlme_ht_info - vdev HT information
148  * @ht_caps: HT capabilities
149  * @allow_ht: HT capability status
150  */
151 struct vdev_mlme_ht_info {
152 	uint32_t ht_caps;
153 	bool     allow_ht;
154 };
155 
156 /**
157  * struct vdev_mlme_he_ops_info - vdev mlme HEOPS information
158  * @he_ops: he ops
159  */
160 struct vdev_mlme_he_ops_info {
161 	uint32_t he_ops;
162 };
163 
164 #ifdef WLAN_FEATURE_11BE
165 
166 /**
167  * struct vdev_mlme_eht_caps_info - vdev mlme EHT capability information
168  * @eht_maccap_nseppriaccess_support : NSEP Priority Access Supported
169  * @eht_maccap_ehtomctrl_support     : EHT OM Control Support
170  * @eht_maccap_trigtxop_support      : Triggered TXOP Sharing Support
171  * @eht_phycap_reserved              : Reserved
172  * @eht_phycap_320mhzin6ghz          : Support For 320 MHz In 6 GHz
173  * @eht_phycap_242tonerubwlt20mhz    : Support for 242-tone RU In BW Wider Than
174  *                                     20 MHz
175  * @eht_phycap_ndp4xehtltfand320nsgi : NDP With 4. EHT-LTF And 3.2 .s GI
176  * @eht_phycap_partialbwulmu         : Partial Bandwidth UL MU-MIMO
177  * @eht_phycap_subfmr                : SU Beamformer
178  * @eht_phycap_subfme                : SU Beamformee
179  * @eht_phycap_bfmesslt80mhz         : Beamformee SS (<= 80 MHz)
180  * @eht_phycap_bfmess160mhz          : Beamformee SS (= 160 MHz)
181  * @eht_phycap_bfmess320mhz          : Beamformee SS (= 320 MHz)
182  * @eht_phycap_numsoundlt80mhz       : Number Of Sounding Dimensions (<=80 MHz)
183  * @eht_phycap_numsound160mhz        : Number Of Sounding Dimensions (=160 MHz)
184  * @eht_phycap_numsound320mhz        : Number Of Sounding Dimensions (=320 MHz)
185  * @eht_phycap_ng16sufb              : Ng = 16 SU Feedback
186  * @eht_phycap_ng16mufb              : Ng = 16 MU Feedback
187  * @eht_phycap_codbk42sufb           : Codebook Size {4,2} SU Feedback
188  * @eht_phycap_codbk75mufb           : Codebook Size {4,2} MU Feedback
189  * @eht_phycap_trigsubffb            : Triggered SU Beamforming Feedback
190  * @eht_phycap_trigmubfpartbwfb      : Triggered MU Beamforming Partial B
191  *                                     Feedback
192  * @eht_phycap_trigcqifb             : Triggered CQI Feedback
193  * @eht_phycap_partbwdlmumimo        : Partial Bandwidth DL MU-MIMO
194  * @eht_phycap_psrsr                 : PSR-Based SR Support
195  * @eht_phycap_pwrbstfactor          : Power Boost Factor Support
196  * @eht_phycap_4xehtltfand800nsgi    : EHT MU PPDU With 4xEHT-LTF And 0.8 .s GI
197  * @eht_phycap_maxnc                 : Max Nc
198  * @eht_phycap_nontrigcqifb          : Non-Triggered CQI Feedback
199  * @eht_phycap_tx1024and4096qamls242toneru : Tx 1024-QAM And 4096-QAM <
200  *                                           242-tone RU Support
201  * @eht_phycap_rx1024and4096qamls242toneru : Rx 1024-QAM And 4096-QAM <
202  *                                           242-tone RU Support
203  * @eht_phycap_ppethrespresent       : PPE Thresholds Present
204  * @eht_phycap_cmnnompktpad          : Common Nominal Packet Padding
205  * @eht_phycap_maxnumehtltf          : Maximum Number Of Supported EHT-LTFs
206  * @eht_phycap_supmcs15              : Support of MCS 15
207  * @eht_phycap_ehtdupin6ghz          : Support Of EHT DUP In 6 GHz
208  * @eht_phycap_20mhzopstarxndpwiderbw : Support For 20 MHz Operating STA
209  *                                      Receiving NDP With Wider Bandwidth
210  * @eht_phycap_nonofdmaulmumimolt80mhz : Non-OFDMA UL MU-MIMO (BW <= 80 MHz)
211  * @eht_phycap_nonofdmaulmumimo160mhz : Non-OFDMA UL MU-MIMO (BW = 160 MHz)
212  * @eht_phycap_nonofdmaulmumimo320mhz : Non-OFDMA UL MU-MIMO (BW = 320 MHz)
213  * @eht_phycap_mubfmrlt80mhz         : MU Beamformer (BW <= 80 MHz)
214  * @eht_phycap_mubfmr160mhz          : MU Beamformer (BW = 160 MHz)
215  * @eht_phycap_mubfmr320mhz          : MU Beamformer (BW = 320 MHz)
216  */
217 struct vdev_mlme_eht_caps_info {
218 	uint32_t eht_maccap_nseppriaccess_support :1,
219 		 eht_maccap_ehtomctrl_support     :1,
220 		 eht_maccap_trigtxop_support      :1;
221 	uint32_t eht_phycap_reserved                    :1,
222 		 eht_phycap_320mhzin6ghz                :1,
223 		 eht_phycap_242tonerubwlt20mhz          :1,
224 		 eht_phycap_ndp4xehtltfand320nsgi       :1,
225 		 eht_phycap_partialbwulmu               :1,
226 		 eht_phycap_subfmr                      :1,
227 		 eht_phycap_subfme                      :1,
228 		 eht_phycap_bfmesslt80mhz               :3,
229 		 eht_phycap_bfmess160mhz                :3,
230 		 eht_phycap_bfmess320mhz                :3,
231 		 eht_phycap_numsoundlt80mhz             :3,
232 		 eht_phycap_numsound160mhz              :3,
233 		 eht_phycap_numsound320mhz              :3,
234 		 eht_phycap_ng16sufb                    :1,
235 		 eht_phycap_ng16mufb                    :1,
236 		 eht_phycap_codbk42sufb                 :1,
237 		 eht_phycap_codbk75mufb                 :1,
238 		 eht_phycap_trigsubffb                  :1,
239 		 eht_phycap_trigmubfpartbwfb            :1,
240 		 eht_phycap_trigcqifb                   :1;
241 	uint32_t eht_phycap_partbwdlmumimo              :1,
242 		 eht_phycap_psrsr                       :1,
243 		 eht_phycap_pwrbstfactor                :1,
244 		 eht_phycap_4xehtltfand800nsgi          :1,
245 		 eht_phycap_maxnc                       :4,
246 		 eht_phycap_nontrigcqifb                :1,
247 		 eht_phycap_tx1024and4096qamls242toneru :1,
248 		 eht_phycap_rx1024and4096qamls242toneru :1,
249 		 eht_phycap_ppethrespresent             :1,
250 		 eht_phycap_cmnnompktpad                :2,
251 		 eht_phycap_maxnumehtltf                :5,
252 		 eht_phycap_supmcs15                    :4,
253 		 eht_phycap_ehtdupin6ghz                :1,
254 		 eht_phycap_20mhzopstarxndpwiderbw      :1,
255 		 eht_phycap_nonofdmaulmumimolt80mhz     :1,
256 		 eht_phycap_nonofdmaulmumimo160mhz      :1,
257 		 eht_phycap_nonofdmaulmumimo320mhz      :1,
258 		 eht_phycap_mubfmrlt80mhz               :1,
259 		 eht_phycap_mubfmr160mhz                :1,
260 		 eht_phycap_mubfmr320mhz                :1;
261 };
262 
263 /**
264  * struct vdev_mlme_eht_ops_info - vdev mlme EHTOPS information
265  * @eht_ops: eht ops
266  */
267 struct vdev_mlme_eht_ops_info {
268 	uint32_t eht_ops;
269 };
270 #endif
271 
272 /**
273  * struct vdev_mlme_he_ops_info - vdev protocol structure holding information
274  * that is used in frames
275  * @generic: generic protocol information
276  * @ap: ap specific protocol information
277  * @sta: sta specific protocol information
278  * @vht_info: vht information
279  * @ht_info: ht capabilities information
280  * @he_ops_info: he ops information
281  * @eht_cap_info: EHT capability information
282  * @eht_ops_info: EHT operation information
283  * @bss_color: 11ax HE BSS Color information
284  */
285 struct vdev_mlme_proto {
286 	struct vdev_mlme_proto_generic generic;
287 	struct vdev_mlme_proto_ap ap;
288 	struct vdev_mlme_proto_sta sta;
289 	struct vdev_mlme_vht_info vht_info;
290 	struct vdev_mlme_ht_info ht_info;
291 	struct vdev_mlme_he_ops_info he_ops_info;
292 #ifdef WLAN_FEATURE_11BE
293 	struct vdev_mlme_eht_caps_info eht_cap_info;
294 	struct vdev_mlme_eht_ops_info eht_ops_info;
295 #endif
296 	struct vdev_mlme_proto_bss_color bss_color;
297 };
298 
299 /**
300  * struct vdev_mlme_mgmt_generic - generic vdev mlme mgmt cfg
301  * @rts_threshold: RTS threshold
302  * @frag_threshold: Fragmentation threshold
303  * @probe_delay: time in msec for delaying to send first probe request
304  * @repeat_probe_time: probe request transmission time
305  * @drop_unencry: drop unencrypted status
306  * @ tx_pwrlimit: Tx power limit
307  * @tx_power: Tx power
308  * @minpower: Min power
309  * @maxpower: Max power
310  * @maxregpower: max regulatory power
311  * @antennamax: max antenna
312  * @reg_class_id: reg domain class id
313  * @ampdu: ampdu limit
314  * @amsdu: amsdu limit
315  * @ssid: service set identifier
316  * @ssid_len: ssid length
317  * @type: vdev type
318  * @sub_type: vdev subtype
319  * @rx_decap_type: rx decap type
320  * @tx_encap_type: tx encap type
321  * @disable_hw_ack: disable ha ack flag
322  * @bssid: bssid
323  * @phy_mode: phy mode
324  * @special_vdev_mode: indicates special vdev mode
325  */
326 struct vdev_mlme_mgmt_generic {
327 	uint32_t rts_threshold;
328 	uint32_t frag_threshold;
329 	uint32_t probe_delay;
330 	uint32_t repeat_probe_time;
331 	uint32_t drop_unencry;
332 	uint32_t tx_pwrlimit;
333 	uint8_t tx_power;
334 	uint8_t minpower;
335 	uint8_t maxpower;
336 	uint8_t maxregpower;
337 	uint8_t antennamax;
338 	uint8_t reg_class_id;
339 	uint8_t ampdu;
340 	uint8_t amsdu;
341 	char ssid[WLAN_SSID_MAX_LEN + 1];
342 	uint8_t ssid_len;
343 	uint8_t type;
344 	uint8_t subtype;
345 	uint8_t rx_decap_type;
346 	uint8_t tx_encap_type;
347 	bool disable_hw_ack;
348 	uint8_t bssid[QDF_MAC_ADDR_SIZE];
349 	uint32_t phy_mode;
350 	bool special_vdev_mode;
351 };
352 
353 /*
354  * struct wlan_vdev_aid_mgr – AID manager
355  * @aid_bitmap: AID bitmap array
356  * @max_aid: Max allowed AID
357  * @ref_cnt:  to share AID across VDEVs for MBSSID
358  */
359 struct wlan_vdev_aid_mgr {
360 	qdf_bitmap(aid_bitmap, WLAN_UMAC_MAX_AID);
361 	uint16_t max_aid;
362 	qdf_atomic_t ref_cnt;
363 };
364 
365 /**
366  * struct vdev_mlme_mgmt_ap - ap specific vdev mlme mgmt cfg
367  * @hidden_ssid: flag to indicate whether it is hidden ssid
368  * @cac_duration_ms: cac duration in millseconds
369  * @aid_mgr: AID bitmap mgr
370  */
371 struct vdev_mlme_mgmt_ap {
372 	bool hidden_ssid;
373 	uint32_t cac_duration_ms;
374 	struct wlan_vdev_aid_mgr *aid_mgr;
375 };
376 
377 /**
378  * struct vdev_mlme_mgmt_sta - sta specific vdev mlme mgmt cfg
379  * @he_mcs_12_13_map: map to indicate mcs12/13 caps of peer&dut
380  */
381 struct vdev_mlme_mgmt_sta {
382 	uint16_t he_mcs_12_13_map;
383 };
384 
385 /**
386  * struct vdev_mlme_inactivity_params - vdev mlme inactivity parameters
387  * @bmiss_first_bcnt: bmiss first time
388  * @bmiss_final_bcnt: bmiss final time
389  * @keepalive_min_idle_inactive_time_secs: min time AP consider STA to be
390  * inactive
391  * @keepalive_max_idle_inactive_time_secs: max inactive idle time for AP to send
392  * data-null
393  * @keepalive_max_unresponsive_time_secs: max time to send WMI_STA_KICKOUT
394  */
395 struct vdev_mlme_inactivity_params {
396 	uint32_t bmiss_first_bcnt;
397 	uint32_t bmiss_final_bcnt;
398 	uint32_t keepalive_min_idle_inactive_time_secs;
399 	uint32_t keepalive_max_idle_inactive_time_secs;
400 	uint32_t keepalive_max_unresponsive_time_secs;
401 };
402 
403 /**
404  * struct vdev_mlme_rate_info - vdev mlme rate information
405  * @rate_flags: dynamic bandwidth info
406  * @per_band_tx_mgmt_rate: per band Tx mgmt rate
407  * @max_rate: max bandwidth rate
408  * @tx_mgmt_rate: Tx Mgmt rate
409  * @bcn_tx_rate: beacon Tx rate
410  * @bcn_tx_rate_code: beacon Tx rate code
411  * @type: Type of ratemask configuration
412  * @lower32: Lower 32 bits in the 1st 64-bit value
413  * @higher32: Higher 32 bits in the 1st 64-bit value
414  * @lower32_2: Lower 32 bits in the 2nd 64-bit value
415  * @half_rate: Half rate
416  * @quarter_rate: quarter rate
417  */
418 struct vdev_mlme_rate_info {
419 	uint32_t rate_flags;
420 	uint32_t per_band_tx_mgmt_rate;
421 	uint32_t max_rate;
422 	uint32_t tx_mgmt_rate;
423 	uint32_t bcn_tx_rate;
424 #ifdef WLAN_BCN_RATECODE_ENABLE
425 	uint32_t bcn_tx_rate_code;
426 #endif
427 	uint32_t rtscts_tx_rate;
428 	uint8_t  type;
429 	uint32_t lower32;
430 	uint32_t higher32;
431 	uint32_t lower32_2;
432 	bool     half_rate;
433 	bool     quarter_rate;
434 };
435 
436 /**
437  * struct vdev_mlme_chainmask_info - vdev mlme chainmask information
438  * @tx_chainmask: Tx chainmask
439  * @rx_chainmask: Rx Chainmask
440  * @num_rx_chain: Num of bits set in Rx chain
441  * @num_tx_chain: Num of bits set in Tx chain
442  */
443 struct vdev_mlme_chainmask_info {
444 	uint8_t tx_chainmask;
445 	uint8_t rx_chainmask;
446 	uint8_t num_rx_chain;
447 	uint8_t num_tx_chain;
448 };
449 
450 /**
451  * struct vdev_mlme_powersave_info - vdev mlme powersave information
452  * @packet_powersave: packet powersave
453  * @max_li_of_moddtim: max mod dtim
454  * @dyndtim_cnt: dynamic dtim count
455  * @listen_interval: listen interval
456  * @moddtim_cnt: mod dtim count
457  */
458 struct vdev_mlme_powersave_info {
459 	uint32_t packet_powersave;
460 	uint32_t max_li_of_moddtim;
461 	uint32_t dyndtim_cnt;
462 	uint32_t listen_interval;
463 	uint32_t moddtim_cnt;
464 };
465 
466 /**
467  * struct vdev_mlme_beacon_info - vdev mlme beacon information
468  * @beacon_buffer: buffer allocated for beacon frame
469  * @beacon_offsets: beacon IE's offsets
470  */
471 struct vdev_mlme_beacon_info {
472 	qdf_nbuf_t beacon_buffer;
473 	void *beacon_offsets;
474 };
475 
476 /**
477  * struct vdev_mlme_mbss_11ax - mbss 11ax fields required for up cmd
478  * @profile_idx: profile index of the connected non-trans ap (mbssid case).
479  *              0  means invalid.
480  * @profile_num: the total profile numbers of non-trans aps (mbssid
481  * case).
482  *              0 means non-MBSS AP.
483  * @mbssid-flags: MBSS IE flags indicating vdev type
484  * @vdevid_trans: id of transmitting vdev for MBSS IE
485  * @vdev_bmap: vdev bitmap of VAPs in MBSS group
486  * @is_cmn_param: flag to check mbss common param
487  * @trans_bssid: bssid of transmitted AP (MBSS IE case)
488  * @is_multi_mbssid: Flag to identify multi group mbssid support
489  * @grp_id: Group id of current vdev
490  */
491 struct vdev_mlme_mbss_11ax {
492 	uint32_t profile_idx;
493 	uint32_t profile_num;
494 	uint32_t mbssid_flags;
495 	uint8_t vdevid_trans;
496 	unsigned long vdev_bmap;
497 	bool is_cmn_param;
498 	uint8_t trans_bssid[QDF_MAC_ADDR_SIZE];
499 	bool is_multi_mbssid;
500 	uint32_t grp_id;
501 };
502 
503 /**
504  * struct vdev_mlme_mgmt - vdev mlme mgmt related cfg
505  * @generic: generic mgmt information
506  * @ap: ap specific mgmt information
507  * @sta: sta specific mgmt information
508  * @inactivity_params: inactivity parameters
509  * @rate_info: bandwidth rate information
510  * @chainmask_info: Chainmask information
511  * @powersave_info: Power save parameters
512  * @beacon_info: beacon buffer information
513  * @mbss_11ax: MBSS 11ax information
514  */
515 struct vdev_mlme_mgmt {
516 	struct vdev_mlme_mgmt_generic generic;
517 	struct vdev_mlme_mgmt_ap ap;
518 	struct vdev_mlme_mgmt_sta sta;
519 	struct vdev_mlme_inactivity_params inactivity_params;
520 	struct vdev_mlme_rate_info rate_info;
521 	struct vdev_mlme_chainmask_info chainmask_info;
522 	struct vdev_mlme_powersave_info powersave_info;
523 	struct vdev_mlme_beacon_info beacon_info;
524 	struct vdev_mlme_mbss_11ax mbss_11ax;
525 };
526 
527 /**
528  * enum beacon_update_op - Beacon update op type
529  * @BEACON_INIT:      Initialize beacon
530  * @BEACON_REINIT:    Re-initialize beacon
531  * @BEACON_UPDATE:    Update dynamic fields of beacon
532  * @BEACON_CSA:       Enable CSA IE
533  * @BEACON_FREE:      Beacon buffer free
534  */
535 enum beacon_update_op {
536 	BEACON_INIT,
537 	BEACON_REINIT,
538 	BEACON_UPDATE,
539 	BEACON_CSA,
540 	BEACON_FREE,
541 };
542 
543 /**
544  * enum vdev_cmd_type - Command type
545  * @START_REQ:      Start request
546  * @RESTART_REQ:    Restart request
547  * @STOP_REQ: STOP request
548  * @DELETE_REQ: DELETE request
549  */
550 enum vdev_cmd_type {
551 	START_REQ,
552 	RESTART_REQ,
553 	STOP_REQ,
554 	DELETE_REQ,
555 };
556 
557 /**
558  * enum vdev_start_resp_type - start respone type
559  * @START_RESPONSE:  Start response
560  * @RESTART_RESPONSE: Restart response
561  */
562 enum vdev_start_resp_type {
563 	START_RESPONSE = 0,
564 	RESTART_RESPONSE,
565 };
566 
567 /**
568  * struct vdev_mlme_ops - VDEV MLME operation callbacks structure
569  * @mlme_vdev_validate_basic_params:    callback to validate VDEV basic params
570  * @mlme_vdev_reset_proto_params:       callback to Reset protocol params
571  * @mlme_vdev_start_send:               callback to initiate actions of VDEV
572  *                                      MLME start operation
573  * @mlme_vdev_restart_send:             callback to initiate actions of VDEV
574  *                                      MLME restart operation
575  * @mlme_vdev_stop_start_send:          callback to block start/restart VDEV
576  *                                      request command
577  * @mlme_vdev_start_continue:           callback to initiate operations on
578  *                                      LMAC/FW start response
579  * @mlme_vdev_sta_conn_start:           callback to initiate STA connection
580  * @mlme_vdev_up_send:                  callback to initiate actions of VDEV
581  *                                      MLME up operation
582  * @mlme_vdev_notify_up_complete:       callback to notify VDEV MLME on moving
583  *                                      to UP state
584  * @mlme_vdev_notify_roam_start:        callback to initiate roaming
585  * @mlme_vdev_update_beacon:            callback to initiate beacon update
586  * @mlme_vdev_disconnect_peers:         callback to initiate disconnection of
587  *                                      peers
588  * @mlme_vdev_dfs_cac_timer_stop:       callback to stop the DFS CAC timer
589  * @mlme_vdev_stop_send:                callback to initiate actions of VDEV
590  *                                      MLME stop operation
591  * @mlme_vdev_stop_continue:            callback to initiate operations on
592  *                                      LMAC/FW stop response
593  * @mlme_vdev_bss_peer_delete_continue: callback to initiate operations on BSS
594  *                                      peer delete completion
595  * @mlme_vdev_down_send:                callback to initiate actions of VDEV
596  *                                      MLME down operation
597  * @mlme_vdev_notify_start_state_exit:  callback to notify on vdev start
598  *                                      start state exit
599  * @mlme_vdev_is_newchan_no_cac:        callback to check CAC is required
600  * @mlme_vdev_ext_peer_delete_all_rsp:  callback to initiate actions for
601  *                                      vdev mlme peer delete all response
602  * @mlme_vdev_dfs_cac_wait_notify:      callback to notify about CAC state
603  * @mlme_vdev_csa_complete:             callback to indicate CSA complete
604  * @mlme_vdev_sta_disconn_start:        callback to initiate STA disconnection
605  */
606 struct vdev_mlme_ops {
607 	QDF_STATUS (*mlme_vdev_validate_basic_params)(
608 				struct vdev_mlme_obj *vdev_mlme,
609 				uint16_t event_data_len, void *event_data);
610 	QDF_STATUS (*mlme_vdev_reset_proto_params)(
611 				struct vdev_mlme_obj *vdev_mlme,
612 				uint16_t event_data_len, void *event_data);
613 	QDF_STATUS (*mlme_vdev_start_send)(
614 				struct vdev_mlme_obj *vdev_mlme,
615 				uint16_t event_data_len, void *event_data);
616 	QDF_STATUS (*mlme_vdev_restart_send)(
617 				struct vdev_mlme_obj *vdev_mlme,
618 				uint16_t event_data_len, void *event_data);
619 	QDF_STATUS (*mlme_vdev_stop_start_send)(
620 				struct vdev_mlme_obj *vdev_mlme,
621 				enum vdev_cmd_type type,
622 				uint16_t event_data_len, void *event_data);
623 	QDF_STATUS (*mlme_vdev_start_continue)(
624 				struct vdev_mlme_obj *vdev_mlme,
625 				uint16_t event_data_len, void *event_data);
626 	QDF_STATUS (*mlme_vdev_sta_conn_start)(
627 				struct vdev_mlme_obj *vdev_mlme,
628 				uint16_t event_data_len, void *event_data);
629 	QDF_STATUS (*mlme_vdev_start_req_failed)(
630 				struct vdev_mlme_obj *vdev_mlme,
631 				uint16_t event_data_len, void *event_data);
632 	QDF_STATUS (*mlme_vdev_up_send)(
633 				struct vdev_mlme_obj *vdev_mlme,
634 				uint16_t event_data_len, void *event_data);
635 	QDF_STATUS (*mlme_vdev_notify_up_complete)(
636 				struct vdev_mlme_obj *vdev_mlme,
637 				uint16_t event_data_len, void *event_data);
638 	QDF_STATUS (*mlme_vdev_notify_roam_start)(
639 				struct vdev_mlme_obj *vdev_mlme,
640 				uint16_t event_data_len, void *event_data);
641 	QDF_STATUS (*mlme_vdev_update_beacon)(
642 				struct vdev_mlme_obj *vdev_mlme,
643 				enum beacon_update_op op,
644 				uint16_t event_data_len, void *event_data);
645 	QDF_STATUS (*mlme_vdev_disconnect_peers)(
646 				struct vdev_mlme_obj *vdev_mlme,
647 				uint16_t event_data_len, void *event_data);
648 	QDF_STATUS (*mlme_vdev_dfs_cac_timer_stop)(
649 				struct vdev_mlme_obj *vdev_mlme,
650 				uint16_t event_data_len, void *event_data);
651 	QDF_STATUS (*mlme_vdev_stop_send)(
652 				struct vdev_mlme_obj *vdev_mlme,
653 				uint16_t event_data_len, void *event_data);
654 	QDF_STATUS (*mlme_vdev_stop_continue)(
655 				struct vdev_mlme_obj *vdev_mlme,
656 				uint16_t event_data_len, void *event_data);
657 	QDF_STATUS (*mlme_vdev_down_send)(
658 				struct vdev_mlme_obj *vdev_mlme,
659 				uint16_t event_data_len, void *event_data);
660 	QDF_STATUS (*mlme_vdev_notify_down_complete)(
661 				struct vdev_mlme_obj *vdev_mlme,
662 				uint16_t event_data_len, void *event_data);
663 	QDF_STATUS (*mlme_vdev_ext_stop_rsp)(
664 				struct vdev_mlme_obj *vdev_mlme,
665 				struct vdev_stop_response *rsp);
666 	QDF_STATUS (*mlme_vdev_ext_start_rsp)(
667 				struct vdev_mlme_obj *vdev_mlme,
668 				struct vdev_start_response *rsp);
669 	QDF_STATUS (*mlme_vdev_notify_start_state_exit)(
670 				struct vdev_mlme_obj *vdev_mlme);
671 	QDF_STATUS (*mlme_vdev_is_newchan_no_cac)(
672 				struct vdev_mlme_obj *vdev_mlme);
673 	QDF_STATUS (*mlme_vdev_ext_peer_delete_all_rsp)(
674 				struct vdev_mlme_obj *vdev_mlme,
675 				struct peer_delete_all_response *rsp);
676 	QDF_STATUS (*mlme_vdev_dfs_cac_wait_notify)(
677 				struct vdev_mlme_obj *vdev_mlme);
678 	QDF_STATUS (*mlme_vdev_csa_complete)(
679 				struct vdev_mlme_obj *vdev_mlme);
680 	QDF_STATUS (*mlme_vdev_sta_disconn_start)(
681 				struct vdev_mlme_obj *vdev_mlme,
682 				uint16_t event_data_len, void *event_data);
683 
684 };
685 
686 /**
687  * struct vdev_mlme_obj - VDEV MLME component object
688  * @proto: VDEV MLME proto substructure
689  * @mgmt: VDEV MLME mgmt substructure
690  * @sm_lock:              VDEV SM lock
691  * @vdev_cmd_lock:        VDEV MLME command atomicity
692  * @sm_hdl:               VDEV SM handle
693  * @cnx_mgr_ctx: connection manager context, valid for STA and P2P-CLI mode only
694  * @vdev: Pointer to vdev objmgr
695  * @ops:                  VDEV MLME callback table
696  * @ext_vdev_ptr:         VDEV MLME legacy pointer
697  * @reg_tpc_obj:          Regulatory transmit power info
698  * @vdev_rt: VDEV response timer
699  * @vdev_wakelock:  vdev wakelock sub structure
700  */
701 struct vdev_mlme_obj {
702 	struct vdev_mlme_proto proto;
703 	struct vdev_mlme_mgmt  mgmt;
704 #ifdef VDEV_SM_LOCK_SUPPORT
705 	qdf_spinlock_t sm_lock;
706 	qdf_mutex_t vdev_cmd_lock;
707 #endif
708 	struct wlan_sm *sm_hdl;
709 	union {
710 		struct cnx_mgr *cnx_mgr_ctx;
711 	};
712 	struct wlan_objmgr_vdev *vdev;
713 	struct vdev_mlme_ops *ops;
714 	mlme_vdev_ext_t *ext_vdev_ptr;
715 	struct reg_tpc_power_info reg_tpc_obj;
716 };
717 
718 /**
719  * wlan_vdev_mlme_set_ssid() - set ssid
720  * @vdev: VDEV object
721  * @ssid: SSID (input)
722  * @ssid_len: Length of SSID
723  *
724  * API to set the SSID of VDEV
725  *
726  * Caller need to acquire lock with wlan_vdev_obj_lock()
727  *
728  * Return: SUCCESS, if update is done
729  *          FAILURE, if ssid length is > max ssid len
730  */
731 static inline QDF_STATUS wlan_vdev_mlme_set_ssid(
732 				struct wlan_objmgr_vdev *vdev,
733 				const uint8_t *ssid, uint8_t ssid_len)
734 {
735 	struct vdev_mlme_obj *vdev_mlme;
736 
737 	/* This API is invoked with lock acquired, do not add log prints */
738 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
739 	if (!vdev_mlme)
740 		return QDF_STATUS_E_FAILURE;
741 
742 	if (ssid_len <= WLAN_SSID_MAX_LEN) {
743 		qdf_mem_copy(vdev_mlme->mgmt.generic.ssid, ssid, ssid_len);
744 		vdev_mlme->mgmt.generic.ssid_len = ssid_len;
745 	} else {
746 		vdev_mlme->mgmt.generic.ssid_len = 0;
747 		return QDF_STATUS_E_FAILURE;
748 	}
749 	return QDF_STATUS_SUCCESS;
750 }
751 
752 /**
753  * wlan_vdev_mlme_get_ssid() - get ssid
754  * @vdev: VDEV object
755  * @ssid: SSID
756  * @ssid_len: Length of SSID
757  *
758  * API to get the SSID of VDEV, it updates the SSID and its length
759  * in @ssid, @ssid_len respectively
760  *
761  * Caller need to acquire lock with wlan_vdev_obj_lock()
762  *
763  * Return: SUCCESS, if update is done
764  *          FAILURE, if ssid length is > max ssid len
765  */
766 static inline QDF_STATUS wlan_vdev_mlme_get_ssid(
767 				struct wlan_objmgr_vdev *vdev,
768 				 uint8_t *ssid, uint8_t *ssid_len)
769 {
770 	struct vdev_mlme_obj *vdev_mlme;
771 
772 	/* This API is invoked with lock acquired, do not add log prints */
773 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
774 	if (!vdev_mlme)
775 		return QDF_STATUS_E_FAILURE;
776 
777 	if (vdev_mlme->mgmt.generic.ssid_len > 0) {
778 		*ssid_len = vdev_mlme->mgmt.generic.ssid_len;
779 		qdf_mem_copy(ssid, vdev_mlme->mgmt.generic.ssid, *ssid_len);
780 	} else {
781 		*ssid_len = 0;
782 		return QDF_STATUS_E_FAILURE;
783 	}
784 	return QDF_STATUS_SUCCESS;
785 }
786 
787 /**
788  * wlan_vdev_mlme_set_nss() - set NSS
789  * @vdev: VDEV object
790  * @nss: nss configured by user
791  *
792  * API to set the Number of Spatial streams
793  *
794  * Return: void
795  */
796 static inline void wlan_vdev_mlme_set_nss(
797 				struct wlan_objmgr_vdev *vdev,
798 				uint8_t nss)
799 {
800 	struct vdev_mlme_obj *vdev_mlme;
801 
802 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
803 	if (!vdev_mlme)
804 		return;
805 
806 	vdev_mlme->proto.generic.nss = nss;
807 }
808 
809 /**
810  * wlan_vdev_mlme_get_nss() - get NSS
811  * @vdev: VDEV object
812  *
813  * API to get the Number of Spatial Streams
814  *
815  * Return:
816  * @nss: nss value
817  */
818 static inline uint8_t wlan_vdev_mlme_get_nss(
819 				struct wlan_objmgr_vdev *vdev)
820 {
821 	struct vdev_mlme_obj *vdev_mlme;
822 
823 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
824 	if (!vdev_mlme)
825 		return 0;
826 
827 	return vdev_mlme->proto.generic.nss;
828 }
829 
830 /**
831  * wlan_vdev_mlme_set_txchainmask() - set Tx chainmask
832  * @vdev: VDEV object
833  * @chainmask : chainmask either configured by user or max supported
834  *
835  * API to set the Tx chainmask
836  *
837  * Return: void
838  */
839 static inline void wlan_vdev_mlme_set_txchainmask(
840 				struct wlan_objmgr_vdev *vdev,
841 				uint8_t chainmask)
842 {
843 	struct vdev_mlme_obj *vdev_mlme;
844 
845 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
846 
847 	if (!vdev_mlme)
848 		return;
849 
850 	vdev_mlme->mgmt.chainmask_info.tx_chainmask = chainmask;
851 }
852 
853 /**
854  * wlan_vdev_mlme_get_txchainmask() - get Tx chainmask
855  * @vdev: VDEV object
856  *
857  * API to get the Tx chainmask
858  *
859  * Return:
860  * @chainmask : Tx chainmask either configured by user or max supported
861  */
862 static inline uint8_t wlan_vdev_mlme_get_txchainmask(
863 				struct wlan_objmgr_vdev *vdev)
864 {
865 	struct vdev_mlme_obj *vdev_mlme;
866 
867 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
868 	if (!vdev_mlme)
869 		return 0;
870 
871 	return vdev_mlme->mgmt.chainmask_info.tx_chainmask;
872 }
873 
874 /**
875  * wlan_vdev_mlme_set_rxchainmask() - set Rx chainmask
876  * @vdev: VDEV object
877  * @chainmask : Rx chainmask either configured by user or max supported
878  *
879  * API to set the Rx chainmask
880  *
881  * Return: void
882  */
883 static inline void wlan_vdev_mlme_set_rxchainmask(
884 				struct wlan_objmgr_vdev *vdev,
885 				uint8_t chainmask)
886 {
887 	struct vdev_mlme_obj *vdev_mlme;
888 
889 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
890 	if (!vdev_mlme)
891 		return;
892 
893 	vdev_mlme->mgmt.chainmask_info.rx_chainmask = chainmask;
894 }
895 
896 /**
897  * wlan_vdev_mlme_get_rxchainmask() - get Rx chainmask
898  * @vdev: VDEV object
899  *
900  * API to get the Rx chainmask
901  *
902  * Return:
903  * @chainmask : Rx chainmask either configured by user or max supported
904  */
905 static inline uint8_t wlan_vdev_mlme_get_rxchainmask(
906 				struct wlan_objmgr_vdev *vdev)
907 {
908 	struct vdev_mlme_obj *vdev_mlme;
909 
910 	/* This API is invoked with lock acquired, do not add log prints */
911 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
912 	if (!vdev_mlme)
913 		return 0;
914 
915 	return vdev_mlme->mgmt.chainmask_info.rx_chainmask;
916 }
917 
918 /**
919  * wlan_vdev_mlme_set_txpower() - set tx power
920  * @vdev: VDEV object
921  * @txpow: tx power either configured by used or max allowed
922  *
923  * API to set the tx power
924  *
925  * Return: void
926  */
927 static inline void wlan_vdev_mlme_set_txpower(
928 					struct wlan_objmgr_vdev *vdev,
929 					uint8_t txpow)
930 {
931 	struct vdev_mlme_obj *vdev_mlme;
932 
933 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
934 	if (!vdev_mlme)
935 		return;
936 
937 	vdev_mlme->mgmt.generic.tx_power = txpow;
938 }
939 
940 /**
941  * wlan_vdev_mlme_get_txpower() - get tx power
942  * @vdev: VDEV object
943  *
944  * API to get the tx power
945  *
946  * Return:
947  * @txpow: tx power either configured by used or max allowed
948  */
949 static inline uint8_t wlan_vdev_mlme_get_txpower(
950 				struct wlan_objmgr_vdev *vdev)
951 {
952 	struct vdev_mlme_obj *vdev_mlme;
953 
954 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
955 	if (!vdev_mlme)
956 		return 0;
957 
958 	return vdev_mlme->mgmt.generic.tx_power;
959 }
960 
961 /**
962  * wlan_vdev_mlme_set_maxrate() - set max rate
963  * @vdev: VDEV object
964  * @maxrate: configured by used or based on configured mode
965  *
966  * API to set the max rate the vdev supports
967  *
968  * Return: void
969  */
970 static inline void wlan_vdev_mlme_set_maxrate(
971 				struct wlan_objmgr_vdev *vdev,
972 				uint32_t maxrate)
973 {
974 	struct vdev_mlme_obj *vdev_mlme;
975 
976 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
977 	if (!vdev_mlme)
978 		return;
979 
980 	vdev_mlme->mgmt.rate_info.max_rate = maxrate;
981 }
982 
983 /**
984  * wlan_vdev_mlme_get_maxrate() - get max rate
985  * @vdev: VDEV object
986  *
987  * API to get the max rate the vdev supports
988  *
989  * Return:
990  * @maxrate: configured by used or based on configured mode
991  */
992 static inline uint32_t wlan_vdev_mlme_get_maxrate(
993 				struct wlan_objmgr_vdev *vdev)
994 {
995 	struct vdev_mlme_obj *vdev_mlme;
996 
997 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
998 	if (!vdev_mlme)
999 		return 0;
1000 
1001 	return vdev_mlme->mgmt.rate_info.max_rate;
1002 }
1003 
1004 /**
1005  * wlan_vdev_mlme_set_txmgmtrate() - set txmgmtrate
1006  * @vdev: VDEV object
1007  * @txmgmtrate: Tx Mgmt rate
1008  *
1009  * API to set Mgmt Tx rate
1010  *
1011  * Return: void
1012  */
1013 static inline void wlan_vdev_mlme_set_txmgmtrate(
1014 				struct wlan_objmgr_vdev *vdev,
1015 				uint32_t txmgmtrate)
1016 {
1017 	struct vdev_mlme_obj *vdev_mlme;
1018 
1019 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
1020 	if (!vdev_mlme)
1021 		return;
1022 
1023 	vdev_mlme->mgmt.rate_info.tx_mgmt_rate = txmgmtrate;
1024 }
1025 
1026 /**
1027  * wlan_vdev_mlme_get_txmgmtrate() - get txmgmtrate
1028  * @vdev: VDEV object
1029  *
1030  * API to get Mgmt Tx rate
1031  *
1032  * Return:
1033  * @txmgmtrate: Tx Mgmt rate
1034  */
1035 static inline uint32_t wlan_vdev_mlme_get_txmgmtrate(
1036 				struct wlan_objmgr_vdev *vdev)
1037 {
1038 	struct vdev_mlme_obj *vdev_mlme;
1039 
1040 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
1041 	if (!vdev_mlme)
1042 		return 0;
1043 
1044 	return vdev_mlme->mgmt.rate_info.tx_mgmt_rate;
1045 }
1046 
1047 /**
1048  * wlan_vdev_mlme_is_special_vdev() - check given vdev is a special vdev
1049  * @vdev: VDEV object
1050  *
1051  * API to check given vdev is a special vdev.
1052  *
1053  * Return: true if given vdev is special vdev, else false
1054  */
1055 static inline bool wlan_vdev_mlme_is_special_vdev(
1056 				struct wlan_objmgr_vdev *vdev)
1057 {
1058 	struct vdev_mlme_obj *vdev_mlme;
1059 
1060 	if (!vdev)
1061 		return false;
1062 
1063 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
1064 	if (!vdev_mlme)
1065 		return false;
1066 
1067 	return vdev_mlme->mgmt.generic.special_vdev_mode;
1068 }
1069 
1070 #ifdef WLAN_FEATURE_11AX
1071 /**
1072  * wlan_vdev_mlme_set_he_mcs_12_13_map() - set he mcs12/13 map
1073  * @vdev: VDEV object
1074  * @he_mcs_12_13_map: he mcs12/13 map from self&peer
1075  *
1076  * API to set he mcs 12/13 map
1077  *
1078  * Return: void
1079  */
1080 static inline void wlan_vdev_mlme_set_he_mcs_12_13_map(
1081 				struct wlan_objmgr_vdev *vdev,
1082 				uint16_t he_mcs_12_13_map)
1083 {
1084 	struct vdev_mlme_obj *vdev_mlme;
1085 
1086 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
1087 	if (!vdev_mlme)
1088 		return;
1089 
1090 	vdev_mlme->mgmt.sta.he_mcs_12_13_map = he_mcs_12_13_map;
1091 }
1092 
1093 /**
1094  * wlan_vdev_mlme_get_he_mcs_12_13_map() - get he mcs12/13 map
1095  * @vdev: VDEV object
1096  *
1097  * API to get he mcs12/13 support capability
1098  *
1099  * Return:
1100  * @he_mcs_12_13_map: he mcs12/13 map
1101  */
1102 static inline uint16_t wlan_vdev_mlme_get_he_mcs_12_13_map(
1103 				struct wlan_objmgr_vdev *vdev)
1104 {
1105 	struct vdev_mlme_obj *vdev_mlme;
1106 
1107 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
1108 	if (!vdev_mlme)
1109 		return 0;
1110 
1111 	return vdev_mlme->mgmt.sta.he_mcs_12_13_map;
1112 }
1113 #else
1114 static inline void wlan_vdev_mlme_set_he_mcs_12_13_map(
1115 				struct wlan_objmgr_vdev *vdev,
1116 				uint16_t he_mcs_12_13_map)
1117 {
1118 }
1119 
1120 static inline uint16_t wlan_vdev_mlme_get_he_mcs_12_13_map(
1121 				struct wlan_objmgr_vdev *vdev)
1122 {
1123 	return 0;
1124 }
1125 #endif
1126 
1127 /**
1128  * wlan_vdev_mlme_set_aid_mgr() - set aid mgr
1129  * @vdev: VDEV object
1130  * @aid_mgr: AID mgr
1131  *
1132  * API to set AID mgr in VDEV MLME cmpt object
1133  *
1134  * Return: void
1135  */
1136 static inline void wlan_vdev_mlme_set_aid_mgr(
1137 				struct wlan_objmgr_vdev *vdev,
1138 				struct wlan_vdev_aid_mgr *aid_mgr)
1139 {
1140 	struct vdev_mlme_obj *vdev_mlme;
1141 
1142 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
1143 	if (!vdev_mlme)
1144 		return;
1145 
1146 	vdev_mlme->mgmt.ap.aid_mgr = aid_mgr;
1147 }
1148 
1149 /**
1150  * wlan_vdev_mlme_get_aid_mgr() - get aid mgr
1151  * @vdev: VDEV object
1152  *
1153  * API to get AID mgr in VDEV MLME cmpt object
1154  *
1155  * Return: aid_mgr
1156  */
1157 static inline struct wlan_vdev_aid_mgr *wlan_vdev_mlme_get_aid_mgr(
1158 				struct wlan_objmgr_vdev *vdev)
1159 {
1160 	struct vdev_mlme_obj *vdev_mlme;
1161 
1162 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
1163 	if (!vdev_mlme)
1164 		return NULL;
1165 
1166 	return vdev_mlme->mgmt.ap.aid_mgr;
1167 }
1168 
1169 #endif
1170