Loading core/hdd/src/wlan_hdd_cfg80211.h +0 −2 Original line number Diff line number Diff line Loading @@ -73,8 +73,6 @@ struct hdd_context; #define VENDOR1_AP_OUI_TYPE "\x00\xE0\x4C" #define VENDOR1_AP_OUI_TYPE_SIZE 3 #define WLAN_BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126 #define WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 #define BASIC_RATE_MASK 0x80 #define RATE_MASK 0x7f Loading core/hdd/src/wlan_hdd_hostapd.c +45 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,22 @@ #define MAX_SAP_NUM_CONCURRENCY_WITH_NAN 1 #endif #ifndef BSS_MEMBERSHIP_SELECTOR_HT_PHY #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 #endif #ifndef BSS_MEMBERSHIP_SELECTOR_VHT_PHY #define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126 #endif #ifndef BSS_MEMBERSHIP_SELECTOR_SAE_H2E #define BSS_MEMBERSHIP_SELECTOR_SAE_H2E 123 #endif #ifndef BSS_MEMBERSHIP_SELECTOR_HE_PHY #define BSS_MEMBERSHIP_SELECTOR_HE_PHY 122 #endif /* * 11B, 11G Rate table include Basic rate and Extended rate * The IDX field is the rate index Loading Loading @@ -3964,15 +3980,36 @@ static void wlan_hdd_check_11gmode(const u8 *ie, u8 *require_ht, } } else { if ((BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY) == ie[i]) BSS_MEMBERSHIP_SELECTOR_HT_PHY) == ie[i]) *require_ht = true; else if ((BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_VHT_PHY) == ie[i]) BSS_MEMBERSHIP_SELECTOR_VHT_PHY) == ie[i]) *require_vht = true; } } } /** * wlan_hdd_check_h2e() - check SAE/H2E require flag from support rate sets * @rs: support rate or extended support rate set * @require_h2e: pointer to store require h2e flag * * Return: none */ static void wlan_hdd_check_h2e(const tSirMacRateSet *rs, bool *require_h2e) { uint8_t i; if (!rs || !require_h2e) return; for (i = 0; i < rs->numRates; i++) { if (rs->rate[i] == (BASIC_RATE_MASK | BSS_MEMBERSHIP_SELECTOR_SAE_H2E)) *require_h2e = true; } } #ifdef WLAN_FEATURE_11AX /** * wlan_hdd_add_extn_ie() - add extension IE Loading Loading @@ -5584,6 +5621,12 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, config->extended_rates.rate, config->extended_rates.numRates); } config->require_h2e = false; wlan_hdd_check_h2e(&config->supported_rates, &config->require_h2e); wlan_hdd_check_h2e(&config->extended_rates, &config->require_h2e); } if (!cds_is_sub_20_mhz_enabled()) Loading core/mac/src/pe/lim/lim_assoc_utils.c +46 −4 Original line number Diff line number Diff line Loading @@ -1538,6 +1538,41 @@ static bool lim_check_valid_mcs_for_nss(struct pe_session *session, } #endif /** * lim_remove_membership_selectors() - remove elements from rate set * * @rate_set: pointer to rate set * * Removes the BSS membership selector elements from the rate set, and keep * only the rates * * Return: none */ static void lim_remove_membership_selectors(tSirMacRateSet *rate_set) { int i, selector_count = 0; for (i = 0; i < rate_set->numRates; i++) { if ((rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_VHT_PHY)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_GLK)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_EPD)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_SAE_H2E)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_HE_PHY))) selector_count++; if (i + selector_count < rate_set->numRates) rate_set->rate[i] = rate_set->rate[i + selector_count]; } rate_set->numRates -= selector_count; } QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac, struct supported_rates *pRates, uint8_t *pSupportedMCSSet, Loading Loading @@ -1586,6 +1621,10 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac, } } else tempRateSet2.numRates = 0; lim_remove_membership_selectors(&tempRateSet); lim_remove_membership_selectors(&tempRateSet2); if ((tempRateSet.numRates + tempRateSet2.numRates) > WLAN_SUPPORTED_RATES_IE_MAX_LEN) { pe_err("more than 12 rates in CFG"); Loading Loading @@ -1742,8 +1781,8 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac, * the rate sets received in the Assoc request on AP * or Beacon/Probe Response from peer in IBSS. * * 1. It makes the intersection between our own rate Sat * and extemcded rate set and the ones received in the * 1. It makes the intersection between our own rate set * and extended rate set and the ones received in the * association request. * 2. It creates a combined rate set of 12 rates max which * comprised the basic and extended rates Loading Loading @@ -1793,13 +1832,16 @@ QDF_STATUS lim_populate_matching_rate_set(struct mac_context *mac_ctx, temp_rate_set2.numRates = 0; } lim_remove_membership_selectors(&temp_rate_set); lim_remove_membership_selectors(&temp_rate_set2); /* * absolute sum of both num_rates should be less than 12. following * 16-bit sum avoids false codition where 8-bit arthematic overflow * 16-bit sum avoids false condition where 8-bit arithmetic overflow * might have caused total sum to be less than 12 */ if (((uint16_t)temp_rate_set.numRates + (uint16_t)temp_rate_set2.numRates) > 12) { (uint16_t)temp_rate_set2.numRates) > SIR_MAC_MAX_NUMBER_OF_RATES) { pe_err("more than 12 rates in CFG"); return QDF_STATUS_E_FAILURE; } Loading core/mac/src/sys/legacy/src/utils/src/parser_api.c +10 −9 Original line number Diff line number Diff line Loading @@ -635,7 +635,7 @@ populate_dot11f_ext_supp_rates(struct mac_context *mac, uint8_t nChannelNum, struct pe_session *pe_session) { QDF_STATUS nsir_status; qdf_size_t nRates = 0; qdf_size_t n_rates = 0; uint8_t rates[WLAN_SUPPORTED_RATES_IE_MAX_LEN]; /* Use the ext rates present in session entry whenever nChannelNum is set to OPERATIONAL Loading @@ -644,28 +644,29 @@ populate_dot11f_ext_supp_rates(struct mac_context *mac, uint8_t nChannelNum, */ if (POPULATE_DOT11F_RATES_OPERATIONAL == nChannelNum) { if (pe_session) { nRates = pe_session->extRateSet.numRates; n_rates = pe_session->extRateSet.numRates; qdf_mem_copy(rates, pe_session->extRateSet.rate, nRates); n_rates); } else { pe_err("no session context exists while populating Operational Rate Set"); } } else if (HIGHEST_24GHZ_CHANNEL_NUM >= nChannelNum) { nRates = mac->mlme_cfg->rates.ext_opr_rate_set.len; n_rates = mac->mlme_cfg->rates.ext_opr_rate_set.len; nsir_status = wlan_mlme_get_cfg_str( rates, &mac->mlme_cfg->rates.ext_opr_rate_set, &nRates); &mac->mlme_cfg->rates.ext_opr_rate_set, &n_rates); if (QDF_IS_STATUS_ERROR(nsir_status)) { nRates = 0; n_rates = 0; pe_err("Failed to retrieve nItem from CFG status: %d", (nsir_status)); return nsir_status; } } if (0 != nRates) { pDot11f->num_rates = (uint8_t) nRates; qdf_mem_copy(pDot11f->rates, rates, nRates); if (0 != n_rates) { pe_debug("ext supp rates present, num %d", (uint8_t)n_rates); pDot11f->num_rates = (uint8_t)n_rates; qdf_mem_copy(pDot11f->rates, rates, n_rates); pDot11f->present = 1; } Loading core/sap/inc/sap_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -529,6 +529,7 @@ struct sap_config { uint8_t long_retry_limit; tSirMacRateSet supported_rates; tSirMacRateSet extended_rates; bool require_h2e; enum sap_acs_dfs_mode acs_dfs_mode; struct hdd_channel_info *channel_info; uint32_t channel_info_count; Loading Loading
core/hdd/src/wlan_hdd_cfg80211.h +0 −2 Original line number Diff line number Diff line Loading @@ -73,8 +73,6 @@ struct hdd_context; #define VENDOR1_AP_OUI_TYPE "\x00\xE0\x4C" #define VENDOR1_AP_OUI_TYPE_SIZE 3 #define WLAN_BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126 #define WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 #define BASIC_RATE_MASK 0x80 #define RATE_MASK 0x7f Loading
core/hdd/src/wlan_hdd_hostapd.c +45 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,22 @@ #define MAX_SAP_NUM_CONCURRENCY_WITH_NAN 1 #endif #ifndef BSS_MEMBERSHIP_SELECTOR_HT_PHY #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 #endif #ifndef BSS_MEMBERSHIP_SELECTOR_VHT_PHY #define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126 #endif #ifndef BSS_MEMBERSHIP_SELECTOR_SAE_H2E #define BSS_MEMBERSHIP_SELECTOR_SAE_H2E 123 #endif #ifndef BSS_MEMBERSHIP_SELECTOR_HE_PHY #define BSS_MEMBERSHIP_SELECTOR_HE_PHY 122 #endif /* * 11B, 11G Rate table include Basic rate and Extended rate * The IDX field is the rate index Loading Loading @@ -3964,15 +3980,36 @@ static void wlan_hdd_check_11gmode(const u8 *ie, u8 *require_ht, } } else { if ((BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY) == ie[i]) BSS_MEMBERSHIP_SELECTOR_HT_PHY) == ie[i]) *require_ht = true; else if ((BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_VHT_PHY) == ie[i]) BSS_MEMBERSHIP_SELECTOR_VHT_PHY) == ie[i]) *require_vht = true; } } } /** * wlan_hdd_check_h2e() - check SAE/H2E require flag from support rate sets * @rs: support rate or extended support rate set * @require_h2e: pointer to store require h2e flag * * Return: none */ static void wlan_hdd_check_h2e(const tSirMacRateSet *rs, bool *require_h2e) { uint8_t i; if (!rs || !require_h2e) return; for (i = 0; i < rs->numRates; i++) { if (rs->rate[i] == (BASIC_RATE_MASK | BSS_MEMBERSHIP_SELECTOR_SAE_H2E)) *require_h2e = true; } } #ifdef WLAN_FEATURE_11AX /** * wlan_hdd_add_extn_ie() - add extension IE Loading Loading @@ -5584,6 +5621,12 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, config->extended_rates.rate, config->extended_rates.numRates); } config->require_h2e = false; wlan_hdd_check_h2e(&config->supported_rates, &config->require_h2e); wlan_hdd_check_h2e(&config->extended_rates, &config->require_h2e); } if (!cds_is_sub_20_mhz_enabled()) Loading
core/mac/src/pe/lim/lim_assoc_utils.c +46 −4 Original line number Diff line number Diff line Loading @@ -1538,6 +1538,41 @@ static bool lim_check_valid_mcs_for_nss(struct pe_session *session, } #endif /** * lim_remove_membership_selectors() - remove elements from rate set * * @rate_set: pointer to rate set * * Removes the BSS membership selector elements from the rate set, and keep * only the rates * * Return: none */ static void lim_remove_membership_selectors(tSirMacRateSet *rate_set) { int i, selector_count = 0; for (i = 0; i < rate_set->numRates; i++) { if ((rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_VHT_PHY)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_GLK)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_EPD)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_SAE_H2E)) || (rate_set->rate[i] == (WLAN_BASIC_RATE_MASK | WLAN_BSS_MEMBERSHIP_SELECTOR_HE_PHY))) selector_count++; if (i + selector_count < rate_set->numRates) rate_set->rate[i] = rate_set->rate[i + selector_count]; } rate_set->numRates -= selector_count; } QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac, struct supported_rates *pRates, uint8_t *pSupportedMCSSet, Loading Loading @@ -1586,6 +1621,10 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac, } } else tempRateSet2.numRates = 0; lim_remove_membership_selectors(&tempRateSet); lim_remove_membership_selectors(&tempRateSet2); if ((tempRateSet.numRates + tempRateSet2.numRates) > WLAN_SUPPORTED_RATES_IE_MAX_LEN) { pe_err("more than 12 rates in CFG"); Loading Loading @@ -1742,8 +1781,8 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac, * the rate sets received in the Assoc request on AP * or Beacon/Probe Response from peer in IBSS. * * 1. It makes the intersection between our own rate Sat * and extemcded rate set and the ones received in the * 1. It makes the intersection between our own rate set * and extended rate set and the ones received in the * association request. * 2. It creates a combined rate set of 12 rates max which * comprised the basic and extended rates Loading Loading @@ -1793,13 +1832,16 @@ QDF_STATUS lim_populate_matching_rate_set(struct mac_context *mac_ctx, temp_rate_set2.numRates = 0; } lim_remove_membership_selectors(&temp_rate_set); lim_remove_membership_selectors(&temp_rate_set2); /* * absolute sum of both num_rates should be less than 12. following * 16-bit sum avoids false codition where 8-bit arthematic overflow * 16-bit sum avoids false condition where 8-bit arithmetic overflow * might have caused total sum to be less than 12 */ if (((uint16_t)temp_rate_set.numRates + (uint16_t)temp_rate_set2.numRates) > 12) { (uint16_t)temp_rate_set2.numRates) > SIR_MAC_MAX_NUMBER_OF_RATES) { pe_err("more than 12 rates in CFG"); return QDF_STATUS_E_FAILURE; } Loading
core/mac/src/sys/legacy/src/utils/src/parser_api.c +10 −9 Original line number Diff line number Diff line Loading @@ -635,7 +635,7 @@ populate_dot11f_ext_supp_rates(struct mac_context *mac, uint8_t nChannelNum, struct pe_session *pe_session) { QDF_STATUS nsir_status; qdf_size_t nRates = 0; qdf_size_t n_rates = 0; uint8_t rates[WLAN_SUPPORTED_RATES_IE_MAX_LEN]; /* Use the ext rates present in session entry whenever nChannelNum is set to OPERATIONAL Loading @@ -644,28 +644,29 @@ populate_dot11f_ext_supp_rates(struct mac_context *mac, uint8_t nChannelNum, */ if (POPULATE_DOT11F_RATES_OPERATIONAL == nChannelNum) { if (pe_session) { nRates = pe_session->extRateSet.numRates; n_rates = pe_session->extRateSet.numRates; qdf_mem_copy(rates, pe_session->extRateSet.rate, nRates); n_rates); } else { pe_err("no session context exists while populating Operational Rate Set"); } } else if (HIGHEST_24GHZ_CHANNEL_NUM >= nChannelNum) { nRates = mac->mlme_cfg->rates.ext_opr_rate_set.len; n_rates = mac->mlme_cfg->rates.ext_opr_rate_set.len; nsir_status = wlan_mlme_get_cfg_str( rates, &mac->mlme_cfg->rates.ext_opr_rate_set, &nRates); &mac->mlme_cfg->rates.ext_opr_rate_set, &n_rates); if (QDF_IS_STATUS_ERROR(nsir_status)) { nRates = 0; n_rates = 0; pe_err("Failed to retrieve nItem from CFG status: %d", (nsir_status)); return nsir_status; } } if (0 != nRates) { pDot11f->num_rates = (uint8_t) nRates; qdf_mem_copy(pDot11f->rates, rates, nRates); if (0 != n_rates) { pe_debug("ext supp rates present, num %d", (uint8_t)n_rates); pDot11f->num_rates = (uint8_t)n_rates; qdf_mem_copy(pDot11f->rates, rates, n_rates); pDot11f->present = 1; } Loading
core/sap/inc/sap_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -529,6 +529,7 @@ struct sap_config { uint8_t long_retry_limit; tSirMacRateSet supported_rates; tSirMacRateSet extended_rates; bool require_h2e; enum sap_acs_dfs_mode acs_dfs_mode; struct hdd_channel_info *channel_info; uint32_t channel_info_count; Loading