mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacld-3.0: configure sgi through cfg80211
Add the cfg80211 configuration support for sgi Previously the bitrate mask is added via the iwpriv iwpriv wlan0 shortgi 8 will be configured via below through iw iw dev wlan0 set bitrates ht-mcs-2.4 7 sgi-2.4 8 Change-Id: I31d4ff34fd55c74e814fc23b2960bf36e645da72 CRs-Fixed: 2760059
This commit is contained in:
parent
87f20e8d31
commit
b971c50f23
2 changed files with 31 additions and 2 deletions
|
|
@ -24264,6 +24264,8 @@ static int __wlan_hdd_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
|
|||
uint8_t connected_band, nss, i;
|
||||
int bit_rate = -1;
|
||||
uint8_t rate_index;
|
||||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
uint8_t vdev_id;
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam() ||
|
||||
QDF_GLOBAL_MONITOR_MODE == hdd_get_conparam()) {
|
||||
|
|
@ -24275,6 +24277,12 @@ static int __wlan_hdd_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
|
|||
if (errno)
|
||||
return errno;
|
||||
|
||||
errno = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (errno)
|
||||
return errno;
|
||||
|
||||
vdev_id = adapter->vdev_id;
|
||||
|
||||
connected_band = hdd_conn_get_connected_band(&adapter->session.station);
|
||||
|
||||
switch (connected_band) {
|
||||
|
|
@ -24331,8 +24339,24 @@ configure_fw:
|
|||
errno = wma_cli_set_command(adapter->vdev_id, WMI_VDEV_PARAM_FIXED_RATE,
|
||||
bit_rate, VDEV_CMD);
|
||||
|
||||
if (errno)
|
||||
if (errno) {
|
||||
hdd_err_rl("Failed to set firmware, errno %d", errno);
|
||||
return errno;
|
||||
}
|
||||
|
||||
if (mask->control[band].gi & HDD_AUTO_RATE_SGI)
|
||||
errno = sme_set_auto_rate_he_sgi(hdd_ctx->mac_handle,
|
||||
adapter->vdev_id,
|
||||
mask->control[band].gi);
|
||||
else
|
||||
errno = sme_update_ht_config(hdd_ctx->mac_handle,
|
||||
adapter->vdev_id,
|
||||
WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ,
|
||||
mask->control[band].gi);
|
||||
|
||||
if (errno)
|
||||
hdd_err("cfg set failed, value %d status %d",
|
||||
mask->control[band].gi, errno);
|
||||
|
||||
return errno;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1717,9 +1717,12 @@ static void hdd_update_wiphy_vhtcap(struct hdd_context *hdd_ctx)
|
|||
{
|
||||
struct ieee80211_supported_band *band_5g =
|
||||
hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ];
|
||||
struct ieee80211_supported_band *band_2g =
|
||||
hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ];
|
||||
QDF_STATUS status;
|
||||
uint8_t value = 0, value1 = 0;
|
||||
uint32_t value2;
|
||||
bool is_vht_24ghz;
|
||||
|
||||
if (!band_5g) {
|
||||
hdd_debug("5GHz band disabled, skipping capability population");
|
||||
|
|
@ -1746,7 +1749,9 @@ static void hdd_update_wiphy_vhtcap(struct hdd_context *hdd_ctx)
|
|||
|
||||
ucfg_mlme_cfg_get_vht_tx_mcs_map(hdd_ctx->psoc, &value2);
|
||||
band_5g->vht_cap.vht_mcs.tx_mcs_map = value2;
|
||||
|
||||
ucfg_mlme_get_vht_for_24ghz(hdd_ctx->psoc, &is_vht_24ghz);
|
||||
if (is_vht_24ghz)
|
||||
band_2g->vht_cap.vht_mcs.tx_mcs_map = value2;
|
||||
}
|
||||
|
||||
static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx,
|
||||
|
|
|
|||
Loading…
Reference in a new issue