AR7 2.6.24, removed duplicate patches
[openwrt.git] / package / hostapd / patches / 001-pass-full-flags-to-sta-function.patch
1 ---
2 hostapd/driver.h | 8 ++++----
3 hostapd/driver_bsd.c | 3 ++-
4 hostapd/driver_devicescape.c | 6 +++---
5 hostapd/driver_hostap.c | 4 ++--
6 hostapd/driver_madwifi.c | 3 ++-
7 hostapd/driver_prism54.c | 3 ++-
8 hostapd/ieee802_11.c | 4 ++--
9 hostapd/ieee802_1x.c | 4 ++--
10 hostapd/wme.c | 6 ++++--
11 9 files changed, 23 insertions(+), 18 deletions(-)
12
13 --- hostap.orig/hostapd/driver.h 2007-11-14 17:30:38.000000000 +0100
14 +++ hostap/hostapd/driver.h 2007-11-14 17:30:47.000000000 +0100
15 @@ -92,7 +92,7 @@ struct wpa_driver_ops {
16 int (*get_retry)(void *priv, int *short_retry, int *long_retry);
17
18 int (*sta_set_flags)(void *priv, const u8 *addr,
19 - int flags_or, int flags_and);
20 + int total_flags, int flags_or, int flags_and);
21 int (*set_rate_sets)(void *priv, int *supp_rates, int *basic_rates,
22 int mode);
23 int (*set_channel_flag)(void *priv, int mode, int chan, int flag,
24 @@ -427,12 +427,12 @@ hostapd_get_retry(struct hostapd_data *h
25
26 static inline int
27 hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
28 - int flags_or, int flags_and)
29 + int total_flags, int flags_or, int flags_and)
30 {
31 if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
32 return 0;
33 - return hapd->driver->sta_set_flags(hapd->drv_priv, addr, flags_or,
34 - flags_and);
35 + return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags,
36 + flags_or, flags_and);
37 }
38
39 static inline int
40 --- hostap.orig/hostapd/driver_bsd.c 2007-11-14 17:30:38.000000000 +0100
41 +++ hostap/hostapd/driver_bsd.c 2007-11-14 17:30:47.000000000 +0100
42 @@ -322,7 +322,8 @@ bsd_set_sta_authorized(void *priv, const
43 }
44
45 static int
46 -bsd_sta_set_flags(void *priv, const u8 *addr, int flags_or, int flags_and)
47 +bsd_sta_set_flags(void *priv, const u8 *addr, int total_flags, int flags_or,
48 + int flags_and)
49 {
50 /* For now, only support setting Authorized flag */
51 if (flags_or & WLAN_STA_AUTHORIZED)
52 --- hostap.orig/hostapd/driver_devicescape.c 2007-11-14 17:30:39.000000000 +0100
53 +++ hostap/hostapd/driver_devicescape.c 2007-11-14 17:30:47.000000000 +0100
54 @@ -74,7 +74,7 @@ struct i802_driver_data {
55 #define HAPD_DECL struct hostapd_data *hapd = iface->bss[0]
56
57 static int i802_sta_set_flags(void *priv, const u8 *addr,
58 - int flags_or, int flags_and);
59 + int total_flags, int flags_or, int flags_and);
60
61
62 static int hostapd_set_iface_flags(struct i802_driver_data *drv, int dev_up)
63 @@ -666,7 +666,7 @@ static int i802_sta_remove(void *priv, c
64 struct i802_driver_data *drv = priv;
65 struct prism2_hostapd_param param;
66
67 - i802_sta_set_flags(drv, addr, 0, ~WLAN_STA_AUTHORIZED);
68 + i802_sta_set_flags(drv, addr, 0, 0, ~WLAN_STA_AUTHORIZED);
69
70 memset(&param, 0, sizeof(param));
71 param.cmd = PRISM2_HOSTAPD_REMOVE_STA;
72 @@ -678,7 +678,7 @@ static int i802_sta_remove(void *priv, c
73
74
75 static int i802_sta_set_flags(void *priv, const u8 *addr,
76 - int flags_or, int flags_and)
77 + int total_flags, int flags_or, int flags_and)
78 {
79 struct i802_driver_data *drv = priv;
80 struct prism2_hostapd_param param;
81 --- hostap.orig/hostapd/driver_hostap.c 2007-11-14 17:30:38.000000000 +0100
82 +++ hostap/hostapd/driver_hostap.c 2007-11-14 17:30:47.000000000 +0100
83 @@ -374,7 +374,7 @@ static int hostap_send_eapol(void *priv,
84
85
86 static int hostap_sta_set_flags(void *priv, const u8 *addr,
87 - int flags_or, int flags_and)
88 + int total_flags, int flags_or, int flags_and)
89 {
90 struct hostap_driver_data *drv = priv;
91 struct prism2_hostapd_param param;
92 @@ -694,7 +694,7 @@ static int hostap_sta_remove(void *priv,
93 struct hostap_driver_data *drv = priv;
94 struct prism2_hostapd_param param;
95
96 - hostap_sta_set_flags(drv, addr, 0, ~WLAN_STA_AUTHORIZED);
97 + hostap_sta_set_flags(drv, addr, 0, 0, ~WLAN_STA_AUTHORIZED);
98
99 memset(&param, 0, sizeof(param));
100 param.cmd = PRISM2_HOSTAPD_REMOVE_STA;
101 --- hostap.orig/hostapd/driver_madwifi.c 2007-11-14 17:30:38.000000000 +0100
102 +++ hostap/hostapd/driver_madwifi.c 2007-11-14 17:30:47.000000000 +0100
103 @@ -410,7 +410,8 @@ madwifi_set_sta_authorized(void *priv, c
104 }
105
106 static int
107 -madwifi_sta_set_flags(void *priv, const u8 *addr, int flags_or, int flags_and)
108 +madwifi_sta_set_flags(void *priv, const u8 *addr, int total_flags,
109 + int flags_or, int flags_and)
110 {
111 /* For now, only support setting Authorized flag */
112 if (flags_or & WLAN_STA_AUTHORIZED)
113 --- hostap.orig/hostapd/driver_prism54.c 2007-11-14 17:30:38.000000000 +0100
114 +++ hostap/hostapd/driver_prism54.c 2007-11-14 17:30:47.000000000 +0100
115 @@ -187,7 +187,8 @@ static int prism54_set_sta_authorized(vo
116
117
118 static int
119 -prism54_sta_set_flags(void *priv, const u8 *addr, int flags_or, int flags_and)
120 +prism54_sta_set_flags(void *priv, const u8 *addr, int total_flags,
121 + int flags_or, int flags_and)
122 {
123 /* For now, only support setting Authorized flag */
124 if (flags_or & WLAN_STA_AUTHORIZED)
125 --- hostap.orig/hostapd/ieee802_11.c 2007-11-14 17:30:37.000000000 +0100
126 +++ hostap/hostapd/ieee802_11.c 2007-11-14 17:30:47.000000000 +0100
127 @@ -1625,10 +1625,10 @@ static void handle_assoc_cb(struct hosta
128 ap_sta_bind_vlan(hapd, sta, 0);
129 }
130 if (sta->flags & WLAN_STA_SHORT_PREAMBLE) {
131 - hostapd_sta_set_flags(hapd, sta->addr,
132 + hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
133 WLAN_STA_SHORT_PREAMBLE, ~0);
134 } else {
135 - hostapd_sta_set_flags(hapd, sta->addr,
136 + hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
137 0, ~WLAN_STA_SHORT_PREAMBLE);
138 }
139
140 --- hostap.orig/hostapd/ieee802_1x.c 2007-11-14 17:30:37.000000000 +0100
141 +++ hostap/hostapd/ieee802_1x.c 2007-11-14 17:30:47.000000000 +0100
142 @@ -94,13 +94,13 @@ void ieee802_1x_set_sta_authorized(struc
143
144 if (authorized) {
145 sta->flags |= WLAN_STA_AUTHORIZED;
146 - res = hostapd_sta_set_flags(hapd, sta->addr,
147 + res = hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
148 WLAN_STA_AUTHORIZED, ~0);
149 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X,
150 HOSTAPD_LEVEL_DEBUG, "authorizing port");
151 } else {
152 sta->flags &= ~WLAN_STA_AUTHORIZED;
153 - res = hostapd_sta_set_flags(hapd, sta->addr,
154 + res = hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
155 0, ~WLAN_STA_AUTHORIZED);
156 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X,
157 HOSTAPD_LEVEL_DEBUG, "unauthorizing port");
158 --- hostap.orig/hostapd/wme.c 2007-11-14 17:30:38.000000000 +0100
159 +++ hostap/hostapd/wme.c 2007-11-14 17:30:47.000000000 +0100
160 @@ -110,9 +110,11 @@ int hostapd_wme_sta_config(struct hostap
161 {
162 /* update kernel STA data for WME related items (WLAN_STA_WPA flag) */
163 if (sta->flags & WLAN_STA_WME)
164 - hostapd_sta_set_flags(hapd, sta->addr, WLAN_STA_WME, ~0);
165 + hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
166 + WLAN_STA_WME, ~0);
167 else
168 - hostapd_sta_set_flags(hapd, sta->addr, 0, ~WLAN_STA_WME);
169 + hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
170 + 0, ~WLAN_STA_WME);
171
172 return 0;
173 }
This page took 0.051282 seconds and 5 git commands to generate.