1 Index: madwifi-dfs-r3053/net80211/ieee80211_beacon.c
2 ===================================================================
3 --- madwifi-dfs-r3053.orig/net80211/ieee80211_beacon.c 2008-01-10 10:51:31.406580318 +0100
4 +++ madwifi-dfs-r3053/net80211/ieee80211_beacon.c 2008-01-10 10:56:54.040966203 +0100
6 vap->iv_flags &= ~IEEE80211_F_XRUPDATE;
9 - if ((ic->ic_flags_ext & IEEE80211_FEXT_ERPUPDATE) && (bo->bo_erp != NULL)) {
10 + if ((vap->iv_flags_ext & IEEE80211_FEXT_ERPUPDATE) && (bo->bo_erp != NULL)) {
11 (void) ieee80211_add_erp(bo->bo_erp, ic);
12 - ic->ic_flags_ext &= ~IEEE80211_FEXT_ERPUPDATE;
13 + vap->iv_flags_ext &= ~IEEE80211_FEXT_ERPUPDATE;
16 /* if it is a mode change beacon for dynamic turbo case */
17 Index: madwifi-dfs-r3053/net80211/ieee80211_input.c
18 ===================================================================
19 --- madwifi-dfs-r3053.orig/net80211/ieee80211_input.c 2008-01-10 10:51:31.558588981 +0100
20 +++ madwifi-dfs-r3053/net80211/ieee80211_input.c 2008-01-10 10:55:51.565405916 +0100
21 @@ -3315,9 +3315,12 @@
22 /* Assume no ERP IE == 11b AP */
23 if ((!has_erp || (has_erp && (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) &&
24 !(ic->ic_flags & IEEE80211_F_USEPROT)) {
25 + struct ieee80211vap *tmpvap;
27 ic->ic_flags |= IEEE80211_F_USEPROT;
28 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
29 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
30 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
35 Index: madwifi-dfs-r3053/net80211/ieee80211_node.c
36 ===================================================================
37 --- madwifi-dfs-r3053.orig/net80211/ieee80211_node.c 2008-01-10 10:51:31.622592626 +0100
38 +++ madwifi-dfs-r3053/net80211/ieee80211_node.c 2008-01-10 10:54:58.398376106 +0100
39 @@ -1998,8 +1998,12 @@
42 /* Update ERP element if this is first non ERP station */
43 - if (ic->ic_nonerpsta == 1)
44 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
45 + if (ic->ic_nonerpsta == 1) {
46 + struct ieee80211vap *tmpvap;
47 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
48 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
52 ni->ni_flags |= IEEE80211_NODE_ERP;
55 IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni,
56 "non-ERP station leaves, count now %d", ic->ic_nonerpsta);
57 if (ic->ic_nonerpsta == 0) {
58 + struct ieee80211vap *tmpvap;
60 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
61 "%s: disable use of protection\n", __func__);
62 ic->ic_flags &= ~IEEE80211_F_USEPROT;
64 ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
65 ic->ic_flags &= ~IEEE80211_F_USEBARKER;
67 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
68 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
69 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;