瀏覽代碼

qcacmn: Use HT info to get operating bandwidth

APs can broadcast support for 20 & 40 MHz in the
HT cap IE and operate in 20 MHz also.

Therefore, use the extension channel offset field
of the HT info IE to identify the bandwidth of the
BSS.

Change-Id: I9987d45ec34ba3327b43ef70eb891d346e9e78c9
CRs-Fixed: 3587792
Surya Prakash Sivaraj 1 年之前
父節點
當前提交
9cd7aef35e
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      umac/scan/dispatcher/src/wlan_scan_utils_api.c

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

@@ -708,7 +708,9 @@ util_scan_get_phymode_5g(struct wlan_objmgr_pdev *pdev,
 	if (htcap)
 		ht_cap = le16toh(htcap->hc_cap);
 
-	if (ht_cap & WLAN_HTCAP_C_CHWIDTH40)
+	if ((ht_cap & WLAN_HTCAP_C_CHWIDTH40) &&
+	    (htinfo->hi_extchoff == WLAN_HTINFO_EXTOFFSET_ABOVE ||
+	     htinfo->hi_extchoff == WLAN_HTINFO_EXTOFFSET_BELOW))
 		phymode = WLAN_PHYMODE_11NA_HT40;
 	else
 		phymode = WLAN_PHYMODE_11NA_HT20;
@@ -720,7 +722,7 @@ util_scan_get_phymode_5g(struct wlan_objmgr_pdev *pdev,
 	if (util_scan_entry_vhtcap(scan_params) && vhtop) {
 		switch (vhtop->vht_op_chwidth) {
 		case WLAN_VHTOP_CHWIDTH_2040:
-			if (ht_cap & WLAN_HTCAP_C_CHWIDTH40)
+			if (phymode == WLAN_PHYMODE_11NA_HT40)
 				phymode = WLAN_PHYMODE_11AC_VHT40;
 			else
 				phymode = WLAN_PHYMODE_11AC_VHT20;