aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-01-05 16:06:25 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-05 16:06:25 -0500
commitc96e96354a6c9456cdf1f150eca504e2ea35301e (patch)
tree751bec601fb8152116b8e31e0f1f83d687a37d6f /drivers/net/wireless/rt2x00/rt2x00dev.c
parentdbbe68bb12b34f3e450da7a73c20e6fa1f85d63a (diff)
parent33af88138b859f515b365a074e0a014d7cdbf846 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts: net/bluetooth/Makefile
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index fa74acdd271f..9597a03242cc 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -110,19 +110,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
110{ 110{
111 struct rt2x00_dev *rt2x00dev = data; 111 struct rt2x00_dev *rt2x00dev = data;
112 struct rt2x00_intf *intf = vif_to_intf(vif); 112 struct rt2x00_intf *intf = vif_to_intf(vif);
113 int delayed_flags;
114
115 /*
116 * Copy all data we need during this action under the protection
117 * of a spinlock. Otherwise race conditions might occur which results
118 * into an invalid configuration.
119 */
120 spin_lock(&intf->lock);
121
122 delayed_flags = intf->delayed_flags;
123 intf->delayed_flags = 0;
124
125 spin_unlock(&intf->lock);
126 113
127 /* 114 /*
128 * It is possible the radio was disabled while the work had been 115 * It is possible the radio was disabled while the work had been
@@ -133,7 +120,7 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
133 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) 120 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
134 return; 121 return;
135 122
136 if (delayed_flags & DELAYED_UPDATE_BEACON) 123 if (test_and_clear_bit(DELAYED_UPDATE_BEACON, &intf->delayed_flags))
137 rt2x00queue_update_beacon(rt2x00dev, vif, true); 124 rt2x00queue_update_beacon(rt2x00dev, vif, true);
138} 125}
139 126
@@ -813,8 +800,7 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
813 /* 800 /*
814 * Allocate tx status FIFO for driver use. 801 * Allocate tx status FIFO for driver use.
815 */ 802 */
816 if (test_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags) && 803 if (test_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags)) {
817 rt2x00dev->ops->lib->txstatus_tasklet) {
818 /* 804 /*
819 * Allocate txstatus fifo and tasklet, we use a size of 512 805 * Allocate txstatus fifo and tasklet, we use a size of 512
820 * for the kfifo which is big enough to store 512/4=128 tx 806 * for the kfifo which is big enough to store 512/4=128 tx
@@ -828,9 +814,10 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
828 return status; 814 return status;
829 815
830 /* tasklet for processing the tx status reports. */ 816 /* tasklet for processing the tx status reports. */
831 tasklet_init(&rt2x00dev->txstatus_tasklet, 817 if (rt2x00dev->ops->lib->txstatus_tasklet)
832 rt2x00dev->ops->lib->txstatus_tasklet, 818 tasklet_init(&rt2x00dev->txstatus_tasklet,
833 (unsigned long)rt2x00dev); 819 rt2x00dev->ops->lib->txstatus_tasklet,
820 (unsigned long)rt2x00dev);
834 821
835 } 822 }
836 823