diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2010-01-21 05:40:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-22 16:08:55 -0500 |
commit | b3fbdcf49f940d0703c356441e0daf045e64e076 (patch) | |
tree | f63416cc9b80a6757ec6fa57190f581b2b3a6d31 /drivers/net | |
parent | e4fca007b06165900d0e44e8d5e251376819bf5d (diff) |
mac80211: pass vif and station to update_tkip_key
When a TKIP key is updated, we should pass the station
pointer instead of just the address, since drivers can
use that to store their own data. We also need to pass
the virtual interface pointer.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 10 |
2 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index c238468bca7f..c699e46534dc 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -844,8 +844,10 @@ static void rx_tkip_phase1_write(struct b43_wldev *dev, u8 index, u32 iv32, | |||
844 | } | 844 | } |
845 | 845 | ||
846 | static void b43_op_update_tkip_key(struct ieee80211_hw *hw, | 846 | static void b43_op_update_tkip_key(struct ieee80211_hw *hw, |
847 | struct ieee80211_key_conf *keyconf, const u8 *addr, | 847 | struct ieee80211_vif *vif, |
848 | u32 iv32, u16 *phase1key) | 848 | struct ieee80211_key_conf *keyconf, |
849 | struct ieee80211_sta *sta, | ||
850 | u32 iv32, u16 *phase1key) | ||
849 | { | 851 | { |
850 | struct b43_wl *wl = hw_to_b43_wl(hw); | 852 | struct b43_wl *wl = hw_to_b43_wl(hw); |
851 | struct b43_wldev *dev; | 853 | struct b43_wldev *dev; |
@@ -863,7 +865,10 @@ static void b43_op_update_tkip_key(struct ieee80211_hw *hw, | |||
863 | keymac_write(dev, index, NULL); /* First zero out mac to avoid race */ | 865 | keymac_write(dev, index, NULL); /* First zero out mac to avoid race */ |
864 | 866 | ||
865 | rx_tkip_phase1_write(dev, index, iv32, phase1key); | 867 | rx_tkip_phase1_write(dev, index, iv32, phase1key); |
866 | keymac_write(dev, index, addr); | 868 | /* only pairwise TKIP keys are supported right now */ |
869 | if (WARN_ON(!sta)) | ||
870 | goto out_unlock; | ||
871 | keymac_write(dev, index, sta->addr); | ||
867 | 872 | ||
868 | out_unlock: | 873 | out_unlock: |
869 | mutex_unlock(&wl->mutex); | 874 | mutex_unlock(&wl->mutex); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 8db86239bd6a..62b6939df52e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2839,14 +2839,18 @@ void iwl_config_ap(struct iwl_priv *priv) | |||
2839 | } | 2839 | } |
2840 | 2840 | ||
2841 | static void iwl_mac_update_tkip_key(struct ieee80211_hw *hw, | 2841 | static void iwl_mac_update_tkip_key(struct ieee80211_hw *hw, |
2842 | struct ieee80211_key_conf *keyconf, const u8 *addr, | 2842 | struct ieee80211_vif *vif, |
2843 | u32 iv32, u16 *phase1key) | 2843 | struct ieee80211_key_conf *keyconf, |
2844 | struct ieee80211_sta *sta, | ||
2845 | u32 iv32, u16 *phase1key) | ||
2844 | { | 2846 | { |
2845 | 2847 | ||
2846 | struct iwl_priv *priv = hw->priv; | 2848 | struct iwl_priv *priv = hw->priv; |
2847 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 2849 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2848 | 2850 | ||
2849 | iwl_update_tkip_key(priv, keyconf, addr, iv32, phase1key); | 2851 | iwl_update_tkip_key(priv, keyconf, |
2852 | sta ? sta->addr : iwl_bcast_addr, | ||
2853 | iv32, phase1key); | ||
2850 | 2854 | ||
2851 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 2855 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2852 | } | 2856 | } |