wlan_mlme_public_struct.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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_rates - RATES related config items
  117. * @cfpPeriod: cfp period info
  118. * @cfpMaxDuration: cfp Max duration info
  119. * @max_htmcs_txdata: max HT mcs info for Tx
  120. * @disable_abg_rate_txdata: disable abg rate info for tx data
  121. * @sap_max_mcs_txdata: sap max mcs info
  122. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  123. */
  124. struct wlan_mlme_rates {
  125. uint8_t cfp_period;
  126. uint16_t cfp_max_duration;
  127. uint16_t max_htmcs_txdata;
  128. bool disable_abg_rate_txdata;
  129. uint16_t sap_max_mcs_txdata;
  130. uint8_t disable_high_ht_mcs_2x2;
  131. };
  132. /*
  133. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  134. *
  135. * @protection_enabled - Force enable protection. static via cfg
  136. * @protection_always_11g - Force protection enable for 11g. Static via cfg
  137. * @protection_force_policy - Protection force policy. Static via cfg
  138. * @ignore_peer_ht_mode - ignore the ht opmode of the peer. Dynamic via INI.
  139. *
  140. */
  141. struct wlan_mlme_sap_protection {
  142. uint32_t protection_enabled;
  143. uint8_t protection_force_policy;
  144. bool ignore_peer_ht_mode;
  145. };
  146. /*
  147. * struct wlan_mlme_chainmask - All chainmask related cfg items
  148. *
  149. * @txchainmask1x1 - to set transmit chainmask
  150. * @rxchainmask1x1 - to set rx chainmask
  151. * @tx_chain_mask_cck - Used to enable/disable Cck ChainMask
  152. * @tx_chain_mask_1ss - Enables/disables tx chain Mask1ss
  153. * @num_11b_tx_chains - Number of Tx Chains in 11b mode
  154. * @num_11ag_tx_chains - Number of Tx Chains in 11ag mode
  155. * @tx_chain_mask_2g - tx chain mask for 2g
  156. * @rx_chain_mask_2g - rx chain mask for 2g
  157. * @tx_chain_mask_5g - tx chain mask for 5g
  158. * @rx_chain_mask_5g - rx chain mask for 5g
  159. */
  160. struct wlan_mlme_chainmask {
  161. uint8_t txchainmask1x1;
  162. uint8_t rxchainmask1x1;
  163. bool tx_chain_mask_cck;
  164. uint8_t tx_chain_mask_1ss;
  165. uint16_t num_11b_tx_chains;
  166. uint16_t num_11ag_tx_chains;
  167. uint8_t tx_chain_mask_2g;
  168. uint8_t rx_chain_mask_2g;
  169. uint8_t tx_chain_mask_5g;
  170. uint8_t rx_chain_mask_5g;
  171. };
  172. /**
  173. * struct wlan_mlme_cfg - MLME config items
  174. * @ht_cfg: HT related CFG Items
  175. * @vht_cfg: VHT related CFG Items
  176. * @rates: Rates related cfg items
  177. * @sap_protection_cfg: SAP erp protection related CFG items
  178. */
  179. struct wlan_mlme_cfg {
  180. struct wlan_mlme_ht_caps ht_caps;
  181. struct wlan_mlme_vht_caps vht_caps;
  182. struct wlan_mlme_rates rates;
  183. struct wlan_mlme_sap_protection sap_protection_cfg;
  184. struct wlan_mlme_chainmask chainmask_cfg;
  185. struct wlan_mlme_cfg_sap sap_cfg;
  186. };
  187. #endif