diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-10-25 19:34:19 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 12:58:50 +0200 |
commit | 478ac0272154023abb813db7ae12dc380caeb68e (patch) | |
tree | 4a8743aed5d08dcd978ffb990e4e39e4e7bdb488 /drivers/net/wireless/ath/ath6kl/main.c | |
parent | d66ea4f9d63732790ae260eccb6c991dfa7a3b32 (diff) | |
download | lwn-478ac0272154023abb813db7ae12dc380caeb68e.tar.gz lwn-478ac0272154023abb813db7ae12dc380caeb68e.zip |
ath6kl: Introduce spinlock to protect vif specific information
Use this spinlock to protect the vif's data instead of
one from ath6kl.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 6bf94025221a..ca86ed368da2 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c @@ -989,11 +989,11 @@ void ath6kl_connect_event(struct ath6kl_vif *vif, u16 channel, u8 *bssid, netif_wake_queue(vif->ndev); /* Update connect & link status atomically */ - spin_lock_bh(&ar->lock); + spin_lock_bh(&vif->if_lock); set_bit(CONNECTED, &vif->flags); clear_bit(CONNECT_PEND, &vif->flags); netif_carrier_on(vif->ndev); - spin_unlock_bh(&ar->lock); + spin_unlock_bh(&vif->if_lock); aggr_reset_state(vif->aggr_cntxt); vif->reconnect_flag = 0; @@ -1345,10 +1345,10 @@ void ath6kl_disconnect_event(struct ath6kl_vif *vif, u8 reason, u8 *bssid, } /* update connect & link status atomically */ - spin_lock_bh(&ar->lock); + spin_lock_bh(&vif->if_lock); clear_bit(CONNECTED, &vif->flags); netif_carrier_off(vif->ndev); - spin_unlock_bh(&ar->lock); + spin_unlock_bh(&vif->if_lock); if ((reason != CSERV_DISCONNECT) || (vif->reconnect_flag != 1)) vif->reconnect_flag = 0; @@ -1365,11 +1365,8 @@ void ath6kl_disconnect_event(struct ath6kl_vif *vif, u8 reason, u8 *bssid, static int ath6kl_open(struct net_device *dev) { - struct ath6kl *ar = ath6kl_priv(dev); struct ath6kl_vif *vif = netdev_priv(dev); - spin_lock_bh(&ar->lock); - set_bit(WLAN_ENABLED, &vif->flags); if (test_bit(CONNECTED, &vif->flags)) { @@ -1378,8 +1375,6 @@ static int ath6kl_open(struct net_device *dev) } else netif_carrier_off(dev); - spin_unlock_bh(&ar->lock); - return 0; } |