staging: wilc1000: remove WILC_TimerStart()

It was a wrapper around mod_timer() so replace it with the real timer
call and remove wilc_timer.c as it's now empty.

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>
This commit is contained in:
Greg Kroah-Hartman 2015-08-17 11:10:55 -07:00
parent 93dee8eea0
commit 9eb066438b
5 changed files with 25 additions and 48 deletions

View file

@ -27,7 +27,7 @@ ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += -DWILC_NORMAL_ALLOC
wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
wilc_memory.o wilc_msgqueue.o \
wilc_timer.o coreconfigurator.o host_interface.o \
coreconfigurator.o host_interface.o \
wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o
wilc1000-$(CONFIG_WILC1000_SDIO) += linux_wlan_sdio.o

View file

@ -2501,7 +2501,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(tstrWILC_WFIDrv *drvHandler, tstrRcvdGnrlAsy
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
PRINT_D(GENERIC_DBG, "Obtaining an IP, Disable Scan\n");
g_obtainingIP = true;
WILC_TimerStart(&hDuringIpTimer, 10000, NULL);
mod_timer(&hDuringIpTimer,
jiffies + msecs_to_jiffies(10000));
#endif
#ifdef WILC_PARSE_SCAN_IN_HOST
@ -3849,7 +3850,10 @@ static int Handle_RemainOnChan(tstrWILC_WFIDrv *drvHandler, tstrHostIfRemainOnCh
WILC_CATCH(-1)
{
P2P_LISTEN_STATE = 1;
WILC_TimerStart(&(pstrWFIDrv->hRemainOnChannel), pstrHostIfRemainOnChan->u32duration, (void *)pstrWFIDrv);
pstrWFIDrv->hRemainOnChannel.data = (unsigned long)pstrWFIDrv;
mod_timer(&pstrWFIDrv->hRemainOnChannel,
jiffies +
msecs_to_jiffies(pstrHostIfRemainOnChan->u32duration));
/*Calling CFG ready_on_channel*/
if (pstrWFIDrv->strHostIfRemainOnChan.pRemainOnChanReady)
@ -5487,7 +5491,9 @@ s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8bssid,
}
enuScanConnTimer = CONNECT_TIMER;
WILC_TimerStart(&(pstrWFIDrv->hConnectTimer), HOST_IF_CONNECT_TIMEOUT, (void *) hWFIDrv);
pstrWFIDrv->hConnectTimer.data = (unsigned long)hWFIDrv;
mod_timer(&pstrWFIDrv->hConnectTimer,
jiffies + msecs_to_jiffies(HOST_IF_CONNECT_TIMEOUT));
WILC_CATCH(s32Error)
{
@ -6220,8 +6226,9 @@ s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 u8ScanSource,
enuScanConnTimer = SCAN_TIMER;
PRINT_D(HOSTINF_DBG, ">> Starting the SCAN timer\n");
WILC_TimerStart(&(pstrWFIDrv->hScanTimer), HOST_IF_SCAN_TIMEOUT, (void *) hWFIDrv);
pstrWFIDrv->hScanTimer.data = (unsigned long)hWFIDrv;
mod_timer(&pstrWFIDrv->hScanTimer,
jiffies + msecs_to_jiffies(HOST_IF_SCAN_TIMEOUT));
WILC_CATCH(s32Error)
{
@ -6443,7 +6450,8 @@ static void GetPeriodicRSSI(unsigned long arg)
return;
}
}
WILC_TimerStart(&(g_hPeriodicRSSI), 5000, (void *)pstrWFIDrv);
g_hPeriodicRSSI.data = (unsigned long)pstrWFIDrv;
mod_timer(&g_hPeriodicRSSI, jiffies + msecs_to_jiffies(5000));
}
@ -6539,9 +6547,8 @@ s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv)
s32Error = WILC_FAIL;
goto _fail_mq_;
}
setup_timer(&g_hPeriodicRSSI, GetPeriodicRSSI, 0);
WILC_TimerStart(&(g_hPeriodicRSSI), 5000, (void *)pstrWFIDrv);
setup_timer(&g_hPeriodicRSSI, GetPeriodicRSSI, pstrWFIDrv);
mod_timer(&g_hPeriodicRSSI, jiffies + msecs_to_jiffies(5000));
}

View file

@ -1,13 +0,0 @@
#include "wilc_timer.h"
WILC_ErrNo WILC_TimerStart(struct timer_list *pHandle, u32 u32Timeout,
void *pvArg)
{
WILC_ErrNo s32RetStatus = WILC_FAIL;
if (pHandle != NULL) {
pHandle->data = (unsigned long)pvArg;
s32RetStatus = mod_timer(pHandle, (jiffies + msecs_to_jiffies(u32Timeout)));
}
return s32RetStatus;
}

View file

@ -47,24 +47,4 @@ typedef void (*tpfWILC_TimerFunction)(void *);
*/
WILC_ErrNo WILC_TimerCreate(struct timer_list *pHandle,
tpfWILC_TimerFunction pfCallback);
/*!
* @brief Starts a given timer
* @details This function will move the timer to the PENDING state until the
* given time expires (in msec) then the callback function will be
* executed (timer in EXECUTING state) after execution is dene the
* timer either goes to IDLE (if bPeriodicTimer==false) or
* PENDING with same timeout value (if bPeriodicTimer==true)
* @param[in] pHandle handle to the timer object
* @param[in] u32Timeout timeout value in msec after witch the callback
* function will be executed. Timeout value of 0 is not allowed for
* periodic timers
* @return Error code indicating sucess/failure
* @sa WILC_TimerAttrs
* @author syounan
* @date 16 Aug 2010
* @version 1.0
*/
WILC_ErrNo WILC_TimerStart(struct timer_list *pHandle, u32 u32Timeout, void *pvArg);
#endif

View file

@ -256,10 +256,12 @@ static void remove_network_from_shadow(unsigned long arg)
}
PRINT_D(CFG80211_DBG, "Number of cached networks: %d\n", u32LastScannedNtwrksCountShadow);
if (u32LastScannedNtwrksCountShadow != 0)
WILC_TimerStart(&(hAgingTimer), AGING_TIME, (void *)arg);
else
if (u32LastScannedNtwrksCountShadow != 0) {
hAgingTimer.data = arg;
mod_timer(&hAgingTimer, jiffies + msecs_to_jiffies(AGING_TIME));
} else {
PRINT_D(CFG80211_DBG, "No need to restart Aging timer\n");
}
}
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
@ -277,7 +279,8 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)
if (u32LastScannedNtwrksCountShadow == 0) {
PRINT_D(CFG80211_DBG, "Starting Aging timer\n");
WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid);
hAgingTimer.data = (unsigned long)pUserVoid;
mod_timer(&hAgingTimer, jiffies + msecs_to_jiffies(AGING_TIME));
state = -1;
} else {
/* Linear search for now */
@ -3069,7 +3072,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
g_obtainingIP = true;
WILC_TimerStart(&hDuringIpTimer, duringIP_TIME, NULL);
mod_timer(&hDuringIpTimer, jiffies + msecs_to_jiffies(duringIP_TIME));
#endif
host_int_set_power_mgmt(priv->hWILCWFIDrv, 0, 0);
/*BugID_5222*/