summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_mac.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-01-31 20:47:27 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-02-04 16:29:48 -0500
commit8b17f75ced1d45af9faed767f4cfafb13c0fe05e (patch)
treecac3f6a076ae0e6145d8e2969c39b6ac75b24fac /drivers/net/wireless/zd1211rw/zd_mac.c
parentd741900d404b3a34bf478673f76ee9f16dad3f90 (diff)
downloadlinux-8b17f75ced1d45af9faed767f4cfafb13c0fe05e.tar.bz2
zd1211rw: add locking for mac->process_intr
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_mac.c')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 6107304cb94c..8b3d779d80dc 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -911,9 +911,13 @@ static int zd_op_config(struct ieee80211_hw *hw, u32 changed)
static void zd_process_intr(struct work_struct *work)
{
u16 int_status;
+ unsigned long flags;
struct zd_mac *mac = container_of(work, struct zd_mac, process_intr);
- int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4));
+ spin_lock_irqsave(&mac->lock, flags);
+ int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer + 4));
+ spin_unlock_irqrestore(&mac->lock, flags);
+
if (int_status & INT_CFG_NEXT_BCN)
dev_dbg_f_limit(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n");
else