diff options
author | sam <sam@FreeBSD.org> | 2007-11-23 05:58:37 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-11-23 05:58:37 +0000 |
commit | d7af353cadf48938cf413c3ce31fda89c1058a0d (patch) | |
tree | b1f8a40a703efbeb68f4fdc393e8b67e167385fe /sys/net80211 | |
parent | 7af41a1053994ede0ace56908f5a4bb9f8c7355d (diff) | |
download | FreeBSD-src-d7af353cadf48938cf413c3ce31fda89c1058a0d.zip FreeBSD-src-d7af353cadf48938cf413c3ce31fda89c1058a0d.tar.gz |
use the DSPARMS ie to find the home channel for off-channel frames
Reviewed by: thompsa
MFC after: 1 week
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_scan_sta.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c index 7cdcf1e..eb21259 100644 --- a/sys/net80211/ieee80211_scan_sta.c +++ b/sys/net80211/ieee80211_scan_sta.c @@ -282,20 +282,21 @@ found: * off-channel; this can cause us to attempt an * assocation on the wrong channel. */ - if (ise->se_chan == NULL || !offchan) { + if (offchan) { + struct ieee80211_channel *c; /* - * NB: this is not right when the frame is received - * off-channel but se_chan is assumed set by code - * elsewhere so we must assign something; the scan - * entry should be ignored because the rssi will be - * zero (because the frames are received off-channel). - * - * We could locate the correct channel using sp->chan - * but it's not clear we should join an ap that we - * never see on-channel during a scan. + * Off-channel, locate the home/bss channel for the sta + * using the value broadcast in the DSPARMS ie. */ + c = ieee80211_find_channel_byieee(ic, sp->bchan, + sp->curchan->ic_flags); + if (c == NULL && ise->se_chan == NULL) { + /* should not happen, pick something */ + c = sp->curchan; + } + ise->se_chan = c; + } else ise->se_chan = sp->curchan; - } ise->se_fhdwell = sp->fhdwell; ise->se_fhindex = sp->fhindex; ise->se_erp = sp->erp; |