wlan_mlme_public_struct.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  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. #define CFG_PMKID_MODES_OKC (0x1)
  25. #define CFG_PMKID_MODES_PMKSA_CACHING (0x2)
  26. /**
  27. * struct mlme_ht_capabilities_info - HT Capabilities Info
  28. * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
  29. * @stbc_control_frame: STBC Control frame support
  30. * @psmp: PSMP Support
  31. * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
  32. * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
  33. * @delayed_ba: Support of Delayed Block Ack
  34. * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
  35. * @tx_stbc: Tx STBC Support
  36. * @short_gi_40_mhz: Short GI Support for HT40
  37. * @short_gi_20_mhz: Short GI support for HT20
  38. * @green_field: Support for HT Greenfield PPDUs
  39. * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
  40. * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
  41. * @adv_coding_cap: Rx LDPC support
  42. */
  43. #ifndef ANI_LITTLE_BIT_ENDIAN
  44. struct mlme_ht_capabilities_info {
  45. uint16_t l_sig_tx_op_protection:1;
  46. uint16_t stbc_control_frame:1;
  47. uint16_t psmp:1;
  48. uint16_t dsss_cck_mode_40_mhz:1;
  49. uint16_t maximal_amsdu_size:1;
  50. uint16_t delayed_ba:1;
  51. uint16_t rx_stbc:2;
  52. uint16_t tx_stbc:1;
  53. uint16_t short_gi_40_mhz:1;
  54. uint16_t short_gi_20_mhz:1;
  55. uint16_t green_field:1;
  56. uint16_t mimo_power_save:2;
  57. uint16_t supported_channel_width_set:1;
  58. uint16_t adv_coding_cap:1;
  59. } qdf_packed;
  60. #else
  61. struct mlme_ht_capabilities_info {
  62. uint16_t adv_coding_cap:1;
  63. uint16_t supported_channel_width_set:1;
  64. uint16_t mimo_power_save:2;
  65. uint16_t green_field:1;
  66. uint16_t short_gi_20_mhz:1;
  67. uint16_t short_gi_40_mhz:1;
  68. uint16_t tx_stbc:1;
  69. uint16_t rx_stbc:2;
  70. uint16_t delayed_ba:1;
  71. uint16_t maximal_amsdu_size:1;
  72. uint16_t dsss_cck_mode_40_mhz:1;
  73. uint16_t psmp:1;
  74. uint16_t stbc_control_frame:1;
  75. uint16_t l_sig_tx_op_protection:1;
  76. } qdf_packed;
  77. #endif
  78. /**
  79. * struct wlan_mlme_ht_caps - HT Capabilities related config items
  80. * @ht_cap_info: HT capabilities Info Structure
  81. */
  82. struct wlan_mlme_ht_caps {
  83. struct mlme_ht_capabilities_info ht_cap_info;
  84. };
  85. /**
  86. * struct wlan_mlme_ - HT Capabilities related config items
  87. * @ht_cap_info: HT capabilities Info Structure
  88. */
  89. struct wlan_mlme_cfg_sap {
  90. uint8_t cfg_ssid[32];
  91. uint16_t beacon_interval;
  92. uint16_t dtim_interval;
  93. uint16_t listen_interval;
  94. bool sap_11g_policy;
  95. uint8_t assoc_sta_limit;
  96. bool enable_lte_coex;
  97. uint16_t rmc_action_period_freq;
  98. uint8_t rate_tx_mgmt;
  99. uint8_t rate_tx_mgmt_2g;
  100. uint8_t rate_tx_mgmt_5g;
  101. bool tele_bcn_wakeup_en;
  102. uint8_t tele_bcn_max_li;
  103. bool sap_get_peer_info;
  104. bool sap_allow_all_chan_param_name;
  105. uint8_t sap_max_no_peers;
  106. uint8_t sap_max_offload_peers;
  107. uint8_t sap_max_offload_reorder_buffs;
  108. uint8_t sap_ch_switch_beacon_cnt;
  109. bool sap_internal_restart;
  110. bool sap_ch_switch_mode;
  111. bool chan_switch_hostapd_rate_enabled_name;
  112. uint8_t reduced_beacon_interval;
  113. };
  114. /**
  115. * struct wlan_mlme_mbo - Multiband Operation related ini configs
  116. * @mbo_candidate_rssi_thres:
  117. * @mbo_current_rssi_thres:
  118. * @mbo_current_rssi_mcc_thres:
  119. * @mbo_candidate_rssi_btc_thres:
  120. */
  121. struct wlan_mlme_mbo {
  122. int8_t mbo_candidate_rssi_thres;
  123. int8_t mbo_current_rssi_thres;
  124. int8_t mbo_current_rssi_mcc_thres;
  125. int8_t mbo_candidate_rssi_btc_thres;
  126. };
  127. struct wlan_mlme_vht_caps {
  128. /* VHT related configs */
  129. };
  130. /**
  131. * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
  132. * @tx_aggregation_size: TX aggr size in number of MPDUs
  133. * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
  134. * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
  135. * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
  136. * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
  137. * @rx_aggregation_size: No. of MPDUs for RX aggr
  138. * @tx_aggr_sw_retry_threshold_be: Tx aggregation sw retry for BE
  139. * @tx_aggr_sw_retry_threshold_bk: Tx aggregation sw retry for BK
  140. * @tx_aggr_sw_retry_threshold_vi: Tx aggregation sw retry for VI
  141. * @tx_aggr_sw_retry_threshold_vo: Tx aggregation sw retry for VO
  142. * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
  143. * hostapd.conf
  144. */
  145. struct wlan_mlme_qos {
  146. uint32_t tx_aggregation_size;
  147. uint32_t tx_aggregation_size_be;
  148. uint32_t tx_aggregation_size_bk;
  149. uint32_t tx_aggregation_size_vi;
  150. uint32_t tx_aggregation_size_vo;
  151. uint32_t rx_aggregation_size;
  152. uint32_t tx_aggr_sw_retry_threshold_be;
  153. uint32_t tx_aggr_sw_retry_threshold_bk;
  154. uint32_t tx_aggr_sw_retry_threshold_vi;
  155. uint32_t tx_aggr_sw_retry_threshold_vo;
  156. bool sap_max_inactivity_override;
  157. };
  158. /**
  159. * struct wlan_mlme_rates - RATES related config items
  160. * @cfpPeriod: cfp period info
  161. * @cfpMaxDuration: cfp Max duration info
  162. * @max_htmcs_txdata: max HT mcs info for Tx
  163. * @disable_abg_rate_txdata: disable abg rate info for tx data
  164. * @sap_max_mcs_txdata: sap max mcs info
  165. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  166. */
  167. struct wlan_mlme_rates {
  168. uint8_t cfp_period;
  169. uint16_t cfp_max_duration;
  170. uint16_t max_htmcs_txdata;
  171. bool disable_abg_rate_txdata;
  172. uint16_t sap_max_mcs_txdata;
  173. uint8_t disable_high_ht_mcs_2x2;
  174. };
  175. /* Flags for gLimProtectionControl that is updated in pe session*/
  176. #define MLME_FORCE_POLICY_PROTECTION_DISABLE 0
  177. #define MLME_FORCE_POLICY_PROTECTION_CTS 1
  178. #define MLME_FORCE_POLICY_PROTECTION_RTS 2
  179. #define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS 3
  180. #define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS 4
  181. #define MLME_FORCE_POLICY_PROTECTION_AUTO 5
  182. /* protection_enabled bits*/
  183. #define MLME_PROTECTION_ENABLED_FROM_llA 0
  184. #define MLME_PROTECTION_ENABLED_FROM_llB 1
  185. #define MLME_PROTECTION_ENABLED_FROM_llG 2
  186. #define MLME_PROTECTION_ENABLED_HT_20 3
  187. #define MLME_PROTECTION_ENABLED_NON_GF 4
  188. #define MLME_PROTECTION_ENABLED_LSIG_TXOP 5
  189. #define MLME_PROTECTION_ENABLED_RIFS 6
  190. #define MLME_PROTECTION_ENABLED_OBSS 7
  191. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llA 8
  192. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llB 9
  193. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llG 10
  194. #define MLME_PROTECTION_ENABLED_OLBC_HT20 11
  195. #define MLME_PROTECTION_ENABLED_OLBC_NON_GF 12
  196. #define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP 13
  197. #define MLME_PROTECTION_ENABLED_OLBC_RIFS 14
  198. #define MLME_PROTECTION_ENABLED_OLBC_OBSS 15
  199. /*
  200. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  201. *
  202. * @protection_enabled: Force enable protection. static via cfg
  203. * @protection_force_policy: Protection force policy. Static via cfg
  204. * @ignore_peer_ht_opmode: Ignore the ht opmode of the peer. Dynamic via INI
  205. *
  206. */
  207. struct wlan_mlme_sap_protection {
  208. uint32_t protection_enabled;
  209. uint8_t protection_force_policy;
  210. bool ignore_peer_ht_opmode;
  211. };
  212. /*
  213. * struct wlan_mlme_chainmask - All chainmask related cfg items
  214. *
  215. * @txchainmask1x1: To set transmit chainmask
  216. * @rxchainmask1x1: To set rx chainmask
  217. * @tx_chain_mask_cck: Used to enable/disable Cck ChainMask
  218. * @tx_chain_mask_1ss: Enables/disables tx chain Mask1ss
  219. * @num_11b_tx_chains: Number of Tx Chains in 11b mode
  220. * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
  221. * @tx_chain_mask_2g: Tx chain mask for 2g
  222. * @rx_chain_mask_2g: Tx chain mask for 2g
  223. * @tx_chain_mask_5g: Tx chain mask for 5g
  224. * @rx_chain_mask_5g: Rx chain mask for 5g
  225. */
  226. struct wlan_mlme_chainmask {
  227. uint8_t txchainmask1x1;
  228. uint8_t rxchainmask1x1;
  229. bool tx_chain_mask_cck;
  230. uint8_t tx_chain_mask_1ss;
  231. uint16_t num_11b_tx_chains;
  232. uint16_t num_11ag_tx_chains;
  233. uint8_t tx_chain_mask_2g;
  234. uint8_t rx_chain_mask_2g;
  235. uint8_t tx_chain_mask_5g;
  236. uint8_t rx_chain_mask_5g;
  237. };
  238. /**
  239. * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
  240. * @active_dwelltime: obss active dwelltime
  241. * @passive_dwelltime: obss passive dwelltime
  242. * @width_trigger_interval: obss trigger interval
  243. * @passive_per_channel: obss scan passive total duration per channel
  244. * @active_per_channel: obss scan active total duration per channel
  245. * @width_trans_delay: obss width transition delay
  246. * @scan_activity_threshold: obss scan activity threshold
  247. */
  248. struct wlan_mlme_obss_ht40 {
  249. uint32_t active_dwelltime;
  250. uint32_t passive_dwelltime;
  251. uint32_t width_trigger_interval;
  252. uint32_t passive_per_channel;
  253. uint32_t active_per_channel;
  254. uint32_t width_trans_delay;
  255. uint32_t scan_activity_threshold;
  256. };
  257. /**
  258. * enum dot11p_mode - The 802.11p mode of operation
  259. * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
  260. * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
  261. * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
  262. */
  263. enum dot11p_mode {
  264. CFG_11P_DISABLED = 0,
  265. CFG_11P_STANDALONE,
  266. CFG_11P_CONCURRENT,
  267. };
  268. /**
  269. * struct wlan_mlme_sta_cfg - MLME STA configuration items
  270. * @sta_keep_alive_period: Sends NULL frame to AP period
  271. * @tgt_gtx_usr_cfg: Target gtx user config
  272. * @pmkid_modes: Enable PMKID modes
  273. * @wait_cnf_timeout: Wait assoc cnf timeout
  274. * @dot11p_mode: Set 802.11p mode
  275. * @fils_max_chan_guard_time: Set maximum channel guard time
  276. * @current_rssi: Current rssi
  277. * @ignore_peer_erp_info: Ignore peer infrormation
  278. * @sta_prefer_80mhz_over_160mhz: Set Sta preference to connect in 80HZ/160HZ
  279. * @enable_5g_ebt: Set default 5G early beacon termination
  280. * @deauth_before_connection: Send deauth before connection or not
  281. * @enable_go_cts2self_for_sta: Stop NOA and start using cts2self
  282. * @qcn_ie_support: QCN IE support
  283. * @force_rsne_override: Force rsnie override from user
  284. * @single_tid: Set replay counter for all TID
  285. */
  286. struct wlan_mlme_sta_cfg {
  287. uint32_t sta_keep_alive_period;
  288. uint32_t tgt_gtx_usr_cfg;
  289. uint32_t pmkid_modes;
  290. uint32_t wait_cnf_timeout;
  291. uint8_t dot11p_mode;
  292. uint8_t fils_max_chan_guard_time;
  293. uint8_t current_rssi;
  294. bool ignore_peer_erp_info;
  295. bool sta_prefer_80mhz_over_160mhz;
  296. bool enable_5g_ebt;
  297. bool deauth_before_connection;
  298. bool enable_go_cts2self_for_sta;
  299. bool qcn_ie_support;
  300. bool force_rsne_override;
  301. bool single_tid;
  302. };
  303. /*
  304. * @mawc_roam_enabled: Enable/Disable MAWC during roaming
  305. * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
  306. * @lfr3_roaming_offload: Enable/disable roam offload feature
  307. * @early_stop_scan_enable: Set early stop scan
  308. * @lfr3_enable_subnet_detection: Enable LFR3 subnet detection
  309. * @enable_5g_band_pref: Enable preference for 5G from INI
  310. * @mawc_roam_traffic_threshold: Configure traffic threshold
  311. * @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
  312. * @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
  313. * @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
  314. * @roam_rssi_abs_threshold: The min RSSI of the candidate AP
  315. * @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
  316. * @early_stop_scan_min_threshold: Set early stop scan min
  317. * @early_stop_scan_max_threshold: Set early stop scan max
  318. * @first_scan_bucket_threshold: Set first scan bucket
  319. * @roam_dense_traffic_threshold: Dense traffic threshold
  320. * @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
  321. * @roam_dense_min_aps: Sets minimum number of AP for dense roam
  322. * @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
  323. * @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
  324. * @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
  325. * @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
  326. * @per_roam_enable: To enabled/disable PER based roaming in FW
  327. * @per_roam_config_high_rate_th: Rate at which PER based roam will stop
  328. * @per_roam_config_low_rate_th: Rate at which PER based roam will start
  329. * @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
  330. * @per_roam_rest_time: FW will wait once it issues a roam scan.
  331. * @per_roam_monitor_time: Min time to be considered as valid scenario
  332. * @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
  333. * @lfr3_disallow_duration: Disallow duration before roaming
  334. * @lfr3_rssi_channel_penalization: RSSI penalization
  335. * @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
  336. * @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
  337. * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
  338. * @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
  339. * @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
  340. * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
  341. * @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
  342. * @max_num_pre_auth: Configure max number of pre-auth
  343. */
  344. struct wlan_mlme_lfr_cfg {
  345. bool mawc_roam_enabled;
  346. bool enable_fast_roam_in_concurrency;
  347. bool lfr3_roaming_offload;
  348. bool early_stop_scan_enable;
  349. bool lfr3_enable_subnet_detection;
  350. bool enable_5g_band_pref;
  351. uint32_t mawc_roam_traffic_threshold;
  352. uint32_t mawc_roam_ap_rssi_threshold;
  353. uint32_t mawc_roam_rssi_high_adjust;
  354. uint32_t mawc_roam_rssi_low_adjust;
  355. uint32_t roam_rssi_abs_threshold;
  356. uint8_t rssi_threshold_offset_5g;
  357. uint8_t early_stop_scan_min_threshold;
  358. uint8_t early_stop_scan_max_threshold;
  359. uint8_t first_scan_bucket_threshold;
  360. uint32_t roam_dense_traffic_threshold;
  361. uint32_t roam_dense_rssi_thre_offset;
  362. uint32_t roam_dense_min_aps;
  363. uint32_t roam_bg_scan_bad_rssi_threshold;
  364. uint32_t roam_bg_scan_client_bitmap;
  365. uint32_t roam_bg_scan_bad_rssi_offset_2g;
  366. uint32_t adaptive_roamscan_dwell_mode;
  367. uint32_t per_roam_enable;
  368. uint32_t per_roam_config_high_rate_th;
  369. uint32_t per_roam_config_low_rate_th;
  370. uint32_t per_roam_config_rate_th_percent;
  371. uint32_t per_roam_rest_time;
  372. uint32_t per_roam_monitor_time;
  373. uint32_t per_roam_min_candidate_rssi;
  374. uint32_t lfr3_disallow_duration;
  375. uint32_t lfr3_rssi_channel_penalization;
  376. uint32_t lfr3_num_disallowed_aps;
  377. uint32_t rssi_boost_threshold_5g;
  378. uint32_t rssi_boost_factor_5g;
  379. uint32_t max_rssi_boost_5g;
  380. uint32_t rssi_penalize_threshold_5g;
  381. uint32_t rssi_penalize_factor_5g;
  382. uint32_t max_rssi_penalize_5g;
  383. uint32_t max_num_pre_auth;
  384. };
  385. /**
  386. * struct wlan_mlme_weight_config - weight params to
  387. * calculate best candidate
  388. *
  389. * @rssi_weightage: RSSI weightage
  390. * @ht_caps_weightage: HT caps weightage
  391. * @vht_caps_weightage: VHT caps weightage
  392. * @he_caps_weightage: HE caps weightage
  393. * @chan_width_weightage: Channel width weightage
  394. * @chan_band_weightage: Channel band weightage
  395. * @nss_weightage: NSS weightage
  396. * @beamforming_cap_weightage: Beamforming caps weightage
  397. * @pcl_weightage: PCL weightage
  398. * @channel_congestion_weightage: channel congestion weightage
  399. * @oce_wan_weightage: OCE WAN metrics weightage
  400. */
  401. struct wlan_mlme_weight_config {
  402. uint8_t rssi_weightage;
  403. uint8_t ht_caps_weightage;
  404. uint8_t vht_caps_weightage;
  405. uint8_t he_caps_weightage;
  406. uint8_t chan_width_weightage;
  407. uint8_t chan_band_weightage;
  408. uint8_t nss_weightage;
  409. uint8_t beamforming_cap_weightage;
  410. uint8_t pcl_weightage;
  411. uint8_t channel_congestion_weightage;
  412. uint8_t oce_wan_weightage;
  413. };
  414. /**
  415. * struct wlan_mlme_rssi_cfg_score - RSSI params to
  416. * calculate best candidate
  417. *
  418. * @best_rssi_threshold: Best RSSI threshold
  419. * @good_rssi_threshold: Good RSSI threshold
  420. * @bad_rssi_threshold: Bad RSSI threshold
  421. * @good_rssi_pcnt: Good RSSI Percentage
  422. * @bad_rssi_pcnt: Bad RSSI Percentage
  423. * @good_rssi_bucket_size: Good RSSI Bucket Size
  424. * @bad_rssi_bucket_size: Bad RSSI Bucket Size
  425. * @rssi_pref_5g_rssi_thresh: Preffered 5G RSSI threshold
  426. */
  427. struct wlan_mlme_rssi_cfg_score {
  428. uint32_t best_rssi_threshold;
  429. uint32_t good_rssi_threshold;
  430. uint32_t bad_rssi_threshold;
  431. uint32_t good_rssi_pcnt;
  432. uint32_t bad_rssi_pcnt;
  433. uint32_t good_rssi_bucket_size;
  434. uint32_t bad_rssi_bucket_size;
  435. uint32_t rssi_pref_5g_rssi_thresh;
  436. };
  437. /**
  438. * struct wlan_mlme_per_slot_scoring - define % score for differents slots
  439. * for a scoring param.
  440. * num_slot: number of slots in which the param will be divided.
  441. * Max 15. index 0 is used for 'not_present. Num_slot will
  442. * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
  443. * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  444. * score_pcnt3_to_0: Conatins score percentage for slot 0-3
  445. * BITS 0-7 :- the scoring pcnt when not present
  446. * BITS 8-15 :- SLOT_1
  447. * BITS 16-23 :- SLOT_2
  448. * BITS 24-31 :- SLOT_3
  449. * score_pcnt7_to_4: Conatins score percentage for slot 4-7
  450. * BITS 0-7 :- SLOT_4
  451. * BITS 8-15 :- SLOT_5
  452. * BITS 16-23 :- SLOT_6
  453. * BITS 24-31 :- SLOT_7
  454. * score_pcnt11_to_8: Conatins score percentage for slot 8-11
  455. * BITS 0-7 :- SLOT_8
  456. * BITS 8-15 :- SLOT_9
  457. * BITS 16-23 :- SLOT_10
  458. * BITS 24-31 :- SLOT_11
  459. * score_pcnt15_to_12: Conatins score percentage for slot 12-15
  460. * BITS 0-7 :- SLOT_12
  461. * BITS 8-15 :- SLOT_13
  462. * BITS 16-23 :- SLOT_14
  463. * BITS 24-31 :- SLOT_15
  464. */
  465. struct wlan_mlme_per_slot_scoring {
  466. uint32_t num_slot;
  467. uint32_t score_pcnt3_to_0;
  468. uint32_t score_pcnt7_to_4;
  469. uint32_t score_pcnt11_to_8;
  470. uint32_t score_pcnt15_to_12;
  471. };
  472. /*
  473. * struct wlan_mlme_score_config - MLME BSS Scoring related config
  474. * @enable_scoring_for_roam: Enable/disable BSS Scoring for Roaming
  475. * @weight_cfg: Various Weight related Scoring Configs
  476. * @rssi_score: RSSI Scoring related thresholds/percentages config
  477. * @esp_qbss_scoring: ESP QBSS Scoring configs
  478. * @oce_wan_scoring: OCE WAN Scoring Configs
  479. * @bandwidth_weight_per_index: Bandwidth weight per index for scoring logic
  480. * @nss_weight_per_index: NSS weight per index for scoring logic
  481. * @band_weight_per_index: Band weight per index for scoring logic
  482. */
  483. struct wlan_mlme_scoring_cfg {
  484. bool enable_scoring_for_roam;
  485. struct wlan_mlme_weight_config weight_cfg;
  486. struct wlan_mlme_rssi_cfg_score rssi_score;
  487. struct wlan_mlme_per_slot_scoring esp_qbss_scoring;
  488. struct wlan_mlme_per_slot_scoring oce_wan_scoring;
  489. uint32_t bandwidth_weight_per_index;
  490. uint32_t nss_weight_per_index;
  491. uint32_t band_weight_per_index;
  492. };
  493. /**
  494. * struct wlan_mlme_cfg - MLME config items
  495. * @ht_cfg: HT related CFG Items
  496. * @lfr: LFR related CFG Items
  497. * @obss_ht40:obss ht40 CFG Items
  498. * @vht_cfg: VHT related CFG Items
  499. * @rates: Rates related cfg items
  500. * @sap_protection_cfg: SAP erp protection related CFG items
  501. * @sta: sta CFG Items
  502. * @scoring: BSS Scoring related CFG Items
  503. */
  504. struct wlan_mlme_cfg {
  505. struct wlan_mlme_ht_caps ht_caps;
  506. struct wlan_mlme_lfr_cfg lfr;
  507. struct wlan_mlme_obss_ht40 obss_ht40;
  508. struct wlan_mlme_mbo mbo_cfg;
  509. struct wlan_mlme_vht_caps vht_caps;
  510. struct wlan_mlme_qos qos_mlme_params;
  511. struct wlan_mlme_rates rates;
  512. struct wlan_mlme_sap_protection sap_protection_cfg;
  513. struct wlan_mlme_chainmask chainmask_cfg;
  514. struct wlan_mlme_cfg_sap sap_cfg;
  515. struct wlan_mlme_sta_cfg sta;
  516. struct wlan_mlme_scoring_cfg scoring;
  517. };
  518. #endif