Procházet zdrojové kódy

qcacld-3.0: Consider AUTO phy_mode in legacy platforms as well

Currently, phy_mode AUTO is not considered for candidate scoring
config if the platform doesn't support 11BE currently. This is
added as part of 11BE changes and the mode is considered fine
before the change I7f35379b94dcb64dec0da463b95967125dc7fd14.
This doesn't seem to be intentional.
So, consider phy_mode AUTO also for legacy platforms.

Change-Id: Id2eaa8208f5bf5a875e1e72a2117a24b070e6e6b
CRs-Fixed: 3242455
Srinivas Dasari před 2 roky
rodič
revize
7fcf50b5c1
1 změnil soubory, kde provedl 24 přidání a 8 odebrání
  1. 24 8
      core/sme/src/common/sme_api.c

+ 24 - 8
core/sme/src/common/sme_api.c

@@ -14954,6 +14954,24 @@ sme_get_roam_scan_stats(mac_handle_t mac_handle,
 	return status;
 }
 
+#ifdef WLAN_FEATURE_11BE
+static inline bool sme_is_phy_mode_11be(eCsrPhyMode phy_mode)
+{
+	if (phy_mode == eCSR_DOT11_MODE_AUTO ||
+	    CSR_IS_DOT11_PHY_MODE_11BE(phy_mode) ||
+	    CSR_IS_DOT11_PHY_MODE_11BE_ONLY(phy_mode)) {
+		return true;
+	}
+
+	return false;
+}
+#else
+static inline bool sme_is_phy_mode_11be(eCsrPhyMode phy_mode)
+{
+	return false;
+}
+#endif
+
 void sme_update_score_config(mac_handle_t mac_handle, eCsrPhyMode phy_mode,
 			     uint8_t num_rf_chains)
 {
@@ -14971,15 +14989,13 @@ void sme_update_score_config(mac_handle_t mac_handle, eCsrPhyMode phy_mode,
 
 	config.vdev_nss_24g = vdev_ini_cfg.rx_nss[NSS_CHAINS_BAND_2GHZ];
 	config.vdev_nss_5g = vdev_ini_cfg.rx_nss[NSS_CHAINS_BAND_5GHZ];
-#ifdef WLAN_FEATURE_11BE
-	if (phy_mode == eCSR_DOT11_MODE_AUTO ||
-	    CSR_IS_DOT11_PHY_MODE_11BE(phy_mode) ||
-	    CSR_IS_DOT11_PHY_MODE_11BE_ONLY(phy_mode)) {
+
+	if (sme_is_phy_mode_11be(phy_mode))
 		config.eht_cap = 1;
-		config.he_cap = 1;
-	}
-#endif
-	if (phy_mode == eCSR_DOT11_MODE_11ax ||
+
+	if (config.eht_cap ||
+	    phy_mode == eCSR_DOT11_MODE_AUTO ||
+	    phy_mode == eCSR_DOT11_MODE_11ax ||
 	    phy_mode == eCSR_DOT11_MODE_11ax_ONLY)
 		config.he_cap = 1;