aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-12-29 06:55:09 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:42 -0500
commitdc822b5db479dc0178d5c04cbb656dad0b6564fb (patch)
treef06d09fb4d70830ce1489f4589cb03a491833955 /drivers/net/wireless/b43
parentb3093664c931aa06fc50da42e25b3b6dc307a915 (diff)
mac80211: clean up set_key callback
The set_key callback now seems rather odd, passing a MAC address instead of a station struct, and a local address instead of a vif struct. Change that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Bob Copeland <me@bobcopeland.com> [ath5k] Acked-by: Ivo van Doorn <ivdoorn@gmail.com> [rt2x00] Acked-by: Christian Lamparter <chunkeey@web.de> [p54] Tested-by: Kalle Valo <kalle.valo@nokia.com> [iwl3945] Tested-by: Samuel Ortiz <samuel@sortiz.org> [iwl3945] Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r--drivers/net/wireless/b43/main.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 5ca55dcd0345..19ad5164fce7 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3476,8 +3476,8 @@ out_unlock_mutex:
3476} 3476}
3477 3477
3478static int b43_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, 3478static int b43_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3479 const u8 *local_addr, const u8 *addr, 3479 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
3480 struct ieee80211_key_conf *key) 3480 struct ieee80211_key_conf *key)
3481{ 3481{
3482 struct b43_wl *wl = hw_to_b43_wl(hw); 3482 struct b43_wl *wl = hw_to_b43_wl(hw);
3483 struct b43_wldev *dev; 3483 struct b43_wldev *dev;
@@ -3542,9 +3542,14 @@ static int b43_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3542 } 3542 }
3543 3543
3544 if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) { 3544 if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) {
3545 if (WARN_ON(!sta)) {
3546 err = -EOPNOTSUPP;
3547 goto out_unlock;
3548 }
3545 /* Pairwise key with an assigned MAC address. */ 3549 /* Pairwise key with an assigned MAC address. */
3546 err = b43_key_write(dev, -1, algorithm, 3550 err = b43_key_write(dev, -1, algorithm,
3547 key->key, key->keylen, addr, key); 3551 key->key, key->keylen,
3552 sta->addr, key);
3548 } else { 3553 } else {
3549 /* Group key */ 3554 /* Group key */
3550 err = b43_key_write(dev, index, algorithm, 3555 err = b43_key_write(dev, index, algorithm,
@@ -3577,7 +3582,7 @@ out_unlock:
3577 b43dbg(wl, "%s hardware based encryption for keyidx: %d, " 3582 b43dbg(wl, "%s hardware based encryption for keyidx: %d, "
3578 "mac: %pM\n", 3583 "mac: %pM\n",
3579 cmd == SET_KEY ? "Using" : "Disabling", key->keyidx, 3584 cmd == SET_KEY ? "Using" : "Disabling", key->keyidx,
3580 addr); 3585 sta ? sta->addr : "<group key>");
3581 b43_dump_keymemory(dev); 3586 b43_dump_keymemory(dev);
3582 } 3587 }
3583 write_unlock(&wl->tx_lock); 3588 write_unlock(&wl->tx_lock);