1 --- a/net80211/ieee80211_beacon.c
2 +++ b/net80211/ieee80211_beacon.c
4 vap->iv_flags &= ~IEEE80211_F_XRUPDATE;
7 - if ((ic->ic_flags_ext & IEEE80211_FEXT_ERPUPDATE) &&
8 + if ((vap->iv_flags_ext & IEEE80211_FEXT_ERPUPDATE) &&
9 (bo->bo_erp != NULL)) {
10 (void)ieee80211_add_erp(bo->bo_erp, ic);
11 - ic->ic_flags_ext &= ~IEEE80211_FEXT_ERPUPDATE;
12 + vap->iv_flags_ext &= ~IEEE80211_FEXT_ERPUPDATE;
15 /* if it is a mode change beacon for dynamic turbo case */
16 --- a/net80211/ieee80211_input.c
17 +++ b/net80211/ieee80211_input.c
18 @@ -3384,9 +3384,12 @@
19 /* Assume no ERP IE == 11b AP */
20 if ((!has_erp || (has_erp && (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) &&
21 !(ic->ic_flags & IEEE80211_F_USEPROT)) {
22 + struct ieee80211vap *tmpvap;
24 ic->ic_flags |= IEEE80211_F_USEPROT;
25 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
26 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
27 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
32 --- a/net80211/ieee80211_node.c
33 +++ b/net80211/ieee80211_node.c
34 @@ -1741,8 +1741,12 @@
37 /* Update ERP element if this is first non ERP station */
38 - if (ic->ic_nonerpsta == 1)
39 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
40 + if (ic->ic_nonerpsta == 1) {
41 + struct ieee80211vap *tmpvap;
42 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
43 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
47 ni->ni_flags |= IEEE80211_NODE_ERP;
50 IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni,
51 "non-ERP station leaves, count now %d", ic->ic_nonerpsta);
52 if (ic->ic_nonerpsta == 0) {
53 + struct ieee80211vap *tmpvap;
55 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
56 "%s: disable use of protection\n", __func__);
57 ic->ic_flags &= ~IEEE80211_F_USEPROT;
59 ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
60 ic->ic_flags &= ~IEEE80211_F_USEBARKER;
62 - ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
63 + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
64 + tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;