return 0;
}
-static void bl_cmd_timeout(unsigned long priv)
+static void bl_cmd_timeout(struct timer_list *t)
{
- struct rsi_hw *adapter = (struct rsi_hw *)priv;
+ struct rsi_hw *adapter = from_timer(adapter, t, bl_cmd_timer);
adapter->blcmd_timer_expired = true;
del_timer(&adapter->bl_cmd_timer);
static int bl_start_cmd_timer(struct rsi_hw *adapter, u32 timeout)
{
- setup_timer(&adapter->bl_cmd_timer, (void *)&bl_cmd_timeout,
- (unsigned long)adapter);
+ timer_setup(&adapter->bl_cmd_timer, bl_cmd_timeout, 0);
adapter->bl_cmd_timer.expires = (msecs_to_jiffies(timeout) + jiffies);
adapter->blcmd_timer_expired = false;
}
}
-void rsi_roc_timeout(unsigned long data)
+void rsi_roc_timeout(struct timer_list *t)
{
- struct rsi_common *common = (struct rsi_common *)data;
+ struct rsi_common *common = from_timer(common, t, roc_timer);
rsi_dbg(INFO_ZONE, "Remain on channel expired\n");
rsi_default_ps_params(adapter);
spin_lock_init(&adapter->ps_lock);
- common->roc_timer.data = (unsigned long)common;
- common->roc_timer.function = (void *)&rsi_roc_timeout;
- init_timer(&common->roc_timer);
+ timer_setup(&common->roc_timer, rsi_roc_timeout, 0);
common->init_done = true;
return adapter;
int rsi_read_pkt(struct rsi_common *common, s32 rcv_pkt_len);
struct rsi_sta *rsi_find_sta(struct rsi_common *common, u8 *mac_addr);
struct ieee80211_vif *rsi_get_vif(struct rsi_hw *adapter, u8 *mac);
-void rsi_roc_timeout(unsigned long data);
+void rsi_roc_timeout(struct timer_list *t);
#endif