diff options
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_softmac.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 1e308dfd7f74..c2b9ffba354a 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -393,10 +393,10 @@ static void rtllib_send_beacon(struct rtllib_device *ieee) } -static void rtllib_send_beacon_cb(unsigned long _ieee) +static void rtllib_send_beacon_cb(struct timer_list *t) { struct rtllib_device *ieee = - (struct rtllib_device *) _ieee; + from_timer(ieee, t, beacon_timer); unsigned long flags; spin_lock_irqsave(&ieee->beacon_lock, flags); @@ -1427,9 +1427,11 @@ static void rtllib_associate_abort(struct rtllib_device *ieee) spin_unlock_irqrestore(&ieee->lock, flags); } -static void rtllib_associate_abort_cb(unsigned long dev) +static void rtllib_associate_abort_cb(struct timer_list *t) { - rtllib_associate_abort((struct rtllib_device *) dev); + struct rtllib_device *dev = from_timer(dev, t, associate_timer); + + rtllib_associate_abort(dev); } static void rtllib_associate_step1(struct rtllib_device *ieee, u8 *daddr) @@ -3012,13 +3014,9 @@ void rtllib_softmac_init(struct rtllib_device *ieee) ieee->tx_pending.txb = NULL; - setup_timer(&ieee->associate_timer, - rtllib_associate_abort_cb, - (unsigned long) ieee); + timer_setup(&ieee->associate_timer, rtllib_associate_abort_cb, 0); - setup_timer(&ieee->beacon_timer, - rtllib_send_beacon_cb, - (unsigned long) ieee); + timer_setup(&ieee->beacon_timer, rtllib_send_beacon_cb, 0); INIT_DELAYED_WORK_RSL(&ieee->link_change_wq, (void *)rtllib_link_change_wq, ieee); |