wlan_mlme_public_struct.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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. /**
  25. * struct mlme_ht_capabilities_info - HT Capabilities Info
  26. * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
  27. * @stbc_control_frame: STBC Control frame support
  28. * @psmp: PSMP Support
  29. * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
  30. * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
  31. * @delayed_ba: Support of Delayed Block Ack
  32. * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
  33. * @tx_stbc: Tx STBC Support
  34. * @short_gi_40_mhz: Short GI Support for HT40
  35. * @short_gi_20_mhz: Short GI support for HT20
  36. * @green_field: Support for HT Greenfield PPDUs
  37. * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
  38. * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
  39. * @adv_coding_cap: Rx LDPC support
  40. */
  41. #ifndef ANI_LITTLE_BIT_ENDIAN
  42. struct mlme_ht_capabilities_info {
  43. uint16_t l_sig_tx_op_protection:1;
  44. uint16_t stbc_control_frame:1;
  45. uint16_t psmp:1;
  46. uint16_t dsss_cck_mode_40_mhz:1;
  47. uint16_t maximal_amsdu_size:1;
  48. uint16_t delayed_ba:1;
  49. uint16_t rx_stbc:2;
  50. uint16_t tx_stbc:1;
  51. uint16_t short_gi_40_mhz:1;
  52. uint16_t short_gi_20_mhz:1;
  53. uint16_t green_field:1;
  54. uint16_t mimo_power_save:2;
  55. uint16_t supported_channel_width_set:1;
  56. uint16_t adv_coding_cap:1;
  57. } qdf_packed;
  58. #else
  59. struct mlme_ht_capabilities_info {
  60. uint16_t adv_coding_cap:1;
  61. uint16_t supported_channel_width_set:1;
  62. uint16_t mimo_power_save:2;
  63. uint16_t green_field:1;
  64. uint16_t short_gi_20_mhz:1;
  65. uint16_t short_gi_40_mhz:1;
  66. uint16_t tx_stbc:1;
  67. uint16_t rx_stbc:2;
  68. uint16_t delayed_ba:1;
  69. uint16_t maximal_amsdu_size:1;
  70. uint16_t dsss_cck_mode_40_mhz:1;
  71. uint16_t psmp:1;
  72. uint16_t stbc_control_frame:1;
  73. uint16_t l_sig_tx_op_protection:1;
  74. } qdf_packed;
  75. #endif
  76. /**
  77. * struct wlan_mlme_ht_caps - HT Capabilities related config items
  78. * @ht_cap_info: HT capabilities Info Structure
  79. */
  80. struct wlan_mlme_ht_caps {
  81. struct mlme_ht_capabilities_info ht_cap_info;
  82. };
  83. /**
  84. * struct wlan_mlme_ - HT Capabilities related config items
  85. * @ht_cap_info: HT capabilities Info Structure
  86. */
  87. struct wlan_mlme_cfg_sap {
  88. uint8_t cfg_ssid[32];
  89. uint16_t beacon_interval;
  90. uint16_t dtim_interval;
  91. uint16_t listen_interval;
  92. bool sap_11g_policy;
  93. uint8_t assoc_sta_limit;
  94. bool enable_lte_coex;
  95. uint16_t rmc_action_period_freq;
  96. uint8_t rate_tx_mgmt;
  97. uint8_t rate_tx_mgmt_2g;
  98. uint8_t rate_tx_mgmt_5g;
  99. bool tele_bcn_wakeup_en;
  100. uint8_t tele_bcn_max_li;
  101. bool sap_get_peer_info;
  102. bool sap_allow_all_chan_param_name;
  103. uint8_t sap_max_no_peers;
  104. uint8_t sap_max_offload_peers;
  105. uint8_t sap_max_offload_reorder_buffs;
  106. uint8_t sap_ch_switch_beacon_cnt;
  107. bool sap_ch_switch_mode;
  108. bool sap_internal_restart_name;
  109. bool chan_switch_hostapd_rate_enabled_name;
  110. uint8_t reduced_beacon_interval;
  111. };
  112. struct wlan_mlme_vht_caps {
  113. /* VHT related configs */
  114. };
  115. /**
  116. * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
  117. * @tx_aggregation_size: TX aggr size in number of MPDUs
  118. * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
  119. * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
  120. * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
  121. * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
  122. * @rx_aggregation_size: No. of MPDUs for RX aggr
  123. * @tx_aggr_sw_retry_threshold_be: Tx aggregation sw retry for BE
  124. * @tx_aggr_sw_retry_threshold_bk: Tx aggregation sw retry for BK
  125. * @tx_aggr_sw_retry_threshold_vi: Tx aggregation sw retry for VI
  126. * @tx_aggr_sw_retry_threshold_vo: Tx aggregation sw retry for VO
  127. * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
  128. * hostapd.conf
  129. */
  130. struct wlan_mlme_qos {
  131. uint32_t tx_aggregation_size;
  132. uint32_t tx_aggregation_size_be;
  133. uint32_t tx_aggregation_size_bk;
  134. uint32_t tx_aggregation_size_vi;
  135. uint32_t tx_aggregation_size_vo;
  136. uint32_t rx_aggregation_size;
  137. uint32_t tx_aggr_sw_retry_threshold_be;
  138. uint32_t tx_aggr_sw_retry_threshold_bk;
  139. uint32_t tx_aggr_sw_retry_threshold_vi;
  140. uint32_t tx_aggr_sw_retry_threshold_vo;
  141. bool sap_max_inactivity_override;
  142. };
  143. /**
  144. * struct wlan_mlme_rates - RATES related config items
  145. * @cfpPeriod: cfp period info
  146. * @cfpMaxDuration: cfp Max duration info
  147. * @max_htmcs_txdata: max HT mcs info for Tx
  148. * @disable_abg_rate_txdata: disable abg rate info for tx data
  149. * @sap_max_mcs_txdata: sap max mcs info
  150. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  151. */
  152. struct wlan_mlme_rates {
  153. uint8_t cfp_period;
  154. uint16_t cfp_max_duration;
  155. uint16_t max_htmcs_txdata;
  156. bool disable_abg_rate_txdata;
  157. uint16_t sap_max_mcs_txdata;
  158. uint8_t disable_high_ht_mcs_2x2;
  159. };
  160. /*
  161. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  162. *
  163. * @protection_enabled - Force enable protection. static via cfg
  164. * @protection_always_11g - Force protection enable for 11g. Static via cfg
  165. * @protection_force_policy - Protection force policy. Static via cfg
  166. * @ignore_peer_ht_mode - ignore the ht opmode of the peer. Dynamic via INI.
  167. *
  168. */
  169. struct wlan_mlme_sap_protection {
  170. uint32_t protection_enabled;
  171. uint8_t protection_force_policy;
  172. bool ignore_peer_ht_mode;
  173. };
  174. /*
  175. * struct wlan_mlme_chainmask - All chainmask related cfg items
  176. *
  177. * @txchainmask1x1 - to set transmit chainmask
  178. * @rxchainmask1x1 - to set rx chainmask
  179. * @tx_chain_mask_cck - Used to enable/disable Cck ChainMask
  180. * @tx_chain_mask_1ss - Enables/disables tx chain Mask1ss
  181. * @num_11b_tx_chains - Number of Tx Chains in 11b mode
  182. * @num_11ag_tx_chains - Number of Tx Chains in 11ag mode
  183. * @tx_chain_mask_2g - tx chain mask for 2g
  184. * @rx_chain_mask_2g - rx chain mask for 2g
  185. * @tx_chain_mask_5g - tx chain mask for 5g
  186. * @rx_chain_mask_5g - rx chain mask for 5g
  187. */
  188. struct wlan_mlme_chainmask {
  189. uint8_t txchainmask1x1;
  190. uint8_t rxchainmask1x1;
  191. bool tx_chain_mask_cck;
  192. uint8_t tx_chain_mask_1ss;
  193. uint16_t num_11b_tx_chains;
  194. uint16_t num_11ag_tx_chains;
  195. uint8_t tx_chain_mask_2g;
  196. uint8_t rx_chain_mask_2g;
  197. uint8_t tx_chain_mask_5g;
  198. uint8_t rx_chain_mask_5g;
  199. };
  200. /**
  201. * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
  202. * @active_dwelltime: obss active dwelltime
  203. * @passive_dwelltime: obss passive dwelltime
  204. * @width_trigger_interval: obss trigger interval
  205. * @passive_per_channel: obss scan passive total duration per channel
  206. * @active_per_channel: obss scan active total duration per channel
  207. * @width_trans_delay: obss width transition delay
  208. * @scan_activity_threshold: obss scan activity threshold
  209. */
  210. struct wlan_mlme_obss_ht40 {
  211. uint32_t active_dwelltime;
  212. uint32_t passive_dwelltime;
  213. uint32_t width_trigger_interval;
  214. uint32_t passive_per_channel;
  215. uint32_t active_per_channel;
  216. uint32_t width_trans_delay;
  217. uint32_t scan_activity_threshold;
  218. };
  219. /**
  220. * struct wlan_mlme_cfg - MLME config items
  221. * @ht_cfg: HT related CFG Items
  222. * @obss_ht40:obss ht40 CFG Items
  223. * @vht_cfg: VHT related CFG Items
  224. * @rates: Rates related cfg items
  225. * @sap_protection_cfg: SAP erp protection related CFG items
  226. */
  227. struct wlan_mlme_cfg {
  228. struct wlan_mlme_ht_caps ht_caps;
  229. struct wlan_mlme_obss_ht40 obss_ht40;
  230. struct wlan_mlme_vht_caps vht_caps;
  231. struct wlan_mlme_qos qos_mlme_params;
  232. struct wlan_mlme_rates rates;
  233. struct wlan_mlme_sap_protection sap_protection_cfg;
  234. struct wlan_mlme_chainmask chainmask_cfg;
  235. struct wlan_mlme_cfg_sap sap_cfg;
  236. };
  237. #endif