diff options
| author | gaolez <gaolez@codeaurora.org> | 2016-07-20 11:05:23 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-11-11 20:09:15 +0530 |
| commit | e5d6dc6a111ac5e4e86a471708023fb71919514e (patch) | |
| tree | 6674574235eb9cf71ef026fa2468ed4eb7e7d65b | |
| parent | 1379bfb6c09ee2ad5969db45c27fb675602b4ed0 (diff) | |
qcacld-2.0: Add support 5/10 MHz for STA and SAP
Add both static and dynamic 5/10 MHz channel width for STA and SAP mode.
* Static 5/10 MHz
STA/SAP brings up in 5/10 MHz channel width
* Dynamic 5/10 MHz
STA/SAP brings up in 20 MHz, and then switches to 5/10 MHz after
association or WPA authenication. Once STA/SAP are disconnected, they
will go back to 20 MHz channel width.
Change-Id: Id24b3a705c338c9055b82339576b024f22d48fa4
CRs-Fixed: 1063238
46 files changed, 1872 insertions, 217 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index 301ded487d10..6aa43be35675 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -4157,6 +4157,25 @@ FG_BTC_BT_INTERVAL_PAGE_P2P_STA_DEFAULT #define CFG_MAX_SCHED_SCAN_PLAN_ITRNS_MIN (1) #define CFG_MAX_SCHED_SCAN_PLAN_ITRNS_MAX (100) #define CFG_MAX_SCHED_SCAN_PLAN_ITRNS_DEFAULT (10) +/* + * g_sub20_channel_width=0: Indicates do not use Sub 20 MHz bandwidth + * g_sub20_channel_width=1: Bring up SAP/STA in 5 MHz bandwidth + * g_sub20_channel_width=2: Bring up SAP/STA in 10 MHz bandwidth + * g_sub20_channel_width=3: Switch between 5 and 20 MHz bandwidth dynamically + * g_sub20_channel_width=4: Switch between 10 and 20 MHz bandwidth dynamically + * g_sub20_channel_width=5: Switch between 5/10 and 20 MHz bandwidth dynamically + * Default : Disable + */ +#define CFG_SUB_20_CHANNEL_WIDTH_NAME "g_sub20_channel_width" +#define CFG_SUB_20_CHANNEL_WIDTH_DISABLE (0) +#define CFG_SUB_20_CHANNEL_WIDTH_5MHZ (1) +#define CFG_SUB_20_CHANNEL_WIDTH_10MHZ (2) +#define CFG_SUB_20_CHANNEL_WIDTH_DYN_5MHZ (3) +#define CFG_SUB_20_CHANNEL_WIDTH_DYN_10MHZ (4) +#define CFG_SUB_20_CHANNEL_WIDTH_DYN_ALL (5) +#define CFG_SUB_20_CHANNEL_WIDTH_MIN (0) +#define CFG_SUB_20_CHANNEL_WIDTH_MAX (5) +#define CFG_SUB_20_CHANNEL_WIDTH_DEFAULT (0) /* * 5G preference parameters for boosting RSSI @@ -5096,6 +5115,8 @@ struct hdd_config { /* Probe Request multiple vendor OUIs */ uint8_t probe_req_ouis[MAX_PRB_REQ_VENDOR_OUI_INI_LEN]; + /* parameter for indicating sub20 channel width */ + uint8_t sub_20_channel_width; }; typedef struct hdd_config hdd_config_t; @@ -5263,4 +5284,35 @@ void print_hdd_cfg(hdd_context_t *pHddCtx); void hdd_set_btc_bt_wlan_interval(hdd_context_t *pHddCtx); VOS_STATUS hdd_update_nss(hdd_context_t *hdd_ctx, uint8_t nss); + +#ifdef FEATURE_WLAN_SUB_20_MHZ +uint8_t hdd_cfg_get_sub20_dyn_capabilities(hdd_context_t *hdd_ctx_ptr); +uint8_t hdd_cfg_get_static_sub20_channel_width(hdd_context_t *hdd_ctx_ptr); +bool hdd_cfg_is_sub20_channel_width_enabled(hdd_context_t *hdd_ctx_ptr); +uint8_t hdd_cfg_get_sub20_channel_config(hdd_context_t *hdd_ctx_ptr); +#else +static inline +uint8_t hdd_cfg_get_sub20_dyn_capabilities(hdd_context_t *hdd_ctx_ptr) +{ + return SUB20_MODE_NONE; +} + +static inline +uint8_t hdd_cfg_get_static_sub20_channel_width(hdd_context_t *hdd_ctx_ptr) +{ + return SUB20_MODE_NONE; +} + +static inline +bool hdd_cfg_is_sub20_channel_width_enabled(hdd_context_t *hdd_ctx_ptr) +{ + return false; +} + +static inline +uint8_t hdd_cfg_get_sub20_channel_config(hdd_context_t *hdd_ctx_ptr) +{ + return 0; +} +#endif #endif diff --git a/CORE/HDD/inc/wlan_hdd_hostapd.h b/CORE/HDD/inc/wlan_hdd_hostapd.h index 574bb75b8b6e..a8e521264323 100644 --- a/CORE/HDD/inc/wlan_hdd_hostapd.h +++ b/CORE/HDD/inc/wlan_hdd_hostapd.h @@ -221,4 +221,22 @@ hdd_change_ch_avoidance_status(hdd_context_t *hdd_ctx, hddLog(LOG1, FL("is_ch_avoid_in_progress %d"), value); } +#ifdef FEATURE_WLAN_SUB_20_MHZ +bool hdd_hostapd_sub20_channelwidth_can_switch( + hdd_adapter_t *adapter, uint32_t *sub20_channel_width); +bool hdd_hostapd_sub20_channelwidth_can_restore( + hdd_adapter_t *adapter); +#else +static inline bool hdd_hostapd_sub20_channelwidth_can_switch( + hdd_adapter_t *adapter, uint32_t *sub20_channel_width) +{ + return false; +} + +static inline bool hdd_hostapd_sub20_channelwidth_can_restore( + hdd_adapter_t *adapter) +{ + return false; +} +#endif #endif // end #if !defined( WLAN_HDD_HOSTAPD_H ) diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index 953aca0fd1f8..55684c6aabf4 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -818,6 +818,9 @@ typedef struct { /** Rate Flags for this connection */ uint32_t rate_flags; + + /** SUB 20 Bandwidth Flags */ + uint8_t sub20_dynamic_channelwidth; } hdd_station_info_t; struct hdd_ap_ctx_s diff --git a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h index 72a6a683c4d1..02bf295e1056 100644 --- a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h @@ -118,6 +118,7 @@ struct hdd_tgt_cfg { bool nan_datapath_enabled; #endif uint8_t max_mc_addr_list; + bool sub_20_support; }; struct hdd_dfs_radar_ind { diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index c639bf1e5f4a..c2a22e101870 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -1211,6 +1211,14 @@ static eHalStatus hdd_DisConnectHandler( hdd_adapter_t *pAdapter, tCsrRoamInfo * if (pHddCtx->cfg_ini->enable_dynamic_sta_chainmask) hdd_decide_dynamic_chain_mask(pHddCtx, HDD_ANTENNA_MODE_INVALID); + + if (WLAN_HDD_INFRA_STATION == pAdapter->device_mode) { + sme_update_sub20_channel_width( + WLAN_HDD_GET_HAL_CTX(pAdapter), + pAdapter->sessionId, + SUB20_MODE_NONE); + } + //Unblock anyone waiting for disconnect to complete complete(&pAdapter->disconnect_comp_var); return( status ); diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index 787ae4545cd0..b2833cf62d31 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -4903,6 +4903,13 @@ REG_TABLE_ENTRY g_registry_table[] = hdd_config_t, probe_req_ouis, VAR_FLAGS_OPTIONAL, (void *)CFG_PROBE_REQ_OUI_DEFAULT), + + REG_VARIABLE(CFG_SUB_20_CHANNEL_WIDTH_NAME, WLAN_PARAM_Integer, + hdd_config_t, sub_20_channel_width, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SUB_20_CHANNEL_WIDTH_DEFAULT, + CFG_SUB_20_CHANNEL_WIDTH_MIN, + CFG_SUB_20_CHANNEL_WIDTH_MAX), }; @@ -5754,6 +5761,10 @@ void print_hdd_cfg(hdd_context_t *pHddCtx) CFG_BPF_PACKET_FILTER_OFFLOAD, pHddCtx->cfg_ini->bpf_packet_filter_enable); + hddLog(LOG2, "Name = [%s] Value = [%u]", + CFG_SUB_20_CHANNEL_WIDTH_NAME, + pHddCtx->cfg_ini->sub_20_channel_width); + hdd_ndp_print_ini_config(pHddCtx); hddLog(LOG2, "Name = [%s] Value = [%u] ", @@ -6363,6 +6374,85 @@ eCsrPhyMode hdd_cfg_xlate_to_csr_phy_mode( eHddDot11Mode dot11Mode ) } +#ifdef FEATURE_WLAN_SUB_20_MHZ +/** + * hdd_cfg_get_sub20_dyn_capabilities() + * @hdd_ctx_ptr: HDD context + * + * This function is used to get dynamic capabilities of sub 20MHz channel width + * Return: sub 20 channel width + */ +uint8_t hdd_cfg_get_sub20_dyn_capabilities(hdd_context_t *hdd_ctx_ptr) +{ + hdd_config_t *config_ptr = hdd_ctx_ptr->cfg_ini; + + if (config_ptr->sub_20_channel_width == + CFG_SUB_20_CHANNEL_WIDTH_DYN_5MHZ) { + return SUB20_MODE_5MHZ; + } else if (config_ptr->sub_20_channel_width == + CFG_SUB_20_CHANNEL_WIDTH_DYN_10MHZ) { + return SUB20_MODE_10MHZ; + } else if (config_ptr->sub_20_channel_width == + CFG_SUB_20_CHANNEL_WIDTH_DYN_ALL) { + return SUB20_MODE_5MHZ | SUB20_MODE_10MHZ; + } + return SUB20_MODE_NONE; +} + +/** + * hdd_cfg_get_static_sub20_channel_width() + * @hdd_ctx_ptr: HDD context + * + * This function is used to get static sub 20MHz channel width + * Return: sub 20 channel width + */ +uint8_t hdd_cfg_get_static_sub20_channel_width(hdd_context_t *hdd_ctx_ptr) +{ + hdd_config_t *config_ptr = hdd_ctx_ptr->cfg_ini; + + if (config_ptr->sub_20_channel_width == + CFG_SUB_20_CHANNEL_WIDTH_5MHZ) { + return SUB20_MODE_5MHZ; + } else if (config_ptr->sub_20_channel_width == + CFG_SUB_20_CHANNEL_WIDTH_10MHZ) { + return SUB20_MODE_10MHZ; + } + return SUB20_MODE_NONE; +} + +/** + * hdd_cfg_is_sub20_channel_width_enabled() + * @hdd_ctx_ptr: HDD context + * + * This function is used to check if sub 20MHz enabled + * Return: true of false + */ +bool hdd_cfg_is_sub20_channel_width_enabled(hdd_context_t *hdd_ctx_ptr) +{ + hdd_config_t *config_ptr = hdd_ctx_ptr->cfg_ini; + + return config_ptr->sub_20_channel_width != + CFG_SUB_20_CHANNEL_WIDTH_DISABLE; +} + +/** + * hdd_cfg_get_sub20_channel_config() + * @hdd_ctx_ptr: HDD context + * + * This function is used to get sub20 config + * Return: sub20 config value + */ +uint8_t hdd_cfg_get_sub20_channel_config(hdd_context_t *hdd_ctx_ptr) +{ + hdd_config_t *config_ptr = hdd_ctx_ptr->cfg_ini; + + if (config_ptr->sub_20_channel_width >= CFG_SUB_20_CHANNEL_WIDTH_MIN && + config_ptr->sub_20_channel_width <= CFG_SUB_20_CHANNEL_WIDTH_MAX) + return config_ptr->sub_20_channel_width; + return 0; +} +#endif + static void hdd_set_power_save_config(hdd_context_t *pHddCtx, tSmeConfigParams *smeConfig) { hdd_config_t *pConfig = pHddCtx->cfg_ini; @@ -7730,6 +7820,12 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx ) smeConfig->csrConfig.sta_roam_policy_params.skip_unsafe_channels = 0; smeConfig->snr_monitor_enabled = pHddCtx->cfg_ini->fEnableSNRMonitoring; + smeConfig->sub20_config_info = + hdd_cfg_get_sub20_channel_config(pHddCtx); + smeConfig->sub20_channelwidth = + hdd_cfg_get_static_sub20_channel_width(pHddCtx); + smeConfig->sub20_dynamic_channelwidth = + hdd_cfg_get_sub20_dyn_capabilities(pHddCtx); halStatus = sme_UpdateConfig( pHddCtx->hHal, smeConfig); if ( !HAL_STATUS_SUCCESS( halStatus ) ) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index d51350eef789..49a84bafd41d 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -8339,6 +8339,12 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, if (0 != status) return status; + if (hdd_cfg_is_sub20_channel_width_enabled(hdd_ctx)) { + hddLog(LOGE, FL("ACS not support in sub20 enable")); + status = -EINVAL; + goto out; + } + sap_config = &adapter->sessionCtx.ap.sapConfig; vos_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg)); @@ -15494,6 +15500,8 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, struct cfg80211_ap_settings *params) { hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); + uint8_t channel; + uint32_t channel_width; hdd_context_t *pHddCtx; int status; @@ -15531,6 +15539,110 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, if (WLAN_HDD_SOFTAP == pAdapter->device_mode) hdd_wlan_green_ap_start_bss(pHddCtx); + channel_width = params->chandef.width; + channel = ieee80211_frequency_to_channel( + params->chandef.chan->center_freq); + + /* Avoid ACS/DFS, and overwrite channel width to 20 */ + if (hdd_cfg_is_sub20_channel_width_enabled(pHddCtx)) { + bool channel_support_sub20 = true; + tSmeConfigParams sme_config; + uint8_t sub20_config; + uint8_t sub20_dyn_channelwidth = 0; + uint8_t sub20_static_channelwidth = 0; + uint8_t sub20_channelwidth = 0; + enum phy_ch_width phy_sub20_channel_width = CH_WIDTH_INVALID; + + vos_mem_zero(&sme_config, sizeof(sme_config)); + sme_GetConfigParam(pHddCtx->hHal, &sme_config); + sub20_config = sme_config.sub20_config_info; + + switch (sub20_config) { + case CFG_SUB_20_CHANNEL_WIDTH_5MHZ: + sub20_static_channelwidth = SUB20_MODE_5MHZ; + break; + case CFG_SUB_20_CHANNEL_WIDTH_10MHZ: + sub20_static_channelwidth = SUB20_MODE_10MHZ; + break; + case CFG_SUB_20_CHANNEL_WIDTH_DYN_5MHZ: + sub20_dyn_channelwidth = SUB20_MODE_5MHZ; + break; + case CFG_SUB_20_CHANNEL_WIDTH_DYN_10MHZ: + sub20_dyn_channelwidth = SUB20_MODE_10MHZ; + break; + case CFG_SUB_20_CHANNEL_WIDTH_DYN_ALL: + sub20_dyn_channelwidth = SUB20_MODE_5MHZ | SUB20_MODE_10MHZ; + break; + default: + break; + } + + if (channel == 0) { + hddLog(VOS_TRACE_LEVEL_WARN, + FL("Can't start SAP-ACS with sub20 channel width")); + return -EINVAL; + } + + if (CSR_IS_CHANNEL_DFS(channel)) { + hddLog(VOS_TRACE_LEVEL_WARN, + FL("Can't start SAP-DFS with sub20 channel width")); + return -EINVAL; + } + + if (channel_width != NL80211_CHAN_WIDTH_20 && + channel_width != NL80211_CHAN_WIDTH_20_NOHT) { + hddLog(VOS_TRACE_LEVEL_WARN, + FL("Hostapd (20+MHz) conflicts config.ini(sub20)")); + return -EINVAL; + } + + if (sub20_config != CFG_SUB_20_CHANNEL_WIDTH_DYN_ALL) { + sub20_channelwidth = (sub20_static_channelwidth != 0) ? + sub20_static_channelwidth : sub20_dyn_channelwidth; + phy_sub20_channel_width = + (sub20_channelwidth == SUB20_MODE_5MHZ) ? + CH_WIDTH_5MHZ : CH_WIDTH_10MHZ; + channel_support_sub20 = + vos_is_channel_support_sub20(channel, + phy_sub20_channel_width, + 0); + if (!channel_support_sub20) { + hddLog(VOS_TRACE_LEVEL_ERROR, + FL("ch%dwidth%d unsupport by reg domain"), + channel, phy_sub20_channel_width); + return -EINVAL; + } + } else { + channel_support_sub20 = + vos_is_channel_support_sub20(channel, + CH_WIDTH_5MHZ, 0); + if (!channel_support_sub20) { + hddLog(VOS_TRACE_LEVEL_ERROR, + FL("ch%dwidth5M unsupport by reg domain"), + channel); + sub20_dyn_channelwidth &= ~SUB20_MODE_5MHZ; + } + + channel_support_sub20 = + vos_is_channel_support_sub20(channel, + CH_WIDTH_10MHZ, 0); + if (!channel_support_sub20) { + hddLog(VOS_TRACE_LEVEL_ERROR, + FL("ch%dwidth10M unsupport by reg domain"), + channel); + sub20_dyn_channelwidth &= ~SUB20_MODE_10MHZ; + } + + if (sub20_dyn_channelwidth == 0) { + return -EINVAL; + } else { + sme_config.sub20_dynamic_channelwidth = + sub20_dyn_channelwidth; + sme_UpdateConfig(pHddCtx->hHal, &sme_config); + } + } + } + if (pAdapter->device_mode == WLAN_HDD_P2P_GO) { hdd_adapter_t *pP2pAdapter = NULL; pP2pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_P2P_DEVICE); @@ -16459,6 +16571,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, tANI_U8 isOffChannelSupported = 0; bool is_qos_wmm_sta = false; #endif + uint32_t sub20_chanwidth; int ret; ENTER(); @@ -16492,11 +16605,22 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, FL("Not able to change TL state to AUTHENTICATED")); return -EINVAL; } + + if (hdd_hostapd_sub20_channelwidth_can_switch(pAdapter, + &sub20_chanwidth)) { + WLANSAP_set_sub20_channelwidth_with_csa( + WLAN_HDD_GET_SAP_CTX_PTR(pAdapter), sub20_chanwidth); + } } } else if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) || (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)) { #ifdef FEATURE_WLAN_TDLS if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) { + if (hdd_cfg_is_sub20_channel_width_enabled(pHddCtx)) { + hddLog(LOGE, FL("TDLS not allowed with sub 20 MHz")); + return -EINVAL; + } + StaParams.capability = params->capability; StaParams.uapsd_queues = params->uapsd_queues; StaParams.max_sp = params->max_sp; diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index 97e3a3072411..e04e7e103b13 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -244,6 +244,126 @@ void hdd_hostapd_channel_wakelock_deinit(hdd_context_t *pHddCtx) vos_wake_lock_destroy(&pHddCtx->sap_dfs_wakelock); } +#ifdef FEATURE_WLAN_SUB_20_MHZ +/** + * hdd_hostapd_sub20_channelwidth_can_switch() - check + * channel width switch to 5/10M condition + * @adapter: pointer to HDD context + * @sub20_channel_width: 5MHz/10MHz channel width + * + * Return: true or false + */ +bool hdd_hostapd_sub20_channelwidth_can_switch( + hdd_adapter_t *adapter, uint32_t *sub20_channel_width) +{ + int i; + int sta_count = 0; + uint8_t sap_s20_caps; + uint8_t sta_s20_caps = SUB20_MODE_NONE; + tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); + tSmeConfigParams *sme_config; + hdd_station_info_t *sta; + hdd_ap_ctx_t *ap = WLAN_HDD_GET_AP_CTX_PTR(adapter); + + sme_config = vos_mem_malloc(sizeof(*sme_config)); + if (!sme_config) { + hddLog(LOGE, FL("mem alloc failed for sme_config")); + return false; + } + vos_mem_zero(sme_config, sizeof(*sme_config)); + + sme_GetConfigParam(hHal, sme_config); + sap_s20_caps = sme_config->sub20_dynamic_channelwidth; + vos_mem_free(sme_config); + if (sap_s20_caps == SUB20_MODE_NONE) { + hddLog(LOGE, FL("sub20 none")); + return false; + } + + spin_lock_bh(&adapter->staInfo_lock); + for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { + sta = &adapter->aStaInfo[i]; + if (sta->isUsed && (ap->uBCStaId != i)) { + sta_count++; + sta_s20_caps |= + sta->sub20_dynamic_channelwidth; + } + } + spin_unlock_bh(&adapter->staInfo_lock); + + if (sta_count != 1) { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%d STAs connected with sub20 Channelwidth %d", + sta_count, sta_s20_caps); + return false; + } + + *sub20_channel_width = sta_s20_caps & sap_s20_caps; + + if (*sub20_channel_width == (SUB20_MODE_5MHZ | SUB20_MODE_10MHZ)) + *sub20_channel_width = SUB20_MODE_10MHZ; + + if (*sub20_channel_width != 0) + return true; + else + return false; +} + +/** + * hdd_hostapd_sub20_channelwidth_can_restore() - check + * channel width switch to normal condition + * @adapter: pointer to HDD context + * + * Return: true or false + */ +bool hdd_hostapd_sub20_channelwidth_can_restore( + hdd_adapter_t *adapter) +{ + int i; + int sta_count = 0; + uint8_t sap_s20_caps; + uint8_t sta_s20_caps = SUB20_MODE_NONE; + tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); + tSmeConfigParams *sme_config; + hdd_station_info_t *sta; + hdd_ap_ctx_t *ap = WLAN_HDD_GET_AP_CTX_PTR(adapter); + + sme_config = vos_mem_malloc(sizeof(*sme_config)); + if (!sme_config) { + hddLog(LOGE, FL("mem alloc failed for sme_config")); + return false; + } + vos_mem_zero(sme_config, sizeof(*sme_config)); + sme_GetConfigParam(hHal, sme_config); + + sap_s20_caps = sme_config->sub20_dynamic_channelwidth; + vos_mem_free(sme_config); + if (sap_s20_caps == SUB20_MODE_NONE) { + hddLog(LOGE, FL("sub20 none")); + return false; + } + spin_lock_bh(&adapter->staInfo_lock); + for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { + sta = &adapter->aStaInfo[i]; + if (sta->isUsed && (ap->uBCStaId != i)) { + sta_count++; + sta_s20_caps |= + sta->sub20_dynamic_channelwidth; + } + } + spin_unlock_bh(&adapter->staInfo_lock); + + if (sta_count != 0) { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%d STAs connected with sub20 Channelwidth %d", + sta_count, sta_s20_caps); + return false; + } else { + return true; + } +} +#endif + /** * __hdd_hostapd_open() - HDD Open function for hostapd interface * @dev: pointer to net device @@ -1844,6 +1964,10 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa pSapEvent->sapevt.sapStationAssocReassocCompleteEvent.chan_info.nss; pHostapdAdapter->aStaInfo[staId].rate_flags = pSapEvent->sapevt.sapStationAssocReassocCompleteEvent.chan_info.rate_flags; + pHostapdAdapter->aStaInfo[staId].sub20_dynamic_channelwidth = + pSapEvent + ->sapevt.sapStationAssocReassocCompleteEvent. + chan_info.sub20_channelwidth; } #ifdef IPA_OFFLOAD @@ -1957,6 +2081,16 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa hdd_wlan_green_ap_add_sta(pHddCtx); + if (pHostapdAdapter->device_mode == WLAN_HDD_SOFTAP && + !bAuthRequired && bWPSState == eANI_BOOLEAN_FALSE) { + uint32_t sub20_channelwidth; + + if (hdd_hostapd_sub20_channelwidth_can_switch( + pHostapdAdapter, &sub20_channelwidth)) + WLANSAP_set_sub20_channelwidth_with_csa( + WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter), + sub20_channelwidth); + } break; case eSAP_STA_DISASSOC_EVENT: memcpy(wrqu.addr.sa_data, &pSapEvent->sapevt.sapStationDisassocCompleteEvent.staMac, @@ -2090,6 +2224,10 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa hdd_wlan_green_ap_del_sta(pHddCtx); + if (hdd_hostapd_sub20_channelwidth_can_restore(pHostapdAdapter)) { + WLANSAP_set_sub20_channelwidth_with_csa( + WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter), 0); + } break; case eSAP_WPS_PBC_PROBE_REQ_EVENT: { diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index b967a67955ec..5bb949d45f61 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -8895,6 +8895,13 @@ void hdd_update_tgt_cfg(void *context, void *param) struct hdd_tgt_cfg *cfg = (struct hdd_tgt_cfg *)param; tANI_U8 temp_band_cap; + if (hdd_cfg_is_sub20_channel_width_enabled(hdd_ctx) && + cfg->sub_20_support == 0) { + hddLog(VOS_TRACE_LEVEL_WARN, + FL("requests 5/10M, target not support")); + hdd_ctx->cfg_ini->sub_20_channel_width = 0; + } + /* first store the INI band capability */ temp_band_cap = hdd_ctx->cfg_ini->nBandCapability; @@ -10982,6 +10989,14 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type, return NULL; } + if (hdd_cfg_is_sub20_channel_width_enabled(pHddCtx) && + pHddCtx->current_intf_count >= 1) { + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, + "%s: Unable add another virtual intf when sub20 enable", + __func__); + return NULL; + } + if(macAddr == NULL) { /* Not received valid macAddr */ @@ -15406,7 +15421,8 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) #ifdef WLAN_OPEN_P2P_INTERFACE /* Open P2P device interface */ - if (pAdapter != NULL) { + if (pAdapter != NULL && + !hdd_cfg_is_sub20_channel_width_enabled(pHddCtx)) { if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated && !(pHddCtx->cfg_ini->intfMacAddr[0].bytes[0] & 0x02)) { vos_mem_copy(pHddCtx->p2pDeviceAddress.bytes, diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h index 1b81adc18f10..92f0c8df0248 100644 --- a/CORE/MAC/inc/aniGlobal.h +++ b/CORE/MAC/inc/aniGlobal.h @@ -1286,6 +1286,9 @@ typedef struct sAniSirGlobal bool snr_monitor_enabled; /* channel information callback */ void (*chan_info_cb)(struct scan_chan_info *chan_info); + uint8_t sub20_config_info; + uint8_t sub20_channelwidth; + uint8_t sub20_dynamic_channelwidth; } tAniSirGlobal; typedef enum diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index 36f71b671a42..8f549361c6e3 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -704,6 +704,7 @@ typedef struct sSirSmeStartBssReq uint8_t sap_dot11mc; bool vendor_vht_for_24ghz_sap; uint16_t beacon_tx_rate; + uint8_t sub20_channelwidth; } tSirSmeStartBssReq, *tpSirSmeStartBssReq; #define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \ @@ -1152,7 +1153,7 @@ typedef struct sSirSmeJoinReq tSirMacPowerCapInfo powerCap; tSirSupChnl supportedChannels; tSirBssDescription bssDescription; - + uint8_t sub20_channelwidth; } tSirSmeJoinReq, *tpSirSmeJoinReq; /* Definition for response message to previously issued join request */ @@ -1251,6 +1252,8 @@ typedef struct sSirSmeChanInfo uint8_t nss; /* rate flags */ uint32_t rate_flags; + /* sub20 channelwidth */ + uint32_t sub20_channelwidth; } tSirSmeChanInfo, *tpSirSmeChanInfo; /// Definition for Association indication from peer /// MAC ---> @@ -4946,6 +4949,7 @@ typedef struct sSirChanChangeRequest tANI_U32 dot11mode; tSirMacRateSet operational_rateset; tSirMacRateSet extended_rateset; + uint8_t sub20_channelwidth; }tSirChanChangeRequest, *tpSirChanChangeRequest; typedef struct sSirChanChangeResponse @@ -5034,6 +5038,7 @@ typedef struct sSirDfsCsaIeRequest tANI_U8 csaIeRequired; tANI_U8 bssid[VOS_MAC_ADDR_SIZE]; u_int8_t ch_bandwidth; + uint8_t sub20_channelwidth; }tSirDfsCsaIeRequest, *tpSirDfsCsaIeRequest; /* Indication from lower layer indicating the completion of first beacon send @@ -8149,4 +8154,17 @@ struct get_chain_rssi_req_params { v_MACADDR_t peer_macaddr; }; +/** + * struct sme_sub20_chan_width - set sub20 channel width + * @message_type: message Type. + * @length: message length. + * @session_id: session Id. + * @channelwidth: sub20 channel Width. + */ +struct sme_sub20_chan_width { + uint16_t message_type; + uint16_t length; + uint8_t session_id; + uint8_t channelwidth; +}; #endif /* __SIR_API_H */ diff --git a/CORE/MAC/inc/sirMacProtDef.h b/CORE/MAC/inc/sirMacProtDef.h index 324a5871d074..699a141e9c1d 100644 --- a/CORE/MAC/inc/sirMacProtDef.h +++ b/CORE/MAC/inc/sirMacProtDef.h @@ -408,11 +408,9 @@ #define NSS_1x1_MODE 1 #define NSS_2x2_MODE 2 -#ifdef FEATURE_AP_MCC_CH_AVOIDANCE #define SIR_MAC_QCOM_VENDOR_EID 200 #define SIR_MAC_QCOM_VENDOR_OUI "\x00\xA0\xC6" #define SIR_MAC_QCOM_VENDOR_SIZE 3 -#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ /// Workaround IE to change beacon length when it is 4*n+1 #define SIR_MAC_ANI_WORKAROUND_EID 255 diff --git a/CORE/MAC/inc/wniApi.h b/CORE/MAC/inc/wniApi.h index 6372d291e589..f460621b980b 100644 --- a/CORE/MAC/inc/wniApi.h +++ b/CORE/MAC/inc/wniApi.h @@ -346,6 +346,7 @@ enum eWniMsgTypes #ifdef FEATURE_WLAN_CH_AVOID eWNI_SME_CH_AVOID_IND, #endif /* FEATURE_WLAN_CH_AVOID */ + eWNI_SME_SET_SUB20_CH_WIDTH, /* DFS EVENTS */ eWNI_SME_DFS_RADAR_FOUND, //RADAR found indication from DFS eWNI_SME_CHANNEL_CHANGE_REQ,//Channel Change Request from SAP diff --git a/CORE/MAC/src/cfg/cfgUtil/dot11f.frms b/CORE/MAC/src/cfg/cfgUtil/dot11f.frms index 76922ca39c01..7a05b0a52efe 100644 --- a/CORE/MAC/src/cfg/cfgUtil/dot11f.frms +++ b/CORE/MAC/src/cfg/cfgUtil/dot11f.frms @@ -2049,10 +2049,21 @@ IE Vendor3IE (EID_VENDOR_SPECIFIC) OUI (0x00, 0x16, 0x32) { } +const EID_VENDOR_QCOM_MCC_CHAN = 1; +const EID_VENDOR_QCOM_SUB20_BW = 2; + IE QComVendorIE (EID_VENDOR_SPECIFIC) OUI (0x00, 0xA0, 0xC6) { - type, 1; - channel, 1; + OPTIE IE MccChanInfo (EID_VENDOR_QCOM_MCC_CHAN) + { + channel, 1; + } + + OPTIE IE Sub20Info (EID_VENDOR_QCOM_SUB20_BW) + { + capability, 1; + csa_chanwidth, 1; + } } IE ESETrafStrmMet (EID_VENDOR_SPECIFIC) OUI (0x00, 0x40, 0x96, 0x07) @@ -3274,6 +3285,7 @@ FRAME AssocRequest // 7.2.3.4 OPTIE OperatingMode; OPTIE QosMapSet; OPTIE vendor2_ie; + OPTIE QComVendorIE; } // End frame AssocRequest. FRAME AssocResponse // 7.2.3.5 @@ -3308,6 +3320,7 @@ FRAME AssocResponse // 7.2.3.5 OPTIE OBSSScanParameters; OPTIE QosMapSet; OPTIE vendor2_ie; + OPTIE QComVendorIE; } // End frame AssocResponse. FRAME ReAssocRequest // 7.2.3.6 @@ -3345,6 +3358,7 @@ FRAME ReAssocRequest // 7.2.3.6 OPTIE OperatingMode; OPTIE QosMapSet; OPTIE vendor2_ie; + OPTIE QComVendorIE; } // End frame ReAssocRequest. FRAME ReAssocResponse // 7.2.3.7 @@ -3380,6 +3394,7 @@ FRAME ReAssocResponse // 7.2.3.7 OPTIE OBSSScanParameters; OPTIE QosMapSet; OPTIE vendor2_ie; + OPTIE QComVendorIE; } // End frame ReAssocResponse. FRAME ProbeRequest // 7.2.3.8 diff --git a/CORE/MAC/src/include/dot11f.h b/CORE/MAC/src/include/dot11f.h index 4f7a6c2f468d..43a11289de0b 100644 --- a/CORE/MAC/src/include/dot11f.h +++ b/CORE/MAC/src/include/dot11f.h @@ -37,7 +37,7 @@ * * * This file was automatically generated by 'framesc' - * Wed Aug 31 14:43:25 2016 from the following file(s): + * Mon Sep 5 10:41:23 2016 from the following file(s): * * dot11f.frms * @@ -1829,6 +1829,31 @@ tANI_U32 dot11fGetPackedIEIGTK(tpAniSirGlobal, tDot11fIEIGTK*, tANI_U32*); #ifdef __cplusplus }; /* End extern "C". */ #endif /* C++ */ +// EID 1 (0x01) +typedef struct sDot11fIEMccChanInfo { + tANI_U8 present; + tANI_U8 channel; +} tDot11fIEMccChanInfo; + +#define DOT11F_EID_MCCCHANINFO ( 1 ) + +// N.B. These #defines do *not* include the EID & length +#define DOT11F_IE_MCCCHANINFO_MIN_LEN ( 1 ) + +#define DOT11F_IE_MCCCHANINFO_MAX_LEN ( 1 ) + +#ifdef __cplusplus +extern "C" { +#endif /* C++ */ +tANI_U32 dot11fUnpackIeMccChanInfo(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIEMccChanInfo*); + +tANI_U32 dot11fPackIeMccChanInfo(tpAniSirGlobal, tDot11fIEMccChanInfo*, tANI_U8*, tANI_U32, tANI_U32*); + +tANI_U32 dot11fGetPackedIEMccChanInfo(tpAniSirGlobal, tDot11fIEMccChanInfo*, tANI_U32*); + +#ifdef __cplusplus +}; /* End extern "C". */ +#endif /* C++ */ // EID 3 (0x03) typedef struct sDot11fIER0KH_ID { tANI_U8 present; @@ -1880,6 +1905,32 @@ tANI_U32 dot11fGetPackedIER1KH_ID(tpAniSirGlobal, tDot11fIER1KH_ID*, tANI_U32*); #ifdef __cplusplus }; /* End extern "C". */ #endif /* C++ */ +// EID 2 (0x02) +typedef struct sDot11fIESub20Info { + tANI_U8 present; + tANI_U8 capability; + tANI_U8 csa_chanwidth; +} tDot11fIESub20Info; + +#define DOT11F_EID_SUB20INFO ( 2 ) + +// N.B. These #defines do *not* include the EID & length +#define DOT11F_IE_SUB20INFO_MIN_LEN ( 2 ) + +#define DOT11F_IE_SUB20INFO_MAX_LEN ( 2 ) + +#ifdef __cplusplus +extern "C" { +#endif /* C++ */ +tANI_U32 dot11fUnpackIeSub20Info(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIESub20Info*); + +tANI_U32 dot11fPackIeSub20Info(tpAniSirGlobal, tDot11fIESub20Info*, tANI_U8*, tANI_U32, tANI_U32*); + +tANI_U32 dot11fGetPackedIESub20Info(tpAniSirGlobal, tDot11fIESub20Info*, tANI_U32*); + +#ifdef __cplusplus +}; /* End extern "C". */ +#endif /* C++ */ // EID 1 (0x01) typedef struct sDot11fIETSFInfo { tANI_U8 present; @@ -2863,8 +2914,8 @@ tANI_U32 dot11fGetPackedIEChanSwitchAnn(tpAniSirGlobal, tDot11fIEChanSwitchAnn*, #endif /* C++ */ // EID 196 (0xc4) typedef struct sDot11fIEChannelSwitchWrapper { - tANI_U8 present; - tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn; + tANI_U8 present; + tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn; tDot11fIEvht_transmit_power_env vht_transmit_power_env; } tDot11fIEChannelSwitchWrapper; @@ -4570,17 +4621,17 @@ tANI_U32 dot11fGetPackedIEQBSSLoad(tpAniSirGlobal, tDot11fIEQBSSLoad*, tANI_U32* #endif /* C++ */ // EID 221 (0xdd) {OUI 0x00, 0xa0, 0xc6} typedef struct sDot11fIEQComVendorIE { - tANI_U8 present; - tANI_U8 type; - tANI_U8 channel; + tANI_U8 present; + tDot11fIEMccChanInfo MccChanInfo; + tDot11fIESub20Info Sub20Info; } tDot11fIEQComVendorIE; #define DOT11F_EID_QCOMVENDORIE ( 221 ) // N.B. These #defines do *not* include the EID & length -#define DOT11F_IE_QCOMVENDORIE_MIN_LEN ( 5 ) +#define DOT11F_IE_QCOMVENDORIE_MIN_LEN ( 3 ) -#define DOT11F_IE_QCOMVENDORIE_MAX_LEN ( 5 ) +#define DOT11F_IE_QCOMVENDORIE_MAX_LEN ( 10 ) #ifdef __cplusplus extern "C" { @@ -4791,7 +4842,7 @@ typedef struct sDot11fIERSN { // N.B. These #defines do *not* include the EID & length #define DOT11F_IE_RSN_MIN_LEN ( 6 ) -#define DOT11F_IE_RSN_MAX_LEN ( 255 ) +#define DOT11F_IE_RSN_MAX_LEN ( 114 ) #ifdef __cplusplus extern "C" { @@ -4933,7 +4984,7 @@ typedef struct sDot11fIESuppRates { ((_x) == 48) || \ ((_x) == 72) || \ ((_x) == 96) || \ - ((_x) == 108)) + ((_x) == 108)) #ifdef __cplusplus extern "C" { @@ -5417,7 +5468,7 @@ tANI_U32 dot11fGetPackedIEWMMParams(tpAniSirGlobal, tDot11fIEWMMParams*, tANI_U3 typedef struct sDot11fIEWPA { tANI_U8 present; tANI_U16 version /* Must be 1! */; - tANI_U8 multicast_cipher_present; //field added to fix the bug in dot11fPackIEWPA + tANI_U8 multicast_cipher_present; //field added to fix the bug in dot11fPackIEWPA tANI_U8 multicast_cipher[4]; tANI_U16 unicast_cipher_count; tANI_U8 unicast_ciphers[4][4]; @@ -6000,6 +6051,7 @@ typedef struct sDot11fAssocRequest{ tDot11fIEOperatingMode OperatingMode; tDot11fIEQosMapSet QosMapSet; tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEQComVendorIE QComVendorIE; } tDot11fAssocRequest; #define DOT11F_ASSOCREQUEST ( 5 ) @@ -6049,6 +6101,7 @@ typedef struct sDot11fAssocResponse{ tDot11fIEOBSSScanParameters OBSSScanParameters; tDot11fIEQosMapSet QosMapSet; tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEQComVendorIE QComVendorIE; } tDot11fAssocResponse; #define DOT11F_ASSOCRESPONSE ( 6 ) @@ -7083,6 +7136,7 @@ typedef struct sDot11fReAssocRequest{ tDot11fIEOperatingMode OperatingMode; tDot11fIEQosMapSet QosMapSet; tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEQComVendorIE QComVendorIE; } tDot11fReAssocRequest; #define DOT11F_REASSOCREQUEST ( 43 ) @@ -7133,6 +7187,7 @@ typedef struct sDot11fReAssocResponse{ tDot11fIEOBSSScanParameters OBSSScanParameters; tDot11fIEQosMapSet QosMapSet; tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEQComVendorIE QComVendorIE; } tDot11fReAssocResponse; #define DOT11F_REASSOCRESPONSE ( 44 ) diff --git a/CORE/MAC/src/include/dphGlobal.h b/CORE/MAC/src/include/dphGlobal.h index 2ea951b08997..f40c7f2e9454 100644 --- a/CORE/MAC/src/include/dphGlobal.h +++ b/CORE/MAC/src/include/dphGlobal.h @@ -515,6 +515,7 @@ typedef struct sDphHashNode bool sta_deletion_in_progress; struct sDphHashNode *next; tANI_S8 del_sta_ctx_rssi; + uint8_t sub20_dynamic_channelwidth; } tDphHashNode, *tpDphHashNode; diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h index 6da39f5b9ced..390d01a353ce 100644 --- a/CORE/MAC/src/include/parserApi.h +++ b/CORE/MAC/src/include/parserApi.h @@ -67,10 +67,25 @@ struct sAvoidChannelIE { uint8_t oui[3]; /* following must be 0x01 */ uint8_t type; + uint8_t type_len; uint8_t channel; }; #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ +/** + * struct vendor_ie_sub20_channelwidth + * @elem_id: Vendor Sub20 Channel Width Element id + * @elem_len: Vendor Sub20 Channel Width Element data length + * @sub20_capability: sub20 capability + * @new_sub20_channelwidth: new sub20 channelwidth + */ +struct vendor_ie_sub20_channelwidth { + uint8_t elem_id; + uint8_t elem_len; + uint8_t sub20_capability; + uint8_t new_sub20_channelwidth; +} __packed; + #define SIZE_OF_FIXED_PARAM ( 12 ) #define SIZE_OF_TAG_PARAM_NUM ( 1 ) #define SIZE_OF_TAG_PARAM_LEN ( 1 ) @@ -181,6 +196,7 @@ typedef struct sSirProbeRespBeacon #ifdef FEATURE_WLAN_ESE uint8_t is_ese_ver_ie_present; #endif + uint8_t vendor_sub20_capability; } tSirProbeRespBeacon, *tpSirProbeRespBeacon; // probe Request structure @@ -256,6 +272,7 @@ typedef struct sSirAssocReq #endif tDot11fIEExtCap ExtCap; tDot11fIEvendor2_ie vendor2_ie; + uint8_t vendor_sub20_capability; } tSirAssocReq, *tpSirAssocReq; @@ -313,6 +330,7 @@ typedef struct sSirAssocRsp tDot11fIETimeoutInterval TimeoutInterval; #endif tDot11fIEvendor2_ie vendor2_ie; + uint8_t vendor_sub20_capability; } tSirAssocRsp, *tpSirAssocRsp; #if defined(FEATURE_WLAN_ESE_UPLOAD) @@ -632,6 +650,22 @@ populate_dot11f_avoid_channel_ie(tpAniSirGlobal mac_ctx, tpPESession session_entry); #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ +#ifdef FEATURE_WLAN_SUB_20_MHZ +void +populate_dot11f_sub_20_channel_width_ie(tpAniSirGlobal mac_ctx_ptr, + tDot11fIEQComVendorIE *dot11f_ptr, + tpPESession pe_session); +#else +static inline void +populate_dot11f_sub_20_channel_width_ie( + tpAniSirGlobal mac_ctx_ptr, + tDot11fIEQComVendorIE *dot11f_ptr, + tpPESession pe_session) +{ + dot11f_ptr->Sub20Info.present = false; + return; +} +#endif /// Populate a tDot11fIECountry tSirRetStatus PopulateDot11fCountry(tpAniSirGlobal pMac, diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h index e55e4dcec6d0..bc5a90a5baf5 100644 --- a/CORE/MAC/src/pe/include/limSession.h +++ b/CORE/MAC/src/pe/include/limSession.h @@ -358,6 +358,8 @@ typedef struct sPESession // Added to Support BT-AMP tLimChannelSwitchInfo gLimChannelSwitch; /* *********************End 11H related*****************************/ + uint8_t lim_sub20_channel_switch_bandwidth; + /*Flag to Track Status/Indicate HBFailure on this session */ tANI_BOOLEAN LimHBFailureStatus; tANI_U32 gLimPhyMode; @@ -508,7 +510,8 @@ typedef struct sPESession // Added to Support BT-AMP uint16_t beacon_tx_rate; uint8_t *access_policy_vendor_ie; uint8_t access_policy; - + uint8_t sap_sub20_channelwidth; + uint8_t sub20_channelwidth; } tPESession, *tpPESession; /*------------------------------------------------------------------------- diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c index 597d20f35dfe..caea0bfc9254 100644 --- a/CORE/MAC/src/pe/lim/limAssocUtils.c +++ b/CORE/MAC/src/pe/lim/limAssocUtils.c @@ -4270,6 +4270,11 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, //we need to defer the message until we get the response back from HAL. SET_LIM_PROCESS_DEFD_MESGS(pMac, false); + if (psessionEntry->sub20_channelwidth == SUB20_MODE_5MHZ) + pAddBssParams->channelwidth = CH_WIDTH_5MHZ; + else if (psessionEntry->sub20_channelwidth == SUB20_MODE_10MHZ) + pAddBssParams->channelwidth = CH_WIDTH_10MHZ; + msgQ.type = WDA_ADD_BSS_REQ; /** @ToDo : Update the Global counter to keeptrack of the PE <--> HAL messages*/ msgQ.reserved = 0; @@ -4738,6 +4743,11 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry //we need to defer the message until we get the response back from HAL. SET_LIM_PROCESS_DEFD_MESGS(pMac, false); + if (psessionEntry->sub20_channelwidth == SUB20_MODE_5MHZ) + pAddBssParams->channelwidth = CH_WIDTH_5MHZ; + else if (psessionEntry->sub20_channelwidth == SUB20_MODE_10MHZ) + pAddBssParams->channelwidth = CH_WIDTH_10MHZ; + msgQ.type = WDA_ADD_BSS_REQ; /** @ToDo : Update the Global counter to keeptrack of the PE <--> HAL messages*/ msgQ.reserved = 0; diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c index ebbc955837c4..9210bcd84086 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c @@ -1470,6 +1470,8 @@ if (limPopulateMatchingRateSet(pMac, PELOG1(limLog(pMac, LOG1, FL("ExtCap not present"));) } + pStaDs->sub20_dynamic_channelwidth = pAssocReq->vendor_sub20_capability; + // BTAMP: Storing the parsed assoc request in the psessionEntry array if(psessionEntry->parsedAssocReq) psessionEntry->parsedAssocReq[pStaDs->assocId] = pAssocReq; @@ -1853,6 +1855,9 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p pMlmAssocInd->chan_info.rate_flags = lim_get_max_rate_flags(pMac, pStaDs); + pMlmAssocInd->chan_info.sub20_channelwidth = + pStaDs->sub20_dynamic_channelwidth; + limPostSmeMessage(pMac, LIM_MLM_ASSOC_IND, (tANI_U32 *) pMlmAssocInd); vos_mem_free(pMlmAssocInd); } diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c index 47d51f86d7e9..f847d203240d 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c @@ -1658,6 +1658,11 @@ limMlmAddBss ( pAddBssParams->beacon_tx_rate = pMlmStartReq->beacon_tx_rate; + if (psessionEntry->sub20_channelwidth == SUB20_MODE_5MHZ) + pAddBssParams->channelwidth = CH_WIDTH_5MHZ; + else if (psessionEntry->sub20_channelwidth == SUB20_MODE_10MHZ) + pAddBssParams->channelwidth = CH_WIDTH_10MHZ; + limLog(pMac, LOG2, FL("dot11_mode:%d"), pAddBssParams->dot11_mode); msgQ.type = WDA_ADD_BSS_REQ; diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index d1629bcd4c64..b12e49a2fe73 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -727,6 +727,9 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) limLog(pMac, LOG1, FL("Session RMF enabled: %d"), psessionEntry->limRmfEnabled); #endif + /* Update sub 20MHz channel width */ + psessionEntry->sub20_channelwidth = pSmeStartBssReq->sub20_channelwidth; + vos_mem_copy((void*)&psessionEntry->rateSet, (void*)&pSmeStartBssReq->operationalRateSet, sizeof(tSirMacRateSet)); @@ -2393,6 +2396,8 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) psessionEntry->isOSENConnection = pSmeJoinReq->isOSENConnection; + psessionEntry->sub20_channelwidth = pSmeJoinReq->sub20_channelwidth; + /* Issue LIM_MLM_JOIN_REQ to MLM */ limPostMlmMessage(pMac, LIM_MLM_JOIN_REQ, (tANI_U32 *) pMlmJoinReq); return; @@ -6082,6 +6087,49 @@ static void lim_process_sme_update_access_policy_vendor_ie( return; } +#ifdef FEATURE_WLAN_SUB_20_MHZ +/** + * lim_process_sme_set_sub20_channelwidth() - update sub 20MHz channel width + * @mac_ptr: Mac pointer + * @msgbuf_ptr: Msg pointer containing the callback + * + * This function is used to save sub 20MHz channel width + * + * Return: None + */ +static void lim_process_sme_set_sub20_channelwidth( + tpAniSirGlobal mac_ptr, uint32_t *msgbuf_ptr) +{ + struct sme_sub20_chan_width *msg; + tpPESession session_entry_ptr; + + if (msgbuf_ptr == NULL) { + limLog(mac_ptr, LOGE, FL("Buffer is Pointing to NULL")); + return; + } + + msg = (struct sme_sub20_chan_width *)msgbuf_ptr; + session_entry_ptr = + pe_find_session_by_sme_session_id(mac_ptr, msg->session_id); + if (session_entry_ptr == NULL) { + limLog(mac_ptr, LOGE, FL("Session not exist")); + return; + } + + session_entry_ptr->sub20_channelwidth = msg->channelwidth; + limLog(mac_ptr, LOGE, "Set sub20 channel width %d\n", + session_entry_ptr->sub20_channelwidth); + return; +} +#else +static void lim_process_sme_set_sub20_channelwidth( + tpAniSirGlobal mac_ptr, uint32_t *msgbuf_ptr) +{ + limLog(mac_ptr, LOGE, FL("invalid event")); + return; +} +#endif + /** * limProcessSmeReqMessages() * @@ -6438,6 +6486,9 @@ limProcessSmeReqMessages(tpAniSirGlobal pMac, tpSirMsgQ pMsg) case eWNI_SME_UPDATE_ACCESS_POLICY_VENDOR_IE: lim_process_sme_update_access_policy_vendor_ie(pMac, pMsgBuf); break; + case eWNI_SME_SET_SUB20_CH_WIDTH: + lim_process_sme_set_sub20_channelwidth(pMac, pMsgBuf); + break; default: vos_mem_free((v_VOID_t*)pMsg->bodyptr); pMsg->bodyptr = NULL; @@ -6561,13 +6612,14 @@ limProcessSmeChannelChangeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg) /* Store the New Channel Params in psessionEntry */ if (psessionEntry->currentOperChannel != - pChannelChangeReq->targetChannel) - { - limLog(pMac, LOGE, - FL("switch old chnl %d --> new chnl %d and CH width - %d"), - psessionEntry->currentOperChannel, - pChannelChangeReq->targetChannel, - pChannelChangeReq->vht_channel_width); + pChannelChangeReq->targetChannel || + psessionEntry->sub20_channelwidth != + pChannelChangeReq->sub20_channelwidth) { + limLog(pMac, LOGE, + FL("switch old chn %d --> new chn %d CH width - %d"), + psessionEntry->currentOperChannel, + pChannelChangeReq->targetChannel, + pChannelChangeReq->vht_channel_width); #ifdef WLAN_FEATURE_11AC @@ -6628,6 +6680,11 @@ limProcessSmeChannelChangeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg) pChannelChangeReq->targetChannel; psessionEntry->limRFBand = limGetRFBand(psessionEntry->currentOperChannel); + + /* Update sub 20MHz channel width */ + psessionEntry->sub20_channelwidth = + pChannelChangeReq->sub20_channelwidth; + // Initialize 11h Enable Flag if (SIR_BAND_5_GHZ == psessionEntry->limRFBand) { @@ -7370,6 +7427,10 @@ limProcessSmeDfsCsaIeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg) psessionEntry->gLimChannelSwitch.secondarySubBand = pDfsCsaIeRequest->ch_bandwidth; + /* Sub 20MHz channel width changing request */ + psessionEntry->lim_sub20_channel_switch_bandwidth = + pDfsCsaIeRequest->sub20_channelwidth; + /* Validate if SAP is operating HT or VHT * mode and set the Channel Switch Wrapper * element with the Wide Band Switch @@ -7466,10 +7527,15 @@ limProcessSmeDfsCsaIeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg) FL(" Updated CSA IE, IE COUNT = %d"), psessionEntry->gLimChannelSwitch.switchCount ); /* Send ECSA Action frame after updating the beacon */ - send_extended_chan_switch_action_frame(pMac, - psessionEntry->gLimChannelSwitch.primaryChannel, - psessionEntry->gLimChannelSwitch.secondarySubBand, - psessionEntry); + /* Action frame is not required for sub 20 channel width changing */ + if (pDfsCsaIeRequest->sub20_channelwidth == 0) { + send_extended_chan_switch_action_frame + (pMac, + psessionEntry->gLimChannelSwitch.primaryChannel, + psessionEntry->gLimChannelSwitch.secondarySubBand, + psessionEntry); + } + psessionEntry->gLimChannelSwitch.switchCount--; } return; diff --git a/CORE/MAC/src/pe/lim/limPropExtsUtils.c b/CORE/MAC/src/pe/lim/limPropExtsUtils.c index e110155ca8c7..e585e477099d 100644 --- a/CORE/MAC/src/pe/lim/limPropExtsUtils.c +++ b/CORE/MAC/src/pe/lim/limPropExtsUtils.c @@ -234,6 +234,11 @@ limExtractApCapability(tpAniSirGlobal pMac, tANI_U8 *pIE, tANI_U16 ieLen, /* Check if Extended caps are present in probe resp or not */ if (pBeaconStruct->ExtCap.present) psessionEntry->is_ext_caps_present = true; + + if (pBeaconStruct->vendor_sub20_capability != 0) + psessionEntry->sap_sub20_channelwidth = + pBeaconStruct->vendor_sub20_capability; + vos_mem_free(pBeaconStruct); return; } /****** end limExtractApCapability() ******/ diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index ba5d771c44db..001183931cf2 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -1411,6 +1411,10 @@ limSendAssocRspMgmtFrame(tpAniSirGlobal pMac, limSendBeaconParams(pMac, &beaconParams, psessionEntry ); } + if (pSta->sub20_dynamic_channelwidth != 0) + populate_dot11f_sub_20_channel_width_ie( + pMac, &frm.QComVendorIE, psessionEntry); + // Allocate a buffer for this frame: if ( pAssocReq != NULL ) { @@ -2344,6 +2348,10 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, } } + populate_dot11f_sub_20_channel_width_ie(pMac, + &pFrm->QComVendorIE, + psessionEntry); + nStatus = dot11fGetPackedAssocRequestSize(pMac, pFrm, &nPayload); if (DOT11F_FAILED(nStatus)) { diff --git a/CORE/MAC/src/pe/lim/limSendMessages.c b/CORE/MAC/src/pe/lim/limSendMessages.c index ac0928064552..a305664b3cd3 100644 --- a/CORE/MAC/src/pe/lim/limSendMessages.c +++ b/CORE/MAC/src/pe/lim/limSendMessages.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2014, 2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -271,6 +271,14 @@ tSirRetStatus limSendSwitchChnlParams(tpAniSirGlobal pMac, pChnlParams->restart_on_chan_switch = is_restart; + if (pSessionEntry->sub20_channelwidth == SUB20_MODE_5MHZ) + pChnlParams->channelwidth = CH_WIDTH_5MHZ; + else if (pSessionEntry->sub20_channelwidth == SUB20_MODE_10MHZ) + pChnlParams->channelwidth = CH_WIDTH_10MHZ; + + limLog(pMac, LOG1, FL("Set sub20 channel width %d"), + pSessionEntry->sub20_channelwidth); + //we need to defer the message until we get the response back from WDA. SET_LIM_PROCESS_DEFD_MESGS(pMac, false); msgQ.type = WDA_CHNL_SWITCH_REQ; diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c index f96ee78b8082..5af98c11fc9e 100644 --- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c +++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c @@ -3052,6 +3052,9 @@ void limHandleCSAoffloadMsg(tpAniSirGlobal pMac,tpSirMsgQ MsgQ) limLog(pMac, LOG1, FL("secondarySubBand = %d"), psessionEntry->gLimChannelSwitch.secondarySubBand); + psessionEntry->lim_sub20_channel_switch_bandwidth = + csa_params->new_sub20_channelwidth; + limPrepareFor11hChannelSwitch(pMac, psessionEntry); pCsaOffloadInd = vos_mem_malloc(sizeof(tSmeCsaOffloadInd)); if (NULL == pCsaOffloadInd) { diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c index ff4d68f8d7b3..f6372a83c352 100644 --- a/CORE/MAC/src/pe/lim/limSerDesUtils.c +++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c @@ -704,6 +704,9 @@ limStartBssReqSerDes(tpAniSirGlobal pMac, tpSirSmeStartBssReq pStartBssReq, tANI len -= sizeof(pStartBssReq->beacon_tx_rate); pBuf += sizeof(pStartBssReq->beacon_tx_rate); + pStartBssReq->sub20_channelwidth = *pBuf++; + len--; + if (len) { limLog(pMac, LOGW, FL("Extra bytes left in SME_START_BSS_REQ, len=%d"), len); @@ -1361,6 +1364,9 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += lenUsed; len -= lenUsed; + pJoinReq->sub20_channelwidth = *pBuf++; + len--; + return eSIR_SUCCESS; } /*** end limJoinReqSerDes() ***/ diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c index 3c15db754240..f1447c9033d3 100644 --- a/CORE/MAC/src/pe/lim/limUtils.c +++ b/CORE/MAC/src/pe/lim/limUtils.c @@ -2813,6 +2813,9 @@ void limSwitchPrimaryChannel(tpAniSirGlobal pMac, tANI_U8 newChannel,tpPESession pMac->lim.gpchangeChannelCallback = limSwitchChannelCback; pMac->lim.gpchangeChannelData = NULL; + psessionEntry->sub20_channelwidth = + psessionEntry->lim_sub20_channel_switch_bandwidth; + #if defined WLAN_FEATURE_VOWIFI limSendSwitchChnlParams(pMac, newChannel, PHY_SINGLE_CHANNEL_CENTERED, psessionEntry->maxTxPower, @@ -2873,6 +2876,9 @@ void limSwitchPrimarySecondaryChannel(tpAniSirGlobal pMac, tpPESession psessionE pMac->lim.gpchangeChannelCallback = limSwitchChannelCback; pMac->lim.gpchangeChannelData = NULL; + psessionEntry->sub20_channelwidth = + psessionEntry->lim_sub20_channel_switch_bandwidth; + #if defined WLAN_FEATURE_VOWIFI limSendSwitchChnlParams(pMac, newChannel, subband, psessionEntry->maxTxPower, diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c index 9f803aa75523..7f60c9f9a373 100644 --- a/CORE/MAC/src/pe/sch/schBeaconGen.c +++ b/CORE/MAC/src/pe/sch/schBeaconGen.c @@ -362,6 +362,9 @@ tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEn populate_dot11f_avoid_channel_ie(pMac, &pBcn2->QComVendorIE, psessionEntry); #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ + populate_dot11f_sub_20_channel_width_ie( + pMac, &pBcn2->QComVendorIE, psessionEntry); + if (psessionEntry->dot11mode != WNI_CFG_DOT11_MODE_11B) PopulateDot11fERPInfo( pMac, &pBcn2->ERPInfo, psessionEntry ); @@ -652,7 +655,6 @@ void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac, sizeof(beacon2->SuppOperatingClasses)); } -#ifdef FEATURE_AP_MCC_CH_AVOIDANCE if(beacon2->QComVendorIE.present) { SetProbeRspIeBitmap(DefProbeRspIeBitmap, SIR_MAC_QCOM_VENDOR_EID); @@ -660,7 +662,6 @@ void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac, (void *)&beacon2->QComVendorIE, sizeof(beacon2->QComVendorIE)); } -#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ /* ERP information */ if(beacon2->ERPInfo.present) diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h index 324173dd313d..048f8b660b77 100644 --- a/CORE/SAP/inc/sapApi.h +++ b/CORE/SAP/inc/sapApi.h @@ -572,6 +572,7 @@ typedef struct sap_Config { tSirMacRateSet supported_rates; tSirMacRateSet extended_rates; eCsrBand target_band; + uint16_t sub20_channelwidth; } tsap_Config_t; #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE @@ -682,6 +683,7 @@ typedef struct sSapDfsInfo */ v_U8_t disable_dfs_ch_switch; uint16_t tx_leakage_threshold; + uint8_t new_sub20_channelwidth; } tSapDfsInfo; typedef struct tagSapCtxList @@ -2428,6 +2430,18 @@ VOS_STATUS wlansap_get_chan_width(void *pvosctx, VOS_STATUS wlansap_set_invalid_session(v_PVOID_t pctx); +#ifdef FEATURE_WLAN_SUB_20_MHZ +VOS_STATUS +WLANSAP_set_sub20_channelwidth_with_csa( + void *vos_ctx_ptr, uint32_t chan_width); +#else +static inline VOS_STATUS +WLANSAP_set_sub20_channelwidth_with_csa( + void *vos_ctx_ptr, uint32_t chan_width) +{ + return VOS_STATUS_SUCCESS; +} +#endif #ifdef __cplusplus } #endif diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c index 9e4fcac14c25..c5432583afd0 100644 --- a/CORE/SAP/src/sapFsm.c +++ b/CORE/SAP/src/sapFsm.c @@ -3384,7 +3384,8 @@ sapSignalHDDevent pChanInfo->reg_info_2 = pCsrRoamInfo->chan_info.reg_info_2; pChanInfo->nss = pCsrRoamInfo->chan_info.nss; pChanInfo->rate_flags = pCsrRoamInfo->chan_info.rate_flags; - + pChanInfo->sub20_channelwidth = + pCsrRoamInfo->chan_info.sub20_channelwidth; sapApAppEvent.sapevt.sapStationAssocReassocCompleteEvent.wmmEnabled = pCsrRoamInfo->wmmEnabledSta; sapApAppEvent.sapevt.sapStationAssocReassocCompleteEvent.status = (eSapStatus )context; sapApAppEvent.sapevt.sapStationAssocReassocCompleteEvent.timingMeasCap = pCsrRoamInfo->timingMeasCap; diff --git a/CORE/SAP/src/sapInternal.h b/CORE/SAP/src/sapInternal.h index c5bc6cf86ab1..daa3d21881b0 100644 --- a/CORE/SAP/src/sapInternal.h +++ b/CORE/SAP/src/sapInternal.h @@ -303,6 +303,7 @@ typedef struct sSapContext { tSirMacRateSet extended_rate_set; vos_event_t sap_session_opened_evt; eCsrBand target_band; + uint8_t sub20_channelwidth; } *ptSapContext; diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c index c976cbafdc81..d5338bf7c32e 100644 --- a/CORE/SAP/src/sapModule.c +++ b/CORE/SAP/src/sapModule.c @@ -1751,6 +1751,118 @@ WLANSAP_SetChannelChangeWithCsa(v_PVOID_t pvosGCtx, v_U32_t targetChannel) return VOS_STATUS_SUCCESS; } +#ifdef FEATURE_WLAN_SUB_20_MHZ +/** + * WLANSAP_set_sub20_channelwidth_with_csa() - + * This api function does a channel width change + * @vos_ctx_ptr: Pointer to vos global context structure + * @chan_width: New channel width to change to + * + * Return: The VOS_STATUS code associated with performing + * the operation + */ +VOS_STATUS +WLANSAP_set_sub20_channelwidth_with_csa(void *vos_ctx_ptr, uint32_t chan_width) +{ + ptSapContext sap_context_ptr = NULL; + tWLAN_SAPEvent sap_event; + tpAniSirGlobal mac_ptr = NULL; + void *hal_ptr = NULL; + + sap_context_ptr = VOS_GET_SAP_CB(vos_ctx_ptr); + if (NULL == sap_context_ptr) { + VOS_TRACE(VOS_MODULE_ID_SAP, + VOS_TRACE_LEVEL_ERROR, + "%s: Invalid SAP pointer from pvosGCtx", __func__); + + return VOS_STATUS_E_FAULT; + } + hal_ptr = VOS_GET_HAL_CB(sap_context_ptr->pvosGCtx); + if (NULL == hal_ptr) { + VOS_TRACE(VOS_MODULE_ID_SAP, + VOS_TRACE_LEVEL_ERROR, + "%s: Invalid HAL pointer from pvosGCtx", __func__); + return VOS_STATUS_E_FAULT; + } + mac_ptr = PMAC_STRUCT(hal_ptr); + + /* + * Now, validate if the passed channel is valid in the + * current regulatory domain. + */ + if (sap_context_ptr->sub20_channelwidth != chan_width && + ((vos_nv_getChannelEnabledState(sap_context_ptr->channel) == + NV_CHANNEL_ENABLE) || + (vos_nv_getChannelEnabledState(sap_context_ptr->channel) == + NV_CHANNEL_DFS && + !vos_concurrent_open_sessions_running()))) { + /* + * Post a CSA IE request to SAP state machine with + * target channel information and also CSA IE required + * flag set in sapContext only, if SAP is in eSAP_STARTED + * state. + */ + if (eSAP_STARTED == sap_context_ptr->sapsMachine) { + mac_ptr->sap.SapDfsInfo.target_channel = + sap_context_ptr->channel; + mac_ptr->sap.SapDfsInfo.new_chanWidth = + sap_context_ptr->ch_width_orig; + mac_ptr->sap.SapDfsInfo.new_sub20_channelwidth = + chan_width; + mac_ptr->sap.SapDfsInfo.csaIERequired = + VOS_TRUE; + + /* + * Set the radar found status to allow the channel + * change to happen same as in the case of a radar + * detection. Since, this will allow SAP to be in + * correct state and also resume the netif queues + * that were suspended in HDD before the channel + * request was issued. + */ + mac_ptr->sap.SapDfsInfo.sap_radar_found_status = + VOS_TRUE; + mac_ptr->sap.SapDfsInfo.cac_state = eSAP_DFS_SKIP_CAC; + sap_CacResetNotify(hal_ptr); + + /* + * Post the eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START + * to SAP state machine to process the channel + * request with CSA IE set in the beacons. + */ + sap_event.event = + eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START; + sap_event.params = 0; + sap_event.u1 = 0; + sap_event.u2 = 0; + + sapFsm(sap_context_ptr, &sap_event); + + } else { + VOS_TRACE(VOS_MODULE_ID_SAP, + VOS_TRACE_LEVEL_ERROR, + "%s: SAP is not in eSAP_STARTED state", + __func__); + return VOS_STATUS_E_FAULT; + } + + } else { + VOS_TRACE(VOS_MODULE_ID_SAP, + VOS_TRACE_LEVEL_ERROR, + "%s: ChannelWidth = %d is not valid", + __func__, chan_width); + + return VOS_STATUS_E_FAULT; + } + + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, + "%s: Posted CSA start evt for ChannelWidth = %d", + __func__, chan_width); + + return VOS_STATUS_SUCCESS; +} +#endif + /*========================================================================== FUNCTION WLANSAP_SetCounterMeasure @@ -2778,6 +2890,12 @@ WLANSAP_ChannelChangeRequest(v_PVOID_t pSapCtx, uint8_t target_channel) pMac->sap.SapDfsInfo.new_chanWidth); sapContext->csrRoamProfile.vht_channel_width = vhtChannelWidth; sapContext->vht_channel_width = vhtChannelWidth; + + sapContext->sub20_channelwidth = + pMac->sap.SapDfsInfo.new_sub20_channelwidth; + sapContext->csrRoamProfile.sub20_channelwidth = + pMac->sap.SapDfsInfo.new_sub20_channelwidth; + /* Update the channel as this will be used to * send event to supplicant */ diff --git a/CORE/SERVICES/COMMON/wlan_defs.h b/CORE/SERVICES/COMMON/wlan_defs.h index 6a24728fa230..3c058061d7a5 100644 --- a/CORE/SERVICES/COMMON/wlan_defs.h +++ b/CORE/SERVICES/COMMON/wlan_defs.h @@ -143,6 +143,10 @@ typedef enum { WLAN_11AG_CAPABILITY = 3, }WLAN_CAPABILITY; +#define SUB20_MODE_NONE (0x00) +#define SUB20_MODE_5MHZ (0x01) +#define SUB20_MODE_10MHZ (0x02) + #if defined(CONFIG_AR900B_SUPPORT) || defined(AR900B) #define A_RATEMASK A_UINT64 #else diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index f661cf14c132..916ea2a30e93 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -3492,6 +3492,15 @@ typedef struct { #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \ (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK) +#define WMI_CSA_EVENT_QSBW_ISE_EXTRACT_ID(qsbw_ise) \ + ((qsbw_ise) & WMI_CSA_EVENT_QSBW_ISE_ID_MASK) +#define WMI_CSA_EVENT_QSBW_ISE_EXTRACT_LEN(qsbw_ise) \ + (((qsbw_ise) & WMI_CSA_EVENT_QSBW_ISE_LEN_MASK) >> 8) +#define WMI_CSA_EVENT_QSBW_ISE_EXTRACT_CAP(qsbw_ise) \ + (((qsbw_ise) & WMI_CSA_EVENT_QSBW_ISE_CAP_MASK) >> 16) +#define WMI_CSA_EVENT_QSBW_ISE_EXTRACT_NOTIF(qsbw_ise) \ + (((qsbw_ise) & WMI_CSA_EVENT_QSBW_ISE_NOTIF_MASK) >> 24) + typedef enum { WMI_CSA_IE_PRESENT = 0x00000001, WMI_XCSA_IE_PRESENT = 0x00000002, diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index e24b0e6d8d07..78c1e124dcbc 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -6232,6 +6232,7 @@ static int wma_csa_offload_handler(void *handle, u_int8_t *event, u_int32_t len) u_int8_t bssid[IEEE80211_ADDR_LEN]; u_int8_t vdev_id = 0; u_int8_t cur_chan = 0; + uint8_t cur_sb20_channelwidth = 0; struct ieee80211_channelswitch_ie *csa_ie; tpCSAOffloadParams csa_offload_event; struct ieee80211_extendedchannelswitch_ie *xcsa_ie; @@ -6284,6 +6285,29 @@ static int wma_csa_offload_handler(void *handle, u_int8_t *event, u_int32_t len) csa_offload_event->new_ch_freq_seg2 = wb_ie->new_ch_freq_seg2; } + if (csa_event->ies_present_flag & WMI_QSBW_ISE_PRESENT) { + struct vendor_ie_sub20_channelwidth sub20width_ie; + + sub20width_ie.elem_id = + WMI_CSA_EVENT_QSBW_ISE_EXTRACT_ID( + csa_event->qsbw_ise); + sub20width_ie.elem_len = + WMI_CSA_EVENT_QSBW_ISE_EXTRACT_LEN( + csa_event->qsbw_ise); + sub20width_ie.sub20_capability = + WMI_CSA_EVENT_QSBW_ISE_EXTRACT_CAP( + csa_event->qsbw_ise); + sub20width_ie.new_sub20_channelwidth = + WMI_CSA_EVENT_QSBW_ISE_EXTRACT_NOTIF( + csa_event->qsbw_ise); + + WMA_LOGE("CSA event with sbw_ie capability: %d chwidth:%d", + sub20width_ie.sub20_capability, + sub20width_ie.new_sub20_channelwidth); + csa_offload_event->new_sub20_channelwidth = + sub20width_ie.new_sub20_channelwidth; + } + csa_offload_event->ies_present_flag = csa_event->ies_present_flag; WMA_LOGD("CSA: New Channel = %d BSSID:%pM", @@ -6291,12 +6315,17 @@ static int wma_csa_offload_handler(void *handle, u_int8_t *event, u_int32_t len) csa_offload_event->bssId); cur_chan = vos_freq_to_chan(intr[vdev_id].mhz); + + cur_sb20_channelwidth = + vos_phy_channel_width_to_sub20(intr[vdev_id].channelwidth); /* * basic sanity check: requested channel should not be 0 * and equal to home channel */ if( (0 == csa_offload_event->channel) || - (cur_chan == csa_offload_event->channel) ) { + (cur_chan == csa_offload_event->channel && + cur_sb20_channelwidth == + csa_offload_event->new_sub20_channelwidth)) { WMA_LOGE("CSA Event with channel %d. Ignore !!", csa_offload_event->channel); vos_mem_free(csa_offload_event); @@ -13150,6 +13179,7 @@ VOS_STATUS wma_switch_channel(tp_wma_handle wma, struct wma_vdev_start_req *req) intr[req->vdev_id].config.gtx_info.gtxBWMask = CFG_TGT_DEFAULT_GTX_BW_MASK; intr[req->vdev_id].mhz = cmd->mhz; + intr[req->vdev_id].channelwidth = req->channelwidth; WMI_SET_CHANNEL_MODE(cmd, chanmode); cmd->band_center_freq1 = cmd->mhz; @@ -13173,6 +13203,9 @@ VOS_STATUS wma_switch_channel(tp_wma_handle wma, struct wma_vdev_start_req *req) else if (req->is_quarter_rate) WMI_SET_CHANNEL_FLAG(cmd, WMI_CHAN_FLAG_QUARTER_RATE); + WMA_LOGE("switch chan width: quarterrate_flag: %d, halfrate_flag: %d", + req->is_quarter_rate, req->is_half_rate); + /* Find out min, max and regulatory power levels */ WMI_SET_CHANNEL_REG_POWER(cmd, req->max_txpow); WMI_SET_CHANNEL_MAX_TX_POWER(cmd, req->max_txpow); @@ -13305,6 +13338,7 @@ VOS_STATUS wma_vdev_start(tp_wma_handle wma, intr[cmd->vdev_id].config.gtx_info.gtxTPCMin = CFG_TGT_DEFAULT_GTX_TPC_MIN; intr[cmd->vdev_id].config.gtx_info.gtxBWMask = CFG_TGT_DEFAULT_GTX_BW_MASK; intr[cmd->vdev_id].mhz = chan->mhz; + intr[req->vdev_id].channelwidth = req->channelwidth; WMI_SET_CHANNEL_MODE(chan, chanmode); chan->band_center_freq1 = chan->mhz; @@ -13329,6 +13363,9 @@ VOS_STATUS wma_vdev_start(tp_wma_handle wma, WMI_SET_CHANNEL_FLAG(chan, WMI_CHAN_FLAG_QUARTER_RATE); } + WMA_LOGE("BSS chan width: quarterrate_flag: %d, halfrate_flag: %d", + req->is_quarter_rate, req->is_half_rate); + /* * If the channel has DFS set, flip on radar reporting. * @@ -14052,6 +14089,13 @@ static void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params) goto send_resp; } req.chan = params->channelNumber; + req.channelwidth = params->channelwidth; + + if (params->channelwidth == CH_WIDTH_10MHZ) + req.is_half_rate = 1; + else if (params->channelwidth == CH_WIDTH_5MHZ) + req.is_quarter_rate = 1; + req.chan_offset = params->secondaryChannelOffset; req.vht_capable = params->vhtCapable; req.dot11_mode = params->dot11_mode; @@ -16552,6 +16596,13 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss) vos_mem_zero(&req, sizeof(req)); req.vdev_id = vdev_id; req.chan = add_bss->currentOperChannel; + req.channelwidth = add_bss->channelwidth; + + if (add_bss->channelwidth == CH_WIDTH_5MHZ) + req.is_quarter_rate = 1; + else if (add_bss->channelwidth == CH_WIDTH_10MHZ) + req.is_half_rate = 1; + req.chan_offset = add_bss->currentExtChannel; req.vht_capable = add_bss->vhtCapable; #if defined WLAN_FEATURE_VOWIFI @@ -16975,6 +17026,13 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) req.vdev_id = vdev_id; req.chan = add_bss->currentOperChannel; req.chan_offset = add_bss->currentExtChannel; + req.channelwidth = add_bss->channelwidth; + + if (add_bss->channelwidth == CH_WIDTH_5MHZ) + req.is_quarter_rate = 1; + else if (add_bss->channelwidth == CH_WIDTH_10MHZ) + req.is_half_rate = 1; + #if defined WLAN_FEATURE_VOWIFI req.max_txpow = add_bss->maxTxPower; #else @@ -34822,6 +34880,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle) hdd_tgt_cfg.reg_domain = wma_handle->reg_cap.eeprom_rd; hdd_tgt_cfg.eeprom_rd_ext = wma_handle->reg_cap.eeprom_rd_ext; + hdd_tgt_cfg.sub_20_support = wma_handle->sub_20_support; switch (wma_handle->phy_capability) { case WMI_11G_CAPABILITY: @@ -35269,6 +35328,11 @@ v_VOID_t wma_rx_ready_event(WMA_HANDLE handle, void *cmd_param_info) WMA_LOGA("WMA <-- WMI_READY_EVENTID"); ev = param_buf->fixed_param; + + wma_handle->sub_20_support = + WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap, + WMI_SERVICE_HALF_RATE_QUARTER_RATE_SUPPORT); + /* Indicate to the waiting thread that the ready * event was received */ wma_handle->wmi_ready = TRUE; diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index ca75efb2d2de..ca5be1dc00c7 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -643,6 +643,7 @@ struct wma_txrx_node { uint8_t wep_default_key_idx; bool is_vdev_valid; + uint16_t channelwidth; }; @@ -934,6 +935,7 @@ typedef struct wma_handle { vos_timer_t wma_fw_time_sync_timer; struct sir_allowed_action_frames allowed_action_frames; tSirAddonPsReq psSetting; + bool sub_20_support; }t_wma_handle, *tp_wma_handle; struct wma_target_cap { @@ -1369,6 +1371,7 @@ struct wma_vdev_start_req { bool is_half_rate; bool is_quarter_rate; u_int16_t beacon_tx_rate; + uint16_t channelwidth; }; struct wma_set_key_params { diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index a1606fea065c..f1b99b69f1fb 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -1028,6 +1028,7 @@ typedef struct tagCsrRoamProfile uint16_t beacon_tx_rate; tSirMacRateSet supported_rates; tSirMacRateSet extended_rates; + uint8_t sub20_channelwidth; }tCsrRoamProfile; diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index a6bba573bac5..f6b147146380 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -127,6 +127,9 @@ typedef struct _smeConfigParams uint32_t fine_time_meas_cap; int8_t first_scan_bucket_threshold; bool snr_monitor_enabled; + uint8_t sub20_config_info; + uint8_t sub20_channelwidth; + uint8_t sub20_dynamic_channelwidth; } tSmeConfigParams, *tpSmeConfigParams; typedef enum @@ -4719,4 +4722,17 @@ void sme_set_chan_info_callback(tHalHandle hal_handle, void sme_set_5g_band_pref(tHalHandle hal_handle, struct sme_5g_band_pref_params *pref_params); +#ifdef FEATURE_WLAN_SUB_20_MHZ +eHalStatus sme_update_sub20_channel_width(tHalHandle hal_handle, + uint8_t session_id, + uint8_t chan_width); +#else +static inline +eHalStatus sme_update_sub20_channel_width(tHalHandle hal_handle, + uint8_t session_id, + uint8_t chan_width) +{ + return eHAL_STATUS_SUCCESS; +} +#endif #endif //#if !defined( __SME_API_H ) diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 8279eb9eae68..b3cb6e76cf20 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -574,6 +574,12 @@ eHalStatus csrUpdateChannelList(tpAniSirGlobal pMac) pChanList->chanParam[num_channel].dfsSet = VOS_FALSE; else pChanList->chanParam[num_channel].dfsSet = VOS_TRUE; + + if (pMac->sub20_channelwidth == SUB20_MODE_5MHZ) + pChanList->chanParam[num_channel].quarter_rate = VOS_TRUE; + else if (pMac->sub20_channelwidth == SUB20_MODE_10MHZ) + pChanList->chanParam[num_channel].half_rate = VOS_TRUE; + num_channel++; } } @@ -592,6 +598,14 @@ eHalStatus csrUpdateChannelList(tpAniSirGlobal pMac) csrFindChannelPwr(pScan->defaultPowerTable, social_channel[j]); pChanList->chanParam[num_channel].dfsSet = VOS_FALSE; + + if (pMac->sub20_channelwidth == SUB20_MODE_5MHZ) + pChanList->chanParam[num_channel].quarter_rate = + VOS_TRUE; + else if (pMac->sub20_channelwidth == SUB20_MODE_10MHZ) + pChanList->chanParam[num_channel].half_rate = + VOS_TRUE; + num_channel++; } } @@ -13684,9 +13698,10 @@ static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsr //pBuf is caller allocated memory point to &(tSirSmeJoinReq->rsnIE.rsnIEdata[ 0 ]) + pMsg->rsnIE.length; //or &(tSirSmeReassocReq->rsnIE.rsnIEdata[ 0 ]) + pMsg->rsnIE.length; -static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac, - tSirBssDescription *pBssDescription, - tANI_U8 *pBuf, tANI_U8 uapsdMask) +static uint16_t +csrPrepareJoinReassocReqBuffer(tpAniSirGlobal pMac, + tSirBssDescription *pBssDescription, + tANI_U8 *pBuf, tANI_U8 uapsdMask) { tCsrChannelSet channelGroup; tSirMacCapabilityInfo *pAP_capabilityInfo; @@ -13695,6 +13710,8 @@ static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac, tANI_U32 size = 0; tANI_S8 pwrLimit = 0; tANI_U16 i; + uint8_t *tmp_ptr = pBuf; + uint16_t used_length = 0; // 802.11h //We can do this because it is in HOST CPU order for now. pAP_capabilityInfo = (tSirMacCapabilityInfo *)&pBssDescription->capabilityInfo; @@ -13753,6 +13770,8 @@ static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac, vos_mem_copy(pBuf, pBssDescription, pBssDescription->length + sizeof( pBssDescription->length )); pBuf += pBssDescription->length + sizeof( pBssDescription->length ); // update to new location + used_length = pBuf - tmp_ptr; + return used_length; } /* @@ -13784,6 +13803,7 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe tANI_U8 txBFCsnValue = 0; tpCsrNeighborRoamControlInfo neigh_roam_info; eHalStatus packetdump_timer_status; + uint16_t used_length = 0; if(!pSession) { @@ -14463,8 +14483,13 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe pBuf += sizeof(struct rrm_config_param); //BssDesc - csrPrepareJoinReassocReqBuffer( pMac, pBssDescription, pBuf, - (tANI_U8)pProfile->uapsd_mask); + used_length = + csrPrepareJoinReassocReqBuffer(pMac, pBssDescription, pBuf, + (tANI_U8)pProfile->uapsd_mask); + + pBuf += used_length; + if (eWNI_SME_JOIN_REQ == messageType) + *pBuf++ = pMac->sub20_channelwidth; /* * conc_custom_rule1: @@ -15437,6 +15462,8 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs sizeof(pParam->beacon_tx_rate)); pBuf += sizeof(pParam->beacon_tx_rate); + *pBuf++ = pMac->sub20_channelwidth; + msgLen = (tANI_U16)(sizeof(tANI_U32 ) + (pBuf - wTmpBuf)); //msg_header + msg pMsg->length = pal_cpu_to_be16(msgLen); @@ -19435,6 +19462,7 @@ csrRoamChannelChangeReq(tpAniSirGlobal pMac, tCsrBssid bssid, pMsg->vht_channel_width = pprofile->vht_channel_width; pMsg->dot11mode = csrTranslateToWNICfgDot11Mode(pMac,pMac->roam.configParam.uCfgDot11Mode); + pMsg->sub20_channelwidth = pprofile->sub20_channelwidth; if (IS_24G_CH(pMsg->targetChannel) && (false == pMac->roam.configParam.enableVhtFor24GHz) && @@ -19688,6 +19716,7 @@ csrRoamSendChanSwIERequest(tpAniSirGlobal pMac, tCsrBssid bssid, pMsg->csaIeRequired = csaIeReqd; vos_mem_copy(pMsg->bssid, bssid, VOS_MAC_ADDR_SIZE); pMsg->ch_bandwidth = ch_bandwidth; + pMsg->sub20_channelwidth = pMac->sap.SapDfsInfo.new_sub20_channelwidth; status = palSendMBMessage(pMac->hHdd, pMsg); diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 0380a64ab8a8..58ee3f1d7cb3 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -1868,6 +1868,10 @@ eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) pMac->fine_time_meas_cap = pSmeConfigParams->fine_time_meas_cap; pMac->snr_monitor_enabled = pSmeConfigParams->snr_monitor_enabled; + pMac->sub20_config_info = pSmeConfigParams->sub20_config_info; + pMac->sub20_channelwidth = pSmeConfigParams->sub20_channelwidth; + pMac->sub20_dynamic_channelwidth = + pSmeConfigParams->sub20_dynamic_channelwidth; return status; } @@ -5035,8 +5039,9 @@ eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam) pMac->roam.configParam.sta_roam_policy.dfs_mode; pParam->csrConfig.sta_roam_policy_params.skip_unsafe_channels = pMac->roam.configParam.sta_roam_policy.skip_unsafe_channels; - - + pParam->sub20_config_info = pMac->sub20_config_info; + pParam->sub20_channelwidth = pMac->sub20_channelwidth; + pParam->sub20_dynamic_channelwidth = pMac->sub20_dynamic_channelwidth; sme_ReleaseGlobalLock( &pMac->sme ); } @@ -19878,3 +19883,54 @@ void sme_set_5g_band_pref(tHalHandle hal_handle, "Unable to acquire global sme lock"); } + +#ifdef FEATURE_WLAN_SUB_20_MHZ +/** + * sme_update_sub20_channel_width() - update sub 20 channel width + * @hal_handle: hal handle for getting global mac struct + * @session_id: Session ID on which sub20 channel width needs to be updated + * to FW + * @chan_width: channel width + * + * Return: eHAL_STATUS_SUCCESS or non-zero on failure. + */ +eHalStatus sme_update_sub20_channel_width(tHalHandle hal_handle, + uint8_t session_id, + uint8_t chan_width) +{ + tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle); + eHalStatus status; + struct sme_sub20_chan_width *msg; + uint16_t msg_len; + + if (mac_ctx == NULL) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL, + "%s: mac_ctx is null", __func__); + VOS_ASSERT(0); + return eHAL_STATUS_FAILURE; + } + + if (mac_ctx->sub20_dynamic_channelwidth == 0) + return eHAL_STATUS_SUCCESS; + + msg = vos_mem_malloc(sizeof(*msg)); + if (NULL == msg) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, + "%s: mem alloc failed for pSub20ChannelWidth", + __func__); + return eHAL_STATUS_FAILURE; + } + + msg_len = sizeof(*msg); + msg->message_type = pal_cpu_to_be16(eWNI_SME_SET_SUB20_CH_WIDTH); + msg->length = pal_cpu_to_be16(msg_len); + msg->session_id = session_id; + msg->channelwidth = chan_width; + + status = palSendMBMessage(mac_ctx->hHdd, msg); + if (eHAL_STATUS_SUCCESS != status) + smsLog(mac_ctx, LOGE, FL( + "eWNI_SME_SET_SUB20_CH_WIDTH: msg to PE failed")); + return status; +} +#endif diff --git a/CORE/SYS/legacy/src/utils/src/dot11f.c b/CORE/SYS/legacy/src/utils/src/dot11f.c index 42211f1bc93a..1ddfa4a7c339 100644 --- a/CORE/SYS/legacy/src/utils/src/dot11f.c +++ b/CORE/SYS/legacy/src/utils/src/dot11f.c @@ -35,7 +35,7 @@ * * * This file was automatically generated by 'framesc' - * Wed Aug 31 14:43:25 2016 from the following file(s): + * Mon Sep 5 10:41:23 2016 from the following file(s): * * dot11f.frms * @@ -1628,6 +1628,20 @@ tANI_U32 dot11fUnpackIeIGTK(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, t #define SigIeIGTK ( 0x0003 ) +tANI_U32 dot11fUnpackIeMccChanInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEMccChanInfo *pDst) +{ + tANI_U32 status = DOT11F_PARSE_SUCCESS; + (void) pBuf; (void)ielen; /* Shutup the compiler */ + if (pDst->present) status = DOT11F_DUPLICATE_IE; + pDst->present = 1; + pDst->channel = *pBuf; + (void)pCtx; + return status; +} /* End dot11fUnpackIeMccChanInfo. */ + +#define SigIeMccChanInfo ( 0x0004 ) + + tANI_U32 dot11fUnpackIeR0KH_ID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIER0KH_ID *pDst) { tANI_U32 status = DOT11F_PARSE_SUCCESS; @@ -1645,7 +1659,7 @@ tANI_U32 dot11fUnpackIeR0KH_ID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeR0KH_ID. */ -#define SigIeR0KH_ID ( 0x0004 ) +#define SigIeR0KH_ID ( 0x0005 ) tANI_U32 dot11fUnpackIeR1KH_ID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIER1KH_ID *pDst) @@ -1659,7 +1673,24 @@ tANI_U32 dot11fUnpackIeR1KH_ID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeR1KH_ID. */ -#define SigIeR1KH_ID ( 0x0005 ) +#define SigIeR1KH_ID ( 0x0006 ) + + +tANI_U32 dot11fUnpackIeSub20Info(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESub20Info *pDst) +{ + tANI_U32 status = DOT11F_PARSE_SUCCESS; + (void) pBuf; (void)ielen; /* Shutup the compiler */ + if (pDst->present) status = DOT11F_DUPLICATE_IE; + pDst->present = 1; + pDst->capability = *pBuf; + pBuf += 1; + ielen -= (tANI_U8)1; + pDst->csa_chanwidth = *pBuf; + (void)pCtx; + return status; +} /* End dot11fUnpackIeSub20Info. */ + +#define SigIeSub20Info ( 0x0007 ) tANI_U32 dot11fUnpackIeTSFInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETSFInfo *pDst) @@ -1676,7 +1707,7 @@ tANI_U32 dot11fUnpackIeTSFInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeTSFInfo. */ -#define SigIeTSFInfo ( 0x0006 ) +#define SigIeTSFInfo ( 0x0008 ) tANI_U32 dot11fUnpackIeAPChannelReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEAPChannelReport *pDst) @@ -1699,7 +1730,7 @@ tANI_U32 dot11fUnpackIeAPChannelReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_ return status; } /* End dot11fUnpackIeAPChannelReport. */ -#define SigIeAPChannelReport ( 0x0007 ) +#define SigIeAPChannelReport ( 0x0009 ) tANI_U32 dot11fUnpackIeBcnReportingDetail(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEBcnReportingDetail *pDst) @@ -1713,7 +1744,7 @@ tANI_U32 dot11fUnpackIeBcnReportingDetail(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tA return status; } /* End dot11fUnpackIeBcnReportingDetail. */ -#define SigIeBcnReportingDetail ( 0x0008 ) +#define SigIeBcnReportingDetail ( 0x000a ) tANI_U32 dot11fUnpackIeBeaconReportFrmBody(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEBeaconReportFrmBody *pDst) @@ -1733,7 +1764,7 @@ tANI_U32 dot11fUnpackIeBeaconReportFrmBody(tpAniSirGlobal pCtx, tANI_U8 *pBuf, t return status; } /* End dot11fUnpackIeBeaconReportFrmBody. */ -#define SigIeBeaconReportFrmBody ( 0x0009 ) +#define SigIeBeaconReportFrmBody ( 0x000b ) tANI_U32 dot11fUnpackIeBeaconReporting(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEBeaconReporting *pDst) @@ -1750,7 +1781,7 @@ tANI_U32 dot11fUnpackIeBeaconReporting(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_ return status; } /* End dot11fUnpackIeBeaconReporting. */ -#define SigIeBeaconReporting ( 0x000a ) +#define SigIeBeaconReporting ( 0x000c ) tANI_U32 dot11fUnpackIeMeasurementPilot(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEMeasurementPilot *pDst) @@ -1768,7 +1799,7 @@ tANI_U32 dot11fUnpackIeMeasurementPilot(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI return status; } /* End dot11fUnpackIeMeasurementPilot. */ -#define SigIeMeasurementPilot ( 0x000b ) +#define SigIeMeasurementPilot ( 0x000d ) tANI_U32 dot11fUnpackIeMultiBssid(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEMultiBssid *pDst) @@ -1786,7 +1817,7 @@ tANI_U32 dot11fUnpackIeMultiBssid(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIeMultiBssid. */ -#define SigIeMultiBssid ( 0x000c ) +#define SigIeMultiBssid ( 0x000e ) tANI_U32 dot11fUnpackIeRICData(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERICData *pDst) @@ -1806,7 +1837,7 @@ tANI_U32 dot11fUnpackIeRICData(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeRICData. */ -#define SigIeRICData ( 0x000d ) +#define SigIeRICData ( 0x000f ) tANI_U32 dot11fUnpackIeRICDescriptor(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERICDescriptor *pDst) @@ -1824,7 +1855,7 @@ tANI_U32 dot11fUnpackIeRICDescriptor(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeRICDescriptor. */ -#define SigIeRICDescriptor ( 0x000e ) +#define SigIeRICDescriptor ( 0x0010 ) tANI_U32 dot11fUnpackIeRRMEnabledCap(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERRMEnabledCap *pDst) @@ -1886,7 +1917,7 @@ tANI_U32 dot11fUnpackIeRRMEnabledCap(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeRRMEnabledCap. */ -#define SigIeRRMEnabledCap ( 0x000f ) +#define SigIeRRMEnabledCap ( 0x0011 ) tANI_U32 dot11fUnpackIeRequestedInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERequestedInfo *pDst) @@ -1901,7 +1932,7 @@ tANI_U32 dot11fUnpackIeRequestedInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeRequestedInfo. */ -#define SigIeRequestedInfo ( 0x0010 ) +#define SigIeRequestedInfo ( 0x0012 ) tANI_U32 dot11fUnpackIeSSID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESSID *pDst) @@ -1925,7 +1956,7 @@ tANI_U32 dot11fUnpackIeSSID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, t return status; } /* End dot11fUnpackIeSSID. */ -#define SigIeSSID ( 0x0011 ) +#define SigIeSSID ( 0x0013 ) tANI_U32 dot11fUnpackIeSchedule(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESchedule *pDst) @@ -1956,7 +1987,7 @@ tANI_U32 dot11fUnpackIeSchedule(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iele return status; } /* End dot11fUnpackIeSchedule. */ -#define SigIeSchedule ( 0x0012 ) +#define SigIeSchedule ( 0x0014 ) tANI_U32 dot11fUnpackIeTCLAS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETCLAS *pDst) @@ -2045,10 +2076,10 @@ tANI_U32 dot11fUnpackIeTCLAS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeTCLAS. */ -#define SigIeTCLAS ( 0x0013 ) +#define SigIeTCLAS ( 0x0015 ) -#define SigIeTCLASSPROC ( 0x0014 ) +#define SigIeTCLASSPROC ( 0x0016 ) tANI_U32 dot11fUnpackIeTSDelay(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETSDelay *pDst) @@ -2062,7 +2093,7 @@ tANI_U32 dot11fUnpackIeTSDelay(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeTSDelay. */ -#define SigIeTSDelay ( 0x0015 ) +#define SigIeTSDelay ( 0x0017 ) tANI_U32 dot11fUnpackIeTSPEC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETSPEC *pDst) @@ -2139,7 +2170,7 @@ tANI_U32 dot11fUnpackIeTSPEC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeTSPEC. */ -#define SigIeTSPEC ( 0x0016 ) +#define SigIeTSPEC ( 0x0018 ) tANI_U32 dot11fUnpackIeVHTCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTCaps *pDst) @@ -2192,7 +2223,7 @@ tANI_U32 dot11fUnpackIeVHTCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeVHTCaps. */ -#define SigIeVHTCaps ( 0x0017 ) +#define SigIeVHTCaps ( 0x0019 ) tANI_U32 dot11fUnpackIeVHTOperation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTOperation *pDst) @@ -2215,7 +2246,7 @@ tANI_U32 dot11fUnpackIeVHTOperation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeVHTOperation. */ -#define SigIeVHTOperation ( 0x0018 ) +#define SigIeVHTOperation ( 0x001a ) tANI_U32 dot11fUnpackIeWMMSchedule(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMSchedule *pDst) @@ -2254,7 +2285,7 @@ tANI_U32 dot11fUnpackIeWMMSchedule(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeWMMSchedule. */ -#define SigIeWMMSchedule ( 0x0019 ) +#define SigIeWMMSchedule ( 0x001b ) tANI_U32 dot11fUnpackIeWMMTCLAS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMTCLAS *pDst) @@ -2351,7 +2382,7 @@ tANI_U32 dot11fUnpackIeWMMTCLAS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iele return status; } /* End dot11fUnpackIeWMMTCLAS. */ -#define SigIeWMMTCLAS ( 0x001a ) +#define SigIeWMMTCLAS ( 0x001c ) tANI_U32 dot11fUnpackIeWMMTCLASPROC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMTCLASPROC *pDst) @@ -2373,7 +2404,7 @@ tANI_U32 dot11fUnpackIeWMMTCLASPROC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeWMMTCLASPROC. */ -#define SigIeWMMTCLASPROC ( 0x001b ) +#define SigIeWMMTCLASPROC ( 0x001d ) tANI_U32 dot11fUnpackIeWMMTSDelay(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMTSDelay *pDst) @@ -2395,7 +2426,7 @@ tANI_U32 dot11fUnpackIeWMMTSDelay(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIeWMMTSDelay. */ -#define SigIeWMMTSDelay ( 0x001c ) +#define SigIeWMMTSDelay ( 0x001e ) tANI_U32 dot11fUnpackIeWMMTSPEC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMTSPEC *pDst) @@ -2480,7 +2511,7 @@ tANI_U32 dot11fUnpackIeWMMTSPEC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iele return status; } /* End dot11fUnpackIeWMMTSPEC. */ -#define SigIeWMMTSPEC ( 0x001d ) +#define SigIeWMMTSPEC ( 0x001f ) tANI_U32 dot11fUnpackIeWiderBWChanSwitchAnn(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWiderBWChanSwitchAnn *pDst) @@ -2500,7 +2531,7 @@ tANI_U32 dot11fUnpackIeWiderBWChanSwitchAnn(tpAniSirGlobal pCtx, tANI_U8 *pBuf, return status; } /* End dot11fUnpackIeWiderBWChanSwitchAnn. */ -#define SigIeWiderBWChanSwitchAnn ( 0x001e ) +#define SigIeWiderBWChanSwitchAnn ( 0x0020 ) tANI_U32 dot11fUnpackIevht_transmit_power_env(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEvht_transmit_power_env *pDst) @@ -2520,7 +2551,7 @@ tANI_U32 dot11fUnpackIevht_transmit_power_env(tpAniSirGlobal pCtx, tANI_U8 *pBuf return status; } /* End dot11fUnpackIevht_transmit_power_env. */ -#define SigIevht_transmit_power_env ( 0x001f ) +#define SigIevht_transmit_power_env ( 0x0021 ) tANI_U32 dot11fUnpackIeAID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEAID *pDst) @@ -2534,7 +2565,7 @@ tANI_U32 dot11fUnpackIeAID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD return status; } /* End dot11fUnpackIeAID. */ -#define SigIeAID ( 0x0020 ) +#define SigIeAID ( 0x0022 ) tANI_U32 dot11fUnpackIeCFParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIECFParams *pDst) @@ -2557,7 +2588,7 @@ tANI_U32 dot11fUnpackIeCFParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iele return status; } /* End dot11fUnpackIeCFParams. */ -#define SigIeCFParams ( 0x0021 ) +#define SigIeCFParams ( 0x0023 ) tANI_U32 dot11fUnpackIeChallengeText(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEChallengeText *pDst) @@ -2577,7 +2608,7 @@ tANI_U32 dot11fUnpackIeChallengeText(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeChallengeText. */ -#define SigIeChallengeText ( 0x0022 ) +#define SigIeChallengeText ( 0x0024 ) tANI_U32 dot11fUnpackIeChanSwitchAnn(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEChanSwitchAnn *pDst) @@ -2597,7 +2628,7 @@ tANI_U32 dot11fUnpackIeChanSwitchAnn(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeChanSwitchAnn. */ -#define SigIeChanSwitchAnn ( 0x0023 ) +#define SigIeChanSwitchAnn ( 0x0025 ) static const tFFDefn FFS_ChannelSwitchWrapper[ ] = { @@ -2627,7 +2658,7 @@ tANI_U32 dot11fUnpackIeChannelSwitchWrapper(tpAniSirGlobal pCtx, tANI_U8 *pBuf, return status; } /* End dot11fUnpackIeChannelSwitchWrapper. */ -#define SigIeChannelSwitchWrapper ( 0x0024 ) +#define SigIeChannelSwitchWrapper ( 0x0026 ) tANI_U32 dot11fUnpackIeCountry(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIECountry *pDst) @@ -2658,10 +2689,10 @@ tANI_U32 dot11fUnpackIeCountry(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeCountry. */ -#define SigIeCountry ( 0x0025 ) +#define SigIeCountry ( 0x0027 ) -#define SigIeDSParams ( 0x0026 ) +#define SigIeDSParams ( 0x0028 ) tANI_U32 dot11fUnpackIeEDCAParamSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEEDCAParamSet *pDst) @@ -2746,7 +2777,7 @@ tANI_U32 dot11fUnpackIeEDCAParamSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeEDCAParamSet. */ -#define SigIeEDCAParamSet ( 0x0027 ) +#define SigIeEDCAParamSet ( 0x0029 ) tANI_U32 dot11fUnpackIeERPInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEERPInfo *pDst) @@ -2765,7 +2796,7 @@ tANI_U32 dot11fUnpackIeERPInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeERPInfo. */ -#define SigIeERPInfo ( 0x0028 ) +#define SigIeERPInfo ( 0x002a ) tANI_U32 dot11fUnpackIeESECckmOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEESECckmOpaque *pDst) @@ -2785,7 +2816,7 @@ tANI_U32 dot11fUnpackIeESECckmOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeESECckmOpaque. */ -#define SigIeESECckmOpaque ( 0x0029 ) +#define SigIeESECckmOpaque ( 0x002b ) tANI_U32 dot11fUnpackIeESERadMgmtCap(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEESERadMgmtCap *pDst) @@ -2805,7 +2836,7 @@ tANI_U32 dot11fUnpackIeESERadMgmtCap(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeESERadMgmtCap. */ -#define SigIeESERadMgmtCap ( 0x002a ) +#define SigIeESERadMgmtCap ( 0x002c ) tANI_U32 dot11fUnpackIeESETrafStrmMet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEESETrafStrmMet *pDst) @@ -2825,7 +2856,7 @@ tANI_U32 dot11fUnpackIeESETrafStrmMet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U return status; } /* End dot11fUnpackIeESETrafStrmMet. */ -#define SigIeESETrafStrmMet ( 0x002b ) +#define SigIeESETrafStrmMet ( 0x002d ) tANI_U32 dot11fUnpackIeESETrafStrmRateSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEESETrafStrmRateSet *pDst) @@ -2848,7 +2879,7 @@ tANI_U32 dot11fUnpackIeESETrafStrmRateSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tA return status; } /* End dot11fUnpackIeESETrafStrmRateSet. */ -#define SigIeESETrafStrmRateSet ( 0x002c ) +#define SigIeESETrafStrmRateSet ( 0x002e ) tANI_U32 dot11fUnpackIeESETxmitPower(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEESETxmitPower *pDst) @@ -2865,7 +2896,7 @@ tANI_U32 dot11fUnpackIeESETxmitPower(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeESETxmitPower. */ -#define SigIeESETxmitPower ( 0x002d ) +#define SigIeESETxmitPower ( 0x002f ) tANI_U32 dot11fUnpackIeESEVersion(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEESEVersion *pDst) @@ -2879,7 +2910,7 @@ tANI_U32 dot11fUnpackIeESEVersion(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIeESEVersion. */ -#define SigIeESEVersion ( 0x002e ) +#define SigIeESEVersion ( 0x0030 ) tANI_U32 dot11fUnpackIeExtCap(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEExtCap *pDst) @@ -2904,7 +2935,7 @@ endUnpackIeExtCap: return status; } /* End dot11fUnpackIeExtCap. */ -#define SigIeExtCap ( 0x002f ) +#define SigIeExtCap ( 0x0031 ) tANI_U32 dot11fUnpackIeExtSuppRates(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEExtSuppRates *pDst) @@ -2932,7 +2963,7 @@ tANI_U32 dot11fUnpackIeExtSuppRates(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeExtSuppRates. */ -#define SigIeExtSuppRates ( 0x0030 ) +#define SigIeExtSuppRates ( 0x0032 ) tANI_U32 dot11fUnpackIeFHParamSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEFHParamSet *pDst) @@ -2955,7 +2986,7 @@ tANI_U32 dot11fUnpackIeFHParamSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIeFHParamSet. */ -#define SigIeFHParamSet ( 0x0031 ) +#define SigIeFHParamSet ( 0x0033 ) tANI_U32 dot11fUnpackIeFHParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEFHParams *pDst) @@ -2972,7 +3003,7 @@ tANI_U32 dot11fUnpackIeFHParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iele return status; } /* End dot11fUnpackIeFHParams. */ -#define SigIeFHParams ( 0x0032 ) +#define SigIeFHParams ( 0x0034 ) tANI_U32 dot11fUnpackIeFHPattTable(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEFHPattTable *pDst) @@ -3004,7 +3035,7 @@ tANI_U32 dot11fUnpackIeFHPattTable(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeFHPattTable. */ -#define SigIeFHPattTable ( 0x0033 ) +#define SigIeFHPattTable ( 0x0035 ) static const tFFDefn FFS_FTInfo[ ] = { @@ -3051,7 +3082,7 @@ tANI_U32 dot11fUnpackIeFTInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeFTInfo. */ -#define SigIeFTInfo ( 0x0034 ) +#define SigIeFTInfo ( 0x0036 ) tANI_U32 dot11fUnpackIeHT2040BSSCoexistence(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEHT2040BSSCoexistence *pDst) @@ -3072,7 +3103,7 @@ tANI_U32 dot11fUnpackIeHT2040BSSCoexistence(tpAniSirGlobal pCtx, tANI_U8 *pBuf, return status; } /* End dot11fUnpackIeHT2040BSSCoexistence. */ -#define SigIeHT2040BSSCoexistence ( 0x0035 ) +#define SigIeHT2040BSSCoexistence ( 0x0037 ) tANI_U32 dot11fUnpackIeHT2040BSSIntolerantReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEHT2040BSSIntolerantReport *pDst) @@ -3095,7 +3126,7 @@ tANI_U32 dot11fUnpackIeHT2040BSSIntolerantReport(tpAniSirGlobal pCtx, tANI_U8 *p return status; } /* End dot11fUnpackIeHT2040BSSIntolerantReport. */ -#define SigIeHT2040BSSIntolerantReport ( 0x0036 ) +#define SigIeHT2040BSSIntolerantReport ( 0x0038 ) tANI_U32 dot11fUnpackIeHTCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEHTCaps *pDst) @@ -3184,7 +3215,7 @@ tANI_U32 dot11fUnpackIeHTCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeHTCaps. */ -#define SigIeHTCaps ( 0x0037 ) +#define SigIeHTCaps ( 0x0039 ) tANI_U32 dot11fUnpackIeHTInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEHTInfo *pDst) @@ -3239,7 +3270,7 @@ tANI_U32 dot11fUnpackIeHTInfo(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeHTInfo. */ -#define SigIeHTInfo ( 0x0038 ) +#define SigIeHTInfo ( 0x003a ) tANI_U32 dot11fUnpackIeIBSSParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEIBSSParams *pDst) @@ -3253,7 +3284,7 @@ tANI_U32 dot11fUnpackIeIBSSParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIeIBSSParams. */ -#define SigIeIBSSParams ( 0x0039 ) +#define SigIeIBSSParams ( 0x003b ) tANI_U32 dot11fUnpackIeLinkIdentifier(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIELinkIdentifier *pDst) @@ -3273,7 +3304,7 @@ tANI_U32 dot11fUnpackIeLinkIdentifier(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U return status; } /* End dot11fUnpackIeLinkIdentifier. */ -#define SigIeLinkIdentifier ( 0x003a ) +#define SigIeLinkIdentifier ( 0x003c ) static const tFFDefn FFS_reportBeacon[ ] = { @@ -3431,7 +3462,7 @@ tANI_U32 dot11fUnpackIeMeasurementReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tAN return status; } /* End dot11fUnpackIeMeasurementReport. */ -#define SigIeMeasurementReport ( 0x003b ) +#define SigIeMeasurementReport ( 0x003d ) static const tFFDefn FFS_measurement_requestBeacon[ ] = { @@ -3536,7 +3567,7 @@ tANI_U32 dot11fUnpackIeMeasurementRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tA return status; } /* End dot11fUnpackIeMeasurementRequest. */ -#define SigIeMeasurementRequest ( 0x003c ) +#define SigIeMeasurementRequest ( 0x003e ) tANI_U32 dot11fUnpackIeMobilityDomain(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEMobilityDomain *pDst) @@ -3557,7 +3588,7 @@ tANI_U32 dot11fUnpackIeMobilityDomain(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U return status; } /* End dot11fUnpackIeMobilityDomain. */ -#define SigIeMobilityDomain ( 0x003d ) +#define SigIeMobilityDomain ( 0x003f ) static const tFFDefn FFS_NeighborReport[ ] = { @@ -3624,7 +3655,7 @@ tANI_U32 dot11fUnpackIeNeighborReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U return status; } /* End dot11fUnpackIeNeighborReport. */ -#define SigIeNeighborReport ( 0x003e ) +#define SigIeNeighborReport ( 0x0040 ) tANI_U32 dot11fUnpackIeOBSSScanParameters(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEOBSSScanParameters *pDst) @@ -3656,7 +3687,7 @@ tANI_U32 dot11fUnpackIeOBSSScanParameters(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tA return status; } /* End dot11fUnpackIeOBSSScanParameters. */ -#define SigIeOBSSScanParameters ( 0x003f ) +#define SigIeOBSSScanParameters ( 0x0041 ) tANI_U32 dot11fUnpackIeOperatingMode(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEOperatingMode *pDst) @@ -3675,7 +3706,7 @@ tANI_U32 dot11fUnpackIeOperatingMode(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeOperatingMode. */ -#define SigIeOperatingMode ( 0x0040 ) +#define SigIeOperatingMode ( 0x0042 ) static const tTLVDefn TLVS_P2PAssocReq[ ] = { @@ -3694,7 +3725,7 @@ tANI_U32 dot11fUnpackIeP2PAssocReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PAssocReq. */ -#define SigIeP2PAssocReq ( 0x0041 ) +#define SigIeP2PAssocReq ( 0x0043 ) static const tTLVDefn TLVS_P2PAssocRes[ ] = { @@ -3712,7 +3743,7 @@ tANI_U32 dot11fUnpackIeP2PAssocRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PAssocRes. */ -#define SigIeP2PAssocRes ( 0x0042 ) +#define SigIeP2PAssocRes ( 0x0044 ) static const tTLVDefn TLVS_P2PBeacon[ ] = { @@ -3731,7 +3762,7 @@ tANI_U32 dot11fUnpackIeP2PBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeP2PBeacon. */ -#define SigIeP2PBeacon ( 0x0043 ) +#define SigIeP2PBeacon ( 0x0045 ) static const tTLVDefn TLVS_P2PBeaconProbeRes[ ] = { @@ -3753,7 +3784,7 @@ tANI_U32 dot11fUnpackIeP2PBeaconProbeRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tAN return status; } /* End dot11fUnpackIeP2PBeaconProbeRes. */ -#define SigIeP2PBeaconProbeRes ( 0x0044 ) +#define SigIeP2PBeaconProbeRes ( 0x0046 ) static const tTLVDefn TLVS_P2PDeAuth[ ] = { @@ -3770,7 +3801,7 @@ tANI_U32 dot11fUnpackIeP2PDeAuth(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeP2PDeAuth. */ -#define SigIeP2PDeAuth ( 0x0045 ) +#define SigIeP2PDeAuth ( 0x0047 ) static const tTLVDefn TLVS_P2PDeviceDiscoverabilityReq[ ] = { @@ -3788,7 +3819,7 @@ tANI_U32 dot11fUnpackIeP2PDeviceDiscoverabilityReq(tpAniSirGlobal pCtx, tANI_U8 return status; } /* End dot11fUnpackIeP2PDeviceDiscoverabilityReq. */ -#define SigIeP2PDeviceDiscoverabilityReq ( 0x0046 ) +#define SigIeP2PDeviceDiscoverabilityReq ( 0x0048 ) static const tTLVDefn TLVS_P2PDeviceDiscoverabilityRes[ ] = { @@ -3805,7 +3836,7 @@ tANI_U32 dot11fUnpackIeP2PDeviceDiscoverabilityRes(tpAniSirGlobal pCtx, tANI_U8 return status; } /* End dot11fUnpackIeP2PDeviceDiscoverabilityRes. */ -#define SigIeP2PDeviceDiscoverabilityRes ( 0x0047 ) +#define SigIeP2PDeviceDiscoverabilityRes ( 0x0049 ) static const tTLVDefn TLVS_P2PDisAssoc[ ] = { @@ -3822,7 +3853,7 @@ tANI_U32 dot11fUnpackIeP2PDisAssoc(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PDisAssoc. */ -#define SigIeP2PDisAssoc ( 0x0048 ) +#define SigIeP2PDisAssoc ( 0x004a ) static const tTLVDefn TLVS_P2PGONegCnf[ ] = { @@ -3843,7 +3874,7 @@ tANI_U32 dot11fUnpackIeP2PGONegCnf(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PGONegCnf. */ -#define SigIeP2PGONegCnf ( 0x0049 ) +#define SigIeP2PGONegCnf ( 0x004b ) static const tTLVDefn TLVS_P2PGONegReq[ ] = { @@ -3868,7 +3899,7 @@ tANI_U32 dot11fUnpackIeP2PGONegReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PGONegReq. */ -#define SigIeP2PGONegReq ( 0x004a ) +#define SigIeP2PGONegReq ( 0x004c ) static const tTLVDefn TLVS_P2PGONegRes[ ] = { @@ -3893,7 +3924,7 @@ tANI_U32 dot11fUnpackIeP2PGONegRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PGONegRes. */ -#define SigIeP2PGONegRes ( 0x004b ) +#define SigIeP2PGONegRes ( 0x004d ) static const tTLVDefn TLVS_P2PGONegWPS[ ] = { @@ -3911,7 +3942,7 @@ tANI_U32 dot11fUnpackIeP2PGONegWPS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PGONegWPS. */ -#define SigIeP2PGONegWPS ( 0x004c ) +#define SigIeP2PGONegWPS ( 0x004e ) tANI_U32 dot11fUnpackIeP2PIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEP2PIEOpaque *pDst) @@ -3931,7 +3962,7 @@ tANI_U32 dot11fUnpackIeP2PIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PIEOpaque. */ -#define SigIeP2PIEOpaque ( 0x004d ) +#define SigIeP2PIEOpaque ( 0x004f ) static const tTLVDefn TLVS_P2PInvitationReq[ ] = { @@ -3954,7 +3985,7 @@ tANI_U32 dot11fUnpackIeP2PInvitationReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI return status; } /* End dot11fUnpackIeP2PInvitationReq. */ -#define SigIeP2PInvitationReq ( 0x004e ) +#define SigIeP2PInvitationReq ( 0x0050 ) static const tTLVDefn TLVS_P2PInvitationRes[ ] = { @@ -3975,7 +4006,7 @@ tANI_U32 dot11fUnpackIeP2PInvitationRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI return status; } /* End dot11fUnpackIeP2PInvitationRes. */ -#define SigIeP2PInvitationRes ( 0x004f ) +#define SigIeP2PInvitationRes ( 0x0051 ) static const tTLVDefn TLVS_P2PNoticeOfAbsence[ ] = { @@ -3992,7 +4023,7 @@ tANI_U32 dot11fUnpackIeP2PNoticeOfAbsence(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tA return status; } /* End dot11fUnpackIeP2PNoticeOfAbsence. */ -#define SigIeP2PNoticeOfAbsence ( 0x0050 ) +#define SigIeP2PNoticeOfAbsence ( 0x0052 ) static const tTLVDefn TLVS_P2PPresenceResponse[ ] = { @@ -4010,7 +4041,7 @@ tANI_U32 dot11fUnpackIeP2PPresenceResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, t return status; } /* End dot11fUnpackIeP2PPresenceResponse. */ -#define SigIeP2PPresenceResponse ( 0x0051 ) +#define SigIeP2PPresenceResponse ( 0x0053 ) static const tTLVDefn TLVS_P2PProbeReq[ ] = { @@ -4031,7 +4062,7 @@ tANI_U32 dot11fUnpackIeP2PProbeReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PProbeReq. */ -#define SigIeP2PProbeReq ( 0x0052 ) +#define SigIeP2PProbeReq ( 0x0054 ) static const tTLVDefn TLVS_P2PProbeRes[ ] = { @@ -4052,7 +4083,7 @@ tANI_U32 dot11fUnpackIeP2PProbeRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeP2PProbeRes. */ -#define SigIeP2PProbeRes ( 0x0053 ) +#define SigIeP2PProbeRes ( 0x0055 ) static const tTLVDefn TLVS_P2PProvisionDiscoveryReq[ ] = { @@ -4071,7 +4102,7 @@ tANI_U32 dot11fUnpackIeP2PProvisionDiscoveryReq(tpAniSirGlobal pCtx, tANI_U8 *pB return status; } /* End dot11fUnpackIeP2PProvisionDiscoveryReq. */ -#define SigIeP2PProvisionDiscoveryReq ( 0x0054 ) +#define SigIeP2PProvisionDiscoveryReq ( 0x0056 ) static const tTLVDefn TLVS_P2PWSCProvisionDiscoveryRes[ ] = { @@ -4088,7 +4119,7 @@ tANI_U32 dot11fUnpackIeP2PWSCProvisionDiscoveryRes(tpAniSirGlobal pCtx, tANI_U8 return status; } /* End dot11fUnpackIeP2PWSCProvisionDiscoveryRes. */ -#define SigIeP2PWSCProvisionDiscoveryRes ( 0x0055 ) +#define SigIeP2PWSCProvisionDiscoveryRes ( 0x0057 ) tANI_U32 dot11fUnpackIePTIControl(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEPTIControl *pDst) @@ -4105,7 +4136,7 @@ tANI_U32 dot11fUnpackIePTIControl(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIePTIControl. */ -#define SigIePTIControl ( 0x0056 ) +#define SigIePTIControl ( 0x0058 ) tANI_U32 dot11fUnpackIePUBufferStatus(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEPUBufferStatus *pDst) @@ -4125,7 +4156,7 @@ tANI_U32 dot11fUnpackIePUBufferStatus(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U return status; } /* End dot11fUnpackIePUBufferStatus. */ -#define SigIePUBufferStatus ( 0x0057 ) +#define SigIePUBufferStatus ( 0x0059 ) tANI_U32 dot11fUnpackIePowerCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEPowerCaps *pDst) @@ -4142,7 +4173,7 @@ tANI_U32 dot11fUnpackIePowerCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIePowerCaps. */ -#define SigIePowerCaps ( 0x0058 ) +#define SigIePowerCaps ( 0x005a ) tANI_U32 dot11fUnpackIePowerConstraints(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEPowerConstraints *pDst) @@ -4156,7 +4187,7 @@ tANI_U32 dot11fUnpackIePowerConstraints(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI return status; } /* End dot11fUnpackIePowerConstraints. */ -#define SigIePowerConstraints ( 0x0059 ) +#define SigIePowerConstraints ( 0x005b ) tANI_U32 dot11fUnpackIeQBSSLoad(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQBSSLoad *pDst) @@ -4176,24 +4207,37 @@ tANI_U32 dot11fUnpackIeQBSSLoad(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iele return status; } /* End dot11fUnpackIeQBSSLoad. */ -#define SigIeQBSSLoad ( 0x005a ) +#define SigIeQBSSLoad ( 0x005c ) + static const tFFDefn FFS_QComVendorIE[ ] = { + { NULL, 0, 0, 0,}, + }; + + static const tIEDefn IES_QComVendorIE[ ] = { + {offsetof(tDot11fIEQComVendorIE, MccChanInfo), offsetof(tDot11fIEMccChanInfo, present), 0, "MccChanInfo" , 0, 3, 3, SigIeMccChanInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MCCCHANINFO, 0, }, + {offsetof(tDot11fIEQComVendorIE, Sub20Info), offsetof(tDot11fIESub20Info, present), 0, "Sub20Info" , 0, 4, 4, SigIeSub20Info, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUB20INFO, 0, }, + {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, + }; + tANI_U32 dot11fUnpackIeQComVendorIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQComVendorIE *pDst) { tANI_U32 status = DOT11F_PARSE_SUCCESS; (void) pBuf; (void)ielen; /* Shutup the compiler */ if (pDst->present) status = DOT11F_DUPLICATE_IE; pDst->present = 1; - pDst->type = *pBuf; - pBuf += 1; - ielen -= (tANI_U8)1; - pDst->channel = *pBuf; (void)pCtx; + status |= UnpackCore(pCtx, + pBuf, + ielen, + FFS_QComVendorIE, + IES_QComVendorIE, + ( tANI_U8* )pDst, + sizeof(*pDst)); return status; } /* End dot11fUnpackIeQComVendorIE. */ -#define SigIeQComVendorIE ( 0x005b ) +#define SigIeQComVendorIE ( 0x005d ) tANI_U32 dot11fUnpackIeQOSCapsAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQOSCapsAp *pDst) @@ -4213,7 +4257,7 @@ tANI_U32 dot11fUnpackIeQOSCapsAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeQOSCapsAp. */ -#define SigIeQOSCapsAp ( 0x005c ) +#define SigIeQOSCapsAp ( 0x005e ) tANI_U32 dot11fUnpackIeQOSCapsStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQOSCapsStation *pDst) @@ -4235,7 +4279,7 @@ tANI_U32 dot11fUnpackIeQOSCapsStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U return status; } /* End dot11fUnpackIeQOSCapsStation. */ -#define SigIeQOSCapsStation ( 0x005d ) +#define SigIeQOSCapsStation ( 0x005f ) tANI_U32 dot11fUnpackIeQosMapSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQosMapSet *pDst) @@ -4255,7 +4299,7 @@ tANI_U32 dot11fUnpackIeQosMapSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeQosMapSet. */ -#define SigIeQosMapSet ( 0x005e ) +#define SigIeQosMapSet ( 0x0060 ) tANI_U32 dot11fUnpackIeQuiet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQuiet *pDst) @@ -4278,7 +4322,7 @@ tANI_U32 dot11fUnpackIeQuiet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeQuiet. */ -#define SigIeQuiet ( 0x005f ) +#define SigIeQuiet ( 0x0061 ) tANI_U32 dot11fUnpackIeRCPIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERCPIIE *pDst) @@ -4292,7 +4336,7 @@ tANI_U32 dot11fUnpackIeRCPIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeRCPIIE. */ -#define SigIeRCPIIE ( 0x0060 ) +#define SigIeRCPIIE ( 0x0062 ) static const tFFDefn FFS_RICDataDesc[ ] = { @@ -4332,7 +4376,7 @@ tANI_U32 dot11fUnpackIeRICDataDesc(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeRICDataDesc. */ -#define SigIeRICDataDesc ( 0x0061 ) +#define SigIeRICDataDesc ( 0x0063 ) tANI_U32 dot11fUnpackIeRSN(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERSN *pDst) @@ -4435,7 +4479,7 @@ tANI_U32 dot11fUnpackIeRSN(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD return status; } /* End dot11fUnpackIeRSN. */ -#define SigIeRSN ( 0x0062 ) +#define SigIeRSN ( 0x0064 ) tANI_U32 dot11fUnpackIeRSNIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERSNIIE *pDst) @@ -4449,7 +4493,7 @@ tANI_U32 dot11fUnpackIeRSNIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeRSNIIE. */ -#define SigIeRSNIIE ( 0x0063 ) +#define SigIeRSNIIE ( 0x0065 ) tANI_U32 dot11fUnpackIeRSNOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERSNOpaque *pDst) @@ -4469,7 +4513,7 @@ tANI_U32 dot11fUnpackIeRSNOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeRSNOpaque. */ -#define SigIeRSNOpaque ( 0x0064 ) +#define SigIeRSNOpaque ( 0x0066 ) tANI_U32 dot11fUnpackIeSuppChannels(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESuppChannels *pDst) @@ -4489,7 +4533,7 @@ tANI_U32 dot11fUnpackIeSuppChannels(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeSuppChannels. */ -#define SigIeSuppChannels ( 0x0065 ) +#define SigIeSuppChannels ( 0x0067 ) tANI_U32 dot11fUnpackIeSuppOperatingClasses(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESuppOperatingClasses *pDst) @@ -4509,7 +4553,7 @@ tANI_U32 dot11fUnpackIeSuppOperatingClasses(tpAniSirGlobal pCtx, tANI_U8 *pBuf, return status; } /* End dot11fUnpackIeSuppOperatingClasses. */ -#define SigIeSuppOperatingClasses ( 0x0066 ) +#define SigIeSuppOperatingClasses ( 0x0068 ) tANI_U32 dot11fUnpackIeSuppRates(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESuppRates *pDst) @@ -4537,7 +4581,7 @@ tANI_U32 dot11fUnpackIeSuppRates(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeSuppRates. */ -#define SigIeSuppRates ( 0x0067 ) +#define SigIeSuppRates ( 0x0069 ) tANI_U32 dot11fUnpackIeTIM(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETIM *pDst) @@ -4566,7 +4610,7 @@ tANI_U32 dot11fUnpackIeTIM(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD return status; } /* End dot11fUnpackIeTIM. */ -#define SigIeTIM ( 0x0068 ) +#define SigIeTIM ( 0x006a ) tANI_U32 dot11fUnpackIeTPCReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETPCReport *pDst) @@ -4583,7 +4627,7 @@ tANI_U32 dot11fUnpackIeTPCReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeTPCReport. */ -#define SigIeTPCReport ( 0x0069 ) +#define SigIeTPCReport ( 0x006b ) tANI_U32 dot11fUnpackIeTPCRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETPCRequest *pDst) @@ -4596,7 +4640,7 @@ tANI_U32 dot11fUnpackIeTPCRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIeTPCRequest. */ -#define SigIeTPCRequest ( 0x006a ) +#define SigIeTPCRequest ( 0x006c ) tANI_U32 dot11fUnpackIeTimeAdvertisement(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETimeAdvertisement *pDst) @@ -4616,7 +4660,7 @@ tANI_U32 dot11fUnpackIeTimeAdvertisement(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tAN return status; } /* End dot11fUnpackIeTimeAdvertisement. */ -#define SigIeTimeAdvertisement ( 0x006b ) +#define SigIeTimeAdvertisement ( 0x006d ) tANI_U32 dot11fUnpackIeTimeoutInterval(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETimeoutInterval *pDst) @@ -4633,7 +4677,7 @@ tANI_U32 dot11fUnpackIeTimeoutInterval(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_ return status; } /* End dot11fUnpackIeTimeoutInterval. */ -#define SigIeTimeoutInterval ( 0x006c ) +#define SigIeTimeoutInterval ( 0x006e ) tANI_U32 dot11fUnpackIeVHTExtBssLoad(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTExtBssLoad *pDst) @@ -4659,7 +4703,7 @@ tANI_U32 dot11fUnpackIeVHTExtBssLoad(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeVHTExtBssLoad. */ -#define SigIeVHTExtBssLoad ( 0x006d ) +#define SigIeVHTExtBssLoad ( 0x006f ) tANI_U32 dot11fUnpackIeVendor1IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVendor1IE *pDst) @@ -4672,7 +4716,7 @@ tANI_U32 dot11fUnpackIeVendor1IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeVendor1IE. */ -#define SigIeVendor1IE ( 0x006e ) +#define SigIeVendor1IE ( 0x0070 ) tANI_U32 dot11fUnpackIeVendor3IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVendor3IE *pDst) @@ -4685,7 +4729,7 @@ tANI_U32 dot11fUnpackIeVendor3IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeVendor3IE. */ -#define SigIeVendor3IE ( 0x006f ) +#define SigIeVendor3IE ( 0x0071 ) tANI_U32 dot11fUnpackIeWAPI(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWAPI *pDst) @@ -4754,7 +4798,7 @@ tANI_U32 dot11fUnpackIeWAPI(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, t return status; } /* End dot11fUnpackIeWAPI. */ -#define SigIeWAPI ( 0x0070 ) +#define SigIeWAPI ( 0x0072 ) tANI_U32 dot11fUnpackIeWAPIOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWAPIOpaque *pDst) @@ -4774,7 +4818,7 @@ tANI_U32 dot11fUnpackIeWAPIOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIeWAPIOpaque. */ -#define SigIeWAPIOpaque ( 0x0071 ) +#define SigIeWAPIOpaque ( 0x0073 ) tANI_U32 dot11fUnpackIeWFATPC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWFATPC *pDst) @@ -4791,7 +4835,7 @@ tANI_U32 dot11fUnpackIeWFATPC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, return status; } /* End dot11fUnpackIeWFATPC. */ -#define SigIeWFATPC ( 0x0072 ) +#define SigIeWFATPC ( 0x0074 ) tANI_U32 dot11fUnpackIeWFDIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWFDIEOpaque *pDst) @@ -4811,7 +4855,7 @@ tANI_U32 dot11fUnpackIeWFDIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeWFDIEOpaque. */ -#define SigIeWFDIEOpaque ( 0x0073 ) +#define SigIeWFDIEOpaque ( 0x0075 ) tANI_U32 dot11fUnpackIeWMMCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMCaps *pDst) @@ -4839,7 +4883,7 @@ tANI_U32 dot11fUnpackIeWMMCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen return status; } /* End dot11fUnpackIeWMMCaps. */ -#define SigIeWMMCaps ( 0x0074 ) +#define SigIeWMMCaps ( 0x0076 ) tANI_U32 dot11fUnpackIeWMMInfoAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMInfoAp *pDst) @@ -4860,7 +4904,7 @@ tANI_U32 dot11fUnpackIeWMMInfoAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeWMMInfoAp. */ -#define SigIeWMMInfoAp ( 0x0075 ) +#define SigIeWMMInfoAp ( 0x0077 ) tANI_U32 dot11fUnpackIeWMMInfoStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMInfoStation *pDst) @@ -4885,7 +4929,7 @@ tANI_U32 dot11fUnpackIeWMMInfoStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U return status; } /* End dot11fUnpackIeWMMInfoStation. */ -#define SigIeWMMInfoStation ( 0x0076 ) +#define SigIeWMMInfoStation ( 0x0078 ) tANI_U32 dot11fUnpackIeWMMParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMParams *pDst) @@ -4978,7 +5022,7 @@ tANI_U32 dot11fUnpackIeWMMParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeWMMParams. */ -#define SigIeWMMParams ( 0x0077 ) +#define SigIeWMMParams ( 0x0079 ) tANI_U32 dot11fUnpackIeWPA(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWPA *pDst) @@ -5060,7 +5104,7 @@ tANI_U32 dot11fUnpackIeWPA(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD return status; } /* End dot11fUnpackIeWPA. */ -#define SigIeWPA ( 0x0078 ) +#define SigIeWPA ( 0x007a ) tANI_U32 dot11fUnpackIeWPAOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWPAOpaque *pDst) @@ -5080,7 +5124,7 @@ tANI_U32 dot11fUnpackIeWPAOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeWPAOpaque. */ -#define SigIeWPAOpaque ( 0x0079 ) +#define SigIeWPAOpaque ( 0x007b ) static const tTLVDefn TLVS_WSC[ ] = { @@ -5118,7 +5162,7 @@ tANI_U32 dot11fUnpackIeWSC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD return status; } /* End dot11fUnpackIeWSC. */ -#define SigIeWSC ( 0x007a ) +#define SigIeWSC ( 0x007c ) static const tTLVDefn TLVS_WscAssocReq[ ] = { @@ -5137,7 +5181,7 @@ tANI_U32 dot11fUnpackIeWscAssocReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeWscAssocReq. */ -#define SigIeWscAssocReq ( 0x007b ) +#define SigIeWscAssocReq ( 0x007d ) static const tTLVDefn TLVS_WscAssocRes[ ] = { @@ -5156,7 +5200,7 @@ tANI_U32 dot11fUnpackIeWscAssocRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeWscAssocRes. */ -#define SigIeWscAssocRes ( 0x007c ) +#define SigIeWscAssocRes ( 0x007e ) static const tTLVDefn TLVS_WscBeacon[ ] = { @@ -5181,7 +5225,7 @@ tANI_U32 dot11fUnpackIeWscBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel return status; } /* End dot11fUnpackIeWscBeacon. */ -#define SigIeWscBeacon ( 0x007d ) +#define SigIeWscBeacon ( 0x007f ) static const tTLVDefn TLVS_WscBeaconProbeRes[ ] = { @@ -5214,7 +5258,7 @@ tANI_U32 dot11fUnpackIeWscBeaconProbeRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tAN return status; } /* End dot11fUnpackIeWscBeaconProbeRes. */ -#define SigIeWscBeaconProbeRes ( 0x007e ) +#define SigIeWscBeaconProbeRes ( 0x0080 ) tANI_U32 dot11fUnpackIeWscIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWscIEOpaque *pDst) @@ -5234,7 +5278,7 @@ tANI_U32 dot11fUnpackIeWscIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeWscIEOpaque. */ -#define SigIeWscIEOpaque ( 0x007f ) +#define SigIeWscIEOpaque ( 0x0081 ) static const tTLVDefn TLVS_WscProbeReq[ ] = { @@ -5265,7 +5309,7 @@ tANI_U32 dot11fUnpackIeWscProbeReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeWscProbeReq. */ -#define SigIeWscProbeReq ( 0x0080 ) +#define SigIeWscProbeReq ( 0x0082 ) static const tTLVDefn TLVS_WscProbeRes[ ] = { @@ -5298,7 +5342,7 @@ tANI_U32 dot11fUnpackIeWscProbeRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i return status; } /* End dot11fUnpackIeWscProbeRes. */ -#define SigIeWscProbeRes ( 0x0081 ) +#define SigIeWscProbeRes ( 0x0083 ) static const tTLVDefn TLVS_WscReassocRes[ ] = { @@ -5317,7 +5361,7 @@ tANI_U32 dot11fUnpackIeWscReassocRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 return status; } /* End dot11fUnpackIeWscReassocRes. */ -#define SigIeWscReassocRes ( 0x0082 ) +#define SigIeWscReassocRes ( 0x0084 ) tANI_U32 dot11fUnpackIeext_chan_switch_ann(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEext_chan_switch_ann *pDst) @@ -5340,7 +5384,7 @@ tANI_U32 dot11fUnpackIeext_chan_switch_ann(tpAniSirGlobal pCtx, tANI_U8 *pBuf, t return status; } /* End dot11fUnpackIeext_chan_switch_ann. */ -#define SigIeext_chan_switch_ann ( 0x0083 ) +#define SigIeext_chan_switch_ann ( 0x0085 ) tANI_U32 dot11fUnpackIesec_chan_offset_ele(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEsec_chan_offset_ele *pDst) @@ -5354,7 +5398,7 @@ tANI_U32 dot11fUnpackIesec_chan_offset_ele(tpAniSirGlobal pCtx, tANI_U8 *pBuf, t return status; } /* End dot11fUnpackIesec_chan_offset_ele. */ -#define SigIesec_chan_offset_ele ( 0x0084 ) +#define SigIesec_chan_offset_ele ( 0x0086 ) static const tFFDefn FFS_vendor2_ie[ ] = { @@ -5390,7 +5434,7 @@ tANI_U32 dot11fUnpackIevendor2_ie(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie return status; } /* End dot11fUnpackIevendor2_ie. */ -#define SigIevendor2_ie ( 0x0085 ) +#define SigIevendor2_ie ( 0x0087 ) static const tFFDefn FFS_AddBAReq[] = { @@ -6051,6 +6095,7 @@ tANI_U32 dot11fUnpackAddTSResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 {offsetof(tDot11fAssocRequest, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, {offsetof(tDot11fAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, {offsetof(tDot11fAssocRequest, vendor2_ie), offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie" , 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2_IE, 0, }, + {offsetof(tDot11fAssocRequest, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 5, 12, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAssocRequest *pFrm) @@ -6508,6 +6553,33 @@ tANI_U32 dot11fUnpackAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->vendor2_ie.VHTOperation.basicMCSSet, 2); } } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("QComVendorIE:\n")); + if (!pFrm->QComVendorIE.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } + } } # endif // DOT11F_DUMP_FRAMES return status; @@ -6549,6 +6621,7 @@ tANI_U32 dot11fUnpackAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n {offsetof(tDot11fAssocResponse, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, {offsetof(tDot11fAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, {offsetof(tDot11fAssocResponse, vendor2_ie), offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie" , 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2_IE, 0, }, + {offsetof(tDot11fAssocResponse, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 5, 12, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAssocResponse *pFrm) @@ -7500,6 +7573,33 @@ tANI_U32 dot11fUnpackAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->vendor2_ie.VHTOperation.basicMCSSet, 2); } } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("QComVendorIE:\n")); + if (!pFrm->QComVendorIE.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } + } } # endif // DOT11F_DUMP_FRAMES return status; @@ -7972,7 +8072,7 @@ tANI_U32 dot11fUnpackAuthentication(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 {offsetof(tDot11fBeacon, vendor2_ie), offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie" , 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2_IE, 0, }, {offsetof(tDot11fBeacon, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE" , 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, }, {offsetof(tDot11fBeacon, ChannelSwitchWrapper), offsetof(tDot11fIEChannelSwitchWrapper, present), 0, "ChannelSwitchWrapper" , 0, 2, 14, SigIeChannelSwitchWrapper, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, }, - {offsetof(tDot11fBeacon, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 7, 7, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, + {offsetof(tDot11fBeacon, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 5, 12, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, {offsetof(tDot11fBeacon, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -8945,8 +9045,25 @@ tANI_U32 dot11fUnpackBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, t } else { - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.type, 1); - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.channel, 1); + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("ESEVersion:\n")); if (!pFrm->ESEVersion.present) @@ -9098,7 +9215,7 @@ tANI_U32 dot11fUnpackBeacon1(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, {offsetof(tDot11fBeacon2, vendor2_ie), offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie" , 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2_IE, 0, }, {offsetof(tDot11fBeacon2, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE" , 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, }, {offsetof(tDot11fBeacon2, ChannelSwitchWrapper), offsetof(tDot11fIEChannelSwitchWrapper, present), 0, "ChannelSwitchWrapper" , 0, 2, 14, SigIeChannelSwitchWrapper, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, }, - {offsetof(tDot11fBeacon2, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 7, 7, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, + {offsetof(tDot11fBeacon2, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 5, 12, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, {offsetof(tDot11fBeacon2, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -9919,8 +10036,25 @@ tANI_U32 dot11fUnpackBeacon2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, } else { - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.type, 1); - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.channel, 1); + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("ESEVersion:\n")); if (!pFrm->ESEVersion.present) @@ -9992,7 +10126,7 @@ tANI_U32 dot11fUnpackBeacon2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, {offsetof(tDot11fBeaconIEs, vendor2_ie), offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie" , 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2_IE, 0, }, {offsetof(tDot11fBeaconIEs, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE" , 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, }, {offsetof(tDot11fBeaconIEs, ChannelSwitchWrapper), offsetof(tDot11fIEChannelSwitchWrapper, present), 0, "ChannelSwitchWrapper" , 0, 2, 14, SigIeChannelSwitchWrapper, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, }, - {offsetof(tDot11fBeaconIEs, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 7, 7, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, + {offsetof(tDot11fBeaconIEs, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 5, 12, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackBeaconIEs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeaconIEs *pFrm) @@ -11072,8 +11206,25 @@ tANI_U32 dot11fUnpackBeaconIEs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf } else { - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.type, 1); - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.channel, 1); + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } } } # endif // DOT11F_DUMP_FRAMES @@ -13426,7 +13577,7 @@ tANI_U32 dot11fUnpackProbeRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n {offsetof(tDot11fProbeResponse, vendor2_ie), offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie" , 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2_IE, 0, }, {offsetof(tDot11fProbeResponse, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE" , 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, }, {offsetof(tDot11fProbeResponse, ChannelSwitchWrapper), offsetof(tDot11fIEChannelSwitchWrapper, present), 0, "ChannelSwitchWrapper" , 0, 2, 14, SigIeChannelSwitchWrapper, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, }, - {offsetof(tDot11fProbeResponse, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 7, 7, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, + {offsetof(tDot11fProbeResponse, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 5, 12, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, {offsetof(tDot11fProbeResponse, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -14453,8 +14604,25 @@ tANI_U32 dot11fUnpackProbeResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 } else { - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.type, 1); - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.channel, 1); + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("ESEVersion:\n")); if (!pFrm->ESEVersion.present) @@ -14886,6 +15054,7 @@ tANI_U32 dot11fUnpackRadioMeasurementRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, {offsetof(tDot11fReAssocRequest, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, {offsetof(tDot11fReAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, {offsetof(tDot11fReAssocRequest, vendor2_ie), offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie" , 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2_IE, 0, }, + {offsetof(tDot11fReAssocRequest, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 5, 12, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackReAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fReAssocRequest *pFrm) @@ -15730,6 +15899,33 @@ tANI_U32 dot11fUnpackReAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->vendor2_ie.VHTOperation.basicMCSSet, 2); } } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("QComVendorIE:\n")); + if (!pFrm->QComVendorIE.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } + } } # endif // DOT11F_DUMP_FRAMES return status; @@ -15772,6 +15968,7 @@ tANI_U32 dot11fUnpackReAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 {offsetof(tDot11fReAssocResponse, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, {offsetof(tDot11fReAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, {offsetof(tDot11fReAssocResponse, vendor2_ie), offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie" , 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2_IE, 0, }, + {offsetof(tDot11fReAssocResponse, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 5, 12, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackReAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fReAssocResponse *pFrm) @@ -16730,6 +16927,33 @@ tANI_U32 dot11fUnpackReAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U3 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->vendor2_ie.VHTOperation.basicMCSSet, 2); } } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("QComVendorIE:\n")); + if (!pFrm->QComVendorIE.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } + } } # endif // DOT11F_DUMP_FRAMES return status; @@ -19341,12 +19565,18 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx, case SigIeIGTK: status |= dot11fUnpackIeIGTK(pCtx, pBufRemaining, len, ( tDot11fIEIGTK* )(pFrm + pIe->offset + sizeof(tDot11fIEIGTK)*countOffset) ); break; + case SigIeMccChanInfo: + status |= dot11fUnpackIeMccChanInfo(pCtx, pBufRemaining, len, ( tDot11fIEMccChanInfo* )(pFrm + pIe->offset + sizeof(tDot11fIEMccChanInfo)*countOffset) ); + break; case SigIeR0KH_ID: status |= dot11fUnpackIeR0KH_ID(pCtx, pBufRemaining, len, ( tDot11fIER0KH_ID* )(pFrm + pIe->offset + sizeof(tDot11fIER0KH_ID)*countOffset) ); break; case SigIeR1KH_ID: status |= dot11fUnpackIeR1KH_ID(pCtx, pBufRemaining, len, ( tDot11fIER1KH_ID* )(pFrm + pIe->offset + sizeof(tDot11fIER1KH_ID)*countOffset) ); break; + case SigIeSub20Info: + status |= dot11fUnpackIeSub20Info(pCtx, pBufRemaining, len, ( tDot11fIESub20Info* )(pFrm + pIe->offset + sizeof(tDot11fIESub20Info)*countOffset) ); + break; case SigIeTSFInfo: status |= dot11fUnpackIeTSFInfo(pCtx, pBufRemaining, len, ( tDot11fIETSFInfo* )(pFrm + pIe->offset + sizeof(tDot11fIETSFInfo)*countOffset) ); break; @@ -20667,6 +20897,18 @@ tANI_U32 dot11fGetPackedIEP2PWSCProvisionDiscoveryRes(tpAniSirGlobal pCtx, tDot1 return status; } /* End dot11fGetPackedIEP2PWSCProvisionDiscoveryRes. */ +tANI_U32 dot11fGetPackedIEQComVendorIE(tpAniSirGlobal pCtx, tDot11fIEQComVendorIE *pIe, tANI_U32 *pnNeeded) +{ + tANI_U32 status = DOT11F_PARSE_SUCCESS; + (void)pCtx; + while ( pIe->present ) + { + status = GetPackedSizeCore(pCtx, ( tANI_U8* )pIe, pnNeeded, IES_QComVendorIE); + break; + } + return status; +} /* End dot11fGetPackedIEQComVendorIE. */ + tANI_U32 dot11fGetPackedIERICDataDesc(tpAniSirGlobal pCtx, tDot11fIERICDataDesc *pIe, tANI_U32 *pnNeeded) { tANI_U32 status = DOT11F_PARSE_SUCCESS; @@ -21439,6 +21681,11 @@ static tANI_U32 GetPackedSizeCore(tpAniSirGlobal pCtx, byteCount = 33; pIePresent = ( (tDot11fIEIGTK* )(pFrm + pIe->offset + offset * i ))->present; break; + case SigIeMccChanInfo: + offset = sizeof(tDot11fIEMccChanInfo); + byteCount = 1; + pIePresent = ( (tDot11fIEMccChanInfo* )(pFrm + pIe->offset + offset * i ))->present; + break; case SigIeR0KH_ID: offset = sizeof(tDot11fIER0KH_ID); byteCount = ((tDot11fIER0KH_ID* )(pFrm + pIe->offset + sizeof(tDot11fIER0KH_ID) * i ))->num_PMK_R0_ID; @@ -21449,6 +21696,11 @@ static tANI_U32 GetPackedSizeCore(tpAniSirGlobal pCtx, byteCount = 6; pIePresent = ( (tDot11fIER1KH_ID* )(pFrm + pIe->offset + offset * i ))->present; break; + case SigIeSub20Info: + offset = sizeof(tDot11fIESub20Info); + byteCount = 2; + pIePresent = ( (tDot11fIESub20Info* )(pFrm + pIe->offset + offset * i ))->present; + break; case SigIeTSFInfo: offset = sizeof(tDot11fIETSFInfo); byteCount = 4; @@ -21848,8 +22100,7 @@ static tANI_U32 GetPackedSizeCore(tpAniSirGlobal pCtx, break; case SigIeQComVendorIE: offset = sizeof(tDot11fIEQComVendorIE); - byteCount = 2; - pIePresent = ( (tDot11fIEQComVendorIE* )(pFrm + pIe->offset + offset * i ))->present; + status |= dot11fGetPackedIEQComVendorIE(pCtx, ( tDot11fIEQComVendorIE* )(pFrm + pIe->offset + offset * i ), pnNeeded); break; case SigIeQOSCapsAp: offset = sizeof(tDot11fIEQOSCapsAp); @@ -24158,6 +24409,36 @@ tANI_U32 dot11fPackIeIGTK(tpAniSirGlobal pCtx, return DOT11F_PARSE_SUCCESS; } /* End dot11fPackIeIGTK. */ +tANI_U32 dot11fPackIeMccChanInfo(tpAniSirGlobal pCtx, + tDot11fIEMccChanInfo *pSrc, + tANI_U8 *pBuf, + tANI_U32 nBuf, + tANI_U32 *pnConsumed) +{ + tANI_U8* pIeLen = 0; + tANI_U32 nConsumedOnEntry = *pnConsumed; + tANI_U32 nNeeded = 0U; + nNeeded += 1; + while ( pSrc->present ) + { + if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW; + *pBuf = 1; + ++pBuf; ++(*pnConsumed); + pIeLen = pBuf; + ++pBuf; ++(*pnConsumed); + *pBuf = pSrc->channel; + *pnConsumed += 1; + // fieldsEndFlag = 1 + break; + } + (void)pCtx; + if (pIeLen) + { + *pIeLen = *pnConsumed - nConsumedOnEntry - 2; + } + return DOT11F_PARSE_SUCCESS; +} /* End dot11fPackIeMccChanInfo. */ + tANI_U32 dot11fPackIeR0KH_ID(tpAniSirGlobal pCtx, tDot11fIER0KH_ID *pSrc, tANI_U8 *pBuf, @@ -24218,6 +24499,39 @@ tANI_U32 dot11fPackIeR1KH_ID(tpAniSirGlobal pCtx, return DOT11F_PARSE_SUCCESS; } /* End dot11fPackIeR1KH_ID. */ +tANI_U32 dot11fPackIeSub20Info(tpAniSirGlobal pCtx, + tDot11fIESub20Info *pSrc, + tANI_U8 *pBuf, + tANI_U32 nBuf, + tANI_U32 *pnConsumed) +{ + tANI_U8* pIeLen = 0; + tANI_U32 nConsumedOnEntry = *pnConsumed; + tANI_U32 nNeeded = 0U; + nNeeded += 2; + while ( pSrc->present ) + { + if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW; + *pBuf = 2; + ++pBuf; ++(*pnConsumed); + pIeLen = pBuf; + ++pBuf; ++(*pnConsumed); + *pBuf = pSrc->capability; + *pnConsumed += 1; + pBuf += 1; + *pBuf = pSrc->csa_chanwidth; + *pnConsumed += 1; + // fieldsEndFlag = 1 + break; + } + (void)pCtx; + if (pIeLen) + { + *pIeLen = *pnConsumed - nConsumedOnEntry - 2; + } + return DOT11F_PARSE_SUCCESS; +} /* End dot11fPackIeSub20Info. */ + tANI_U32 dot11fPackIeTSFInfo(tpAniSirGlobal pCtx, tDot11fIETSFInfo *pSrc, tANI_U8 *pBuf, @@ -28269,26 +28583,29 @@ tANI_U32 dot11fPackIeQComVendorIE(tpAniSirGlobal pCtx, tANI_U8* pIeLen = 0; tANI_U32 nConsumedOnEntry = *pnConsumed; tANI_U32 nNeeded = 0U; - nNeeded += 2; + tANI_U32 status = DOT11F_PARSE_SUCCESS; + status = dot11fGetPackedIEQComVendorIE(pCtx, pSrc, &nNeeded); + if ( ! DOT11F_SUCCEEDED( status ) ) return status; while ( pSrc->present ) { if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW; *pBuf = 221; - ++pBuf; ++(*pnConsumed); + ++pBuf; --nBuf; ++(*pnConsumed); pIeLen = pBuf; - ++pBuf; ++(*pnConsumed); + ++pBuf; --nBuf; ++(*pnConsumed); *pBuf = 0x0; - ++pBuf; ++(*pnConsumed); + ++pBuf; --nBuf; ++(*pnConsumed); *pBuf = 0xa0; - ++pBuf; ++(*pnConsumed); + ++pBuf; --nBuf; ++(*pnConsumed); *pBuf = 0xc6; - ++pBuf; ++(*pnConsumed); - *pBuf = pSrc->type; - *pnConsumed += 1; - pBuf += 1; - *pBuf = pSrc->channel; - *pnConsumed += 1; - // fieldsEndFlag = 1 + ++pBuf; --nBuf; ++(*pnConsumed); + status = PackCore(pCtx, + (tANI_U8*)pSrc, + pBuf, + nBuf, + pnConsumed, + FFS_QComVendorIE, + IES_QComVendorIE); break; } (void)pCtx; @@ -28296,7 +28613,7 @@ tANI_U32 dot11fPackIeQComVendorIE(tpAniSirGlobal pCtx, { *pIeLen = *pnConsumed - nConsumedOnEntry - 2; } - return DOT11F_PARSE_SUCCESS; + return status; } /* End dot11fPackIeQComVendorIE. */ tANI_U32 dot11fPackIeQOSCapsAp(tpAniSirGlobal pCtx, @@ -31086,6 +31403,33 @@ tANI_U32 dot11fPackAssocRequest(tpAniSirGlobal pCtx, tDot11fAssocRequest *pFrm, FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->vendor2_ie.VHTOperation.basicMCSSet, 2); } } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("QComVendorIE:\n")); + if (!pFrm->QComVendorIE.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } + } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("to:\n")); FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), pBuf, nBuf); } @@ -32042,6 +32386,33 @@ tANI_U32 dot11fPackAssocResponse(tpAniSirGlobal pCtx, tDot11fAssocResponse *pFrm FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->vendor2_ie.VHTOperation.basicMCSSet, 2); } } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("QComVendorIE:\n")); + if (!pFrm->QComVendorIE.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } + } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("to:\n")); FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), pBuf, nBuf); } @@ -33412,8 +33783,25 @@ tANI_U32 dot11fPackBeacon(tpAniSirGlobal pCtx, tDot11fBeacon *pFrm, tANI_U8 *pBu } else { - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.type, 1); - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.channel, 1); + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("ESEVersion:\n")); if (!pFrm->ESEVersion.present) @@ -34327,8 +34715,25 @@ tANI_U32 dot11fPackBeacon2(tpAniSirGlobal pCtx, tDot11fBeacon2 *pFrm, tANI_U8 *p } else { - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.type, 1); - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.channel, 1); + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("ESEVersion:\n")); if (!pFrm->ESEVersion.present) @@ -35423,8 +35828,25 @@ tANI_U32 dot11fPackBeaconIEs(tpAniSirGlobal pCtx, tDot11fBeaconIEs *pFrm, tANI_U } else { - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.type, 1); - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.channel, 1); + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("to:\n")); FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), pBuf, nBuf); @@ -38468,8 +38890,25 @@ tANI_U32 dot11fPackProbeResponse(tpAniSirGlobal pCtx, tDot11fProbeResponse *pFrm } else { - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.type, 1); - FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.channel, 1); + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("ESEVersion:\n")); if (!pFrm->ESEVersion.present) @@ -39652,6 +40091,33 @@ tANI_U32 dot11fPackReAssocRequest(tpAniSirGlobal pCtx, tDot11fReAssocRequest *pF FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->vendor2_ie.VHTOperation.basicMCSSet, 2); } } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("QComVendorIE:\n")); + if (!pFrm->QComVendorIE.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } + } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("to:\n")); FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), pBuf, nBuf); } @@ -40615,6 +41081,33 @@ tANI_U32 dot11fPackReAssocResponse(tpAniSirGlobal pCtx, tDot11fReAssocResponse * FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->vendor2_ie.VHTOperation.basicMCSSet, 2); } } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("QComVendorIE:\n")); + if (!pFrm->QComVendorIE.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("MccChanInfo:\n")); + if (!pFrm->QComVendorIE.MccChanInfo.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.MccChanInfo.channel, 1); + } + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Sub20Info:\n")); + if (!pFrm->QComVendorIE.Sub20Info.present) + { + FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n")); + } + else + { + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.capability, 1); + FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.Sub20Info.csa_chanwidth, 1); + } + } FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("to:\n")); FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), pBuf, nBuf); } @@ -42903,12 +43396,18 @@ static tANI_U32 PackCore(tpAniSirGlobal pCtx, case SigIeIGTK: status |= dot11fPackIeIGTK(pCtx, ( tDot11fIEIGTK* )(pSrc + pIe->offset + sizeof(tDot11fIEIGTK) * i ), pBufRemaining, nBufRemaining, &len); break; + case SigIeMccChanInfo: + status |= dot11fPackIeMccChanInfo(pCtx, ( tDot11fIEMccChanInfo* )(pSrc + pIe->offset + sizeof(tDot11fIEMccChanInfo) * i ), pBufRemaining, nBufRemaining, &len); + break; case SigIeR0KH_ID: status |= dot11fPackIeR0KH_ID(pCtx, ( tDot11fIER0KH_ID* )(pSrc + pIe->offset + sizeof(tDot11fIER0KH_ID) * i ), pBufRemaining, nBufRemaining, &len); break; case SigIeR1KH_ID: status |= dot11fPackIeR1KH_ID(pCtx, ( tDot11fIER1KH_ID* )(pSrc + pIe->offset + sizeof(tDot11fIER1KH_ID) * i ), pBufRemaining, nBufRemaining, &len); break; + case SigIeSub20Info: + status |= dot11fPackIeSub20Info(pCtx, ( tDot11fIESub20Info* )(pSrc + pIe->offset + sizeof(tDot11fIESub20Info) * i ), pBufRemaining, nBufRemaining, &len); + break; case SigIeTSFInfo: status |= dot11fPackIeTSFInfo(pCtx, ( tDot11fIETSFInfo* )(pSrc + pIe->offset + sizeof(tDot11fIETSFInfo) * i ), pBufRemaining, nBufRemaining, &len); break; diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c index 3be21920eb4f..501cd53b3372 100644 --- a/CORE/SYS/legacy/src/utils/src/parserApi.c +++ b/CORE/SYS/legacy/src/utils/src/parserApi.c @@ -356,11 +356,47 @@ populate_dot11f_avoid_channel_ie(tpAniSirGlobal mac_ctx, return; dot11f->present = true; - dot11f->type = QCOM_VENDOR_IE_MCC_AVOID_CH; - dot11f->channel = pe_session->currentOperChannel; + dot11f->MccChanInfo.present = true; + dot11f->MccChanInfo.channel = pe_session->currentOperChannel; } #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ +#ifdef FEATURE_WLAN_SUB_20_MHZ +/** + * populate_dot11f_sub_20_channel_width_ie() - Populate a sDot11fIEQComVendorIE + * @mac_ctx_ptr: Pointer to Global MAC structure + * @dot11f_ptr: Pointer to Address of a sDot11fIEQComVendorIE to be filled in + * @pe_session: PE session entry + * + * Return: none + */ +void +populate_dot11f_sub_20_channel_width_ie( + tpAniSirGlobal mac_ctx_ptr, + tDot11fIEQComVendorIE *dot11f_ptr, + tpPESession pe_session) +{ + if (mac_ctx_ptr->sub20_dynamic_channelwidth == 0) + return; + + if (LIM_IS_AP_ROLE(pe_session) || + LIM_IS_STA_ROLE(pe_session)) { + dot11f_ptr->present = true; + dot11f_ptr->Sub20Info.present = true; + dot11f_ptr->Sub20Info.capability = + mac_ctx_ptr->sub20_dynamic_channelwidth; + } + + if (LIM_IS_AP_ROLE(pe_session) && + pe_session->dfsIncludeChanSwIe == VOS_TRUE) { + dot11f_ptr->present = true; + dot11f_ptr->Sub20Info.present = true; + dot11f_ptr->Sub20Info.csa_chanwidth = + pe_session->lim_sub20_channel_switch_bandwidth; + } +} +#endif + void PopulateDot11fChanSwitchWrapper(tpAniSirGlobal pMac, tDot11fIEChannelSwitchWrapper *pDot11f, @@ -2549,6 +2585,11 @@ tSirRetStatus sirConvertProbeFrame2Struct(tpAniSirGlobal pMac, sizeof(tDot11fIEVHTOperation)); } + if (pr->QComVendorIE.present && + pr->QComVendorIE.Sub20Info.present) { + pProbeResp->vendor_sub20_capability = + pr->QComVendorIE.Sub20Info.capability; + } vos_mem_free(pr); return eSIR_SUCCESS; @@ -2780,6 +2821,11 @@ sirConvertAssocReqFrame2Struct(tpAniSirGlobal pMac, } } + if (ar->QComVendorIE.present && + ar->QComVendorIE.Sub20Info.present) + pAssocReq->vendor_sub20_capability = + ar->QComVendorIE.Sub20Info.capability; + vos_mem_free(ar); return eSIR_SUCCESS; @@ -3008,6 +3054,11 @@ sirConvertAssocRespFrame2Struct(tpAniSirGlobal pMac, limLogVHTOperation(pMac, &pAssocRsp->VHTOperation); } + if (ar.QComVendorIE.present && + ar.QComVendorIE.Sub20Info.present) + pAssocRsp->vendor_sub20_capability = + ar.QComVendorIE.Sub20Info.capability; + return eSIR_SUCCESS; } // End sirConvertAssocRespFrame2Struct. @@ -3805,6 +3856,11 @@ sirParseBeaconIE(tpAniSirGlobal pMac, sizeof(tDot11fIEVHTOperation)); } + if (pBies->QComVendorIE.present && + pBies->QComVendorIE.Sub20Info.present) + pBeaconStruct->vendor_sub20_capability = + pBies->QComVendorIE.Sub20Info.capability; + vos_mem_free(pBies); return eSIR_SUCCESS; } // End sirParseBeaconIE. @@ -4161,13 +4217,20 @@ sirConvertBeaconFrame2Struct(tpAniSirGlobal pMac, if(pBeacon->QComVendorIE.present) { pBeaconStruct->AvoidChannelIE.present = pBeacon->QComVendorIE.present; - pBeaconStruct->AvoidChannelIE.type = - pBeacon->QComVendorIE.type; - pBeaconStruct->AvoidChannelIE.channel = - pBeacon->QComVendorIE.channel; + pBeaconStruct->AvoidChannelIE.MccChanInfo.present = + pBeacon->QComVendorIE.MccChanInfo.present; + pBeaconStruct->AvoidChannelIE.MccChanInfo.channel = + pBeacon->QComVendorIE.MccChanInfo.channel; } #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ + if (pBeacon->QComVendorIE.present && + pBeacon->QComVendorIE.Sub20Info.present && + pBeacon->QComVendorIE.Sub20Info.csa_chanwidth) { + pBeaconStruct->vendor_sub20_capability = + pBeacon->QComVendorIE.Sub20Info.capability; + } + vos_mem_free(pBeacon); return eSIR_SUCCESS; diff --git a/CORE/VOSS/inc/vos_nvitem.h b/CORE/VOSS/inc/vos_nvitem.h index 9acc1d040a08..b1522720b9c4 100644 --- a/CORE/VOSS/inc/vos_nvitem.h +++ b/CORE/VOSS/inc/vos_nvitem.h @@ -306,4 +306,8 @@ bool vos_is_dsrc_channel(uint16_t); uint32_t vos_nv_get_channel_flags(uint32_t rf_channel); int vos_update_band(uint8_t band); void vos_reset_global_reg_params(void); +bool vos_is_channel_support_sub20(uint16_t operation_channel, + enum phy_ch_width channel_width, + uint16_t secondary_channel); +uint8_t vos_phy_channel_width_to_sub20(enum phy_ch_width ch_width); #endif // __VOS_NVITEM_H diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c index 1e80f159b685..e64282518847 100644 --- a/CORE/VOSS/src/vos_nvitem.c +++ b/CORE/VOSS/src/vos_nvitem.c @@ -1666,6 +1666,67 @@ bool vos_is_dsrc_channel(uint16_t center_freq) } return 0; } + +/** + * vos_is_channel_support_sub20() - check channel + * support sub20 channel width + * @oper_ch: operating channel + * @ch_width: channel width + * @sec_ch: secondary channel + * + * Return: true or false + */ +bool vos_is_channel_support_sub20(uint16_t operation_channel, + enum phy_ch_width channel_width, + uint16_t secondary_channel) +{ + eNVChannelEnabledType channel_state; + + if (VOS_IS_CHANNEL_5GHZ(operation_channel)) { + const struct bonded_chan *bonded_chan_ptr; + + channel_state = + vos_search_5g_bonded_channel(operation_channel, + channel_width, + &bonded_chan_ptr); + if (NV_CHANNEL_DISABLE == channel_state) + return false; + + channel_state = + vos_get_5g_bonded_channel_state(operation_channel, + channel_width, + bonded_chan_ptr); + if (NV_CHANNEL_DISABLE == channel_state) + return false; + + } else if (VOS_IS_CHANNEL_24GHZ(operation_channel)) { + channel_state = + vos_get_2g_bonded_channel_state(operation_channel, + channel_width, + secondary_channel); + if (NV_CHANNEL_DISABLE == channel_state) + return false; + } + + return true; +} + +/** + * vos_phy_channel_width_to_sub20: convert phy channel width + * to sub20 channel width + * @channel_width: phy channel width + * Return: sub20 channel width + */ +uint8_t vos_phy_channel_width_to_sub20(enum phy_ch_width channel_width) +{ + if (channel_width == CH_WIDTH_5MHZ) + return SUB20_MODE_5MHZ; + else if (channel_width == CH_WIDTH_10MHZ) + return SUB20_MODE_10MHZ; + else + return SUB20_MODE_NONE; +} + /** * vos_update_band: Update the band * @eBand: Band value diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h index baaf24e199d2..e37bc02a1802 100644 --- a/CORE/WDA/inc/legacy/halMsgApi.h +++ b/CORE/WDA/inc/legacy/halMsgApi.h @@ -314,6 +314,7 @@ typedef struct tANI_U8 nonRoamReassoc; uint32_t nss; /* Number of spatial streams supported */ tANI_U8 max_amsdu_num; + uint8_t channelwidth; } tAddStaParams, *tpAddStaParams; @@ -545,6 +546,7 @@ typedef struct uint32_t tx_aggregation_size; uint32_t rx_aggregation_size; uint16_t beacon_tx_rate; + uint8_t channelwidth; } tAddBssParams, * tpAddBssParams; typedef struct @@ -1037,6 +1039,8 @@ typedef struct tANI_U8 dot11_mode; uint8_t restart_on_chan_switch; + + uint32_t channelwidth; }tSwitchChannelParams, *tpSwitchChannelParams; typedef struct CSAOffloadParams { @@ -1047,6 +1051,7 @@ typedef struct CSAOffloadParams { tANI_U8 new_op_class; /* New operating class */ tANI_U8 new_ch_freq_seg1; /* Channel Center frequency 1 */ tANI_U8 new_ch_freq_seg2; /* Channel Center frequency 2 */ + tANI_U8 new_sub20_channelwidth; /* 5MHz or 10Mhz channel width */ tANI_U32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */ tSirMacAddr bssId; }*tpCSAOffloadParams, tCSAOffloadParams; |
