]> Pileus Git - ~andy/linux/commitdiff
staging: csr: remove the CsrTime typedef altogether
authorDevendra Naga <devendra.aaru@gmail.com>
Wed, 24 Oct 2012 06:33:57 +0000 (02:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 22:23:09 +0000 (15:23 -0700)
remove CsrTime typedef and replace all the users with the u32

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/csr/csr_log.h
drivers/staging/csr/csr_sched.h
drivers/staging/csr/csr_time.c
drivers/staging/csr/csr_time.h
drivers/staging/csr/csr_wifi_hip_dump.c
drivers/staging/csr/csr_wifi_hip_unifi.h
drivers/staging/csr/netdev.c
drivers/staging/csr/sme_sys.c
drivers/staging/csr/unifi_pdu_processing.c
drivers/staging/csr/unifi_priv.h

index b2808569f8de12d52ed088e90607636d1d8ca9ef..b619db69e1450d4ef3ddde6bae35dec566a5b87a 100644 (file)
@@ -201,7 +201,7 @@ void CsrLogTimedEventIn(u32 line,
     const char *file,
     CsrSchedQid task_id,
     CsrSchedTid tid,
-    CsrTime requested_delay,
+    u32 requested_delay,
     u16 fniarg,
     const void *fnvarg);
 
index cc1b8bf6607993fc2e295b0591b9d09921e517f1..e5d6ad898e020ae87edcfc311bb70682dd960b2a 100644 (file)
@@ -37,10 +37,10 @@ typedef CsrSchedIdentifier CsrSchedTid;
 typedef void (*schedEntryFunction_t)(void **inst);
 
 /* Time constants. */
-#define CSR_SCHED_TIME_MAX                ((CsrTime) 0xFFFFFFFF)
-#define CSR_SCHED_MILLISECOND             ((CsrTime) (1000))
-#define CSR_SCHED_SECOND                  ((CsrTime) (1000 * CSR_SCHED_MILLISECOND))
-#define CSR_SCHED_MINUTE                  ((CsrTime) (60 * CSR_SCHED_SECOND))
+#define CSR_SCHED_TIME_MAX                (0xFFFFFFFF)
+#define CSR_SCHED_MILLISECOND             (1000)
+#define CSR_SCHED_SECOND                  (1000 * CSR_SCHED_MILLISECOND)
+#define CSR_SCHED_MINUTE                  (60 * CSR_SCHED_SECOND)
 
 /* Queue and primitive that identifies the environment */
 #define CSR_SCHED_TASK_ID        0xFFFF
@@ -218,7 +218,7 @@ u8 CsrSchedMessageGet(u16 *pmi, void **pmv);
  *
  *----------------------------------------------------------------------------*/
 #if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
-CsrSchedTid CsrSchedTimerSetStringLog(CsrTime delay,
+CsrSchedTid CsrSchedTimerSetStringLog(u32 delay,
     void (*fn)(u16 mi, void *mv),
     u16 fniarg,
     void *fnvarg,
@@ -226,7 +226,7 @@ CsrSchedTid CsrSchedTimerSetStringLog(CsrTime delay,
     const char *file);
 #define CsrSchedTimerSet(d, fn, fni, fnv) CsrSchedTimerSetStringLog((d), (fn), (fni), (fnv), __LINE__, __FILE__)
 #else
-CsrSchedTid CsrSchedTimerSet(CsrTime delay,
+CsrSchedTid CsrSchedTimerSet(u32 delay,
     void (*fn)(u16 mi, void *mv),
     u16 fniarg,
     void *fnvarg);
index f4ff98c71cca74e1414bc4161e3d765c2f0bf563..f3f4a9c9c67a9b2e5c494582a1702311f328d367 100644 (file)
 
 #include "csr_time.h"
 
-CsrTime CsrTimeGet(CsrTime *high)
+u32 CsrTimeGet(u32 *high)
 {
        struct timespec ts;
        u64 time;
-       CsrTime low;
+       u32 low;
 
        ts = current_kernel_time();
        time = (u64) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
 
        if (high != NULL)
-               *high = (CsrTime) ((time >> 32) & 0xFFFFFFFF);
+               *high = (u32) ((time >> 32) & 0xFFFFFFFF);
 
-       low = (CsrTime) (time & 0xFFFFFFFF);
+       low = (u32) (time & 0xFFFFFFFF);
 
        return low;
 }
index d8561541901ba8d51a7c3dbbbaadc10eb42e3058..5a1d859866ef6d0aac7c9313deef33d7167a0a6b 100644 (file)
@@ -18,19 +18,6 @@ extern "C" {
 
 /*******************************************************************************
 
-NAME
-       CsrTime
-
-DESCRIPTION
-       Type to hold a value describing the current system time, which is a
-       measure of time elapsed since some arbitrarily defined fixed time
-       reference, usually associated with system startup.
-
-*******************************************************************************/
-typedef u32 CsrTime;
-
-/*******************************************************************************
-
 NAME
        CsrTimeGet
 
@@ -55,7 +42,7 @@ RETURNS
        Low part of current system time in microseconds.
 
 *******************************************************************************/
-CsrTime CsrTimeGet(CsrTime *high);
+u32 CsrTimeGet(u32 *high);
 
 
 /*------------------------------------------------------------------*/
index d67b460e7a85db730cab0ef51880a972cda81ac2..f752359029194ffe7c11da7daef7faa03cee7126 100644 (file)
@@ -40,7 +40,7 @@
 typedef struct coredump_buf
 {
     u16  count;                       /* serial number of dump */
-    CsrTime    timestamp;                   /* host's system time at capture */
+    u32  timestamp;                   /* host's system time at capture */
     s16   requestor;                   /* request: 0=auto dump, 1=manual */
     u16  chip_ver;
     u32  fw_ver;
@@ -192,7 +192,7 @@ CsrResult unifi_coredump_capture(card_t *card, struct unifi_coredump_req *req)
 {
     CsrResult r = CSR_RESULT_SUCCESS;
     static u16 dump_seq_no = 1;
-    CsrTime time_of_capture;
+    u32 time_of_capture;
 
     func_enter();
 
index 2923e2ef12f2a107175b9d5c92bc688a5060eddf..9042efac610a9ea7c346a0fc5bfb42bf7debb99b 100644 (file)
@@ -228,7 +228,7 @@ typedef struct unifi_coredump_req
     u32 chip_ver;                 /* Chip version */
     u32 fw_ver;                   /* Firmware version */
     s32  requestor;                /* Requestor: 0=auto dump, 1=manual */
-    CsrTime   timestamp;                /* time of capture by driver */
+    u32 timestamp;                /* time of capture by driver */
     u32 serial;                   /* capture serial number */
     s32  value;                    /* register value */
 } unifi_coredump_req_t;                 /* mini-coredumped reg value request */
index 8a5317159f82f67573aa1a3c576476cb2e67b164..113f2c189a67aa12e6e4cc3febfb6425f3bdc1ec 100644 (file)
@@ -3246,8 +3246,8 @@ static void check_ba_frame_age_timeout( unifi_priv_t *priv,
                                         netInterface_priv_t *interfacePriv,
                                         ba_session_rx_struct *ba_session)
 {
-    CsrTime now;
-    CsrTime age;
+    u32 now;
+    u32 age;
     u8 i, j;
     u16 sn_temp;
 
@@ -3282,11 +3282,11 @@ static void check_ba_frame_age_timeout( unifi_priv_t *priv,
                 if (ba_session->buffer[i].recv_time > now)
                 {
                     /* timer wrap */
-                    age = CsrTimeAdd((CsrTime)CsrTimeSub(CSR_SCHED_TIME_MAX, ba_session->buffer[i].recv_time), now);
+                    age = CsrTimeAdd((u32)CsrTimeSub(CSR_SCHED_TIME_MAX, ba_session->buffer[i].recv_time), now);
                 }
                 else
                 {
-                    age = (CsrTime)CsrTimeSub(now, ba_session->buffer[i].recv_time);
+                    age = (u32)CsrTimeSub(now, ba_session->buffer[i].recv_time);
                 }
 
                 if (age >= CSR_WIFI_BA_MPDU_FRAME_AGE_TIMEOUT)
index 90a30dc1c00cbf80c08abad8b781aa0b111241e5..9c5ca3a9261f139ac684a14bbad3f64ce93ee3ec 100644 (file)
@@ -2101,7 +2101,7 @@ static int peer_add_new_record(unifi_priv_t *priv,CsrWifiRouterCtrlPeerAddReq *r
     u8 freeSlotFound = FALSE;
     CsrWifiRouterCtrlStaInfo_t *newRecord = NULL;
     netInterface_priv_t *interfacePriv = priv->interfacePriv[req->interfaceTag];
-    CsrTime currentTime, currentTimeHi;
+    u32 currentTime, currentTimeHi;
     unsigned long lock_flags;
 
     if (req->interfaceTag >= CSR_WIFI_NUM_INTERFACES) {
@@ -2295,8 +2295,8 @@ static void check_inactivity_timer_expire_func(unsigned long data)
     struct unifi_priv *priv;
     CsrWifiRouterCtrlStaInfo_t *sta_record = NULL;
     u8 i = 0;
-    CsrTime now;
-    CsrTime inactive_time;
+    u32 now;
+    u32 inactive_time;
     netInterface_priv_t *interfacePriv = (netInterface_priv_t *) data;
 
     if (!interfacePriv)
@@ -2328,11 +2328,11 @@ static void check_inactivity_timer_expire_func(unsigned long data)
             if (sta_record->lastActivity > now)
             {
                 /* simple timer wrap (for 1 wrap) */
-                inactive_time = CsrTimeAdd((CsrTime)CsrTimeSub(CSR_SCHED_TIME_MAX, sta_record->lastActivity), now);
+                inactive_time = CsrTimeAdd((u32)CsrTimeSub(CSR_SCHED_TIME_MAX, sta_record->lastActivity), now);
             }
             else
             {
-                inactive_time = (CsrTime)CsrTimeSub(now, sta_record->lastActivity);
+                inactive_time = (u32)CsrTimeSub(now, sta_record->lastActivity);
             }
 
             if (inactive_time >= STA_INACTIVE_TIMEOUT_VAL)
index a762939a6ac3f1bba7c9cb65acf12ecc17b4b02b..8f21d98dff2d622515b5056cc95880b02107418c 100644 (file)
@@ -1116,8 +1116,8 @@ void uf_process_ma_pkt_cfm_for_ap(unifi_priv_t *priv,u16 interfaceTag, const CSR
             staRecord->nullDataHostTag = INVALID_HOST_TAG;
 
             if(pkt_cfm->TransmissionStatus == CSR_TX_RETRY_LIMIT){
-                CsrTime now;
-                CsrTime inactive_time;
+                u32 now;
+                u32 inactive_time;
 
                 unifi_trace(priv, UDBG1, "Nulldata to probe STA ALIVE Failed with retry limit\n");
                 /* Recheck if there is some activity after null data is sent.
@@ -1133,12 +1133,12 @@ void uf_process_ma_pkt_cfm_for_ap(unifi_priv_t *priv,u16 interfaceTag, const CSR
                 if (staRecord->lastActivity > now)
                 {
                     /* simple timer wrap (for 1 wrap) */
-                    inactive_time = CsrTimeAdd((CsrTime)CsrTimeSub(CSR_SCHED_TIME_MAX, staRecord->lastActivity),
+                    inactive_time = CsrTimeAdd((u32)CsrTimeSub(CSR_SCHED_TIME_MAX, staRecord->lastActivity),
                                                now);
                 }
                 else
                 {
-                    inactive_time = (CsrTime)CsrTimeSub(now, staRecord->lastActivity);
+                    inactive_time = (u32)CsrTimeSub(now, staRecord->lastActivity);
                 }
 
                 if (inactive_time >= STA_INACTIVE_TIMEOUT_VAL)
@@ -3491,11 +3491,11 @@ CsrWifiRouterCtrlStaInfo_t * CsrWifiRouterCtrlGetStationRecordFromHandle(unifi_p
 }
 
 /* Function to do inactivity */
-void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, CsrTime currentTime)
+void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, u32 currentTime)
 {
     u32 i;
     CsrWifiRouterCtrlStaInfo_t *staInfo;
-    CsrTime elapsedTime;    /* Time in microseconds */
+    u32 elapsedTime;    /* Time in microseconds */
     netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
     CsrWifiMacAddress peerMacAddress;
     unsigned long lock_flags;
@@ -3542,8 +3542,8 @@ void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, CsrTime currentTi
 /* Function to update activity of a station */
 void uf_update_sta_activity(unifi_priv_t *priv, u16 interfaceTag, const u8 *peerMacAddress)
 {
-    CsrTime elapsedTime, currentTime;    /* Time in microseconds */
-    CsrTime timeHi;         /* Not used - Time in microseconds */
+    u32 elapsedTime, currentTime;    /* Time in microseconds */
+    u32 timeHi;         /* Not used - Time in microseconds */
     CsrWifiRouterCtrlStaInfo_t *staInfo;
     netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
     unsigned long lock_flags;
index f25b92ab4e2cd40d08b9d151807c54cb606ed8b5..d20d74ce56cbb42f28e5401f78fa1c53ee0efd3a 100644 (file)
@@ -312,7 +312,7 @@ typedef struct CsrWifiRouterCtrlStaInfo_t {
     CSR_CLIENT_TAG nullDataHostTag;
 
     /* Activity timestamps for the station */
-    CsrTime lastActivity;
+    u32 lastActivity;
 
     /* during m/c transmission sp suspended */
     u8 uspSuspend;
@@ -652,7 +652,7 @@ typedef struct {
     bulk_data_param_t bulkdata;
     CSR_SIGNAL signal;
     u16 sn;
-    CsrTime recv_time;
+    u32 recv_time;
 } frame_desc_struct;
 
 typedef struct {
@@ -735,7 +735,7 @@ typedef struct netInterface_priv
     u8 sta_activity_check_enabled;
 
     /* Timestamp when the last inactivity check was done */
-    CsrTime last_inactivity_check;
+    u32 last_inactivity_check;
 
     /*number of multicast or borad cast packets  queued*/
     u16 noOfbroadcastPktQueued;