mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Use freq hint in scan for ssid
When Scan db reaches max size, driver deletes the oldest node, so chances are that BSS on 1st freq scanned is removed. This lead to scan for SSID, which will do a scan again on all freqs, and thus we end up in flushing the entry again. TO fix this use freq hint to scan for ssid to quickly find the AP so that required AP remains in scan database as it will be the latest entry. Change-Id: I28849ee97ff1f492d372870c362288206c4ec9a5 CRs-Fixed: 3391899
This commit is contained in:
parent
cf8f04d350
commit
a2377a8de1
3 changed files with 22 additions and 3 deletions
|
|
@ -19750,7 +19750,8 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|||
const u8 *ssid, size_t ssid_len,
|
||||
const u8 *bssid, const u8 *bssid_hint,
|
||||
uint32_t oper_freq,
|
||||
enum nl80211_chan_width ch_width)
|
||||
enum nl80211_chan_width ch_width,
|
||||
uint32_t ch_freq_hint)
|
||||
{
|
||||
int status = 0;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
|
|
@ -19943,6 +19944,8 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|||
roam_profile->ChannelInfo.numOfChannels = 0;
|
||||
}
|
||||
|
||||
roam_profile->freq_hint = ch_freq_hint;
|
||||
|
||||
if (wlan_hdd_cfg80211_check_pmf_valid(roam_profile)) {
|
||||
status = -EINVAL;
|
||||
goto conn_failure;
|
||||
|
|
@ -21759,6 +21762,7 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|||
#endif
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
|
||||
struct hdd_context *hdd_ctx;
|
||||
uint32_t ch_freq_hint = 0;
|
||||
|
||||
hdd_enter();
|
||||
|
||||
|
|
@ -21874,11 +21878,15 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|||
else
|
||||
ch_freq = 0;
|
||||
|
||||
if (req->channel_hint)
|
||||
ch_freq_hint = req->channel_hint->center_freq;
|
||||
|
||||
wlan_hdd_check_ht20_ht40_ind(hdd_ctx, adapter, req);
|
||||
|
||||
status = wlan_hdd_cfg80211_connect_start(adapter, req->ssid,
|
||||
req->ssid_len, req->bssid,
|
||||
bssid_hint, ch_freq, 0);
|
||||
bssid_hint, ch_freq, 0,
|
||||
ch_freq_hint);
|
||||
if (status) {
|
||||
wlan_hdd_cfg80211_clear_privacy(adapter);
|
||||
hdd_err("connect failed");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -662,6 +663,7 @@ struct csr_roam_profile {
|
|||
tCsrKeys Keys;
|
||||
tCsrChannelInfo ChannelInfo;
|
||||
uint32_t op_freq;
|
||||
uint32_t freq_hint;
|
||||
struct ch_params ch_params;
|
||||
/* If this is 0, SME will fill in for caller. */
|
||||
uint16_t beaconInterval;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1395,6 +1395,15 @@ QDF_STATUS csr_scan_for_ssid(struct mac_context *mac_ctx, uint32_t session_id,
|
|||
req->scan_req.chan_list.num_chan = num_chan;
|
||||
}
|
||||
|
||||
/* Add freq hint for scan for ssid */
|
||||
if (!num_chan && profile->freq_hint &&
|
||||
csr_roam_is_valid_channel(mac_ctx, profile->freq_hint)) {
|
||||
sme_debug("add freq hint %d", profile->freq_hint);
|
||||
req->scan_req.chan_list.chan[0].freq =
|
||||
profile->freq_hint;
|
||||
req->scan_req.chan_list.num_chan = 1;
|
||||
}
|
||||
|
||||
/* Extend it for multiple SSID */
|
||||
if (profile->SSIDs.numOfSSIDs) {
|
||||
if (profile->SSIDs.SSIDList[0].SSID.length > WLAN_SSID_MAX_LEN) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue