Jelajahi Sumber

qcacld-3.0: Add 11be phymode in bus bandwidth vote table

Currently no 11be phymode is supported in bus bandwidth vote table,
then for 11be mode, wlan driver vote during throughput test is not right.

Add 11be support in bus bandwidth vote table.

Change-Id: I2b35d98f56d93207c117e07caf13b9e6bc8ec209
CRs-Fixed: 3184731
Jinwei Chen 2 tahun lalu
induk
melakukan
a04c5b0f90
2 mengubah file dengan 18 tambahan dan 3 penghapusan
  1. 17 3
      core/hdd/src/wlan_hdd_bus_bandwidth.c
  2. 1 0
      core/sme/src/csr/csr_util.c

+ 17 - 3
core/hdd/src/wlan_hdd_bus_bandwidth.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020-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
@@ -57,6 +57,10 @@ static bus_bw_table_type bus_bw_table_default = {
 				       BUS_BW_LEVEL_2, BUS_BW_LEVEL_3,
 				       BUS_BW_LEVEL_4, BUS_BW_LEVEL_6,
 				       BUS_BW_LEVEL_7, BUS_BW_LEVEL_8},
+	[QCA_WLAN_802_11_MODE_11BE] = {BUS_BW_LEVEL_NONE, BUS_BW_LEVEL_1,
+				       BUS_BW_LEVEL_2, BUS_BW_LEVEL_3,
+				       BUS_BW_LEVEL_4, BUS_BW_LEVEL_6,
+				       BUS_BW_LEVEL_7, BUS_BW_LEVEL_8},
 };
 
 /**
@@ -88,7 +92,11 @@ static bus_bw_table_type bus_bw_table_low_latency = {
 	[QCA_WLAN_802_11_MODE_11AX] = {BUS_BW_LEVEL_NONE, BUS_BW_LEVEL_8,
 				       BUS_BW_LEVEL_8, BUS_BW_LEVEL_8,
 				       BUS_BW_LEVEL_8, BUS_BW_LEVEL_8,
-				       BUS_BW_LEVEL_8, BUS_BW_LEVEL_8}
+				       BUS_BW_LEVEL_8, BUS_BW_LEVEL_8},
+	[QCA_WLAN_802_11_MODE_11BE] = {BUS_BW_LEVEL_NONE, BUS_BW_LEVEL_8,
+				       BUS_BW_LEVEL_8, BUS_BW_LEVEL_8,
+				       BUS_BW_LEVEL_8, BUS_BW_LEVEL_8,
+				       BUS_BW_LEVEL_8, BUS_BW_LEVEL_8},
 };
 
 /**
@@ -144,6 +152,11 @@ bbm_get_bus_bw_level_vote(struct hdd_adapter *adapter,
 	struct bbm_context *bbm_ctx = adapter->hdd_ctx->bbm_ctx;
 	bus_bw_table_type *lkp_table = bbm_ctx->curr_bus_bw_lookup_table;
 
+	if (tput_level >= TPUT_LEVEL_MAX) {
+		hdd_err("invalid tput level %d", tput_level);
+		return  BUS_BW_LEVEL_NONE;
+	}
+
 	switch (adapter->device_mode) {
 	case QDF_STA_MODE:
 	case QDF_P2P_CLIENT_MODE:
@@ -154,7 +167,8 @@ bbm_get_bus_bw_level_vote(struct hdd_adapter *adapter,
 		dot11_mode = hdd_convert_cfgdot11mode_to_80211mode(sta_ctx->
 							   conn_info.dot11mode);
 		if (dot11_mode >= QCA_WLAN_802_11_MODE_INVALID) {
-			hdd_err("invalid STA/P2P-CLI dot11 mode");
+			hdd_err("invalid STA/P2P-CLI dot11 mode %d",
+				dot11_mode);
 			break;
 		}
 

+ 1 - 0
core/sme/src/csr/csr_util.c

@@ -1367,6 +1367,7 @@ enum csr_cfgdot11mode csr_phy_mode_to_dot11mode(enum wlan_phymode phy_mode)
 	case WLAN_PHYMODE_11BEA_EHT80:
 	case WLAN_PHYMODE_11BEG_EHT80:
 	case WLAN_PHYMODE_11BEA_EHT160:
+	case WLAN_PHYMODE_11BEA_EHT320:
 		return eCSR_CFG_DOT11_MODE_11BE;
 #endif
 	default: