Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx> --- drivers/staging/csr/csr_log.h | 2 +- drivers/staging/csr/csr_sched.h | 12 ++++++------ drivers/staging/csr/csr_time.c | 8 ++++---- drivers/staging/csr/csr_time.h | 15 +-------------- drivers/staging/csr/csr_wifi_hip_dump.c | 8 ++++---- drivers/staging/csr/csr_wifi_hip_unifi.h | 2 +- drivers/staging/csr/netdev.c | 8 ++++---- drivers/staging/csr/sme_sys.c | 10 +++++----- drivers/staging/csr/unifi_pdu_processing.c | 16 ++++++++-------- drivers/staging/csr/unifi_priv.h | 6 +++--- 10 files changed, 37 insertions(+), 50 deletions(-) diff --git a/drivers/staging/csr/csr_log.h b/drivers/staging/csr/csr_log.h index b280856..b619db6 100644 --- a/drivers/staging/csr/csr_log.h +++ b/drivers/staging/csr/csr_log.h @@ -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); diff --git a/drivers/staging/csr/csr_sched.h b/drivers/staging/csr/csr_sched.h index cc1b8bf..e5d6ad8 100644 --- a/drivers/staging/csr/csr_sched.h +++ b/drivers/staging/csr/csr_sched.h @@ -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); diff --git a/drivers/staging/csr/csr_time.c b/drivers/staging/csr/csr_time.c index f4ff98c..f3f4a9c 100644 --- a/drivers/staging/csr/csr_time.c +++ b/drivers/staging/csr/csr_time.c @@ -14,19 +14,19 @@ #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; } diff --git a/drivers/staging/csr/csr_time.h b/drivers/staging/csr/csr_time.h index d856154..5a1d859 100644 --- a/drivers/staging/csr/csr_time.h +++ b/drivers/staging/csr/csr_time.h @@ -19,19 +19,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 DESCRIPTION @@ -55,7 +42,7 @@ RETURNS Low part of current system time in microseconds. *******************************************************************************/ -CsrTime CsrTimeGet(CsrTime *high); +u32 CsrTimeGet(u32 *high); /*------------------------------------------------------------------*/ diff --git a/drivers/staging/csr/csr_wifi_hip_dump.c b/drivers/staging/csr/csr_wifi_hip_dump.c index d67b460..8ceb70e 100644 --- a/drivers/staging/csr/csr_wifi_hip_dump.c +++ b/drivers/staging/csr/csr_wifi_hip_dump.c @@ -40,11 +40,11 @@ typedef struct coredump_buf { u16 count; /* serial number of dump */ - CsrTime timestamp; /* host's system time at capture */ - s16 requestor; /* request: 0=auto dump, 1=manual */ + u32 timestamp; /* host's system time at capture */ + s16 requestor; /* request: 0=auto dump, 1=manual */ u16 chip_ver; u32 fw_ver; - u16 *zone[HIP_CDUMP_NUM_ZONES]; + u16 *zone[HIP_CDUMP_NUM_ZONES]; struct coredump_buf *next; /* circular list */ struct coredump_buf *prev; /* circular list */ @@ -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(); diff --git a/drivers/staging/csr/csr_wifi_hip_unifi.h b/drivers/staging/csr/csr_wifi_hip_unifi.h index 2923e2ef..9042efa 100644 --- a/drivers/staging/csr/csr_wifi_hip_unifi.h +++ b/drivers/staging/csr/csr_wifi_hip_unifi.h @@ -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 */ diff --git a/drivers/staging/csr/netdev.c b/drivers/staging/csr/netdev.c index 8a53171..113f2c1 100644 --- a/drivers/staging/csr/netdev.c +++ b/drivers/staging/csr/netdev.c @@ -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) diff --git a/drivers/staging/csr/sme_sys.c b/drivers/staging/csr/sme_sys.c index 90a30dc..9c5ca3a 100644 --- a/drivers/staging/csr/sme_sys.c +++ b/drivers/staging/csr/sme_sys.c @@ -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) diff --git a/drivers/staging/csr/unifi_pdu_processing.c b/drivers/staging/csr/unifi_pdu_processing.c index a762939..8f21d98 100644 --- a/drivers/staging/csr/unifi_pdu_processing.c +++ b/drivers/staging/csr/unifi_pdu_processing.c @@ -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; diff --git a/drivers/staging/csr/unifi_priv.h b/drivers/staging/csr/unifi_priv.h index f25b92a..d20d74c 100644 --- a/drivers/staging/csr/unifi_priv.h +++ b/drivers/staging/csr/unifi_priv.h @@ -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; -- 1.7.9.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel