diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-09-17 01:29:25 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:52:29 -0400 |
commit | 011bfcc4f3d3444b140da3880ae30a62cc93529e (patch) | |
tree | 2c856fefcd132ed308623b1da5cd47a22177d7af /net | |
parent | 72abd81b980ef7ffb83ecb4ac4a7627d9d575f50 (diff) |
[MAC80211]: remove key threshold stuff
This patch removes the key threshold stuff from mac80211.
I have patches for later that add it as a per-key setting
to nl/cfg80211.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/debugfs.c | 4 | ||||
-rw-r--r-- | net/mac80211/hostapd_ioctl.h | 1 | ||||
-rw-r--r-- | net/mac80211/ieee80211.c | 35 | ||||
-rw-r--r-- | net/mac80211/ieee80211_common.h | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 7 | ||||
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 8 | ||||
-rw-r--r-- | net/mac80211/rx.c | 7 | ||||
-rw-r--r-- | net/mac80211/tx.c | 7 |
8 files changed, 3 insertions, 68 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 12db9adc0361..60514b2c97b9 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -90,8 +90,6 @@ DEBUGFS_READONLY_FILE(antenna_sel_rx, 20, "%d", | |||
90 | local->hw.conf.antenna_sel_rx); | 90 | local->hw.conf.antenna_sel_rx); |
91 | DEBUGFS_READONLY_FILE(bridge_packets, 20, "%d", | 91 | DEBUGFS_READONLY_FILE(bridge_packets, 20, "%d", |
92 | local->bridge_packets); | 92 | local->bridge_packets); |
93 | DEBUGFS_READONLY_FILE(key_tx_rx_threshold, 20, "%d", | ||
94 | local->key_tx_rx_threshold); | ||
95 | DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d", | 93 | DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d", |
96 | local->rts_threshold); | 94 | local->rts_threshold); |
97 | DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d", | 95 | DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d", |
@@ -301,7 +299,6 @@ void debugfs_hw_add(struct ieee80211_local *local) | |||
301 | DEBUGFS_ADD(antenna_sel_tx); | 299 | DEBUGFS_ADD(antenna_sel_tx); |
302 | DEBUGFS_ADD(antenna_sel_rx); | 300 | DEBUGFS_ADD(antenna_sel_rx); |
303 | DEBUGFS_ADD(bridge_packets); | 301 | DEBUGFS_ADD(bridge_packets); |
304 | DEBUGFS_ADD(key_tx_rx_threshold); | ||
305 | DEBUGFS_ADD(rts_threshold); | 302 | DEBUGFS_ADD(rts_threshold); |
306 | DEBUGFS_ADD(fragmentation_threshold); | 303 | DEBUGFS_ADD(fragmentation_threshold); |
307 | DEBUGFS_ADD(short_retry_limit); | 304 | DEBUGFS_ADD(short_retry_limit); |
@@ -364,7 +361,6 @@ void debugfs_hw_del(struct ieee80211_local *local) | |||
364 | DEBUGFS_DEL(antenna_sel_tx); | 361 | DEBUGFS_DEL(antenna_sel_tx); |
365 | DEBUGFS_DEL(antenna_sel_rx); | 362 | DEBUGFS_DEL(antenna_sel_rx); |
366 | DEBUGFS_DEL(bridge_packets); | 363 | DEBUGFS_DEL(bridge_packets); |
367 | DEBUGFS_DEL(key_tx_rx_threshold); | ||
368 | DEBUGFS_DEL(rts_threshold); | 364 | DEBUGFS_DEL(rts_threshold); |
369 | DEBUGFS_DEL(fragmentation_threshold); | 365 | DEBUGFS_DEL(fragmentation_threshold); |
370 | DEBUGFS_DEL(short_retry_limit); | 366 | DEBUGFS_DEL(short_retry_limit); |
diff --git a/net/mac80211/hostapd_ioctl.h b/net/mac80211/hostapd_ioctl.h index ac812ec9fa2f..2300c5516458 100644 --- a/net/mac80211/hostapd_ioctl.h +++ b/net/mac80211/hostapd_ioctl.h | |||
@@ -32,7 +32,6 @@ enum { | |||
32 | PRISM2_PARAM_PREAMBLE = 1003, | 32 | PRISM2_PARAM_PREAMBLE = 1003, |
33 | PRISM2_PARAM_SHORT_SLOT_TIME = 1006, | 33 | PRISM2_PARAM_SHORT_SLOT_TIME = 1006, |
34 | PRISM2_PARAM_NEXT_MODE = 1008, | 34 | PRISM2_PARAM_NEXT_MODE = 1008, |
35 | PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024, | ||
36 | PRISM2_PARAM_WIFI_WME_NOACK_TEST = 1033, | 35 | PRISM2_PARAM_WIFI_WME_NOACK_TEST = 1033, |
37 | PRISM2_PARAM_SCAN_FLAGS = 1035, | 36 | PRISM2_PARAM_SCAN_FLAGS = 1035, |
38 | PRISM2_PARAM_HW_MODES = 1036, | 37 | PRISM2_PARAM_HW_MODES = 1036, |
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 23853331e8db..5e924588e9a2 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -189,41 +189,6 @@ ieee80211_rx_mgmt(struct ieee80211_local *local, struct sk_buff *skb, | |||
189 | netif_rx(skb); | 189 | netif_rx(skb); |
190 | } | 190 | } |
191 | 191 | ||
192 | void ieee80211_key_threshold_notify(struct net_device *dev, | ||
193 | struct ieee80211_key *key, | ||
194 | struct sta_info *sta) | ||
195 | { | ||
196 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
197 | struct sk_buff *skb; | ||
198 | struct ieee80211_msg_key_notification *msg; | ||
199 | |||
200 | /* if no one will get it anyway, don't even allocate it. | ||
201 | * unlikely because this is only relevant for APs | ||
202 | * where the device must be open... */ | ||
203 | if (unlikely(!local->apdev)) | ||
204 | return; | ||
205 | |||
206 | skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) + | ||
207 | sizeof(struct ieee80211_msg_key_notification)); | ||
208 | if (!skb) | ||
209 | return; | ||
210 | |||
211 | skb_reserve(skb, sizeof(struct ieee80211_frame_info)); | ||
212 | msg = (struct ieee80211_msg_key_notification *) | ||
213 | skb_put(skb, sizeof(struct ieee80211_msg_key_notification)); | ||
214 | msg->tx_rx_count = key->tx_rx_count; | ||
215 | memcpy(msg->ifname, dev->name, IFNAMSIZ); | ||
216 | if (sta) | ||
217 | memcpy(msg->addr, sta->addr, ETH_ALEN); | ||
218 | else | ||
219 | memset(msg->addr, 0xff, ETH_ALEN); | ||
220 | |||
221 | key->tx_rx_count = 0; | ||
222 | |||
223 | ieee80211_rx_mgmt(local, skb, NULL, | ||
224 | ieee80211_msg_key_threshold_notification); | ||
225 | } | ||
226 | |||
227 | static int ieee80211_mgmt_open(struct net_device *dev) | 192 | static int ieee80211_mgmt_open(struct net_device *dev) |
228 | { | 193 | { |
229 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 194 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
diff --git a/net/mac80211/ieee80211_common.h b/net/mac80211/ieee80211_common.h index 5b5fb7bcfd72..c15295d43d87 100644 --- a/net/mac80211/ieee80211_common.h +++ b/net/mac80211/ieee80211_common.h | |||
@@ -53,7 +53,7 @@ enum ieee80211_msg_type { | |||
53 | /* hole at 6, was monitor but never sent to userspace */ | 53 | /* hole at 6, was monitor but never sent to userspace */ |
54 | ieee80211_msg_sta_not_assoc = 7, | 54 | ieee80211_msg_sta_not_assoc = 7, |
55 | /* 8 was ieee80211_msg_set_aid_for_sta */ | 55 | /* 8 was ieee80211_msg_set_aid_for_sta */ |
56 | ieee80211_msg_key_threshold_notification = 9, | 56 | /* 9 was ieee80211_msg_key_threshold_notification */ |
57 | /* 11 was ieee80211_msg_radar */ | 57 | /* 11 was ieee80211_msg_radar */ |
58 | }; | 58 | }; |
59 | 59 | ||
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 14e8c366af3d..c3f6f89755b1 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -465,9 +465,6 @@ struct ieee80211_local { | |||
465 | struct crypto_blkcipher *wep_tx_tfm; | 465 | struct crypto_blkcipher *wep_tx_tfm; |
466 | struct crypto_blkcipher *wep_rx_tfm; | 466 | struct crypto_blkcipher *wep_rx_tfm; |
467 | u32 wep_iv; | 467 | u32 wep_iv; |
468 | int key_tx_rx_threshold; /* number of times any key can be used in TX | ||
469 | * or RX before generating a rekey | ||
470 | * notification; 0 = notification disabled. */ | ||
471 | 468 | ||
472 | int bridge_packets; /* bridge packets between associated stations and | 469 | int bridge_packets; /* bridge packets between associated stations and |
473 | * deliver multicast frames both back to wireless | 470 | * deliver multicast frames both back to wireless |
@@ -573,7 +570,6 @@ struct ieee80211_local { | |||
573 | struct dentry *antenna_sel_tx; | 570 | struct dentry *antenna_sel_tx; |
574 | struct dentry *antenna_sel_rx; | 571 | struct dentry *antenna_sel_rx; |
575 | struct dentry *bridge_packets; | 572 | struct dentry *bridge_packets; |
576 | struct dentry *key_tx_rx_threshold; | ||
577 | struct dentry *rts_threshold; | 573 | struct dentry *rts_threshold; |
578 | struct dentry *fragmentation_threshold; | 574 | struct dentry *fragmentation_threshold; |
579 | struct dentry *short_retry_limit; | 575 | struct dentry *short_retry_limit; |
@@ -724,9 +720,6 @@ void ieee80211_if_setup(struct net_device *dev); | |||
724 | void ieee80211_if_mgmt_setup(struct net_device *dev); | 720 | void ieee80211_if_mgmt_setup(struct net_device *dev); |
725 | struct ieee80211_rate *ieee80211_get_rate(struct ieee80211_local *local, | 721 | struct ieee80211_rate *ieee80211_get_rate(struct ieee80211_local *local, |
726 | int phymode, int hwrate); | 722 | int phymode, int hwrate); |
727 | void ieee80211_key_threshold_notify(struct net_device *dev, | ||
728 | struct ieee80211_key *key, | ||
729 | struct sta_info *sta); | ||
730 | 723 | ||
731 | /* ieee80211_ioctl.c */ | 724 | /* ieee80211_ioctl.c */ |
732 | extern const struct iw_handler_def ieee80211_iw_handler_def; | 725 | extern const struct iw_handler_def ieee80211_iw_handler_def; |
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index b4cce441d7e6..99023d0d7edc 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c | |||
@@ -912,10 +912,6 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev, | |||
912 | local->next_mode = hostapd_mode_to_mode(value); | 912 | local->next_mode = hostapd_mode_to_mode(value); |
913 | break; | 913 | break; |
914 | 914 | ||
915 | case PRISM2_PARAM_KEY_TX_RX_THRESHOLD: | ||
916 | local->key_tx_rx_threshold = value; | ||
917 | break; | ||
918 | |||
919 | case PRISM2_PARAM_WIFI_WME_NOACK_TEST: | 915 | case PRISM2_PARAM_WIFI_WME_NOACK_TEST: |
920 | local->wifi_wme_noack_test = value; | 916 | local->wifi_wme_noack_test = value; |
921 | break; | 917 | break; |
@@ -1011,10 +1007,6 @@ static int ieee80211_ioctl_get_prism2_param(struct net_device *dev, | |||
1011 | *param = local->next_mode; | 1007 | *param = local->next_mode; |
1012 | break; | 1008 | break; |
1013 | 1009 | ||
1014 | case PRISM2_PARAM_KEY_TX_RX_THRESHOLD: | ||
1015 | *param = local->key_tx_rx_threshold; | ||
1016 | break; | ||
1017 | |||
1018 | case PRISM2_PARAM_WIFI_WME_NOACK_TEST: | 1010 | case PRISM2_PARAM_WIFI_WME_NOACK_TEST: |
1019 | *param = local->wifi_wme_noack_test; | 1011 | *param = local->wifi_wme_noack_test; |
1020 | break; | 1012 | break; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index cf2a72f89d68..9700c1c5b3cf 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -409,12 +409,7 @@ ieee80211_rx_h_load_key(struct ieee80211_txrx_data *rx) | |||
409 | 409 | ||
410 | if (rx->key) { | 410 | if (rx->key) { |
411 | rx->key->tx_rx_count++; | 411 | rx->key->tx_rx_count++; |
412 | if (unlikely(rx->local->key_tx_rx_threshold && | 412 | /* TODO: add threshold stuff again */ |
413 | rx->key->tx_rx_count > | ||
414 | rx->local->key_tx_rx_threshold)) { | ||
415 | ieee80211_key_threshold_notify(rx->dev, rx->key, | ||
416 | rx->sta); | ||
417 | } | ||
418 | } | 413 | } |
419 | 414 | ||
420 | return TXRX_CONTINUE; | 415 | return TXRX_CONTINUE; |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 04b4fa9c69ea..e33f7641e6b4 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -451,12 +451,7 @@ ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx) | |||
451 | 451 | ||
452 | if (tx->key) { | 452 | if (tx->key) { |
453 | tx->key->tx_rx_count++; | 453 | tx->key->tx_rx_count++; |
454 | if (unlikely(tx->local->key_tx_rx_threshold && | 454 | /* TODO: add threshold stuff again */ |
455 | tx->key->tx_rx_count > | ||
456 | tx->local->key_tx_rx_threshold)) { | ||
457 | ieee80211_key_threshold_notify(tx->dev, tx->key, | ||
458 | tx->sta); | ||
459 | } | ||
460 | } | 455 | } |
461 | 456 | ||
462 | return TXRX_CONTINUE; | 457 | return TXRX_CONTINUE; |