diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-10-25 10:04:19 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 05:58:50 -0500 |
commit | 478ac0272154023abb813db7ae12dc380caeb68e (patch) | |
tree | 4a8743aed5d08dcd978ffb990e4e39e4e7bdb488 /drivers/net/wireless/ath/ath6kl/txrx.c | |
parent | d66ea4f9d63732790ae260eccb6c991dfa7a3b32 (diff) |
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/txrx.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/txrx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index e4a6d8f54177..ff288da2661c 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c | |||
@@ -475,9 +475,9 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target, | |||
475 | return HTC_SEND_FULL_DROP; | 475 | return HTC_SEND_FULL_DROP; |
476 | 476 | ||
477 | stop_net_queues: | 477 | stop_net_queues: |
478 | spin_lock_bh(&ar->lock); | 478 | spin_lock_bh(&vif->if_lock); |
479 | set_bit(NETQ_STOPPED, &vif->flags); | 479 | set_bit(NETQ_STOPPED, &vif->flags); |
480 | spin_unlock_bh(&ar->lock); | 480 | spin_unlock_bh(&vif->if_lock); |
481 | netif_stop_queue(vif->ndev); | 481 | netif_stop_queue(vif->ndev); |
482 | 482 | ||
483 | return HTC_SEND_FULL_KEEP; | 483 | return HTC_SEND_FULL_KEEP; |
@@ -1103,12 +1103,12 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1103 | * Take lock to protect buffer counts and adaptive power throughput | 1103 | * Take lock to protect buffer counts and adaptive power throughput |
1104 | * state. | 1104 | * state. |
1105 | */ | 1105 | */ |
1106 | spin_lock_bh(&ar->lock); | 1106 | spin_lock_bh(&vif->if_lock); |
1107 | 1107 | ||
1108 | vif->net_stats.rx_packets++; | 1108 | vif->net_stats.rx_packets++; |
1109 | vif->net_stats.rx_bytes += packet->act_len; | 1109 | vif->net_stats.rx_bytes += packet->act_len; |
1110 | 1110 | ||
1111 | spin_unlock_bh(&ar->lock); | 1111 | spin_unlock_bh(&vif->if_lock); |
1112 | 1112 | ||
1113 | 1113 | ||
1114 | ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", | 1114 | ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", |