summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-08-29 01:01:55 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 03:48:52 +0400
commit3aefaa3294193c931b20a574f718efee6baf27d4 (patch)
tree11e488c4edf67d0c279ab0aaf54d182d77bc301d /net/mac80211
parentf658eb90d065c2d76ab3f3eb676ebf53462e323b (diff)
downloadlinux-3aefaa3294193c931b20a574f718efee6baf27d4.tar.xz
[MAC80211]: remove fake set_key() call
Remove adding a fake key with a NONE key algorithm for each associated STA. If we have hardware with such TX filtering we should probably extend the sta_table_notification() callback with the sta information instead; the fact that it's treated as a key for some atheros hardware shouldn't bother the stack. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-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/mac80211')
-rw-r--r--net/mac80211/debugfs_sta.c1
-rw-r--r--net/mac80211/sta_info.c18
-rw-r--r--net/mac80211/sta_info.h4
-rw-r--r--net/mac80211/tx.c5
4 files changed, 1 insertions, 27 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index da34ea70276f..2daaa802bbd0 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -60,7 +60,6 @@ static const struct file_operations sta_ ##name## _ops = { \
STA_OPS(name)
STA_FILE(aid, aid, D);
-STA_FILE(key_idx_compression, key_idx_compression, D);
STA_FILE(dev, dev->name, S);
STA_FILE(vlan_id, vlan_id, D);
STA_FILE(rx_packets, rx_packets, LU);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index a1f766fcf966..fba2d79e4d2b 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -165,7 +165,6 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,
local->ops->sta_table_notification(local_to_hw(local),
local->num_sta);
write_unlock_bh(&local->sta_lock);
- sta->key_idx_compression = HW_KEY_IDX_INVALID;
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
printk(KERN_DEBUG "%s: Added STA " MAC_FMT "\n",
@@ -226,23 +225,6 @@ void sta_info_free(struct sta_info *sta)
dev_kfree_skb(skb);
}
- if (sta->key) {
- if (local->ops->set_key) {
- local->ops->set_key(local_to_hw(local),
- DISABLE_KEY, sta->addr,
- &sta->key->conf);
- }
- } else if (sta->key_idx_compression != HW_KEY_IDX_INVALID) {
- struct ieee80211_key_conf conf;
- memset(&conf, 0, sizeof(conf));
- conf.hw_key_idx = sta->key_idx_compression;
- conf.alg = ALG_NONE;
- conf.flags |= IEEE80211_KEY_FORCE_SW_ENCRYPT;
- local->ops->set_key(local_to_hw(local), DISABLE_KEY,
- sta->addr, &conf);
- sta->key_idx_compression = HW_KEY_IDX_INVALID;
- }
-
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
printk(KERN_DEBUG "%s: Removed STA " MAC_FMT "\n",
local->mdev->name, MAC_ARG(sta->addr));
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 4afa7df2a180..3b0fcb255717 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -90,10 +90,6 @@ struct sta_info {
int channel_use;
int channel_use_raw;
- int key_idx_compression; /* key table index for compression and TX
- * filtering; used only if sta->key is not
- * set */
-
int assoc_ap; /* whether this is an AP that we are
* associated with as a client */
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 684f928def93..d70140cbd66a 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -426,10 +426,7 @@ ieee80211_tx_h_ps_buf(struct ieee80211_txrx_data *tx)
static ieee80211_txrx_result
ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx)
{
- if (tx->sta)
- tx->u.tx.control->key_idx = tx->sta->key_idx_compression;
- else
- tx->u.tx.control->key_idx = HW_KEY_IDX_INVALID;
+ tx->u.tx.control->key_idx = HW_KEY_IDX_INVALID;
if (unlikely(tx->u.tx.control->flags & IEEE80211_TXCTL_DO_NOT_ENCRYPT))
tx->key = NULL;