summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingying Tang <yintang@codeaurora.org>2016-09-27 16:36:58 +0800
committerqcabuildsw <qcabuildsw@localhost>2016-12-14 14:07:30 -0800
commit3ba3dbc26d0be21aa42b465bdfe4337a7b4665da (patch)
treefc9d925a1848b066856c10417dc45699f3ea99fe
parent80e15f39efb55715cfb3728f65c922fa8c8085b8 (diff)
downloadqcacld-3ba3dbc26d0be21aa42b465bdfe4337a7b4665da.tar.gz
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
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c31
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.h2
-rw-r--r--core/hdd/src/wlan_hdd_main.c3
3 files changed, 36 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 0e198adeb6..8d57325da5 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -9001,6 +9001,15 @@ static void wlan_hdd_update_band_cap(hdd_context_t *hdd_ctx)
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 @@ void wlan_hdd_update_wiphy(hdd_context_t *hdd_ctx)
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)
{
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index 6a3eb795f4..8be4e73bb2 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -3179,6 +3179,8 @@ void wlan_hdd_cfg80211_deinit(struct wiphy *wiphy);
void wlan_hdd_update_wiphy(hdd_context_t *hdd_ctx);
+void wlan_hdd_update_11n_mode(struct hdd_config *cfg);
+
int wlan_hdd_cfg80211_register(struct wiphy *wiphy);
void wlan_hdd_cfg80211_register_frames(hdd_adapter_t *pAdapter);
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index c8fd08afda..0e39cc7000 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -8091,6 +8091,9 @@ int hdd_wlan_startup(struct device *dev)
if (hdd_ctx->config->enable_go_cts2self_for_sta)
sme_set_cts2self_for_p2p_go(hdd_ctx->hHal);
+
+ wlan_hdd_update_11n_mode(hdd_ctx->config);
+
#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
status = qdf_mc_timer_init(&hdd_ctx->skip_acs_scan_timer,
QDF_TIMER_TYPE_SW,