aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_netdev.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-12-18 19:31:22 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:59:45 -0500
commitce3edf6d0b979fa4d5da7204fd8c6f77f2b8622a (patch)
tree3608f59fa3c437edfe132a603775111a03dce453 /net/mac80211/debugfs_netdev.c
parent1946b74ce03c4edecabde80d027da00a7eab56ca (diff)
mac80211: clean up eapol frame handling/port control
This cleans up the eapol frame handling and some related code in the receive and transmit paths. After this patch * EAPOL frames addressed to us or the EAPOL group address are always accepted regardless of whether they are encrypted or not * other frames from a station are dropped if PAE is enabled and the station is not authorized * unencrypted frames (except the EAPOL frames above) are dropped if drop_unencrypted is enabled * some superfluous code that eth_type_trans handles anyway is gone * port control is done for transmitted packets Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/debugfs_netdev.c')
-rw-r--r--net/mac80211/debugfs_netdev.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index f0e6ab7eb624..bf715d28643b 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -91,8 +91,7 @@ static const struct file_operations name##_ops = { \
91/* common attributes */ 91/* common attributes */
92IEEE80211_IF_FILE(channel_use, channel_use, DEC); 92IEEE80211_IF_FILE(channel_use, channel_use, DEC);
93IEEE80211_IF_FILE(drop_unencrypted, drop_unencrypted, DEC); 93IEEE80211_IF_FILE(drop_unencrypted, drop_unencrypted, DEC);
94IEEE80211_IF_FILE(eapol, eapol, DEC); 94IEEE80211_IF_FILE(ieee802_1x_pac, ieee802_1x_pac, DEC);
95IEEE80211_IF_FILE(ieee8021_x, ieee802_1x, DEC);
96 95
97/* STA/IBSS attributes */ 96/* STA/IBSS attributes */
98IEEE80211_IF_FILE(state, u.sta.state, DEC); 97IEEE80211_IF_FILE(state, u.sta.state, DEC);
@@ -170,8 +169,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
170{ 169{
171 DEBUGFS_ADD(channel_use, sta); 170 DEBUGFS_ADD(channel_use, sta);
172 DEBUGFS_ADD(drop_unencrypted, sta); 171 DEBUGFS_ADD(drop_unencrypted, sta);
173 DEBUGFS_ADD(eapol, sta); 172 DEBUGFS_ADD(ieee802_1x_pac, sta);
174 DEBUGFS_ADD(ieee8021_x, sta);
175 DEBUGFS_ADD(state, sta); 173 DEBUGFS_ADD(state, sta);
176 DEBUGFS_ADD(bssid, sta); 174 DEBUGFS_ADD(bssid, sta);
177 DEBUGFS_ADD(prev_bssid, sta); 175 DEBUGFS_ADD(prev_bssid, sta);
@@ -192,8 +190,7 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
192{ 190{
193 DEBUGFS_ADD(channel_use, ap); 191 DEBUGFS_ADD(channel_use, ap);
194 DEBUGFS_ADD(drop_unencrypted, ap); 192 DEBUGFS_ADD(drop_unencrypted, ap);
195 DEBUGFS_ADD(eapol, ap); 193 DEBUGFS_ADD(ieee802_1x_pac, ap);
196 DEBUGFS_ADD(ieee8021_x, ap);
197 DEBUGFS_ADD(num_sta_ps, ap); 194 DEBUGFS_ADD(num_sta_ps, ap);
198 DEBUGFS_ADD(dtim_period, ap); 195 DEBUGFS_ADD(dtim_period, ap);
199 DEBUGFS_ADD(dtim_count, ap); 196 DEBUGFS_ADD(dtim_count, ap);
@@ -209,8 +206,7 @@ static void add_wds_files(struct ieee80211_sub_if_data *sdata)
209{ 206{
210 DEBUGFS_ADD(channel_use, wds); 207 DEBUGFS_ADD(channel_use, wds);
211 DEBUGFS_ADD(drop_unencrypted, wds); 208 DEBUGFS_ADD(drop_unencrypted, wds);
212 DEBUGFS_ADD(eapol, wds); 209 DEBUGFS_ADD(ieee802_1x_pac, wds);
213 DEBUGFS_ADD(ieee8021_x, wds);
214 DEBUGFS_ADD(peer, wds); 210 DEBUGFS_ADD(peer, wds);
215} 211}
216 212
@@ -218,8 +214,7 @@ static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
218{ 214{
219 DEBUGFS_ADD(channel_use, vlan); 215 DEBUGFS_ADD(channel_use, vlan);
220 DEBUGFS_ADD(drop_unencrypted, vlan); 216 DEBUGFS_ADD(drop_unencrypted, vlan);
221 DEBUGFS_ADD(eapol, vlan); 217 DEBUGFS_ADD(ieee802_1x_pac, vlan);
222 DEBUGFS_ADD(ieee8021_x, vlan);
223} 218}
224 219
225static void add_monitor_files(struct ieee80211_sub_if_data *sdata) 220static void add_monitor_files(struct ieee80211_sub_if_data *sdata)
@@ -263,8 +258,7 @@ static void del_sta_files(struct ieee80211_sub_if_data *sdata)
263{ 258{
264 DEBUGFS_DEL(channel_use, sta); 259 DEBUGFS_DEL(channel_use, sta);
265 DEBUGFS_DEL(drop_unencrypted, sta); 260 DEBUGFS_DEL(drop_unencrypted, sta);
266 DEBUGFS_DEL(eapol, sta); 261 DEBUGFS_DEL(ieee802_1x_pac, sta);
267 DEBUGFS_DEL(ieee8021_x, sta);
268 DEBUGFS_DEL(state, sta); 262 DEBUGFS_DEL(state, sta);
269 DEBUGFS_DEL(bssid, sta); 263 DEBUGFS_DEL(bssid, sta);
270 DEBUGFS_DEL(prev_bssid, sta); 264 DEBUGFS_DEL(prev_bssid, sta);
@@ -285,8 +279,7 @@ static void del_ap_files(struct ieee80211_sub_if_data *sdata)
285{ 279{
286 DEBUGFS_DEL(channel_use, ap); 280 DEBUGFS_DEL(channel_use, ap);
287 DEBUGFS_DEL(drop_unencrypted, ap); 281 DEBUGFS_DEL(drop_unencrypted, ap);
288 DEBUGFS_DEL(eapol, ap); 282 DEBUGFS_DEL(ieee802_1x_pac, ap);
289 DEBUGFS_DEL(ieee8021_x, ap);
290 DEBUGFS_DEL(num_sta_ps, ap); 283 DEBUGFS_DEL(num_sta_ps, ap);
291 DEBUGFS_DEL(dtim_period, ap); 284 DEBUGFS_DEL(dtim_period, ap);
292 DEBUGFS_DEL(dtim_count, ap); 285 DEBUGFS_DEL(dtim_count, ap);
@@ -302,8 +295,7 @@ static void del_wds_files(struct ieee80211_sub_if_data *sdata)
302{ 295{
303 DEBUGFS_DEL(channel_use, wds); 296 DEBUGFS_DEL(channel_use, wds);
304 DEBUGFS_DEL(drop_unencrypted, wds); 297 DEBUGFS_DEL(drop_unencrypted, wds);
305 DEBUGFS_DEL(eapol, wds); 298 DEBUGFS_DEL(ieee802_1x_pac, wds);
306 DEBUGFS_DEL(ieee8021_x, wds);
307 DEBUGFS_DEL(peer, wds); 299 DEBUGFS_DEL(peer, wds);
308} 300}
309 301
@@ -311,8 +303,7 @@ static void del_vlan_files(struct ieee80211_sub_if_data *sdata)
311{ 303{
312 DEBUGFS_DEL(channel_use, vlan); 304 DEBUGFS_DEL(channel_use, vlan);
313 DEBUGFS_DEL(drop_unencrypted, vlan); 305 DEBUGFS_DEL(drop_unencrypted, vlan);
314 DEBUGFS_DEL(eapol, vlan); 306 DEBUGFS_DEL(ieee802_1x_pac, vlan);
315 DEBUGFS_DEL(ieee8021_x, vlan);
316} 307}
317 308
318static void del_monitor_files(struct ieee80211_sub_if_data *sdata) 309static void del_monitor_files(struct ieee80211_sub_if_data *sdata)