diff options
| author | Yingying Tang <yintang@codeaurora.org> | 2016-09-27 16:36:58 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-11-18 16:42:39 -0800 |
| commit | 3e9d671dcf224987b64250edfeb3101da313fb97 (patch) | |
| tree | 13187efa9702fb3fb404377948b17d26797b8ab4 | |
| parent | 753e20a2e01d7123268de8c844a108066361be2a (diff) | |
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.c | 31 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.h | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 3 |
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 f7a433eaf379..f19f9a1f3c2c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -8995,6 +8995,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; + } } /* @@ -9010,6 +9019,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 6a3eb795f445..8be4e73bb20a 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 f1132aea7d98..683ae916eee7 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -8105,6 +8105,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, |
