diff options
| author | Abhishek Singh <absingh@qti.qualcomm.com> | 2014-06-18 17:20:41 +0530 |
|---|---|---|
| committer | Pitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com> | 2014-06-27 11:42:54 +0530 |
| commit | 499e32e60ae537e6c968159260d5b455cd362bb8 (patch) | |
| tree | 71787738365e38db4aa266324ee129db8b59bd76 | |
| parent | b14d3cbb669c5cb4c65be74a556451432587f2f2 (diff) | |
wlan: Disable 40Mhz channels if not supported by Country.
Even if 40Mhz BW is not supported in the Country, the
40Mhz center channels are enabled.
Also If the channel is valid for HT40+ but invalid for HT40- or
vice versa, the 40Mhz center channel is not enabled.
Adds a check to disable 40Mhz center channel if not
supported by Country.
If the channel is valid for either HT40+ or HT40-,
enable the 40Mhz center channel.
Device will follow the BW allowed in db.txt
Change-Id: I5bdfd8c718fde312204beb4603e04139757464a2
CRs-Fixed: 675469
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 2 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_nvitem.c | 22 |
2 files changed, 21 insertions, 3 deletions
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 0a89b08addf7..f3f5a28c448d 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -11483,7 +11483,7 @@ tANI_BOOLEAN csrRoamIsValid40MhzChannel(tpAniSirGlobal pMac, tANI_U8 channel) if((PHY_SINGLE_CHANNEL_CENTERED != eRet) && !csrRoamIsValid40MhzChannel(pMac, centerChn)) { smsLog(pMac, LOGE, " Invalid center channel (%d), disable 40MHz mode", centerChn); - //eRet = PHY_SINGLE_CHANNEL_CENTERED; + eRet = PHY_SINGLE_CHANNEL_CENTERED; } } } diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c index 0a1a538bc26a..12478790329e 100644 --- a/CORE/VOSS/src/vos_nvitem.c +++ b/CORE/VOSS/src/vos_nvitem.c @@ -3317,7 +3317,16 @@ static int create_linux_regulatory_entry(struct wiphy *wiphy, /* max_power is in mBm = 100 * dBm */ pnvEFSTable->halnv.tables.regDomains[temp_reg_domain].channels[k].pwrLimit = (tANI_S8) ((wiphy->bands[i]->channels[j].max_power)); - if ((wiphy->bands[i]->channels[j].flags & IEEE80211_CHAN_NO_HT40) == 0) + + /* Disable the center channel if neither HT40+ nor HT40- is allowed + */ + if ((wiphy->bands[i]->channels[j].flags & IEEE80211_CHAN_NO_HT40) == + IEEE80211_CHAN_NO_HT40 ) + { + pnvEFSTable->halnv.tables.regDomains[temp_reg_domain].channels[n].enabled = + NV_CHANNEL_DISABLE; + } + else { pnvEFSTable->halnv.tables.regDomains[temp_reg_domain].channels[n].enabled = NV_CHANNEL_DFS; @@ -3347,7 +3356,16 @@ static int create_linux_regulatory_entry(struct wiphy *wiphy, /* max_power is in dBm */ pnvEFSTable->halnv.tables.regDomains[temp_reg_domain].channels[k].pwrLimit = (tANI_S8) ((wiphy->bands[i]->channels[j].max_power)); - if ((wiphy->bands[i]->channels[j].flags & IEEE80211_CHAN_NO_HT40) == 0) + + /* Disable the center channel if neither HT40+ nor HT40- is allowed + */ + if ((wiphy->bands[i]->channels[j].flags & IEEE80211_CHAN_NO_HT40) == + IEEE80211_CHAN_NO_HT40 ) + { + pnvEFSTable->halnv.tables.regDomains[temp_reg_domain].channels[n].enabled = + NV_CHANNEL_DISABLE; + } + else { pnvEFSTable->halnv.tables.regDomains[temp_reg_domain].channels[n].enabled = NV_CHANNEL_ENABLE; |
