#include "drv_types.h"
#include "mlme_osdep.h"
-static void sitesurvey_ctrl_handler(void *FunctionContext)
+static void sitesurvey_ctrl_handler(unsigned long data)
{
- struct _adapter *adapter = (struct _adapter *)FunctionContext;
+ struct _adapter *adapter = (struct _adapter *)data;
_r8712_sitesurvey_ctrl_handler(adapter);
mod_timer(&adapter->mlmepriv.sitesurveyctrl.sitesurvey_ctrl_timer,
jiffies + msecs_to_jiffies(3000));
}
-static void join_timeout_handler (void *FunctionContext)
+static void join_timeout_handler (unsigned long data)
{
- struct _adapter *adapter = (struct _adapter *)FunctionContext;
+ struct _adapter *adapter = (struct _adapter *)data;
_r8712_join_timeout_handler(adapter);
}
-static void _scan_timeout_handler (void *FunctionContext)
+static void _scan_timeout_handler (unsigned long data)
{
- struct _adapter *adapter = (struct _adapter *)FunctionContext;
+ struct _adapter *adapter = (struct _adapter *)data;
r8712_scan_timeout_handler(adapter);
}
-static void dhcp_timeout_handler (void *FunctionContext)
+static void dhcp_timeout_handler (unsigned long data)
{
- struct _adapter *adapter = (struct _adapter *)FunctionContext;
+ struct _adapter *adapter = (struct _adapter *)data;
_r8712_dhcp_timeout_handler(adapter);
}
-static void wdg_timeout_handler (void *FunctionContext)
+static void wdg_timeout_handler (unsigned long data)
{
- struct _adapter *adapter = (struct _adapter *)FunctionContext;
+ struct _adapter *adapter = (struct _adapter *)data;
_r8712_wdg_timeout_handler(adapter);
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- _init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev,
- join_timeout_handler, (pmlmepriv->nic_hdl));
- _init_timer(&(pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer),
- padapter->pnetdev, sitesurvey_ctrl_handler,
- (u8 *)(pmlmepriv->nic_hdl));
- _init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev,
- _scan_timeout_handler, (pmlmepriv->nic_hdl));
- _init_timer(&(pmlmepriv->dhcp_timer), padapter->pnetdev,
- dhcp_timeout_handler, (u8 *)(pmlmepriv->nic_hdl));
- _init_timer(&(pmlmepriv->wdg_timer), padapter->pnetdev,
- wdg_timeout_handler, (u8 *)(pmlmepriv->nic_hdl));
+ setup_timer(&pmlmepriv->assoc_timer, join_timeout_handler,
+ (unsigned long)padapter);
+ setup_timer(&pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer,
+ sitesurvey_ctrl_handler,
+ (unsigned long)padapter);
+ setup_timer(&pmlmepriv->scan_to_timer, _scan_timeout_handler,
+ (unsigned long)padapter);
+ setup_timer(&pmlmepriv->dhcp_timer, dhcp_timeout_handler,
+ (unsigned long)padapter);
+ setup_timer(&pmlmepriv->wdg_timer, wdg_timeout_handler,
+ (unsigned long)padapter);
}
void r8712_os_indicate_connect(struct _adapter *adapter)
btkip_countermeasure;
memset((unsigned char *)&adapter->securitypriv, 0,
sizeof(struct security_priv));
- _init_timer(&(adapter->securitypriv.tkip_timer),
- adapter->pnetdev, r8712_use_tkipkey_handler,
- adapter);
+ setup_timer(&adapter->securitypriv.tkip_timer,
+ r8712_use_tkipkey_handler,
+ (unsigned long)adapter);
/* Restore the PMK information to securitypriv structure
* for the following connection. */
memcpy(&adapter->securitypriv.PMKIDList[0],
precvpriv->rx_drop++;
}
-static void _r8712_reordering_ctrl_timeout_handler (void *FunctionContext)
+static void _r8712_reordering_ctrl_timeout_handler (unsigned long data)
{
struct recv_reorder_ctrl *preorder_ctrl =
- (struct recv_reorder_ctrl *)FunctionContext;
+ (struct recv_reorder_ctrl *)data;
r8712_reordering_ctrl_timeout_handler(preorder_ctrl);
}
void r8712_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl)
{
- struct _adapter *padapter = preorder_ctrl->padapter;
-
- _init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev,
- _r8712_reordering_ctrl_timeout_handler, preorder_ctrl);
+ setup_timer(&preorder_ctrl->reordering_ctrl_timer,
+ _r8712_reordering_ctrl_timeout_handler,
+ (unsigned long)preorder_ctrl);
}
}
}
-static void rpwm_check_handler (void *FunctionContext)
+static void rpwm_check_handler (unsigned long data)
{
- struct _adapter *adapter = (struct _adapter *)FunctionContext;
+ struct _adapter *adapter = (struct _adapter *)data;
_rpwm_check_handler(adapter);
}
r8712_write8(padapter, 0x1025FE58, 0);
INIT_WORK(&pwrctrlpriv->SetPSModeWorkItem, SetPSModeWorkItemCallback);
INIT_WORK(&pwrctrlpriv->rpwm_workitem, rpwm_workitem_callback);
- _init_timer(&(pwrctrlpriv->rpwm_check_timer),
- padapter->pnetdev, rpwm_check_handler, (u8 *)padapter);
+ setup_timer(&pwrctrlpriv->rpwm_check_timer, rpwm_check_handler,
+ (unsigned long)padapter);
}
/*