summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornakul kachhwaha <nkachhwa@codeaurora.org>2018-06-18 16:39:58 +0530
committernakul kachhwaha <nkachhwa@codeaurora.org>2018-06-26 15:22:12 +0530
commitaacc47bed53493e5484aed95bc968254b0672a44 (patch)
tree9d906dd988c599c7e7e69c68f1a4d7d45ad4f103
parent174aeb55f6b3e06590a6a096ea1c0828553e8bee (diff)
qcacld-2.0: Restart all SAP while MCC to SCC switch
MBSSID scenario's were not covered under MCC to SCC switch. Handling here by restarting all the active SAP sessions on STA channel. Change-Id: I4db0b44893a197a546055f1dd3f2b846f3382bf4 CRs-Fixed: 2254457
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index a2c9a749ebf5..91785e661b33 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -19667,6 +19667,9 @@ void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *data)
hdd_ap_ctx_t *pHddApCtx;
uint16_t intf_ch = 0, vht_channel_width = 0;
eCsrBand orig_band, new_band;
+ uint16_t ch_width;
+ hdd_adapter_list_node_t *adapter_node = NULL, *next = NULL;
+ VOS_STATUS status;
if ((pHddCtx->cfg_ini->WlanMccToSccSwitchMode == VOS_MCC_TO_SCC_SWITCH_DISABLE)
|| !(vos_concurrent_open_sessions_running()
@@ -19714,6 +19717,7 @@ void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *data)
}
}
}
+ ch_width = pHddApCtx->sapConfig.ch_width_orig;
hddLog(VOS_TRACE_LEVEL_INFO,
FL("SAP restarts due to MCC->SCC switch, orig chan: %d, new chan: %d"),
@@ -19735,14 +19739,28 @@ void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *data)
hdd_sta_state_sap_notify(pHddCtx, STA_NOTIFY_CONNECTED, csa_info);
}else{
#endif
- pHddApCtx->bss_stop_reason = BSS_STOP_DUE_TO_MCC_SCC_SWITCH;
- sme_SelectCBMode(hHal,
- pHddApCtx->sapConfig.SapHw_mode,
- pHddApCtx->sapConfig.channel,
- pHddApCtx->sapConfig.sec_ch,
- &vht_channel_width, pHddApCtx->sapConfig.ch_width_orig);
- wlan_sap_set_vht_ch_width(pHddApCtx->sapContext, vht_channel_width);
- wlan_hdd_restart_sap(ap_adapter);
+ status = hdd_get_front_adapter (pHddCtx, &adapter_node);
+ while (NULL != adapter_node && VOS_STATUS_SUCCESS == status) {
+ ap_adapter = adapter_node->pAdapter;
+ if (ap_adapter && ap_adapter->device_mode == WLAN_HDD_SOFTAP) {
+ if (test_bit(SOFTAP_INIT_DONE, &ap_adapter->event_flags)) {
+ pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(ap_adapter);
+ hHal = WLAN_HDD_GET_HAL_CTX(ap_adapter);
+ pHddApCtx->sapConfig.channel = intf_ch;
+ pHddApCtx->bss_stop_reason = BSS_STOP_DUE_TO_MCC_SCC_SWITCH;
+ sme_SelectCBMode(hHal,
+ pHddApCtx->sapConfig.SapHw_mode,
+ pHddApCtx->sapConfig.channel,
+ pHddApCtx->sapConfig.sec_ch,
+ &vht_channel_width, ch_width);
+ wlan_sap_set_vht_ch_width(pHddApCtx->sapContext, vht_channel_width);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("Restart prev SAP session "));
+ wlan_hdd_restart_sap(ap_adapter);
+ }
+ }
+ status = hdd_get_next_adapter (pHddCtx, adapter_node, &next);
+ adapter_node = next;
+ }
#ifdef WLAN_FEATURE_SAP_TO_FOLLOW_STA_CHAN
}
#endif