[ar71xx] fix dir-825-b1 default network config after r21905
[openwrt.git] / package / madwifi / patches / 312-erpupdate.patch
1 --- a/net80211/ieee80211_beacon.c
2 +++ b/net80211/ieee80211_beacon.c
3 @@ -542,10 +542,10 @@ ieee80211_beacon_update(struct ieee80211
4 vap->iv_flags &= ~IEEE80211_F_XRUPDATE;
5 }
6 #endif
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;
13 }
14 }
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 @@ -3431,9 +3431,12 @@ ieee80211_recv_mgmt(struct ieee80211vap
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;
23
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;
28 + }
29 }
30 }
31
32 --- a/net80211/ieee80211_node.c
33 +++ b/net80211/ieee80211_node.c
34 @@ -2025,8 +2025,12 @@ ieee80211_node_join_11g(struct ieee80211
35 }
36
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;
44 + }
45 + }
46 } else
47 ni->ni_flags |= IEEE80211_NODE_ERP;
48 }
49 @@ -2229,6 +2233,8 @@ ieee80211_node_leave_11g(struct ieee8021
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;
54 +
55 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
56 "%s: disable use of protection\n", __func__);
57 ic->ic_flags &= ~IEEE80211_F_USEPROT;
58 @@ -2240,7 +2246,9 @@ ieee80211_node_leave_11g(struct ieee8021
59 ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
60 ic->ic_flags &= ~IEEE80211_F_USEBARKER;
61 }
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;
65 + }
66 }
67 }
68 }
This page took 0.084062 seconds and 5 git commands to generate.