mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
staging: csr: remove CsrInt32 typedef
Use the in-kernel s32 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
26a6b2e168
commit
95e326c28a
@ -12,9 +12,9 @@
|
||||
#include "csr_formatted_io.h"
|
||||
#include "csr_util.h"
|
||||
|
||||
CsrInt32 CsrSnprintf(CsrCharString *dest, CsrSize n, const CsrCharString *fmt, ...)
|
||||
s32 CsrSnprintf(CsrCharString *dest, CsrSize n, const CsrCharString *fmt, ...)
|
||||
{
|
||||
CsrInt32 r;
|
||||
s32 r;
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
r = CsrVsnprintf(dest, n, fmt, args);
|
||||
|
@ -16,7 +16,7 @@ extern "C" {
|
||||
|
||||
#include "csr_types.h"
|
||||
|
||||
CsrInt32 CsrSnprintf(CsrCharString *dest, CsrSize n, const CsrCharString *fmt, ...);
|
||||
s32 CsrSnprintf(CsrCharString *dest, CsrSize n, const CsrCharString *fmt, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ void CsrTimeUtcGet(CsrTimeUtc *tod, CsrTime *low, CsrTime *high);
|
||||
* CsrTime - "t1" - "t2".
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define CsrTimeSub(t1, t2) ((CsrInt32) (t1) - (CsrInt32) (t2))
|
||||
#define CsrTimeSub(t1, t2) ((s32) (t1) - (s32) (t2))
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
* NAME
|
||||
|
@ -32,9 +32,6 @@ typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointer
|
||||
typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
|
||||
typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
|
||||
|
||||
/* Signed fixed width types */
|
||||
typedef int32_t CsrInt32;
|
||||
|
||||
/* Boolean */
|
||||
typedef u8 CsrBool;
|
||||
|
||||
|
@ -38,8 +38,8 @@ CsrUtf16String *CsrUtf16ConcatenateTexts(const CsrUtf16String *inputText1, const
|
||||
CsrUtf16String *CsrUtf16String2XML(CsrUtf16String *str);
|
||||
CsrUtf16String *CsrXML2Utf16String(CsrUtf16String *str);
|
||||
|
||||
CsrInt32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2);
|
||||
CsrInt32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count);
|
||||
s32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2);
|
||||
s32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count);
|
||||
u32 CsrUtf8StringLengthInBytes(const CsrUtf8String *string);
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -1016,12 +1016,12 @@ CsrUtf16String *CsrXML2Utf16String(CsrUtf16String *str)
|
||||
return resultString;
|
||||
}
|
||||
|
||||
CsrInt32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2)
|
||||
s32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2)
|
||||
{
|
||||
return CsrStrCmp((const CsrCharString *) string1, (const CsrCharString *) string2);
|
||||
}
|
||||
|
||||
CsrInt32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count)
|
||||
s32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count)
|
||||
{
|
||||
return CsrStrNCmp((const CsrCharString *) string1, (const CsrCharString *) string2, count);
|
||||
}
|
||||
|
@ -145,9 +145,9 @@ u32 CsrPow(u32 base, u32 exponent)
|
||||
|
||||
/* Convert signed 32 bit (or less) integer to string */
|
||||
#define I2B10_MAX 12
|
||||
void CsrIntToBase10(CsrInt32 number, CsrCharString *str)
|
||||
void CsrIntToBase10(s32 number, CsrCharString *str)
|
||||
{
|
||||
CsrInt32 digit;
|
||||
s32 digit;
|
||||
u8 index;
|
||||
CsrCharString res[I2B10_MAX];
|
||||
CsrBool foundDigit = FALSE;
|
||||
@ -240,7 +240,7 @@ void *CsrMemMove(void *dest, const void *src, CsrSize count)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(CsrMemMove);
|
||||
|
||||
CsrInt32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count)
|
||||
s32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count)
|
||||
{
|
||||
return memcmp(buf1, buf2, count);
|
||||
}
|
||||
@ -292,12 +292,12 @@ CsrSize CsrStrLen(const CsrCharString *string)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(CsrStrLen);
|
||||
|
||||
CsrInt32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2)
|
||||
s32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2)
|
||||
{
|
||||
return strcmp(string1, string2);
|
||||
}
|
||||
|
||||
CsrInt32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count)
|
||||
s32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count)
|
||||
{
|
||||
return strncmp(string1, string2, count);
|
||||
}
|
||||
@ -308,7 +308,7 @@ CsrCharString *CsrStrChr(const CsrCharString *string, CsrCharString c)
|
||||
}
|
||||
#endif
|
||||
|
||||
CsrInt32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args)
|
||||
s32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args)
|
||||
{
|
||||
return vsnprintf(string, count, format, args);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue);
|
||||
CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue);
|
||||
CsrBool CsrHexStrToUint32(const CsrCharString *string, u32 *returnValue);
|
||||
u32 CsrPow(u32 base, u32 exponent);
|
||||
void CsrIntToBase10(CsrInt32 number, CsrCharString *str);
|
||||
void CsrIntToBase10(s32 number, CsrCharString *str);
|
||||
void CsrUInt16ToHex(u16 number, CsrCharString *str);
|
||||
void CsrUInt32ToHex(u32 number, CsrCharString *str);
|
||||
|
||||
@ -44,9 +44,9 @@ void CsrUInt32ToHex(u32 number, CsrCharString *str);
|
||||
#define CsrStrNCpy strncpy
|
||||
#define CsrStrCat strcat
|
||||
#define CsrStrNCat strncat
|
||||
#define CsrMemCmp(s1, s2, n) ((CsrInt32) memcmp((s1), (s2), (n)))
|
||||
#define CsrStrCmp(s1, s2) ((CsrInt32) strcmp((s1), (s2)))
|
||||
#define CsrStrNCmp(s1, s2, n) ((CsrInt32) strncmp((s1), (s2), (n)))
|
||||
#define CsrMemCmp(s1, s2, n) ((s32) memcmp((s1), (s2), (n)))
|
||||
#define CsrStrCmp(s1, s2) ((s32) strcmp((s1), (s2)))
|
||||
#define CsrStrNCmp(s1, s2, n) ((s32) strncmp((s1), (s2), (n)))
|
||||
#define CsrStrChr strchr
|
||||
#define CsrStrStr strstr
|
||||
#define CsrMemSet memset
|
||||
@ -58,15 +58,15 @@ CsrCharString *CsrStrCpy(CsrCharString *dest, const CsrCharString *src);
|
||||
CsrCharString *CsrStrNCpy(CsrCharString *dest, const CsrCharString *src, CsrSize count);
|
||||
CsrCharString *CsrStrCat(CsrCharString *dest, const CsrCharString *src);
|
||||
CsrCharString *CsrStrNCat(CsrCharString *dest, const CsrCharString *src, CsrSize count);
|
||||
CsrInt32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count);
|
||||
CsrInt32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2);
|
||||
CsrInt32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count);
|
||||
s32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count);
|
||||
s32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2);
|
||||
s32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count);
|
||||
CsrCharString *CsrStrChr(const CsrCharString *string, CsrCharString c);
|
||||
CsrCharString *CsrStrStr(const CsrCharString *string1, const CsrCharString *string2);
|
||||
void *CsrMemSet(void *dest, u8 c, CsrSize count);
|
||||
CsrSize CsrStrLen(const CsrCharString *string);
|
||||
#endif /* !CSR_USE_STDC_LIB */
|
||||
CsrInt32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args);
|
||||
s32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args);
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Non-standard utility functions */
|
||||
|
@ -168,7 +168,7 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv)
|
||||
* CSR_RESULT_SUCCESS if successful
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrResult unifi_init_card(card_t *card, CsrInt32 led_mask)
|
||||
CsrResult unifi_init_card(card_t *card, s32 led_mask)
|
||||
{
|
||||
CsrResult r;
|
||||
|
||||
@ -359,7 +359,7 @@ CsrResult unifi_init(card_t *card)
|
||||
* CsrResult error code on failure.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrResult unifi_download(card_t *card, CsrInt32 led_mask)
|
||||
CsrResult unifi_download(card_t *card, s32 led_mask)
|
||||
{
|
||||
CsrResult r;
|
||||
void *dlpriv;
|
||||
@ -1235,7 +1235,7 @@ static CsrResult card_wait_for_unifi_to_disable(card_t *card)
|
||||
*/
|
||||
CsrResult card_wait_for_firmware_to_start(card_t *card, u32 *paddr)
|
||||
{
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
u16 mbox0, mbox1;
|
||||
CsrResult r;
|
||||
|
||||
@ -1403,7 +1403,7 @@ CsrResult unifi_capture_panic(card_t *card)
|
||||
static CsrResult card_access_panic(card_t *card)
|
||||
{
|
||||
u16 data_u16 = 0;
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
CsrResult r, sr;
|
||||
|
||||
func_enter();
|
||||
@ -2221,7 +2221,7 @@ static void CardCheckDynamicReservation(card_t *card, unifi_TrafficQueue queue)
|
||||
{
|
||||
u16 q_len, active_queues = 0, excess_queue_slots, div_extra_slots,
|
||||
queue_fair_share, reserved_slots = 0, q, excess_need_queues = 0, unmovable_slots = 0;
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
q_t *sigq;
|
||||
u16 num_data_slots = card->config_data.num_fromhost_data_slots - UNIFI_RESERVED_COMMAND_SLOTS;
|
||||
|
||||
@ -2246,11 +2246,11 @@ static void CardCheckDynamicReservation(card_t *card, unifi_TrafficQueue queue)
|
||||
|
||||
for (i = 0; i < UNIFI_NO_OF_TX_QS; i++)
|
||||
{
|
||||
if (i != (CsrInt32)queue)
|
||||
if (i != (s32)queue)
|
||||
{
|
||||
reserved_slots += card->dynamic_slot_data.from_host_reserved_slots[i];
|
||||
}
|
||||
if ((i == (CsrInt32)queue) || (card->dynamic_slot_data.from_host_reserved_slots[i] > 0))
|
||||
if ((i == (s32)queue) || (card->dynamic_slot_data.from_host_reserved_slots[i] > 0))
|
||||
{
|
||||
active_queues++;
|
||||
}
|
||||
@ -4032,7 +4032,7 @@ void unifi_card_info(card_t *card, card_info_t *card_info)
|
||||
* CSR_RESULT_SUCCESS if OK, or CSR error
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status)
|
||||
CsrResult unifi_check_io_status(card_t *card, s32 *status)
|
||||
{
|
||||
u8 io_en;
|
||||
CsrResult r;
|
||||
@ -4053,7 +4053,7 @@ CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status)
|
||||
|
||||
if ((io_en & (1 << card->function)) == 0)
|
||||
{
|
||||
CsrInt32 fw_count;
|
||||
s32 fw_count;
|
||||
*status = 1;
|
||||
unifi_error(card->ospriv, "UniFi has spontaneously reset.\n");
|
||||
|
||||
@ -4102,7 +4102,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;
|
||||
s32 count_fhr;
|
||||
s16 t;
|
||||
u32 occupied_fh;
|
||||
|
||||
|
@ -431,7 +431,7 @@ struct card
|
||||
* We assume these are connected to LEDs. The main firmware gets
|
||||
* the mask from a MIB entry.
|
||||
*/
|
||||
CsrInt32 loader_led_mask;
|
||||
s32 loader_led_mask;
|
||||
|
||||
/*
|
||||
* Support for flow control. When the from-host queue of signals
|
||||
@ -490,10 +490,10 @@ struct card
|
||||
* These are the modulo-256 count of signals written to or read from UniFi
|
||||
* The value is incremented for every signal.
|
||||
*/
|
||||
CsrInt32 from_host_signals_w;
|
||||
CsrInt32 from_host_signals_r;
|
||||
CsrInt32 to_host_signals_r;
|
||||
CsrInt32 to_host_signals_w;
|
||||
s32 from_host_signals_w;
|
||||
s32 from_host_signals_r;
|
||||
s32 to_host_signals_r;
|
||||
s32 to_host_signals_w;
|
||||
|
||||
|
||||
/* Should specify buffer size as a number of signals */
|
||||
@ -653,14 +653,14 @@ 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);
|
||||
s32 card_read_signal_counts(card_t *card);
|
||||
bulk_data_desc_t* card_find_data_slot(card_t *card, s16 slot);
|
||||
|
||||
|
||||
CsrResult unifi_read32(card_t *card, u32 unifi_addr, u32 *pdata);
|
||||
CsrResult unifi_readnz(card_t *card, u32 unifi_addr,
|
||||
void *pdata, u16 len);
|
||||
CsrInt32 unifi_read_shared_count(card_t *card, u32 addr);
|
||||
s32 unifi_read_shared_count(card_t *card, u32 addr);
|
||||
|
||||
CsrResult unifi_writen(card_t *card, u32 unifi_addr, void *pdata, u16 len);
|
||||
|
||||
|
@ -47,18 +47,18 @@ static CsrResult handle_host_protocol(card_t *card, CsrBool *processed_something
|
||||
|
||||
static CsrResult flush_fh_buffer(card_t *card);
|
||||
|
||||
static CsrResult check_fh_sig_slots(card_t *card, u16 needed, CsrInt32 *space);
|
||||
static CsrResult check_fh_sig_slots(card_t *card, u16 needed, s32 *space);
|
||||
|
||||
static CsrResult read_to_host_signals(card_t *card, CsrInt32 *processed);
|
||||
static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed);
|
||||
static CsrResult read_to_host_signals(card_t *card, s32 *processed);
|
||||
static CsrResult process_to_host_signals(card_t *card, s32 *processed);
|
||||
|
||||
static CsrResult process_bulk_data_command(card_t *card,
|
||||
const u8 *cmdptr,
|
||||
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_fh_traffic_queue(card_t *card, CsrInt32 *processed);
|
||||
static CsrResult process_fh_cmd_queue(card_t *card, s32 *processed);
|
||||
static CsrResult process_fh_traffic_queue(card_t *card, s32 *processed);
|
||||
static void restart_packet_flow(card_t *card);
|
||||
static CsrResult process_clock_request(card_t *card);
|
||||
|
||||
@ -158,7 +158,7 @@ void unifi_debug_hex_to_buf(const CsrCharString *buff, u16 length)
|
||||
|
||||
void unifi_debug_buf_dump(void)
|
||||
{
|
||||
CsrInt32 offset = unifi_dbgbuf_ptr - unifi_debug_output;
|
||||
s32 offset = unifi_dbgbuf_ptr - unifi_debug_output;
|
||||
|
||||
unifi_error(NULL, "HIP debug buffer offset=%d\n", offset);
|
||||
dump_str(unifi_debug_output + offset, UNIFI_DEBUG_GBUFFER_SIZE - offset);
|
||||
@ -359,7 +359,7 @@ CsrResult unifi_bh(card_t *card, u32 *remaining)
|
||||
CsrResult r;
|
||||
CsrResult csrResult;
|
||||
CsrBool pending;
|
||||
CsrInt32 iostate, j;
|
||||
s32 iostate, j;
|
||||
const enum unifi_low_power_mode low_power_mode = card->low_power_mode;
|
||||
u16 data_slots_used = 0;
|
||||
|
||||
@ -845,7 +845,7 @@ static CsrResult process_bh(card_t *card)
|
||||
static CsrResult handle_host_protocol(card_t *card, CsrBool *processed_something)
|
||||
{
|
||||
CsrResult r;
|
||||
CsrInt32 done;
|
||||
s32 done;
|
||||
|
||||
*processed_something = FALSE;
|
||||
|
||||
@ -982,10 +982,10 @@ static CsrResult handle_host_protocol(card_t *card, CsrBool *processed_something
|
||||
* CSR error code if an error occurred.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrResult read_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
static CsrResult read_to_host_signals(card_t *card, s32 *processed)
|
||||
{
|
||||
CsrInt32 count_thw, count_thr;
|
||||
CsrInt32 unread_chunks, unread_bytes;
|
||||
s32 count_thw, count_thr;
|
||||
s32 unread_chunks, unread_bytes;
|
||||
CsrResult r;
|
||||
|
||||
*processed = 0;
|
||||
@ -1143,7 +1143,7 @@ static void read_unpack_cmd(const u8 *ptr, bulk_data_cmd_t *bulk_data_cmd)
|
||||
* indicate all data, as we have read it from the device.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
static CsrResult process_to_host_signals(card_t *card, s32 *processed)
|
||||
{
|
||||
s16 pending;
|
||||
s16 remaining;
|
||||
@ -1514,7 +1514,7 @@ static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||
/* Use a safe copy because source and destination may overlap */
|
||||
u8 *d = card->th_buffer.buf;
|
||||
u8 *s = bufptr;
|
||||
CsrInt32 n = remaining;
|
||||
s32 n = remaining;
|
||||
while (n--)
|
||||
{
|
||||
*d++ = *s++;
|
||||
@ -1839,11 +1839,11 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr,
|
||||
* CSR_RESULT_SUCCESS, otherwise CSR error code on error.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrResult check_fh_sig_slots(card_t *card, u16 needed, CsrInt32 *space_fh)
|
||||
static CsrResult check_fh_sig_slots(card_t *card, u16 needed, s32 *space_fh)
|
||||
{
|
||||
u32 count_fhw;
|
||||
u32 occupied_fh, slots_fh;
|
||||
CsrInt32 count_fhr;
|
||||
s32 count_fhr;
|
||||
|
||||
count_fhw = card->from_host_signals_w;
|
||||
count_fhr = card->from_host_signals_r;
|
||||
@ -1940,7 +1940,7 @@ static CsrResult check_fh_sig_slots(card_t *card, u16 needed, CsrInt32 *space_fh
|
||||
* structure that describes the queue to make the distiction.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed)
|
||||
static CsrResult process_fh_cmd_queue(card_t *card, s32 *processed)
|
||||
{
|
||||
q_t *sigq = &card->fh_command_queue;
|
||||
|
||||
@ -1948,7 +1948,7 @@ static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed)
|
||||
u16 pending_sigs;
|
||||
u16 pending_chunks;
|
||||
u16 needed_chunks;
|
||||
CsrInt32 space_chunks;
|
||||
s32 space_chunks;
|
||||
u16 q_index;
|
||||
|
||||
*processed = 0;
|
||||
@ -2168,17 +2168,17 @@ static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed)
|
||||
* and any UDI clients interspersed.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrResult process_fh_traffic_queue(card_t *card, CsrInt32 *processed)
|
||||
static CsrResult process_fh_traffic_queue(card_t *card, s32 *processed)
|
||||
{
|
||||
q_t *sigq = card->fh_traffic_queue;
|
||||
|
||||
CsrResult r;
|
||||
s16 n = 0;
|
||||
CsrInt32 q_no;
|
||||
s32 q_no;
|
||||
u16 pending_sigs = 0;
|
||||
u16 pending_chunks = 0;
|
||||
u16 needed_chunks;
|
||||
CsrInt32 space_chunks;
|
||||
s32 space_chunks;
|
||||
u16 q_index;
|
||||
u32 host_tag = 0;
|
||||
u16 slot_num = 0;
|
||||
|
@ -603,7 +603,7 @@ static CsrResult unifi_read_directn_match(card_t *card, u32 addr, void *pdata, u
|
||||
addr += 2;
|
||||
}
|
||||
|
||||
*num = (CsrInt32)(cptr - (u8 *)pdata);
|
||||
*num = (s32)(cptr - (u8 *)pdata);
|
||||
return CSR_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
@ -747,7 +747,7 @@ static CsrResult set_dmem_page(card_t *card, u32 dmem_addr, u32 *paddr)
|
||||
card->dmem_page = page;
|
||||
}
|
||||
|
||||
*paddr = ((CsrInt32)addr * 2) + (dmem_addr & 1);
|
||||
*paddr = ((s32)addr * 2) + (dmem_addr & 1);
|
||||
|
||||
return CSR_RESULT_SUCCESS;
|
||||
} /* set_dmem_page() */
|
||||
@ -787,7 +787,7 @@ static CsrResult set_pmem_page(card_t *card, u32 pmem_addr,
|
||||
card->pmem_page = page;
|
||||
}
|
||||
|
||||
*paddr = ((CsrInt32)addr * 2) + (pmem_addr & 1);
|
||||
*paddr = ((s32)addr * 2) + (pmem_addr & 1);
|
||||
|
||||
return CSR_RESULT_SUCCESS;
|
||||
} /* set_pmem_page() */
|
||||
@ -816,7 +816,7 @@ static CsrResult set_pmem_page(card_t *card, u32 pmem_addr,
|
||||
*/
|
||||
static CsrResult set_page(card_t *card, u32 generic_addr, u32 *paddr)
|
||||
{
|
||||
CsrInt32 space;
|
||||
s32 space;
|
||||
u32 addr;
|
||||
CsrResult r = CSR_RESULT_SUCCESS;
|
||||
|
||||
@ -1323,7 +1323,7 @@ CsrResult unifi_readnz(card_t *card, u32 unifi_addr, void *pdata, u16 len)
|
||||
* Value read from memory (0-127) or -1 on error
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrInt32 unifi_read_shared_count(card_t *card, u32 addr)
|
||||
s32 unifi_read_shared_count(card_t *card, u32 addr)
|
||||
{
|
||||
u8 b;
|
||||
/* I've increased this count, because I have seen cases where
|
||||
@ -1332,7 +1332,7 @@ CsrInt32 unifi_read_shared_count(card_t *card, u32 addr)
|
||||
* with increasing this limit. It's better to take a while to
|
||||
* recover than to fail. */
|
||||
#define SHARED_READ_RETRY_LIMIT 10
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
|
||||
/*
|
||||
* Get the to-host-signals-written count.
|
||||
@ -1355,7 +1355,7 @@ CsrInt32 unifi_read_shared_count(card_t *card, u32 addr)
|
||||
* This avoids a race between driver read and firmware write of the
|
||||
* word, the value we need is in the lower 8 bits anway.
|
||||
*/
|
||||
return (CsrInt32)(b & 0xff);
|
||||
return (s32)(b & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -743,7 +743,7 @@ u32 ChipHelper_HostResetSequence(ChipDescript *chip_he
|
||||
|
||||
|
||||
/* Decode a windowed access to the chip. */
|
||||
CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
|
||||
s32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
|
||||
enum chip_helper_window_index window,
|
||||
enum chip_helper_window_type type,
|
||||
u32 offset,
|
||||
|
@ -235,11 +235,11 @@ ChipDescript* ChipHelper_GetVersionBlueCore(enum chip_helper_bluecore_age age,
|
||||
CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_FLASH_OFFSET, prog_offset.flash)) \
|
||||
CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_EXT_SRAM_OFFSET, prog_offset.ext_sram)) \
|
||||
CHIP_HELPER_DEF0(m, (u16, DATA_MEMORY_RAM_OFFSET, data_offset.ram)) \
|
||||
CHIP_HELPER_DEF0(m, (CsrInt32, HasFlash, bools.has_flash)) \
|
||||
CHIP_HELPER_DEF0(m, (CsrInt32, HasExtSram, bools.has_ext_sram)) \
|
||||
CHIP_HELPER_DEF0(m, (CsrInt32, HasRom, bools.has_rom)) \
|
||||
CHIP_HELPER_DEF0(m, (CsrInt32, HasBt, bools.has_bt)) \
|
||||
CHIP_HELPER_DEF0(m, (CsrInt32, HasWLan, bools.has_wlan)) \
|
||||
CHIP_HELPER_DEF0(m, (s32, HasFlash, bools.has_flash)) \
|
||||
CHIP_HELPER_DEF0(m, (s32, HasExtSram, bools.has_ext_sram)) \
|
||||
CHIP_HELPER_DEF0(m, (s32, HasRom, bools.has_rom)) \
|
||||
CHIP_HELPER_DEF0(m, (s32, HasBt, bools.has_bt)) \
|
||||
CHIP_HELPER_DEF0(m, (s32, HasWLan, bools.has_wlan)) \
|
||||
CHIP_HELPER_DEF1(m, (u16, WINDOW_ADDRESS, enum chip_helper_window_index, window)) \
|
||||
CHIP_HELPER_DEF1(m, (u16, WINDOW_SIZE, enum chip_helper_window_index, window)) \
|
||||
CHIP_HELPER_DEF1(m, (u16, MapAddress_SPI2HOST, u16, addr)) \
|
||||
@ -402,7 +402,7 @@ CHIP_HELPER_LIST(C_DEC)
|
||||
address in the XAPs 16 address map to read from. 'len'
|
||||
is the length that we can read without having to change
|
||||
the page registers. */
|
||||
CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
|
||||
s32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
|
||||
enum chip_helper_window_index window,
|
||||
enum chip_helper_window_type type,
|
||||
u32 offset,
|
||||
@ -457,7 +457,7 @@ public:
|
||||
|
||||
|
||||
/* The DecodeWindow function, see the description of the C version. */
|
||||
CsrInt32 DecodeWindow(chip_helper_window_index window,
|
||||
s32 DecodeWindow(chip_helper_window_index window,
|
||||
chip_helper_window_type type,
|
||||
u32 offset,
|
||||
u16 &page, u16 &addr, u32 &len) const;
|
||||
|
@ -117,7 +117,7 @@ struct chip_device_regs_t
|
||||
written to the page register. */
|
||||
struct window_shift_info_t
|
||||
{
|
||||
CsrInt32 allowed;
|
||||
s32 allowed;
|
||||
u32 page_shift;
|
||||
u16 page_offset;
|
||||
};
|
||||
@ -140,7 +140,7 @@ struct window_info_t
|
||||
address of GBL_CHIP_VERSION is FF9A, else its FE81. */
|
||||
struct chip_version_t
|
||||
{
|
||||
CsrInt32 pre_bc7;
|
||||
s32 pre_bc7;
|
||||
u16 mask;
|
||||
u16 result;
|
||||
u8 sdio;
|
||||
|
@ -69,7 +69,7 @@ extern "C" {
|
||||
CSR_GET_UINT16_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + UNIFI_MAX_DATA_REFERENCES * SIZEOF_DATAREF + 2))
|
||||
|
||||
|
||||
CsrInt32 get_packed_struct_size(const u8 *buf);
|
||||
s32 get_packed_struct_size(const u8 *buf);
|
||||
CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig);
|
||||
CsrResult write_pack(const CSR_SIGNAL *sig, u8 *ptr, u16 *sig_len);
|
||||
|
||||
|
@ -659,7 +659,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
|
||||
{
|
||||
u32 offset;
|
||||
u8 *buf;
|
||||
CsrInt32 data_len;
|
||||
s32 data_len;
|
||||
u32 write_len;
|
||||
CsrResult r;
|
||||
const u16 buf_size = 2 * 1024;
|
||||
@ -756,7 +756,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
|
||||
static CsrResult do_patch_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo, u32 boot_ctrl_addr)
|
||||
{
|
||||
CsrResult r;
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
u16 loader_version;
|
||||
u16 handle;
|
||||
u32 total_bytes;
|
||||
|
@ -63,7 +63,7 @@ static CsrResult unifi_coredump_from_sdio(card_t *card, coredump_buffer *dump_bu
|
||||
static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_buf);
|
||||
static CsrResult unifi_coredump_read_zone(card_t *card, u16 *zone,
|
||||
const struct coredump_zone *def);
|
||||
static CsrInt32 get_value_from_coredump(const coredump_buffer *dump,
|
||||
static s32 get_value_from_coredump(const coredump_buffer *dump,
|
||||
const unifi_coredump_space_t space, const u16 offset);
|
||||
|
||||
/* Table of chip memory zones we capture on mini-coredump */
|
||||
@ -293,14 +293,14 @@ done:
|
||||
* Notes:
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static CsrInt32 get_value_from_coredump(const coredump_buffer *coreDump,
|
||||
static s32 get_value_from_coredump(const coredump_buffer *coreDump,
|
||||
const unifi_coredump_space_t space,
|
||||
const u16 offset_in_space)
|
||||
{
|
||||
CsrInt32 r = -1;
|
||||
s32 r = -1;
|
||||
u16 offset_in_zone;
|
||||
u32 zone_end_offset;
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
const struct coredump_zone *def = &zonedef_table[0];
|
||||
|
||||
/* Search zone def table for a match with the requested memory space */
|
||||
@ -316,7 +316,7 @@ static CsrInt32 get_value_from_coredump(const coredump_buffer *coreDump,
|
||||
{
|
||||
/* Calculate the offset of data within the zone buffer */
|
||||
offset_in_zone = offset_in_space - def->offset;
|
||||
r = (CsrInt32) * (coreDump->zone[i] + offset_in_zone);
|
||||
r = (s32) * (coreDump->zone[i] + offset_in_zone);
|
||||
|
||||
unifi_trace(NULL, UDBG6,
|
||||
"sp %d, offs 0x%04x = 0x%04x (in z%d 0x%04x->0x%04x)\n",
|
||||
@ -354,7 +354,7 @@ static CsrInt32 get_value_from_coredump(const coredump_buffer *coreDump,
|
||||
CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req)
|
||||
{
|
||||
CsrResult r;
|
||||
CsrInt32 i = 0;
|
||||
s32 i = 0;
|
||||
coredump_buffer *find_dump = NULL;
|
||||
|
||||
func_enter();
|
||||
@ -548,7 +548,7 @@ done:
|
||||
static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_buf)
|
||||
{
|
||||
CsrResult r = CSR_RESULT_SUCCESS;
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
|
||||
func_enter();
|
||||
|
||||
@ -662,7 +662,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode)
|
||||
{
|
||||
coredump_buffer *newnode = NULL;
|
||||
u16 *newzone = NULL;
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
u32 zone_size;
|
||||
|
||||
/* Allocate node header */
|
||||
|
@ -35,9 +35,9 @@
|
||||
* This is useful for stepping past the signal to the object in the buffer.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrInt32 get_packed_struct_size(const u8 *buf)
|
||||
s32 get_packed_struct_size(const u8 *buf)
|
||||
{
|
||||
CsrInt32 size = 0;
|
||||
s32 size = 0;
|
||||
u16 sig_id;
|
||||
|
||||
sig_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(buf);
|
||||
@ -1150,7 +1150,7 @@ CsrInt32 get_packed_struct_size(const u8 *buf)
|
||||
*/
|
||||
CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig)
|
||||
{
|
||||
CsrInt32 index = 0;
|
||||
s32 index = 0;
|
||||
|
||||
sig->SignalPrimitiveHeader.SignalId = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(ptr + index);
|
||||
index += SIZEOF_UINT16;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "csr_wifi_hip_unifi.h"
|
||||
|
||||
CsrInt32 SigGetSize(const CSR_SIGNAL *aSignal)
|
||||
s32 SigGetSize(const CSR_SIGNAL *aSignal)
|
||||
{
|
||||
switch (aSignal->SignalPrimitiveHeader.SignalId)
|
||||
{
|
||||
@ -383,9 +383,9 @@ CsrInt32 SigGetSize(const CSR_SIGNAL *aSignal)
|
||||
}
|
||||
|
||||
|
||||
CsrInt32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef)
|
||||
s32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef)
|
||||
{
|
||||
CsrInt32 numRefs = 0;
|
||||
s32 numRefs = 0;
|
||||
|
||||
switch (aSignal->SignalPrimitiveHeader.SignalId)
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ extern "C" {
|
||||
* RETURNS:
|
||||
* The number of data-refs in the signal.
|
||||
*/
|
||||
CsrInt32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef);
|
||||
s32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef);
|
||||
|
||||
/******************************************************************************
|
||||
* SigGetSize - Retrieve the size (in bytes) of a given signal.
|
||||
@ -127,7 +127,7 @@ CsrInt32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef);
|
||||
* RETURNS:
|
||||
* The size (in bytes) of the given signal.
|
||||
*/
|
||||
CsrInt32 SigGetSize(const CSR_SIGNAL *aSignal);
|
||||
s32 SigGetSize(const CSR_SIGNAL *aSignal);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -41,15 +41,15 @@
|
||||
* None.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain)
|
||||
s32 unifi_print_status(card_t *card, CsrCharString *str, s32 *remain)
|
||||
{
|
||||
CsrCharString *p = str;
|
||||
sdio_config_data_t *cfg;
|
||||
u16 i, n;
|
||||
CsrInt32 remaining = *remain;
|
||||
CsrInt32 written;
|
||||
s32 remaining = *remain;
|
||||
s32 written;
|
||||
#ifdef CSR_UNSAFE_SDIO_ACCESS
|
||||
CsrInt32 iostate;
|
||||
s32 iostate;
|
||||
CsrResult r;
|
||||
static const CsrCharString *const states[] = {
|
||||
"AWAKE", "DROWSY", "TORPID"
|
||||
|
@ -223,17 +223,17 @@ typedef enum unifi_coredump_space
|
||||
typedef struct unifi_coredump_req
|
||||
{
|
||||
/* From user */
|
||||
CsrInt32 index; /* 0=newest, -1=oldest */
|
||||
s32 index; /* 0=newest, -1=oldest */
|
||||
unifi_coredump_space_t space; /* memory space */
|
||||
u32 offset; /* register offset in space */
|
||||
/* From driver */
|
||||
u32 drv_build; /* Driver build id */
|
||||
u32 chip_ver; /* Chip version */
|
||||
u32 fw_ver; /* Firmware version */
|
||||
CsrInt32 requestor; /* Requestor: 0=auto dump, 1=manual */
|
||||
s32 requestor; /* Requestor: 0=auto dump, 1=manual */
|
||||
CsrTime timestamp; /* time of capture by driver */
|
||||
u32 serial; /* capture serial number */
|
||||
CsrInt32 value; /* register value */
|
||||
s32 value; /* register value */
|
||||
} unifi_coredump_req_t; /* mini-coredumped reg value request */
|
||||
|
||||
|
||||
@ -276,7 +276,7 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdiopriv, void *ospriv);
|
||||
*
|
||||
* @ingroup upperedge
|
||||
*/
|
||||
CsrResult unifi_init_card(card_t *card, CsrInt32 led_mask);
|
||||
CsrResult unifi_init_card(card_t *card, s32 led_mask);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -374,7 +374,7 @@ void unifi_card_info(card_t *card, card_info_t *card_info);
|
||||
*
|
||||
* @ingroup upperedge
|
||||
*/
|
||||
CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status);
|
||||
CsrResult unifi_check_io_status(card_t *card, s32 *status);
|
||||
|
||||
|
||||
/**
|
||||
@ -719,7 +719,7 @@ void* unifi_fw_read_start(void *ospriv, s8 is_fw, const card_info_t *info);
|
||||
*
|
||||
* @ingroup upperedge
|
||||
*/
|
||||
CsrInt32 unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len);
|
||||
s32 unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -834,7 +834,7 @@ void unifi_sdio_interrupt_handler(card_t *card);
|
||||
* that excludes HIP initialization.
|
||||
*/
|
||||
CsrResult unifi_init(card_t *card);
|
||||
CsrResult unifi_download(card_t *card, CsrInt32 led_mask);
|
||||
CsrResult unifi_download(card_t *card, s32 led_mask);
|
||||
|
||||
/*
|
||||
* unifi_start_processors() ensures both on-chip processors are running
|
||||
|
@ -51,7 +51,7 @@ CsrResult unifi_remove_udi_hook(card_t *card, udi_func_t udi_fn);
|
||||
* This is used in the linux /proc interface and might be useful
|
||||
* in other systems.
|
||||
*/
|
||||
CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain);
|
||||
s32 unifi_print_status(card_t *card, CsrCharString *str, s32 *remain);
|
||||
|
||||
#define UNIFI_SNPRINTF_RET(buf_p, remain, written) \
|
||||
do { \
|
||||
|
@ -45,7 +45,7 @@
|
||||
typedef struct
|
||||
{
|
||||
void *dlpriv;
|
||||
CsrInt32 ioffset;
|
||||
s32 ioffset;
|
||||
fwreadfn_t iread;
|
||||
} ct_t;
|
||||
|
||||
@ -84,17 +84,17 @@ typedef struct
|
||||
struct
|
||||
{
|
||||
xbv_container container;
|
||||
CsrInt32 ioffset_end;
|
||||
s32 ioffset_end;
|
||||
} s[XBV_STACK_SIZE];
|
||||
u32 ptr;
|
||||
} xbv_stack_t;
|
||||
|
||||
static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag);
|
||||
static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len);
|
||||
static CsrInt32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len);
|
||||
static CsrInt32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
|
||||
static s32 read_tag(card_t *card, ct_t *ct, tag_t *tag);
|
||||
static s32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len);
|
||||
static s32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len);
|
||||
static s32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
|
||||
xbv_mode new_mode, xbv_container old_cont);
|
||||
static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||
static s32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||
xbv_mode new_mode, xbv_container old_cont,
|
||||
xbv_container new_cont, u32 ioff);
|
||||
|
||||
@ -191,7 +191,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
|
||||
/* Now scan the file */
|
||||
while (1)
|
||||
{
|
||||
CsrInt32 n;
|
||||
s32 n;
|
||||
|
||||
n = read_tag(card, &ct, &tag);
|
||||
if (n < 0)
|
||||
@ -437,7 +437,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
|
||||
|
||||
/* Check the the XBV file is of a consistant sort (either firmware or
|
||||
* patch) and that we are in the correct containing list type. */
|
||||
static CsrInt32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
|
||||
static s32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
|
||||
xbv_mode new_mode, xbv_container old_cont)
|
||||
{
|
||||
/* If the new file mode is unknown the current packet could be in
|
||||
@ -465,7 +465,7 @@ static CsrInt32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
|
||||
|
||||
|
||||
/* Make checks as above and then enter a new list */
|
||||
static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||
static s32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||
xbv_mode new_mode, xbv_container old_cont,
|
||||
xbv_container new_cont, u32 new_ioff)
|
||||
{
|
||||
@ -489,7 +489,7 @@ static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||
}
|
||||
|
||||
|
||||
static u32 xbv2uint(u8 *ptr, CsrInt32 len)
|
||||
static u32 xbv2uint(u8 *ptr, s32 len)
|
||||
{
|
||||
u32 u = 0;
|
||||
s16 i;
|
||||
@ -504,10 +504,10 @@ static u32 xbv2uint(u8 *ptr, CsrInt32 len)
|
||||
}
|
||||
|
||||
|
||||
static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag)
|
||||
static s32 read_tag(card_t *card, ct_t *ct, tag_t *tag)
|
||||
{
|
||||
u8 buf[8];
|
||||
CsrInt32 n;
|
||||
s32 n;
|
||||
|
||||
n = (*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, 8);
|
||||
if (n <= 0)
|
||||
@ -533,10 +533,10 @@ static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag)
|
||||
} /* read_tag() */
|
||||
|
||||
|
||||
static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len)
|
||||
static s32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len)
|
||||
{
|
||||
/* read the tag value */
|
||||
if ((*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, len) != (CsrInt32)len)
|
||||
if ((*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, len) != (s32)len)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -547,7 +547,7 @@ static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len)
|
||||
} /* read_bytes() */
|
||||
|
||||
|
||||
static CsrInt32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len)
|
||||
static s32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len)
|
||||
{
|
||||
u8 buf[4];
|
||||
|
||||
@ -870,11 +870,11 @@ static u32 write_reset_ptdl(void *buf, const u32 offset, const xbv1_t *fwinfo, u
|
||||
* Number of SLUT entries in the f/w, or -1 if the image was corrupt.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
||||
s32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
||||
symbol_t *slut, u32 slut_len)
|
||||
{
|
||||
s16 i;
|
||||
CsrInt32 offset;
|
||||
s32 offset;
|
||||
u32 magic;
|
||||
u32 count = 0;
|
||||
ct_t ct;
|
||||
|
@ -112,10 +112,10 @@ typedef struct
|
||||
} xbv1_t;
|
||||
|
||||
|
||||
typedef CsrInt32 (*fwreadfn_t)(void *ospriv, void *dlpriv, u32 offset, void *buf, u32 len);
|
||||
typedef s32 (*fwreadfn_t)(void *ospriv, void *dlpriv, u32 offset, void *buf, u32 len);
|
||||
|
||||
CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo);
|
||||
CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
||||
s32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
||||
symbol_t *slut, u32 slut_len);
|
||||
void* xbv_to_patch(card_t *card, fwreadfn_t readfn, const void *fw_buf, const xbv1_t *fwinfo,
|
||||
u32 *size);
|
||||
|
@ -130,9 +130,9 @@ DEFINE_SEMAPHORE(udi_mutex);
|
||||
DECLARE_MUTEX(udi_mutex);
|
||||
#endif
|
||||
|
||||
CsrInt32 CsrHipResultToStatus(CsrResult csrResult)
|
||||
s32 CsrHipResultToStatus(CsrResult csrResult)
|
||||
{
|
||||
CsrInt32 r = -EIO;
|
||||
s32 r = -EIO;
|
||||
|
||||
switch (csrResult)
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ void unifi_fw_close_buffer(void *ospriv, void *fwbuf)
|
||||
* The number of bytes read from the firmware image, or -ve on error
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
CsrInt32
|
||||
s32
|
||||
unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len)
|
||||
{
|
||||
const struct dlpriv *dlpriv = arg;
|
||||
|
@ -887,8 +887,8 @@ uf_read_proc(char *page, char **start, off_t offset, int count,
|
||||
unifi_priv_t *priv;
|
||||
int actual_amount_to_copy;
|
||||
char *p, *orig_p;
|
||||
CsrInt32 remain = UNIFI_DEBUG_TXT_BUFFER;
|
||||
CsrInt32 written;
|
||||
s32 remain = UNIFI_DEBUG_TXT_BUFFER;
|
||||
s32 written;
|
||||
int i;
|
||||
|
||||
/*
|
||||
|
@ -546,7 +546,7 @@ free_fw:
|
||||
int unifi_putest_coredump_prepare(unifi_priv_t *priv, unsigned char *arg)
|
||||
{
|
||||
u16 data_u16;
|
||||
CsrInt32 i;
|
||||
s32 i;
|
||||
CsrResult r;
|
||||
|
||||
unifi_info(priv, "Preparing for SDIO coredump\n");
|
||||
|
@ -71,7 +71,7 @@ uf_sme_deinit(unifi_priv_t *priv)
|
||||
int sme_mgt_wifi_on(unifi_priv_t *priv)
|
||||
{
|
||||
int r,i;
|
||||
CsrInt32 csrResult;
|
||||
s32 csrResult;
|
||||
|
||||
if (priv == NULL) {
|
||||
return -EINVAL;
|
||||
|
@ -862,7 +862,7 @@ void uf_handle_tim_cfm(unifi_priv_t *priv, CSR_MLME_SET_TIM_CONFIRM *cfm, u16 re
|
||||
void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, u32 handle)
|
||||
{
|
||||
CSR_SIGNAL signal;
|
||||
CsrInt32 r;
|
||||
s32 r;
|
||||
CSR_MLME_SET_TIM_REQUEST *req = &signal.u.MlmeSetTimRequest;
|
||||
bulk_data_param_t *bulkdata = NULL;
|
||||
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
|
||||
|
@ -818,7 +818,7 @@ typedef struct netInterface_priv
|
||||
#define UNLOCK_DRIVER(_p) (void)(_p); /* as nothing */
|
||||
#endif /* USE_DRIVER_LOCK */
|
||||
|
||||
CsrInt32 CsrHipResultToStatus(CsrResult csrResult);
|
||||
s32 CsrHipResultToStatus(CsrResult csrResult);
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user