diff options
author | Jouni Malinen <j@w1.fi> | 2010-10-06 14:09:44 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-10-06 14:09:44 +0300 |
commit | 416192628d2b266fee8c9ce3f566b097c7225b4c (patch) | |
tree | fddf513bffd3c19ffb0d82294b7f1661d41f340c /src | |
parent | 23abbe9ea7372795663b90515ffc8867ea73a222 (diff) | |
download | external_wpa_supplicant_8_ti-416192628d2b266fee8c9ce3f566b097c7225b4c.zip external_wpa_supplicant_8_ti-416192628d2b266fee8c9ce3f566b097c7225b4c.tar.gz external_wpa_supplicant_8_ti-416192628d2b266fee8c9ce3f566b097c7225b4c.tar.bz2 |
Fix AP mode 40 MHz pri/sec channel parsing in overlap determination
The previous implementation ended up incorrectly assuming that all
40 MHz use cases have secondary channel above the primary one. Fix this
by properly masking the secondary channel offset field and checking its
value.
Diffstat (limited to 'src')
-rw-r--r-- | src/ap/hw_features.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index 0159c72..3bceb52 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -265,11 +265,11 @@ static void ieee80211n_get_pri_sec_chan(struct wpa_scan_res *bss, oper = (struct ieee80211_ht_operation *) elems.ht_operation; *pri_chan = oper->control_chan; if (oper->ht_param & HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH) { - if (oper->ht_param & - HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE) + int sec = oper->ht_param & + HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK; + if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE) *sec_chan = *pri_chan + 4; - else if (oper->ht_param & - HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW) + else if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW) *sec_chan = *pri_chan - 4; } } |