aboutsummaryrefslogtreecommitdiff
path: root/at76_usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'at76_usb.c')
-rw-r--r--at76_usb.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/at76_usb.c b/at76_usb.c
index 14baefc..e31a734 100644
--- a/at76_usb.c
+++ b/at76_usb.c
@@ -1994,14 +1994,6 @@ static int at76_disassoc_req(struct at76_priv *priv, struct bss_info *bss)
}
-/* the firmware download timeout (after remap) */
-static void at76_fw_dl_timeout(unsigned long par)
-{
- struct at76_priv *priv = (struct at76_priv *)par;
- schedule_work(&priv->work_reset_device);
-}
-
-
/* the restart timer timed out */
static void at76_restart_timeout(unsigned long par)
{
@@ -4334,7 +4326,9 @@ static int at76_load_internal_fw(struct at76_priv *priv)
at76_dbg(DBG_DEVSTART, "sleeping for 2 seconds");
priv->istate = EXTFW_DOWNLOAD;
- mod_timer(&priv->fw_dl_timer, jiffies + 2 * HZ + 1);
+ schedule_timeout_interruptible(2 * HZ + 1);
+ usb_reset_device(priv->udev);
+ priv->istate = WAIT_FOR_DISCONNECT;
end_internal_fw:
mutex_unlock(&priv->mtx);
@@ -4599,18 +4593,6 @@ static void at76_work_new_bss(struct work_struct *work)
}
-static void at76_work_reset_device(struct work_struct *work)
-{
- struct at76_priv *priv = container_of(work, struct at76_priv,
- work_reset_device);
-
- mutex_lock(&priv->mtx);
- usb_reset_device(priv->udev);
- priv->istate = WAIT_FOR_DISCONNECT;
- mutex_unlock(&priv->mtx);
-}
-
-
static int at76_startup_device(struct at76_priv *priv)
{
struct at76_card_config *ccfg = &priv->card_config;
@@ -6129,7 +6111,6 @@ static struct at76_priv *at76_alloc_new_device(struct usb_device *udev,
INIT_WORK(&priv->work_join, at76_work_join);
INIT_WORK(&priv->work_mgmt_timeout, at76_work_mgmt_timeout);
INIT_WORK(&priv->work_new_bss, at76_work_new_bss);
- INIT_WORK(&priv->work_reset_device, at76_work_reset_device);
INIT_WORK(&priv->work_restart, at76_work_restart);
INIT_WORK(&priv->work_scan, at76_work_scan);
INIT_WORK(&priv->work_set_promisc, at76_work_set_promisc);
@@ -6146,10 +6127,6 @@ static struct at76_priv *at76_alloc_new_device(struct usb_device *udev,
priv->mgmt_timer.data = (unsigned long)priv;
priv->mgmt_timer.function = at76_mgmt_timeout;
- init_timer(&priv->fw_dl_timer);
- priv->fw_dl_timer.data = (unsigned long)priv;
- priv->fw_dl_timer.function = at76_fw_dl_timeout;
-
spin_lock_init(&priv->mgmt_spinlock);
priv->next_mgmt_bulk = NULL;
priv->istate = INTFW_DOWNLOAD;