1 Index: madwifi-trunk-r3314/net80211/ieee80211_beacon.c
2 ===================================================================
3 --- madwifi-trunk-r3314.orig/net80211/ieee80211_beacon.c 2008-02-20 18:10:45.515108151 +0100
4 +++ madwifi-trunk-r3314/net80211/ieee80211_beacon.c 2008-02-20 18:10:50.491391734 +0100
6 vap->iv_flags &= ~IEEE80211_F_XRUPDATE;
9 - if ((ic->ic_flags_ext & IEEE80211_FEXT_ERPUPDATE) &&
10 + if ((vap->iv_flags_ext & IEEE80211_FEXT_ERPUPDATE) &&
11 (bo->bo_erp != NULL)) {
12 (void)ieee80211_add_erp(bo->bo_erp, ic);
13 - ic->ic_flags_ext &= ~IEEE80211_FEXT_ERPUPDATE;
14 + vap->iv_flags_ext &= ~IEEE80211_FEXT_ERPUPDATE;
17 /* if it is a mode change beacon for dynamic turbo case */
18 Index: madwifi-trunk-r3314/net80211/ieee80211_input.c
19 ===================================================================
20 --- madwifi-trunk-r3314.orig/net80211/ieee80211_input.c 2008-02-20 18:10:49.723347963 +0100
21 +++ madwifi-trunk-r3314/net80211/ieee80211_input.c 2008-02-20 18:10:50.495391960 +0100
22 @@ -3431,9 +3431,12 @@
23 /* Assume no ERP IE == 11b AP */
24 if ((!has_erp || (has_erp && (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) &&
25 !(ic->ic_flags & IEEE80211_F_USEPROT)) {
26 + struct ieee80211vap *tmpvap;
28 ic->ic_flags |= IEEE80211_F_USEPROT;
29 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
30 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
31 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
36 Index: madwifi-trunk-r3314/net80211/ieee80211_node.c
37 ===================================================================
38 --- madwifi-trunk-r3314.orig/net80211/ieee80211_node.c 2008-02-20 18:10:49.727348192 +0100
39 +++ madwifi-trunk-r3314/net80211/ieee80211_node.c 2008-02-20 18:10:50.507392644 +0100
40 @@ -2022,8 +2022,12 @@
43 /* Update ERP element if this is first non ERP station */
44 - if (ic->ic_nonerpsta == 1)
45 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
46 + if (ic->ic_nonerpsta == 1) {
47 + struct ieee80211vap *tmpvap;
48 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
49 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
53 ni->ni_flags |= IEEE80211_NODE_ERP;
56 IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni,
57 "non-ERP station leaves, count now %d", ic->ic_nonerpsta);
58 if (ic->ic_nonerpsta == 0) {
59 + struct ieee80211vap *tmpvap;
61 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
62 "%s: disable use of protection\n", __func__);
63 ic->ic_flags &= ~IEEE80211_F_USEPROT;
65 ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
66 ic->ic_flags &= ~IEEE80211_F_USEBARKER;
68 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
69 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
70 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;