summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-06-12 08:40:45 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-07-17 09:38:01 -0400
commit77c96404a4cf16ffa0720a3fbf45839cc16018ac (patch)
treed0f0297c0282dccb7b5e8dbf1a78942939e9a130
parent0c028b5fd1bd10d5777756e571c6c1971f04062b (diff)
mac80211: remove key TX/RX counter
This counter is inherently racy (since it can be incremented by RX as well as by concurrent TX) and only available in debugfs. Instead of fixing it to be per-CPU or similar, remove it for now. If needed it should be added without races and with proper nl80211, perhaps even addressing the threshold reporting TODO item that's been there since the code was originally added. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/debugfs_key.c2
-rw-r--r--net/mac80211/key.h3
-rw-r--r--net/mac80211/rx.c1
-rw-r--r--net/mac80211/tx.c1
4 files changed, 0 insertions, 7 deletions
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
index e82bf1e9d7a8..702ca122c498 100644
--- a/net/mac80211/debugfs_key.c
+++ b/net/mac80211/debugfs_key.c
@@ -57,7 +57,6 @@ KEY_CONF_FILE(keylen, D);
57KEY_CONF_FILE(keyidx, D); 57KEY_CONF_FILE(keyidx, D);
58KEY_CONF_FILE(hw_key_idx, D); 58KEY_CONF_FILE(hw_key_idx, D);
59KEY_FILE(flags, X); 59KEY_FILE(flags, X);
60KEY_FILE(tx_rx_count, D);
61KEY_READ(ifindex, sdata->name, "%s\n"); 60KEY_READ(ifindex, sdata->name, "%s\n");
62KEY_OPS(ifindex); 61KEY_OPS(ifindex);
63 62
@@ -310,7 +309,6 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
310 DEBUGFS_ADD(flags); 309 DEBUGFS_ADD(flags);
311 DEBUGFS_ADD(keyidx); 310 DEBUGFS_ADD(keyidx);
312 DEBUGFS_ADD(hw_key_idx); 311 DEBUGFS_ADD(hw_key_idx);
313 DEBUGFS_ADD(tx_rx_count);
314 DEBUGFS_ADD(algorithm); 312 DEBUGFS_ADD(algorithm);
315 DEBUGFS_ADD(tx_spec); 313 DEBUGFS_ADD(tx_spec);
316 DEBUGFS_ADD(rx_spec); 314 DEBUGFS_ADD(rx_spec);
diff --git a/net/mac80211/key.h b/net/mac80211/key.h
index 3f4f9eaac140..9951ef06323e 100644
--- a/net/mac80211/key.h
+++ b/net/mac80211/key.h
@@ -115,9 +115,6 @@ struct ieee80211_key {
115 } gen; 115 } gen;
116 } u; 116 } u;
117 117
118 /* number of times this key has been used */
119 int tx_rx_count;
120
121#ifdef CONFIG_MAC80211_DEBUGFS 118#ifdef CONFIG_MAC80211_DEBUGFS
122 struct { 119 struct {
123 struct dentry *stalink; 120 struct dentry *stalink;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 9d95cb8e8e95..3037bd152ffa 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1682,7 +1682,6 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
1682 if (unlikely(rx->key->flags & KEY_FLAG_TAINTED)) 1682 if (unlikely(rx->key->flags & KEY_FLAG_TAINTED))
1683 return RX_DROP_MONITOR; 1683 return RX_DROP_MONITOR;
1684 1684
1685 rx->key->tx_rx_count++;
1686 /* TODO: add threshold stuff again */ 1685 /* TODO: add threshold stuff again */
1687 } else { 1686 } else {
1688 return RX_DROP_MONITOR; 1687 return RX_DROP_MONITOR;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8410bb3bf5e8..87b9b4e27d22 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -610,7 +610,6 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
610 if (tx->key) { 610 if (tx->key) {
611 bool skip_hw = false; 611 bool skip_hw = false;
612 612
613 tx->key->tx_rx_count++;
614 /* TODO: add threshold stuff again */ 613 /* TODO: add threshold stuff again */
615 614
616 switch (tx->key->conf.cipher) { 615 switch (tx->key->conf.cipher) {