mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
qcacld-3.0: Avoid auto phy mode for ini specific band
When specific band is set from ini file and if user is trying to change phy mode to auto with iwpriv command, crash is seen. To fix this, avoid eCSR_DOT11_MODE_AUTO when BandCapability is set. Change-Id: Ieaaa1dddfafbed2fdf51b7c924977b02077f01b6 CRs-Fixed: 2082166
This commit is contained in:
parent
7ee07e375c
commit
4c9b675e2f
1 changed files with 14 additions and 7 deletions
|
|
@ -7784,12 +7784,18 @@ int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
|
|||
retval = -EIO;
|
||||
goto free;
|
||||
}
|
||||
if (phddctx->config->nChannelBondingMode5GHz)
|
||||
phddctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->ht_cap.cap
|
||||
|= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||
else
|
||||
phddctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->ht_cap.cap
|
||||
&= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||
|
||||
if (band_5g) {
|
||||
struct ieee80211_supported_band *band;
|
||||
|
||||
band = phddctx->wiphy->bands[HDD_NL80211_BAND_5GHZ];
|
||||
if (phddctx->config->nChannelBondingMode5GHz)
|
||||
band->ht_cap.cap |=
|
||||
IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||
else
|
||||
band->ht_cap.cap &=
|
||||
~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||
}
|
||||
|
||||
hdd_debug("New_Phymode= %d ch_bonding=%d band=%d VHT_ch_width=%u",
|
||||
phymode, chwidth, curr_band, vhtchanwidth);
|
||||
|
|
@ -12755,7 +12761,8 @@ int hdd_reg_set_band(struct net_device *dev, u8 ui_band)
|
|||
hdd_debug("change band to %u", band);
|
||||
|
||||
if ((band == BAND_2G && hdd_ctx->config->nBandCapability == 2) ||
|
||||
(band == BAND_5G && hdd_ctx->config->nBandCapability == 1)) {
|
||||
(band == BAND_5G && hdd_ctx->config->nBandCapability == 1) ||
|
||||
(band == BAND_ALL && hdd_ctx->config->nBandCapability != 0)) {
|
||||
hdd_err("band value %u violate INI settings %u",
|
||||
band, hdd_ctx->config->nBandCapability);
|
||||
return -EIO;
|
||||
|
|
|
|||
Loading…
Reference in a new issue