Browse Source

qcacld-3.0: Fix puncture support in 11be mode without MLO

Make puncture work for 11be. Puncture is in EHT operation IE. It should
be supported for 11be mode without MLO IE.

Change-Id: I4406e81895a53d2975aaf5049c8e98a879522888
CRs-Fixed: 3184867
Bing Sun 2 years ago
parent
commit
37569c2ee1
4 changed files with 21 additions and 2 deletions
  1. 1 1
      core/hdd/src/wlan_hdd_hostapd.c
  2. 13 0
      core/sap/inc/sap_api.h
  3. 1 1
      core/sap/src/sap_fsm.c
  4. 6 0
      core/sap/src/sap_module.c

+ 1 - 1
core/hdd/src/wlan_hdd_hostapd.c

@@ -6236,7 +6236,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	}
 
 	config->ch_params.ch_width = config->ch_width_orig;
-	if (wlan_vdev_mlme_is_mlo_ap(vdev))
+	if (sap_phymode_is_eht(config->SapHw_mode))
 		wlan_reg_set_create_punc_bitmap(&config->ch_params, true);
 	if ((config->ch_params.ch_width == CH_WIDTH_80P80MHZ) &&
 	    ucfg_mlme_get_restricted_80p80_bw_supp(hdd_ctx->psoc)) {

+ 13 - 0
core/sap/inc/sap_api.h

@@ -1800,6 +1800,14 @@ void sap_dump_acs_channel(struct sap_acs_cfg *acs_cfg);
 void sap_release_vdev_ref(struct sap_context *sap_ctx);
 
 #ifdef WLAN_FEATURE_11BE
+/**
+ * sap_phymode_is_eht() - Is sap phymode EHT
+ * @phymode: phy mode
+ *
+ * Return: true if phy mode is EHT
+ */
+bool sap_phymode_is_eht(eCsrPhyMode phymode);
+
 /**
  * sap_acs_is_puncture_applicable() - Is static puncturing applicable according
  *                                    to ACS configure of given sap acs config.
@@ -1820,6 +1828,11 @@ bool sap_acs_is_puncture_applicable(struct sap_acs_cfg *acs_cfg);
 void sap_acs_set_puncture_support(struct sap_context *sap_ctx,
 				  struct ch_params *ch_params);
 #else
+static inline bool sap_phymode_is_eht(eCsrPhyMode phymode)
+{
+	return false;
+}
+
 static inline bool sap_acs_is_puncture_applicable(struct sap_acs_cfg *acs_cfg)
 {
 	return false;

+ 1 - 1
core/sap/src/sap_fsm.c

@@ -2812,7 +2812,7 @@ static QDF_STATUS sap_validate_dfs_nol(struct sap_context *sap_ctx,
 	 * has leakage to the channels in NOL
 	 */
 
-	if (wlan_vdev_mlme_is_mlo_ap(sap_ctx->vdev)) {
+	if (sap_phymode_is_eht(sap_ctx->phyMode)) {
 		ch_state =
 			wlan_reg_get_channel_state_from_secondary_list_for_freq(
 						mac_ctx->pdev, sap_freq);

+ 6 - 0
core/sap/src/sap_module.c

@@ -3538,6 +3538,12 @@ void wlansap_set_acs_ch_freq(struct sap_context *sap_context,
 #endif
 
 #ifdef WLAN_FEATURE_11BE
+bool sap_phymode_is_eht(eCsrPhyMode phymode)
+{
+	return CSR_IS_DOT11_PHY_MODE_11BE(phymode) ||
+	       CSR_IS_DOT11_PHY_MODE_11BE_ONLY(phymode);
+}
+
 bool sap_acs_is_puncture_applicable(struct sap_acs_cfg *acs_cfg)
 {
 	bool is_eht_bw_80 = false;