Kaynağa Gözat

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
Abhishek Singh 8 yıl önce
ebeveyn
işleme
cdcc5e7a6f
1 değiştirilmiş dosya ile 17 ekleme ve 1 silme
  1. 17 1
      core/hdd/src/wlan_hdd_assoc.c

+ 17 - 1
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 ==