aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k
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/ath5k
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/ath5k')
-rw-r--r--drivers/net/wireless/ath5k/base.c9
-rw-r--r--drivers/net/wireless/ath5k/pcu.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 8ef87356e083..88618645a7e4 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -232,7 +232,7 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
232 int mc_count, struct dev_mc_list *mclist); 232 int mc_count, struct dev_mc_list *mclist);
233static int ath5k_set_key(struct ieee80211_hw *hw, 233static int ath5k_set_key(struct ieee80211_hw *hw,
234 enum set_key_cmd cmd, 234 enum set_key_cmd cmd,
235 const u8 *local_addr, const u8 *addr, 235 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
236 struct ieee80211_key_conf *key); 236 struct ieee80211_key_conf *key);
237static int ath5k_get_stats(struct ieee80211_hw *hw, 237static int ath5k_get_stats(struct ieee80211_hw *hw,
238 struct ieee80211_low_level_stats *stats); 238 struct ieee80211_low_level_stats *stats);
@@ -2991,8 +2991,8 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
2991 2991
2992static int 2992static int
2993ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, 2993ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2994 const u8 *local_addr, const u8 *addr, 2994 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
2995 struct ieee80211_key_conf *key) 2995 struct ieee80211_key_conf *key)
2996{ 2996{
2997 struct ath5k_softc *sc = hw->priv; 2997 struct ath5k_softc *sc = hw->priv;
2998 int ret = 0; 2998 int ret = 0;
@@ -3015,7 +3015,8 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3015 3015
3016 switch (cmd) { 3016 switch (cmd) {
3017 case SET_KEY: 3017 case SET_KEY:
3018 ret = ath5k_hw_set_key(sc->ah, key->keyidx, key, addr); 3018 ret = ath5k_hw_set_key(sc->ah, key->keyidx, key,
3019 sta ? sta->addr : NULL);
3019 if (ret) { 3020 if (ret) {
3020 ATH5K_ERR(sc, "can't set the key\n"); 3021 ATH5K_ERR(sc, "can't set the key\n");
3021 goto unlock; 3022 goto unlock;
diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c
index 75eb9f43c741..5b416ed65299 100644
--- a/drivers/net/wireless/ath5k/pcu.c
+++ b/drivers/net/wireless/ath5k/pcu.c
@@ -1139,7 +1139,7 @@ int ath5k_hw_set_key_lladdr(struct ath5k_hw *ah, u16 entry, const u8 *mac)
1139 1139
1140 /* MAC may be NULL if it's a broadcast key. In this case no need to 1140 /* MAC may be NULL if it's a broadcast key. In this case no need to
1141 * to compute AR5K_LOW_ID and AR5K_HIGH_ID as we already know it. */ 1141 * to compute AR5K_LOW_ID and AR5K_HIGH_ID as we already know it. */
1142 if (unlikely(mac == NULL)) { 1142 if (!mac) {
1143 low_id = 0xffffffff; 1143 low_id = 0xffffffff;
1144 high_id = 0xffff | AR5K_KEYTABLE_VALID; 1144 high_id = 0xffff | AR5K_KEYTABLE_VALID;
1145 } else { 1145 } else {