It was just a wrapper around setup_timer() and could never fail, so just
call the real function, and fix up the function arguments of the
callbacks to be proper timer callback functions.
Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* @date
* @version 1.0
*/
* @date
* @version 1.0
*/
-static void ListenTimerCB(void *pvArg)
+static void ListenTimerCB(unsigned long arg)
{
s32 s32Error = WILC_SUCCESS;
tstrHostIFmsg strHostIFmsg;
{
s32 s32Error = WILC_SUCCESS;
tstrHostIFmsg strHostIFmsg;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)pvArg;
+ tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)arg;
/*Stopping remain-on-channel timer*/
del_timer(&pstrWFIDrv->hRemainOnChannel);
/*Stopping remain-on-channel timer*/
del_timer(&pstrWFIDrv->hRemainOnChannel);
-static void TimerCB_Scan(void *pvArg)
+static void TimerCB_Scan(unsigned long arg)
+ void *pvArg = (void *)arg;
tstrHostIFmsg strHostIFmsg;
/* prepare the Timer Callback message */
tstrHostIFmsg strHostIFmsg;
/* prepare the Timer Callback message */
WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL);
}
WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL);
}
-static void TimerCB_Connect(void *pvArg)
+static void TimerCB_Connect(unsigned long arg)
+ void *pvArg = (void *)arg;
tstrHostIFmsg strHostIFmsg;
/* prepare the Timer Callback message */
tstrHostIFmsg strHostIFmsg;
/* prepare the Timer Callback message */
-void GetPeriodicRSSI(void *pvArg)
+static void GetPeriodicRSSI(unsigned long arg)
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)pvArg;
+ tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)arg;
if (pstrWFIDrv == NULL) {
PRINT_ER("Driver handler is NULL\n");
if (pstrWFIDrv == NULL) {
PRINT_ER("Driver handler is NULL\n");
s32Error = WILC_FAIL;
goto _fail_mq_;
}
s32Error = WILC_FAIL;
goto _fail_mq_;
}
- s32Error = WILC_TimerCreate(&(g_hPeriodicRSSI), GetPeriodicRSSI);
- if (s32Error < 0) {
- PRINT_ER("Failed to creat Timer\n");
- goto _fail_timer_1;
- }
+ setup_timer(&g_hPeriodicRSSI, GetPeriodicRSSI, 0);
WILC_TimerStart(&(g_hPeriodicRSSI), 5000, (void *)pstrWFIDrv);
}
WILC_TimerStart(&(g_hPeriodicRSSI), 5000, (void *)pstrWFIDrv);
}
- s32Error = WILC_TimerCreate(&(pstrWFIDrv->hScanTimer), TimerCB_Scan);
- if (s32Error < 0) {
- PRINT_ER("Failed to creat Timer\n");
- goto _fail_thread_;
- }
-
- s32Error = WILC_TimerCreate(&(pstrWFIDrv->hConnectTimer), TimerCB_Connect);
- if (s32Error < 0) {
- PRINT_ER("Failed to creat Timer\n");
- goto _fail_timer_1;
- }
+ setup_timer(&pstrWFIDrv->hScanTimer, TimerCB_Scan, 0);
+ setup_timer(&pstrWFIDrv->hConnectTimer, TimerCB_Connect, 0);
#ifdef WILC_P2P
/*Remain on channel timer*/
#ifdef WILC_P2P
/*Remain on channel timer*/
- s32Error = WILC_TimerCreate(&(pstrWFIDrv->hRemainOnChannel), ListenTimerCB);
- if (s32Error < 0) {
- PRINT_ER("Failed to creat Remain-on-channel Timer\n");
- goto _fail_timer_3;
- }
+ setup_timer(&pstrWFIDrv->hRemainOnChannel, ListenTimerCB, 0);
#endif
sema_init(&(pstrWFIDrv->gtOsCfgValuesSem), 1);
#endif
sema_init(&(pstrWFIDrv->gtOsCfgValuesSem), 1);
if (pstrWFIDrv != NULL)
kfree(pstrWFIDrv);
#ifdef WILC_P2P
if (pstrWFIDrv != NULL)
kfree(pstrWFIDrv);
#ifdef WILC_P2P
del_timer_sync(&pstrWFIDrv->hRemainOnChannel);
#endif
_fail_timer_2:
up(&(pstrWFIDrv->gtOsCfgValuesSem));
del_timer_sync(&pstrWFIDrv->hConnectTimer);
del_timer_sync(&pstrWFIDrv->hRemainOnChannel);
#endif
_fail_timer_2:
up(&(pstrWFIDrv->gtOsCfgValuesSem));
del_timer_sync(&pstrWFIDrv->hConnectTimer);
del_timer_sync(&pstrWFIDrv->hScanTimer);
del_timer_sync(&pstrWFIDrv->hScanTimer);
kthread_stop(HostIFthreadHandler);
_fail_mq_:
WILC_MsgQueueDestroy(&gMsgQHostIF, NULL);
kthread_stop(HostIFthreadHandler);
_fail_mq_:
WILC_MsgQueueDestroy(&gMsgQHostIF, NULL);
-WILC_ErrNo WILC_TimerCreate(struct timer_list *pHandle,
- tpfWILC_TimerFunction pfCallback)
-{
- WILC_ErrNo s32RetStatus = WILC_SUCCESS;
- setup_timer(pHandle, (void(*)(unsigned long))pfCallback, 0);
-
- return s32RetStatus;
-}
-
WILC_ErrNo WILC_TimerStart(struct timer_list *pHandle, u32 u32Timeout,
void *pvArg)
{
WILC_ErrNo WILC_TimerStart(struct timer_list *pHandle, u32 u32Timeout,
void *pvArg)
{
-void remove_network_from_shadow(void *pUserVoid)
+static void remove_network_from_shadow(unsigned long arg)
{
unsigned long now = jiffies;
int i, j;
{
unsigned long now = jiffies;
int i, j;
PRINT_D(CFG80211_DBG, "Number of cached networks: %d\n", u32LastScannedNtwrksCountShadow);
if (u32LastScannedNtwrksCountShadow != 0)
PRINT_D(CFG80211_DBG, "Number of cached networks: %d\n", u32LastScannedNtwrksCountShadow);
if (u32LastScannedNtwrksCountShadow != 0)
- WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid);
+ WILC_TimerStart(&(hAgingTimer), AGING_TIME, (void *)arg);
else
PRINT_D(CFG80211_DBG, "No need to restart Aging timer\n");
}
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
else
PRINT_D(CFG80211_DBG, "No need to restart Aging timer\n");
}
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
-void clear_duringIP(void *pUserVoid)
+static void clear_duringIP(unsigned long arg)
{
PRINT_D(GENERIC_DBG, "GO:IP Obtained , enable scan\n");
g_obtainingIP = false;
{
PRINT_D(GENERIC_DBG, "GO:IP Obtained , enable scan\n");
g_obtainingIP = false;
PRINT_D(INIT_DBG, "Host[%p][%p]\n", net, net->ieee80211_ptr);
priv = wdev_priv(net->ieee80211_ptr);
if (op_ifcs == 0) {
PRINT_D(INIT_DBG, "Host[%p][%p]\n", net, net->ieee80211_ptr);
priv = wdev_priv(net->ieee80211_ptr);
if (op_ifcs == 0) {
- s32Error = WILC_TimerCreate(&(hAgingTimer), remove_network_from_shadow);
+ setup_timer(&hAgingTimer, remove_network_from_shadow, 0);
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
- s32Error = WILC_TimerCreate(&(hDuringIpTimer), clear_duringIP);
+ setup_timer(&hDuringIpTimer, clear_duringIP, 0);