reorder patches
[openwrt.git] / package / madwifi / patches / 312-erpupdate.patch
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
5 @@ -542,10 +542,10 @@
6 vap->iv_flags &= ~IEEE80211_F_XRUPDATE;
7 }
8 #endif
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;
15 }
16 }
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;
27
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;
32 + }
33 }
34 }
35
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 @@
41 }
42
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;
50 + }
51 + }
52 } else
53 ni->ni_flags |= IEEE80211_NODE_ERP;
54 }
55 @@ -2226,6 +2230,8 @@
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;
60 +
61 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
62 "%s: disable use of protection\n", __func__);
63 ic->ic_flags &= ~IEEE80211_F_USEPROT;
64 @@ -2237,7 +2243,9 @@
65 ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
66 ic->ic_flags &= ~IEEE80211_F_USEBARKER;
67 }
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;
71 + }
72 }
73 }
74 }
This page took 0.049401 seconds and 5 git commands to generate.