qcacmn: Don't unlink the bss in disconnect/connect failure handler
Currently, bss is unlinked from kernel scan db in below cases, 1. Disconnect 2. Connect failure 3. AP moves to hidden SSID mode from normal mode bss is unlinked in above 1 and 2 cases (i.e. disconnect and connect failure) to avoid continuous connect failures when userspace attempts connect to the same AP without issuing a fresh scan, which may result in blacklisting the AP. But framework/wpa_supplicant can take care of this now by making sure that connect is attempted only if scan result is from a fresh scan. Unlinking the bss may lead to inconsistency in some scenarios and found that disconnect is most common scenario. So, don't call __wlan_cfg80211_unlink_bss_list() in case 1 and 2 to avoid unlinking. Change-Id: I2d3af5fcc22360a5ead0e148d623194cb815f882 CRs-Fixed: 3433127
Este cometimento está contido em:

cometido por
Madan Koyyalamudi

ascendente
70a7674b32
cometimento
5ec7c5416d
@@ -280,26 +280,19 @@ typedef QDF_STATUS
|
||||
* osif_cm_unlink_bss() - function to unlink bss from kernel and scan database
|
||||
* on connect timeouts reasons
|
||||
* @vdev: vdev pointer
|
||||
* @osif_priv: Pointer to vdev osif priv
|
||||
* @bssid: bssid to flush
|
||||
* @ssid: optional ssid to flush
|
||||
* @ssid_len: optional ssid length
|
||||
*
|
||||
* This function flush the bss from scan db of kernel and driver matching the
|
||||
* bssid. ssid is optional to pass to match the bss.
|
||||
* bssid.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void osif_cm_unlink_bss(struct wlan_objmgr_vdev *vdev,
|
||||
struct vdev_osif_priv *osif_priv,
|
||||
struct qdf_mac_addr *bssid,
|
||||
uint8_t *ssid, uint8_t ssid_len);
|
||||
struct qdf_mac_addr *bssid);
|
||||
#else
|
||||
static inline
|
||||
void osif_cm_unlink_bss(struct wlan_objmgr_vdev *vdev,
|
||||
struct vdev_osif_priv *osif_priv,
|
||||
struct qdf_mac_addr *bssid,
|
||||
uint8_t *ssid, uint8_t ssid_len) {}
|
||||
struct qdf_mac_addr *bssid) {}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
|
@@ -1063,16 +1063,13 @@ bool osif_cm_is_unlink_bss_required(struct wlan_cm_connect_resp *rsp)
|
||||
return false;
|
||||
}
|
||||
static inline void osif_check_and_unlink_bss(struct wlan_objmgr_vdev *vdev,
|
||||
struct vdev_osif_priv *osif_priv,
|
||||
struct wlan_cm_connect_resp *rsp)
|
||||
{
|
||||
if (osif_cm_is_unlink_bss_required(rsp))
|
||||
osif_cm_unlink_bss(vdev, osif_priv, &rsp->bssid, rsp->ssid.ssid,
|
||||
rsp->ssid.length);
|
||||
osif_cm_unlink_bss(vdev, &rsp->bssid);
|
||||
}
|
||||
#else
|
||||
static inline void osif_check_and_unlink_bss(struct wlan_objmgr_vdev *vdev,
|
||||
struct vdev_osif_priv *osif_priv,
|
||||
struct wlan_cm_connect_resp *rsp)
|
||||
{}
|
||||
#endif
|
||||
@@ -1092,7 +1089,7 @@ QDF_STATUS osif_connect_handler(struct wlan_objmgr_vdev *vdev,
|
||||
rsp->reason, rsp->status_code, rsp->is_reassoc,
|
||||
rsp->send_disconnect);
|
||||
|
||||
osif_check_and_unlink_bss(vdev, osif_priv, rsp);
|
||||
osif_check_and_unlink_bss(vdev, rsp);
|
||||
|
||||
status = osif_validate_connect_and_reset_src_id(osif_priv, rsp);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
@@ -1154,7 +1151,7 @@ QDF_STATUS osif_failed_candidate_handler(struct wlan_objmgr_vdev *vdev,
|
||||
* connection on other links.
|
||||
*/
|
||||
if (!wlan_vdev_mlme_is_mlo_vdev(vdev))
|
||||
osif_check_and_unlink_bss(vdev, osif_priv, rsp);
|
||||
osif_check_and_unlink_bss(vdev, rsp);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@@ -266,8 +266,7 @@ QDF_STATUS osif_disconnect_handler(struct wlan_objmgr_vdev *vdev,
|
||||
/* Unlink bss if disconnect is from peer or south bound */
|
||||
if (rsp->req.req.source == CM_PEER_DISCONNECT ||
|
||||
rsp->req.req.source == CM_SB_DISCONNECT)
|
||||
osif_cm_unlink_bss(vdev, osif_priv, &rsp->req.req.bssid,
|
||||
NULL, 0);
|
||||
osif_cm_unlink_bss(vdev, &rsp->req.req.bssid);
|
||||
|
||||
status = osif_validate_disconnect_and_reset_src_id(osif_priv, rsp);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
|
@@ -259,19 +259,10 @@ osif_cm_disconnect_complete_cb(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
#ifdef CONN_MGR_ADV_FEATURE
|
||||
void osif_cm_unlink_bss(struct wlan_objmgr_vdev *vdev,
|
||||
struct vdev_osif_priv *osif_priv,
|
||||
struct qdf_mac_addr *bssid,
|
||||
uint8_t *ssid, uint8_t ssid_len)
|
||||
struct qdf_mac_addr *bssid)
|
||||
{
|
||||
struct wiphy *wiphy = osif_priv->wdev->wiphy;
|
||||
struct scan_filter *filter;
|
||||
QDF_STATUS status;
|
||||
|
||||
status = __wlan_cfg80211_unlink_bss_list(wiphy, wlan_vdev_get_pdev(vdev),
|
||||
bssid->bytes, ssid_len ? ssid : NULL,
|
||||
ssid_len);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return;
|
||||
filter = qdf_mem_malloc(sizeof(*filter));
|
||||
if (!filter)
|
||||
return;
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador