]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: wilc1000: remove WILC_TimerStart()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Aug 2015 18:10:55 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Aug 2015 18:10:55 +0000 (11:10 -0700)
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>
drivers/staging/wilc1000/Makefile
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/wilc_timer.c [deleted file]
drivers/staging/wilc1000/wilc_timer.h
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index a6bfb838c431390dc551716c301a4b63f0c84edb..6be8a920706a1065534d1d0bca1cc1472618c10e 100644 (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
index bab53195edfb16efe72ea5f90fc682ef63e40557..0060b13c9d25adad3e730c8ae4af750925573860 100644 (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));
        }
 
 
diff --git a/drivers/staging/wilc1000/wilc_timer.c b/drivers/staging/wilc1000/wilc_timer.c
deleted file mode 100644 (file)
index 775e38b..0000000
+++ /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;
-}
index 925c613598d5685fc87818cf6e53c516d504fd56..dbf34e4497ecc14c3842e7b129eaf9338fbbae24 100644 (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
index c2f8d605c176aa487f82ddd8a1b4d22226b21b47..c3355c0dcd5345096258a8c4c0d0f1c2cd83910d 100644 (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*/