[PATCH 3/4] Configure secondary channel offset
Eugene Krasnikov
k.eugene.e at gmail.com
Tue Jul 16 07:01:50 EDT 2013
Keys exchange always fails on 5GHz with 40MHz channel
because extension channel was not set to secondary channel
offset.
Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
smd.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/smd.c b/smd.c
index d886ae8..bc61e3f 100644
--- a/smd.c
+++ b/smd.c
@@ -470,6 +470,15 @@ int wcn36xx_smd_join(struct wcn36xx *wcn, const u8 *bssid, u8 *vif, u8 ch)
memcpy(&msg_body.bssid, bssid, ETH_ALEN);
memcpy(&msg_body.self_sta_mac_addr, vif, ETH_ALEN);
msg_body.channel = ch;
+ if (conf_is_ht40_minus(&wcn->hw->conf))
+ msg_body.secondary_channel_offset =
+ PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
+ else if (conf_is_ht40_plus(&wcn->hw->conf))
+ msg_body.secondary_channel_offset =
+ PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
+ else
+ msg_body.secondary_channel_offset =
+ PHY_SINGLE_CHANNEL_CENTERED;
msg_body.link_state = WCN36XX_HAL_LINK_PREASSOC_STATE;
msg_body.max_tx_power = 0xbf;
@@ -807,7 +816,12 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
bss->dtim_period = wcn->dtim_period;
bss->tx_channel_width_set = 0;
bss->oper_channel = WCN36XX_HW_CHANNEL(wcn);
- bss->ext_channel = 0;
+ if (conf_is_ht40_minus(&wcn->hw->conf))
+ bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ else if (conf_is_ht40_plus(&wcn->hw->conf))
+ bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ else
+ bss->ext_channel = IEEE80211_HT_PARAM_CHA_SEC_NONE;
bss->reserved = 0;
if (sta)
wcn36xx_smd_set_sta_params(vif, sta, sta_params);
--
1.7.11.3
More information about the wcn36xx
mailing list