aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/main.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2010-02-25 01:15:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-10 17:09:38 -0500
commitc03c6aefdc2c1f5785a5b0d1a3f7e48eeaae3505 (patch)
tree5f00ed890b35708e04da459cfdd37ab9a7f46c23 /drivers/net/wireless/iwmc3200wifi/main.c
parent34dd5feb8b8b15654714731e1dbb34a6d37fb34e (diff)
iwmc3200wifi: protect rx_tickets and rx_packets[] lists
Protect rx_tickets and rx_packets[] lists with spinlocks to fix the race condition for concurrent list operations. In iwmc3200wifi both sdio_isr_worker and rx_worker workqueues can access the rx ticket and packets lists at the same time under high rx load. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/main.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c
index 90519600a947..3a3510a6223a 100644
--- a/drivers/net/wireless/iwmc3200wifi/main.c
+++ b/drivers/net/wireless/iwmc3200wifi/main.c
@@ -276,8 +276,11 @@ int iwm_priv_init(struct iwm_priv *iwm)
276 276
277 skb_queue_head_init(&iwm->rx_list); 277 skb_queue_head_init(&iwm->rx_list);
278 INIT_LIST_HEAD(&iwm->rx_tickets); 278 INIT_LIST_HEAD(&iwm->rx_tickets);
279 for (i = 0; i < IWM_RX_ID_HASH; i++) 279 spin_lock_init(&iwm->ticket_lock);
280 for (i = 0; i < IWM_RX_ID_HASH; i++) {
280 INIT_LIST_HEAD(&iwm->rx_packets[i]); 281 INIT_LIST_HEAD(&iwm->rx_packets[i]);
282 spin_lock_init(&iwm->packet_lock[i]);
283 }
281 284
282 INIT_WORK(&iwm->rx_worker, iwm_rx_worker); 285 INIT_WORK(&iwm->rx_worker, iwm_rx_worker);
283 286