From: Greg Kroah-Hartman Date: Mon, 17 Aug 2015 18:10:55 +0000 (-0700) Subject: staging: wilc1000: remove WILC_TimerStart() X-Git-Tag: firefly_0821_release~176^2~1221^2~15 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9eb066438b01bc70ef915987f881d3e57e698a30;p=firefly-linux-kernel-4.4.55.git 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 Cc: Rachel Kim Cc: Dean Lee Cc: Chris Park Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index a6bfb838c431..6be8a920706a 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -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 diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index bab53195edfb..0060b13c9d25 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -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)); } diff --git a/drivers/staging/wilc1000/wilc_timer.c b/drivers/staging/wilc1000/wilc_timer.c deleted file mode 100644 index 775e38bda944..000000000000 --- a/drivers/staging/wilc1000/wilc_timer.c +++ /dev/null @@ -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; -} diff --git a/drivers/staging/wilc1000/wilc_timer.h b/drivers/staging/wilc1000/wilc_timer.h index 925c613598d5..dbf34e4497ec 100644 --- a/drivers/staging/wilc1000/wilc_timer.h +++ b/drivers/staging/wilc1000/wilc_timer.h @@ -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 diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index c2f8d605c176..c3355c0dcd53 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -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*/