mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 16:50:05 +00:00
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>
This commit is contained in:
parent
afa620429a
commit
d904dc1749
@ -1874,7 +1874,6 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)
|
||||
*/
|
||||
__set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
|
||||
if (!modparam_nohwcrypt) {
|
||||
__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags);
|
||||
|
@ -2634,7 +2634,6 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
|
||||
* This device requires firmware.
|
||||
*/
|
||||
__set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
|
||||
if (!modparam_nohwcrypt)
|
||||
__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
|
||||
|
@ -350,8 +350,6 @@ struct rt2x00_intf {
|
||||
*/
|
||||
unsigned int delayed_flags;
|
||||
#define DELAYED_UPDATE_BEACON 0x00000001
|
||||
#define DELAYED_CONFIG_ERP 0x00000002
|
||||
#define DELAYED_LED_ASSOC 0x00000004
|
||||
|
||||
/*
|
||||
* Software sequence counter, this is only required
|
||||
@ -614,7 +612,6 @@ enum rt2x00_flags {
|
||||
DRIVER_REQUIRE_FIRMWARE,
|
||||
DRIVER_REQUIRE_BEACON_GUARD,
|
||||
DRIVER_REQUIRE_ATIM_QUEUE,
|
||||
DRIVER_REQUIRE_SCHEDULED,
|
||||
DRIVER_REQUIRE_DMA,
|
||||
DRIVER_REQUIRE_COPY_IV,
|
||||
DRIVER_REQUIRE_L2PAD,
|
||||
|
@ -123,7 +123,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
|
||||
{
|
||||
struct rt2x00_dev *rt2x00dev = data;
|
||||
struct rt2x00_intf *intf = vif_to_intf(vif);
|
||||
struct ieee80211_bss_conf conf;
|
||||
int delayed_flags;
|
||||
|
||||
/*
|
||||
@ -133,7 +132,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
|
||||
*/
|
||||
spin_lock(&intf->lock);
|
||||
|
||||
memcpy(&conf, &vif->bss_conf, sizeof(conf));
|
||||
delayed_flags = intf->delayed_flags;
|
||||
intf->delayed_flags = 0;
|
||||
|
||||
@ -150,12 +148,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
|
||||
|
||||
if (delayed_flags & DELAYED_UPDATE_BEACON)
|
||||
rt2x00queue_update_beacon(rt2x00dev, vif, true);
|
||||
|
||||
if (delayed_flags & DELAYED_CONFIG_ERP)
|
||||
rt2x00lib_config_erp(rt2x00dev, intf, &conf);
|
||||
|
||||
if (delayed_flags & DELAYED_LED_ASSOC)
|
||||
rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated);
|
||||
}
|
||||
|
||||
static void rt2x00lib_intf_scheduled(struct work_struct *work)
|
||||
|
@ -636,23 +636,15 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
|
||||
else
|
||||
rt2x00dev->intf_associated--;
|
||||
|
||||
if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags))
|
||||
rt2x00leds_led_assoc(rt2x00dev,
|
||||
!!rt2x00dev->intf_associated);
|
||||
else
|
||||
delayed |= DELAYED_LED_ASSOC;
|
||||
rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated);
|
||||
}
|
||||
|
||||
/*
|
||||
* When the erp information has changed, we should perform
|
||||
* additional configuration steps. For all other changes we are done.
|
||||
*/
|
||||
if (changes & ~(BSS_CHANGED_ASSOC | BSS_CHANGED_HT)) {
|
||||
if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags))
|
||||
rt2x00lib_config_erp(rt2x00dev, intf, bss_conf);
|
||||
else
|
||||
delayed |= DELAYED_CONFIG_ERP;
|
||||
}
|
||||
if (changes & ~(BSS_CHANGED_ASSOC | BSS_CHANGED_HT))
|
||||
rt2x00lib_config_erp(rt2x00dev, intf, bss_conf);
|
||||
|
||||
spin_lock(&intf->lock);
|
||||
if (delayed) {
|
||||
|
@ -2151,7 +2151,6 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
|
||||
* This device requires firmware.
|
||||
*/
|
||||
__set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
|
||||
if (!modparam_nohwcrypt)
|
||||
__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user