|
@@ -8947,8 +8947,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
|
|
@@ -8970,15 +8970,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. */
|
|
@@ -8987,7 +9022,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;
|
|
|
}
|