summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@codeaurora.org>2016-09-13 12:45:10 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-21 17:02:58 -0700
commitcdcc5e7a6f1947b85ce3581c3e1d2d21ab311f0c (patch)
treecbe8e1f9e3157242b7a91203ae27e1f886ac0a92
parentca4080369e6fd381a83f2fca08b8c9f3db7260d1 (diff)
qcacld-3.0: Disconnect the session if the connect channel is not valid
qcacld-2.0 to qcacld-3.0 propagation If reg domain changes during connection and the connecting channel is not valid, driver may connect to an invalid channel. In this case wlan_hdd_cfg80211_update_bss_db will return NULL and thus sta will not be registered to TL. This will cause RX frames buffered in TL layer and eventually low resource condition. To avoid this schedule a disconnect for the session if wlan_hdd_cfg80211_update_bss_db returns NULL. Change-Id: I72b62ea7d47f53db55daea5725fa833fd1a45fb8 CRs-Fixed: 1034569
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 1c805a68139e..93a7529b856e 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -2510,10 +2510,26 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
wlan_hdd_cfg80211_update_bss_db(pAdapter,
pRoamInfo);
if (NULL == bss) {
- pr_err("wlan: Not able to create BSS entry\n");
+ hdd_err("wlan: Not able to create BSS entry");
wlan_hdd_netif_queue_control(pAdapter,
WLAN_NETIF_CARRIER_OFF,
WLAN_CONTROL_PATH);
+ if (!hddDisconInProgress) {
+ /*
+ * Here driver was not able to add bss
+ * in cfg80211 database this can happen
+ * if connected channel is not valid,
+ * i.e reg domain was changed during
+ * connection. Queue disconnect for the
+ * session if disconnect is not in
+ * progress.
+ */
+ hdd_err("Disconnecting...");
+ sme_roam_disconnect(
+ WLAN_HDD_GET_HAL_CTX(pAdapter),
+ pAdapter->sessionId,
+ eCSR_DISCONNECT_REASON_UNSPECIFIED);
+ }
return QDF_STATUS_E_FAILURE;
}
if (pRoamInfo->u.pConnectedProfile->AuthType ==