Browse Source

qcacld-3.0: Remove unlink BSS from CSA handler

Kernel includes the BSS entry in to the following
data structures.
1. bss list rdev->bss_list
2. bss search tree rdev->bss_tree
It also stores the pointer of the connected bss in
“current_bss” .
If the driver does an unlink of the bss it deletes
the entries from the above data structures,
but does not update the current_bss data structure.
This leaves the current_bss pointing to the
previous deleted bss entry.
Thus, when the next set of newly found bss entries
start finding for the bss entries in the bss_tree,
the comparison with the already freed bss entry
above shall lead to an invalid access.

Fix is to remove unlink BSS from the channel change
notify path as the kernel can take care of it.

Change-Id: Ic0dfa6423db169e63ac80cd5a0f3ce05f0438c5d
CRs-Fixed: 2673629
gaurank kathpalia 5 years ago
parent
commit
e9f6e25870
1 changed files with 0 additions and 5 deletions
  1. 0 5
      core/hdd/src/wlan_hdd_assoc.c

+ 0 - 5
core/hdd/src/wlan_hdd_assoc.c

@@ -4675,7 +4675,6 @@ static void hdd_roam_channel_switch_handler(struct hdd_adapter *adapter,
 	QDF_STATUS status;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter);
-	struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 
 	/* Enable Roaming on STA interface which was disabled before CSA */
 	if (adapter->device_mode == QDF_STA_MODE)
@@ -4693,10 +4692,6 @@ static void hdd_roam_channel_switch_handler(struct hdd_adapter *adapter,
 	chan_change.chan_params.mhz_freq_seg1 =
 		roam_info->chan_info.band_center_freq2;
 
-	/* Flush AP on old channel before adding it again */
-	wlan_hdd_cfg80211_unlink_bss(adapter, sta_ctx->conn_info.bssid.bytes,
-				     sta_ctx->conn_info.ssid.SSID.ssId,
-				     sta_ctx->conn_info.ssid.SSID.length);
 	bss = wlan_hdd_cfg80211_update_bss_db(adapter, roam_info);
 	if (!bss)
 		hdd_err("%s: unable to create BSS entry", adapter->dev->name);