[MAC80211]: remove key threshold stuff
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 17 Sep 2007 05:29:25 +0000 (01:29 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:52:29 +0000 (16:52 -0700)
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>
net/mac80211/debugfs.c
net/mac80211/hostapd_ioctl.h
net/mac80211/ieee80211.c
net/mac80211/ieee80211_common.h
net/mac80211/ieee80211_i.h
net/mac80211/ieee80211_ioctl.c
net/mac80211/rx.c
net/mac80211/tx.c

index 12db9adc0361fccb21448f3330d68cfae2e828de..60514b2c97b99c845eac2020a9f865557a59f170 100644 (file)
@@ -90,8 +90,6 @@ DEBUGFS_READONLY_FILE(antenna_sel_rx, 20, "%d",
                      local->hw.conf.antenna_sel_rx);
 DEBUGFS_READONLY_FILE(bridge_packets, 20, "%d",
                      local->bridge_packets);
-DEBUGFS_READONLY_FILE(key_tx_rx_threshold, 20, "%d",
-                     local->key_tx_rx_threshold);
 DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d",
                      local->rts_threshold);
 DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d",
@@ -301,7 +299,6 @@ void debugfs_hw_add(struct ieee80211_local *local)
        DEBUGFS_ADD(antenna_sel_tx);
        DEBUGFS_ADD(antenna_sel_rx);
        DEBUGFS_ADD(bridge_packets);
-       DEBUGFS_ADD(key_tx_rx_threshold);
        DEBUGFS_ADD(rts_threshold);
        DEBUGFS_ADD(fragmentation_threshold);
        DEBUGFS_ADD(short_retry_limit);
@@ -364,7 +361,6 @@ void debugfs_hw_del(struct ieee80211_local *local)
        DEBUGFS_DEL(antenna_sel_tx);
        DEBUGFS_DEL(antenna_sel_rx);
        DEBUGFS_DEL(bridge_packets);
-       DEBUGFS_DEL(key_tx_rx_threshold);
        DEBUGFS_DEL(rts_threshold);
        DEBUGFS_DEL(fragmentation_threshold);
        DEBUGFS_DEL(short_retry_limit);
index ac812ec9fa2f939999f47661d1edf60ecb3ba541..2300c55164584c95844dd0dad6e5b6801dd793f6 100644 (file)
@@ -32,7 +32,6 @@ enum {
        PRISM2_PARAM_PREAMBLE = 1003,
        PRISM2_PARAM_SHORT_SLOT_TIME = 1006,
        PRISM2_PARAM_NEXT_MODE = 1008,
-       PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
        PRISM2_PARAM_WIFI_WME_NOACK_TEST = 1033,
        PRISM2_PARAM_SCAN_FLAGS = 1035,
        PRISM2_PARAM_HW_MODES = 1036,
index 23853331e8db6939dee3ad7d96a00bc2181462fd..5e924588e9a262eb40fe11439cda505da89398c3 100644 (file)
@@ -189,41 +189,6 @@ ieee80211_rx_mgmt(struct ieee80211_local *local, struct sk_buff *skb,
        netif_rx(skb);
 }
 
-void ieee80211_key_threshold_notify(struct net_device *dev,
-                                   struct ieee80211_key *key,
-                                   struct sta_info *sta)
-{
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
-       struct sk_buff *skb;
-       struct ieee80211_msg_key_notification *msg;
-
-       /* if no one will get it anyway, don't even allocate it.
-        * unlikely because this is only relevant for APs
-        * where the device must be open... */
-       if (unlikely(!local->apdev))
-               return;
-
-       skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) +
-                           sizeof(struct ieee80211_msg_key_notification));
-       if (!skb)
-               return;
-
-       skb_reserve(skb, sizeof(struct ieee80211_frame_info));
-       msg = (struct ieee80211_msg_key_notification *)
-               skb_put(skb, sizeof(struct ieee80211_msg_key_notification));
-       msg->tx_rx_count = key->tx_rx_count;
-       memcpy(msg->ifname, dev->name, IFNAMSIZ);
-       if (sta)
-               memcpy(msg->addr, sta->addr, ETH_ALEN);
-       else
-               memset(msg->addr, 0xff, ETH_ALEN);
-
-       key->tx_rx_count = 0;
-
-       ieee80211_rx_mgmt(local, skb, NULL,
-                         ieee80211_msg_key_threshold_notification);
-}
-
 static int ieee80211_mgmt_open(struct net_device *dev)
 {
        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
index 5b5fb7bcfd72fc29685a93a7c3c3c55c0bf3ffb0..c15295d43d87faa136584728a84143505a164b49 100644 (file)
@@ -53,7 +53,7 @@ enum ieee80211_msg_type {
        /* hole at 6, was monitor but never sent to userspace */
        ieee80211_msg_sta_not_assoc = 7,
        /* 8 was ieee80211_msg_set_aid_for_sta */
-       ieee80211_msg_key_threshold_notification = 9,
+       /* 9 was ieee80211_msg_key_threshold_notification */
        /* 11 was ieee80211_msg_radar */
 };
 
index 14e8c366af3dd4694817414ab110f8468d49b12a..c3f6f89755b1264b08f972a4ac5358638725cb3e 100644 (file)
@@ -465,9 +465,6 @@ struct ieee80211_local {
        struct crypto_blkcipher *wep_tx_tfm;
        struct crypto_blkcipher *wep_rx_tfm;
        u32 wep_iv;
-       int key_tx_rx_threshold; /* number of times any key can be used in TX
-                                 * or RX before generating a rekey
-                                 * notification; 0 = notification disabled. */
 
        int bridge_packets; /* bridge packets between associated stations and
                             * deliver multicast frames both back to wireless
@@ -573,7 +570,6 @@ struct ieee80211_local {
                struct dentry *antenna_sel_tx;
                struct dentry *antenna_sel_rx;
                struct dentry *bridge_packets;
-               struct dentry *key_tx_rx_threshold;
                struct dentry *rts_threshold;
                struct dentry *fragmentation_threshold;
                struct dentry *short_retry_limit;
@@ -724,9 +720,6 @@ void ieee80211_if_setup(struct net_device *dev);
 void ieee80211_if_mgmt_setup(struct net_device *dev);
 struct ieee80211_rate *ieee80211_get_rate(struct ieee80211_local *local,
                                          int phymode, int hwrate);
-void ieee80211_key_threshold_notify(struct net_device *dev,
-                                   struct ieee80211_key *key,
-                                   struct sta_info *sta);
 
 /* ieee80211_ioctl.c */
 extern const struct iw_handler_def ieee80211_iw_handler_def;
index b4cce441d7e60f0012630b3bd7a3dacd3a73efae..99023d0d7edc7b1c7b3f7fe4a611ac2a3c665470 100644 (file)
@@ -912,10 +912,6 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev,
                local->next_mode = hostapd_mode_to_mode(value);
                break;
 
-       case PRISM2_PARAM_KEY_TX_RX_THRESHOLD:
-               local->key_tx_rx_threshold = value;
-               break;
-
        case PRISM2_PARAM_WIFI_WME_NOACK_TEST:
                local->wifi_wme_noack_test = value;
                break;
@@ -1011,10 +1007,6 @@ static int ieee80211_ioctl_get_prism2_param(struct net_device *dev,
                *param = local->next_mode;
                break;
 
-       case PRISM2_PARAM_KEY_TX_RX_THRESHOLD:
-               *param = local->key_tx_rx_threshold;
-               break;
-
        case PRISM2_PARAM_WIFI_WME_NOACK_TEST:
                *param = local->wifi_wme_noack_test;
                break;
index cf2a72f89d6844167ca1a09d683fc4b31f258dde..9700c1c5b3cf3fa9a019e2dcc74e7b6c5317cb8d 100644 (file)
@@ -409,12 +409,7 @@ ieee80211_rx_h_load_key(struct ieee80211_txrx_data *rx)
 
        if (rx->key) {
                rx->key->tx_rx_count++;
-               if (unlikely(rx->local->key_tx_rx_threshold &&
-                            rx->key->tx_rx_count >
-                            rx->local->key_tx_rx_threshold)) {
-                       ieee80211_key_threshold_notify(rx->dev, rx->key,
-                                                      rx->sta);
-               }
+               /* TODO: add threshold stuff again */
        }
 
        return TXRX_CONTINUE;
index 04b4fa9c69ea6ab9442e7177595fd573367c2c77..e33f7641e6b44dfd5f523b35f7663c6a3d73eabe 100644 (file)
@@ -451,12 +451,7 @@ ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx)
 
        if (tx->key) {
                tx->key->tx_rx_count++;
-               if (unlikely(tx->local->key_tx_rx_threshold &&
-                            tx->key->tx_rx_count >
-                            tx->local->key_tx_rx_threshold)) {
-                       ieee80211_key_threshold_notify(tx->dev, tx->key,
-                                                      tx->sta);
-               }
+               /* TODO: add threshold stuff again */
        }
 
        return TXRX_CONTINUE;