mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 13:13:57 +08:00
staging: csr: remove CsrInt16 typedef
Use the in-kernel s16 type instead. Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8c87f69acf
commit
ab2b8c7383
drivers/staging/csr
csr_types.hcsr_util.ccsr_wifi_hip_card.hcsr_wifi_hip_card_sdio.ccsr_wifi_hip_card_sdio.hcsr_wifi_hip_card_sdio_intr.ccsr_wifi_hip_card_sdio_mem.ccsr_wifi_hip_download.ccsr_wifi_hip_dump.ccsr_wifi_hip_packing.ccsr_wifi_hip_send.ccsr_wifi_hip_sigs.hcsr_wifi_hip_ta_sampling.ccsr_wifi_hip_unifi_signal_names.ccsr_wifi_hip_xbv.ccsr_wifi_hip_xbv.hcsr_wifi_router_prim.hcsr_wifi_router_serialize.ccsr_wifi_sme_prim.hcsr_wifi_sme_serialize.csme_sys.cunifi_event.c
@ -36,7 +36,6 @@ typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the eq
|
||||
typedef uint32_t CsrUint32;
|
||||
|
||||
/* Signed fixed width types */
|
||||
typedef int16_t CsrInt16;
|
||||
typedef int32_t CsrInt32;
|
||||
|
||||
/* Boolean */
|
||||
|
@ -326,7 +326,7 @@ CsrCharString *CsrStrNCpyZero(CsrCharString *dest,
|
||||
/* Convert string with base 10 to integer */
|
||||
CsrUint32 CsrStrToInt(const CsrCharString *str)
|
||||
{
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
CsrUint32 res;
|
||||
CsrUint32 digit;
|
||||
|
||||
|
@ -79,7 +79,7 @@ CsrResult CardWriteBulkData(card_t *card, card_signal_t *csptr, unifi_TrafficQue
|
||||
/*****************************************************************************
|
||||
* CardClearFromHostDataSlot -
|
||||
*/
|
||||
void CardClearFromHostDataSlot(card_t *card, const CsrInt16 aSlotNum);
|
||||
void CardClearFromHostDataSlot(card_t *card, const s16 aSlotNum);
|
||||
|
||||
#ifdef CSR_WIFI_REQUEUE_PACKET_TO_HAL
|
||||
/*****************************************************************************
|
||||
@ -87,7 +87,7 @@ void CardClearFromHostDataSlot(card_t *card, const CsrInt16 aSlotNum);
|
||||
* without freeing the bulk data
|
||||
*/
|
||||
|
||||
void CardClearFromHostDataSlotWithoutFreeingBulkData(card_t *card, const CsrInt16 aSlotNum);
|
||||
void CardClearFromHostDataSlotWithoutFreeingBulkData(card_t *card, const s16 aSlotNum);
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -512,7 +512,7 @@ static CsrResult unifi_hip_init(card_t *card)
|
||||
static void _build_sdio_config_data(sdio_config_data_t *cfg_data,
|
||||
const u8 *cfg_data_buf)
|
||||
{
|
||||
CsrInt16 offset = 0;
|
||||
s16 offset = 0;
|
||||
|
||||
cfg_data->version = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(cfg_data_buf + offset);
|
||||
offset += SIZEOF_UINT16;
|
||||
@ -606,8 +606,8 @@ static CsrResult card_hw_init(card_t *card)
|
||||
u8 cfg_data_buf[SDIO_CONFIG_DATA_SIZE];
|
||||
CsrResult r;
|
||||
void *dlpriv;
|
||||
CsrInt16 major, minor;
|
||||
CsrInt16 search_4slut_again;
|
||||
s16 major, minor;
|
||||
s16 search_4slut_again;
|
||||
CsrResult csrResult;
|
||||
|
||||
func_enter();
|
||||
@ -1000,7 +1000,7 @@ static CsrResult card_hw_init(card_t *card)
|
||||
*/
|
||||
static CsrResult card_wait_for_unifi_to_reset(card_t *card)
|
||||
{
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
CsrResult r;
|
||||
u8 io_enable;
|
||||
CsrResult csrResult;
|
||||
@ -1052,7 +1052,7 @@ static CsrResult card_wait_for_unifi_to_reset(card_t *card)
|
||||
if (r == CSR_RESULT_SUCCESS)
|
||||
{
|
||||
u16 mbox2;
|
||||
CsrInt16 enabled = io_enable & (1 << card->function);
|
||||
s16 enabled = io_enable & (1 << card->function);
|
||||
|
||||
if (!enabled)
|
||||
{
|
||||
@ -1132,7 +1132,7 @@ static CsrResult card_wait_for_unifi_to_reset(card_t *card)
|
||||
*/
|
||||
static CsrResult card_wait_for_unifi_to_disable(card_t *card)
|
||||
{
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
CsrResult r;
|
||||
u8 io_enable;
|
||||
CsrResult csrResult;
|
||||
@ -1178,7 +1178,7 @@ static CsrResult card_wait_for_unifi_to_disable(card_t *card)
|
||||
}
|
||||
if (csrResult == CSR_RESULT_SUCCESS)
|
||||
{
|
||||
CsrInt16 enabled = io_enable & (1 << card->function);
|
||||
s16 enabled = io_enable & (1 << card->function);
|
||||
r = CSR_RESULT_SUCCESS;
|
||||
if (!enabled)
|
||||
{
|
||||
@ -1605,7 +1605,7 @@ void unifi_read_panic(card_t *card)
|
||||
*/
|
||||
static CsrResult card_allocate_memory_resources(card_t *card)
|
||||
{
|
||||
CsrInt16 n, i, k, r;
|
||||
s16 n, i, k, r;
|
||||
sdio_config_data_t *cfg_data;
|
||||
|
||||
func_enter();
|
||||
@ -1837,7 +1837,7 @@ static void card_free_memory_resources(card_t *card)
|
||||
|
||||
static void card_init_soft_queues(card_t *card)
|
||||
{
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
|
||||
func_enter();
|
||||
|
||||
@ -1876,7 +1876,7 @@ static void card_init_soft_queues(card_t *card)
|
||||
*/
|
||||
void unifi_cancel_pending_signals(card_t *card)
|
||||
{
|
||||
CsrInt16 i, n, r;
|
||||
s16 i, n, r;
|
||||
func_enter();
|
||||
|
||||
unifi_trace(card->ospriv, UDBG1, "Canceling pending signals.\n");
|
||||
@ -2059,7 +2059,7 @@ static CsrResult card_init_slots(card_t *card)
|
||||
func_exit_r(r);
|
||||
return r;
|
||||
}
|
||||
card->from_host_signals_w = (CsrInt16)s;
|
||||
card->from_host_signals_w = (s16)s;
|
||||
|
||||
/* Get the to-host-signals-written count */
|
||||
r = unifi_card_read16(card, card->sdio_ctrl_addr + 6, &s);
|
||||
@ -2073,7 +2073,7 @@ static CsrResult card_init_slots(card_t *card)
|
||||
func_exit_r(r);
|
||||
return r;
|
||||
}
|
||||
card->to_host_signals_r = (CsrInt16)s;
|
||||
card->to_host_signals_r = (s16)s;
|
||||
}
|
||||
|
||||
/* Set Initialised flag. */
|
||||
@ -2350,7 +2350,7 @@ static void CardCheckDynamicReservation(card_t *card, unifi_TrafficQueue queue)
|
||||
* None.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
void CardClearFromHostDataSlot(card_t *card, const CsrInt16 slot)
|
||||
void CardClearFromHostDataSlot(card_t *card, const s16 slot)
|
||||
{
|
||||
u8 queue = card->from_host_data[slot].queue;
|
||||
const void *os_data_ptr = card->from_host_data[slot].bd.os_data_ptr;
|
||||
@ -2417,7 +2417,7 @@ void CardClearFromHostDataSlot(card_t *card, const CsrInt16 slot)
|
||||
* None.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
void CardClearFromHostDataSlotWithoutFreeingBulkData(card_t *card, const CsrInt16 slot)
|
||||
void CardClearFromHostDataSlotWithoutFreeingBulkData(card_t *card, const s16 slot)
|
||||
{
|
||||
u8 queue = card->from_host_data[slot].queue;
|
||||
|
||||
@ -3405,7 +3405,7 @@ CsrResult CardWriteBulkData(card_t *card, card_signal_t *csptr, unifi_TrafficQue
|
||||
u16 i, slots[UNIFI_MAX_DATA_REFERENCES], j = 0;
|
||||
u8 *packed_sigptr, num_slots_required = 0;
|
||||
bulk_data_desc_t *bulkdata = csptr->bulkdata;
|
||||
CsrInt16 h, nslots;
|
||||
s16 h, nslots;
|
||||
|
||||
func_enter();
|
||||
|
||||
@ -3562,9 +3562,9 @@ CsrResult CardWriteBulkData(card_t *card, card_signal_t *csptr, unifi_TrafficQue
|
||||
* Pointer to entry in bulk_data_slot array.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
bulk_data_desc_t* card_find_data_slot(card_t *card, CsrInt16 slot)
|
||||
bulk_data_desc_t* card_find_data_slot(card_t *card, s16 slot)
|
||||
{
|
||||
CsrInt16 sn;
|
||||
s16 sn;
|
||||
bulk_data_desc_t *bd;
|
||||
|
||||
sn = slot & 0x7FFF;
|
||||
@ -3705,7 +3705,7 @@ CsrResult unifi_card_stop_processor(card_t *card, enum unifi_dbg_processors_sele
|
||||
{
|
||||
CsrResult r = CSR_RESULT_SUCCESS;
|
||||
u8 status;
|
||||
CsrInt16 retry = 100;
|
||||
s16 retry = 100;
|
||||
|
||||
while (retry--)
|
||||
{
|
||||
@ -4103,7 +4103,7 @@ CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status)
|
||||
void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo)
|
||||
{
|
||||
CsrInt32 count_fhr;
|
||||
CsrInt16 t;
|
||||
s16 t;
|
||||
CsrUint32 occupied_fh;
|
||||
|
||||
q_t *sigq;
|
||||
|
@ -532,7 +532,7 @@ struct card
|
||||
* This is an optimisation that starts searching at a more likely point
|
||||
* than the beginning.
|
||||
*/
|
||||
CsrInt16 from_host_data_head;
|
||||
s16 from_host_data_head;
|
||||
|
||||
/* Dynamic slot allocation for queues */
|
||||
card_dynamic_slot_t dynamic_slot_data;
|
||||
@ -577,7 +577,7 @@ struct card
|
||||
#endif
|
||||
|
||||
/* Auto-coredump */
|
||||
CsrInt16 request_coredump_on_reset; /* request coredump on next reset */
|
||||
s16 request_coredump_on_reset; /* request coredump on next reset */
|
||||
struct coredump_buf *dump_buf; /* root node */
|
||||
struct coredump_buf *dump_next_write; /* node to fill at next dump */
|
||||
struct coredump_buf *dump_cur_read; /* valid node to read, or NULL */
|
||||
@ -654,7 +654,7 @@ CsrResult unifi_set_host_state(card_t *card, enum unifi_host_state state);
|
||||
|
||||
CsrResult unifi_set_proc_select(card_t *card, enum unifi_dbg_processors_select select);
|
||||
CsrInt32 card_read_signal_counts(card_t *card);
|
||||
bulk_data_desc_t* card_find_data_slot(card_t *card, CsrInt16 slot);
|
||||
bulk_data_desc_t* card_find_data_slot(card_t *card, s16 slot);
|
||||
|
||||
|
||||
CsrResult unifi_read32(card_t *card, CsrUint32 unifi_addr, CsrUint32 *pdata);
|
||||
@ -665,9 +665,9 @@ CsrInt32 unifi_read_shared_count(card_t *card, CsrUint32 addr);
|
||||
CsrResult unifi_writen(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len);
|
||||
|
||||
CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle,
|
||||
void *pdata, CsrUint32 len, CsrInt16 direction);
|
||||
void *pdata, CsrUint32 len, s16 direction);
|
||||
CsrResult unifi_bulk_rw_noretry(card_t *card, CsrUint32 handle,
|
||||
void *pdata, CsrUint32 len, CsrInt16 direction);
|
||||
void *pdata, CsrUint32 len, s16 direction);
|
||||
#define UNIFI_SDIO_READ 0
|
||||
#define UNIFI_SDIO_WRITE 1
|
||||
|
||||
|
@ -54,7 +54,7 @@ static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed);
|
||||
|
||||
static CsrResult process_bulk_data_command(card_t *card,
|
||||
const u8 *cmdptr,
|
||||
CsrInt16 cmd, u16 len);
|
||||
s16 cmd, u16 len);
|
||||
static CsrResult process_clear_slot_command(card_t *card,
|
||||
const u8 *cmdptr);
|
||||
static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed);
|
||||
@ -63,7 +63,7 @@ static void restart_packet_flow(card_t *card);
|
||||
static CsrResult process_clock_request(card_t *card);
|
||||
|
||||
#ifdef CSR_WIFI_HIP_NOISY
|
||||
CsrInt16 dump_fh_buf = 0;
|
||||
s16 dump_fh_buf = 0;
|
||||
#endif /* CSR_WIFI_HIP_NOISY */
|
||||
|
||||
#ifdef CSR_WIFI_HIP_DEBUG_OFFLINE
|
||||
@ -1054,7 +1054,7 @@ static CsrResult read_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
* CSR_RESULT_SUCCESS on success or CSR error code
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrResult update_to_host_signals_r(card_t *card, CsrInt16 pending)
|
||||
static CsrResult update_to_host_signals_r(card_t *card, s16 pending)
|
||||
{
|
||||
CsrResult r;
|
||||
|
||||
@ -1100,7 +1100,7 @@ static CsrResult update_to_host_signals_r(card_t *card, CsrInt16 pending)
|
||||
*/
|
||||
static void read_unpack_cmd(const u8 *ptr, bulk_data_cmd_t *bulk_data_cmd)
|
||||
{
|
||||
CsrInt16 index = 0;
|
||||
s16 index = 0;
|
||||
bulk_data_cmd->cmd_and_len = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(ptr + index);
|
||||
index += SIZEOF_UINT16;
|
||||
bulk_data_cmd->data_slot = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(ptr + index);
|
||||
@ -1145,13 +1145,13 @@ static void read_unpack_cmd(const u8 *ptr, bulk_data_cmd_t *bulk_data_cmd)
|
||||
*/
|
||||
static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
{
|
||||
CsrInt16 pending;
|
||||
CsrInt16 remaining;
|
||||
s16 pending;
|
||||
s16 remaining;
|
||||
u8 *bufptr;
|
||||
bulk_data_param_t data_ptrs;
|
||||
CsrInt16 cmd;
|
||||
s16 cmd;
|
||||
u16 sig_len;
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
u16 chunks_in_buf;
|
||||
u16 bytes_transferred = 0;
|
||||
CsrResult r = CSR_RESULT_SUCCESS;
|
||||
@ -1177,7 +1177,7 @@ static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
|
||||
while (pending > 0)
|
||||
{
|
||||
CsrInt16 f_flush_count = 0;
|
||||
s16 f_flush_count = 0;
|
||||
|
||||
/*
|
||||
* Command and length are common to signal and bulk data msgs.
|
||||
@ -1257,7 +1257,7 @@ static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
if (data_len != 0)
|
||||
{
|
||||
/* Retrieve dataRefs[i].SlotNumber */
|
||||
CsrInt16 slot = GET_PACKED_DATAREF_SLOT(bufptr + 2, i);
|
||||
s16 slot = GET_PACKED_DATAREF_SLOT(bufptr + 2, i);
|
||||
|
||||
if (slot >= card->config_data.num_tohost_data_slots)
|
||||
{
|
||||
@ -1372,7 +1372,7 @@ static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
/* The slot is only valid if the length is non-zero. */
|
||||
if (GET_PACKED_DATAREF_LEN(bufptr + 2, i) != 0)
|
||||
{
|
||||
CsrInt16 slot = GET_PACKED_DATAREF_SLOT(bufptr + 2, i);
|
||||
s16 slot = GET_PACKED_DATAREF_SLOT(bufptr + 2, i);
|
||||
if (slot < card->config_data.num_tohost_data_slots)
|
||||
{
|
||||
UNIFI_INIT_BULK_DATA(&card->to_host_data[slot]);
|
||||
@ -1546,7 +1546,7 @@ static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
static CsrResult process_clear_slot_command(card_t *card, const u8 *cmdptr)
|
||||
{
|
||||
u16 data_slot;
|
||||
CsrInt16 slot;
|
||||
s16 slot;
|
||||
|
||||
data_slot = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(cmdptr + SIZEOF_UINT16);
|
||||
|
||||
@ -1619,16 +1619,16 @@ static CsrResult process_clear_slot_command(card_t *card, const u8 *cmdptr)
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr,
|
||||
CsrInt16 cmd, u16 len)
|
||||
s16 cmd, u16 len)
|
||||
{
|
||||
bulk_data_desc_t *bdslot;
|
||||
#ifdef CSR_WIFI_ALIGNMENT_WORKAROUND
|
||||
u8 *host_bulk_data_slot;
|
||||
#endif
|
||||
bulk_data_cmd_t bdcmd;
|
||||
CsrInt16 offset;
|
||||
CsrInt16 slot;
|
||||
CsrInt16 dir;
|
||||
s16 offset;
|
||||
s16 slot;
|
||||
s16 dir;
|
||||
CsrResult r;
|
||||
|
||||
read_unpack_cmd(cmdptr, &bdcmd);
|
||||
@ -2029,7 +2029,7 @@ static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed)
|
||||
while (pending_sigs-- && pending_chunks > 0)
|
||||
{
|
||||
card_signal_t *csptr;
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
u16 sig_chunks, total_length, free_chunks_in_fh_buffer;
|
||||
bulk_data_param_t bulkdata;
|
||||
u8 *packed_sigptr;
|
||||
@ -2173,7 +2173,7 @@ static CsrResult process_fh_traffic_queue(card_t *card, CsrInt32 *processed)
|
||||
q_t *sigq = card->fh_traffic_queue;
|
||||
|
||||
CsrResult r;
|
||||
CsrInt16 n = 0;
|
||||
s16 n = 0;
|
||||
CsrInt32 q_no;
|
||||
u16 pending_sigs = 0;
|
||||
u16 pending_chunks = 0;
|
||||
|
@ -53,11 +53,11 @@
|
||||
* CSR_RESULT_FAILURE an SDIO error occurred
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrResult retrying_read8(card_t *card, CsrInt16 funcnum, CsrUint32 addr, u8 *pdata)
|
||||
static CsrResult retrying_read8(card_t *card, s16 funcnum, CsrUint32 addr, u8 *pdata)
|
||||
{
|
||||
CsrSdioFunction *sdio = card->sdio_if;
|
||||
CsrResult r = CSR_RESULT_SUCCESS;
|
||||
CsrInt16 retries;
|
||||
s16 retries;
|
||||
CsrResult csrResult = CSR_RESULT_SUCCESS;
|
||||
|
||||
retries = 0;
|
||||
@ -128,11 +128,11 @@ static CsrResult retrying_read8(card_t *card, CsrInt16 funcnum, CsrUint32 addr,
|
||||
} /* retrying_read8() */
|
||||
|
||||
|
||||
static CsrResult retrying_write8(card_t *card, CsrInt16 funcnum, CsrUint32 addr, u8 data)
|
||||
static CsrResult retrying_write8(card_t *card, s16 funcnum, CsrUint32 addr, u8 data)
|
||||
{
|
||||
CsrSdioFunction *sdio = card->sdio_if;
|
||||
CsrResult r = CSR_RESULT_SUCCESS;
|
||||
CsrInt16 retries;
|
||||
s16 retries;
|
||||
CsrResult csrResult = CSR_RESULT_SUCCESS;
|
||||
|
||||
retries = 0;
|
||||
@ -201,12 +201,12 @@ static CsrResult retrying_write8(card_t *card, CsrInt16 funcnum, CsrUint32 addr,
|
||||
} /* retrying_write8() */
|
||||
|
||||
|
||||
static CsrResult retrying_read16(card_t *card, CsrInt16 funcnum,
|
||||
static CsrResult retrying_read16(card_t *card, s16 funcnum,
|
||||
CsrUint32 addr, u16 *pdata)
|
||||
{
|
||||
CsrSdioFunction *sdio = card->sdio_if;
|
||||
CsrResult r = CSR_RESULT_SUCCESS;
|
||||
CsrInt16 retries;
|
||||
s16 retries;
|
||||
CsrResult csrResult = CSR_RESULT_SUCCESS;
|
||||
|
||||
retries = 0;
|
||||
@ -262,12 +262,12 @@ static CsrResult retrying_read16(card_t *card, CsrInt16 funcnum,
|
||||
} /* retrying_read16() */
|
||||
|
||||
|
||||
static CsrResult retrying_write16(card_t *card, CsrInt16 funcnum,
|
||||
static CsrResult retrying_write16(card_t *card, s16 funcnum,
|
||||
CsrUint32 addr, u16 data)
|
||||
{
|
||||
CsrSdioFunction *sdio = card->sdio_if;
|
||||
CsrResult r = CSR_RESULT_SUCCESS;
|
||||
CsrInt16 retries;
|
||||
s16 retries;
|
||||
CsrResult csrResult = CSR_RESULT_SUCCESS;
|
||||
|
||||
retries = 0;
|
||||
@ -668,10 +668,10 @@ CsrResult unifi_write_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len
|
||||
{
|
||||
CsrResult r;
|
||||
u8 *cptr;
|
||||
CsrInt16 signed_len;
|
||||
s16 signed_len;
|
||||
|
||||
cptr = (u8 *)pdata;
|
||||
signed_len = (CsrInt16)len;
|
||||
signed_len = (s16)len;
|
||||
while (signed_len > 0)
|
||||
{
|
||||
/* This is UniFi-1 specific code. CSPI not supported so 8-bit write allowed */
|
||||
@ -1399,9 +1399,9 @@ CsrResult unifi_writen(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
|
||||
} /* unifi_writen() */
|
||||
|
||||
|
||||
static CsrResult csr_sdio_block_rw(card_t *card, CsrInt16 funcnum,
|
||||
static CsrResult csr_sdio_block_rw(card_t *card, s16 funcnum,
|
||||
CsrUint32 addr, u8 *pdata,
|
||||
u16 count, CsrInt16 dir_is_write)
|
||||
u16 count, s16 dir_is_write)
|
||||
{
|
||||
CsrResult csrResult;
|
||||
|
||||
@ -1473,7 +1473,7 @@ static CsrResult csr_sdio_block_rw(card_t *card, CsrInt16 funcnum,
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
|
||||
CsrUint32 len, CsrInt16 direction)
|
||||
CsrUint32 len, s16 direction)
|
||||
{
|
||||
#define CMD53_RETRIES 3
|
||||
/*
|
||||
@ -1486,15 +1486,15 @@ CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
|
||||
#define REWIND_DELAY 1 /* msec or 50usecs */
|
||||
CsrResult csrResult; /* SDIO error code */
|
||||
CsrResult r = CSR_RESULT_SUCCESS; /* HIP error code */
|
||||
CsrInt16 retries = CMD53_RETRIES;
|
||||
CsrInt16 stat_retries;
|
||||
s16 retries = CMD53_RETRIES;
|
||||
s16 stat_retries;
|
||||
u8 stat;
|
||||
CsrInt16 dump_read;
|
||||
s16 dump_read;
|
||||
#ifdef UNIFI_DEBUG
|
||||
u8 *pdata_lsb = ((u8 *)&pdata) + card->lsb;
|
||||
#endif
|
||||
#ifdef CSR_WIFI_MAKE_FAKE_CMD53_ERRORS
|
||||
static CsrInt16 fake_error;
|
||||
static s16 fake_error;
|
||||
#endif
|
||||
|
||||
dump_read = 0;
|
||||
@ -1587,7 +1587,7 @@ CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
|
||||
|
||||
unifi_trace(card->ospriv, UDBG4,
|
||||
"Error in a CMD53 transfer, retrying (h:%d,l:%u)...\n",
|
||||
(CsrInt16)handle & 0xff, len);
|
||||
(s16)handle & 0xff, len);
|
||||
|
||||
/* The transfer failed, rewind and try again */
|
||||
r = unifi_write_8_or_16(card, card->sdio_ctrl_addr + 8,
|
||||
@ -1694,7 +1694,7 @@ CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrResult unifi_bulk_rw_noretry(card_t *card, CsrUint32 handle, void *pdata,
|
||||
CsrUint32 len, CsrInt16 direction)
|
||||
CsrUint32 len, s16 direction)
|
||||
{
|
||||
CsrResult csrResult;
|
||||
|
||||
|
@ -562,7 +562,7 @@ static CsrResult safe_read_shared_location(card_t *card, CsrUint32 address, u8 *
|
||||
CsrResult unifi_do_loader_op(card_t *card, CsrUint32 op_addr, u8 opcode)
|
||||
{
|
||||
CsrResult r;
|
||||
CsrInt16 op_retries;
|
||||
s16 op_retries;
|
||||
|
||||
unifi_trace(card->ospriv, UDBG4, "Loader cmd 0x%0x -> 0x%08x\n", opcode, op_addr);
|
||||
|
||||
|
@ -40,7 +40,7 @@ typedef struct coredump_buf
|
||||
{
|
||||
u16 count; /* serial number of dump */
|
||||
CsrTime timestamp; /* host's system time at capture */
|
||||
CsrInt16 requestor; /* request: 0=auto dump, 1=manual */
|
||||
s16 requestor; /* request: 0=auto dump, 1=manual */
|
||||
u16 chip_ver;
|
||||
CsrUint32 fw_ver;
|
||||
u16 *zone[HIP_CDUMP_NUM_ZONES];
|
||||
@ -827,8 +827,8 @@ void unifi_coredump_free(card_t *card)
|
||||
{
|
||||
void *ospriv = card->ospriv;
|
||||
coredump_buffer *node, *del_node;
|
||||
CsrInt16 i = 0;
|
||||
CsrInt16 j;
|
||||
s16 i = 0;
|
||||
s16 j;
|
||||
|
||||
func_enter();
|
||||
unifi_trace(ospriv, UDBG2, "Core dump de-configured\n");
|
||||
|
@ -2986,7 +2986,7 @@ CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig)
|
||||
*/
|
||||
CsrResult write_pack(const CSR_SIGNAL *sig, u8 *ptr, u16 *sig_len)
|
||||
{
|
||||
CsrInt16 index = 0;
|
||||
s16 index = 0;
|
||||
|
||||
CSR_COPY_UINT16_TO_LITTLE_ENDIAN(sig->SignalPrimitiveHeader.SignalId, ptr + index);
|
||||
index += SIZEOF_UINT16;
|
||||
|
@ -106,9 +106,9 @@ static CsrResult send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
|
||||
{
|
||||
u16 i, data_slot_size;
|
||||
card_signal_t *csptr;
|
||||
CsrInt16 qe;
|
||||
s16 qe;
|
||||
CsrResult r;
|
||||
CsrInt16 debug_print = 0;
|
||||
s16 debug_print = 0;
|
||||
|
||||
data_slot_size = CardGetDataSlotSize(card);
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef CsrInt16 csr_place_holding_type;
|
||||
typedef s16 csr_place_holding_type;
|
||||
|
||||
typedef u16 CSR_ASSOCIATION_ID;
|
||||
|
||||
@ -71,7 +71,7 @@ typedef enum CSR_CONNECTION_STATUS
|
||||
CSR_CONNECTED_AWAKE = 0x0001
|
||||
} CSR_CONNECTION_STATUS;
|
||||
|
||||
typedef CsrInt16 CSR_DECIBELS;
|
||||
typedef s16 CSR_DECIBELS;
|
||||
|
||||
typedef enum CSR_DIRECTION
|
||||
{
|
||||
@ -542,7 +542,7 @@ typedef struct CSR_MLME_RESET_REQUEST
|
||||
CSR_DATAREF Dummydataref1;
|
||||
CSR_DATAREF Dummydataref2;
|
||||
CSR_MACADDRESS StaAddress;
|
||||
CsrInt16 SetDefaultMib;
|
||||
s16 SetDefaultMib;
|
||||
} CSR_MLME_RESET_REQUEST;
|
||||
|
||||
typedef struct CSR_MLME_SET_CONFIRM
|
||||
@ -582,7 +582,7 @@ typedef u16 CSR_SEQUENCE_NUMBER;
|
||||
|
||||
typedef struct CSR_SIGNAL_PRIMITIVE_HEADER
|
||||
{
|
||||
CsrInt16 SignalId;
|
||||
s16 SignalId;
|
||||
CSR_PROCESS_ID ReceiverProcessId;
|
||||
CSR_PROCESS_ID SenderProcessId;
|
||||
} CSR_SIGNAL_PRIMITIVE_HEADER;
|
||||
@ -685,7 +685,7 @@ typedef struct CSR_MA_VIF_AVAILABILITY_INDICATION
|
||||
CSR_DATAREF Dummydataref1;
|
||||
CSR_DATAREF Dummydataref2;
|
||||
CSR_VIF_IDENTIFIER VirtualInterfaceIdentifier;
|
||||
CsrInt16 Multicast;
|
||||
s16 Multicast;
|
||||
} CSR_MA_VIF_AVAILABILITY_INDICATION;
|
||||
|
||||
typedef struct CSR_MA_VIF_AVAILABILITY_RESPONSE
|
||||
@ -776,7 +776,7 @@ typedef struct CSR_MLME_ADD_PERIODIC_REQUEST
|
||||
CSR_PERIODIC_ID PeriodicId;
|
||||
CSR_MICROSECONDS32 MaximumLatency;
|
||||
CSR_PERIODIC_SCHEDULING_MODE PeriodicSchedulingMode;
|
||||
CsrInt16 WakeHost;
|
||||
s16 WakeHost;
|
||||
CSR_PRIORITY UserPriority;
|
||||
} CSR_MLME_ADD_PERIODIC_REQUEST;
|
||||
|
||||
@ -1108,7 +1108,7 @@ typedef struct CSR_MLME_PAUSE_AUTONOMOUS_SCAN_REQUEST
|
||||
CSR_DATAREF Dummydataref2;
|
||||
CSR_VIF_IDENTIFIER VirtualInterfaceIdentifier;
|
||||
CSR_AUTONOMOUS_SCAN_ID AutonomousScanId;
|
||||
CsrInt16 Pause;
|
||||
s16 Pause;
|
||||
} CSR_MLME_PAUSE_AUTONOMOUS_SCAN_REQUEST;
|
||||
|
||||
typedef struct CSR_MLME_POWERMGT_CONFIRM
|
||||
@ -1125,7 +1125,7 @@ typedef struct CSR_MLME_POWERMGT_REQUEST
|
||||
CSR_DATAREF Dummydataref2;
|
||||
CSR_VIF_IDENTIFIER VirtualInterfaceIdentifier;
|
||||
CSR_POWER_MANAGEMENT_MODE PowerManagementMode;
|
||||
CsrInt16 ReceiveDtims;
|
||||
s16 ReceiveDtims;
|
||||
CSR_BEACON_PERIODS ListenInterval;
|
||||
CSR_TRAFFIC_WINDOW TrafficWindow;
|
||||
} CSR_MLME_POWERMGT_REQUEST;
|
||||
@ -1229,7 +1229,7 @@ typedef struct CSR_MLME_SET_TIM_REQUEST
|
||||
CSR_DATAREF Dummydataref2;
|
||||
CSR_VIF_IDENTIFIER VirtualInterfaceIdentifier;
|
||||
CSR_ASSOCIATION_ID AssociationId;
|
||||
CsrInt16 TimValue;
|
||||
s16 TimValue;
|
||||
} CSR_MLME_SET_TIM_REQUEST;
|
||||
|
||||
typedef struct CSR_MLME_SM_START_CONFIRM
|
||||
|
@ -271,7 +271,7 @@ static enum ta_frame_identity ta_detect_protocol(card_t *card, CsrWifiRouterCtrl
|
||||
|
||||
static void tas_reset_data(ta_data_t *tad)
|
||||
{
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
|
||||
for (i = 0; i < (TA_INTERVALS_NUM + 1); i++)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
struct sig_name
|
||||
{
|
||||
CsrInt16 id;
|
||||
s16 id;
|
||||
const CsrCharString *name;
|
||||
};
|
||||
|
||||
|
@ -492,7 +492,7 @@ static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||
static CsrUint32 xbv2uint(u8 *ptr, CsrInt32 len)
|
||||
{
|
||||
CsrUint32 u = 0;
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
@ -642,7 +642,7 @@ static u16 calc_checksum(void *buf, const CsrUint32 offset, const CsrUint32 byte
|
||||
|
||||
static CsrUint32 calc_patch_size(const xbv1_t *fwinfo)
|
||||
{
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
CsrUint32 size = 0;
|
||||
|
||||
/*
|
||||
@ -744,7 +744,7 @@ static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset, fwreadfn_
|
||||
const CsrUint32 fw_id, void *fw_buf)
|
||||
{
|
||||
CsrUint32 written = 0;
|
||||
CsrInt16 chunks = 0;
|
||||
s16 chunks = 0;
|
||||
CsrUint32 left = fwdl->dl_size; /* Bytes left in this fwdl */
|
||||
CsrUint32 dl_addr = fwdl->dl_addr; /* Target address of fwdl image on XAP */
|
||||
CsrUint32 dl_offs = fwdl->dl_offset; /* Offset of fwdl image data in source */
|
||||
@ -873,7 +873,7 @@ static CsrUint32 write_reset_ptdl(void *buf, const CsrUint32 offset, const xbv1_
|
||||
CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
||||
symbol_t *slut, CsrUint32 slut_len)
|
||||
{
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
CsrInt32 offset;
|
||||
CsrUint32 magic;
|
||||
CsrUint32 count = 0;
|
||||
@ -974,7 +974,7 @@ void* xbv_to_patch(card_t *card, fwreadfn_t readfn,
|
||||
void *patch_buf = NULL;
|
||||
CsrUint32 patch_buf_size;
|
||||
CsrUint32 payload_offs = 0; /* Start of XBV payload */
|
||||
CsrInt16 i;
|
||||
s16 i;
|
||||
CsrUint32 patch_offs = 0;
|
||||
CsrUint32 list_len_offs = 0; /* Offset of PTDL LIST length parameter */
|
||||
CsrUint32 ptdl_start_offs = 0; /* Offset of first PTDL chunk */
|
||||
|
@ -98,7 +98,7 @@ typedef struct
|
||||
|
||||
/* F/W download image, possibly more than one part */
|
||||
struct FWDL fwdl[MAX_FWDL];
|
||||
CsrInt16 num_fwdl;
|
||||
s16 num_fwdl;
|
||||
|
||||
/* F/W overlay image, add r not used */
|
||||
struct FWOV fwov;
|
||||
@ -108,7 +108,7 @@ typedef struct
|
||||
CsrUint32 build_id;
|
||||
|
||||
struct PTDL ptdl[MAX_PTDL];
|
||||
CsrInt16 num_ptdl;
|
||||
s16 num_ptdl;
|
||||
} xbv1_t;
|
||||
|
||||
|
||||
|
@ -416,8 +416,8 @@ typedef struct
|
||||
u16 frameLength;
|
||||
u8 *frame;
|
||||
CsrWifiRouterFrameFreeFunction freeFunction;
|
||||
CsrInt16 rssi;
|
||||
CsrInt16 snr;
|
||||
s16 rssi;
|
||||
s16 snr;
|
||||
u16 rate;
|
||||
} CsrWifiRouterMaPacketInd;
|
||||
|
||||
|
@ -354,8 +354,8 @@ CsrSize CsrWifiRouterMaPacketIndSizeof(void *msg)
|
||||
bufferSize += 2; /* u16 primitive->frameLength */
|
||||
bufferSize += primitive->frameLength; /* u8 primitive->frame */
|
||||
bufferSize += 4; /* CsrWifiRouterFrameFreeFunction primitive->freeFunction */
|
||||
bufferSize += 2; /* CsrInt16 primitive->rssi */
|
||||
bufferSize += 2; /* CsrInt16 primitive->snr */
|
||||
bufferSize += 2; /* s16 primitive->rssi */
|
||||
bufferSize += 2; /* s16 primitive->snr */
|
||||
bufferSize += 2; /* u16 primitive->rate */
|
||||
return bufferSize;
|
||||
}
|
||||
|
@ -2204,8 +2204,8 @@ typedef struct
|
||||
*******************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
CsrInt16 unifiRssi;
|
||||
CsrInt16 unifiSnr;
|
||||
s16 unifiRssi;
|
||||
s16 unifiSnr;
|
||||
} CsrWifiSmeLinkQuality;
|
||||
|
||||
/*******************************************************************************
|
||||
@ -2366,10 +2366,10 @@ typedef struct
|
||||
*******************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
CsrInt16 rssiHighThreshold;
|
||||
CsrInt16 rssiLowThreshold;
|
||||
CsrInt16 snrHighThreshold;
|
||||
CsrInt16 snrLowThreshold;
|
||||
s16 rssiHighThreshold;
|
||||
s16 rssiLowThreshold;
|
||||
s16 snrHighThreshold;
|
||||
s16 snrLowThreshold;
|
||||
} CsrWifiSmeRoamingBandData;
|
||||
|
||||
/*******************************************************************************
|
||||
@ -3141,8 +3141,8 @@ typedef struct
|
||||
{
|
||||
CsrWifiSsid ssid;
|
||||
CsrWifiMacAddress bssid;
|
||||
CsrInt16 rssi;
|
||||
CsrInt16 snr;
|
||||
s16 rssi;
|
||||
s16 snr;
|
||||
CsrWifiSmeRadioIF ifIndex;
|
||||
u16 beaconPeriodTu;
|
||||
CsrWifiSmeTsfTime timeStamp;
|
||||
|
@ -1012,10 +1012,10 @@ CsrSize CsrWifiSmeRoamingConfigSetReqSizeof(void *msg)
|
||||
u16 i2;
|
||||
for (i2 = 0; i2 < 3; i2++)
|
||||
{
|
||||
bufferSize += 2; /* CsrInt16 primitive->roamingConfig.roamingBands[i2].rssiHighThreshold */
|
||||
bufferSize += 2; /* CsrInt16 primitive->roamingConfig.roamingBands[i2].rssiLowThreshold */
|
||||
bufferSize += 2; /* CsrInt16 primitive->roamingConfig.roamingBands[i2].snrHighThreshold */
|
||||
bufferSize += 2; /* CsrInt16 primitive->roamingConfig.roamingBands[i2].snrLowThreshold */
|
||||
bufferSize += 2; /* s16 primitive->roamingConfig.roamingBands[i2].rssiHighThreshold */
|
||||
bufferSize += 2; /* s16 primitive->roamingConfig.roamingBands[i2].rssiLowThreshold */
|
||||
bufferSize += 2; /* s16 primitive->roamingConfig.roamingBands[i2].snrHighThreshold */
|
||||
bufferSize += 2; /* s16 primitive->roamingConfig.roamingBands[i2].snrLowThreshold */
|
||||
}
|
||||
}
|
||||
bufferSize += 1; /* CsrBool primitive->roamingConfig.disableSmoothRoaming */
|
||||
@ -2957,8 +2957,8 @@ CsrSize CsrWifiSmeConnectionQualityIndSizeof(void *msg)
|
||||
|
||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 9) */
|
||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||
bufferSize += 2; /* CsrInt16 primitive->linkQuality.unifiRssi */
|
||||
bufferSize += 2; /* CsrInt16 primitive->linkQuality.unifiSnr */
|
||||
bufferSize += 2; /* s16 primitive->linkQuality.unifiRssi */
|
||||
bufferSize += 2; /* s16 primitive->linkQuality.unifiSnr */
|
||||
return bufferSize;
|
||||
}
|
||||
|
||||
@ -3303,8 +3303,8 @@ CsrSize CsrWifiSmeLinkQualityGetCfmSizeof(void *msg)
|
||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 11) */
|
||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||
bufferSize += 2; /* CsrResult primitive->status */
|
||||
bufferSize += 2; /* CsrInt16 primitive->linkQuality.unifiRssi */
|
||||
bufferSize += 2; /* CsrInt16 primitive->linkQuality.unifiSnr */
|
||||
bufferSize += 2; /* s16 primitive->linkQuality.unifiRssi */
|
||||
bufferSize += 2; /* s16 primitive->linkQuality.unifiSnr */
|
||||
return bufferSize;
|
||||
}
|
||||
|
||||
@ -4252,10 +4252,10 @@ CsrSize CsrWifiSmeRoamingConfigGetCfmSizeof(void *msg)
|
||||
u16 i2;
|
||||
for (i2 = 0; i2 < 3; i2++)
|
||||
{
|
||||
bufferSize += 2; /* CsrInt16 primitive->roamingConfig.roamingBands[i2].rssiHighThreshold */
|
||||
bufferSize += 2; /* CsrInt16 primitive->roamingConfig.roamingBands[i2].rssiLowThreshold */
|
||||
bufferSize += 2; /* CsrInt16 primitive->roamingConfig.roamingBands[i2].snrHighThreshold */
|
||||
bufferSize += 2; /* CsrInt16 primitive->roamingConfig.roamingBands[i2].snrLowThreshold */
|
||||
bufferSize += 2; /* s16 primitive->roamingConfig.roamingBands[i2].rssiHighThreshold */
|
||||
bufferSize += 2; /* s16 primitive->roamingConfig.roamingBands[i2].rssiLowThreshold */
|
||||
bufferSize += 2; /* s16 primitive->roamingConfig.roamingBands[i2].snrHighThreshold */
|
||||
bufferSize += 2; /* s16 primitive->roamingConfig.roamingBands[i2].snrLowThreshold */
|
||||
}
|
||||
}
|
||||
bufferSize += 1; /* CsrBool primitive->roamingConfig.disableSmoothRoaming */
|
||||
@ -4519,8 +4519,8 @@ CsrSize CsrWifiSmeScanResultIndSizeof(void *msg)
|
||||
bufferSize += 32; /* u8 primitive->result.ssid.ssid[32] */
|
||||
bufferSize += 1; /* u8 primitive->result.ssid.length */
|
||||
bufferSize += 6; /* u8 primitive->result.bssid.a[6] */
|
||||
bufferSize += 2; /* CsrInt16 primitive->result.rssi */
|
||||
bufferSize += 2; /* CsrInt16 primitive->result.snr */
|
||||
bufferSize += 2; /* s16 primitive->result.rssi */
|
||||
bufferSize += 2; /* s16 primitive->result.snr */
|
||||
bufferSize += 1; /* CsrWifiSmeRadioIF primitive->result.ifIndex */
|
||||
bufferSize += 2; /* u16 primitive->result.beaconPeriodTu */
|
||||
bufferSize += 8; /* u8 primitive->result.timeStamp.data[8] */
|
||||
@ -4818,8 +4818,8 @@ CsrSize CsrWifiSmeScanResultsGetCfmSizeof(void *msg)
|
||||
bufferSize += 32; /* u8 primitive->scanResults[i1].ssid.ssid[32] */
|
||||
bufferSize += 1; /* u8 primitive->scanResults[i1].ssid.length */
|
||||
bufferSize += 6; /* u8 primitive->scanResults[i1].bssid.a[6] */
|
||||
bufferSize += 2; /* CsrInt16 primitive->scanResults[i1].rssi */
|
||||
bufferSize += 2; /* CsrInt16 primitive->scanResults[i1].snr */
|
||||
bufferSize += 2; /* s16 primitive->scanResults[i1].rssi */
|
||||
bufferSize += 2; /* s16 primitive->scanResults[i1].snr */
|
||||
bufferSize += 1; /* CsrWifiSmeRadioIF primitive->scanResults[i1].ifIndex */
|
||||
bufferSize += 2; /* u16 primitive->scanResults[i1].beaconPeriodTu */
|
||||
bufferSize += 8; /* u8 primitive->scanResults[i1].timeStamp.data[8] */
|
||||
|
@ -3095,7 +3095,7 @@ void CsrWifiRouterCtrlWapiRxPktReqHandler(void* drvpriv, CsrWifiFsmEvent* msg)
|
||||
|
||||
memcpy((void*)bulkdata.d[0].os_data_ptr, req->data, req->dataLength);
|
||||
|
||||
receiver_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN((req->signal) + sizeof(CsrInt16)) & 0xFFF0;
|
||||
receiver_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN((req->signal) + sizeof(s16)) & 0xFFF0;
|
||||
client_id = (receiver_id & 0x0F00) >> UDI_SENDER_ID_SHIFT;
|
||||
|
||||
client = &priv->ul_clients[client_id];
|
||||
|
@ -373,24 +373,24 @@ unifi_process_receive_event(void *ospriv,
|
||||
unifi_priv_t *priv = (unifi_priv_t*)ospriv;
|
||||
int i, receiver_id;
|
||||
int client_id;
|
||||
CsrInt16 signal_id;
|
||||
s16 signal_id;
|
||||
CsrBool pktIndToSme = FALSE, freeBulkData = FALSE;
|
||||
|
||||
func_enter();
|
||||
|
||||
unifi_trace(priv, UDBG5, "unifi_process_receive_event: "
|
||||
"%04x %04x %04x %04x %04x %04x %04x %04x (%d)\n",
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*0) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*1) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*2) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*3) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*4) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*5) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*6) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*7) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*0) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*1) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*2) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*3) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*4) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*5) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*6) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*7) & 0xFFFF,
|
||||
siglen);
|
||||
|
||||
receiver_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)) & 0xFF00;
|
||||
receiver_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)) & 0xFF00;
|
||||
client_id = (receiver_id & 0x0F00) >> UDI_SENDER_ID_SHIFT;
|
||||
signal_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(sigdata);
|
||||
|
||||
@ -659,14 +659,14 @@ unifi_receive_event(void *ospriv,
|
||||
|
||||
unifi_trace(priv, UDBG5, "unifi_receive_event: "
|
||||
"%04x %04x %04x %04x %04x %04x %04x %04x (%d)\n",
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*0) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*1) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*2) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*3) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*4) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*5) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*6) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(CsrInt16)*7) & 0xFFFF, siglen);
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*0) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*1) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*2) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*3) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*4) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*5) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*6) & 0xFFFF,
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN((sigdata) + sizeof(s16)*7) & 0xFFFF, siglen);
|
||||
if(signal_buffer_is_full(priv)) {
|
||||
unifi_error(priv,"TO HOST signal queue FULL dropping the PDU\n");
|
||||
for (i = 0; i < UNIFI_MAX_DATA_REFERENCES; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user