mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: Unlink hidden bss entry from kernel
Kernel maintains a list of bss and it adds/updates the bss entries whenever driver informs it. When driver receives beacon or probe response from any ap it informs kernel to update the bss list and whenever it disconnects with the AP driver unlink the bss in the kernel. If the AP is hidden, when driver gets beacon from this hidden AP it informs the kernel to update the bss list. kernel add this entry to it's bss list with NULL SSID. Now when driver receives probe response from this hidden AP it again informs the kernel to update the bss list, as this is probe response and ssid is not hidden, kernel treats this entry as new entry and adds it to its bss list and links this entry to the older hidden AP entry (But still these are two entries for hidden AP). When driver gets disconnect from the AP it unlink the bss entry corresponding to this AP from kernel's bss list, but since there are two entries for the same AP as the AP is a hidden AP, driver should clear hidden AP entry (Which was added as part of beacon) which is not happening currently. Now when AP moves from hidden to broadcasting SSID in it's beacon, kernel drops this beacon entry as its confusing because there is already a beacon entry with hidden bss for this AP. During connection driver tries to update the entry in the kernel and it fails as kernel drops the beacon resulting into the connection failure. To resolve this issue, whenever driver unlink the bss entries from the kernel bss list unlink the hidden bss entries also from the kernel's bss list. Change-Id: I03a8517878b3db769bf28a157579179e1dd762e2 CRs-Fixed: 2488887
This commit is contained in:
parent
cc7142064b
commit
3d8b0ae632
3 changed files with 28 additions and 17 deletions
|
|
@ -1890,7 +1890,9 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
|
|||
eCSR_ROAM_RESULT_DISASSOC_IND == roam_result ||
|
||||
eCSR_ROAM_LOSTLINK == roam_status) {
|
||||
wlan_hdd_cfg80211_unlink_bss(adapter,
|
||||
sta_ctx->conn_info.bssid.bytes);
|
||||
sta_ctx->conn_info.bssid.bytes,
|
||||
sta_ctx->conn_info.ssid.SSID.ssId,
|
||||
sta_ctx->conn_info.ssid.SSID.length);
|
||||
sme_remove_bssid_from_scan_list(mac_handle,
|
||||
sta_ctx->conn_info.bssid.bytes);
|
||||
}
|
||||
|
|
@ -3389,10 +3391,24 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
|
|||
roam_info->status_code) ||
|
||||
(eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE ==
|
||||
roam_info->status_code)))) {
|
||||
uint8_t *ssid;
|
||||
uint8_t ssid_len;
|
||||
|
||||
if (roam_info && roam_info->pProfile &&
|
||||
roam_info->pProfile->SSIDs.SSIDList) {
|
||||
ssid_len =
|
||||
roam_info->pProfile->SSIDs.
|
||||
SSIDList[0].SSID.length;
|
||||
ssid = roam_info->pProfile->SSIDs.
|
||||
SSIDList[0].SSID.ssId;
|
||||
} else {
|
||||
ssid_len = sta_ctx->conn_info.ssid.SSID.length;
|
||||
ssid = sta_ctx->conn_info.ssid.SSID.ssId;
|
||||
}
|
||||
wlan_hdd_cfg80211_unlink_bss(adapter,
|
||||
roam_info ?
|
||||
roam_info->bssid.bytes :
|
||||
sta_ctx->requested_bssid.bytes);
|
||||
sta_ctx->requested_bssid.bytes, ssid, ssid_len);
|
||||
sme_remove_bssid_from_scan_list(mac_handle,
|
||||
roam_info ?
|
||||
roam_info->bssid.bytes :
|
||||
|
|
|
|||
|
|
@ -15666,23 +15666,14 @@ static int wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
void wlan_hdd_cfg80211_unlink_bss(struct hdd_adapter *adapter,
|
||||
tSirMacAddr bssid)
|
||||
tSirMacAddr bssid, uint8_t *ssid,
|
||||
uint8_t ssid_len)
|
||||
{
|
||||
struct net_device *dev = adapter->dev;
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
struct wiphy *wiphy = wdev->wiphy;
|
||||
struct cfg80211_bss *bss = NULL;
|
||||
|
||||
bss = wlan_cfg80211_get_bss(wiphy, NULL, bssid, NULL, 0);
|
||||
if (!bss) {
|
||||
hdd_err("BSS not present");
|
||||
} else {
|
||||
hdd_debug("cfg80211_unlink_bss called for BSSID "
|
||||
QDF_MAC_ADDR_STR, QDF_MAC_ADDR_ARRAY(bssid));
|
||||
cfg80211_unlink_bss(wiphy, bss);
|
||||
/* cfg80211_get_bss get bss with ref count so release it */
|
||||
cfg80211_put_bss(wiphy, bss);
|
||||
}
|
||||
__wlan_cfg80211_unlink_bss_list(wiphy, bssid, ssid, ssid_len);
|
||||
}
|
||||
|
||||
#ifdef WLAN_ENABLE_AGEIE_ON_SCAN_RESULTS
|
||||
|
|
@ -15844,11 +15835,12 @@ wlan_hdd_inform_bss_frame(struct hdd_adapter *adapter,
|
|||
for (i = 0; i < WLAN_MGMT_TXRX_HOST_MAX_ANTENNA; i++)
|
||||
bss_data.per_chain_rssi[i] = WLAN_INVALID_PER_CHAIN_RSSI;
|
||||
|
||||
hdd_debug("BSSID: " QDF_MAC_ADDR_STR " Channel:%d RSSI:%d TSF %u seq %d",
|
||||
hdd_debug("BSSID: " QDF_MAC_ADDR_STR " Channel:%d RSSI:%d TSF %u seq %d is_prob_resp %d",
|
||||
QDF_MAC_ADDR_ARRAY(bss_data.mgmt->bssid),
|
||||
bss_data.chan->center_freq, (int)(bss_data.rssi / 100),
|
||||
bss_desc->timeStamp[0], ((bss_desc->seq_ctrl.seqNumHi <<
|
||||
HIGH_SEQ_NUM_OFFSET) | bss_desc->seq_ctrl.seqNumLo));
|
||||
HIGH_SEQ_NUM_OFFSET) | bss_desc->seq_ctrl.seqNumLo),
|
||||
bss_desc->fProbeRsp);
|
||||
|
||||
bss_status = wlan_cfg80211_inform_bss_frame_data(wiphy, &bss_data);
|
||||
hdd_ctx->beacon_probe_rsp_cnt_per_scan++;
|
||||
|
|
|
|||
|
|
@ -387,11 +387,14 @@ void wlan_hdd_rso_cmd_status_cb(hdd_handle_t hdd_handle,
|
|||
* interface that BSS might have been lost.
|
||||
* @adapter: adapter
|
||||
* @bssid: bssid which might have been lost
|
||||
* @ssid: SSID
|
||||
* @ssid_len: length of the SSID
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void wlan_hdd_cfg80211_unlink_bss(struct hdd_adapter *adapter,
|
||||
tSirMacAddr bssid);
|
||||
tSirMacAddr bssid, uint8_t *ssid,
|
||||
uint8_t ssid_len);
|
||||
|
||||
void wlan_hdd_cfg80211_acs_ch_select_evt(struct hdd_adapter *adapter);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue