Sfoglia il codice sorgente

qcacld-3.0: Inform bss even when start_modules is in progress

While start_modules is in progress, wlan_hdd_validate_context
returns error from inform bss. This results in not forwarding
the frames to the upper layer as well as log flooding.

Don't return error from inform bss if start_modules is in progress.

Change-Id: I7837ef2566eaf3f0b7387e118ff2c46e6b617670
CRs-Fixed: 2037694
Nachiket Kukade 8 anni fa
parent
commit
348ede7be3
1 ha cambiato i file con 20 aggiunte e 3 eliminazioni
  1. 20 3
      core/hdd/src/wlan_hdd_cfg80211.c

+ 20 - 3
core/hdd/src/wlan_hdd_cfg80211.c

@@ -13010,14 +13010,31 @@ struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
 	size_t frame_len = sizeof(struct ieee80211_mgmt) + ie_length;
 	int rssi = 0;
 	hdd_context_t *pHddCtx;
-	int status;
 	struct timespec ts;
 	struct hdd_config *cfg_param;
 
 	pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
-	status = wlan_hdd_validate_context(pHddCtx);
-	if (0 != status)
+
+	/*
+	 * wlan_hdd_validate_context should not be used here, In validate ctx
+	 * start_modules_in_progress or stop_modules_in_progress is validated,
+	 * If the start_modules_in_progress is set to true means the interface
+	 * is not UP yet if the stop_modules_in_progress means that interface
+	 * is already down. So in both the two scenario's driver should not be
+	 * informing bss to kernel. Hence removing the validate context.
+	 */
+
+	if (NULL == pHddCtx || NULL == pHddCtx->config) {
+		hdd_debug("HDD context is Null");
 		return NULL;
+	}
+
+	if (cds_is_driver_recovering() ||
+	    cds_is_load_or_unload_in_progress()) {
+		hdd_debug("Recovery or load/unload in progress. State: 0x%x",
+			  cds_get_driver_state());
+		return NULL;
+	}
 
 	cfg_param = pHddCtx->config;
 	mgmt = qdf_mem_malloc((sizeof(struct ieee80211_mgmt) + ie_length));