qcacld-3.0: add support for 11n only TF card on MDM
Propagate from qcacld-2.0 to qcacld-3.0
To support 11n only TF card on MDM. Make sure
SAP can't be started on 2.4G/5G band with 11ac
mode and STA will use HT mode when connect to 11ac AP.
Change-Id: Ia62404b34aad9e0fc79971846b151aef72f9057f
CRs-Fixed: 945912
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 0e198ad..8d57325 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -9001,6 +9001,15 @@
hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ]->ht_cap.cap |=
IEEE80211_HT_CAP_TX_STBC;
}
+
+ if (!sme_is_feature_supported_by_fw(DOT11AC)) {
+ hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ]->
+ vht_cap.vht_supported = 0;
+ hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ]->vht_cap.cap = 0;
+ hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ]->
+ vht_cap.vht_supported = 0;
+ hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.cap = 0;
+ }
}
/*
@@ -9016,6 +9025,28 @@
wlan_hdd_update_band_cap(hdd_ctx);
}
+/**
+ * wlan_hdd_update_11n_mode - update 11n mode in hdd cfg
+ * @cfg: hdd cfg
+ *
+ * this function update 11n mode in hdd cfg
+ *
+ * Return: void
+ */
+void wlan_hdd_update_11n_mode(struct hdd_config *cfg)
+{
+ if (sme_is_feature_supported_by_fw(DOT11AC)) {
+ hdd_notice("support 11ac");
+ } else {
+ hdd_notice("not support 11ac");
+ if ((cfg->dot11Mode == eHDD_DOT11_MODE_11ac_ONLY) ||
+ (cfg->dot11Mode == eHDD_DOT11_MODE_11ac)) {
+ cfg->dot11Mode = eHDD_DOT11_MODE_11n;
+ cfg->sap_p2p_11ac_override = 0;
+ }
+ }
+}
+
/* In this function we are registering wiphy. */
int wlan_hdd_cfg80211_register(struct wiphy *wiphy)
{