summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingying Tang <yintang@codeaurora.org>2016-09-27 18:23:01 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-11-18 16:41:07 -0800
commit753e20a2e01d7123268de8c844a108066361be2a (patch)
tree02094a61613b32efa7e452bba2ca8bab4e4cc30c
parent5daa340d0a7967f9bc82adfa09ea23aacca8d013 (diff)
qcacld-3.0: Report HT TX STBC capability to kernel
Propagate from qcacld-2.0 to qcacld-3.0 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
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c44
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.h2
-rw-r--r--core/hdd/src/wlan_hdd_main.c2
3 files changed, 41 insertions, 7 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 9c5d3bc2b7c3..f7a433eaf379 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -8941,8 +8941,8 @@ int wlan_hdd_cfg80211_init(struct device *dev,
}
/**
- * wlan_hdd_cfg80211_deinit - Deinit cfg80211
- * @ wiphy: the wiphy to validate against
+ * wlan_hdd_cfg80211_deinit() - Deinit cfg80211
+ * @wiphy: the wiphy to validate against
*
* this function deinit cfg80211 and cleanup the
* memory allocated in wlan_hdd_cfg80211_init also
@@ -8964,15 +8964,50 @@ void wlan_hdd_cfg80211_deinit(struct wiphy *wiphy)
hdd_reset_global_reg_params();
}
+/**
+ * wlan_hdd_update_band_cap() - update capabilities for supported bands
+ * @hdd_ctx: HDD context
+ *
+ * this function will update capabilities for supported bands
+ *
+ * Return: void
+ */
+static void wlan_hdd_update_band_cap(hdd_context_t *hdd_ctx)
+{
+ uint32_t val32;
+ uint16_t val16;
+ tSirMacHTCapabilityInfo *ht_cap_info;
+ QDF_STATUS status;
+
+ status = sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_HT_CAP_INFO, &val32);
+ if (QDF_STATUS_SUCCESS != status) {
+ hdd_err("could not get HT capability info");
+ val32 = 0;
+ }
+ val16 = (uint16_t)val32;
+ ht_cap_info = (tSirMacHTCapabilityInfo *)&val16;
+
+ if (ht_cap_info->txSTBC == true) {
+ if (NULL != hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ])
+ hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ]->ht_cap.cap |=
+ IEEE80211_HT_CAP_TX_STBC;
+ if (NULL != hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ])
+ hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ]->ht_cap.cap |=
+ IEEE80211_HT_CAP_TX_STBC;
+ }
+}
+
/*
* In this function, wiphy structure is updated after QDF
* initialization. In wlan_hdd_cfg80211_init, only the
* default values will be initialized. The final initialization
* of all required members can be done here.
*/
-void wlan_hdd_update_wiphy(struct wiphy *wiphy, struct hdd_config *pCfg)
+void wlan_hdd_update_wiphy(hdd_context_t *hdd_ctx)
{
- wiphy->max_ap_assoc_sta = pCfg->maxNumberOfPeers;
+ hdd_ctx->wiphy->max_ap_assoc_sta = hdd_ctx->config->maxNumberOfPeers;
+
+ wlan_hdd_update_band_cap(hdd_ctx);
}
/* In this function we are registering wiphy. */
@@ -8981,7 +9016,6 @@ int wlan_hdd_cfg80211_register(struct wiphy *wiphy)
ENTER();
/* Register our wiphy dev with cfg80211 */
if (0 > wiphy_register(wiphy)) {
- /* print error */
hdd_err("wiphy register failed");
return -EIO;
}
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index 1e88ed9ec57e..6a3eb795f445 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -3177,7 +3177,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
void wlan_hdd_cfg80211_deinit(struct wiphy *wiphy);
-void wlan_hdd_update_wiphy(struct wiphy *wiphy, struct hdd_config *pCfg);
+void wlan_hdd_update_wiphy(hdd_context_t *hdd_ctx);
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 4e71f4c4c8dc..f1132aea7d98 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -8051,7 +8051,7 @@ int hdd_wlan_startup(struct device *dev)
goto err_exit_nl_srv;
}
- wlan_hdd_update_wiphy(hdd_ctx->wiphy, hdd_ctx->config);
+ wlan_hdd_update_wiphy(hdd_ctx);
hdd_ctx->hHal = cds_get_context(QDF_MODULE_ID_SME);