qcacld-3.0: add OBSS scan param IE to probe response
qcacld-2.0 to qcacld-3.0 propagation Add OBSS scan parameter IE to probe response frame in SoftAP mode. To avoid some station can't find OBSS parameter and do not schedule OBSS scan. Change-Id: If22944b216ff10bafb98b5a2d3e4f2f1abe61333 CRs-Fixed: 909694
This commit is contained in:

committed by
Prakash Dhavali

parent
230175c758
commit
ec9be936cb
@@ -6235,7 +6235,7 @@ static void wlan_hdd_check_11gmode(u8 *pIe, u8 *require_ht, u8 *require_vht,
|
|||||||
* Return: 0 for success non-zero for failure
|
* Return: 0 for success non-zero for failure
|
||||||
*/
|
*/
|
||||||
static int wlan_hdd_add_ie(hdd_adapter_t *pHostapdAdapter, uint8_t *genie,
|
static int wlan_hdd_add_ie(hdd_adapter_t *pHostapdAdapter, uint8_t *genie,
|
||||||
uint8_t *total_ielen, uint8_t *oui,
|
uint16_t *total_ielen, uint8_t *oui,
|
||||||
uint8_t oui_size)
|
uint8_t oui_size)
|
||||||
{
|
{
|
||||||
uint16_t ielen = 0;
|
uint16_t ielen = 0;
|
||||||
@@ -6268,7 +6268,7 @@ static int wlan_hdd_add_ie(hdd_adapter_t *pHostapdAdapter, uint8_t *genie,
|
|||||||
*/
|
*/
|
||||||
static void wlan_hdd_add_hostapd_conf_vsie(hdd_adapter_t *pHostapdAdapter,
|
static void wlan_hdd_add_hostapd_conf_vsie(hdd_adapter_t *pHostapdAdapter,
|
||||||
uint8_t *genie,
|
uint8_t *genie,
|
||||||
uint8_t *total_ielen)
|
uint16_t *total_ielen)
|
||||||
{
|
{
|
||||||
beacon_data_t *pBeacon = pHostapdAdapter->sessionCtx.ap.beacon;
|
beacon_data_t *pBeacon = pHostapdAdapter->sessionCtx.ap.beacon;
|
||||||
int left = pBeacon->tail_len;
|
int left = pBeacon->tail_len;
|
||||||
@@ -6341,7 +6341,7 @@ static void wlan_hdd_add_hostapd_conf_vsie(hdd_adapter_t *pHostapdAdapter,
|
|||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
static void wlan_hdd_add_extra_ie(hdd_adapter_t *pHostapdAdapter,
|
static void wlan_hdd_add_extra_ie(hdd_adapter_t *pHostapdAdapter,
|
||||||
uint8_t *genie, uint8_t *total_ielen,
|
uint8_t *genie, uint16_t *total_ielen,
|
||||||
uint8_t temp_ie_id)
|
uint8_t temp_ie_id)
|
||||||
{
|
{
|
||||||
beacon_data_t *pBeacon = pHostapdAdapter->sessionCtx.ap.beacon;
|
beacon_data_t *pBeacon = pHostapdAdapter->sessionCtx.ap.beacon;
|
||||||
@@ -6492,6 +6492,23 @@ wlan_hdd_cfg80211_alloc_new_beacon(hdd_adapter_t *pAdapter,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef QCA_HT_2040_COEX
|
||||||
|
static void wlan_hdd_add_sap_obss_scan_ie(
|
||||||
|
hdd_adapter_t *hostapd_adapter, uint8_t *ie_buf, uint16_t *ie_len)
|
||||||
|
{
|
||||||
|
if (QDF_SAP_MODE == hostapd_adapter->device_mode) {
|
||||||
|
if (wlan_hdd_get_sap_obss(hostapd_adapter))
|
||||||
|
wlan_hdd_add_extra_ie(hostapd_adapter, ie_buf, ie_len,
|
||||||
|
WLAN_EID_OVERLAP_BSS_SCAN_PARAM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void wlan_hdd_add_sap_obss_scan_ie(
|
||||||
|
hdd_adapter_t *hostapd_adapter, uint8_t *ie_buf, uint16_t *ie_len)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_hdd_cfg80211_update_apies() - update ap mode ies
|
* wlan_hdd_cfg80211_update_apies() - update ap mode ies
|
||||||
* @adapter: Pointer to hostapd adapter
|
* @adapter: Pointer to hostapd adapter
|
||||||
@@ -6501,11 +6518,13 @@ wlan_hdd_cfg80211_alloc_new_beacon(hdd_adapter_t *pAdapter,
|
|||||||
int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter)
|
int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter)
|
||||||
{
|
{
|
||||||
uint8_t *genie;
|
uint8_t *genie;
|
||||||
uint8_t total_ielen = 0;
|
uint16_t total_ielen = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
tsap_Config_t *pConfig;
|
tsap_Config_t *pConfig;
|
||||||
tSirUpdateIE updateIE;
|
tSirUpdateIE updateIE;
|
||||||
beacon_data_t *beacon = NULL;
|
beacon_data_t *beacon = NULL;
|
||||||
|
uint16_t proberesp_ies_len;
|
||||||
|
uint8_t *proberesp_ies = NULL;
|
||||||
|
|
||||||
pConfig = &adapter->sessionCtx.ap.sapConfig;
|
pConfig = &adapter->sessionCtx.ap.sapConfig;
|
||||||
beacon = adapter->sessionCtx.ap.beacon;
|
beacon = adapter->sessionCtx.ap.beacon;
|
||||||
@@ -6559,18 +6578,8 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef QCA_HT_2040_COEX
|
wlan_hdd_add_sap_obss_scan_ie(adapter, genie, &total_ielen);
|
||||||
if (QDF_SAP_MODE == adapter->device_mode) {
|
|
||||||
tSmeConfigParams smeConfig;
|
|
||||||
qdf_mem_zero(&smeConfig, sizeof(smeConfig));
|
|
||||||
sme_get_config_param(WLAN_HDD_GET_HAL_CTX(adapter),
|
|
||||||
&smeConfig);
|
|
||||||
if (smeConfig.csrConfig.obssEnabled)
|
|
||||||
wlan_hdd_add_extra_ie(adapter, genie,
|
|
||||||
&total_ielen,
|
|
||||||
WLAN_EID_OVERLAP_BSS_SCAN_PARAM);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
qdf_copy_macaddr(&updateIE.bssid, &adapter->macAddressCurrent);
|
qdf_copy_macaddr(&updateIE.bssid, &adapter->macAddressCurrent);
|
||||||
updateIE.smeSessionId = adapter->sessionId;
|
updateIE.smeSessionId = adapter->sessionId;
|
||||||
|
|
||||||
@@ -6596,9 +6605,24 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Added for Probe Response IE */
|
/* Added for Probe Response IE */
|
||||||
|
proberesp_ies = qdf_mem_malloc(beacon->proberesp_ies_len +
|
||||||
|
MAX_GENIE_LEN);
|
||||||
|
if (proberesp_ies == NULL) {
|
||||||
|
hdd_err("mem alloc failed for probe resp ies %d",
|
||||||
|
proberesp_ies_len);
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
qdf_mem_copy(proberesp_ies, beacon->proberesp_ies,
|
||||||
|
beacon->proberesp_ies_len);
|
||||||
|
proberesp_ies_len = beacon->proberesp_ies_len;
|
||||||
|
|
||||||
|
wlan_hdd_add_sap_obss_scan_ie(adapter, proberesp_ies,
|
||||||
|
&proberesp_ies_len);
|
||||||
|
|
||||||
if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) {
|
if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) {
|
||||||
updateIE.ieBufferlength = beacon->proberesp_ies_len;
|
updateIE.ieBufferlength = proberesp_ies_len;
|
||||||
updateIE.pAdditionIEBuffer = (uint8_t *) beacon->proberesp_ies;
|
updateIE.pAdditionIEBuffer = proberesp_ies;
|
||||||
updateIE.append = false;
|
updateIE.append = false;
|
||||||
updateIE.notify = false;
|
updateIE.notify = false;
|
||||||
if (sme_update_add_ie(WLAN_HDD_GET_HAL_CTX(adapter),
|
if (sme_update_add_ie(WLAN_HDD_GET_HAL_CTX(adapter),
|
||||||
@@ -6612,8 +6636,8 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter)
|
|||||||
wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_PROBE_RESP);
|
wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_PROBE_RESP);
|
||||||
} else {
|
} else {
|
||||||
wlansap_update_sap_config_add_ie(pConfig,
|
wlansap_update_sap_config_add_ie(pConfig,
|
||||||
beacon->proberesp_ies,
|
proberesp_ies,
|
||||||
beacon->proberesp_ies_len,
|
proberesp_ies_len,
|
||||||
eUPDATE_IE_PROBE_RESP);
|
eUPDATE_IE_PROBE_RESP);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6641,6 +6665,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter)
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
qdf_mem_free(genie);
|
qdf_mem_free(genie);
|
||||||
|
qdf_mem_free(proberesp_ies);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user