浏览代码

qcacld-3.0: Ignore EHT op ccfs0 field if BW is 160/320 MHz

In case of bandwidth is 80/160 MHz, use ccfs0 value from VHT
or HE ops and if bandwidth is 320 MHz, use ccfs1 value from
EHT ops. Thus, ccfs0 value in EHT op is redundant and needs
to be ignored.

Change-Id: Ia8f988ac28349be7bce47388d9f8b844fa52a90e
CRs-Fixed: 3305667
Gururaj Pandurangi 2 年之前
父节点
当前提交
9b9d13bbe5
共有 1 个文件被更改,包括 7 次插入26 次删除
  1. 7 26
      core/mac/src/pe/lim/lim_prop_exts_utils.c

+ 7 - 26
core/mac/src/pe/lim/lim_prop_exts_utils.c

@@ -361,34 +361,15 @@ static void lim_extract_eht_op(struct pe_session *session,
 
 	max_eht_bw = wma_get_eht_ch_width();
 
-	if (session->eht_op.channel_width == WLAN_EHT_CHWIDTH_320) {
-		if (max_eht_bw == WNI_CFG_EHT_CHANNEL_WIDTH_320MHZ) {
-			session->ch_width = CH_WIDTH_320MHZ;
-		} else if (max_eht_bw == WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ) {
-			session->ch_width = CH_WIDTH_160MHZ;
-		} else {
-			session->ch_width = CH_WIDTH_80MHZ;
-			session->ch_center_freq_seg1 = 0;
-		}
-	} else if (session->eht_op.channel_width == WLAN_EHT_CHWIDTH_160) {
-		if (max_eht_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ) {
-			session->ch_width = CH_WIDTH_160MHZ;
-		} else {
-			session->ch_width = CH_WIDTH_80MHZ;
-			session->ch_center_freq_seg1 = 0;
-		}
-	} else if (session->eht_op.channel_width == WLAN_EHT_CHWIDTH_80) {
-		session->ch_width = CH_WIDTH_80MHZ;
-		session->ch_center_freq_seg1 = 0;
-	} else if (session->eht_op.channel_width == WLAN_EHT_CHWIDTH_40) {
-		session->ch_width = CH_WIDTH_40MHZ;
-		session->ch_center_freq_seg1 = 0;
-	} else {
-		session->ch_width = CH_WIDTH_20MHZ;
-		session->ch_center_freq_seg1 = 0;
+	if (beacon_struct->eht_op.channel_width < WLAN_EHT_CHWIDTH_320 ||
+	    max_eht_bw < WNI_CFG_EHT_CHANNEL_WIDTH_320MHZ) {
+		pe_debug("AP supported BW: %d, STA supported BW: %d",
+			 beacon_struct->eht_op.channel_width, max_eht_bw);
+		return;
 	}
 
-	session->ch_center_freq_seg0 = session->eht_op.ccfs0;
+	session->ch_width = CH_WIDTH_320MHZ;
+	session->ch_center_freq_seg0 = session->ch_center_freq_seg1;
 	session->ch_center_freq_seg1 = session->eht_op.ccfs1;
 
 	pe_debug("session ch_width %d ccfs0 %d ccfs1 %d", session->ch_width,