Переглянути джерело

qcacmn: From connection manager filter only ESS type of AP

ESS (Extended Service Set) operating mode allows wireless
device to roam anywhere within the area covered by multiple
APs.

IBSS (Independent Basic Service Set) allows wireless device
to connect in peer-to-Peer mode only.

Fix is to allow connection manager module to filter only
those AP(s) which is/are part of ESS network.

Change-Id: I9536557daa624b9e44505efa0e0720e47b645517
CRs-Fixed: 3015220
abhinav kumar 3 роки тому
батько
коміт
a368b81e70

+ 2 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

@@ -805,6 +805,8 @@ static inline void cm_update_advance_filter(struct wlan_objmgr_pdev *pdev,
 {
 	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
 
+	/* Select only ESS type */
+	filter->bss_type = WLAN_TYPE_BSS;
 	filter->enable_adaptive_11r =
 		wlan_mlme_adaptive_11r_enabled(psoc);
 	if (wlan_vdev_mlme_get_opmode(cm_ctx->vdev) != QDF_STA_MODE)

+ 7 - 0
umac/scan/core/src/wlan_scan_filter.c

@@ -750,6 +750,13 @@ bool scm_filter_match(struct wlan_objmgr_psoc *psoc,
 		return false;
 	}
 
+	if (!util_is_bss_type_match(filter->bss_type, db_entry->cap_info)) {
+		scm_debug(QDF_MAC_ADDR_FMT" : Ignore as bss type didn't match cap_info %x bss_type %d",
+			  QDF_MAC_ADDR_REF(db_entry->bssid.bytes),
+			  db_entry->cap_info.value, filter->bss_type);
+		return false;
+	}
+
 	/* Match realm */
 	if (!scm_is_fils_config_match(filter, db_entry)) {
 		scm_debug(QDF_MAC_ADDR_FMT" :Ignore as fils config didn't match",

+ 2 - 0
umac/scan/dispatcher/inc/wlan_scan_public_structs.h

@@ -687,6 +687,7 @@ enum dot11_mode_filter {
  * @num_of_bssid: number of bssid passed
  * @num_of_ssid: number of ssid
  * @num_of_channels: number of  channels
+ * @bss_type: bss type IBSS or BSS or ANY
  * @pmf_cap: Pmf capability
  * @dot11mode: Filter APs based upon dot11mode
  * @band: to get specific band 2.4G, 5G or 4.9 G
@@ -719,6 +720,7 @@ struct scan_filter {
 	uint8_t num_of_bssid;
 	uint8_t num_of_ssid;
 	uint16_t num_of_channels;
+	enum wlan_bss_type bss_type;
 	enum wlan_pmf_cap pmf_cap;
 	enum dot11_mode_filter dot11mode;
 	enum wlan_band band;