Sfoglia il codice sorgente

qcacld-3.0: Force 11n mode for ll_lt sap

Based on the new requirement, force 11n mode for ll_lt SAP.

Change-Id: I841c7af68178be94302ca259d6269dd00321bddc
CRs-Fixed: 3591464
Ashish Kumar Dhanotiya 1 anno fa
parent
commit
3f3c1854d8
2 ha cambiato i file con 26 aggiunte e 2 eliminazioni
  1. 12 2
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 14 0
      core/hdd/src/wlan_hdd_hostapd.c

+ 12 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -3817,6 +3817,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	bool is_vendor_unsafe_ch_present = false;
 	bool sap_force_11n_for_11ac = 0;
 	bool go_force_11n_for_11ac = 0;
+	bool is_ll_lt_sap = false;
+	bool sap_force_11n;
 	bool go_11ac_override = 0;
 	bool sap_11ac_override = 0;
 	uint8_t vht_ch_width;
@@ -3849,6 +3851,12 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	ucfg_mlme_get_channel_bonding_24ghz(hdd_ctx->psoc,
 					    &channel_bonding_mode_2g);
 
+	if (policy_mgr_is_vdev_ll_lt_sap(hdd_ctx->psoc, link_info->vdev_id))
+		is_ll_lt_sap = true;
+
+	if (is_ll_lt_sap || sap_force_11n_for_11ac)
+		sap_force_11n = true;
+
 	if (!((adapter->device_mode == QDF_SAP_MODE) ||
 	      (adapter->device_mode == QDF_P2P_GO_MODE))) {
 		hdd_err("Invalid device mode %d", adapter->device_mode);
@@ -3915,7 +3923,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	sap_config->acs_cfg.master_acs_cfg.eht = eht_enabled;
 
 	if (((adapter->device_mode == QDF_SAP_MODE) &&
-	      sap_force_11n_for_11ac) ||
+	      sap_force_11n) ||
 	    ((adapter->device_mode == QDF_P2P_GO_MODE) &&
 	      go_force_11n_for_11ac)) {
 		vht_enabled = 0;
@@ -3951,6 +3959,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 		else
 			ch_width = 20;
 	}
+	if (is_ll_lt_sap)
+		ch_width = 20;
 
 	if (tb[QCA_WLAN_VENDOR_ATTR_ACS_LAST_SCAN_AGEOUT_TIME])
 		last_scan_ageout_time =
@@ -4148,7 +4158,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	    sap_config->acs_cfg.end_ch_freq >=
 		WLAN_REG_CH_TO_FREQ(CHAN_ENUM_5180) &&
 	    ((adapter->device_mode == QDF_SAP_MODE &&
-	      !sap_force_11n_for_11ac &&
+	      !sap_force_11n &&
 	      sap_11ac_override) ||
 	      (adapter->device_mode == QDF_P2P_GO_MODE &&
 	      !go_force_11n_for_11ac &&

+ 14 - 0
core/hdd/src/wlan_hdd_hostapd.c

@@ -6221,6 +6221,17 @@ wlan_hdd_set_multipass(struct wlan_objmgr_vdev *vdev)
 }
 #endif
 
+static void wlan_hdd_update_ll_lt_sap_configs(struct wlan_objmgr_psoc *psoc,
+					      uint8_t vdev_id,
+					      struct sap_config *config)
+{
+	if (!policy_mgr_is_vdev_ll_lt_sap(psoc, vdev_id))
+		return;
+
+	config->SapHw_mode = eCSR_DOT11_MODE_11n;
+	config->ch_width_orig = CH_WIDTH_20MHZ;
+}
+
 /**
  * wlan_hdd_cfg80211_start_bss() - start bss
  * @link_info: Link info pointer in HDD adapter
@@ -6756,6 +6767,9 @@ int wlan_hdd_cfg80211_start_bss(struct wlan_hdd_link_info *link_info,
 			config->SapHw_mode = eCSR_DOT11_MODE_11n;
 	}
 
+	wlan_hdd_update_ll_lt_sap_configs(hdd_ctx->psoc,
+					  link_info->vdev_id, config);
+
 	config->sap_orig_hw_mode = config->SapHw_mode;
 	reg_phy_mode = csr_convert_to_reg_phy_mode(config->SapHw_mode,
 						   config->chan_freq);