aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ar9170/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ar9170/usb.c')
-rw-r--r--drivers/net/wireless/ath/ar9170/usb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c
index e974e5829e1..6bdcdf6d1cc 100644
--- a/drivers/net/wireless/ath/ar9170/usb.c
+++ b/drivers/net/wireless/ath/ar9170/usb.c
@@ -108,15 +108,15 @@ static void ar9170_usb_submit_urb(struct ar9170_usb *aru)
108 return ; 108 return ;
109 109
110 spin_lock_irqsave(&aru->tx_urb_lock, flags); 110 spin_lock_irqsave(&aru->tx_urb_lock, flags);
111 if (aru->tx_submitted_urbs >= AR9170_NUM_TX_URBS) { 111 if (atomic_read(&aru->tx_submitted_urbs) >= AR9170_NUM_TX_URBS) {
112 spin_unlock_irqrestore(&aru->tx_urb_lock, flags); 112 spin_unlock_irqrestore(&aru->tx_urb_lock, flags);
113 return ; 113 return ;
114 } 114 }
115 aru->tx_submitted_urbs++; 115 atomic_inc(&aru->tx_submitted_urbs);
116 116
117 urb = usb_get_from_anchor(&aru->tx_pending); 117 urb = usb_get_from_anchor(&aru->tx_pending);
118 if (!urb) { 118 if (!urb) {
119 aru->tx_submitted_urbs--; 119 atomic_dec(&aru->tx_submitted_urbs);
120 spin_unlock_irqrestore(&aru->tx_urb_lock, flags); 120 spin_unlock_irqrestore(&aru->tx_urb_lock, flags);
121 121
122 return ; 122 return ;
@@ -133,7 +133,7 @@ static void ar9170_usb_submit_urb(struct ar9170_usb *aru)
133 err); 133 err);
134 134
135 usb_unanchor_urb(urb); 135 usb_unanchor_urb(urb);
136 aru->tx_submitted_urbs--; 136 atomic_dec(&aru->tx_submitted_urbs);
137 ar9170_tx_callback(&aru->common, urb->context); 137 ar9170_tx_callback(&aru->common, urb->context);
138 } 138 }
139 139
@@ -151,7 +151,7 @@ static void ar9170_usb_tx_urb_complete_frame(struct urb *urb)
151 return ; 151 return ;
152 } 152 }
153 153
154 aru->tx_submitted_urbs--; 154 atomic_dec(&aru->tx_submitted_urbs);
155 155
156 ar9170_tx_callback(&aru->common, skb); 156 ar9170_tx_callback(&aru->common, skb);
157 157
@@ -794,7 +794,7 @@ static int ar9170_usb_probe(struct usb_interface *intf,
794 spin_lock_init(&aru->tx_urb_lock); 794 spin_lock_init(&aru->tx_urb_lock);
795 795
796 aru->tx_pending_urbs = 0; 796 aru->tx_pending_urbs = 0;
797 aru->tx_submitted_urbs = 0; 797 atomic_set(&aru->tx_submitted_urbs, 0);
798 798
799 aru->common.stop = ar9170_usb_stop; 799 aru->common.stop = ar9170_usb_stop;
800 aru->common.flush = ar9170_usb_flush; 800 aru->common.flush = ar9170_usb_flush;