staging: csr: remove CsrInt8 typedef
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jul 2012 18:56:26 +0000 (11:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jul 2012 18:56:26 +0000 (11:56 -0700)
Use the in-kernel s8 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>
14 files changed:
drivers/staging/csr/csr_types.h
drivers/staging/csr/csr_utf16.c
drivers/staging/csr/csr_wifi_hip_card.h
drivers/staging/csr/csr_wifi_hip_card_sdio_mem.c
drivers/staging/csr/csr_wifi_hip_download.c
drivers/staging/csr/csr_wifi_hip_dump.c
drivers/staging/csr/csr_wifi_hip_unifi.h
drivers/staging/csr/csr_wifi_sme_prim.h
drivers/staging/csr/csr_wifi_sme_serialize.c
drivers/staging/csr/firmware.c
drivers/staging/csr/netdev.c
drivers/staging/csr/sme_sys.c
drivers/staging/csr/unifi_pdu_processing.c
drivers/staging/csr/unifi_priv.h

index 683e077..e295060 100644 (file)
@@ -37,7 +37,6 @@ typedef uint16_t CsrUint16;
 typedef uint32_t CsrUint32;
 
 /* Signed fixed width types */
-typedef int8_t CsrInt8;
 typedef int16_t CsrInt16;
 typedef int32_t CsrInt32;
 
index 42fb7b0..6f709da 100644 (file)
@@ -43,7 +43,7 @@
 *       F1-F3    80-BF    80-BF    80-BF
 *       F4       80-8F    80-BF    80-BF
 */
-static const CsrInt8 trailingBytesForUtf8[256] =
+static const s8 trailingBytesForUtf8[256] =
 {
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                                 /* 0x00 - 0x1F */
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                                 /* 0x20 - 0x3F */
@@ -568,7 +568,7 @@ CsrUtf16String *CsrUtf82Utf16String(const CsrUtf8String *utf8String)
     CsrSize sourceLength;
     CsrUtf16String *dest = NULL;
     CsrUtf16String *destStart = NULL;
-    CsrInt8 extraBytes2Read;
+    s8 extraBytes2Read;
 
     if (!utf8String)
     {
index c99a606..fcaf27d 100644 (file)
@@ -104,7 +104,7 @@ CsrResult card_wait_for_firmware_to_start(card_t *card, CsrUint32 *paddr);
 CsrResult unifi_dl_firmware(card_t *card, void *arg);
 CsrResult unifi_dl_patch(card_t *card, void *arg, CsrUint32 boot_ctrl);
 CsrResult unifi_do_loader_op(card_t *card, CsrUint32 op_addr, u8 opcode);
-void* unifi_dl_fw_read_start(card_t *card, CsrInt8 is_fw);
+void* unifi_dl_fw_read_start(card_t *card, s8 is_fw);
 
 CsrResult unifi_coredump_handle_request(card_t *card);
 
index d5066ac..d98610f 100644 (file)
@@ -564,7 +564,7 @@ CsrResult unifi_read_direct32(card_t *card, CsrUint32 addr, CsrUint32 *pdata)
  *      even address is read.
  * ---------------------------------------------------------------------------
  */
-static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pdata, CsrUint16 len, CsrInt8 m, CsrUint32 *num)
+static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pdata, CsrUint16 len, s8 m, CsrUint32 *num)
 {
     CsrResult r;
     CsrUint32 i;
@@ -583,7 +583,7 @@ static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pd
         }
 
         *cptr++ = ((u8)w & 0xFF);
-        if ((m >= 0) && (((CsrInt8)w & 0xFF) == m))
+        if ((m >= 0) && (((s8)w & 0xFF) == m))
         {
             break;
         }
@@ -595,7 +595,7 @@ static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pd
         }
 
         *cptr++ = ((u8)(w >> 8) & 0xFF);
-        if ((m >= 0) && (((CsrInt8)(w >> 8) & 0xFF) == m))
+        if ((m >= 0) && (((s8)(w >> 8) & 0xFF) == m))
         {
             break;
         }
@@ -1278,7 +1278,7 @@ CsrResult unifi_read32(card_t *card, CsrUint32 unifi_addr, CsrUint32 *pdata)
  *      CSR_WIFI_HIP_RESULT_INVALID_VALUE  a bad generic pointer was specified
  * ---------------------------------------------------------------------------
  */
-CsrResult unifi_readn_match(card_t *card, CsrUint32 unifi_addr, void *pdata, CsrUint16 len, CsrInt8 match)
+CsrResult unifi_readn_match(card_t *card, CsrUint32 unifi_addr, void *pdata, CsrUint16 len, s8 match)
 {
     CsrUint32 sdio_addr;
     CsrResult r;
index c43f589..4f7dae8 100644 (file)
@@ -465,7 +465,7 @@ CsrResult unifi_dl_patch(card_t *card, void *dlpriv, CsrUint32 boot_ctrl)
 } /* unifi_dl_patch() */
 
 
-void* unifi_dl_fw_read_start(card_t *card, CsrInt8 is_fw)
+void* unifi_dl_fw_read_start(card_t *card, s8 is_fw)
 {
     card_info_t card_info;
 
index 5297f10..efa699f 100644 (file)
@@ -99,7 +99,7 @@ static const struct coredump_zone zonedef_table[HIP_CDUMP_NUM_ZONES] = {
  *      immediately after that, the mini-coredump can be captured.
  * ---------------------------------------------------------------------------
  */
-CsrResult unifi_coredump_request_at_next_reset(card_t *card, CsrInt8 enable)
+CsrResult unifi_coredump_request_at_next_reset(card_t *card, s8 enable)
 {
     CsrResult r;
 
index 62d7740..1fb9d76 100644 (file)
@@ -701,7 +701,7 @@ void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo);
  *
  * @ingroup upperedge
  */
-void* unifi_fw_read_start(void *ospriv, CsrInt8 is_fw, const card_info_t *info);
+void* unifi_fw_read_start(void *ospriv, s8 is_fw, const card_info_t *info);
 
 /**
  *
@@ -871,7 +871,7 @@ void unifi_debug_hex_to_buf(const CsrCharString *buff, CsrUint16 length);
 /* Mini-coredump utility functions */
 CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req);
 CsrResult unifi_coredump_capture(card_t *card, struct unifi_coredump_req *req);
-CsrResult unifi_coredump_request_at_next_reset(card_t *card, CsrInt8 enable);
+CsrResult unifi_coredump_request_at_next_reset(card_t *card, s8 enable);
 CsrResult unifi_coredump_init(card_t *card, CsrUint16 num_dump_buffers);
 void unifi_coredump_free(card_t *card);
 
index c9734a7..700f268 100644 (file)
@@ -3087,12 +3087,12 @@ typedef struct
     CsrWifiSmeScanConfigData scanCfg[4];
     CsrBool                  disableAutonomousScans;
     CsrUint16                maxResults;
-    CsrInt8                  highRssiThreshold;
-    CsrInt8                  lowRssiThreshold;
-    CsrInt8                  deltaRssiThreshold;
-    CsrInt8                  highSnrThreshold;
-    CsrInt8                  lowSnrThreshold;
-    CsrInt8                  deltaSnrThreshold;
+    s8                  highRssiThreshold;
+    s8                  lowRssiThreshold;
+    s8                  deltaRssiThreshold;
+    s8                  highSnrThreshold;
+    s8                  lowSnrThreshold;
+    s8                  deltaSnrThreshold;
     CsrUint16                passiveChannelListCount;
     u8                *passiveChannelList;
 } CsrWifiSmeScanConfig;
index 4558629..f35f836 100644 (file)
@@ -1133,12 +1133,12 @@ CsrSize CsrWifiSmeScanConfigSetReqSizeof(void *msg)
     }
     bufferSize += 1;                                             /* CsrBool primitive->scanConfig.disableAutonomousScans */
     bufferSize += 2;                                             /* CsrUint16 primitive->scanConfig.maxResults */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.highRssiThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.lowRssiThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.deltaRssiThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.highSnrThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.lowSnrThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.deltaSnrThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.highRssiThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.lowRssiThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.deltaRssiThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.highSnrThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.lowSnrThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.deltaSnrThreshold */
     bufferSize += 2;                                             /* CsrUint16 primitive->scanConfig.passiveChannelListCount */
     bufferSize += primitive->scanConfig.passiveChannelListCount; /* u8 primitive->scanConfig.passiveChannelList */
     return bufferSize;
@@ -4412,12 +4412,12 @@ CsrSize CsrWifiSmeScanConfigGetCfmSizeof(void *msg)
     }
     bufferSize += 1;                                             /* CsrBool primitive->scanConfig.disableAutonomousScans */
     bufferSize += 2;                                             /* CsrUint16 primitive->scanConfig.maxResults */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.highRssiThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.lowRssiThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.deltaRssiThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.highSnrThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.lowSnrThreshold */
-    bufferSize += 1;                                             /* CsrInt8 primitive->scanConfig.deltaSnrThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.highRssiThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.lowRssiThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.deltaRssiThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.highSnrThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.lowSnrThreshold */
+    bufferSize += 1;                                             /* s8 primitive->scanConfig.deltaSnrThreshold */
     bufferSize += 2;                                             /* CsrUint16 primitive->scanConfig.passiveChannelListCount */
     bufferSize += primitive->scanConfig.passiveChannelListCount; /* u8 primitive->scanConfig.passiveChannelList */
     return bufferSize;
index 98e27d6..8199ff9 100644 (file)
@@ -57,7 +57,7 @@
  * ---------------------------------------------------------------------------
  */
 void*
-unifi_fw_read_start(void *ospriv, CsrInt8 is_fw, const card_info_t *info)
+unifi_fw_read_start(void *ospriv, s8 is_fw, const card_info_t *info)
 {
     unifi_priv_t *priv = (unifi_priv_t*)ospriv;
     CSR_UNUSED(info);
index e18395c..cef0ba3 100644 (file)
@@ -1080,7 +1080,7 @@ skb_add_llc_snap(struct net_device *dev, struct sk_buff *skb, int proto)
 #ifdef CSR_SUPPORT_SME
 static int
 _identify_sme_ma_pkt_ind(unifi_priv_t *priv,
-                         const CsrInt8 *oui, CsrUint16 protocol,
+                         const s8 *oui, CsrUint16 protocol,
                          const CSR_SIGNAL *signal,
                          bulk_data_param_t *bulkdata,
                          const unsigned char *daddr,
@@ -1657,7 +1657,7 @@ send_ma_pkt_request(unifi_priv_t *priv, struct sk_buff *skb, const struct ethhdr
     CsrUint16 interfaceTag;
     CsrWifiMacAddress peerAddress;
     CSR_TRANSMISSION_CONTROL transmissionControl = CSR_NO_CONFIRM_REQUIRED;
-    CsrInt8 protection;
+    s8 protection;
     netInterface_priv_t *interfacePriv = NULL;
     CSR_RATE TransmitRate = (CSR_RATE)0;
 
index a84d99f..e28e7c8 100644 (file)
@@ -404,7 +404,7 @@ uf_send_gratuitous_arp(unifi_priv_t *priv, CsrUint16 interfaceTag)
     bulk_data_param_t bulkdata;
     CsrResult csrResult;
     struct sk_buff *skb, *newSkb = NULL;
-    CsrInt8 protection;
+    s8 protection;
     int r;
     static const u8 arp_req[36] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00,
                                          0x08, 0x06, 0x00, 0x01, 0x08, 0x00, 0x06, 0x04, 0x00, 0x01,
@@ -1366,7 +1366,7 @@ _sys_packet_req(unifi_priv_t *priv, const CSR_SIGNAL *signal,
     CsrResult csrResult;
     CsrUint16 interfaceTag = req.VirtualInterfaceIdentifier & 0xff;
     CsrBool eapolStore = FALSE;
-    CsrInt8 protection = 0;
+    s8 protection = 0;
     netInterface_priv_t *interfacePriv;
     unsigned long flags;
 
index 3c0491b..a007a59 100644 (file)
@@ -1976,9 +1976,9 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
 }
 
 #ifdef CSR_SUPPORT_SME
-CsrInt8 uf_get_protection_bit_from_interfacemode(unifi_priv_t *priv, CsrUint16 interfaceTag, const u8 *daddr)
+s8 uf_get_protection_bit_from_interfacemode(unifi_priv_t *priv, CsrUint16 interfaceTag, const u8 *daddr)
 {
-    CsrInt8 protection = 0;
+    s8 protection = 0;
     netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
 
     switch(interfacePriv->interfaceMode)
@@ -2205,7 +2205,7 @@ void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata,
 
 static CsrBool uf_is_more_data_for_delivery_ac(unifi_priv_t *priv, CsrWifiRouterCtrlStaInfo_t *staRecord)
 {
-    CsrInt8 i;
+    s8 i;
 
     for(i=UNIFI_TRAFFIC_Q_VO; i >= UNIFI_TRAFFIC_Q_BK; i--)
     {
@@ -2223,7 +2223,7 @@ static CsrBool uf_is_more_data_for_delivery_ac(unifi_priv_t *priv, CsrWifiRouter
 
 static CsrBool uf_is_more_data_for_usp_delivery(unifi_priv_t *priv, CsrWifiRouterCtrlStaInfo_t *staRecord, unifi_TrafficQueue queue)
 {
-    CsrInt8 i;
+    s8 i;
 
     for(i = queue; i >= UNIFI_TRAFFIC_Q_BK; i--)
     {
@@ -2269,7 +2269,7 @@ void uf_send_buffered_data_from_delivery_ac(unifi_priv_t *priv,
     tx_buffered_packets_t * buffered_pkt = NULL;
     unsigned long lock_flags;
     CsrBool eosp=FALSE;
-    CsrInt8 r =0;
+    s8 r =0;
     CsrBool moreData = FALSE;
     netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
 
@@ -2370,7 +2370,7 @@ void uf_send_buffered_data_from_ac(unifi_priv_t *priv,
     unsigned long lock_flags;
     CsrBool eosp=FALSE;
     CsrBool moreData = FALSE;
-    CsrInt8 r =0;
+    s8 r =0;
 
     func_enter();
 
@@ -2639,7 +2639,7 @@ int uf_process_station_records_for_sending_data(unifi_priv_t *priv,CsrUint16 int
 static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlStaInfo_t *staInfo, CsrUint16 interfaceTag)
 {
 
-    CsrInt8 i;
+    s8 i;
     u8 allDeliveryEnabled = 0, dataAvailable = 0;
     netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
     unsigned long lock_flags;
@@ -3059,7 +3059,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,CsrUint16 inte
     tx_buffered_packets_t * buffered_pkt = NULL;
     CsrWifiMacAddress peerMacAddress;
     unsigned long lock_flags;
-    CsrInt8 r =0;
+    s8 r =0;
     CsrBool moreData = FALSE;
     netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
 
@@ -3233,7 +3233,7 @@ void uf_process_ps_poll(unifi_priv_t *priv,u8* sa,u8* da,u8 pmBit,CsrUint16 inte
                 }
 
         } else {
-            CsrInt8 i;
+            s8 i;
             /* We dont have buffered packet in mangement frame queue (1 failed), So proceed with condition 2
              * UNIFI_TRAFFIC_Q_VO -> VI -> BE -> BK
              */
index 666e17f..f56c702 100644 (file)
@@ -1071,7 +1071,7 @@ CsrBool blockack_session_stop(unifi_priv_t *priv,
                               CsrWifiMacAddress macAddress);
 #ifdef CSR_SUPPORT_SME
 /* Fetch the protection information from interface Mode */
-CsrInt8 uf_get_protection_bit_from_interfacemode(unifi_priv_t *priv, CsrUint16 interfaceTag, const u8 *daddr);
+s8 uf_get_protection_bit_from_interfacemode(unifi_priv_t *priv, CsrUint16 interfaceTag, const u8 *daddr);
 #endif
 
 /* Fetch the station record handler from data base for matching Mac address */