summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Xu <pxu@qca.qualcomm.com>2014-11-04 18:28:33 -0800
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2014-11-07 17:44:11 +0530
commitba392e15cb2469cafbbb68b9ad86ecb28c9ee5c8 (patch)
tree2e7c742b578f1c920324ebf59e6b68df16aa0546
parenteeffc75ada37a70c9c4a47f7c8f372665729b3ec (diff)
qca-cld:hdd: Set proper IE field for HT20/HT40 mode
Based on hostapd.conf, INI and iwpriv setphymode settings, set proper HT Capabilities, OBSS scan parameter and HT operation IE field in beacon. Change-Id: I7ba312d0eb3bfc6cdd71408efb5df3eb28800715 CRs-fixed: 748530
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c32
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c12
2 files changed, 26 insertions, 18 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 0ac8f744ddb0..ef837e9a651f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -5520,20 +5520,30 @@ static int wlan_hdd_cfg80211_set_channel( struct wiphy *wiphy, struct net_device
default:
hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s:Error!!! Invalid HT20/40 mode !",
- __func__);
+ "%s:Error!!! Invalid HT20/40 mode: %d !",
+ __func__, channel_type);
return -EINVAL;
}
+ } else {
+ vos_mem_zero(&smeConfig, sizeof(smeConfig));
+ sme_GetConfigParam(pHddCtx->hHal, &smeConfig);
+ /* set cbMode for 5G */
+ switch (channel_type) {
+ case NL80211_CHAN_HT20:
+ case NL80211_CHAN_NO_HT:
+ smeConfig.csrConfig.channelBondingMode5GHz = 0;
+ break;
+ case NL80211_CHAN_HT40MINUS:
+ case NL80211_CHAN_HT40PLUS:
+ smeConfig.csrConfig.channelBondingMode5GHz = 1;
+ break;
+ default:
+ hddLog(LOGE,
+ FL("Error!!! Invalid HT20/40 mode: %d !"), channel_type);
+ return -EINVAL;
+ }
+ sme_UpdateConfig(pHddCtx->hHal, &smeConfig);
}
-
- vos_mem_zero(&smeConfig, sizeof(smeConfig));
- sme_GetConfigParam(pHddCtx->hHal, &smeConfig);
- if (NL80211_CHAN_NO_HT == channel_type)
- smeConfig.csrConfig.obssEnabled = VOS_FALSE;
- else
- smeConfig.csrConfig.obssEnabled = VOS_TRUE;
- sme_UpdateConfig (pHddCtx->hHal, &smeConfig);
-
#endif
}
}
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index bc1b94ffed1e..ad49b0164912 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -4691,14 +4691,12 @@ int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
}
} else if (phymode == eCSR_DOT11_MODE_11n &&
chwidth == WNI_CFG_CHANNEL_BONDING_MODE_ENABLE) {
- if (phddctx->cfg_ini->ht2040CoexEnabled) {
- smeconfig.csrConfig.obssEnabled = eANI_BOOLEAN_TRUE;
- halStatus = sme_SetHT2040Mode(hal, pAdapter->sessionId,
+ smeconfig.csrConfig.obssEnabled = eANI_BOOLEAN_TRUE;
+ halStatus = sme_SetHT2040Mode(hal, pAdapter->sessionId,
eHT_CHAN_HT20, eANI_BOOLEAN_TRUE);
- if (halStatus == eHAL_STATUS_FAILURE) {
- hddLog(LOGE, FL("Failed to enable OBSS"));
- return -EIO;
- }
+ if (halStatus == eHAL_STATUS_FAILURE) {
+ hddLog(LOGE, FL("Failed to enable OBSS"));
+ return -EIO;
}
}
#endif