]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/net/wireless/intersil/hostap/hostap_ap.c
treewide: setup_timer() -> timer_setup()
[mirror_ubuntu-hirsute-kernel.git] / drivers / net / wireless / intersil / hostap / hostap_ap.c
index 1a8d8db80b05405de0a2f1a7160c56cb2fd0fdc3..b4dfe1893d18445373e7b812931d376ebc17c65f 100644 (file)
@@ -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 */