[PATCH 07/15] staging: ath6kl: Convert A_INT8 to s8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
 drivers/staging/ath6kl/include/common/wmi.h        |   32 ++++++++--------
 drivers/staging/ath6kl/include/wmi_api.h           |    8 ++--
 drivers/staging/ath6kl/os/linux/ar6000_drv.c       |   14 ++++----
 .../staging/ath6kl/os/linux/include/ar6000_drv.h   |    6 ++--
 .../ath6kl/os/linux/include/ar6xapi_linux.h        |    4 +-
 drivers/staging/ath6kl/os/linux/ioctl.c            |    4 +-
 drivers/staging/ath6kl/os/linux/wireless_ext.c     |    6 ++--
 drivers/staging/ath6kl/wmi/wmi.c                   |   39 ++++++++++----------
 8 files changed, 56 insertions(+), 57 deletions(-)

diff --git a/drivers/staging/ath6kl/include/common/wmi.h b/drivers/staging/ath6kl/include/common/wmi.h
index 1f90975..2fb03be 100644
--- a/drivers/staging/ath6kl/include/common/wmi.h
+++ b/drivers/staging/ath6kl/include/common/wmi.h
@@ -160,7 +160,7 @@ typedef enum {
 #define WMI_DATA_HDR_SET_META(h, _v)    ((h)->info2 = ((h)->info2 & ~(WMI_DATA_HDR_META_MASK << WMI_DATA_HDR_META_SHIFT)) | ((_v) << WMI_DATA_HDR_META_SHIFT))
 
 typedef PREPACK struct {
-    A_INT8      rssi;
+    s8 rssi;
     u8 info;               /* usage of 'info' field(8-bit):
                                      *  b1:b0       - WMI_MSG_TYPE
                                      *  b4:b3:b2    - UP(tid)
@@ -776,7 +776,7 @@ typedef PREPACK struct {
 } POSTPACK WMI_POWER_MODE_CMD;
 
 typedef PREPACK struct {
-    A_INT8 status;      /* WMI_SET_PARAMS_REPLY */
+    s8 status;      /* WMI_SET_PARAMS_REPLY */
 } POSTPACK WMI_SET_PARAMS_REPLY;
 
 typedef PREPACK struct {
@@ -1199,7 +1199,7 @@ typedef enum {
 
 typedef PREPACK struct {
         u8 bssid[ATH_MAC_LEN];
-        A_INT8  bias;
+        s8 bias;
 } POSTPACK WMI_BSS_BIAS;
 
 typedef PREPACK struct {
@@ -2139,7 +2139,7 @@ typedef PREPACK struct {
 } POSTPACK WMI_NEIGHBOR_INFO;
 
 typedef PREPACK struct {
-    A_INT8      numberOfAps;
+    s8 numberOfAps;
     WMI_NEIGHBOR_INFO neighbor[1];
 } POSTPACK WMI_NEIGHBOR_REPORT_EVENT;
 
@@ -2207,7 +2207,7 @@ typedef PREPACK struct {
 typedef PREPACK struct {
     u16 channel;
     u8 frameType;          /* see WMI_OPT_FTYPE */
-    A_INT8      snr;
+    s8 snr;
     u8 srcAddr[ATH_MAC_LEN];
     u8 bssid[ATH_MAC_LEN];
 } POSTPACK WMI_OPT_RX_INFO_HDR;
@@ -2399,11 +2399,11 @@ typedef PREPACK struct {
 typedef PREPACK struct {
     A_INT32 roam_util;
     u8 bssid[ATH_MAC_LEN];
-    A_INT8  rssi;
-    A_INT8  rssidt;
-    A_INT8  last_rssi;
-    A_INT8  util;
-    A_INT8  bias;
+    s8 rssi;
+    s8 rssidt;
+    s8 last_rssi;
+    s8 util;
+    s8 bias;
     u8 reserved; /* For alignment */
 } POSTPACK WMI_BSS_ROAM_INFO;
 
@@ -2506,14 +2506,14 @@ typedef enum {
 } WMI_BIT_RATE;
 
 typedef PREPACK struct {
-    A_INT8      rateIndex;          /* see WMI_BIT_RATE */
-    A_INT8      mgmtRateIndex;
-    A_INT8      ctlRateIndex;
+    s8 rateIndex;          /* see WMI_BIT_RATE */
+    s8 mgmtRateIndex;
+    s8 ctlRateIndex;
 } POSTPACK WMI_BIT_RATE_CMD;
 
 
 typedef PREPACK struct {
-    A_INT8      rateIndex;          /* see WMI_BIT_RATE */
+    s8 rateIndex;          /* see WMI_BIT_RATE */
 } POSTPACK  WMI_BIT_RATE_REPLY;
 
 
@@ -2599,9 +2599,9 @@ typedef PREPACK struct {
     u32 assoc_time;
     u32 allow_txrx_time;
     u8 disassoc_bssid[ATH_MAC_LEN];
-    A_INT8          disassoc_bss_rssi;
+    s8 disassoc_bss_rssi;
     u8 assoc_bssid[ATH_MAC_LEN];
-    A_INT8          assoc_bss_rssi;
+    s8 assoc_bss_rssi;
 } POSTPACK WMI_TARGET_ROAM_TIME;
 
 typedef PREPACK struct {
diff --git a/drivers/staging/ath6kl/include/wmi_api.h b/drivers/staging/ath6kl/include/wmi_api.h
index 04f809c..b34c1f9 100644
--- a/drivers/staging/ath6kl/include/wmi_api.h
+++ b/drivers/staging/ath6kl/include/wmi_api.h
@@ -124,7 +124,7 @@ int wmi_getrev_cmd(struct wmi_t *wmip);
 int wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
                            u32 forceFgScan, u32 isLegacy,
                            u32 homeDwellTime, u32 forceScanInterval,
-                           A_INT8 numChan, u16 *channelList);
+                           s8 numChan, u16 *channelList);
 int wmi_scanparams_cmd(struct wmi_t *wmip, u16 fg_start_sec,
                             u16 fg_end_sec, u16 bg_sec,
                             u16 minact_chdw_msec,
@@ -155,11 +155,11 @@ int wmi_delete_pstream_cmd(struct wmi_t *wmip, u8 trafficClass, u8 streamID);
 int wmi_set_framerate_cmd(struct wmi_t *wmip, u8 bEnable, u8 type, u8 subType, u16 rateMask);
 int wmi_set_bitrate_cmd(struct wmi_t *wmip, A_INT32 dataRate, A_INT32 mgmtRate, A_INT32 ctlRate);
 int wmi_get_bitrate_cmd(struct wmi_t *wmip);
-A_INT8   wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate, A_INT8 *rate_idx);
+s8 wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate, s8 *rate_idx);
 int wmi_get_regDomain_cmd(struct wmi_t *wmip);
 int wmi_get_channelList_cmd(struct wmi_t *wmip);
 int wmi_set_channelParams_cmd(struct wmi_t *wmip, u8 scanParam,
-                                   WMI_PHY_MODE mode, A_INT8 numChan,
+                                   WMI_PHY_MODE mode, s8 numChan,
                                    u16 *channelList);
 
 int wmi_set_snr_threshold_params(struct wmi_t *wmip,
@@ -295,7 +295,7 @@ int wmi_set_appie_cmd(struct wmi_t *wmip, u8 mgmtFrmType,
 
 int wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, u16 dataLen);
 
-A_INT32 wmi_get_rate(A_INT8 rateindex);
+A_INT32 wmi_get_rate(s8 rateindex);
 
 int wmi_set_ip_cmd(struct wmi_t *wmip, WMI_SET_IP_CMD *cmd);
 
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index 89ff8f4..d527cee 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -451,7 +451,7 @@ ar6000_dbglog_init_done(AR_SOFTC_T *ar)
     ar->dbglog_init_done = true;
 }
 
-u32 dbglog_get_debug_fragment(A_INT8 *datap, u32 len, u32 limit)
+u32 dbglog_get_debug_fragment(s8 *datap, u32 len, u32 limit)
 {
     A_INT32 *buffer;
     u32 count;
@@ -477,7 +477,7 @@ u32 dbglog_get_debug_fragment(A_INT8 *datap, u32 len, u32 limit)
 }
 
 void
-dbglog_parse_debug_logs(A_INT8 *datap, u32 len)
+dbglog_parse_debug_logs(s8 *datap, u32 len)
 {
     A_INT32 *buffer;
     u32 count;
@@ -571,7 +571,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
                 {
                     break;
                 }
-                ar6000_dbglog_event(ar, dropped, (A_INT8*)&ar->log_buffer[ar->log_cnt], length);
+                ar6000_dbglog_event(ar, dropped, (s8 *)&ar->log_buffer[ar->log_cnt], length);
                 ar->log_cnt += length;
             } else {
                 AR_DEBUG_PRINTF(ATH_DEBUG_DBG_LOG,("Length: %d (Total size: %d)\n",
@@ -597,7 +597,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
 
 void
 ar6000_dbglog_event(AR_SOFTC_T *ar, u32 dropped,
-                    A_INT8 *buffer, u32 length)
+                    s8 *buffer, u32 length)
 {
 #ifdef REPORT_DEBUG_LOGS_TO_APP
     #define MAX_WIRELESS_EVENT_SIZE 252
@@ -622,7 +622,7 @@ ar6000_dbglog_event(AR_SOFTC_T *ar, u32 dropped,
                     dropped, length));
 
     /* Interpret the debug logs */
-    dbglog_parse_debug_logs((A_INT8*)buffer, length);
+    dbglog_parse_debug_logs((s8 *)buffer, length);
 #endif /* REPORT_DEBUG_LOGS_TO_APP */
 }
 
@@ -2795,7 +2795,7 @@ ar6000_txPwr_rx(void *devt, u8 txPwr)
 
 
 void
-ar6000_channelList_rx(void *devt, A_INT8 numChan, u16 *chanList)
+ar6000_channelList_rx(void *devt, s8 numChan, u16 *chanList)
 {
     AR_SOFTC_T *ar = (AR_SOFTC_T *)devt;
 
@@ -4755,7 +4755,7 @@ void
 ar6000_hci_event_rcv_evt(struct ar6_softc *ar, WMI_HCI_EVENT *cmd)
 {
     void *osbuf = NULL;
-    A_INT8 i;
+    s8 i;
     u8 size, *buf;
     int ret = A_OK;
 
diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
index c966f49..bef88eb 100644
--- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
+++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
@@ -493,18 +493,18 @@ typedef struct ar6_softc {
     u16 arListenIntervalT;
     struct ar6000_version   arVersion;
     u32 arTargetType;
-    A_INT8                  arRssi;
+    s8 arRssi;
     u8 arTxPwr;
     bool                  arTxPwrSet;
     A_INT32                 arBitRate;
     struct net_device_stats arNetStats;
     struct iw_statistics    arIwStats;
-    A_INT8                  arNumChannels;
+    s8 arNumChannels;
     u16 arChannelList[32];
     u32 arRegCode;
     bool                  statsUpdatePending;
     TARGET_STATS            arTargetStats;
-    A_INT8                  arMaxRetries;
+    s8 arMaxRetries;
     u8 arPhyCapability;
 #ifdef CONFIG_HOST_TCMD_SUPPORT
     u8 tcmdRxReport;
diff --git a/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h b/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h
index d21ca87..bd62141 100644
--- a/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h
+++ b/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h
@@ -43,7 +43,7 @@ void ar6000_disconnect_event(struct ar6_softc *ar, u8 reason,
 void ar6000_tkip_micerr_event(struct ar6_softc *ar, u8 keyid,
                               bool ismcast);
 void ar6000_bitrate_rx(void *devt, A_INT32 rateKbps);
-void ar6000_channelList_rx(void *devt, A_INT8 numChan, u16 *chanList);
+void ar6000_channelList_rx(void *devt, s8 numChan, u16 *chanList);
 void ar6000_regDomain_event(struct ar6_softc *ar, u32 regCode);
 void ar6000_txPwr_rx(void *devt, u8 txPwr);
 void ar6000_keepalive_rx(void *devt, u8 configured);
@@ -109,7 +109,7 @@ int ar6000_get_driver_cfg(struct net_device *dev,
 void ar6000_bssInfo_event_rx(struct ar6_softc *ar, u8 *data, int len);
 
 void ar6000_dbglog_event(struct ar6_softc *ar, u32 dropped,
-                         A_INT8 *buffer, u32 length);
+                         s8 *buffer, u32 length);
 
 int ar6000_dbglog_get_debug_logs(struct ar6_softc *ar);
 
diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c
index dc958fa..a055528 100644
--- a/drivers/staging/ath6kl/os/linux/ioctl.c
+++ b/drivers/staging/ath6kl/os/linux/ioctl.c
@@ -4410,7 +4410,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
         case AR6000_XIOCTL_HCI_CMD:
         {
             char tmp_buf[512];
-            A_INT8 i;
+            s8 i;
             WMI_HCI_CMD *cmd = (WMI_HCI_CMD *)tmp_buf;
             u8 size;
 
@@ -4689,7 +4689,7 @@ u8 mac_cmp_wild(u8 *mac, u8 *new_mac, u8 wild, u8 new_wild)
 
 u8 acl_add_del_mac(WMI_AP_ACL *a, WMI_AP_ACL_MAC_CMD *acl)
 {
-    A_INT8    already_avail=-1, free_slot=-1, i;
+    s8 already_avail=-1, free_slot=-1, i;
 
     /* To check whether this mac is already there in our list */
     for(i=AP_ACL_SIZE-1;i>=0;i--)
diff --git a/drivers/staging/ath6kl/os/linux/wireless_ext.c b/drivers/staging/ath6kl/os/linux/wireless_ext.c
index aca58dd..df02625 100644
--- a/drivers/staging/ath6kl/os/linux/wireless_ext.c
+++ b/drivers/staging/ath6kl/os/linux/wireless_ext.c
@@ -32,7 +32,7 @@
 #define IWE_STREAM_ADD_VALUE(p1, p2, p3, p4, p5, p6) \
     iwe_stream_add_value((p1), (p2), (p3), (p4), (p5), (p6))
 
-static void ar6000_set_quality(struct iw_quality *iq, A_INT8 rssi);
+static void ar6000_set_quality(struct iw_quality *iq, s8 rssi);
 extern unsigned int wmitimeout;
 extern A_WAITQUEUE_HEAD arEvent;
 
@@ -713,7 +713,7 @@ ar6000_ioctl_siwrate(struct net_device *dev,
 {
     AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
     u32 kbps;
-    A_INT8  rate_idx;
+    s8 rate_idx;
 
     if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
         A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
@@ -2564,7 +2564,7 @@ ar6000_ioctl_siwscan(struct net_device *dev,
  *     drivers for compatibility
  */
 static void
-ar6000_set_quality(struct iw_quality *iq, A_INT8 rssi)
+ar6000_set_quality(struct iw_quality *iq, s8 rssi)
 {
     if (rssi < 0) {
         iq->qual = 0;
diff --git a/drivers/staging/ath6kl/wmi/wmi.c b/drivers/staging/ath6kl/wmi/wmi.c
index 055f2ef..f5f9aa1 100644
--- a/drivers/staging/ath6kl/wmi/wmi.c
+++ b/drivers/staging/ath6kl/wmi/wmi.c
@@ -1671,7 +1671,7 @@ wmi_bitrate_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
     A_DPRINTF(DBG_WMI,
         (DBGFMT "Enter - rateindex %d\n", DBGARG, reply->rateIndex));
 
-    if (reply->rateIndex == (A_INT8) RATE_AUTO) {
+    if (reply->rateIndex == (s8) RATE_AUTO) {
         rate = RATE_AUTO;
     } else {
         // the SGI state is stored as the MSb of the rateIndex
@@ -2294,7 +2294,7 @@ wmi_dbglog_event_rx(struct wmi_t *wmip, u8 *datap, int len)
     dropped = *((u32 *)datap);
     datap += sizeof(dropped);
     len -= sizeof(dropped);
-    A_WMI_DBGLOG_EVENT(wmip->wmi_devt, dropped, (A_INT8*)datap, len);
+    A_WMI_DBGLOG_EVENT(wmip->wmi_devt, dropped, (s8 *)datap, len);
     return A_OK;
 }
 
@@ -2513,11 +2513,11 @@ int
 wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
                   u32 forceFgScan, u32 isLegacy,
                   u32 homeDwellTime, u32 forceScanInterval,
-                  A_INT8 numChan, u16 *channelList)
+                  s8 numChan, u16 *channelList)
 {
     void *osbuf;
     WMI_START_SCAN_CMD *sc;
-    A_INT8 size;
+    s8 size;
 
     size = sizeof (*sc);
 
@@ -3399,7 +3399,7 @@ wmi_set_bitrate_cmd(struct wmi_t *wmip, A_INT32 dataRate, A_INT32 mgmtRate, A_IN
 {
     void *osbuf;
     WMI_BIT_RATE_CMD *cmd;
-    A_INT8 drix, mrix, crix, ret_val;
+    s8 drix, mrix, crix, ret_val;
 
     if (dataRate != -1) {
         ret_val = wmi_validate_bitrate(wmip, dataRate, &drix);
@@ -3509,10 +3509,9 @@ wmi_is_bitrate_index_valid(struct wmi_t *wmip, A_INT32 rateIndex)
     return isValid;
 }
 
-A_INT8
-wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate, A_INT8 *rate_idx)
+s8 wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate, s8 *rate_idx)
 {
-    A_INT8 i;
+    s8 i;
 
     for (i=0;;i++)
     {
@@ -3596,12 +3595,12 @@ wmi_get_channelList_cmd(struct wmi_t *wmip)
  */
 int
 wmi_set_channelParams_cmd(struct wmi_t *wmip, u8 scanParam,
-                          WMI_PHY_MODE mode, A_INT8 numChan,
+                          WMI_PHY_MODE mode, s8 numChan,
                           u16 *channelList)
 {
     void *osbuf;
     WMI_CHANNEL_PARAMS_CMD *cmd;
-    A_INT8 size;
+    s8 size;
 
     size = sizeof (*cmd);
 
@@ -3736,7 +3735,7 @@ wmi_set_host_sleep_mode_cmd(struct wmi_t *wmip,
                               WMI_SET_HOST_SLEEP_MODE_CMD *hostModeCmd)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_SET_HOST_SLEEP_MODE_CMD *cmd;
     u16 activeTsids=0;
     u8 streamExists=0;
@@ -3798,7 +3797,7 @@ wmi_set_wow_mode_cmd(struct wmi_t *wmip,
                               WMI_SET_WOW_MODE_CMD *wowModeCmd)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_SET_WOW_MODE_CMD *cmd;
 
     size = sizeof (*cmd);
@@ -3824,7 +3823,7 @@ wmi_get_wow_list_cmd(struct wmi_t *wmip,
                               WMI_GET_WOW_LIST_CMD *wowListCmd)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_GET_WOW_LIST_CMD *cmd;
 
     size = sizeof (*cmd);
@@ -3867,7 +3866,7 @@ int wmi_add_wow_pattern_cmd(struct wmi_t *wmip,
                                  u8 pattern_size)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_ADD_WOW_PATTERN_CMD *cmd;
     u8 *filter_mask = NULL;
 
@@ -3901,7 +3900,7 @@ wmi_del_wow_pattern_cmd(struct wmi_t *wmip,
                               WMI_DEL_WOW_PATTERN_CMD *delWowCmd)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_DEL_WOW_PATTERN_CMD *cmd;
 
     size = sizeof (*cmd);
@@ -4003,7 +4002,7 @@ wmi_set_lq_threshold_params(struct wmi_t *wmip,
                              WMI_LQ_THRESHOLD_PARAMS_CMD *lqCmd)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_LQ_THRESHOLD_PARAMS_CMD *cmd;
     /* These values are in ascending order */
     if( lqCmd->thresholdAbove4_Val <= lqCmd->thresholdAbove3_Val ||
@@ -4037,7 +4036,7 @@ int
 wmi_set_error_report_bitmask(struct wmi_t *wmip, u32 mask)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_TARGET_ERROR_REPORT_BITMASK *cmd;
 
     size = sizeof (*cmd);
@@ -5351,7 +5350,7 @@ wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, u16 dataLen)
 }
 
 A_INT32
-wmi_get_rate(A_INT8 rateindex)
+wmi_get_rate(s8 rateindex)
 {
     if (rateindex == RATE_AUTO) {
         return 0;
@@ -5921,7 +5920,7 @@ wmi_send_rssi_threshold_params(struct wmi_t *wmip,
                               WMI_RSSI_THRESHOLD_PARAMS_CMD *rssiCmd)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_RSSI_THRESHOLD_PARAMS_CMD *cmd;
 
     size = sizeof (*cmd);
@@ -5945,7 +5944,7 @@ wmi_send_snr_threshold_params(struct wmi_t *wmip,
                              WMI_SNR_THRESHOLD_PARAMS_CMD *snrCmd)
 {
     void    *osbuf;
-    A_INT8  size;
+    s8 size;
     WMI_SNR_THRESHOLD_PARAMS_CMD *cmd;
 
     size = sizeof (*cmd);
-- 
1.7.4.rc3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux