staging: csr: remove the CsrTime typedef altogether
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>
This commit is contained in:
parent
cf7d9b4231
commit
aad3d31fdf
10 changed files with 35 additions and 48 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue