소스 검색

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;