diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/atmel/at76c50x-usb.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/dvm/main.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/dvm/tt.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/intersil/hostap/hostap_ap.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/intersil/hostap/hostap_hw.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/core.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 7 |
14 files changed, 53 insertions, 64 deletions
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index ede89d4ffc88..e99e766a3028 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c @@ -518,11 +518,11 @@ exit: /* LED trigger */ static int tx_activity; -static void at76_ledtrig_tx_timerfunc(unsigned long data); +static void at76_ledtrig_tx_timerfunc(struct timer_list *unused); static DEFINE_TIMER(ledtrig_tx_timer, at76_ledtrig_tx_timerfunc); DEFINE_LED_TRIGGER(ledtrig_tx); -static void at76_ledtrig_tx_timerfunc(unsigned long data) +static void at76_ledtrig_tx_timerfunc(struct timer_list *unused) { static int tx_lastactivity; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c index 3559fb5b8fb0..03aae6bc1838 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c @@ -280,9 +280,9 @@ static void brcmf_btcoex_restore_part1(struct brcmf_btcoex_info *btci) /** * brcmf_btcoex_timerfunc() - BT coex timer callback */ -static void brcmf_btcoex_timerfunc(ulong data) +static void brcmf_btcoex_timerfunc(struct timer_list *t) { - struct brcmf_btcoex_info *bt_local = (struct brcmf_btcoex_info *)data; + struct brcmf_btcoex_info *bt_local = from_timer(bt_local, t, timer); brcmf_dbg(TRACE, "enter\n"); bt_local->timer_on = false; @@ -380,7 +380,7 @@ int brcmf_btcoex_attach(struct brcmf_cfg80211_info *cfg) /* Set up timer for BT */ btci->timer_on = false; btci->timeout = BRCMF_BTCOEX_OPPR_WIN_TIME; - setup_timer(&btci->timer, brcmf_btcoex_timerfunc, (ulong)btci); + timer_setup(&btci->timer, brcmf_btcoex_timerfunc, 0); btci->cfg = cfg; btci->saved_regs_part1 = false; btci->saved_regs_part2 = false; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 6e70df978159..15fa00d79fc6 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2983,10 +2983,10 @@ static void brcmf_cfg80211_escan_timeout_worker(struct work_struct *work) brcmf_notify_escan_complete(cfg, cfg->escan_info.ifp, true, true); } -static void brcmf_escan_timeout(unsigned long data) +static void brcmf_escan_timeout(struct timer_list *t) { struct brcmf_cfg80211_info *cfg = - (struct brcmf_cfg80211_info *)data; + from_timer(cfg, t, escan_timeout); if (cfg->int_escan_map || cfg->scan_request) { brcmf_err("timer expired\n"); @@ -3150,8 +3150,7 @@ static void brcmf_init_escan(struct brcmf_cfg80211_info *cfg) brcmf_cfg80211_escan_handler); cfg->escan_info.escan_state = WL_ESCAN_STATE_IDLE; /* Init scan_timeout timer */ - setup_timer(&cfg->escan_timeout, brcmf_escan_timeout, - (unsigned long)cfg); + timer_setup(&cfg->escan_timeout, brcmf_escan_timeout, 0); INIT_WORK(&cfg->escan_timeout_work, brcmf_cfg80211_escan_timeout_worker); } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index e3495ea95553..310c4e2746aa 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3972,9 +3972,9 @@ brcmf_sdio_watchdog_thread(void *data) } static void -brcmf_sdio_watchdog(unsigned long data) +brcmf_sdio_watchdog(struct timer_list *t) { - struct brcmf_sdio *bus = (struct brcmf_sdio *)data; + struct brcmf_sdio *bus = from_timer(bus, t, timer); if (bus->watchdog_tsk) { complete(&bus->watchdog_wait); @@ -4169,8 +4169,7 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) init_waitqueue_head(&bus->dcmd_resp_wait); /* Set up the watchdog timer */ - setup_timer(&bus->timer, brcmf_sdio_watchdog, - (unsigned long)bus); + timer_setup(&bus->timer, brcmf_sdio_watchdog, 0); /* Initialize watchdog thread */ init_completion(&bus->watchdog_wait); bus->watchdog_tsk = kthread_run(brcmf_sdio_watchdog_thread, diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c b/drivers/net/wireless/intel/iwlwifi/dvm/main.c index 2acd94da9efe..d11d72615de2 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c @@ -399,9 +399,9 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear) * was received. We need to ensure we receive the statistics in order * to update the temperature used for calibrating the TXPOWER. */ -static void iwl_bg_statistics_periodic(unsigned long data) +static void iwl_bg_statistics_periodic(struct timer_list *t) { - struct iwl_priv *priv = (struct iwl_priv *)data; + struct iwl_priv *priv = from_timer(priv, t, statistics_periodic); if (test_bit(STATUS_EXIT_PENDING, &priv->status)) return; @@ -556,9 +556,9 @@ static void iwl_continuous_event_trace(struct iwl_priv *priv) * this function is to perform continuous uCode event logging operation * if enabled */ -static void iwl_bg_ucode_trace(unsigned long data) +static void iwl_bg_ucode_trace(struct timer_list *t) { - struct iwl_priv *priv = (struct iwl_priv *)data; + struct iwl_priv *priv = from_timer(priv, t, ucode_trace); if (test_bit(STATUS_EXIT_PENDING, &priv->status)) return; @@ -1085,11 +1085,9 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) if (priv->lib->bt_params) iwlagn_bt_setup_deferred_work(priv); - setup_timer(&priv->statistics_periodic, iwl_bg_statistics_periodic, - (unsigned long)priv); + timer_setup(&priv->statistics_periodic, iwl_bg_statistics_periodic, 0); - setup_timer(&priv->ucode_trace, iwl_bg_ucode_trace, - (unsigned long)priv); + timer_setup(&priv->ucode_trace, iwl_bg_ucode_trace, 0); } void iwl_cancel_deferred_work(struct iwl_priv *priv) diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/tt.c b/drivers/net/wireless/intel/iwlwifi/dvm/tt.c index 5b73492e7ff7..6524533d723c 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/tt.c @@ -164,9 +164,10 @@ enum iwl_antenna_ok iwl_rx_ant_restriction(struct iwl_priv *priv) * without doing anything, driver should continue the 5 seconds timer * to wake up uCode for temperature check until temperature drop below CT */ -static void iwl_tt_check_exit_ct_kill(unsigned long data) +static void iwl_tt_check_exit_ct_kill(struct timer_list *t) { - struct iwl_priv *priv = (struct iwl_priv *)data; + struct iwl_priv *priv = from_timer(priv, t, + thermal_throttle.ct_kill_exit_tm); struct iwl_tt_mgmt *tt = &priv->thermal_throttle; unsigned long flags; @@ -214,9 +215,10 @@ static void iwl_perform_ct_kill_task(struct iwl_priv *priv, } } -static void iwl_tt_ready_for_ct_kill(unsigned long data) +static void iwl_tt_ready_for_ct_kill(struct timer_list *t) { - struct iwl_priv *priv = (struct iwl_priv *)data; + struct iwl_priv *priv = from_timer(priv, t, + thermal_throttle.ct_kill_waiting_tm); struct iwl_tt_mgmt *tt = &priv->thermal_throttle; if (test_bit(STATUS_EXIT_PENDING, &priv->status)) @@ -612,10 +614,10 @@ void iwl_tt_initialize(struct iwl_priv *priv) memset(tt, 0, sizeof(struct iwl_tt_mgmt)); tt->state = IWL_TI_0; - setup_timer(&priv->thermal_throttle.ct_kill_exit_tm, - iwl_tt_check_exit_ct_kill, (unsigned long)priv); - setup_timer(&priv->thermal_throttle.ct_kill_waiting_tm, - iwl_tt_ready_for_ct_kill, (unsigned long)priv); + timer_setup(&priv->thermal_throttle.ct_kill_exit_tm, + iwl_tt_check_exit_ct_kill, 0); + timer_setup(&priv->thermal_throttle.ct_kill_waiting_tm, + iwl_tt_ready_for_ct_kill, 0); /* setup deferred ct kill work */ INIT_WORK(&priv->tt_work, iwl_bg_tt_work); INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter); diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c index b5c459cd70ce..fed6d842a5e1 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c @@ -147,9 +147,9 @@ void iwl_pcie_free_dma_ptr(struct iwl_trans *trans, struct iwl_dma_ptr *ptr) memset(ptr, 0, sizeof(*ptr)); } -static void iwl_pcie_txq_stuck_timer(unsigned long data) +static void iwl_pcie_txq_stuck_timer(struct timer_list *t) { - struct iwl_txq *txq = (void *)data; + struct iwl_txq *txq = from_timer(txq, t, stuck_timer); struct iwl_trans_pcie *trans_pcie = txq->trans_pcie; struct iwl_trans *trans = iwl_trans_pcie_get_trans(trans_pcie); @@ -495,8 +495,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq, if (WARN_ON(txq->entries || txq->tfds)) return -EINVAL; - setup_timer(&txq->stuck_timer, iwl_pcie_txq_stuck_timer, - (unsigned long)txq); + timer_setup(&txq->stuck_timer, iwl_pcie_txq_stuck_timer, 0); txq->trans_pcie = trans_pcie; txq->n_window = slots_num; diff --git a/drivers/net/wireless/intersil/hostap/hostap_ap.c b/drivers/net/wireless/intersil/hostap/hostap_ap.c index 1a8d8db80b05..b4dfe1893d18 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_ap.c +++ b/drivers/net/wireless/intersil/hostap/hostap_ap.c @@ -185,9 +185,9 @@ static void hostap_event_expired_sta(struct net_device *dev, #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT -static void ap_handle_timer(unsigned long data) +static void ap_handle_timer(struct timer_list *t) { - struct sta_info *sta = (struct sta_info *) data; + struct sta_info *sta = from_timer(sta, t, timer); local_info_t *local; struct ap_data *ap; unsigned long next_time = 0; @@ -1189,10 +1189,8 @@ static struct sta_info * ap_add_sta(struct ap_data *ap, u8 *addr) } #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT - init_timer(&sta->timer); + timer_setup(&sta->timer, ap_handle_timer, 0); sta->timer.expires = jiffies + ap->max_inactivity; - sta->timer.data = (unsigned long) sta; - sta->timer.function = ap_handle_timer; if (!ap->local->hostapd) add_timer(&sta->timer); #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c b/drivers/net/wireless/intersil/hostap/hostap_hw.c index 72b46eaf3de2..5c4a17a18968 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_hw.c +++ b/drivers/net/wireless/intersil/hostap/hostap_hw.c @@ -2794,9 +2794,9 @@ static void prism2_check_sta_fw_version(local_info_t *local) } -static void hostap_passive_scan(unsigned long data) +static void hostap_passive_scan(struct timer_list *t) { - local_info_t *local = (local_info_t *) data; + local_info_t *local = from_timer(local, t, passive_scan_timer); struct net_device *dev = local->dev; u16 chan; @@ -2869,10 +2869,10 @@ static void handle_comms_qual_update(struct work_struct *work) * used to monitor that local->last_tick_timer is being updated. If not, * interrupt busy-loop is assumed and driver tries to recover by masking out * some events. */ -static void hostap_tick_timer(unsigned long data) +static void hostap_tick_timer(struct timer_list *t) { static unsigned long last_inquire = 0; - local_info_t *local = (local_info_t *) data; + local_info_t *local = from_timer(local, t, tick_timer); local->last_tick_timer = jiffies; /* Inquire CommTallies every 10 seconds to keep the statistics updated @@ -3225,13 +3225,8 @@ while (0) lib80211_crypt_info_init(&local->crypt_info, dev->name, &local->lock); - init_timer(&local->passive_scan_timer); - local->passive_scan_timer.data = (unsigned long) local; - local->passive_scan_timer.function = hostap_passive_scan; - - init_timer(&local->tick_timer); - local->tick_timer.data = (unsigned long) local; - local->tick_timer.function = hostap_tick_timer; + timer_setup(&local->passive_scan_timer, hostap_passive_scan, 0); + timer_setup(&local->tick_timer, hostap_tick_timer, 0); local->tick_timer.expires = jiffies + 2 * HZ; add_timer(&local->tick_timer); diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c index 501180584b4b..94ad6fe29e69 100644 --- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c @@ -319,9 +319,9 @@ static inline void ezusb_mod_timer(struct ezusb_priv *upriv, mod_timer(timer, expire); } -static void ezusb_request_timerfn(u_long _ctx) +static void ezusb_request_timerfn(struct timer_list *t) { - struct request_context *ctx = (void *) _ctx; + struct request_context *ctx = from_timer(ctx, t, timer); ctx->outurb->transfer_flags |= URB_ASYNC_UNLINK; if (usb_unlink_urb(ctx->outurb) == -EINPROGRESS) { @@ -365,7 +365,7 @@ static struct request_context *ezusb_alloc_ctx(struct ezusb_priv *upriv, refcount_set(&ctx->refcount, 1); init_completion(&ctx->done); - setup_timer(&ctx->timer, ezusb_request_timerfn, (u_long)ctx); + timer_setup(&ctx->timer, ezusb_request_timerfn, 0); return ctx; } diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 7d6dc76c930a..6711e7fb6926 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -554,7 +554,7 @@ qtnf_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) return -EFAULT; } - mac->scan_timeout.function = (TIMER_FUNC_TYPE)qtnf_scan_timeout; + mac->scan_timeout.function = qtnf_scan_timeout; mod_timer(&mac->scan_timeout, jiffies + QTNF_SCAN_TIMEOUT_SEC * HZ); diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index 2d2c1ea65cb2..3423dc51198b 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c @@ -288,7 +288,7 @@ static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus, mac->iflist[i].vifid = i; qtnf_sta_list_init(&mac->iflist[i].sta_list); mutex_init(&mac->mac_lock); - setup_timer(&mac->scan_timeout, NULL, 0); + timer_setup(&mac->scan_timeout, NULL, 0); } qtnf_mac_init_primary_intf(mac); diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index d8afcdfca1ed..0133fcd4601b 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c @@ -569,7 +569,7 @@ static int dl_startup_params(struct net_device *dev) local->card_status = CARD_DL_PARAM; /* Start kernel timer to wait for dl startup to complete. */ local->timer.expires = jiffies + HZ / 2; - local->timer.function = (TIMER_FUNC_TYPE)verify_dl_startup; + local->timer.function = verify_dl_startup; add_timer(&local->timer); dev_dbg(&link->dev, "ray_cs dl_startup_params started timer for verify_dl_startup\n"); @@ -1947,12 +1947,12 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id) dev_dbg(&link->dev, "ray_cs interrupt network \"%s\" start failed\n", memtmp); - local->timer.function = (TIMER_FUNC_TYPE)start_net; + local->timer.function = start_net; } else { dev_dbg(&link->dev, "ray_cs interrupt network \"%s\" join failed\n", memtmp); - local->timer.function = (TIMER_FUNC_TYPE)join_net; + local->timer.function = join_net; } add_timer(&local->timer); } @@ -2417,9 +2417,9 @@ static void authenticate(ray_dev_t *local) del_timer(&local->timer); if (build_auth_frame(local, local->bss_id, OPEN_AUTH_REQUEST)) { - local->timer.function = (TIMER_FUNC_TYPE)join_net; + local->timer.function = join_net; } else { - local->timer.function = (TIMER_FUNC_TYPE)authenticate_timeout; + local->timer.function = authenticate_timeout; } local->timer.expires = jiffies + HZ * 2; add_timer(&local->timer); @@ -2502,7 +2502,7 @@ static void associate(ray_dev_t *local) del_timer(&local->timer); local->timer.expires = jiffies + HZ * 2; - local->timer.function = (TIMER_FUNC_TYPE)join_net; + local->timer.function = join_net; add_timer(&local->timer); local->card_status = CARD_ASSOC_FAILED; return; diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index c346c021b999..d47921a84509 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -196,9 +196,9 @@ out: mutex_unlock(&wl->mutex); } -static void wl1271_rx_streaming_timer(unsigned long data) +static void wl1271_rx_streaming_timer(struct timer_list *t) { - struct wl12xx_vif *wlvif = (struct wl12xx_vif *)data; + struct wl12xx_vif *wlvif = from_timer(wlvif, t, rx_streaming_timer); struct wl1271 *wl = wlvif->wl; ieee80211_queue_work(wl->hw, &wlvif->rx_streaming_disable_work); } @@ -2279,8 +2279,7 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif) wlcore_pending_auth_complete_work); INIT_LIST_HEAD(&wlvif->list); - setup_timer(&wlvif->rx_streaming_timer, wl1271_rx_streaming_timer, - (unsigned long) wlvif); + timer_setup(&wlvif->rx_streaming_timer, wl1271_rx_streaming_timer, 0); return 0; } |