summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-12-29 12:55:09 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:42 -0500
commitdc822b5db479dc0178d5c04cbb656dad0b6564fb (patch)
treef06d09fb4d70830ce1489f4589cb03a491833955 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parentb3093664c931aa06fc50da42e25b3b6dc307a915 (diff)
downloadblackbird-obmc-linux-dc822b5db479dc0178d5c04cbb656dad0b6564fb.tar.gz
blackbird-obmc-linux-dc822b5db479dc0178d5c04cbb656dad0b6564fb.zip
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/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index a176f42fd7cf..43cfc6ec5163 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6546,12 +6546,16 @@ out_unlock:
}
static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
- const u8 *local_addr, const u8 *addr,
- struct ieee80211_key_conf *key)
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta,
+ struct ieee80211_key_conf *key)
{
struct iwl_priv *priv = hw->priv;
+ const u8 *addr;
int rc = 0;
u8 sta_id;
+ static const u8 bcast_addr[ETH_ALEN] =
+ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
IWL_DEBUG_MAC80211("enter\n");
@@ -6560,9 +6564,7 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
return -EOPNOTSUPP;
}
- if (is_zero_ether_addr(addr))
- /* only support pairwise keys */
- return -EOPNOTSUPP;
+ addr = sta ? sta->addr : bcast_addr;
sta_id = iwl3945_hw_find_station(priv, addr);
if (sta_id == IWL_INVALID_STATION) {
OpenPOWER on IntegriCloud