add missing #include
[openwrt.git] / package / madwifi / patches / 312-erpupdate.patch
1 Index: madwifi-trunk-r3280/net80211/ieee80211_beacon.c
2 ===================================================================
3 --- madwifi-trunk-r3280.orig/net80211/ieee80211_beacon.c 2008-01-28 17:27:08.000000000 +0100
4 +++ madwifi-trunk-r3280/net80211/ieee80211_beacon.c 2008-01-28 17:32:30.587778482 +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-r3280/net80211/ieee80211_input.c
19 ===================================================================
20 --- madwifi-trunk-r3280.orig/net80211/ieee80211_input.c 2008-01-28 17:30:33.905937066 +0100
21 +++ madwifi-trunk-r3280/net80211/ieee80211_input.c 2008-01-28 17:31:42.836941957 +0100
22 @@ -3423,9 +3423,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-r3280/net80211/ieee80211_node.c
37 ===================================================================
38 --- madwifi-trunk-r3280.orig/net80211/ieee80211_node.c 2008-01-28 17:30:34.525972400 +0100
39 +++ madwifi-trunk-r3280/net80211/ieee80211_node.c 2008-01-28 17:31:42.844938410 +0100
40 @@ -2021,8 +2021,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 @@ -2225,6 +2229,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 @@ -2236,7 +2242,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.04904 seconds and 5 git commands to generate.