aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 15:07:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 15:07:25 -0400
commit95e326c28aa66d6ff5821f3c1d22b46a8d335939 (patch)
tree0a147b3613d9586c2301b79013da15dc48177a0c /drivers
parent26a6b2e1688bc154a16778851d710e90b62f715e (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/csr/csr_formatted_io.c4
-rw-r--r--drivers/staging/csr/csr_formatted_io.h2
-rw-r--r--drivers/staging/csr/csr_time.h2
-rw-r--r--drivers/staging/csr/csr_types.h3
-rw-r--r--drivers/staging/csr/csr_unicode.h4
-rw-r--r--drivers/staging/csr/csr_utf16.c4
-rw-r--r--drivers/staging/csr/csr_util.c12
-rw-r--r--drivers/staging/csr/csr_util.h16
-rw-r--r--drivers/staging/csr/csr_wifi_hip_card_sdio.c20
-rw-r--r--drivers/staging/csr/csr_wifi_hip_card_sdio.h14
-rw-r--r--drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c40
-rw-r--r--drivers/staging/csr/csr_wifi_hip_card_sdio_mem.c14
-rw-r--r--drivers/staging/csr/csr_wifi_hip_chiphelper.c2
-rw-r--r--drivers/staging/csr/csr_wifi_hip_chiphelper.h14
-rw-r--r--drivers/staging/csr/csr_wifi_hip_chiphelper_private.h4
-rw-r--r--drivers/staging/csr/csr_wifi_hip_conversions.h2
-rw-r--r--drivers/staging/csr/csr_wifi_hip_download.c4
-rw-r--r--drivers/staging/csr/csr_wifi_hip_dump.c16
-rw-r--r--drivers/staging/csr/csr_wifi_hip_packing.c6
-rw-r--r--drivers/staging/csr/csr_wifi_hip_signals.c6
-rw-r--r--drivers/staging/csr/csr_wifi_hip_signals.h4
-rw-r--r--drivers/staging/csr/csr_wifi_hip_udi.c8
-rw-r--r--drivers/staging/csr/csr_wifi_hip_unifi.h14
-rw-r--r--drivers/staging/csr/csr_wifi_hip_unifi_udi.h2
-rw-r--r--drivers/staging/csr/csr_wifi_hip_xbv.c36
-rw-r--r--drivers/staging/csr/csr_wifi_hip_xbv.h4
-rw-r--r--drivers/staging/csr/drv.c4
-rw-r--r--drivers/staging/csr/firmware.c2
-rw-r--r--drivers/staging/csr/io.c4
-rw-r--r--drivers/staging/csr/putest.c2
-rw-r--r--drivers/staging/csr/sme_native.c2
-rw-r--r--drivers/staging/csr/unifi_pdu_processing.c2
-rw-r--r--drivers/staging/csr/unifi_priv.h2
33 files changed, 136 insertions, 139 deletions
diff --git a/drivers/staging/csr/csr_formatted_io.c b/drivers/staging/csr/csr_formatted_io.c
index bd6456bcf86..145e99f51fd 100644
--- a/drivers/staging/csr/csr_formatted_io.c
+++ b/drivers/staging/csr/csr_formatted_io.c
@@ -12,9 +12,9 @@
12#include "csr_formatted_io.h" 12#include "csr_formatted_io.h"
13#include "csr_util.h" 13#include "csr_util.h"
14 14
15CsrInt32 CsrSnprintf(CsrCharString *dest, CsrSize n, const CsrCharString *fmt, ...) 15s32 CsrSnprintf(CsrCharString *dest, CsrSize n, const CsrCharString *fmt, ...)
16{ 16{
17 CsrInt32 r; 17 s32 r;
18 va_list args; 18 va_list args;
19 va_start(args, fmt); 19 va_start(args, fmt);
20 r = CsrVsnprintf(dest, n, fmt, args); 20 r = CsrVsnprintf(dest, n, fmt, args);
diff --git a/drivers/staging/csr/csr_formatted_io.h b/drivers/staging/csr/csr_formatted_io.h
index b458eb5ce9c..b51119c3889 100644
--- a/drivers/staging/csr/csr_formatted_io.h
+++ b/drivers/staging/csr/csr_formatted_io.h
@@ -16,7 +16,7 @@ extern "C" {
16 16
17#include "csr_types.h" 17#include "csr_types.h"
18 18
19CsrInt32 CsrSnprintf(CsrCharString *dest, CsrSize n, const CsrCharString *fmt, ...); 19s32 CsrSnprintf(CsrCharString *dest, CsrSize n, const CsrCharString *fmt, ...);
20 20
21#ifdef __cplusplus 21#ifdef __cplusplus
22} 22}
diff --git a/drivers/staging/csr/csr_time.h b/drivers/staging/csr/csr_time.h
index 9687b065b55..286b2895915 100644
--- a/drivers/staging/csr/csr_time.h
+++ b/drivers/staging/csr/csr_time.h
@@ -131,7 +131,7 @@ void CsrTimeUtcGet(CsrTimeUtc *tod, CsrTime *low, CsrTime *high);
131 * CsrTime - "t1" - "t2". 131 * CsrTime - "t1" - "t2".
132 * 132 *
133 *----------------------------------------------------------------------------*/ 133 *----------------------------------------------------------------------------*/
134#define CsrTimeSub(t1, t2) ((CsrInt32) (t1) - (CsrInt32) (t2)) 134#define CsrTimeSub(t1, t2) ((s32) (t1) - (s32) (t2))
135 135
136/*----------------------------------------------------------------------------* 136/*----------------------------------------------------------------------------*
137 * NAME 137 * NAME
diff --git a/drivers/staging/csr/csr_types.h b/drivers/staging/csr/csr_types.h
index 144c980f4db..deaecb6c830 100644
--- a/drivers/staging/csr/csr_types.h
+++ b/drivers/staging/csr/csr_types.h
@@ -32,9 +32,6 @@ typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointer
32typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */ 32typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
33typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */ 33typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
34 34
35/* Signed fixed width types */
36typedef int32_t CsrInt32;
37
38/* Boolean */ 35/* Boolean */
39typedef u8 CsrBool; 36typedef u8 CsrBool;
40 37
diff --git a/drivers/staging/csr/csr_unicode.h b/drivers/staging/csr/csr_unicode.h
index 4a97771280c..47ade653860 100644
--- a/drivers/staging/csr/csr_unicode.h
+++ b/drivers/staging/csr/csr_unicode.h
@@ -38,8 +38,8 @@ CsrUtf16String *CsrUtf16ConcatenateTexts(const CsrUtf16String *inputText1, const
38CsrUtf16String *CsrUtf16String2XML(CsrUtf16String *str); 38CsrUtf16String *CsrUtf16String2XML(CsrUtf16String *str);
39CsrUtf16String *CsrXML2Utf16String(CsrUtf16String *str); 39CsrUtf16String *CsrXML2Utf16String(CsrUtf16String *str);
40 40
41CsrInt32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2); 41s32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2);
42CsrInt32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count); 42s32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count);
43u32 CsrUtf8StringLengthInBytes(const CsrUtf8String *string); 43u32 CsrUtf8StringLengthInBytes(const CsrUtf8String *string);
44 44
45/******************************************************************************* 45/*******************************************************************************
diff --git a/drivers/staging/csr/csr_utf16.c b/drivers/staging/csr/csr_utf16.c
index b9a5c5f033d..504825045aa 100644
--- a/drivers/staging/csr/csr_utf16.c
+++ b/drivers/staging/csr/csr_utf16.c
@@ -1016,12 +1016,12 @@ CsrUtf16String *CsrXML2Utf16String(CsrUtf16String *str)
1016 return resultString; 1016 return resultString;
1017} 1017}
1018 1018
1019CsrInt32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2) 1019s32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2)
1020{ 1020{
1021 return CsrStrCmp((const CsrCharString *) string1, (const CsrCharString *) string2); 1021 return CsrStrCmp((const CsrCharString *) string1, (const CsrCharString *) string2);
1022} 1022}
1023 1023
1024CsrInt32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count) 1024s32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count)
1025{ 1025{
1026 return CsrStrNCmp((const CsrCharString *) string1, (const CsrCharString *) string2, count); 1026 return CsrStrNCmp((const CsrCharString *) string1, (const CsrCharString *) string2, count);
1027} 1027}
diff --git a/drivers/staging/csr/csr_util.c b/drivers/staging/csr/csr_util.c
index edee2e2e67a..170deac2c15 100644
--- a/drivers/staging/csr/csr_util.c
+++ b/drivers/staging/csr/csr_util.c
@@ -145,9 +145,9 @@ u32 CsrPow(u32 base, u32 exponent)
145 145
146/* Convert signed 32 bit (or less) integer to string */ 146/* Convert signed 32 bit (or less) integer to string */
147#define I2B10_MAX 12 147#define I2B10_MAX 12
148void CsrIntToBase10(CsrInt32 number, CsrCharString *str) 148void CsrIntToBase10(s32 number, CsrCharString *str)
149{ 149{
150 CsrInt32 digit; 150 s32 digit;
151 u8 index; 151 u8 index;
152 CsrCharString res[I2B10_MAX]; 152 CsrCharString res[I2B10_MAX];
153 CsrBool foundDigit = FALSE; 153 CsrBool foundDigit = FALSE;
@@ -240,7 +240,7 @@ void *CsrMemMove(void *dest, const void *src, CsrSize count)
240} 240}
241EXPORT_SYMBOL_GPL(CsrMemMove); 241EXPORT_SYMBOL_GPL(CsrMemMove);
242 242
243CsrInt32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count) 243s32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count)
244{ 244{
245 return memcmp(buf1, buf2, count); 245 return memcmp(buf1, buf2, count);
246} 246}
@@ -292,12 +292,12 @@ CsrSize CsrStrLen(const CsrCharString *string)
292} 292}
293EXPORT_SYMBOL_GPL(CsrStrLen); 293EXPORT_SYMBOL_GPL(CsrStrLen);
294 294
295CsrInt32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2) 295s32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2)
296{ 296{
297 return strcmp(string1, string2); 297 return strcmp(string1, string2);
298} 298}
299 299
300CsrInt32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count) 300s32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count)
301{ 301{
302 return strncmp(string1, string2, count); 302 return strncmp(string1, string2, count);
303} 303}
@@ -308,7 +308,7 @@ CsrCharString *CsrStrChr(const CsrCharString *string, CsrCharString c)
308} 308}
309#endif 309#endif
310 310
311CsrInt32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args) 311s32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args)
312{ 312{
313 return vsnprintf(string, count, format, args); 313 return vsnprintf(string, count, format, args);
314} 314}
diff --git a/drivers/staging/csr/csr_util.h b/drivers/staging/csr/csr_util.h
index f19f953b3fe..0d0112780da 100644
--- a/drivers/staging/csr/csr_util.h
+++ b/drivers/staging/csr/csr_util.h
@@ -30,7 +30,7 @@ CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue);
30CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue); 30CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue);
31CsrBool CsrHexStrToUint32(const CsrCharString *string, u32 *returnValue); 31CsrBool CsrHexStrToUint32(const CsrCharString *string, u32 *returnValue);
32u32 CsrPow(u32 base, u32 exponent); 32u32 CsrPow(u32 base, u32 exponent);
33void CsrIntToBase10(CsrInt32 number, CsrCharString *str); 33void CsrIntToBase10(s32 number, CsrCharString *str);
34void CsrUInt16ToHex(u16 number, CsrCharString *str); 34void CsrUInt16ToHex(u16 number, CsrCharString *str);
35void CsrUInt32ToHex(u32 number, CsrCharString *str); 35void CsrUInt32ToHex(u32 number, CsrCharString *str);
36 36
@@ -44,9 +44,9 @@ void CsrUInt32ToHex(u32 number, CsrCharString *str);
44#define CsrStrNCpy strncpy 44#define CsrStrNCpy strncpy
45#define CsrStrCat strcat 45#define CsrStrCat strcat
46#define CsrStrNCat strncat 46#define CsrStrNCat strncat
47#define CsrMemCmp(s1, s2, n) ((CsrInt32) memcmp((s1), (s2), (n))) 47#define CsrMemCmp(s1, s2, n) ((s32) memcmp((s1), (s2), (n)))
48#define CsrStrCmp(s1, s2) ((CsrInt32) strcmp((s1), (s2))) 48#define CsrStrCmp(s1, s2) ((s32) strcmp((s1), (s2)))
49#define CsrStrNCmp(s1, s2, n) ((CsrInt32) strncmp((s1), (s2), (n))) 49#define CsrStrNCmp(s1, s2, n) ((s32) strncmp((s1), (s2), (n)))
50#define CsrStrChr strchr 50#define CsrStrChr strchr
51#define CsrStrStr strstr 51#define CsrStrStr strstr
52#define CsrMemSet memset 52#define CsrMemSet memset
@@ -58,15 +58,15 @@ CsrCharString *CsrStrCpy(CsrCharString *dest, const CsrCharString *src);
58CsrCharString *CsrStrNCpy(CsrCharString *dest, const CsrCharString *src, CsrSize count); 58CsrCharString *CsrStrNCpy(CsrCharString *dest, const CsrCharString *src, CsrSize count);
59CsrCharString *CsrStrCat(CsrCharString *dest, const CsrCharString *src); 59CsrCharString *CsrStrCat(CsrCharString *dest, const CsrCharString *src);
60CsrCharString *CsrStrNCat(CsrCharString *dest, const CsrCharString *src, CsrSize count); 60CsrCharString *CsrStrNCat(CsrCharString *dest, const CsrCharString *src, CsrSize count);
61CsrInt32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count); 61s32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count);
62CsrInt32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2); 62s32 CsrStrCmp(const CsrCharString *string1, const CsrCharString *string2);
63CsrInt32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count); 63s32 CsrStrNCmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count);
64CsrCharString *CsrStrChr(const CsrCharString *string, CsrCharString c); 64CsrCharString *CsrStrChr(const CsrCharString *string, CsrCharString c);
65CsrCharString *CsrStrStr(const CsrCharString *string1, const CsrCharString *string2); 65CsrCharString *CsrStrStr(const CsrCharString *string1, const CsrCharString *string2);
66void *CsrMemSet(void *dest, u8 c, CsrSize count); 66void *CsrMemSet(void *dest, u8 c, CsrSize count);
67CsrSize CsrStrLen(const CsrCharString *string); 67CsrSize CsrStrLen(const CsrCharString *string);
68#endif /* !CSR_USE_STDC_LIB */ 68#endif /* !CSR_USE_STDC_LIB */
69CsrInt32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args); 69s32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString *format, va_list args);
70 70
71/*------------------------------------------------------------------*/ 71/*------------------------------------------------------------------*/
72/* Non-standard utility functions */ 72/* Non-standard utility functions */
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio.c b/drivers/staging/csr/csr_wifi_hip_card_sdio.c
index 0678344cd4e..4c31a214d10 100644
--- a/drivers/staging/csr/csr_wifi_hip_card_sdio.c
+++ b/drivers/staging/csr/csr_wifi_hip_card_sdio.c
@@ -168,7 +168,7 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv)
168 * CSR_RESULT_SUCCESS if successful 168 * CSR_RESULT_SUCCESS if successful
169 * --------------------------------------------------------------------------- 169 * ---------------------------------------------------------------------------
170 */ 170 */
171CsrResult unifi_init_card(card_t *card, CsrInt32 led_mask) 171CsrResult unifi_init_card(card_t *card, s32 led_mask)
172{ 172{
173 CsrResult r; 173 CsrResult r;
174 174
@@ -359,7 +359,7 @@ CsrResult unifi_init(card_t *card)
359 * CsrResult error code on failure. 359 * CsrResult error code on failure.
360 * --------------------------------------------------------------------------- 360 * ---------------------------------------------------------------------------
361 */ 361 */
362CsrResult unifi_download(card_t *card, CsrInt32 led_mask) 362CsrResult unifi_download(card_t *card, s32 led_mask)
363{ 363{
364 CsrResult r; 364 CsrResult r;
365 void *dlpriv; 365 void *dlpriv;
@@ -1235,7 +1235,7 @@ static CsrResult card_wait_for_unifi_to_disable(card_t *card)
1235 */ 1235 */
1236CsrResult card_wait_for_firmware_to_start(card_t *card, u32 *paddr) 1236CsrResult card_wait_for_firmware_to_start(card_t *card, u32 *paddr)
1237{ 1237{
1238 CsrInt32 i; 1238 s32 i;
1239 u16 mbox0, mbox1; 1239 u16 mbox0, mbox1;
1240 CsrResult r; 1240 CsrResult r;
1241 1241
@@ -1403,7 +1403,7 @@ CsrResult unifi_capture_panic(card_t *card)
1403static CsrResult card_access_panic(card_t *card) 1403static CsrResult card_access_panic(card_t *card)
1404{ 1404{
1405 u16 data_u16 = 0; 1405 u16 data_u16 = 0;
1406 CsrInt32 i; 1406 s32 i;
1407 CsrResult r, sr; 1407 CsrResult r, sr;
1408 1408
1409 func_enter(); 1409 func_enter();
@@ -2221,7 +2221,7 @@ static void CardCheckDynamicReservation(card_t *card, unifi_TrafficQueue queue)
2221{ 2221{
2222 u16 q_len, active_queues = 0, excess_queue_slots, div_extra_slots, 2222 u16 q_len, active_queues = 0, excess_queue_slots, div_extra_slots,
2223 queue_fair_share, reserved_slots = 0, q, excess_need_queues = 0, unmovable_slots = 0; 2223 queue_fair_share, reserved_slots = 0, q, excess_need_queues = 0, unmovable_slots = 0;
2224 CsrInt32 i; 2224 s32 i;
2225 q_t *sigq; 2225 q_t *sigq;
2226 u16 num_data_slots = card->config_data.num_fromhost_data_slots - UNIFI_RESERVED_COMMAND_SLOTS; 2226 u16 num_data_slots = card->config_data.num_fromhost_data_slots - UNIFI_RESERVED_COMMAND_SLOTS;
2227 2227
@@ -2246,11 +2246,11 @@ static void CardCheckDynamicReservation(card_t *card, unifi_TrafficQueue queue)
2246 2246
2247 for (i = 0; i < UNIFI_NO_OF_TX_QS; i++) 2247 for (i = 0; i < UNIFI_NO_OF_TX_QS; i++)
2248 { 2248 {
2249 if (i != (CsrInt32)queue) 2249 if (i != (s32)queue)
2250 { 2250 {
2251 reserved_slots += card->dynamic_slot_data.from_host_reserved_slots[i]; 2251 reserved_slots += card->dynamic_slot_data.from_host_reserved_slots[i];
2252 } 2252 }
2253 if ((i == (CsrInt32)queue) || (card->dynamic_slot_data.from_host_reserved_slots[i] > 0)) 2253 if ((i == (s32)queue) || (card->dynamic_slot_data.from_host_reserved_slots[i] > 0))
2254 { 2254 {
2255 active_queues++; 2255 active_queues++;
2256 } 2256 }
@@ -4032,7 +4032,7 @@ void unifi_card_info(card_t *card, card_info_t *card_info)
4032 * CSR_RESULT_SUCCESS if OK, or CSR error 4032 * CSR_RESULT_SUCCESS if OK, or CSR error
4033 * --------------------------------------------------------------------------- 4033 * ---------------------------------------------------------------------------
4034 */ 4034 */
4035CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status) 4035CsrResult unifi_check_io_status(card_t *card, s32 *status)
4036{ 4036{
4037 u8 io_en; 4037 u8 io_en;
4038 CsrResult r; 4038 CsrResult r;
@@ -4053,7 +4053,7 @@ CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status)
4053 4053
4054 if ((io_en & (1 << card->function)) == 0) 4054 if ((io_en & (1 << card->function)) == 0)
4055 { 4055 {
4056 CsrInt32 fw_count; 4056 s32 fw_count;
4057 *status = 1; 4057 *status = 1;
4058 unifi_error(card->ospriv, "UniFi has spontaneously reset.\n"); 4058 unifi_error(card->ospriv, "UniFi has spontaneously reset.\n");
4059 4059
@@ -4102,7 +4102,7 @@ CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status)
4102 4102
4103void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo) 4103void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo)
4104{ 4104{
4105 CsrInt32 count_fhr; 4105 s32 count_fhr;
4106 s16 t; 4106 s16 t;
4107 u32 occupied_fh; 4107 u32 occupied_fh;
4108 4108
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio.h b/drivers/staging/csr/csr_wifi_hip_card_sdio.h
index 42fce7b3ae4..036258ac8e3 100644
--- a/drivers/staging/csr/csr_wifi_hip_card_sdio.h
+++ b/drivers/staging/csr/csr_wifi_hip_card_sdio.h
@@ -431,7 +431,7 @@ struct card
431 * We assume these are connected to LEDs. The main firmware gets 431 * We assume these are connected to LEDs. The main firmware gets
432 * the mask from a MIB entry. 432 * the mask from a MIB entry.
433 */ 433 */
434 CsrInt32 loader_led_mask; 434 s32 loader_led_mask;
435 435
436 /* 436 /*
437 * Support for flow control. When the from-host queue of signals 437 * Support for flow control. When the from-host queue of signals
@@ -490,10 +490,10 @@ struct card
490 * These are the modulo-256 count of signals written to or read from UniFi 490 * These are the modulo-256 count of signals written to or read from UniFi
491 * The value is incremented for every signal. 491 * The value is incremented for every signal.
492 */ 492 */
493 CsrInt32 from_host_signals_w; 493 s32 from_host_signals_w;
494 CsrInt32 from_host_signals_r; 494 s32 from_host_signals_r;
495 CsrInt32 to_host_signals_r; 495 s32 to_host_signals_r;
496 CsrInt32 to_host_signals_w; 496 s32 to_host_signals_w;
497 497
498 498
499 /* Should specify buffer size as a number of signals */ 499 /* 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);
653 653
654 654
655CsrResult unifi_set_proc_select(card_t *card, enum unifi_dbg_processors_select select); 655CsrResult unifi_set_proc_select(card_t *card, enum unifi_dbg_processors_select select);
656CsrInt32 card_read_signal_counts(card_t *card); 656s32 card_read_signal_counts(card_t *card);
657bulk_data_desc_t* card_find_data_slot(card_t *card, s16 slot); 657bulk_data_desc_t* card_find_data_slot(card_t *card, s16 slot);
658 658
659 659
660CsrResult unifi_read32(card_t *card, u32 unifi_addr, u32 *pdata); 660CsrResult unifi_read32(card_t *card, u32 unifi_addr, u32 *pdata);
661CsrResult unifi_readnz(card_t *card, u32 unifi_addr, 661CsrResult unifi_readnz(card_t *card, u32 unifi_addr,
662 void *pdata, u16 len); 662 void *pdata, u16 len);
663CsrInt32 unifi_read_shared_count(card_t *card, u32 addr); 663s32 unifi_read_shared_count(card_t *card, u32 addr);
664 664
665CsrResult unifi_writen(card_t *card, u32 unifi_addr, void *pdata, u16 len); 665CsrResult unifi_writen(card_t *card, u32 unifi_addr, void *pdata, u16 len);
666 666
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c
index 9c9e9070f6b..4cf84d5bffd 100644
--- a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c
+++ b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c
@@ -47,18 +47,18 @@ static CsrResult handle_host_protocol(card_t *card, CsrBool *processed_something
47 47
48static CsrResult flush_fh_buffer(card_t *card); 48static CsrResult flush_fh_buffer(card_t *card);
49 49
50static CsrResult check_fh_sig_slots(card_t *card, u16 needed, CsrInt32 *space); 50static CsrResult check_fh_sig_slots(card_t *card, u16 needed, s32 *space);
51 51
52static CsrResult read_to_host_signals(card_t *card, CsrInt32 *processed); 52static CsrResult read_to_host_signals(card_t *card, s32 *processed);
53static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed); 53static CsrResult process_to_host_signals(card_t *card, s32 *processed);
54 54
55static CsrResult process_bulk_data_command(card_t *card, 55static CsrResult process_bulk_data_command(card_t *card,
56 const u8 *cmdptr, 56 const u8 *cmdptr,
57 s16 cmd, u16 len); 57 s16 cmd, u16 len);
58static CsrResult process_clear_slot_command(card_t *card, 58static CsrResult process_clear_slot_command(card_t *card,
59 const u8 *cmdptr); 59 const u8 *cmdptr);
60static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed); 60static CsrResult process_fh_cmd_queue(card_t *card, s32 *processed);
61static CsrResult process_fh_traffic_queue(card_t *card, CsrInt32 *processed); 61static CsrResult process_fh_traffic_queue(card_t *card, s32 *processed);
62static void restart_packet_flow(card_t *card); 62static void restart_packet_flow(card_t *card);
63static CsrResult process_clock_request(card_t *card); 63static CsrResult process_clock_request(card_t *card);
64 64
@@ -158,7 +158,7 @@ void unifi_debug_hex_to_buf(const CsrCharString *buff, u16 length)
158 158
159void unifi_debug_buf_dump(void) 159void unifi_debug_buf_dump(void)
160{ 160{
161 CsrInt32 offset = unifi_dbgbuf_ptr - unifi_debug_output; 161 s32 offset = unifi_dbgbuf_ptr - unifi_debug_output;
162 162
163 unifi_error(NULL, "HIP debug buffer offset=%d\n", offset); 163 unifi_error(NULL, "HIP debug buffer offset=%d\n", offset);
164 dump_str(unifi_debug_output + offset, UNIFI_DEBUG_GBUFFER_SIZE - offset); 164 dump_str(unifi_debug_output + offset, UNIFI_DEBUG_GBUFFER_SIZE - offset);
@@ -359,7 +359,7 @@ CsrResult unifi_bh(card_t *card, u32 *remaining)
359 CsrResult r; 359 CsrResult r;
360 CsrResult csrResult; 360 CsrResult csrResult;
361 CsrBool pending; 361 CsrBool pending;
362 CsrInt32 iostate, j; 362 s32 iostate, j;
363 const enum unifi_low_power_mode low_power_mode = card->low_power_mode; 363 const enum unifi_low_power_mode low_power_mode = card->low_power_mode;
364 u16 data_slots_used = 0; 364 u16 data_slots_used = 0;
365 365
@@ -845,7 +845,7 @@ static CsrResult process_bh(card_t *card)
845static CsrResult handle_host_protocol(card_t *card, CsrBool *processed_something) 845static CsrResult handle_host_protocol(card_t *card, CsrBool *processed_something)
846{ 846{
847 CsrResult r; 847 CsrResult r;
848 CsrInt32 done; 848 s32 done;
849 849
850 *processed_something = FALSE; 850 *processed_something = FALSE;
851 851
@@ -982,10 +982,10 @@ static CsrResult handle_host_protocol(card_t *card, CsrBool *processed_something
982 * CSR error code if an error occurred. 982 * CSR error code if an error occurred.
983 * --------------------------------------------------------------------------- 983 * ---------------------------------------------------------------------------
984 */ 984 */
985static CsrResult read_to_host_signals(card_t *card, CsrInt32 *processed) 985static CsrResult read_to_host_signals(card_t *card, s32 *processed)
986{ 986{
987 CsrInt32 count_thw, count_thr; 987 s32 count_thw, count_thr;
988 CsrInt32 unread_chunks, unread_bytes; 988 s32 unread_chunks, unread_bytes;
989 CsrResult r; 989 CsrResult r;
990 990
991 *processed = 0; 991 *processed = 0;
@@ -1143,7 +1143,7 @@ static void read_unpack_cmd(const u8 *ptr, bulk_data_cmd_t *bulk_data_cmd)
1143 * indicate all data, as we have read it from the device. 1143 * indicate all data, as we have read it from the device.
1144 * --------------------------------------------------------------------------- 1144 * ---------------------------------------------------------------------------
1145 */ 1145 */
1146static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed) 1146static CsrResult process_to_host_signals(card_t *card, s32 *processed)
1147{ 1147{
1148 s16 pending; 1148 s16 pending;
1149 s16 remaining; 1149 s16 remaining;
@@ -1514,7 +1514,7 @@ static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
1514 /* Use a safe copy because source and destination may overlap */ 1514 /* Use a safe copy because source and destination may overlap */
1515 u8 *d = card->th_buffer.buf; 1515 u8 *d = card->th_buffer.buf;
1516 u8 *s = bufptr; 1516 u8 *s = bufptr;
1517 CsrInt32 n = remaining; 1517 s32 n = remaining;
1518 while (n--) 1518 while (n--)
1519 { 1519 {
1520 *d++ = *s++; 1520 *d++ = *s++;
@@ -1839,11 +1839,11 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr,
1839 * CSR_RESULT_SUCCESS, otherwise CSR error code on error. 1839 * CSR_RESULT_SUCCESS, otherwise CSR error code on error.
1840 * --------------------------------------------------------------------------- 1840 * ---------------------------------------------------------------------------
1841 */ 1841 */
1842static CsrResult check_fh_sig_slots(card_t *card, u16 needed, CsrInt32 *space_fh) 1842static CsrResult check_fh_sig_slots(card_t *card, u16 needed, s32 *space_fh)
1843{ 1843{
1844 u32 count_fhw; 1844 u32 count_fhw;
1845 u32 occupied_fh, slots_fh; 1845 u32 occupied_fh, slots_fh;
1846 CsrInt32 count_fhr; 1846 s32 count_fhr;
1847 1847
1848 count_fhw = card->from_host_signals_w; 1848 count_fhw = card->from_host_signals_w;
1849 count_fhr = card->from_host_signals_r; 1849 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
1940 * structure that describes the queue to make the distiction. 1940 * structure that describes the queue to make the distiction.
1941 * --------------------------------------------------------------------------- 1941 * ---------------------------------------------------------------------------
1942 */ 1942 */
1943static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed) 1943static CsrResult process_fh_cmd_queue(card_t *card, s32 *processed)
1944{ 1944{
1945 q_t *sigq = &card->fh_command_queue; 1945 q_t *sigq = &card->fh_command_queue;
1946 1946
@@ -1948,7 +1948,7 @@ static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed)
1948 u16 pending_sigs; 1948 u16 pending_sigs;
1949 u16 pending_chunks; 1949 u16 pending_chunks;
1950 u16 needed_chunks; 1950 u16 needed_chunks;
1951 CsrInt32 space_chunks; 1951 s32 space_chunks;
1952 u16 q_index; 1952 u16 q_index;
1953 1953
1954 *processed = 0; 1954 *processed = 0;
@@ -2168,17 +2168,17 @@ static CsrResult process_fh_cmd_queue(card_t *card, CsrInt32 *processed)
2168 * and any UDI clients interspersed. 2168 * and any UDI clients interspersed.
2169 * --------------------------------------------------------------------------- 2169 * ---------------------------------------------------------------------------
2170 */ 2170 */
2171static CsrResult process_fh_traffic_queue(card_t *card, CsrInt32 *processed) 2171static CsrResult process_fh_traffic_queue(card_t *card, s32 *processed)
2172{ 2172{
2173 q_t *sigq = card->fh_traffic_queue; 2173 q_t *sigq = card->fh_traffic_queue;
2174 2174
2175 CsrResult r; 2175 CsrResult r;
2176 s16 n = 0; 2176 s16 n = 0;
2177 CsrInt32 q_no; 2177 s32 q_no;
2178 u16 pending_sigs = 0; 2178 u16 pending_sigs = 0;
2179 u16 pending_chunks = 0; 2179 u16 pending_chunks = 0;
2180 u16 needed_chunks; 2180 u16 needed_chunks;
2181 CsrInt32 space_chunks; 2181 s32 space_chunks;
2182 u16 q_index; 2182 u16 q_index;
2183 u32 host_tag = 0; 2183 u32 host_tag = 0;
2184 u16 slot_num = 0; 2184 u16 slot_num = 0;
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio_mem.c b/drivers/staging/csr/csr_wifi_hip_card_sdio_mem.c
index 0454f435a68..17867f60df1 100644
--- a/drivers/staging/csr/csr_wifi_hip_card_sdio_mem.c
+++ b/drivers/staging/csr/csr_wifi_hip_card_sdio_mem.c
@@ -603,7 +603,7 @@ static CsrResult unifi_read_directn_match(card_t *card, u32 addr, void *pdata, u
603 addr += 2; 603 addr += 2;
604 } 604 }
605 605
606 *num = (CsrInt32)(cptr - (u8 *)pdata); 606 *num = (s32)(cptr - (u8 *)pdata);
607 return CSR_RESULT_SUCCESS; 607 return CSR_RESULT_SUCCESS;
608} 608}
609 609
@@ -747,7 +747,7 @@ static CsrResult set_dmem_page(card_t *card, u32 dmem_addr, u32 *paddr)
747 card->dmem_page = page; 747 card->dmem_page = page;
748 } 748 }
749 749
750 *paddr = ((CsrInt32)addr * 2) + (dmem_addr & 1); 750 *paddr = ((s32)addr * 2) + (dmem_addr & 1);
751 751
752 return CSR_RESULT_SUCCESS; 752 return CSR_RESULT_SUCCESS;
753} /* set_dmem_page() */ 753} /* set_dmem_page() */
@@ -787,7 +787,7 @@ static CsrResult set_pmem_page(card_t *card, u32 pmem_addr,
787 card->pmem_page = page; 787 card->pmem_page = page;
788 } 788 }
789 789
790 *paddr = ((CsrInt32)addr * 2) + (pmem_addr & 1); 790 *paddr = ((s32)addr * 2) + (pmem_addr & 1);
791 791
792 return CSR_RESULT_SUCCESS; 792 return CSR_RESULT_SUCCESS;
793} /* set_pmem_page() */ 793} /* set_pmem_page() */
@@ -816,7 +816,7 @@ static CsrResult set_pmem_page(card_t *card, u32 pmem_addr,
816 */ 816 */
817static CsrResult set_page(card_t *card, u32 generic_addr, u32 *paddr) 817static CsrResult set_page(card_t *card, u32 generic_addr, u32 *paddr)
818{ 818{
819 CsrInt32 space; 819 s32 space;
820 u32 addr; 820 u32 addr;
821 CsrResult r = CSR_RESULT_SUCCESS; 821 CsrResult r = CSR_RESULT_SUCCESS;
822 822
@@ -1323,7 +1323,7 @@ CsrResult unifi_readnz(card_t *card, u32 unifi_addr, void *pdata, u16 len)
1323 * Value read from memory (0-127) or -1 on error 1323 * Value read from memory (0-127) or -1 on error
1324 * --------------------------------------------------------------------------- 1324 * ---------------------------------------------------------------------------
1325 */ 1325 */
1326CsrInt32 unifi_read_shared_count(card_t *card, u32 addr) 1326s32 unifi_read_shared_count(card_t *card, u32 addr)
1327{ 1327{
1328 u8 b; 1328 u8 b;
1329 /* I've increased this count, because I have seen cases where 1329 /* 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)
1332 * with increasing this limit. It's better to take a while to 1332 * with increasing this limit. It's better to take a while to
1333 * recover than to fail. */ 1333 * recover than to fail. */
1334#define SHARED_READ_RETRY_LIMIT 10 1334#define SHARED_READ_RETRY_LIMIT 10
1335 CsrInt32 i; 1335 s32 i;
1336 1336
1337 /* 1337 /*
1338 * Get the to-host-signals-written count. 1338 * Get the to-host-signals-written count.
@@ -1355,7 +1355,7 @@ CsrInt32 unifi_read_shared_count(card_t *card, u32 addr)
1355 * This avoids a race between driver read and firmware write of the 1355 * This avoids a race between driver read and firmware write of the
1356 * word, the value we need is in the lower 8 bits anway. 1356 * word, the value we need is in the lower 8 bits anway.
1357 */ 1357 */
1358 return (CsrInt32)(b & 0xff); 1358 return (s32)(b & 0xff);
1359 } 1359 }
1360 } 1360 }
1361 1361
diff --git a/drivers/staging/csr/csr_wifi_hip_chiphelper.c b/drivers/staging/csr/csr_wifi_hip_chiphelper.c
index 4e8cc3fa655..1654d2842bb 100644
--- a/drivers/staging/csr/csr_wifi_hip_chiphelper.c
+++ b/drivers/staging/csr/csr_wifi_hip_chiphelper.c
@@ -743,7 +743,7 @@ u32 ChipHelper_HostResetSequence(ChipDescript *chip_he
743 743
744 744
745/* Decode a windowed access to the chip. */ 745/* Decode a windowed access to the chip. */
746CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help, 746s32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
747 enum chip_helper_window_index window, 747 enum chip_helper_window_index window,
748 enum chip_helper_window_type type, 748 enum chip_helper_window_type type,
749 u32 offset, 749 u32 offset,
diff --git a/drivers/staging/csr/csr_wifi_hip_chiphelper.h b/drivers/staging/csr/csr_wifi_hip_chiphelper.h
index 11cff4e0b49..dbf7c0e261f 100644
--- a/drivers/staging/csr/csr_wifi_hip_chiphelper.h
+++ b/drivers/staging/csr/csr_wifi_hip_chiphelper.h
@@ -235,11 +235,11 @@ ChipDescript* ChipHelper_GetVersionBlueCore(enum chip_helper_bluecore_age age,
235 CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_FLASH_OFFSET, prog_offset.flash)) \ 235 CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_FLASH_OFFSET, prog_offset.flash)) \
236 CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_EXT_SRAM_OFFSET, prog_offset.ext_sram)) \ 236 CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_EXT_SRAM_OFFSET, prog_offset.ext_sram)) \
237 CHIP_HELPER_DEF0(m, (u16, DATA_MEMORY_RAM_OFFSET, data_offset.ram)) \ 237 CHIP_HELPER_DEF0(m, (u16, DATA_MEMORY_RAM_OFFSET, data_offset.ram)) \
238 CHIP_HELPER_DEF0(m, (CsrInt32, HasFlash, bools.has_flash)) \ 238 CHIP_HELPER_DEF0(m, (s32, HasFlash, bools.has_flash)) \
239 CHIP_HELPER_DEF0(m, (CsrInt32, HasExtSram, bools.has_ext_sram)) \ 239 CHIP_HELPER_DEF0(m, (s32, HasExtSram, bools.has_ext_sram)) \
240 CHIP_HELPER_DEF0(m, (CsrInt32, HasRom, bools.has_rom)) \ 240 CHIP_HELPER_DEF0(m, (s32, HasRom, bools.has_rom)) \
241 CHIP_HELPER_DEF0(m, (CsrInt32, HasBt, bools.has_bt)) \ 241 CHIP_HELPER_DEF0(m, (s32, HasBt, bools.has_bt)) \
242 CHIP_HELPER_DEF0(m, (CsrInt32, HasWLan, bools.has_wlan)) \ 242 CHIP_HELPER_DEF0(m, (s32, HasWLan, bools.has_wlan)) \
243 CHIP_HELPER_DEF1(m, (u16, WINDOW_ADDRESS, enum chip_helper_window_index, window)) \ 243 CHIP_HELPER_DEF1(m, (u16, WINDOW_ADDRESS, enum chip_helper_window_index, window)) \
244 CHIP_HELPER_DEF1(m, (u16, WINDOW_SIZE, enum chip_helper_window_index, window)) \ 244 CHIP_HELPER_DEF1(m, (u16, WINDOW_SIZE, enum chip_helper_window_index, window)) \
245 CHIP_HELPER_DEF1(m, (u16, MapAddress_SPI2HOST, u16, addr)) \ 245 CHIP_HELPER_DEF1(m, (u16, MapAddress_SPI2HOST, u16, addr)) \
@@ -402,7 +402,7 @@ CHIP_HELPER_LIST(C_DEC)
402 address in the XAPs 16 address map to read from. 'len' 402 address in the XAPs 16 address map to read from. 'len'
403 is the length that we can read without having to change 403 is the length that we can read without having to change
404 the page registers. */ 404 the page registers. */
405CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help, 405s32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
406 enum chip_helper_window_index window, 406 enum chip_helper_window_index window,
407 enum chip_helper_window_type type, 407 enum chip_helper_window_type type,
408 u32 offset, 408 u32 offset,
@@ -457,7 +457,7 @@ public:
457 457
458 458
459 /* The DecodeWindow function, see the description of the C version. */ 459 /* The DecodeWindow function, see the description of the C version. */
460 CsrInt32 DecodeWindow(chip_helper_window_index window, 460 s32 DecodeWindow(chip_helper_window_index window,
461 chip_helper_window_type type, 461 chip_helper_window_type type,
462 u32 offset, 462 u32 offset,
463 u16 &page, u16 &addr, u32 &len) const; 463 u16 &page, u16 &addr, u32 &len) const;
diff --git a/drivers/staging/csr/csr_wifi_hip_chiphelper_private.h b/drivers/staging/csr/csr_wifi_hip_chiphelper_private.h
index de6e063f466..93e30b62fe7 100644
--- a/drivers/staging/csr/csr_wifi_hip_chiphelper_private.h
+++ b/drivers/staging/csr/csr_wifi_hip_chiphelper_private.h
@@ -117,7 +117,7 @@ struct chip_device_regs_t
117 written to the page register. */ 117 written to the page register. */
118struct window_shift_info_t 118struct window_shift_info_t
119{ 119{
120 CsrInt32 allowed; 120 s32 allowed;
121 u32 page_shift; 121 u32 page_shift;
122 u16 page_offset; 122 u16 page_offset;
123}; 123};
@@ -140,7 +140,7 @@ struct window_info_t
140 address of GBL_CHIP_VERSION is FF9A, else its FE81. */ 140 address of GBL_CHIP_VERSION is FF9A, else its FE81. */
141struct chip_version_t 141struct chip_version_t
142{ 142{
143 CsrInt32 pre_bc7; 143 s32 pre_bc7;
144 u16 mask; 144 u16 mask;
145 u16 result; 145 u16 result;
146 u8 sdio; 146 u8 sdio;
diff --git a/drivers/staging/csr/csr_wifi_hip_conversions.h b/drivers/staging/csr/csr_wifi_hip_conversions.h
index 58a2d724e3f..7d045c06936 100644
--- a/drivers/staging/csr/csr_wifi_hip_conversions.h
+++ b/drivers/staging/csr/csr_wifi_hip_conversions.h
@@ -69,7 +69,7 @@ extern "C" {
69 CSR_GET_UINT16_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + UNIFI_MAX_DATA_REFERENCES * SIZEOF_DATAREF + 2)) 69 CSR_GET_UINT16_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + UNIFI_MAX_DATA_REFERENCES * SIZEOF_DATAREF + 2))
70 70
71 71
72CsrInt32 get_packed_struct_size(const u8 *buf); 72s32 get_packed_struct_size(const u8 *buf);
73CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig); 73CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig);
74CsrResult write_pack(const CSR_SIGNAL *sig, u8 *ptr, u16 *sig_len); 74CsrResult write_pack(const CSR_SIGNAL *sig, u8 *ptr, u16 *sig_len);
75 75
diff --git a/drivers/staging/csr/csr_wifi_hip_download.c b/drivers/staging/csr/csr_wifi_hip_download.c
index e90faf3864c..a9d0c39c341 100644
--- a/drivers/staging/csr/csr_wifi_hip_download.c
+++ b/drivers/staging/csr/csr_wifi_hip_download.c
@@ -659,7 +659,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
659{ 659{
660 u32 offset; 660 u32 offset;
661 u8 *buf; 661 u8 *buf;
662 CsrInt32 data_len; 662 s32 data_len;
663 u32 write_len; 663 u32 write_len;
664 CsrResult r; 664 CsrResult r;
665 const u16 buf_size = 2 * 1024; 665 const u16 buf_size = 2 * 1024;
@@ -756,7 +756,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
756static CsrResult do_patch_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo, u32 boot_ctrl_addr) 756static CsrResult do_patch_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo, u32 boot_ctrl_addr)
757{ 757{
758 CsrResult r; 758 CsrResult r;
759 CsrInt32 i; 759 s32 i;
760 u16 loader_version; 760 u16 loader_version;
761 u16 handle; 761 u16 handle;
762 u32 total_bytes; 762 u32 total_bytes;
diff --git a/drivers/staging/csr/csr_wifi_hip_dump.c b/drivers/staging/csr/csr_wifi_hip_dump.c
index 2f70a6cd80d..3dee9972d18 100644
--- a/drivers/staging/csr/csr_wifi_hip_dump.c
+++ b/drivers/staging/csr/csr_wifi_hip_dump.c
@@ -63,7 +63,7 @@ static CsrResult unifi_coredump_from_sdio(card_t *card, coredump_buffer *dump_bu
63static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_buf); 63static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_buf);
64static CsrResult unifi_coredump_read_zone(card_t *card, u16 *zone, 64static CsrResult unifi_coredump_read_zone(card_t *card, u16 *zone,
65 const struct coredump_zone *def); 65 const struct coredump_zone *def);
66static CsrInt32 get_value_from_coredump(const coredump_buffer *dump, 66static s32 get_value_from_coredump(const coredump_buffer *dump,
67 const unifi_coredump_space_t space, const u16 offset); 67 const unifi_coredump_space_t space, const u16 offset);
68 68
69/* Table of chip memory zones we capture on mini-coredump */ 69/* Table of chip memory zones we capture on mini-coredump */
@@ -293,14 +293,14 @@ done:
293 * Notes: 293 * Notes:
294 * --------------------------------------------------------------------------- 294 * ---------------------------------------------------------------------------
295 */ 295 */
296static CsrInt32 get_value_from_coredump(const coredump_buffer *coreDump, 296static s32 get_value_from_coredump(const coredump_buffer *coreDump,
297 const unifi_coredump_space_t space, 297 const unifi_coredump_space_t space,
298 const u16 offset_in_space) 298 const u16 offset_in_space)
299{ 299{
300 CsrInt32 r = -1; 300 s32 r = -1;
301 u16 offset_in_zone; 301 u16 offset_in_zone;
302 u32 zone_end_offset; 302 u32 zone_end_offset;
303 CsrInt32 i; 303 s32 i;
304 const struct coredump_zone *def = &zonedef_table[0]; 304 const struct coredump_zone *def = &zonedef_table[0];
305 305
306 /* Search zone def table for a match with the requested memory space */ 306 /* 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,
316 { 316 {
317 /* Calculate the offset of data within the zone buffer */ 317 /* Calculate the offset of data within the zone buffer */
318 offset_in_zone = offset_in_space - def->offset; 318 offset_in_zone = offset_in_space - def->offset;
319 r = (CsrInt32) * (coreDump->zone[i] + offset_in_zone); 319 r = (s32) * (coreDump->zone[i] + offset_in_zone);
320 320
321 unifi_trace(NULL, UDBG6, 321 unifi_trace(NULL, UDBG6,
322 "sp %d, offs 0x%04x = 0x%04x (in z%d 0x%04x->0x%04x)\n", 322 "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,
354CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req) 354CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req)
355{ 355{
356 CsrResult r; 356 CsrResult r;
357 CsrInt32 i = 0; 357 s32 i = 0;
358 coredump_buffer *find_dump = NULL; 358 coredump_buffer *find_dump = NULL;
359 359
360 func_enter(); 360 func_enter();
@@ -548,7 +548,7 @@ done:
548static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_buf) 548static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_buf)
549{ 549{
550 CsrResult r = CSR_RESULT_SUCCESS; 550 CsrResult r = CSR_RESULT_SUCCESS;
551 CsrInt32 i; 551 s32 i;
552 552
553 func_enter(); 553 func_enter();
554 554
@@ -662,7 +662,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode)
662{ 662{
663 coredump_buffer *newnode = NULL; 663 coredump_buffer *newnode = NULL;
664 u16 *newzone = NULL; 664 u16 *newzone = NULL;
665 CsrInt32 i; 665 s32 i;
666 u32 zone_size; 666 u32 zone_size;
667 667
668 /* Allocate node header */ 668 /* Allocate node header */
diff --git a/drivers/staging/csr/csr_wifi_hip_packing.c b/drivers/staging/csr/csr_wifi_hip_packing.c
index f3a192d85e1..c01bb1372eb 100644
--- a/drivers/staging/csr/csr_wifi_hip_packing.c
+++ b/drivers/staging/csr/csr_wifi_hip_packing.c
@@ -35,9 +35,9 @@
35 * This is useful for stepping past the signal to the object in the buffer. 35 * This is useful for stepping past the signal to the object in the buffer.
36 * --------------------------------------------------------------------------- 36 * ---------------------------------------------------------------------------
37 */ 37 */
38CsrInt32 get_packed_struct_size(const u8 *buf) 38s32 get_packed_struct_size(const u8 *buf)
39{ 39{
40 CsrInt32 size = 0; 40 s32 size = 0;
41 u16 sig_id; 41 u16 sig_id;
42 42
43 sig_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(buf); 43 sig_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(buf);
@@ -1150,7 +1150,7 @@ CsrInt32 get_packed_struct_size(const u8 *buf)
1150 */ 1150 */
1151CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig) 1151CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig)
1152{ 1152{
1153 CsrInt32 index = 0; 1153 s32 index = 0;
1154 1154
1155 sig->SignalPrimitiveHeader.SignalId = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(ptr + index); 1155 sig->SignalPrimitiveHeader.SignalId = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(ptr + index);
1156 index += SIZEOF_UINT16; 1156 index += SIZEOF_UINT16;
diff --git a/drivers/staging/csr/csr_wifi_hip_signals.c b/drivers/staging/csr/csr_wifi_hip_signals.c
index 43d9b8e5ede..d3dc9bd2bc1 100644
--- a/drivers/staging/csr/csr_wifi_hip_signals.c
+++ b/drivers/staging/csr/csr_wifi_hip_signals.c
@@ -17,7 +17,7 @@
17 17
18#include "csr_wifi_hip_unifi.h" 18#include "csr_wifi_hip_unifi.h"
19 19
20CsrInt32 SigGetSize(const CSR_SIGNAL *aSignal) 20s32 SigGetSize(const CSR_SIGNAL *aSignal)
21{ 21{
22 switch (aSignal->SignalPrimitiveHeader.SignalId) 22 switch (aSignal->SignalPrimitiveHeader.SignalId)
23 { 23 {
@@ -383,9 +383,9 @@ CsrInt32 SigGetSize(const CSR_SIGNAL *aSignal)
383} 383}
384 384
385 385
386CsrInt32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef) 386s32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef)
387{ 387{
388 CsrInt32 numRefs = 0; 388 s32 numRefs = 0;
389 389
390 switch (aSignal->SignalPrimitiveHeader.SignalId) 390 switch (aSignal->SignalPrimitiveHeader.SignalId)
391 { 391 {
diff --git a/drivers/staging/csr/csr_wifi_hip_signals.h b/drivers/staging/csr/csr_wifi_hip_signals.h
index c48fddd5fa3..29c9a7c76cc 100644
--- a/drivers/staging/csr/csr_wifi_hip_signals.h
+++ b/drivers/staging/csr/csr_wifi_hip_signals.h
@@ -116,7 +116,7 @@ extern "C" {
116 * RETURNS: 116 * RETURNS:
117 * The number of data-refs in the signal. 117 * The number of data-refs in the signal.
118 */ 118 */
119CsrInt32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef); 119s32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef);
120 120
121/****************************************************************************** 121/******************************************************************************
122 * SigGetSize - Retrieve the size (in bytes) of a given signal. 122 * SigGetSize - Retrieve the size (in bytes) of a given signal.
@@ -127,7 +127,7 @@ CsrInt32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef);
127 * RETURNS: 127 * RETURNS:
128 * The size (in bytes) of the given signal. 128 * The size (in bytes) of the given signal.
129 */ 129 */
130CsrInt32 SigGetSize(const CSR_SIGNAL *aSignal); 130s32 SigGetSize(const CSR_SIGNAL *aSignal);
131 131
132#ifdef __cplusplus 132#ifdef __cplusplus
133} 133}
diff --git a/drivers/staging/csr/csr_wifi_hip_udi.c b/drivers/staging/csr/csr_wifi_hip_udi.c
index 72deb2f0b34..0ea60f5bd02 100644
--- a/drivers/staging/csr/csr_wifi_hip_udi.c
+++ b/drivers/staging/csr/csr_wifi_hip_udi.c
@@ -41,15 +41,15 @@
41 * None. 41 * None.
42 * --------------------------------------------------------------------------- 42 * ---------------------------------------------------------------------------
43 */ 43 */
44CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain) 44s32 unifi_print_status(card_t *card, CsrCharString *str, s32 *remain)
45{ 45{
46 CsrCharString *p = str; 46 CsrCharString *p = str;
47 sdio_config_data_t *cfg; 47 sdio_config_data_t *cfg;
48 u16 i, n; 48 u16 i, n;
49 CsrInt32 remaining = *remain; 49 s32 remaining = *remain;
50 CsrInt32 written; 50 s32 written;
51#ifdef CSR_UNSAFE_SDIO_ACCESS 51#ifdef CSR_UNSAFE_SDIO_ACCESS
52 CsrInt32 iostate; 52 s32 iostate;
53 CsrResult r; 53 CsrResult r;
54 static const CsrCharString *const states[] = { 54 static const CsrCharString *const states[] = {
55 "AWAKE", "DROWSY", "TORPID" 55 "AWAKE", "DROWSY", "TORPID"
diff --git a/drivers/staging/csr/csr_wifi_hip_unifi.h b/drivers/staging/csr/csr_wifi_hip_unifi.h
index 6f2090e374e..892686fe8f4 100644
--- a/drivers/staging/csr/csr_wifi_hip_unifi.h
+++ b/drivers/staging/csr/csr_wifi_hip_unifi.h
@@ -223,17 +223,17 @@ typedef enum unifi_coredump_space
223typedef struct unifi_coredump_req 223typedef struct unifi_coredump_req
224{ 224{
225 /* From user */ 225 /* From user */
226 CsrInt32 index; /* 0=newest, -1=oldest */ 226 s32 index; /* 0=newest, -1=oldest */
227 unifi_coredump_space_t space; /* memory space */ 227 unifi_coredump_space_t space; /* memory space */
228 u32 offset; /* register offset in space */ 228 u32 offset; /* register offset in space */
229 /* From driver */ 229 /* From driver */
230 u32 drv_build; /* Driver build id */ 230 u32 drv_build; /* Driver build id */
231 u32 chip_ver; /* Chip version */ 231 u32 chip_ver; /* Chip version */
232 u32 fw_ver; /* Firmware version */ 232 u32 fw_ver; /* Firmware version */
233 CsrInt32 requestor; /* Requestor: 0=auto dump, 1=manual */ 233 s32 requestor; /* Requestor: 0=auto dump, 1=manual */
234 CsrTime timestamp; /* time of capture by driver */ 234 CsrTime timestamp; /* time of capture by driver */
235 u32 serial; /* capture serial number */ 235 u32 serial; /* capture serial number */
236 CsrInt32 value; /* register value */ 236 s32 value; /* register value */
237} unifi_coredump_req_t; /* mini-coredumped reg value request */ 237} unifi_coredump_req_t; /* mini-coredumped reg value request */
238 238
239 239
@@ -276,7 +276,7 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdiopriv, void *ospriv);
276 * 276 *
277 * @ingroup upperedge 277 * @ingroup upperedge
278 */ 278 */
279CsrResult unifi_init_card(card_t *card, CsrInt32 led_mask); 279CsrResult unifi_init_card(card_t *card, s32 led_mask);
280 280
281/** 281/**
282 * 282 *
@@ -374,7 +374,7 @@ void unifi_card_info(card_t *card, card_info_t *card_info);
374 * 374 *
375 * @ingroup upperedge 375 * @ingroup upperedge
376 */ 376 */
377CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status); 377CsrResult unifi_check_io_status(card_t *card, s32 *status);
378 378
379 379
380/** 380/**
@@ -719,7 +719,7 @@ void* unifi_fw_read_start(void *ospriv, s8 is_fw, const card_info_t *info);
719 * 719 *
720 * @ingroup upperedge 720 * @ingroup upperedge
721 */ 721 */
722CsrInt32 unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len); 722s32 unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len);
723 723
724/** 724/**
725 * 725 *
@@ -834,7 +834,7 @@ void unifi_sdio_interrupt_handler(card_t *card);
834 * that excludes HIP initialization. 834 * that excludes HIP initialization.
835 */ 835 */
836CsrResult unifi_init(card_t *card); 836CsrResult unifi_init(card_t *card);
837CsrResult unifi_download(card_t *card, CsrInt32 led_mask); 837CsrResult unifi_download(card_t *card, s32 led_mask);
838 838
839/* 839/*
840 * unifi_start_processors() ensures both on-chip processors are running 840 * unifi_start_processors() ensures both on-chip processors are running
diff --git a/drivers/staging/csr/csr_wifi_hip_unifi_udi.h b/drivers/staging/csr/csr_wifi_hip_unifi_udi.h
index 774bdc95826..79f08100c4c 100644
--- a/drivers/staging/csr/csr_wifi_hip_unifi_udi.h
+++ b/drivers/staging/csr/csr_wifi_hip_unifi_udi.h
@@ -51,7 +51,7 @@ CsrResult unifi_remove_udi_hook(card_t *card, udi_func_t udi_fn);
51 * This is used in the linux /proc interface and might be useful 51 * This is used in the linux /proc interface and might be useful
52 * in other systems. 52 * in other systems.
53 */ 53 */
54CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain); 54s32 unifi_print_status(card_t *card, CsrCharString *str, s32 *remain);
55 55
56#define UNIFI_SNPRINTF_RET(buf_p, remain, written) \ 56#define UNIFI_SNPRINTF_RET(buf_p, remain, written) \
57 do { \ 57 do { \
diff --git a/drivers/staging/csr/csr_wifi_hip_xbv.c b/drivers/staging/csr/csr_wifi_hip_xbv.c
index 3d559af2852..1e5042907bb 100644
--- a/drivers/staging/csr/csr_wifi_hip_xbv.c
+++ b/drivers/staging/csr/csr_wifi_hip_xbv.c
@@ -45,7 +45,7 @@
45typedef struct 45typedef struct
46{ 46{
47 void *dlpriv; 47 void *dlpriv;
48 CsrInt32 ioffset; 48 s32 ioffset;
49 fwreadfn_t iread; 49 fwreadfn_t iread;
50} ct_t; 50} ct_t;
51 51
@@ -84,17 +84,17 @@ typedef struct
84 struct 84 struct
85 { 85 {
86 xbv_container container; 86 xbv_container container;
87 CsrInt32 ioffset_end; 87 s32 ioffset_end;
88 } s[XBV_STACK_SIZE]; 88 } s[XBV_STACK_SIZE];
89 u32 ptr; 89 u32 ptr;
90} xbv_stack_t; 90} xbv_stack_t;
91 91
92static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag); 92static s32 read_tag(card_t *card, ct_t *ct, tag_t *tag);
93static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len); 93static s32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len);
94static CsrInt32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len); 94static s32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len);
95static CsrInt32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack, 95static s32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
96 xbv_mode new_mode, xbv_container old_cont); 96 xbv_mode new_mode, xbv_container old_cont);
97static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack, 97static s32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
98 xbv_mode new_mode, xbv_container old_cont, 98 xbv_mode new_mode, xbv_container old_cont,
99 xbv_container new_cont, u32 ioff); 99 xbv_container new_cont, u32 ioff);
100 100
@@ -191,7 +191,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
191 /* Now scan the file */ 191 /* Now scan the file */
192 while (1) 192 while (1)
193 { 193 {
194 CsrInt32 n; 194 s32 n;
195 195
196 n = read_tag(card, &ct, &tag); 196 n = read_tag(card, &ct, &tag);
197 if (n < 0) 197 if (n < 0)
@@ -437,7 +437,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
437 437
438/* Check the the XBV file is of a consistant sort (either firmware or 438/* Check the the XBV file is of a consistant sort (either firmware or
439 * patch) and that we are in the correct containing list type. */ 439 * patch) and that we are in the correct containing list type. */
440static CsrInt32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack, 440static s32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
441 xbv_mode new_mode, xbv_container old_cont) 441 xbv_mode new_mode, xbv_container old_cont)
442{ 442{
443 /* If the new file mode is unknown the current packet could be in 443 /* 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,
465 465
466 466
467/* Make checks as above and then enter a new list */ 467/* Make checks as above and then enter a new list */
468static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack, 468static s32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
469 xbv_mode new_mode, xbv_container old_cont, 469 xbv_mode new_mode, xbv_container old_cont,
470 xbv_container new_cont, u32 new_ioff) 470 xbv_container new_cont, u32 new_ioff)
471{ 471{
@@ -489,7 +489,7 @@ static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
489} 489}
490 490
491 491
492static u32 xbv2uint(u8 *ptr, CsrInt32 len) 492static u32 xbv2uint(u8 *ptr, s32 len)
493{ 493{
494 u32 u = 0; 494 u32 u = 0;
495 s16 i; 495 s16 i;
@@ -504,10 +504,10 @@ static u32 xbv2uint(u8 *ptr, CsrInt32 len)
504} 504}
505 505
506 506
507static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag) 507static s32 read_tag(card_t *card, ct_t *ct, tag_t *tag)
508{ 508{
509 u8 buf[8]; 509 u8 buf[8];
510 CsrInt32 n; 510 s32 n;
511 511
512 n = (*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, 8); 512 n = (*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, 8);
513 if (n <= 0) 513 if (n <= 0)
@@ -533,10 +533,10 @@ static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag)
533} /* read_tag() */ 533} /* read_tag() */
534 534
535 535
536static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len) 536static s32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len)
537{ 537{
538 /* read the tag value */ 538 /* read the tag value */
539 if ((*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, len) != (CsrInt32)len) 539 if ((*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, len) != (s32)len)
540 { 540 {
541 return -1; 541 return -1;
542 } 542 }
@@ -547,7 +547,7 @@ static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len)
547} /* read_bytes() */ 547} /* read_bytes() */
548 548
549 549
550static CsrInt32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len) 550static s32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len)
551{ 551{
552 u8 buf[4]; 552 u8 buf[4];
553 553
@@ -870,11 +870,11 @@ static u32 write_reset_ptdl(void *buf, const u32 offset, const xbv1_t *fwinfo, u
870 * Number of SLUT entries in the f/w, or -1 if the image was corrupt. 870 * Number of SLUT entries in the f/w, or -1 if the image was corrupt.
871 * --------------------------------------------------------------------------- 871 * ---------------------------------------------------------------------------
872 */ 872 */
873CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo, 873s32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
874 symbol_t *slut, u32 slut_len) 874 symbol_t *slut, u32 slut_len)
875{ 875{
876 s16 i; 876 s16 i;
877 CsrInt32 offset; 877 s32 offset;
878 u32 magic; 878 u32 magic;
879 u32 count = 0; 879 u32 count = 0;
880 ct_t ct; 880 ct_t ct;
diff --git a/drivers/staging/csr/csr_wifi_hip_xbv.h b/drivers/staging/csr/csr_wifi_hip_xbv.h
index 3e3771e15d9..9b60a7e2dc7 100644
--- a/drivers/staging/csr/csr_wifi_hip_xbv.h
+++ b/drivers/staging/csr/csr_wifi_hip_xbv.h
@@ -112,10 +112,10 @@ typedef struct
112} xbv1_t; 112} xbv1_t;
113 113
114 114
115typedef CsrInt32 (*fwreadfn_t)(void *ospriv, void *dlpriv, u32 offset, void *buf, u32 len); 115typedef s32 (*fwreadfn_t)(void *ospriv, void *dlpriv, u32 offset, void *buf, u32 len);
116 116
117CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo); 117CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo);
118CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo, 118s32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
119 symbol_t *slut, u32 slut_len); 119 symbol_t *slut, u32 slut_len);
120void* xbv_to_patch(card_t *card, fwreadfn_t readfn, const void *fw_buf, const xbv1_t *fwinfo, 120void* xbv_to_patch(card_t *card, fwreadfn_t readfn, const void *fw_buf, const xbv1_t *fwinfo,
121 u32 *size); 121 u32 *size);
diff --git a/drivers/staging/csr/drv.c b/drivers/staging/csr/drv.c
index c5beb220c21..36d9d539f9f 100644
--- a/drivers/staging/csr/drv.c
+++ b/drivers/staging/csr/drv.c
@@ -130,9 +130,9 @@ DEFINE_SEMAPHORE(udi_mutex);
130DECLARE_MUTEX(udi_mutex); 130DECLARE_MUTEX(udi_mutex);
131#endif 131#endif
132 132
133CsrInt32 CsrHipResultToStatus(CsrResult csrResult) 133s32 CsrHipResultToStatus(CsrResult csrResult)
134{ 134{
135 CsrInt32 r = -EIO; 135 s32 r = -EIO;
136 136
137 switch (csrResult) 137 switch (csrResult)
138 { 138 {
diff --git a/drivers/staging/csr/firmware.c b/drivers/staging/csr/firmware.c
index b8716541c6e..b994d1470f8 100644
--- a/drivers/staging/csr/firmware.c
+++ b/drivers/staging/csr/firmware.c
@@ -196,7 +196,7 @@ void unifi_fw_close_buffer(void *ospriv, void *fwbuf)
196 * The number of bytes read from the firmware image, or -ve on error 196 * The number of bytes read from the firmware image, or -ve on error
197 * --------------------------------------------------------------------------- 197 * ---------------------------------------------------------------------------
198 */ 198 */
199CsrInt32 199s32
200unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len) 200unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len)
201{ 201{
202 const struct dlpriv *dlpriv = arg; 202 const struct dlpriv *dlpriv = arg;
diff --git a/drivers/staging/csr/io.c b/drivers/staging/csr/io.c
index d0895797f62..65b8895a8a8 100644
--- a/drivers/staging/csr/io.c
+++ b/drivers/staging/csr/io.c
@@ -887,8 +887,8 @@ uf_read_proc(char *page, char **start, off_t offset, int count,
887 unifi_priv_t *priv; 887 unifi_priv_t *priv;
888 int actual_amount_to_copy; 888 int actual_amount_to_copy;
889 char *p, *orig_p; 889 char *p, *orig_p;
890 CsrInt32 remain = UNIFI_DEBUG_TXT_BUFFER; 890 s32 remain = UNIFI_DEBUG_TXT_BUFFER;
891 CsrInt32 written; 891 s32 written;
892 int i; 892 int i;
893 893
894 /* 894 /*
diff --git a/drivers/staging/csr/putest.c b/drivers/staging/csr/putest.c
index 9c9dc60c900..96597ac5330 100644
--- a/drivers/staging/csr/putest.c
+++ b/drivers/staging/csr/putest.c
@@ -546,7 +546,7 @@ free_fw:
546int unifi_putest_coredump_prepare(unifi_priv_t *priv, unsigned char *arg) 546int unifi_putest_coredump_prepare(unifi_priv_t *priv, unsigned char *arg)
547{ 547{
548 u16 data_u16; 548 u16 data_u16;
549 CsrInt32 i; 549 s32 i;
550 CsrResult r; 550 CsrResult r;
551 551
552 unifi_info(priv, "Preparing for SDIO coredump\n"); 552 unifi_info(priv, "Preparing for SDIO coredump\n");
diff --git a/drivers/staging/csr/sme_native.c b/drivers/staging/csr/sme_native.c
index f22b804e729..229268fd746 100644
--- a/drivers/staging/csr/sme_native.c
+++ b/drivers/staging/csr/sme_native.c
@@ -71,7 +71,7 @@ uf_sme_deinit(unifi_priv_t *priv)
71int sme_mgt_wifi_on(unifi_priv_t *priv) 71int sme_mgt_wifi_on(unifi_priv_t *priv)
72{ 72{
73 int r,i; 73 int r,i;
74 CsrInt32 csrResult; 74 s32 csrResult;
75 75
76 if (priv == NULL) { 76 if (priv == NULL) {
77 return -EINVAL; 77 return -EINVAL;
diff --git a/drivers/staging/csr/unifi_pdu_processing.c b/drivers/staging/csr/unifi_pdu_processing.c
index 7c5fb4592e9..d1afa3a076c 100644
--- a/drivers/staging/csr/unifi_pdu_processing.c
+++ b/drivers/staging/csr/unifi_pdu_processing.c
@@ -862,7 +862,7 @@ void uf_handle_tim_cfm(unifi_priv_t *priv, CSR_MLME_SET_TIM_CONFIRM *cfm, u16 re
862void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, u32 handle) 862void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, u32 handle)
863{ 863{
864 CSR_SIGNAL signal; 864 CSR_SIGNAL signal;
865 CsrInt32 r; 865 s32 r;
866 CSR_MLME_SET_TIM_REQUEST *req = &signal.u.MlmeSetTimRequest; 866 CSR_MLME_SET_TIM_REQUEST *req = &signal.u.MlmeSetTimRequest;
867 bulk_data_param_t *bulkdata = NULL; 867 bulk_data_param_t *bulkdata = NULL;
868 netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag]; 868 netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
diff --git a/drivers/staging/csr/unifi_priv.h b/drivers/staging/csr/unifi_priv.h
index 2e05015e92f..2f8f0311d72 100644
--- a/drivers/staging/csr/unifi_priv.h
+++ b/drivers/staging/csr/unifi_priv.h
@@ -818,7 +818,7 @@ typedef struct netInterface_priv
818#define UNLOCK_DRIVER(_p) (void)(_p); /* as nothing */ 818#define UNLOCK_DRIVER(_p) (void)(_p); /* as nothing */
819#endif /* USE_DRIVER_LOCK */ 819#endif /* USE_DRIVER_LOCK */
820 820
821CsrInt32 CsrHipResultToStatus(CsrResult csrResult); 821s32 CsrHipResultToStatus(CsrResult csrResult);
822 822
823 823
824/* 824/*