mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacmn: skip MBSSID processing if it's not supported
The Multiple BSSID field (Bit 22) in Extended Capabilities indicates whether MBSSID is supported or not. Skip MBSSID processing if the field is NOT set in beacon. Change-Id: Id18318587cb9d26fa6315202b5bbe98ef8870fdd CRs-Fixed: 3160715
This commit is contained in:
parent
a19907c7ac
commit
94ae7751bc
1 changed files with 20 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2022 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
|
||||
|
|
@ -2597,9 +2597,9 @@ util_scan_parse_beacon_frame(struct wlan_objmgr_pdev *pdev,
|
|||
{
|
||||
struct wlan_bcn_frame *bcn;
|
||||
struct wlan_frame_hdr *hdr;
|
||||
uint8_t *mbssid_ie = NULL;
|
||||
uint8_t *mbssid_ie = NULL, *extcap_ie;
|
||||
uint32_t ie_len = 0;
|
||||
QDF_STATUS status;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct scan_mbssid_info mbssid_info = { 0 };
|
||||
|
||||
hdr = (struct wlan_frame_hdr *)frame;
|
||||
|
|
@ -2609,12 +2609,24 @@ util_scan_parse_beacon_frame(struct wlan_objmgr_pdev *pdev,
|
|||
sizeof(struct wlan_frame_hdr) -
|
||||
offsetof(struct wlan_bcn_frame, ie));
|
||||
|
||||
mbssid_ie = util_scan_find_ie(WLAN_ELEMID_MULTIPLE_BSSID,
|
||||
extcap_ie = util_scan_find_ie(WLAN_ELEMID_XCAPS,
|
||||
(uint8_t *)&bcn->ie, ie_len);
|
||||
if (mbssid_ie) {
|
||||
qdf_mem_copy(&mbssid_info.trans_bssid,
|
||||
hdr->i_addr3, QDF_MAC_ADDR_SIZE);
|
||||
mbssid_info.profile_count = 1 << mbssid_ie[2];
|
||||
/* Process MBSSID when Multiple BSSID (Bit 22) is set in Ext Caps */
|
||||
if (extcap_ie &&
|
||||
extcap_ie[1] >= 3 && extcap_ie[1] <= WLAN_EXTCAP_IE_MAX_LEN &&
|
||||
(extcap_ie[4] & 0x40)) {
|
||||
mbssid_ie = util_scan_find_ie(WLAN_ELEMID_MULTIPLE_BSSID,
|
||||
(uint8_t *)&bcn->ie, ie_len);
|
||||
if (mbssid_ie) {
|
||||
if (mbssid_ie[1] <= 0) {
|
||||
scm_debug("MBSSID IE length is wrong %d",
|
||||
mbssid_ie[1]);
|
||||
return status;
|
||||
}
|
||||
qdf_mem_copy(&mbssid_info.trans_bssid,
|
||||
hdr->i_addr3, QDF_MAC_ADDR_SIZE);
|
||||
mbssid_info.profile_count = 1 << mbssid_ie[2];
|
||||
}
|
||||
}
|
||||
|
||||
status = util_scan_gen_scan_entry(pdev, frame, frame_len,
|
||||
|
|
|
|||
Loading…
Reference in a new issue