From 9eb2dd624aa5f47f660251dd5eca8f61d38afcd6 Mon Sep 17 00:00:00 2001 From: Yingying Tang Date: Tue, 26 Jul 2016 17:40:29 +0800 Subject: qcacld-2.0: Report HT TX STBC capability to kernel Currently the driver does not report HT TX STBC capability to the kernel. This prevents hostapd from starting if it has been configured with HT TX STBC capability. To prevent this issue correctly report the HT TX STBC capability to the kernel. CRs-Fixed: 1046306 Change-Id: Id182de3916f4e556dde30048776ea07b0fbfdc7d --- CORE/HDD/src/wlan_hdd_cfg80211.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index e8af56d017e2..c0cb32393105 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -12196,6 +12196,11 @@ void wlan_hdd_cfg80211_deinit(struct wiphy *wiphy) void wlan_hdd_update_wiphy(struct wiphy *wiphy, hdd_context_t *ctx) { + uint32_t val32; + uint16_t val16; + tSirMacHTCapabilityInfo *ht_cap_info; + eHalStatus status; + wiphy->max_ap_assoc_sta = ctx->max_peers; if (!sme_IsFeatureSupportedByFW(DOT11AC)) { wiphy->bands[IEEE80211_BAND_2GHZ]->vht_cap.vht_supported = 0; @@ -12203,6 +12208,23 @@ void wlan_hdd_update_wiphy(struct wiphy *wiphy, wiphy->bands[IEEE80211_BAND_5GHZ]->vht_cap.vht_supported = 0; wiphy->bands[IEEE80211_BAND_5GHZ]->vht_cap.cap = 0; } + + status = ccmCfgGetInt(ctx->hHal, WNI_CFG_HT_CAP_INFO, &val32); + if (eHAL_STATUS_SUCCESS != status) { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%s: could not get HT capability info", + __func__); + val32 = 0; + } + val16 = (uint16_t)val32; + ht_cap_info = (tSirMacHTCapabilityInfo *)&val16; + + if (ht_cap_info->txSTBC == TRUE) { + wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap.cap |= + IEEE80211_HT_CAP_TX_STBC; + wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap.cap |= + IEEE80211_HT_CAP_TX_STBC; + } } /* In this function we are registering wiphy. */ -- cgit v1.2.3