aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-08-18 14:33:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-20 11:36:05 -0400
commitd904dc17495581254442b7fd054e267f2605c8ec (patch)
treed314c2e2be22fb2acdd61913d097a7b0abca2cf8 /drivers
parentafa620429ac6a636246f85d97cf205d6533e7fcb (diff)
rt2x00: bss_info_changed() callback is allowed to sleep
The bss_info_changed() callback function no longer needs to be atomic. Remove the scheduled work structure and call into the driver directly. Additionaly this makes the DRIVER_REQUIRE_SCHEDULED flag redundant so it can be removed. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h3
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c8
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c14
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c1
6 files changed, 3 insertions, 25 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 09a589432dab..b04f59bab3b0 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1874,7 +1874,6 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)
1874 */ 1874 */
1875 __set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags); 1875 __set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags);
1876 __set_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags); 1876 __set_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags);
1877 __set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
1878 if (!modparam_nohwcrypt) { 1877 if (!modparam_nohwcrypt) {
1879 __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); 1878 __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
1880 __set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags); 1879 __set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags);
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 45e02f16d75b..639dc6cc04b9 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -2634,7 +2634,6 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
2634 * This device requires firmware. 2634 * This device requires firmware.
2635 */ 2635 */
2636 __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); 2636 __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
2637 __set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
2638 __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); 2637 __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
2639 if (!modparam_nohwcrypt) 2638 if (!modparam_nohwcrypt)
2640 __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); 2639 __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index ad70946c3b5f..555a777db6df 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -350,8 +350,6 @@ struct rt2x00_intf {
350 */ 350 */
351 unsigned int delayed_flags; 351 unsigned int delayed_flags;
352#define DELAYED_UPDATE_BEACON 0x00000001 352#define DELAYED_UPDATE_BEACON 0x00000001
353#define DELAYED_CONFIG_ERP 0x00000002
354#define DELAYED_LED_ASSOC 0x00000004
355 353
356 /* 354 /*
357 * Software sequence counter, this is only required 355 * Software sequence counter, this is only required
@@ -614,7 +612,6 @@ enum rt2x00_flags {
614 DRIVER_REQUIRE_FIRMWARE, 612 DRIVER_REQUIRE_FIRMWARE,
615 DRIVER_REQUIRE_BEACON_GUARD, 613 DRIVER_REQUIRE_BEACON_GUARD,
616 DRIVER_REQUIRE_ATIM_QUEUE, 614 DRIVER_REQUIRE_ATIM_QUEUE,
617 DRIVER_REQUIRE_SCHEDULED,
618 DRIVER_REQUIRE_DMA, 615 DRIVER_REQUIRE_DMA,
619 DRIVER_REQUIRE_COPY_IV, 616 DRIVER_REQUIRE_COPY_IV,
620 DRIVER_REQUIRE_L2PAD, 617 DRIVER_REQUIRE_L2PAD,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 16b560a661e3..3f8c70ebe9ad 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -123,7 +123,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
123{ 123{
124 struct rt2x00_dev *rt2x00dev = data; 124 struct rt2x00_dev *rt2x00dev = data;
125 struct rt2x00_intf *intf = vif_to_intf(vif); 125 struct rt2x00_intf *intf = vif_to_intf(vif);
126 struct ieee80211_bss_conf conf;
127 int delayed_flags; 126 int delayed_flags;
128 127
129 /* 128 /*
@@ -133,7 +132,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
133 */ 132 */
134 spin_lock(&intf->lock); 133 spin_lock(&intf->lock);
135 134
136 memcpy(&conf, &vif->bss_conf, sizeof(conf));
137 delayed_flags = intf->delayed_flags; 135 delayed_flags = intf->delayed_flags;
138 intf->delayed_flags = 0; 136 intf->delayed_flags = 0;
139 137
@@ -150,12 +148,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
150 148
151 if (delayed_flags & DELAYED_UPDATE_BEACON) 149 if (delayed_flags & DELAYED_UPDATE_BEACON)
152 rt2x00queue_update_beacon(rt2x00dev, vif, true); 150 rt2x00queue_update_beacon(rt2x00dev, vif, true);
153
154 if (delayed_flags & DELAYED_CONFIG_ERP)
155 rt2x00lib_config_erp(rt2x00dev, intf, &conf);
156
157 if (delayed_flags & DELAYED_LED_ASSOC)
158 rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated);
159} 151}
160 152
161static void rt2x00lib_intf_scheduled(struct work_struct *work) 153static void rt2x00lib_intf_scheduled(struct work_struct *work)
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 967d3b55c897..a91f316cd452 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -636,23 +636,15 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
636 else 636 else
637 rt2x00dev->intf_associated--; 637 rt2x00dev->intf_associated--;
638 638
639 if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags)) 639 rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated);
640 rt2x00leds_led_assoc(rt2x00dev,
641 !!rt2x00dev->intf_associated);
642 else
643 delayed |= DELAYED_LED_ASSOC;
644 } 640 }
645 641
646 /* 642 /*
647 * When the erp information has changed, we should perform 643 * When the erp information has changed, we should perform
648 * additional configuration steps. For all other changes we are done. 644 * additional configuration steps. For all other changes we are done.
649 */ 645 */
650 if (changes & ~(BSS_CHANGED_ASSOC | BSS_CHANGED_HT)) { 646 if (changes & ~(BSS_CHANGED_ASSOC | BSS_CHANGED_HT))
651 if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags)) 647 rt2x00lib_config_erp(rt2x00dev, intf, bss_conf);
652 rt2x00lib_config_erp(rt2x00dev, intf, bss_conf);
653 else
654 delayed |= DELAYED_CONFIG_ERP;
655 }
656 648
657 spin_lock(&intf->lock); 649 spin_lock(&intf->lock);
658 if (delayed) { 650 if (delayed) {
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 4d94b65943f1..90e117263051 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -2151,7 +2151,6 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
2151 * This device requires firmware. 2151 * This device requires firmware.
2152 */ 2152 */
2153 __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); 2153 __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
2154 __set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
2155 if (!modparam_nohwcrypt) 2154 if (!modparam_nohwcrypt)
2156 __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); 2155 __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
2157 2156