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>
typedef uint32_t CsrUint32;
/* Signed fixed width types */
-typedef int16_t CsrInt16;
typedef int32_t CsrInt32;
/* Boolean */
/* Convert string with base 10 to integer */
CsrUint32 CsrStrToInt(const CsrCharString *str)
{
- CsrInt16 i;
+ s16 i;
CsrUint32 res;
CsrUint32 digit;
/*****************************************************************************
* CardClearFromHostDataSlot -
*/
-void CardClearFromHostDataSlot(card_t *card, const CsrInt16 aSlotNum);
+void CardClearFromHostDataSlot(card_t *card, const s16 aSlotNum);
#ifdef CSR_WIFI_REQUEUE_PACKET_TO_HAL
/*****************************************************************************
* without freeing the bulk data
*/
-void CardClearFromHostDataSlotWithoutFreeingBulkData(card_t *card, const CsrInt16 aSlotNum);
+void CardClearFromHostDataSlotWithoutFreeingBulkData(card_t *card, const s16 aSlotNum);
#endif
/*****************************************************************************
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;
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();
*/
static CsrResult card_wait_for_unifi_to_reset(card_t *card)
{
- CsrInt16 i;
+ s16 i;
CsrResult r;
u8 io_enable;
CsrResult csrResult;
if (r == CSR_RESULT_SUCCESS)
{
u16 mbox2;
- CsrInt16 enabled = io_enable & (1 << card->function);
+ s16 enabled = io_enable & (1 << card->function);
if (!enabled)
{
*/
static CsrResult card_wait_for_unifi_to_disable(card_t *card)
{
- CsrInt16 i;
+ s16 i;
CsrResult r;
u8 io_enable;
CsrResult csrResult;
}
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)
{
*/
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();
static void card_init_soft_queues(card_t *card)
{
- CsrInt16 i;
+ s16 i;
func_enter();
*/
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");
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);
func_exit_r(r);
return r;
}
- card->to_host_signals_r = (CsrInt16)s;
+ card->to_host_signals_r = (s16)s;
}
/* Set Initialised flag. */
* 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;
* 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;
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();
* 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;
{
CsrResult r = CSR_RESULT_SUCCESS;
u8 status;
- CsrInt16 retry = 100;
+ s16 retry = 100;
while (retry--)
{
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;
* 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;
#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 */
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);
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
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);
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
* 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;
*/
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);
*/
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;
while (pending > 0)
{
- CsrInt16 f_flush_count = 0;
+ s16 f_flush_count = 0;
/*
* Command and length are common to signal and bulk data msgs.
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)
{
/* 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]);
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);
* ---------------------------------------------------------------------------
*/
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);
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;
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;
* 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;
} /* 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;
} /* 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;
} /* 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;
{
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 */
} /* 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;
* ---------------------------------------------------------------------------
*/
CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
- CsrUint32 len, CsrInt16 direction)
+ CsrUint32 len, s16 direction)
{
#define CMD53_RETRIES 3
/*
#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;
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,
* ---------------------------------------------------------------------------
*/
CsrResult unifi_bulk_rw_noretry(card_t *card, CsrUint32 handle, void *pdata,
- CsrUint32 len, CsrInt16 direction)
+ CsrUint32 len, s16 direction)
{
CsrResult csrResult;
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);
{
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];
{
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");
*/
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;
{
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);
extern "C" {
#endif
-typedef CsrInt16 csr_place_holding_type;
+typedef s16 csr_place_holding_type;
typedef u16 CSR_ASSOCIATION_ID;
CSR_CONNECTED_AWAKE = 0x0001
} CSR_CONNECTION_STATUS;
-typedef CsrInt16 CSR_DECIBELS;
+typedef s16 CSR_DECIBELS;
typedef enum CSR_DIRECTION
{
CSR_DATAREF Dummydataref1;
CSR_DATAREF Dummydataref2;
CSR_MACADDRESS StaAddress;
- CsrInt16 SetDefaultMib;
+ s16 SetDefaultMib;
} CSR_MLME_RESET_REQUEST;
typedef struct CSR_MLME_SET_CONFIRM
typedef struct CSR_SIGNAL_PRIMITIVE_HEADER
{
- CsrInt16 SignalId;
+ s16 SignalId;
CSR_PROCESS_ID ReceiverProcessId;
CSR_PROCESS_ID SenderProcessId;
} CSR_SIGNAL_PRIMITIVE_HEADER;
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
CSR_PERIODIC_ID PeriodicId;
CSR_MICROSECONDS32 MaximumLatency;
CSR_PERIODIC_SCHEDULING_MODE PeriodicSchedulingMode;
- CsrInt16 WakeHost;
+ s16 WakeHost;
CSR_PRIORITY UserPriority;
} CSR_MLME_ADD_PERIODIC_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
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;
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
static void tas_reset_data(ta_data_t *tad)
{
- CsrInt16 i;
+ s16 i;
for (i = 0; i < (TA_INTERVALS_NUM + 1); i++)
{
struct sig_name
{
- CsrInt16 id;
+ s16 id;
const CsrCharString *name;
};
static CsrUint32 xbv2uint(u8 *ptr, CsrInt32 len)
{
CsrUint32 u = 0;
- CsrInt16 i;
+ s16 i;
for (i = 0; i < len; i++)
{
static CsrUint32 calc_patch_size(const xbv1_t *fwinfo)
{
- CsrInt16 i;
+ s16 i;
CsrUint32 size = 0;
/*
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 */
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;
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 */
/* 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;
CsrUint32 build_id;
struct PTDL ptdl[MAX_PTDL];
- CsrInt16 num_ptdl;
+ s16 num_ptdl;
} xbv1_t;
u16 frameLength;
u8 *frame;
CsrWifiRouterFrameFreeFunction freeFunction;
- CsrInt16 rssi;
- CsrInt16 snr;
+ s16 rssi;
+ s16 snr;
u16 rate;
} CsrWifiRouterMaPacketInd;
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;
}
*******************************************************************************/
typedef struct
{
- CsrInt16 unifiRssi;
- CsrInt16 unifiSnr;
+ s16 unifiRssi;
+ s16 unifiSnr;
} CsrWifiSmeLinkQuality;
/*******************************************************************************
*******************************************************************************/
typedef struct
{
- CsrInt16 rssiHighThreshold;
- CsrInt16 rssiLowThreshold;
- CsrInt16 snrHighThreshold;
- CsrInt16 snrLowThreshold;
+ s16 rssiHighThreshold;
+ s16 rssiLowThreshold;
+ s16 snrHighThreshold;
+ s16 snrLowThreshold;
} CsrWifiSmeRoamingBandData;
/*******************************************************************************
{
CsrWifiSsid ssid;
CsrWifiMacAddress bssid;
- CsrInt16 rssi;
- CsrInt16 snr;
+ s16 rssi;
+ s16 snr;
CsrWifiSmeRadioIF ifIndex;
u16 beaconPeriodTu;
CsrWifiSmeTsfTime timeStamp;
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 */
/* 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;
}
/* 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;
}
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 */
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] */
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] */
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];
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);
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++) {