ath6kl: Release ar->lock right afer updating net_stats in ath6kl_rx()
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Sun, 14 Aug 2011 11:38:33 +0000 (17:08 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 31 Aug 2011 07:10:53 +0000 (10:10 +0300)
This lock is intended to protect stats there, not neccessary to
hold it beyond that.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/txrx.c

index 167bdb9cf68daecc6ea909bed8d5f6d0b32c8467..d546051e5953e85bfe2266ef90ea5b073e4608cd 100644 (file)
@@ -1044,13 +1044,13 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
        ar->net_stats.rx_packets++;
        ar->net_stats.rx_bytes += packet->act_len;
 
+       spin_unlock_bh(&ar->lock);
+
        skb_put(skb, packet->act_len + HTC_HDR_LENGTH);
        skb_pull(skb, HTC_HDR_LENGTH);
 
        ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, skb->data, skb->len);
 
-       spin_unlock_bh(&ar->lock);
-
        skb->dev = ar->net_dev;
 
        if (!test_bit(WMI_ENABLED, &ar->flag)) {