adapter->if_ops.card_reset(adapter);
}
-static void fw_dump_work(struct work_struct *work)
+static void fw_dump_timer_fn(struct timer_list *t)
{
- struct mwifiex_adapter *adapter =
- container_of(work, struct mwifiex_adapter, devdump_work.work);
+ struct mwifiex_adapter *adapter = from_timer(adapter, t, devdump_timer);
mwifiex_upload_device_dump(adapter);
}
adapter->active_scan_triggered = false;
timer_setup(&adapter->wakeup_timer, wakeup_timer_fn, 0);
adapter->devdump_len = 0;
- INIT_DELAYED_WORK(&adapter->devdump_work, fw_dump_work);
+ timer_setup(&adapter->devdump_timer, fw_dump_timer_fn, 0);
}
/*
mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter)
{
del_timer(&adapter->wakeup_timer);
- cancel_delayed_work_sync(&adapter->devdump_work);
+ del_timer_sync(&adapter->devdump_timer);
mwifiex_cancel_all_pending_cmd(adapter);
wake_up_interruptible(&adapter->cmd_wait_q.wait);
wake_up_interruptible(&adapter->hs_activate_wait_q);
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/of_irq.h>
-#include <linux/workqueue.h>
#include "decl.h"
#include "ioctl.h"
/* Device dump data/length */
void *devdump_data;
int devdump_len;
- struct delayed_work devdump_work;
+ struct timer_list devdump_timer;
bool ignore_btcoex_events;
};
* transmission event get lost, in this cornel case,
* user would still get partial of the dump.
*/
- schedule_delayed_work(&adapter->devdump_work,
- msecs_to_jiffies(MWIFIEX_TIMER_10S));
+ mod_timer(&adapter->devdump_timer,
+ jiffies + msecs_to_jiffies(MWIFIEX_TIMER_10S));
}
/* Overflow check */
return;
upload_dump:
- cancel_delayed_work_sync(&adapter->devdump_work);
+ del_timer_sync(&adapter->devdump_timer);
mwifiex_upload_device_dump(adapter);
}