diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 6d7cf3c2f7bf..66220cde9c49 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -856,22 +856,19 @@ static void b43_op_update_tkip_key(struct ieee80211_hw *hw, | |||
856 | if (B43_WARN_ON(!modparam_hwtkip)) | 856 | if (B43_WARN_ON(!modparam_hwtkip)) |
857 | return; | 857 | return; |
858 | 858 | ||
859 | mutex_lock(&wl->mutex); | 859 | /* This is only called from the RX path through mac80211, where |
860 | 860 | * our mutex is already locked. */ | |
861 | B43_WARN_ON(!mutex_is_locked(&wl->mutex)); | ||
861 | dev = wl->current_dev; | 862 | dev = wl->current_dev; |
862 | if (!dev || b43_status(dev) < B43_STAT_INITIALIZED) | 863 | B43_WARN_ON(!dev || b43_status(dev) < B43_STAT_INITIALIZED); |
863 | goto out_unlock; | ||
864 | 864 | ||
865 | 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 */ |
866 | 866 | ||
867 | rx_tkip_phase1_write(dev, index, iv32, phase1key); | 867 | rx_tkip_phase1_write(dev, index, iv32, phase1key); |
868 | /* only pairwise TKIP keys are supported right now */ | 868 | /* only pairwise TKIP keys are supported right now */ |
869 | if (WARN_ON(!sta)) | 869 | if (WARN_ON(!sta)) |
870 | goto out_unlock; | 870 | return; |
871 | keymac_write(dev, index, sta->addr); | 871 | keymac_write(dev, index, sta->addr); |
872 | |||
873 | out_unlock: | ||
874 | mutex_unlock(&wl->mutex); | ||
875 | } | 872 | } |
876 | 873 | ||
877 | static void do_key_write(struct b43_wldev *dev, | 874 | static void do_key_write(struct b43_wldev *dev, |