Commit bcb6d916 authored by Tejun Heo's avatar Tejun Heo
Browse files

wireless/ipw2x00: use system_wq instead of dedicated workqueues



With cmwq, there's no reason to use separate workqueues in ipw2x00
drivers.  Drop them and use system_wq instead.  All used work items
are sync canceled on driver detach.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatar"John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
parent c4873005
...@@ -706,11 +706,10 @@ static void schedule_reset(struct ipw2100_priv *priv) ...@@ -706,11 +706,10 @@ static void schedule_reset(struct ipw2100_priv *priv)
netif_stop_queue(priv->net_dev); netif_stop_queue(priv->net_dev);
priv->status |= STATUS_RESET_PENDING; priv->status |= STATUS_RESET_PENDING;
if (priv->reset_backoff) if (priv->reset_backoff)
queue_delayed_work(priv->workqueue, &priv->reset_work, schedule_delayed_work(&priv->reset_work,
priv->reset_backoff * HZ); priv->reset_backoff * HZ);
else else
queue_delayed_work(priv->workqueue, &priv->reset_work, schedule_delayed_work(&priv->reset_work, 0);
0);
if (priv->reset_backoff < MAX_RESET_BACKOFF) if (priv->reset_backoff < MAX_RESET_BACKOFF)
priv->reset_backoff++; priv->reset_backoff++;
...@@ -1474,7 +1473,7 @@ static int ipw2100_enable_adapter(struct ipw2100_priv *priv) ...@@ -1474,7 +1473,7 @@ static int ipw2100_enable_adapter(struct ipw2100_priv *priv)
if (priv->stop_hang_check) { if (priv->stop_hang_check) {
priv->stop_hang_check = 0; priv->stop_hang_check = 0;
queue_delayed_work(priv->workqueue, &priv->hang_check, HZ / 2); schedule_delayed_work(&priv->hang_check, HZ / 2);
} }
fail_up: fail_up:
...@@ -1808,8 +1807,8 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred) ...@@ -1808,8 +1807,8 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
if (priv->stop_rf_kill) { if (priv->stop_rf_kill) {
priv->stop_rf_kill = 0; priv->stop_rf_kill = 0;
queue_delayed_work(priv->workqueue, &priv->rf_kill, schedule_delayed_work(&priv->rf_kill,
round_jiffies_relative(HZ)); round_jiffies_relative(HZ));
} }
deferred = 1; deferred = 1;
...@@ -2086,7 +2085,7 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status) ...@@ -2086,7 +2085,7 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
priv->status |= STATUS_ASSOCIATING; priv->status |= STATUS_ASSOCIATING;
priv->connect_start = get_seconds(); priv->connect_start = get_seconds();
queue_delayed_work(priv->workqueue, &priv->wx_event_work, HZ / 10); schedule_delayed_work(&priv->wx_event_work, HZ / 10);
} }
static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid, static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid,
...@@ -2166,9 +2165,9 @@ static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status) ...@@ -2166,9 +2165,9 @@ static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status)
return; return;
if (priv->status & STATUS_SECURITY_UPDATED) if (priv->status & STATUS_SECURITY_UPDATED)
queue_delayed_work(priv->workqueue, &priv->security_work, 0); schedule_delayed_work(&priv->security_work, 0);
queue_delayed_work(priv->workqueue, &priv->wx_event_work, 0); schedule_delayed_work(&priv->wx_event_work, 0);
} }
static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status)
...@@ -2183,8 +2182,7 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) ...@@ -2183,8 +2182,7 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status)
/* Make sure the RF Kill check timer is running */ /* Make sure the RF Kill check timer is running */
priv->stop_rf_kill = 0; priv->stop_rf_kill = 0;
cancel_delayed_work(&priv->rf_kill); cancel_delayed_work(&priv->rf_kill);
queue_delayed_work(priv->workqueue, &priv->rf_kill, schedule_delayed_work(&priv->rf_kill, round_jiffies_relative(HZ));
round_jiffies_relative(HZ));
} }
static void send_scan_event(void *data) static void send_scan_event(void *data)
...@@ -2219,13 +2217,12 @@ static void isr_scan_complete(struct ipw2100_priv *priv, u32 status) ...@@ -2219,13 +2217,12 @@ static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
/* Only userspace-requested scan completion events go out immediately */ /* Only userspace-requested scan completion events go out immediately */
if (!priv->user_requested_scan) { if (!priv->user_requested_scan) {
if (!delayed_work_pending(&priv->scan_event_later)) if (!delayed_work_pending(&priv->scan_event_later))
queue_delayed_work(priv->workqueue, schedule_delayed_work(&priv->scan_event_later,
&priv->scan_event_later, round_jiffies_relative(msecs_to_jiffies(4000)));
round_jiffies_relative(msecs_to_jiffies(4000)));
} else { } else {
priv->user_requested_scan = 0; priv->user_requested_scan = 0;
cancel_delayed_work(&priv->scan_event_later); cancel_delayed_work(&priv->scan_event_later);
queue_work(priv->workqueue, &priv->scan_event_now); schedule_work(&priv->scan_event_now);
} }
} }
...@@ -4329,8 +4326,8 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio) ...@@ -4329,8 +4326,8 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio)
/* Make sure the RF_KILL check timer is running */ /* Make sure the RF_KILL check timer is running */
priv->stop_rf_kill = 0; priv->stop_rf_kill = 0;
cancel_delayed_work(&priv->rf_kill); cancel_delayed_work(&priv->rf_kill);
queue_delayed_work(priv->workqueue, &priv->rf_kill, schedule_delayed_work(&priv->rf_kill,
round_jiffies_relative(HZ)); round_jiffies_relative(HZ));
} else } else
schedule_reset(priv); schedule_reset(priv);
} }
...@@ -4461,20 +4458,17 @@ static void bd_queue_initialize(struct ipw2100_priv *priv, ...@@ -4461,20 +4458,17 @@ static void bd_queue_initialize(struct ipw2100_priv *priv,
IPW_DEBUG_INFO("exit\n"); IPW_DEBUG_INFO("exit\n");
} }
static void ipw2100_kill_workqueue(struct ipw2100_priv *priv) static void ipw2100_kill_works(struct ipw2100_priv *priv)
{ {
if (priv->workqueue) { priv->stop_rf_kill = 1;
priv->stop_rf_kill = 1; priv->stop_hang_check = 1;
priv->stop_hang_check = 1; cancel_delayed_work_sync(&priv->reset_work);
cancel_delayed_work(&priv->reset_work); cancel_delayed_work_sync(&priv->security_work);
cancel_delayed_work(&priv->security_work); cancel_delayed_work_sync(&priv->wx_event_work);
cancel_delayed_work(&priv->wx_event_work); cancel_delayed_work_sync(&priv->hang_check);
cancel_delayed_work(&priv->hang_check); cancel_delayed_work_sync(&priv->rf_kill);
cancel_delayed_work(&priv->rf_kill); cancel_work_sync(&priv->scan_event_now);
cancel_delayed_work(&priv->scan_event_later); cancel_delayed_work_sync(&priv->scan_event_later);
destroy_workqueue(priv->workqueue);
priv->workqueue = NULL;
}
} }
static int ipw2100_tx_allocate(struct ipw2100_priv *priv) static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
...@@ -6046,7 +6040,7 @@ static void ipw2100_hang_check(struct work_struct *work) ...@@ -6046,7 +6040,7 @@ static void ipw2100_hang_check(struct work_struct *work)
priv->last_rtc = rtc; priv->last_rtc = rtc;
if (!priv->stop_hang_check) if (!priv->stop_hang_check)
queue_delayed_work(priv->workqueue, &priv->hang_check, HZ / 2); schedule_delayed_work(&priv->hang_check, HZ / 2);
spin_unlock_irqrestore(&priv->low_lock, flags); spin_unlock_irqrestore(&priv->low_lock, flags);
} }
...@@ -6062,8 +6056,8 @@ static void ipw2100_rf_kill(struct work_struct *work) ...@@ -6062,8 +6056,8 @@ static void ipw2100_rf_kill(struct work_struct *work)
if (rf_kill_active(priv)) { if (rf_kill_active(priv)) {
IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n"); IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n");
if (!priv->stop_rf_kill) if (!priv->stop_rf_kill)
queue_delayed_work(priv->workqueue, &priv->rf_kill, schedule_delayed_work(&priv->rf_kill,
round_jiffies_relative(HZ)); round_jiffies_relative(HZ));
goto exit_unlock; goto exit_unlock;
} }
...@@ -6209,8 +6203,6 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, ...@@ -6209,8 +6203,6 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
INIT_LIST_HEAD(&priv->fw_pend_list); INIT_LIST_HEAD(&priv->fw_pend_list);
INIT_STAT(&priv->fw_pend_stat); INIT_STAT(&priv->fw_pend_stat);
priv->workqueue = create_workqueue(DRV_NAME);
INIT_DELAYED_WORK(&priv->reset_work, ipw2100_reset_adapter); INIT_DELAYED_WORK(&priv->reset_work, ipw2100_reset_adapter);
INIT_DELAYED_WORK(&priv->security_work, ipw2100_security_work); INIT_DELAYED_WORK(&priv->security_work, ipw2100_security_work);
INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work); INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work);
...@@ -6410,7 +6402,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, ...@@ -6410,7 +6402,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
if (dev->irq) if (dev->irq)
free_irq(dev->irq, priv); free_irq(dev->irq, priv);
ipw2100_kill_workqueue(priv); ipw2100_kill_works(priv);
/* These are safe to call even if they weren't allocated */ /* These are safe to call even if they weren't allocated */
ipw2100_queues_free(priv); ipw2100_queues_free(priv);
...@@ -6460,9 +6452,7 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev) ...@@ -6460,9 +6452,7 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
* first, then close() will crash. */ * first, then close() will crash. */
unregister_netdev(dev); unregister_netdev(dev);
/* ipw2100_down will ensure that there is no more pending work ipw2100_kill_works(priv);
* in the workqueue's, so we can safely remove them now. */
ipw2100_kill_workqueue(priv);
ipw2100_queues_free(priv); ipw2100_queues_free(priv);
......
...@@ -580,7 +580,6 @@ struct ipw2100_priv { ...@@ -580,7 +580,6 @@ struct ipw2100_priv {
struct tasklet_struct irq_tasklet; struct tasklet_struct irq_tasklet;
struct workqueue_struct *workqueue;
struct delayed_work reset_work; struct delayed_work reset_work;
struct delayed_work security_work; struct delayed_work security_work;
struct delayed_work wx_event_work; struct delayed_work wx_event_work;
......
...@@ -894,9 +894,8 @@ static void ipw_led_link_on(struct ipw_priv *priv) ...@@ -894,9 +894,8 @@ static void ipw_led_link_on(struct ipw_priv *priv)
/* If we aren't associated, schedule turning the LED off */ /* If we aren't associated, schedule turning the LED off */
if (!(priv->status & STATUS_ASSOCIATED)) if (!(priv->status & STATUS_ASSOCIATED))
queue_delayed_work(priv->workqueue, schedule_delayed_work(&priv->led_link_off,
&priv->led_link_off, LD_TIME_LINK_ON);
LD_TIME_LINK_ON);
} }
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
...@@ -939,8 +938,8 @@ static void ipw_led_link_off(struct ipw_priv *priv) ...@@ -939,8 +938,8 @@ static void ipw_led_link_off(struct ipw_priv *priv)
* turning the LED on (blink while unassociated) */ * turning the LED on (blink while unassociated) */
if (!(priv->status & STATUS_RF_KILL_MASK) && if (!(priv->status & STATUS_RF_KILL_MASK) &&
!(priv->status & STATUS_ASSOCIATED)) !(priv->status & STATUS_ASSOCIATED))
queue_delayed_work(priv->workqueue, &priv->led_link_on, schedule_delayed_work(&priv->led_link_on,
LD_TIME_LINK_OFF); LD_TIME_LINK_OFF);
} }
...@@ -980,13 +979,11 @@ static void __ipw_led_activity_on(struct ipw_priv *priv) ...@@ -980,13 +979,11 @@ static void __ipw_led_activity_on(struct ipw_priv *priv)
priv->status |= STATUS_LED_ACT_ON; priv->status |= STATUS_LED_ACT_ON;
cancel_delayed_work(&priv->led_act_off); cancel_delayed_work(&priv->led_act_off);
queue_delayed_work(priv->workqueue, &priv->led_act_off, schedule_delayed_work(&priv->led_act_off, LD_TIME_ACT_ON);
LD_TIME_ACT_ON);
} else { } else {
/* Reschedule LED off for full time period */ /* Reschedule LED off for full time period */
cancel_delayed_work(&priv->led_act_off); cancel_delayed_work(&priv->led_act_off);
queue_delayed_work(priv->workqueue, &priv->led_act_off, schedule_delayed_work(&priv->led_act_off, LD_TIME_ACT_ON);
LD_TIME_ACT_ON);
} }
} }
...@@ -1795,13 +1792,11 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio) ...@@ -1795,13 +1792,11 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio)
if (disable_radio) { if (disable_radio) {
priv->status |= STATUS_RF_KILL_SW; priv->status |= STATUS_RF_KILL_SW;
if (priv->workqueue) { cancel_delayed_work(&priv->request_scan);
cancel_delayed_work(&priv->request_scan); cancel_delayed_work(&priv->request_direct_scan);
cancel_delayed_work(&priv->request_direct_scan); cancel_delayed_work(&priv->request_passive_scan);
cancel_delayed_work(&priv->request_passive_scan); cancel_delayed_work(&priv->scan_event);
cancel_delayed_work(&priv->scan_event); schedule_work(&priv->down);
}
queue_work(priv->workqueue, &priv->down);
} else { } else {
priv->status &= ~STATUS_RF_KILL_SW; priv->status &= ~STATUS_RF_KILL_SW;
if (rf_kill_active(priv)) { if (rf_kill_active(priv)) {
...@@ -1809,10 +1804,10 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio) ...@@ -1809,10 +1804,10 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio)
"disabled by HW switch\n"); "disabled by HW switch\n");
/* Make sure the RF_KILL check timer is running */ /* Make sure the RF_KILL check timer is running */
cancel_delayed_work(&priv->rf_kill); cancel_delayed_work(&priv->rf_kill);
queue_delayed_work(priv->workqueue, &priv->rf_kill, schedule_delayed_work(&priv->rf_kill,
round_jiffies_relative(2 * HZ)); round_jiffies_relative(2 * HZ));
} else } else
queue_work(priv->workqueue, &priv->up); schedule_work(&priv->up);
} }
return 1; return 1;
...@@ -2063,7 +2058,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) ...@@ -2063,7 +2058,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv)
cancel_delayed_work(&priv->request_passive_scan); cancel_delayed_work(&priv->request_passive_scan);
cancel_delayed_work(&priv->scan_event); cancel_delayed_work(&priv->scan_event);
schedule_work(&priv->link_down); schedule_work(&priv->link_down);
queue_delayed_work(priv->workqueue, &priv->rf_kill, 2 * HZ); schedule_delayed_work(&priv->rf_kill, 2 * HZ);
handled |= IPW_INTA_BIT_RF_KILL_DONE; handled |= IPW_INTA_BIT_RF_KILL_DONE;
} }
...@@ -2103,7 +2098,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) ...@@ -2103,7 +2098,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv)
priv->status &= ~STATUS_HCMD_ACTIVE; priv->status &= ~STATUS_HCMD_ACTIVE;
wake_up_interruptible(&priv->wait_command_queue); wake_up_interruptible(&priv->wait_command_queue);
queue_work(priv->workqueue, &priv->adapter_restart); schedule_work(&priv->adapter_restart);
handled |= IPW_INTA_BIT_FATAL_ERROR; handled |= IPW_INTA_BIT_FATAL_ERROR;
} }
...@@ -2323,11 +2318,6 @@ static int ipw_send_adapter_address(struct ipw_priv *priv, u8 * mac) ...@@ -2323,11 +2318,6 @@ static int ipw_send_adapter_address(struct ipw_priv *priv, u8 * mac)
return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac); return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac);
} }
/*
* NOTE: This must be executed from our workqueue as it results in udelay
* being called which may corrupt the keyboard if executed on default
* workqueue
*/
static void ipw_adapter_restart(void *adapter) static void ipw_adapter_restart(void *adapter)
{ {
struct ipw_priv *priv = adapter; struct ipw_priv *priv = adapter;
...@@ -2368,13 +2358,13 @@ static void ipw_scan_check(void *data) ...@@ -2368,13 +2358,13 @@ static void ipw_scan_check(void *data)
IPW_DEBUG_SCAN("Scan completion watchdog resetting " IPW_DEBUG_SCAN("Scan completion watchdog resetting "
"adapter after (%dms).\n", "adapter after (%dms).\n",
jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG));
queue_work(priv->workqueue, &priv->adapter_restart); schedule_work(&priv->adapter_restart);
} else if (priv->status & STATUS_SCANNING) { } else if (priv->status & STATUS_SCANNING) {
IPW_DEBUG_SCAN("Scan completion watchdog aborting scan " IPW_DEBUG_SCAN("Scan completion watchdog aborting scan "
"after (%dms).\n", "after (%dms).\n",
jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG));
ipw_abort_scan(priv); ipw_abort_scan(priv);
queue_delayed_work(priv->workqueue, &priv->scan_check, HZ); schedule_delayed_work(&priv->scan_check, HZ);
} }
} }
...@@ -3943,7 +3933,7 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) ...@@ -3943,7 +3933,7 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
if (priv->status & STATUS_ASSOCIATING) { if (priv->status & STATUS_ASSOCIATING) {
IPW_DEBUG_ASSOC("Disassociating while associating.\n"); IPW_DEBUG_ASSOC("Disassociating while associating.\n");
queue_work(priv->workqueue, &priv->disassociate); schedule_work(&priv->disassociate);
return; return;
} }
...@@ -4360,8 +4350,7 @@ static void ipw_gather_stats(struct ipw_priv *priv) ...@@ -4360,8 +4350,7 @@ static void ipw_gather_stats(struct ipw_priv *priv)
priv->quality = quality; priv->quality = quality;
queue_delayed_work(priv->workqueue, &priv->gather_stats, schedule_delayed_work(&priv->gather_stats, IPW_STATS_INTERVAL);
IPW_STATS_INTERVAL);
} }
static void ipw_bg_gather_stats(struct work_struct *work) static void ipw_bg_gather_stats(struct work_struct *work)
...@@ -4396,10 +4385,10 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv, ...@@ -4396,10 +4385,10 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv,
IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF |
IPW_DL_STATE, IPW_DL_STATE,
"Aborting scan with missed beacon.\n"); "Aborting scan with missed beacon.\n");
queue_work(priv->workqueue, &priv->abort_scan); schedule_work(&priv->abort_scan);
} }
queue_work(priv->workqueue, &priv->disassociate); schedule_work(&priv->disassociate);
return; return;
} }
...@@ -4425,8 +4414,7 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv, ...@@ -4425,8 +4414,7 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv,
if (!(priv->status & STATUS_ROAMING)) { if (!(priv->status & STATUS_ROAMING)) {
priv->status |= STATUS_ROAMING; priv->status |= STATUS_ROAMING;
if (!(priv->status & STATUS_SCANNING)) if (!(priv->status & STATUS_SCANNING))
queue_delayed_work(priv->workqueue, schedule_delayed_work(&priv->request_scan, 0);
&priv->request_scan, 0);
} }
return; return;
} }
...@@ -4439,7 +4427,7 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv, ...@@ -4439,7 +4427,7 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv,
* channels..) */ * channels..) */
IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | IPW_DL_STATE, IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | IPW_DL_STATE,
"Aborting scan with missed beacon.\n"); "Aborting scan with missed beacon.\n");
queue_work(priv->workqueue, &priv->abort_scan); schedule_work(&priv->abort_scan);
} }
IPW_DEBUG_NOTIF("Missed beacon: %d\n", missed_count); IPW_DEBUG_NOTIF("Missed beacon: %d\n", missed_count);
...@@ -4462,8 +4450,8 @@ static void handle_scan_event(struct ipw_priv *priv) ...@@ -4462,8 +4450,8 @@ static void handle_scan_event(struct ipw_priv *priv)
/* Only userspace-requested scan completion events go out immediately */ /* Only userspace-requested scan completion events go out immediately */
if (!priv->user_requested_scan) { if (!priv->user_requested_scan) {
if (!delayed_work_pending(&priv->scan_event)) if (!delayed_work_pending(&priv->scan_event))
queue_delayed_work(priv->workqueue, &priv->scan_event, schedule_delayed_work(&priv->scan_event,
round_jiffies_relative(msecs_to_jiffies(4000))); round_jiffies_relative(msecs_to_jiffies(4000)));
} else { } else {
union iwreq_data wrqu; union iwreq_data wrqu;
...@@ -4516,20 +4504,17 @@ static void ipw_rx_notification(struct ipw_priv *priv, ...@@ -4516,20 +4504,17 @@ static void ipw_rx_notification(struct ipw_priv *priv,
IPW_DEBUG_ASSOC IPW_DEBUG_ASSOC
("queueing adhoc check\n"); ("queueing adhoc check\n");
queue_delayed_work(priv-> schedule_delayed_work(
workqueue, &priv->adhoc_check,
&priv-> le16_to_cpu(priv->
adhoc_check, assoc_request.
le16_to_cpu(priv-> beacon_interval));
assoc_request.
beacon_interval));
break; break;
} }
priv->status &= ~STATUS_ASSOCIATING; priv->status &= ~STATUS_ASSOCIATING;
priv->status |= STATUS_ASSOCIATED; priv->status |= STATUS_ASSOCIATED;
queue_work(priv->workqueue, schedule_work(&priv->system_config);
&priv->system_config);
#ifdef CONFIG_IPW2200_QOS #ifdef CONFIG_IPW2200_QOS
#define IPW_GET_PACKET_STYPE(x) WLAN_FC_GET_STYPE( \ #define IPW_GET_PACKET_STYPE(x) WLAN_FC_GET_STYPE( \
...@@ -4792,43 +4777,37 @@ static void ipw_rx_notification(struct ipw_priv *priv, ...@@ -4792,43 +4777,37 @@ static void ipw_rx_notification(struct ipw_priv *priv,
#ifdef CONFIG_IPW2200_MONITOR #ifdef CONFIG_IPW2200_MONITOR
if (priv->ieee->iw_mode == IW_MODE_MONITOR) { if (priv->ieee->iw_mode == IW_MODE_MONITOR) {
priv->status |= STATUS_SCAN_FORCED; priv->status |= STATUS_SCAN_FORCED;
queue_delayed_work(priv->workqueue, schedule_delayed_work(&priv->request_scan, 0);
&priv->request_scan, 0);
break; break;
} }
priv->status &= ~STATUS_SCAN_FORCED; priv->status &= ~STATUS_SCAN_FORCED;
#endif /* CONFIG_IPW2200_MONITOR */ #endif /* CONFIG_IPW2200_MONITOR */
/* Do queued direct scans first */ /* Do queued direct scans first */
if (priv->status & STATUS_DIRECT_SCAN_PENDING) { if (priv->status & STATUS_DIRECT_SCAN_PENDING)
queue_delayed_work(priv->workqueue, schedule_delayed_work(&priv->request_direct_scan, 0);
&priv->request_direct_scan, 0);
}
if (!(priv->status & (STATUS_ASSOCIATED | if (!(priv->status & (STATUS_ASSOCIATED |
STATUS_ASSOCIATING | STATUS_ASSOCIATING |
STATUS_ROAMING | STATUS_ROAMING |
STATUS_DISASSOCIATING))) STATUS_DISASSOCIATING)))
queue_work(priv->workqueue, &priv->associate); schedule_work(&priv->associate);
else if (priv->status & STATUS_ROAMING) { else if (priv->status & STATUS_ROAMING) {
if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) if (x->status == SCAN_COMPLETED_STATUS_COMPLETE)
/* If a scan completed and we are in roam mode, then /* If a scan completed and we are in roam mode, then
* the scan that completed was the one requested as a * the scan that completed was the one requested as a
* result of entering roam... so, schedule the * result of entering roam... so, schedule the
* roam work */ * roam work */
queue_work(priv->workqueue, schedule_work(&priv->roam);
&priv->roam);
else else
/* Don't schedule if we aborted the scan */ /* Don't schedule if we aborted the scan */
priv->status &= ~STATUS_ROAMING; priv->status &= ~STATUS_ROAMING;
} else if (priv->status & STATUS_SCAN_PENDING) } else if (priv->status & STATUS_SCAN_PENDING)
queue_delayed_work(priv->workqueue, schedule_delayed_work(&priv->request_scan, 0);
&priv->request_scan, 0);
else if (priv->config & CFG_BACKGROUND_SCAN else if (priv->config & CFG_BACKGROUND_SCAN
&& priv->status & STATUS_ASSOCIATED) && priv->status & STATUS_ASSOCIATED)
queue_delayed_work(priv->workqueue, schedule_delayed_work(&priv->request_scan,
&priv->request_scan, round_jiffies_relative(HZ));
round_jiffies_relative(HZ));
/* Send an empty event to user space. /* Send an empty event to user space.
* We don't send the received data on the event because * We don't send the received data on the event because
...@@ -5192,7 +5171,7 @@ static void ipw_rx_queue_restock(struct ipw_priv *priv) ...@@ -5192,7 +5171,7 @@ static void ipw_rx_queue_restock(struct ipw_priv *priv)
/* If the pre-allocated buffer pool is dropping low, schedule to /* If the pre-allocated buffer pool is dropping low, schedule to
* refill it */ * refill it */
if (rxq->free_count <= RX_LOW_WATERMARK) if (rxq->free_count <= RX_LOW_WATERMARK)
queue_work(priv->workqueue, &priv->rx_replenish); schedule_work(&priv->rx_replenish);
/* If we've added more space for the firmware to place data, tell it */ /* If we've added more space for the firmware to place data, tell it */
if (write != rxq->write) if (write != rxq->write)
...@@ -6133,8 +6112,8 @@ static void ipw_adhoc_check(void *data) ...@@ -6133,8 +6112,8 @@ static void ipw_adhoc_check(void *data)
return; return;
} }