Kaynağa Gözat

qcacmn: Fix MBSSID parsing for OUIs without subtype

Host splits MBSSID into individual scan entries. The IEs
added into the new scan entries should neither be in the
non-inheritance list nor a duplicate IE. Host checks duplicity
of Vendor specific IEs by comparing the OUI, type subtype of
the non-tx and tx BSSID IEs.

Adaptive 11r VS IEs doesn't have subtype, and host uses
IE data as subtype. In this case, even if both the IEs are
same, still both are added into the new scan entry. The
supplicant uses the capability from the first IE belonging
to the tx profile leading to connection failure.

In MBSSID parsing logic, add exception for OUI from this
specific vendor in the Vendor IE comparison logic.

Change-Id: I7bb6cc7ebe34a5f007b9b84c91d6db6c7fcf997b
CRs-Fixed: 3084721
Surya Prakash Sivaraj 3 yıl önce
ebeveyn
işleme
9f020ef915
1 değiştirilmiş dosya ile 16 ekleme ve 4 silme
  1. 16 4
      umac/scan/dispatcher/src/wlan_scan_utils_api.c

+ 16 - 4
umac/scan/dispatcher/src/wlan_scan_utils_api.c

@@ -2274,6 +2274,16 @@ static void util_parse_noninheritance_list(uint8_t *extn_elem,
 	}
 }
 
+static size_t util_oui_header_len(uint8_t *ie)
+{
+	/* Cisco Vendor Specific IEs doesn't have subtype in
+	 * their VSIE header, therefore skip subtype
+	 */
+	if (ie[0] == 0x00 && ie[1] == 0x40 && ie[2] == 0x96)
+		return OUI_LEN - 1;
+	return OUI_LEN;
+}
+
 static uint32_t util_gen_new_ie(uint8_t *ie, uint32_t ielen,
 				uint8_t *subelement,
 				size_t subie_len, uint8_t *new_ie)
@@ -2363,16 +2373,18 @@ static uint32_t util_gen_new_ie(uint8_t *ie, uint32_t ielen,
 		} else {
 			/* ie in transmitting ie also in subelement,
 			 * copy from subelement and flag the ie in subelement
-			 * as copied (by setting eid field to 0xff). For
-			 * vendor ie, compare OUI + type + subType to
-			 * determine if they are the same ie.
+			 * as copied (by setting eid field to 0xff).
+			 * To determine if the vendor ies are same:
+			 * 1. For Cisco OUI, compare only OUI + type
+			 * 2. For other OUI, compare OUI + type + subType
 			 */
 			tmp_rem_len = subie_len - (tmp - sub_copy);
 			if (tmp_old[0] == WLAN_ELEMID_VENDOR &&
 			    tmp_rem_len >= MIN_VENDOR_TAG_LEN) {
 				if (!qdf_mem_cmp(tmp_old + PAYLOAD_START_POS,
 						 tmp + PAYLOAD_START_POS,
-						 OUI_LEN)) {
+						 util_oui_header_len(tmp +
+								     PAYLOAD_START_POS))) {
 					/* same vendor ie, copy from
 					 * subelement
 					 */