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(-)
13 --- hostap.orig/hostapd/driver.h 2007-11-09 13:41:07.000000000 +0100
14 +++ hostap/hostapd/driver.h 2007-11-09 13:41:15.000000000 +0100
15 @@ -92,7 +92,7 @@ struct wpa_driver_ops {
16 int (*get_retry)(void *priv, int *short_retry, int *long_retry);
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,
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
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)
31 if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
33 - return hapd->driver->sta_set_flags(hapd->drv_priv, addr, flags_or,
35 + return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags,
36 + flags_or, flags_and);
40 --- hostap.orig/hostapd/driver_bsd.c 2007-11-09 13:41:07.000000000 +0100
41 +++ hostap/hostapd/driver_bsd.c 2007-11-09 13:41:15.000000000 +0100
42 @@ -322,7 +322,8 @@ bsd_set_sta_authorized(void *priv, const
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,
50 /* For now, only support setting Authorized flag */
51 if (flags_or & WLAN_STA_AUTHORIZED)
52 --- hostap.orig/hostapd/driver_devicescape.c 2007-11-09 13:41:14.000000000 +0100
53 +++ hostap/hostapd/driver_devicescape.c 2007-11-09 13:41:15.000000000 +0100
54 @@ -76,7 +76,7 @@ struct i802_driver_data {
55 #define HAPD_DECL struct hostapd_data *hapd = iface->bss[0]
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);
62 static int hostapd_set_iface_flags(struct i802_driver_data *drv, int dev_up)
63 @@ -765,7 +765,7 @@ static int i802_sta_remove(void *priv, c
64 struct i802_driver_data *drv = priv;
65 struct prism2_hostapd_param param;
67 - i802_sta_set_flags(drv, addr, 0, ~WLAN_STA_AUTHORIZED);
68 + i802_sta_set_flags(drv, addr, 0, 0, ~WLAN_STA_AUTHORIZED);
70 memset(¶m, 0, sizeof(param));
71 param.cmd = PRISM2_HOSTAPD_REMOVE_STA;
72 @@ -777,7 +777,7 @@ static int i802_sta_remove(void *priv, c
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)
79 struct i802_driver_data *drv = priv;
80 struct prism2_hostapd_param param;
81 --- hostap.orig/hostapd/driver_hostap.c 2007-11-09 13:41:07.000000000 +0100
82 +++ hostap/hostapd/driver_hostap.c 2007-11-09 13:41:15.000000000 +0100
83 @@ -374,7 +374,7 @@ static int hostap_send_eapol(void *priv,
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)
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;
96 - hostap_sta_set_flags(drv, addr, 0, ~WLAN_STA_AUTHORIZED);
97 + hostap_sta_set_flags(drv, addr, 0, 0, ~WLAN_STA_AUTHORIZED);
99 memset(¶m, 0, sizeof(param));
100 param.cmd = PRISM2_HOSTAPD_REMOVE_STA;
101 --- hostap.orig/hostapd/driver_madwifi.c 2007-11-09 13:41:07.000000000 +0100
102 +++ hostap/hostapd/driver_madwifi.c 2007-11-09 13:41:15.000000000 +0100
103 @@ -410,7 +410,8 @@ madwifi_set_sta_authorized(void *priv, c
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)
111 /* For now, only support setting Authorized flag */
112 if (flags_or & WLAN_STA_AUTHORIZED)
113 --- hostap.orig/hostapd/driver_prism54.c 2007-11-09 13:41:07.000000000 +0100
114 +++ hostap/hostapd/driver_prism54.c 2007-11-09 13:41:15.000000000 +0100
115 @@ -187,7 +187,8 @@ static int prism54_set_sta_authorized(vo
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)
123 /* For now, only support setting Authorized flag */
124 if (flags_or & WLAN_STA_AUTHORIZED)
125 --- hostap.orig/hostapd/ieee802_11.c 2007-11-09 13:41:07.000000000 +0100
126 +++ hostap/hostapd/ieee802_11.c 2007-11-09 13:41:15.000000000 +0100
127 @@ -1625,10 +1625,10 @@ static void handle_assoc_cb(struct hosta
128 ap_sta_bind_vlan(hapd, sta, 0);
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);
135 - hostapd_sta_set_flags(hapd, sta->addr,
136 + hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
137 0, ~WLAN_STA_SHORT_PREAMBLE);
140 --- hostap.orig/hostapd/ieee802_1x.c 2007-11-09 13:41:07.000000000 +0100
141 +++ hostap/hostapd/ieee802_1x.c 2007-11-09 13:41:15.000000000 +0100
142 @@ -94,13 +94,13 @@ void ieee802_1x_set_sta_authorized(struc
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");
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-09 13:41:07.000000000 +0100
159 +++ hostap/hostapd/wme.c 2007-11-09 13:41:15.000000000 +0100
160 @@ -110,9 +110,11 @@ int hostapd_wme_sta_config(struct hostap
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,
168 - hostapd_sta_set_flags(hapd, sta->addr, 0, ~WLAN_STA_WME);
169 + hostapd_sta_set_flags(hapd, sta->addr, sta->flags,