wlan_mlme_public_struct.h 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351
  1. /*
  2. * Copyright (c) 2018 The Linux Foundation. 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. * DOC: contains mlme structure definations
  20. */
  21. #ifndef _WLAN_MLME_STRUCT_H_
  22. #define _WLAN_MLME_STRUCT_H_
  23. #include <wlan_cmn.h>
  24. #include <reg_services_public_struct.h>
  25. #define CFG_PMKID_MODES_OKC (0x1)
  26. #define CFG_PMKID_MODES_PMKSA_CACHING (0x2)
  27. #define CFG_VHT_BASIC_MCS_SET_STADEF 0xFFFE
  28. #define CFG_VHT_RX_MCS_MAP_STAMIN 0
  29. #define CFG_VHT_RX_MCS_MAP_STAMAX 0xFFFF
  30. #define CFG_VHT_RX_MCS_MAP_STADEF 0xFFFE
  31. #define CFG_VHT_TX_MCS_MAP_STAMIN 0
  32. #define CFG_VHT_TX_MCS_MAP_STAMAX 0xFFFF
  33. #define CFG_VHT_TX_MCS_MAP_STADEF 0xFFFE
  34. #define CFG_STR_DATA_LEN 17
  35. #define CFG_EDCA_DATA_LEN 17
  36. /**
  37. * struct mlme_cfg_str - generic structure for all mlme CFG string items
  38. *
  39. * @max_len: maximum data length allowed
  40. * @len: valid no. of elements of the data
  41. * @data: uint8_t array to store values
  42. */
  43. struct mlme_cfg_str {
  44. qdf_size_t max_len;
  45. qdf_size_t len;
  46. uint8_t data[CFG_STR_DATA_LEN];
  47. };
  48. /**
  49. * enum e_edca_type - to index edca params for edca profile
  50. * EDCA profile AC unicast/bcast
  51. * @edca_ani_acbe_local: ani BE unicast
  52. * @edca_ani_acbk_local: ani BK unicast
  53. * @edca_ani_acvi_local: ani VI unicast
  54. * @edca_ani_acvo_local: ani VO unicast
  55. * @edca_ani_acbe_bcast: ani BE bcast
  56. * @edca_ani_acbk_bcast: ani BK bcast
  57. * @edca_ani_acvi_bcast: ani VI bcast
  58. * @edca_ani_acvo_bcast: ani VO bcast
  59. * @edca_wme_acbe_local: wme BE unicast
  60. * @edca_wme_acbk_local: wme BK unicast
  61. * @edca_wme_acvi_local: wme VI unicast
  62. * @edca_wme_acvo_local: wme VO unicast
  63. * @edca_wme_acbe_bcast: wme BE bcast
  64. * @edca_wme_acbk_bcast: wme BK bcast
  65. * @edca_wme_acvi_bcast: wme VI bcast
  66. * @edca_wme_acvo_bcast: wme VO bcast
  67. * @edca_etsi_acbe_local: etsi BE unicast
  68. * @edca_etsi_acbk_local: etsi BK unicast
  69. * @edca_etsi_acvi_local: etsi VI unicast
  70. * @edca_etsi_acvo_local: etsi VO unicast
  71. * @edca_etsi_acbe_bcast: etsi BE bcast
  72. * @edca_etsi_acbk_bcast: etsi BK bcast
  73. * @edca_etsi_acvi_bcast: etsi VI bcast
  74. * @edca_etsi_acvo_bcast: etsi VO bcast
  75. */
  76. enum e_edca_type {
  77. edca_ani_acbe_local,
  78. edca_ani_acbk_local,
  79. edca_ani_acvi_local,
  80. edca_ani_acvo_local,
  81. edca_ani_acbe_bcast,
  82. edca_ani_acbk_bcast,
  83. edca_ani_acvi_bcast,
  84. edca_ani_acvo_bcast,
  85. edca_wme_acbe_local,
  86. edca_wme_acbk_local,
  87. edca_wme_acvi_local,
  88. edca_wme_acvo_local,
  89. edca_wme_acbe_bcast,
  90. edca_wme_acbk_bcast,
  91. edca_wme_acvi_bcast,
  92. edca_wme_acvo_bcast,
  93. edca_etsi_acbe_local,
  94. edca_etsi_acbk_local,
  95. edca_etsi_acvi_local,
  96. edca_etsi_acvo_local,
  97. edca_etsi_acbe_bcast,
  98. edca_etsi_acbk_bcast,
  99. edca_etsi_acvi_bcast,
  100. edca_etsi_acvo_bcast
  101. };
  102. #define CFG_EDCA_PROFILE_ACM_IDX 0
  103. #define CFG_EDCA_PROFILE_AIFSN_IDX 1
  104. #define CFG_EDCA_PROFILE_CWMINA_IDX 2
  105. #define CFG_EDCA_PROFILE_CWMAXA_IDX 4
  106. #define CFG_EDCA_PROFILE_TXOPA_IDX 6
  107. #define CFG_EDCA_PROFILE_CWMINB_IDX 7
  108. #define CFG_EDCA_PROFILE_CWMAXB_IDX 9
  109. #define CFG_EDCA_PROFILE_TXOPB_IDX 11
  110. #define CFG_EDCA_PROFILE_CWMING_IDX 12
  111. #define CFG_EDCA_PROFILE_CWMAXG_IDX 14
  112. #define CFG_EDCA_PROFILE_TXOPG_IDX 16
  113. /**
  114. * struct mlme_edca_ac_vo - cwmin, cwmax and aifs value for edca_ac_vo
  115. *
  116. * @vo_cwmin: cwmin value for voice
  117. * @vo_cwmax: cwmax value for voice
  118. * @vo_aifs: aifs value for voice
  119. */
  120. struct mlme_edca_ac_vo {
  121. uint32_t vo_cwmin;
  122. uint32_t vo_cwmax;
  123. uint32_t vo_aifs;
  124. };
  125. /**
  126. * struct mlme_edca_ac_vi - cwmin, cwmax and aifs value for edca_ac_vi
  127. *
  128. * @vi_cwmin: cwmin value for video
  129. * @vi_cwmax: cwmax value for video
  130. * @vi_aifs: aifs value for video
  131. */
  132. struct mlme_edca_ac_vi {
  133. uint32_t vi_cwmin;
  134. uint32_t vi_cwmax;
  135. uint32_t vi_aifs;
  136. };
  137. /**
  138. * struct mlme_edca_ac_bk - cwmin, cwmax and aifs value for edca_ac_bk
  139. *
  140. * @bk_cwmin: cwmin value for background
  141. * @bk_cwmax: cwmax value for background
  142. * @bk_aifs: aifs value for background
  143. */
  144. struct mlme_edca_ac_bk {
  145. uint32_t bk_cwmin;
  146. uint32_t bk_cwmax;
  147. uint32_t bk_aifs;
  148. };
  149. /**
  150. * struct mlme_edca_ac_be - cwmin, cwmax and aifs value for edca_ac_be
  151. *
  152. * @be_cwmin: cwmin value for best effort
  153. * @be_cwmax: cwmax value for best effort
  154. * @be_aifs: aifs value for best effort
  155. */
  156. struct mlme_edca_ac_be {
  157. uint32_t be_cwmin;
  158. uint32_t be_cwmax;
  159. uint32_t be_aifs;
  160. };
  161. /**
  162. * struct mlme_edca_params - EDCA pramaters related config items
  163. *
  164. * @ani_acbk_l: EDCA parameters for ANI local access category background
  165. * @ani_acbe_l: EDCA parameters for ANI local access category best effort
  166. * @ani_acvi_l: EDCA parameters for ANI local access category video
  167. * @ani_acvo_l: EDCA parameters for ANI local access category voice
  168. * @ani_acbk_b: EDCA parameters for ANI bcast access category background
  169. * @ani_acbe_b: EDCA parameters for ANI bcast access category best effort
  170. * @ani_acvi_b: EDCA parameters for ANI bcast access category video
  171. * @ani_acvo_b: EDCA parameters for ANI bcast access category voice
  172. * @wme_acbk_l: EDCA parameters for WME local access category background
  173. * @wme_acbe_l: EDCA parameters for WME local access category best effort
  174. * @wme_acvi_l: EDCA parameters for WME local access category video
  175. * @wme_acvo_l: EDCA parameters for WME local access category voice
  176. * @wme_acbk_b: EDCA parameters for WME bcast access category background
  177. * @wme_acbe_b: EDCA parameters for WME bcast access category best effort
  178. * @wme_acvi_b: EDCA parameters for WME bcast access category video
  179. * @wme_acvo_b: EDCA parameters for WME bcast access category voice
  180. * @etsi_acbk_l: EDCA parameters for ETSI local access category background
  181. * @etsi_acbe_l: EDCA parameters for ETSI local access category best effort
  182. * @etsi_acvi_l: EDCA parameters for ETSI local access category video
  183. * @etsi_acvo_l: EDCA parameters for ETSI local access category voice
  184. * @etsi_acbk_b: EDCA parameters for ETSI bcast access category background
  185. * @etsi_acbe_b: EDCA parameters for ETSI bcast access category best effort
  186. * @etsi_acvi_b: EDCA parameters for ETSI bcast access category video
  187. * @etsi_acvo_b: EDCA parameters for ETSI bcast access category voice
  188. * @enable_edca_params: Enable edca parameter
  189. * @mlme_edca_ac_vo: value for edca_ac_vo
  190. * @mlme_edca_ac_vi: value for edca_ac_vi
  191. * @mlme_edca_ac_bk: value for edca_ac_bk
  192. * @mlme_edca_ac_be: value for edca_ac_be
  193. */
  194. struct wlan_mlme_edca_params {
  195. struct mlme_cfg_str ani_acbk_l;
  196. struct mlme_cfg_str ani_acbe_l;
  197. struct mlme_cfg_str ani_acvi_l;
  198. struct mlme_cfg_str ani_acvo_l;
  199. struct mlme_cfg_str ani_acbk_b;
  200. struct mlme_cfg_str ani_acbe_b;
  201. struct mlme_cfg_str ani_acvi_b;
  202. struct mlme_cfg_str ani_acvo_b;
  203. struct mlme_cfg_str wme_acbk_l;
  204. struct mlme_cfg_str wme_acbe_l;
  205. struct mlme_cfg_str wme_acvi_l;
  206. struct mlme_cfg_str wme_acvo_l;
  207. struct mlme_cfg_str wme_acbk_b;
  208. struct mlme_cfg_str wme_acbe_b;
  209. struct mlme_cfg_str wme_acvi_b;
  210. struct mlme_cfg_str wme_acvo_b;
  211. struct mlme_cfg_str etsi_acbk_l;
  212. struct mlme_cfg_str etsi_acbe_l;
  213. struct mlme_cfg_str etsi_acvi_l;
  214. struct mlme_cfg_str etsi_acvo_l;
  215. struct mlme_cfg_str etsi_acbk_b;
  216. struct mlme_cfg_str etsi_acbe_b;
  217. struct mlme_cfg_str etsi_acvi_b;
  218. struct mlme_cfg_str etsi_acvo_b;
  219. bool enable_edca_params;
  220. struct mlme_edca_ac_vo edca_ac_vo;
  221. struct mlme_edca_ac_vi edca_ac_vi;
  222. struct mlme_edca_ac_bk edca_ac_bk;
  223. struct mlme_edca_ac_be edca_ac_be;
  224. };
  225. #define WLAN_CFG_MFR_NAME_LEN (63)
  226. #define WLAN_CFG_MODEL_NUMBER_LEN (31)
  227. #define WLAN_CFG_MODEL_NAME_LEN (31)
  228. #define WLAN_CFG_MFR_PRODUCT_NAME_LEN (31)
  229. #define WLAN_CFG_MFR_PRODUCT_VERSION_LEN (31)
  230. /**
  231. * struct mlme_ht_capabilities_info - HT Capabilities Info
  232. * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
  233. * @stbc_control_frame: STBC Control frame support
  234. * @psmp: PSMP Support
  235. * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
  236. * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
  237. * @delayed_ba: Support of Delayed Block Ack
  238. * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
  239. * @tx_stbc: Tx STBC Support
  240. * @short_gi_40_mhz: Short GI Support for HT40
  241. * @short_gi_20_mhz: Short GI support for HT20
  242. * @green_field: Support for HT Greenfield PPDUs
  243. * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
  244. * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
  245. * @adv_coding_cap: Rx LDPC support
  246. */
  247. #ifndef ANI_LITTLE_BIT_ENDIAN
  248. struct mlme_ht_capabilities_info {
  249. uint16_t l_sig_tx_op_protection:1;
  250. uint16_t stbc_control_frame:1;
  251. uint16_t psmp:1;
  252. uint16_t dsss_cck_mode_40_mhz:1;
  253. uint16_t maximal_amsdu_size:1;
  254. uint16_t delayed_ba:1;
  255. uint16_t rx_stbc:2;
  256. uint16_t tx_stbc:1;
  257. uint16_t short_gi_40_mhz:1;
  258. uint16_t short_gi_20_mhz:1;
  259. uint16_t green_field:1;
  260. uint16_t mimo_power_save:2;
  261. uint16_t supported_channel_width_set:1;
  262. uint16_t adv_coding_cap:1;
  263. } qdf_packed;
  264. #else
  265. struct mlme_ht_capabilities_info {
  266. uint16_t adv_coding_cap:1;
  267. uint16_t supported_channel_width_set:1;
  268. uint16_t mimo_power_save:2;
  269. uint16_t green_field:1;
  270. uint16_t short_gi_20_mhz:1;
  271. uint16_t short_gi_40_mhz:1;
  272. uint16_t tx_stbc:1;
  273. uint16_t rx_stbc:2;
  274. uint16_t delayed_ba:1;
  275. uint16_t maximal_amsdu_size:1;
  276. uint16_t dsss_cck_mode_40_mhz:1;
  277. uint16_t psmp:1;
  278. uint16_t stbc_control_frame:1;
  279. uint16_t l_sig_tx_op_protection:1;
  280. } qdf_packed;
  281. #endif
  282. /**
  283. * struct wlan_mlme_ht_caps - HT Capabilities related config items
  284. * @ht_cap_info: HT capabilities Info Structure
  285. */
  286. struct wlan_mlme_ht_caps {
  287. struct mlme_ht_capabilities_info ht_cap_info;
  288. };
  289. /*
  290. * struct wlan_mlme_wps_params - All wps based related cfg items
  291. *
  292. * @enable_wps - to enable wps
  293. * @wps_state - current wps state
  294. * @wps_version - wps version
  295. * @wps_cfg_method - wps config method
  296. * @wps_primary_device_category - wps primary device category
  297. * @wps_primary_device_oui - primary device OUI
  298. * @wps_device_sub_category - device sub category
  299. * @wps_device_password_id - password id of device
  300. */
  301. struct wlan_mlme_wps_params {
  302. uint8_t enable_wps;
  303. uint8_t wps_state;
  304. uint8_t wps_version;
  305. uint32_t wps_cfg_method;
  306. uint32_t wps_primary_device_category;
  307. uint32_t wps_primary_device_oui;
  308. uint16_t wps_device_sub_category;
  309. uint32_t wps_device_password_id;
  310. };
  311. #define MLME_CFG_LISTEN_INTERVAL 1
  312. #define MLME_CFG_BEACON_INTERVAL_DEF 100
  313. #define MLME_CFG_TX_MGMT_RATE_DEF 0xFF
  314. #define MLME_CFG_TX_MGMT_2G_RATE_DEF 0xFF
  315. #define MLME_CFG_TX_MGMT_5G_RATE_DEF 0xFF
  316. /**
  317. * struct wlan_mlme_cfg_sap - SAP related config items
  318. * @cfg_ssid: SSID to be configured
  319. * @beacon_interval: beacon interval
  320. * @dtim_interval: dtim interval
  321. * @listen_interval: listen interval
  322. * @sap_11g_policy: Check if 11g support is enabled
  323. * @assoc_sta_limit: Limit on number of STA associated to SAP
  324. * @enable_lte_coex: Flag for LTE coexistence
  325. * @rmc_action_period_freq: rmc action period frequency
  326. * @rate_tx_mgmt: mgmt frame tx rate
  327. * @rate_tx_mgmt_2g: mgmt frame tx rate for 2G band
  328. * @rate_tx_mgmt_5g: mgmt frame tx rate for 5G band
  329. * @tele_bcn_wakeup_en: beacon wakeup enable/disable
  330. * @tele_bcn_max_li: max listen interval
  331. * @sap_get_peer_info: get peer info
  332. * @sap_allow_all_chan_param_name: allow all channels
  333. * @sap_max_no_peers: Maximum number of peers
  334. * @sap_max_offload_peers: Maximum number of peer offloads
  335. * @sap_max_offload_reorder_buffs: Maximum offload reorder buffs
  336. * @sap_ch_switch_beacon_cnt: Number of beacons to be sent out during CSA
  337. * @sap_internal_restart: flag to check if sap restart is in progress
  338. * @sap_ch_switch_mode: Channel switch test mode enable/disable
  339. * @chan_switch_hostapd_rate_enabled_name: enable/disable skip hostapd rate
  340. * @reduced_beacon_interval: reduced beacon interval value
  341. */
  342. struct wlan_mlme_cfg_sap {
  343. uint8_t cfg_ssid[32];
  344. uint16_t beacon_interval;
  345. uint16_t dtim_interval;
  346. uint16_t listen_interval;
  347. bool sap_11g_policy;
  348. uint8_t assoc_sta_limit;
  349. bool enable_lte_coex;
  350. uint16_t rmc_action_period_freq;
  351. uint8_t rate_tx_mgmt;
  352. uint8_t rate_tx_mgmt_2g;
  353. uint8_t rate_tx_mgmt_5g;
  354. bool tele_bcn_wakeup_en;
  355. uint8_t tele_bcn_max_li;
  356. bool sap_get_peer_info;
  357. bool sap_allow_all_chan_param_name;
  358. uint8_t sap_max_no_peers;
  359. uint8_t sap_max_offload_peers;
  360. uint8_t sap_max_offload_reorder_buffs;
  361. uint8_t sap_ch_switch_beacon_cnt;
  362. bool sap_internal_restart;
  363. bool sap_ch_switch_mode;
  364. bool chan_switch_hostapd_rate_enabled_name;
  365. uint8_t reduced_beacon_interval;
  366. };
  367. /**
  368. * struct wlan_mlme_dfs_cfg - DFS Capabilities related config items
  369. * @dfs_master_capable: Is DFS master mode support enabled
  370. */
  371. struct wlan_mlme_dfs_cfg {
  372. bool dfs_master_capable;
  373. };
  374. /**
  375. * struct wlan_mlme_mbo - Multiband Operation related ini configs
  376. * @mbo_candidate_rssi_thres:
  377. * @mbo_current_rssi_thres:
  378. * @mbo_current_rssi_mcc_thres:
  379. * @mbo_candidate_rssi_btc_thres:
  380. */
  381. struct wlan_mlme_mbo {
  382. int8_t mbo_candidate_rssi_thres;
  383. int8_t mbo_current_rssi_thres;
  384. int8_t mbo_current_rssi_mcc_thres;
  385. int8_t mbo_candidate_rssi_btc_thres;
  386. };
  387. /**
  388. * struct wlan_mlme_vht_caps - MLME VHT config items
  389. * @supp_chan_width: Supported Channel Width
  390. * @ldpc_coding_cap: LDPC Coding Capability
  391. * @short_gi_80mhz: 80MHz Short Guard Interval
  392. * @short_gi_160mhz: 160MHz Short Guard Interval
  393. * @tx_stbc: Tx STBC cap
  394. * @rx_stbc: Rx STBC cap
  395. * @su_bformer: SU Beamformer cap
  396. * @su_bformee: SU Beamformee cap
  397. * @tx_bfee_ant_supp: Tx beamformee anti supp
  398. * @num_soundingdim: Number of sounding dimensions
  399. * @mu_bformer: MU Beamformer cap
  400. * @txop_ps: Tx OPs in power save
  401. * @htc_vhtc: htc_vht capability
  402. * @link_adap_cap: Link adaptation capability
  403. * @rx_antpattern: Rx Antenna Pattern cap
  404. * @tx_antpattern: Tx Antenna Pattern cap
  405. * @rx_mcs_map: Rx MCS Map
  406. * @tx_mcs_map: Tx MCS Map
  407. * @rx_supp_data_rate: Rx highest supported data rate
  408. * @tx_supp_data_rate: Tx highest supported data rate
  409. * @basic_mcs_set: Basic MCS set
  410. * @enable_txbf_20mhz: enable tx bf for 20mhz
  411. * @channel_width: Channel width capability for 11ac
  412. * @rx_mcs: VHT Rx MCS capability for 1x1 mode
  413. * @tx_mcs: VHT Tx MCS capability for 1x1 mode
  414. * @rx_mcs2x2: VHT Rx MCS capability for 2x2 mode
  415. * @tx_mcs2x2: VHT Tx MCS capability for 2x2 mode
  416. * @enable_vht20_mcs9: Enables VHT MCS9 in 20M BW operation
  417. * @enable2x2: Enables/disables VHT Tx/Rx MCS values for 2x2
  418. * @enable_mu_bformee: Enables/disables multi-user (MU)
  419. * beam formee capability
  420. * @enable_paid: Enables/disables paid
  421. * @enable_gid: Enables/disables gid
  422. * @b24ghz_band: To control VHT support in 2.4 GHz band
  423. * @vendor_24ghz_band: to control VHT support based on vendor
  424. * ie in 2.4 GHz band
  425. * @ampdu_len_exponent: To handle maximum receive AMPDU ampdu len exponent
  426. * @ampdu_len: To handle maximum receive AMPDU ampdu len
  427. * @tx_bfee_sap: enable tx bfee SAp
  428. * @subfee_vendor_vhtie: enable subfee vendor vht ie
  429. */
  430. struct mlme_vht_capabilities_info {
  431. uint8_t supp_chan_width;
  432. bool ldpc_coding_cap;
  433. bool short_gi_80mhz;
  434. bool short_gi_160mhz;
  435. bool tx_stbc;
  436. bool rx_stbc;
  437. bool su_bformer;
  438. bool su_bformee;
  439. uint8_t tx_bfee_ant_supp;
  440. uint8_t num_soundingdim;
  441. bool mu_bformer;
  442. bool txop_ps;
  443. bool htc_vhtc;
  444. uint8_t link_adap_cap;
  445. bool rx_antpattern;
  446. bool tx_antpattern;
  447. uint32_t rx_mcs_map;
  448. uint32_t tx_mcs_map;
  449. uint32_t rx_supp_data_rate;
  450. uint32_t tx_supp_data_rate;
  451. uint32_t basic_mcs_set;
  452. bool enable_txbf_20mhz;
  453. uint8_t channel_width;
  454. uint32_t rx_mcs;
  455. uint32_t tx_mcs;
  456. uint8_t rx_mcs2x2;
  457. uint8_t tx_mcs2x2;
  458. bool enable_vht20_mcs9;
  459. bool enable2x2;
  460. bool enable_mu_bformee;
  461. bool enable_paid;
  462. bool enable_gid;
  463. bool b24ghz_band;
  464. bool vendor_24ghz_band;
  465. uint8_t ampdu_len_exponent;
  466. uint8_t ampdu_len;
  467. bool tx_bfee_sap;
  468. bool vendor_vhtie;
  469. };
  470. /**
  471. * struct wlan_mlme_vht_caps - VHT Capabilities related config items
  472. * @vht_cap_info: VHT capabilities Info Structure
  473. */
  474. struct wlan_mlme_vht_caps {
  475. struct mlme_vht_capabilities_info vht_cap_info;
  476. };
  477. /**
  478. * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
  479. * @tx_aggregation_size: TX aggr size in number of MPDUs
  480. * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
  481. * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
  482. * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
  483. * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
  484. * @rx_aggregation_size: No. of MPDUs for RX aggr
  485. * @tx_aggr_sw_retry_threshold_be: aggr sw retry threshold for BE
  486. * @tx_aggr_sw_retry_threshold_bk: aggr sw retry threshold for BK
  487. * @tx_aggr_sw_retry_threshold_vi: aggr sw retry threshold for VI
  488. * @tx_aggr_sw_retry_threshold_vo: aggr sw retry threshold for VO
  489. * @tx_non_aggr_sw_retry_threshold_be: non aggr sw retry threshold for BE
  490. * @tx_non_aggr_sw_retry_threshold_bk: non aggr sw retry threshold for BK
  491. * @tx_non_aggr_sw_retry_threshold_vi: non aggr sw retry threshold for VI
  492. * @tx_non_aggr_sw_retry_threshold_vo: non aggr sw retry threshold for VO
  493. * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
  494. * hostapd.conf
  495. */
  496. struct wlan_mlme_qos {
  497. uint32_t tx_aggregation_size;
  498. uint32_t tx_aggregation_size_be;
  499. uint32_t tx_aggregation_size_bk;
  500. uint32_t tx_aggregation_size_vi;
  501. uint32_t tx_aggregation_size_vo;
  502. uint32_t rx_aggregation_size;
  503. uint32_t tx_aggr_sw_retry_threshold_be;
  504. uint32_t tx_aggr_sw_retry_threshold_bk;
  505. uint32_t tx_aggr_sw_retry_threshold_vi;
  506. uint32_t tx_aggr_sw_retry_threshold_vo;
  507. uint32_t tx_non_aggr_sw_retry_threshold_be;
  508. uint32_t tx_non_aggr_sw_retry_threshold_bk;
  509. uint32_t tx_non_aggr_sw_retry_threshold_vi;
  510. uint32_t tx_non_aggr_sw_retry_threshold_vo;
  511. bool sap_max_inactivity_override;
  512. };
  513. #define MLME_HE_PPET_LEN 25
  514. /**
  515. * struct wlan_mlme_he_caps - HE Capabilities related config items
  516. */
  517. struct wlan_mlme_he_caps {
  518. uint8_t he_control;
  519. uint8_t he_twt_requestor;
  520. uint8_t he_twt_responder;
  521. uint8_t he_twt_fragmentation;
  522. uint8_t he_max_frag_msdu;
  523. uint8_t he_min_frag_size;
  524. uint8_t he_trig_pad;
  525. uint8_t he_mtid_aggr_rx;
  526. uint8_t he_link_adaptation;
  527. uint8_t he_all_ack;
  528. uint8_t he_trigd_rsp_scheduling;
  529. uint8_t he_buffer_status_rpt;
  530. uint8_t he_bcast_twt;
  531. uint8_t he_ba_32bit;
  532. uint8_t he_mu_cascading;
  533. uint8_t he_multi_tid;
  534. uint8_t he_dl_mu_ba;
  535. uint8_t he_omi;
  536. uint8_t he_ofdma_ra;
  537. uint8_t he_max_ampdu_len;
  538. uint8_t he_amsdu_frag;
  539. uint8_t he_flex_twt_sched;
  540. uint8_t he_rx_ctrl;
  541. uint8_t he_bsrp_ampdu_aggr;
  542. uint8_t he_qtp;
  543. uint8_t he_a_bqr;
  544. uint8_t he_sr_responder;
  545. uint8_t he_ndp_feedback_supp;
  546. uint8_t he_ops_supp;
  547. uint8_t he_amsdu_in_ampdu;
  548. uint8_t he_chan_width;
  549. uint8_t he_mtid_aggr_tx;
  550. uint8_t he_sub_ch_sel_tx;
  551. uint8_t he_ul_2x996_ru;
  552. uint8_t he_om_ctrl_ul_mu_dis_rx;
  553. uint8_t he_rx_pream_punc;
  554. uint8_t he_class_of_device;
  555. uint8_t he_ldpc;
  556. uint8_t he_ltf_ppdu;
  557. uint8_t he_midamble_rx_nsts;
  558. uint8_t he_ltf_ndp;
  559. uint8_t he_tx_stbc_lt80;
  560. uint8_t he_rx_stbc_lt80;
  561. uint8_t he_doppler;
  562. uint8_t he_ul_mumimo;
  563. uint8_t he_dcm_tx;
  564. uint8_t he_dcm_rx;
  565. uint8_t he_mu_ppdu;
  566. uint8_t he_su_beamformer;
  567. uint8_t he_su_beamformee;
  568. uint8_t he_mu_beamformer;
  569. uint8_t he_bfee_sts_lt80;
  570. uint8_t he_bfee_sts_gt80;
  571. uint8_t he_num_sound_lt80;
  572. uint8_t he_num_sound_gt80;
  573. uint8_t he_su_feed_tone16;
  574. uint8_t he_mu_feed_tone16;
  575. uint8_t he_codebook_su;
  576. uint8_t he_codebook_mu;
  577. uint8_t he_bfrm_feed;
  578. uint8_t he_er_su_ppdu;
  579. uint8_t he_dl_part_bw;
  580. uint8_t he_ppet_present;
  581. uint8_t he_srp;
  582. uint8_t he_power_boost;
  583. uint8_t he_4x_ltf_gi;
  584. uint8_t he_max_nc;
  585. uint8_t he_rx_stbc_gt80;
  586. uint8_t he_tx_stbc_gt80;
  587. uint8_t he_er_4x_ltf_gi;
  588. uint8_t he_ppdu_20_in_40mhz_2g;
  589. uint8_t he_ppdu_20_in_160_80p80mhz;
  590. uint8_t he_ppdu_80_in_160_80p80mhz;
  591. uint8_t he_er_1x_he_ltf_gi;
  592. uint8_t he_midamble_rx_1x_he_ltf;
  593. uint8_t he_dcm_max_bw;
  594. uint8_t he_longer_16_sigb_ofdm_sym;
  595. uint8_t he_non_trig_cqi_feedback;
  596. uint8_t he_tx_1024_qam_lt_242_ru;
  597. uint8_t he_rx_1024_qam_lt_242_ru;
  598. uint8_t he_rx_full_bw_mu_cmpr_sigb;
  599. uint8_t he_rx_full_bw_mu_non_cmpr_sigb;
  600. uint32_t he_rx_mcs_map_lt_80;
  601. uint32_t he_tx_mcs_map_lt_80;
  602. uint32_t he_rx_mcs_map_160;
  603. uint32_t he_tx_mcs_map_160;
  604. uint32_t he_rx_mcs_map_80_80;
  605. uint32_t he_tx_mcs_map_80_80;
  606. uint8_t he_ppet_2g[MLME_HE_PPET_LEN];
  607. uint8_t he_ppet_5g[MLME_HE_PPET_LEN];
  608. uint32_t he_ops_basic_mcs_nss;
  609. uint8_t he_twt_dynamic_fragmentation;
  610. uint8_t enable_ul_mimo;
  611. uint8_t enable_ul_ofdm;
  612. uint32_t he_sta_obsspd;
  613. };
  614. /**
  615. * struct wlan_mlme_rates - RATES related config items
  616. * @cfpPeriod: cfp period info
  617. * @cfpMaxDuration: cfp Max duration info
  618. * @max_htmcs_txdata: max HT mcs info for Tx
  619. * @disable_abg_rate_txdata: disable abg rate info for tx data
  620. * @sap_max_mcs_txdata: sap max mcs info
  621. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  622. * @supported_11b: supported 11B rates
  623. * @supported_11a: supported 11A rates
  624. * @opr_rate_set: operational rates set
  625. * @ext_opr_rate_set: extended operational rates set
  626. * @supported_mcs_set: supported MCS set
  627. * @basic_mcs_set: basic MCS set
  628. * @current_mcs_set: current MCS set
  629. */
  630. struct wlan_mlme_rates {
  631. uint8_t cfp_period;
  632. uint16_t cfp_max_duration;
  633. uint16_t max_htmcs_txdata;
  634. bool disable_abg_rate_txdata;
  635. uint16_t sap_max_mcs_txdata;
  636. uint8_t disable_high_ht_mcs_2x2;
  637. struct mlme_cfg_str supported_11b;
  638. struct mlme_cfg_str supported_11a;
  639. struct mlme_cfg_str opr_rate_set;
  640. struct mlme_cfg_str ext_opr_rate_set;
  641. struct mlme_cfg_str supported_mcs_set;
  642. struct mlme_cfg_str basic_mcs_set;
  643. struct mlme_cfg_str current_mcs_set;
  644. };
  645. /* Flags for gLimProtectionControl that is updated in pe session*/
  646. #define MLME_FORCE_POLICY_PROTECTION_DISABLE 0
  647. #define MLME_FORCE_POLICY_PROTECTION_CTS 1
  648. #define MLME_FORCE_POLICY_PROTECTION_RTS 2
  649. #define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS 3
  650. #define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS 4
  651. #define MLME_FORCE_POLICY_PROTECTION_AUTO 5
  652. /* protection_enabled bits*/
  653. #define MLME_PROTECTION_ENABLED_FROM_llA 0
  654. #define MLME_PROTECTION_ENABLED_FROM_llB 1
  655. #define MLME_PROTECTION_ENABLED_FROM_llG 2
  656. #define MLME_PROTECTION_ENABLED_HT_20 3
  657. #define MLME_PROTECTION_ENABLED_NON_GF 4
  658. #define MLME_PROTECTION_ENABLED_LSIG_TXOP 5
  659. #define MLME_PROTECTION_ENABLED_RIFS 6
  660. #define MLME_PROTECTION_ENABLED_OBSS 7
  661. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llA 8
  662. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llB 9
  663. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llG 10
  664. #define MLME_PROTECTION_ENABLED_OLBC_HT20 11
  665. #define MLME_PROTECTION_ENABLED_OLBC_NON_GF 12
  666. #define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP 13
  667. #define MLME_PROTECTION_ENABLED_OLBC_RIFS 14
  668. #define MLME_PROTECTION_ENABLED_OLBC_OBSS 15
  669. /**
  670. * struct wlan_mlme_feature_flag - feature related information
  671. * @accept_short_slot_assoc: enable short sloc feature
  672. * @enable_hcf: enable HCF feature
  673. * @enable_rsn: enable RSN for connection
  674. * @enable_short_preamble_11g: enable short preamble for 11g
  675. * @channel_bonding_mode: channel bonding mode
  676. * @enable_block_ack: enable block ack feature
  677. * @enable_ampdu: Enable AMPDU feature
  678. */
  679. struct wlan_mlme_feature_flag {
  680. bool accept_short_slot_assoc;
  681. bool enable_hcf;
  682. bool enable_rsn;
  683. bool enable_short_preamble_11g;
  684. bool enable_short_slot_time_11g;
  685. uint32_t channel_bonding_mode;
  686. uint32_t enable_block_ack;
  687. bool enable_ampdu;
  688. };
  689. /*
  690. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  691. *
  692. * @protection_enabled: Force enable protection. static via cfg
  693. * @protection_force_policy: Protection force policy. Static via cfg
  694. * @ignore_peer_ht_opmode: Ignore the ht opmode of the peer. Dynamic via INI
  695. *
  696. */
  697. struct wlan_mlme_sap_protection {
  698. uint32_t protection_enabled;
  699. uint8_t protection_force_policy;
  700. bool ignore_peer_ht_opmode;
  701. };
  702. /*
  703. * struct wlan_mlme_chainmask - All chainmask related cfg items
  704. *
  705. * @txchainmask1x1: To set transmit chainmask
  706. * @rxchainmask1x1: To set rx chainmask
  707. * @tx_chain_mask_cck: Used to enable/disable Cck ChainMask
  708. * @tx_chain_mask_1ss: Enables/disables tx chain Mask1ss
  709. * @num_11b_tx_chains: Number of Tx Chains in 11b mode
  710. * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
  711. * @tx_chain_mask_2g: Tx chain mask for 2g
  712. * @rx_chain_mask_2g: Tx chain mask for 2g
  713. * @tx_chain_mask_5g: Tx chain mask for 5g
  714. * @rx_chain_mask_5g: Rx chain mask for 5g
  715. */
  716. struct wlan_mlme_chainmask {
  717. uint8_t txchainmask1x1;
  718. uint8_t rxchainmask1x1;
  719. bool tx_chain_mask_cck;
  720. uint8_t tx_chain_mask_1ss;
  721. uint16_t num_11b_tx_chains;
  722. uint16_t num_11ag_tx_chains;
  723. uint8_t tx_chain_mask_2g;
  724. uint8_t rx_chain_mask_2g;
  725. uint8_t tx_chain_mask_5g;
  726. uint8_t rx_chain_mask_5g;
  727. };
  728. /* struct wlan_mlme_generic - Generic CFG config items
  729. *
  730. * @band_capability: HW Band Capability - Both or 2.4G only or 5G only
  731. * @band: Current Band - Internal variable, initialized to INI and updated later
  732. * @select_5ghz_margin: RSSI margin to select 5Ghz over 2.4 Ghz
  733. * @sub_20_chan_width: Sub 20Mhz Channel Width
  734. * @ito_repeat_count: ITO Repeat Count
  735. * @pmf_sa_query_max_retries: PMF query max retries for SAP
  736. * @pmf_sa_query_retry_interval: PMF query retry interval for SAP
  737. * @dropped_pkt_disconnect_thresh: Threshold for dropped pkts before disconnect
  738. * @rtt3_enabled: RTT3 enable or disable info
  739. * @prevent_link_down: Enable/Disable prevention of link down
  740. * @memory_deep_sleep: Enable/Disable memory deep sleep
  741. * @cck_tx_fir_override: Enable/Disable CCK Tx FIR Override
  742. * @crash_inject: Enable/Disable Crash Inject
  743. * @lpass_support: Enable/Disable LPASS Support
  744. * @self_recovery: Enable/Disable Self Recovery
  745. * @sap_dot11mc: Enable/Disable SAP 802.11mc support
  746. * @fatal_event_trigger: Enable/Disable Fatal Events Trigger
  747. * @optimize_ca_event: Enable/Disable Optimization of CA events
  748. * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
  749. * @debug_packet_log: Debug packet log flags
  750. */
  751. struct wlan_mlme_generic {
  752. enum band_info band_capability;
  753. enum band_info band;
  754. uint8_t select_5ghz_margin;
  755. uint8_t sub_20_chan_width;
  756. uint8_t ito_repeat_count;
  757. uint8_t pmf_sa_query_max_retries;
  758. uint16_t pmf_sa_query_retry_interval;
  759. uint16_t dropped_pkt_disconnect_thresh;
  760. bool rtt3_enabled;
  761. bool prevent_link_down;
  762. bool memory_deep_sleep;
  763. bool cck_tx_fir_override;
  764. bool crash_inject;
  765. bool lpass_support;
  766. bool self_recovery;
  767. bool sap_dot11mc;
  768. bool fatal_event_trigger;
  769. bool optimize_ca_event;
  770. bool fw_timeout_crash;
  771. uint8_t debug_packet_log;
  772. };
  773. /*
  774. * struct wlan_mlme_product_details_cfg - product details config items
  775. * @manufacturer_name: manufacture name
  776. * @model_number: model number
  777. * @model_name: model name
  778. * @manufacture_product_name: manufacture product name
  779. * @manufacture_product_version: manufacture product version
  780. */
  781. struct wlan_mlme_product_details_cfg {
  782. char manufacturer_name[WLAN_CFG_MFR_NAME_LEN + 1];
  783. char model_number[WLAN_CFG_MODEL_NUMBER_LEN + 1];
  784. char model_name[WLAN_CFG_MODEL_NAME_LEN + 1];
  785. char manufacture_product_name[WLAN_CFG_MFR_PRODUCT_NAME_LEN + 1];
  786. char manufacture_product_version[WLAN_CFG_MFR_PRODUCT_VERSION_LEN + 1];
  787. };
  788. /*
  789. * struct wlan_mlme_acs - All acs related cfg items
  790. * @is_acs_with_more_param - to enable acs with more param
  791. * @auto_channel_select_weight - to set acs channel weight
  792. * @is_vendor_acs_support - enable application based channel selection
  793. * @is_acs_support_for_dfs_ltecoex - enable channel for dfs and lte coex
  794. * @is_external_acs_policy - control external policy
  795. */
  796. struct wlan_mlme_acs {
  797. bool is_acs_with_more_param;
  798. uint32_t auto_channel_select_weight;
  799. bool is_vendor_acs_support;
  800. bool is_acs_support_for_dfs_ltecoex;
  801. bool is_external_acs_policy;
  802. };
  803. /**
  804. * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
  805. * @active_dwelltime: obss active dwelltime
  806. * @passive_dwelltime: obss passive dwelltime
  807. * @width_trigger_interval: obss trigger interval
  808. * @passive_per_channel: obss scan passive total duration per channel
  809. * @active_per_channel: obss scan active total duration per channel
  810. * @width_trans_delay: obss width transition delay
  811. * @scan_activity_threshold: obss scan activity threshold
  812. */
  813. struct wlan_mlme_obss_ht40 {
  814. uint32_t active_dwelltime;
  815. uint32_t passive_dwelltime;
  816. uint32_t width_trigger_interval;
  817. uint32_t passive_per_channel;
  818. uint32_t active_per_channel;
  819. uint32_t width_trans_delay;
  820. uint32_t scan_activity_threshold;
  821. };
  822. /**
  823. * enum dot11p_mode - The 802.11p mode of operation
  824. * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
  825. * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
  826. * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
  827. */
  828. enum dot11p_mode {
  829. CFG_11P_DISABLED = 0,
  830. CFG_11P_STANDALONE,
  831. CFG_11P_CONCURRENT,
  832. };
  833. /**
  834. * struct wlan_mlme_sta_cfg - MLME STA configuration items
  835. * @sta_keep_alive_period: Sends NULL frame to AP period
  836. * @tgt_gtx_usr_cfg: Target gtx user config
  837. * @pmkid_modes: Enable PMKID modes
  838. * @wait_cnf_timeout: Wait assoc cnf timeout
  839. * @dot11p_mode: Set 802.11p mode
  840. * @fils_max_chan_guard_time: Set maximum channel guard time
  841. * @current_rssi: Current rssi
  842. * @ignore_peer_erp_info: Ignore peer infrormation
  843. * @sta_prefer_80mhz_over_160mhz: Set Sta preference to connect in 80HZ/160HZ
  844. * @enable_5g_ebt: Set default 5G early beacon termination
  845. * @deauth_before_connection: Send deauth before connection or not
  846. * @enable_go_cts2self_for_sta: Stop NOA and start using cts2self
  847. * @qcn_ie_support: QCN IE support
  848. * @force_rsne_override: Force rsnie override from user
  849. * @single_tid: Set replay counter for all TID
  850. */
  851. struct wlan_mlme_sta_cfg {
  852. uint32_t sta_keep_alive_period;
  853. uint32_t tgt_gtx_usr_cfg;
  854. uint32_t pmkid_modes;
  855. uint32_t wait_cnf_timeout;
  856. enum dot11p_mode dot11p_mode;
  857. uint8_t fils_max_chan_guard_time;
  858. uint8_t current_rssi;
  859. bool ignore_peer_erp_info;
  860. bool sta_prefer_80mhz_over_160mhz;
  861. bool enable_5g_ebt;
  862. bool deauth_before_connection;
  863. bool enable_go_cts2self_for_sta;
  864. bool qcn_ie_support;
  865. bool force_rsne_override;
  866. bool single_tid;
  867. };
  868. /*
  869. * @mawc_roam_enabled: Enable/Disable MAWC during roaming
  870. * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
  871. * @lfr3_roaming_offload: Enable/disable roam offload feature
  872. * @early_stop_scan_enable: Set early stop scan
  873. * @lfr3_enable_subnet_detection: Enable LFR3 subnet detection
  874. * @enable_5g_band_pref: Enable preference for 5G from INI
  875. * @mawc_roam_traffic_threshold: Configure traffic threshold
  876. * @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
  877. * @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
  878. * @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
  879. * @roam_rssi_abs_threshold: The min RSSI of the candidate AP
  880. * @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
  881. * @early_stop_scan_min_threshold: Set early stop scan min
  882. * @early_stop_scan_max_threshold: Set early stop scan max
  883. * @first_scan_bucket_threshold: Set first scan bucket
  884. * @roam_dense_traffic_threshold: Dense traffic threshold
  885. * @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
  886. * @roam_dense_min_aps: Sets minimum number of AP for dense roam
  887. * @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
  888. * @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
  889. * @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
  890. * @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
  891. * @per_roam_enable: To enabled/disable PER based roaming in FW
  892. * @per_roam_config_high_rate_th: Rate at which PER based roam will stop
  893. * @per_roam_config_low_rate_th: Rate at which PER based roam will start
  894. * @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
  895. * @per_roam_rest_time: FW will wait once it issues a roam scan.
  896. * @per_roam_monitor_time: Min time to be considered as valid scenario
  897. * @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
  898. * @lfr3_disallow_duration: Disallow duration before roaming
  899. * @lfr3_rssi_channel_penalization: RSSI penalization
  900. * @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
  901. * @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
  902. * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
  903. * @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
  904. * @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
  905. * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
  906. * @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
  907. * @max_num_pre_auth: Configure max number of pre-auth
  908. * @roam_preauth_retry_count: Configure the max number of preauth retry
  909. * @roam_preauth_no_ack_timeout: Configure the no ack timeout period
  910. */
  911. struct wlan_mlme_lfr_cfg {
  912. bool mawc_roam_enabled;
  913. bool enable_fast_roam_in_concurrency;
  914. bool lfr3_roaming_offload;
  915. bool early_stop_scan_enable;
  916. bool lfr3_enable_subnet_detection;
  917. bool enable_5g_band_pref;
  918. uint32_t mawc_roam_traffic_threshold;
  919. uint32_t mawc_roam_ap_rssi_threshold;
  920. uint32_t mawc_roam_rssi_high_adjust;
  921. uint32_t mawc_roam_rssi_low_adjust;
  922. uint32_t roam_rssi_abs_threshold;
  923. uint8_t rssi_threshold_offset_5g;
  924. uint8_t early_stop_scan_min_threshold;
  925. uint8_t early_stop_scan_max_threshold;
  926. uint8_t first_scan_bucket_threshold;
  927. uint32_t roam_dense_traffic_threshold;
  928. uint32_t roam_dense_rssi_thre_offset;
  929. uint32_t roam_dense_min_aps;
  930. uint32_t roam_bg_scan_bad_rssi_threshold;
  931. uint32_t roam_bg_scan_client_bitmap;
  932. uint32_t roam_bg_scan_bad_rssi_offset_2g;
  933. uint32_t adaptive_roamscan_dwell_mode;
  934. uint32_t per_roam_enable;
  935. uint32_t per_roam_config_high_rate_th;
  936. uint32_t per_roam_config_low_rate_th;
  937. uint32_t per_roam_config_rate_th_percent;
  938. uint32_t per_roam_rest_time;
  939. uint32_t per_roam_monitor_time;
  940. uint32_t per_roam_min_candidate_rssi;
  941. uint32_t lfr3_disallow_duration;
  942. uint32_t lfr3_rssi_channel_penalization;
  943. uint32_t lfr3_num_disallowed_aps;
  944. uint32_t rssi_boost_threshold_5g;
  945. uint32_t rssi_boost_factor_5g;
  946. uint32_t max_rssi_boost_5g;
  947. uint32_t rssi_penalize_threshold_5g;
  948. uint32_t rssi_penalize_factor_5g;
  949. uint32_t max_rssi_penalize_5g;
  950. uint32_t max_num_pre_auth;
  951. uint32_t roam_preauth_retry_count;
  952. uint32_t roam_preauth_no_ack_timeout;
  953. };
  954. /**
  955. * struct wlan_mlme_wmm_ac_vo - Default TSPEC parameters
  956. * for AC_VO
  957. * @dir_ac_vo: TSPEC direction for VO
  958. * @nom_msdu_size_ac_vo: normal MSDU size for VO
  959. * @mean_data_rate_ac_vo: mean data rate for VO
  960. * @min_phy_rate_ac_vo: min PHY rate for VO
  961. * @sba_ac_vo: surplus bandwidth allowance for VO
  962. * @uapsd_vo_srv_intv: Uapsd service interval for voice
  963. * @uapsd_vo_sus_intv: Uapsd suspension interval for voice
  964. */
  965. struct wlan_mlme_wmm_ac_vo {
  966. uint8_t dir_ac_vo;
  967. uint16_t nom_msdu_size_ac_vo;
  968. uint32_t mean_data_rate_ac_vo;
  969. uint32_t min_phy_rate_ac_vo;
  970. uint16_t sba_ac_vo;
  971. uint32_t uapsd_vo_srv_intv;
  972. uint32_t uapsd_vo_sus_intv;
  973. };
  974. /**
  975. * struct wlan_mlme_wmm_ac_vi - Default TSPEC parameters
  976. * for AC_VI
  977. * @dir_ac_vi: TSPEC direction for VI
  978. * @nom_msdu_size_ac_vi: normal MSDU size for VI
  979. * @mean_data_rate_ac_vi: mean data rate for VI
  980. * @min_phy_rate_ac_vi: min PHY rate for VI
  981. * @sba_ac_vi: surplus bandwidth allowance for VI
  982. * @uapsd_vo_srv_intv: Uapsd service interval for VI
  983. * @uapsd_vo_sus_intv: Uapsd suspension interval for VI
  984. */
  985. struct wlan_mlme_wmm_ac_vi {
  986. uint8_t dir_ac_vi;
  987. uint16_t nom_msdu_size_ac_vi;
  988. uint32_t mean_data_rate_ac_vi;
  989. uint32_t min_phy_rate_ac_vi;
  990. uint16_t sba_ac_vi;
  991. uint32_t uapsd_vi_srv_intv;
  992. uint32_t uapsd_vi_sus_intv;
  993. };
  994. /**
  995. * struct wlan_mlme_wmm_ac_be - Default TSPEC parameters
  996. * for AC_BE
  997. * @dir_ac_be: TSPEC direction for BE
  998. * @nom_msdu_size_ac_be: normal MSDU size for BE
  999. * @mean_data_rate_ac_be: mean data rate for BE
  1000. * @min_phy_rate_ac_be: min PHY rate for BE
  1001. * @sba_ac_be: surplus bandwidth allowance for BE
  1002. * @uapsd_be_srv_intv: Uapsd service interval for BE
  1003. * @uapsd_be_sus_intv: Uapsd suspension interval for BE
  1004. */
  1005. struct wlan_mlme_wmm_ac_be {
  1006. uint8_t dir_ac_be;
  1007. uint16_t nom_msdu_size_ac_be;
  1008. uint32_t mean_data_rate_ac_be;
  1009. uint32_t min_phy_rate_ac_be;
  1010. uint16_t sba_ac_be;
  1011. uint32_t uapsd_be_srv_intv;
  1012. uint32_t uapsd_be_sus_intv;
  1013. };
  1014. /**
  1015. * struct wlan_mlme_wmm_params - WMM CFG Items
  1016. * @qos_enabled: AP is enabled with 11E
  1017. * @wme_enabled: AP is enabled with WMM
  1018. * @max_sp_length: Maximum SP Length
  1019. * @wsm_enabled: AP is enabled with WSM
  1020. * @ac_vo: Default TSPEC parameters for AC_VO
  1021. * @ac_vi: Default TSPEC parameters for AC_VI
  1022. * @ac_be: Default TSPEC parameters for AC_BE
  1023. */
  1024. struct wlan_mlme_wmm_params {
  1025. bool qos_enabled;
  1026. bool wme_enabled;
  1027. uint8_t max_sp_length;
  1028. bool wsm_enabled;
  1029. uint32_t edca_profile;
  1030. struct wlan_mlme_wmm_ac_vo ac_vo;
  1031. struct wlan_mlme_wmm_ac_vi ac_vi;
  1032. struct wlan_mlme_wmm_ac_be ac_be;
  1033. };
  1034. /**
  1035. * struct wlan_mlme_weight_config - weight params to
  1036. * calculate best candidate
  1037. *
  1038. * @rssi_weightage: RSSI weightage
  1039. * @ht_caps_weightage: HT caps weightage
  1040. * @vht_caps_weightage: VHT caps weightage
  1041. * @he_caps_weightage: HE caps weightage
  1042. * @chan_width_weightage: Channel width weightage
  1043. * @chan_band_weightage: Channel band weightage
  1044. * @nss_weightage: NSS weightage
  1045. * @beamforming_cap_weightage: Beamforming caps weightage
  1046. * @pcl_weightage: PCL weightage
  1047. * @channel_congestion_weightage: channel congestion weightage
  1048. * @oce_wan_weightage: OCE WAN metrics weightage
  1049. */
  1050. struct wlan_mlme_weight_config {
  1051. uint8_t rssi_weightage;
  1052. uint8_t ht_caps_weightage;
  1053. uint8_t vht_caps_weightage;
  1054. uint8_t he_caps_weightage;
  1055. uint8_t chan_width_weightage;
  1056. uint8_t chan_band_weightage;
  1057. uint8_t nss_weightage;
  1058. uint8_t beamforming_cap_weightage;
  1059. uint8_t pcl_weightage;
  1060. uint8_t channel_congestion_weightage;
  1061. uint8_t oce_wan_weightage;
  1062. };
  1063. /**
  1064. * struct wlan_mlme_rssi_cfg_score - RSSI params to
  1065. * calculate best candidate
  1066. *
  1067. * @best_rssi_threshold: Best RSSI threshold
  1068. * @good_rssi_threshold: Good RSSI threshold
  1069. * @bad_rssi_threshold: Bad RSSI threshold
  1070. * @good_rssi_pcnt: Good RSSI Percentage
  1071. * @bad_rssi_pcnt: Bad RSSI Percentage
  1072. * @good_rssi_bucket_size: Good RSSI Bucket Size
  1073. * @bad_rssi_bucket_size: Bad RSSI Bucket Size
  1074. * @rssi_pref_5g_rssi_thresh: Preffered 5G RSSI threshold
  1075. */
  1076. struct wlan_mlme_rssi_cfg_score {
  1077. uint32_t best_rssi_threshold;
  1078. uint32_t good_rssi_threshold;
  1079. uint32_t bad_rssi_threshold;
  1080. uint32_t good_rssi_pcnt;
  1081. uint32_t bad_rssi_pcnt;
  1082. uint32_t good_rssi_bucket_size;
  1083. uint32_t bad_rssi_bucket_size;
  1084. uint32_t rssi_pref_5g_rssi_thresh;
  1085. };
  1086. /**
  1087. * struct wlan_mlme_per_slot_scoring - define % score for differents slots
  1088. * for a scoring param.
  1089. * num_slot: number of slots in which the param will be divided.
  1090. * Max 15. index 0 is used for 'not_present. Num_slot will
  1091. * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
  1092. * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  1093. * score_pcnt3_to_0: Conatins score percentage for slot 0-3
  1094. * BITS 0-7 :- the scoring pcnt when not present
  1095. * BITS 8-15 :- SLOT_1
  1096. * BITS 16-23 :- SLOT_2
  1097. * BITS 24-31 :- SLOT_3
  1098. * score_pcnt7_to_4: Conatins score percentage for slot 4-7
  1099. * BITS 0-7 :- SLOT_4
  1100. * BITS 8-15 :- SLOT_5
  1101. * BITS 16-23 :- SLOT_6
  1102. * BITS 24-31 :- SLOT_7
  1103. * score_pcnt11_to_8: Conatins score percentage for slot 8-11
  1104. * BITS 0-7 :- SLOT_8
  1105. * BITS 8-15 :- SLOT_9
  1106. * BITS 16-23 :- SLOT_10
  1107. * BITS 24-31 :- SLOT_11
  1108. * score_pcnt15_to_12: Conatins score percentage for slot 12-15
  1109. * BITS 0-7 :- SLOT_12
  1110. * BITS 8-15 :- SLOT_13
  1111. * BITS 16-23 :- SLOT_14
  1112. * BITS 24-31 :- SLOT_15
  1113. */
  1114. struct wlan_mlme_per_slot_scoring {
  1115. uint32_t num_slot;
  1116. uint32_t score_pcnt3_to_0;
  1117. uint32_t score_pcnt7_to_4;
  1118. uint32_t score_pcnt11_to_8;
  1119. uint32_t score_pcnt15_to_12;
  1120. };
  1121. /*
  1122. * struct wlan_mlme_score_config - MLME BSS Scoring related config
  1123. * @enable_scoring_for_roam: Enable/disable BSS Scoring for Roaming
  1124. * @weight_cfg: Various Weight related Scoring Configs
  1125. * @rssi_score: RSSI Scoring related thresholds/percentages config
  1126. * @esp_qbss_scoring: ESP QBSS Scoring configs
  1127. * @oce_wan_scoring: OCE WAN Scoring Configs
  1128. * @bandwidth_weight_per_index: Bandwidth weight per index for scoring logic
  1129. * @nss_weight_per_index: NSS weight per index for scoring logic
  1130. * @band_weight_per_index: Band weight per index for scoring logic
  1131. */
  1132. struct wlan_mlme_scoring_cfg {
  1133. bool enable_scoring_for_roam;
  1134. struct wlan_mlme_weight_config weight_cfg;
  1135. struct wlan_mlme_rssi_cfg_score rssi_score;
  1136. struct wlan_mlme_per_slot_scoring esp_qbss_scoring;
  1137. struct wlan_mlme_per_slot_scoring oce_wan_scoring;
  1138. uint32_t bandwidth_weight_per_index;
  1139. uint32_t nss_weight_per_index;
  1140. uint32_t band_weight_per_index;
  1141. };
  1142. /* struct wlan_mlme_threshold - Threshold related config items
  1143. * @rts_threshold: set rts threshold
  1144. * @frag_threshold: set fragmentation threshold
  1145. */
  1146. struct wlan_mlme_threshold {
  1147. uint32_t rts_threshold;
  1148. uint32_t frag_threshold;
  1149. };
  1150. /*
  1151. * struct wlan_mlme_timeout - mlme timeout related config items
  1152. * @join_failure_timeout: join failure timeout
  1153. * @auth_failure_timeout: authenticate failure timeout
  1154. * @auth_rsp_timeout: authenticate response timeout
  1155. * @assoc_failure_timeout: assoc failure timeout
  1156. * @reassoc_failure_timeout: re-assoc failure timeout
  1157. * @probe_after_hb_fail_timeout: Probe after HB fail timeout
  1158. * @olbc_detect_timeout: OLBC detect timeout
  1159. * @addts_rsp_timeout: ADDTS rsp timeout value
  1160. * @heart_beat_threshold: Heart beat threshold
  1161. * @ap_keep_alive_timeout: AP keep alive timeout value
  1162. * @ap_link_monitor_timeout: AP link monitor timeout value
  1163. * @ps_data_inactivity_timeout: PS data inactivity timeout
  1164. */
  1165. struct wlan_mlme_timeout {
  1166. uint32_t join_failure_timeout;
  1167. uint32_t auth_failure_timeout;
  1168. uint32_t auth_rsp_timeout;
  1169. uint32_t assoc_failure_timeout;
  1170. uint32_t reassoc_failure_timeout;
  1171. uint32_t probe_after_hb_fail_timeout;
  1172. uint32_t olbc_detect_timeout;
  1173. uint32_t addts_rsp_timeout;
  1174. uint32_t heart_beat_threshold;
  1175. uint32_t ap_keep_alive_timeout;
  1176. uint32_t ap_link_monitor_timeout;
  1177. uint32_t ps_data_inactivity_timeout;
  1178. };
  1179. /**
  1180. * struct wlan_mlme_oce - OCE related config items
  1181. * @enable_bcast_probe_rsp: enable broadcast probe response
  1182. * @oce_sta_enabled: enable/disable oce feature for sta
  1183. * @oce_sap_enabled: enable/disable oce feature for sap
  1184. * @fils_enabled: enable/disable fils support
  1185. * @feature_bitmap: oce feature bitmap
  1186. *
  1187. */
  1188. struct wlan_mlme_oce {
  1189. bool enable_bcast_probe_rsp;
  1190. bool oce_sta_enabled;
  1191. bool oce_sap_enabled;
  1192. bool fils_enabled;
  1193. uint8_t feature_bitmap;
  1194. };
  1195. #define MLME_WEP_KEY_LEN_13 (13)
  1196. #define MLME_WEP_KEY_LENGTH_5 (5)
  1197. /**
  1198. * enum wep_key_id - values passed to get/set wep default keys
  1199. * @MLME_WEP_DEFAULT_KEY_1: wep default key 1
  1200. * @MLME_WEP_DEFAULT_KEY_2: wep default key 2
  1201. * @MLME_WEP_DEFAULT_KEY_3: wep default key 3
  1202. * @MLME_WEP_DEFAULT_KEY_4: wep default key 4
  1203. */
  1204. enum wep_key_id {
  1205. MLME_WEP_DEFAULT_KEY_1 = 0,
  1206. MLME_WEP_DEFAULT_KEY_2,
  1207. MLME_WEP_DEFAULT_KEY_3,
  1208. MLME_WEP_DEFAULT_KEY_4
  1209. };
  1210. /**
  1211. * struct wlan_mlme_wep_cfg - WEP related configs
  1212. * @is_privacy_enabled: Flag to check if encryption is enabled
  1213. * @is_shared_key_auth: Flag to check if the auth type is shared key
  1214. * @is_auth_open_system: Flag to check if the auth type is open
  1215. * @auth_type: Authentication type value
  1216. * @wep_default_key_id: Default WEP key id
  1217. * @wep_default_key_1: WEP encryption key 1
  1218. * @wep_default_key_2: WEP encryption key 2
  1219. * @wep_default_key_3: WEP encryption key 3
  1220. * @wep_default_key_4: WEP encryption key 4
  1221. */
  1222. struct wlan_mlme_wep_cfg {
  1223. bool is_privacy_enabled;
  1224. bool is_shared_key_auth;
  1225. bool is_auth_open_system;
  1226. uint8_t auth_type;
  1227. uint8_t wep_default_key_id;
  1228. struct mlme_cfg_str wep_default_key_1;
  1229. struct mlme_cfg_str wep_default_key_2;
  1230. struct mlme_cfg_str wep_default_key_3;
  1231. struct mlme_cfg_str wep_default_key_4;
  1232. };
  1233. /**
  1234. * struct wlan_mlme_cfg - MLME config items
  1235. * @chainmask_cfg: VHT chainmask related cfg items
  1236. * @edca_params: edca related CFG items
  1237. * @gen: Generic CFG items
  1238. * @ht_caps: HT related CFG Items
  1239. * @he_caps: HE related cfg items
  1240. * @lfr: LFR related CFG Items
  1241. * @obss_ht40:obss ht40 CFG Items
  1242. * @mbo_cfg: Multiband Operation related CFG items
  1243. * @vht_caps: VHT related CFG Items
  1244. * @qos_mlme_params: QOS CFG Items
  1245. * @rates: Rates related cfg items
  1246. * @product_details: product details related CFG Items
  1247. * @dfs_cfg: DFS related CFG Items
  1248. * @sap_protection_cfg: SAP erp protection related CFG items
  1249. * @sap_cfg: sap CFG items
  1250. * @sta: sta CFG Items
  1251. * @scoring: BSS Scoring related CFG Items
  1252. * @oce: OCE related CFG items
  1253. * @threshold: threshold related cfg items
  1254. * @timeouts: mlme timeout related CFG items
  1255. * @acs: ACS related CFG items
  1256. * @feature_flags: Feature flag config items
  1257. * @wep_params: WEP related config items
  1258. * @wmm_params: WMM related CFG & INI Items
  1259. * @wps_params: WPS related CFG itmes
  1260. */
  1261. struct wlan_mlme_cfg {
  1262. struct wlan_mlme_chainmask chainmask_cfg;
  1263. struct wlan_mlme_edca_params edca_params;
  1264. struct wlan_mlme_generic gen;
  1265. struct wlan_mlme_ht_caps ht_caps;
  1266. struct wlan_mlme_he_caps he_caps;
  1267. struct wlan_mlme_lfr_cfg lfr;
  1268. struct wlan_mlme_obss_ht40 obss_ht40;
  1269. struct wlan_mlme_mbo mbo_cfg;
  1270. struct wlan_mlme_vht_caps vht_caps;
  1271. struct wlan_mlme_qos qos_mlme_params;
  1272. struct wlan_mlme_rates rates;
  1273. struct wlan_mlme_product_details_cfg product_details;
  1274. struct wlan_mlme_dfs_cfg dfs_cfg;
  1275. struct wlan_mlme_sap_protection sap_protection_cfg;
  1276. struct wlan_mlme_cfg_sap sap_cfg;
  1277. struct wlan_mlme_sta_cfg sta;
  1278. struct wlan_mlme_scoring_cfg scoring;
  1279. struct wlan_mlme_oce oce;
  1280. struct wlan_mlme_threshold threshold;
  1281. struct wlan_mlme_timeout timeouts;
  1282. struct wlan_mlme_acs acs;
  1283. struct wlan_mlme_feature_flag feature_flags;
  1284. struct wlan_mlme_wep_cfg wep_params;
  1285. struct wlan_mlme_wmm_params wmm_params;
  1286. struct wlan_mlme_wps_params wps_params;
  1287. };
  1288. #endif