1 Patch adapted from ubnt madwifi patchset
3 --- a/net80211/ieee80211_node.c
4 +++ b/net80211/ieee80211_node.c
8 vap->iv_nsparams.newstate = IEEE80211_S_ASSOC;
9 - vap->iv_nsparams.arg = 0;
10 + vap->iv_nsparams.arg = IEEE80211_FC0_SUBTYPE_REASSOC_REQ;
11 IEEE80211_SCHEDULE_TQUEUE(&vap->iv_stajoin1tq);
13 vap->iv_nsparams.newstate = IEEE80211_S_AUTH;
14 --- a/net80211/ieee80211_scan_sta.c
15 +++ b/net80211/ieee80211_scan_sta.c
17 * a reference to an entry w/o holding the lock on the table.
19 static struct sta_entry *
20 -sta_lookup(struct sta_table *st, const u_int8_t macaddr[IEEE80211_ADDR_LEN])
21 +sta_lookup(struct sta_table *st, const u_int8_t macaddr[IEEE80211_ADDR_LEN], struct ieee80211_scan_ssid* essid)
24 int hash = STA_HASH(macaddr);
26 SCAN_STA_LOCK_IRQ(st);
27 LIST_FOREACH(se, &st->st_hash[hash], se_hash)
28 - if (IEEE80211_ADDR_EQ(se->base.se_macaddr, macaddr))
29 + if (IEEE80211_ADDR_EQ(se->base.se_macaddr, macaddr) &&
30 + (essid->len == se->base.se_ssid[1] &&
31 + !memcmp(se->base.se_ssid+2, essid->ssid,
32 + se->base.se_ssid[1])))
34 SCAN_STA_UNLOCK_IRQ(st);
37 u_int8_t roamRate, curRate;
38 int8_t roamRssi, curRssi;
40 - se = sta_lookup(st, ni->ni_macaddr);
41 + se = sta_lookup(st, ni->ni_macaddr, ss->ss_ssid);
43 /* XXX something is wrong */
47 KASSERT(vap->iv_opmode == IEEE80211_M_STA,
48 ("wrong mode %u", vap->iv_opmode));
49 - /* XXX turn this off until the ap release is cut */
50 - if (0 && vap->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO &&
51 + if (vap->iv_opmode == IEEE80211_M_STA &&
52 + vap->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO &&
53 vap->iv_state >= IEEE80211_S_RUN)
54 /* XXX vap is implicit */
55 sta_roam_check(ss, vap);
57 struct sta_table *st = ss->ss_priv;
60 - se = sta_lookup(st, macaddr);
61 + /* Let outside apps to decide what peer is blacklisted */
62 + if (ss->ss_vap->iv_ic->ic_roaming == IEEE80211_ROAMING_MANUAL)
65 + se = sta_lookup(st, macaddr, ss->ss_ssid);
68 se->se_lastfail = jiffies;
70 struct sta_table *st = ss->ss_priv;
73 - se = sta_lookup(st, macaddr);
74 + se = sta_lookup(st, macaddr, ss->ss_ssid);