Date: Sat, 25 Oct 2008 00:33:30 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 151888 for review Message-ID: <200810250033.m9P0XUDk028518@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151888 Change 151888 by sam@sam_ebb on 2008/10/25 00:33:13 change ieee80211_sta_join to take an explicit channel instead of taking it from the scan parameters Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#67 edit .. //depot/projects/vap/sys/net80211/ieee80211_node.c#50 edit .. //depot/projects/vap/sys/net80211/ieee80211_node.h#30 edit .. //depot/projects/vap/sys/net80211/ieee80211_scan_sta.c#27 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#67 (text+ko) ==== @@ -1463,7 +1463,7 @@ if (lookup.se == NULL) return ENOENT; mlmedebug(vap, mac, IEEE80211_MLME_ASSOC, 0); - if (!ieee80211_sta_join(vap, lookup.se)) + if (!ieee80211_sta_join(vap, lookup.se->se_chan, lookup.se)) return EIO; /* XXX unique but could be better */ return 0; } ==== //depot/projects/vap/sys/net80211/ieee80211_node.c#50 (text+ko) ==== @@ -703,7 +703,7 @@ } int -ieee80211_sta_join(struct ieee80211vap *vap, +ieee80211_sta_join(struct ieee80211vap *vap, struct ieee80211_channel *chan, const struct ieee80211_scan_entry *se) { struct ieee80211com *ic = vap->iv_ic; @@ -725,7 +725,7 @@ ni->ni_tstamp.tsf = se->se_tstamp.tsf; ni->ni_intval = se->se_intval; ni->ni_capinfo = se->se_capinfo; - ni->ni_chan = se->se_chan; + ni->ni_chan = chan; ni->ni_timoff = se->se_timoff; ni->ni_fhdwell = se->se_fhdwell; ni->ni_fhindex = se->se_fhindex; ==== //depot/projects/vap/sys/net80211/ieee80211_node.h#30 (text+ko) ==== @@ -282,7 +282,7 @@ void ieee80211_setcurchan(struct ieee80211com *, struct ieee80211_channel *); int ieee80211_ibss_merge(struct ieee80211_node *); struct ieee80211_scan_entry; -int ieee80211_sta_join(struct ieee80211vap *, +int ieee80211_sta_join(struct ieee80211vap *, struct ieee80211_channel *, const struct ieee80211_scan_entry *); void ieee80211_sta_leave(struct ieee80211_node *); void ieee80211_node_deauth(struct ieee80211_node *, int); ==== //depot/projects/vap/sys/net80211/ieee80211_scan_sta.c#27 (text+ko) ==== @@ -1014,6 +1014,7 @@ { struct sta_table *st = ss->ss_priv; struct sta_entry *selbs; + struct ieee80211_channel *chan; KASSERT(vap->iv_opmode == IEEE80211_M_STA, ("wrong mode %u", vap->iv_opmode)); @@ -1056,7 +1057,10 @@ selbs = select_bss(ss, vap, IEEE80211_MSG_SCAN); if (ss->ss_flags & IEEE80211_SCAN_NOJOIN) return (selbs != NULL); - if (selbs == NULL || !ieee80211_sta_join(vap, &selbs->base)) + if (selbs == NULL) + goto notfound; + chan = selbs->base.se_chan; + if (!ieee80211_sta_join(vap, chan, &selbs->base)) goto notfound; return 1; /* terminate scan */ } @@ -1138,12 +1142,16 @@ se->base.se_rssi = curRssi; selbs = select_bss(ss, vap, IEEE80211_MSG_ROAM); if (selbs != NULL && selbs != se) { + struct ieee80211_channel *chan; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM | IEEE80211_MSG_DEBUG, "%s: ROAM: curRate %u, roamRate %u, " "curRssi %d, roamRssi %d\n", __func__, curRate, roamRate, curRssi, roamRssi); - ieee80211_sta_join(vap, &selbs->base); + + chan = selbs->base.se_chan; + (void) ieee80211_sta_join(vap, chan, &selbs->base); } } } @@ -1419,7 +1427,10 @@ selbs = select_bss(ss, vap, IEEE80211_MSG_SCAN); if (ss->ss_flags & IEEE80211_SCAN_NOJOIN) return (selbs != NULL); - if (selbs == NULL || !ieee80211_sta_join(vap, &selbs->base)) + if (selbs == NULL) + goto notfound; + chan = selbs->base.se_chan; + if (!ieee80211_sta_join(vap, chan, &selbs->base)) goto notfound; return 1; /* terminate scan */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810250033.m9P0XUDk028518>