rtlwifi: use s8 instead of char
authorArnd Bergmann <arnd@arndb.de>
Wed, 15 Jun 2016 21:30:43 +0000 (23:30 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 29 Jun 2016 15:48:15 +0000 (18:48 +0300)
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.

realtek/rtlwifi/rc.c:113:18: error: comparison is always true due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8188ee/dm.c:1070:22: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192ce/trx.c:54:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192cu/mac.c:601:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192de/trx.c:53:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192ee/phy.c:1268:12: error: comparison is always true due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192se/rf.c:150:20: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8723be/dm.c:877:29: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8723be/phy.c:386:16: error: comparison is always true due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8821ae/dm.c:1514:38: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8821ae/phy.c:1558:11: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8821ae/phy.c:386:24: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8821ae/trx.c:55:12: error: comparison is always false due to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/stats.c:31:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]

This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
36 files changed:
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
drivers/net/wireless/realtek/rtlwifi/rc.c
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h
drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.h
drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.h
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.h
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.h
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.h
drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.h
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h
drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.h
drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.h
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.h
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h
drivers/net/wireless/realtek/rtlwifi/stats.c
drivers/net/wireless/realtek/rtlwifi/stats.h
drivers/net/wireless/realtek/rtlwifi/wifi.h

index b660c214dc717b086de802f6ae4ada8b4b05dfe8..91cc1397b150652219e668c5289fced3e93c3472 100644 (file)
@@ -901,7 +901,7 @@ void exhalbtc_stack_update_profile_info(void)
 {
 }
 
-void exhalbtc_update_min_bt_rssi(char bt_rssi)
+void exhalbtc_update_min_bt_rssi(s8 bt_rssi)
 {
        struct btc_coexist *btcoexist = &gl_bt_coexist;
 
index 3cbe34c535ec4c1ce4cc3fe2857ea169f890566f..3d308ebbe0488d42c3365f4d7640dd4c6babc6e8 100644 (file)
@@ -433,7 +433,7 @@ struct btc_stack_info {
        u8 num_of_hid;
        bool pan_exist;
        bool unknown_acl_exist;
-       char min_bt_rssi;
+       s8 min_bt_rssi;
 };
 
 struct btc_statistics {
@@ -537,7 +537,7 @@ void exhalbtc_dbg_control(struct btc_coexist *btcoexist, u8 code, u8 len,
 void exhalbtc_stack_update_profile_info(void);
 void exhalbtc_set_hci_version(u16 hci_version);
 void exhalbtc_set_bt_patch_version(u16 bt_hci_version, u16 bt_patch_version);
-void exhalbtc_update_min_bt_rssi(char bt_rssi);
+void exhalbtc_update_min_bt_rssi(s8 bt_rssi);
 void exhalbtc_set_bt_exist(bool bt_exist);
 void exhalbtc_set_chip_type(u8 chip_type);
 void exhalbtc_set_ant_num(struct rtl_priv *rtlpriv, u8 type, u8 ant_num);
index 1aca777195210928f6da8664e06a86c2454f9427..ce8621a0f7aa3b0a4ad2dbd759c02cc38d08307b 100644 (file)
@@ -94,7 +94,7 @@ static void _rtl_rc_rate_set_series(struct rtl_priv *rtlpriv,
                                    struct ieee80211_sta *sta,
                                    struct ieee80211_tx_rate *rate,
                                    struct ieee80211_tx_rate_control *txrc,
-                                   u8 tries, char rix, int rtsctsenable,
+                                   u8 tries, s8 rix, int rtsctsenable,
                                    bool not_data)
 {
        struct rtl_mac *mac = rtl_mac(rtlpriv);
index db9a7829d568757dcfb5a1d93b08ea96c17a7f80..6e7b673ae89895465f8e051785dfe31e051fc89e 100644 (file)
@@ -886,7 +886,7 @@ static void dm_txpower_track_cb_therm(struct ieee80211_hw *hw)
        u8 thermalvalue_avg_count = 0;
        u32 thermalvalue_avg = 0;
        long  ele_d, temp_cck;
-       char ofdm_index[2], cck_index = 0,
+       s8 ofdm_index[2], cck_index = 0,
                ofdm_index_old[2] = {0, 0}, cck_index_old = 0;
        int i = 0;
        /*bool is2t = false;*/
@@ -898,7 +898,7 @@ static void dm_txpower_track_cb_therm(struct ieee80211_hw *hw)
        /*0.1 the following TWO tables decide the
         *final index of OFDM/CCK swing table
         */
-       char delta_swing_table_idx[2][15]  = {
+       s8 delta_swing_table_idx[2][15]  = {
                {0, 0, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 10, 11},
                {0, 0, -1, -2, -3, -4, -4, -4, -4, -5, -7, -8, -9, -9, -10}
        };
index 11701064b0e10f0c7f09f4f058991e03cf5f264d..1016ad43381304369f34ab5ae5324266abdc926c 100644 (file)
@@ -59,7 +59,7 @@ static void _rtl88ee_query_rxphystatus(struct ieee80211_hw *hw,
        struct phy_status_rpt *phystrpt =
                (struct phy_status_rpt *)p_drvinfo;
        struct rtl_dm *rtldm = rtl_dm(rtl_priv(hw));
-       char rx_pwr_all = 0, rx_pwr[4];
+       s8 rx_pwr_all = 0, rx_pwr[4];
        u8 rf_rx_num = 0, evm, pwdb_all;
        u8 i, max_spatial_stream;
        u32 rssi, total_rssi = 0;
index 5a24d194ac76d765984d4bf3d3207ffdc4b9c611..9a1c2087adee66cbb41fdf1fe62cdeae4ed6f3b6 100644 (file)
@@ -593,8 +593,8 @@ struct rx_fwinfo_88e {
        u8 pwdb_all;
        u8 cfosho[4];
        u8 cfotail[4];
-       char rxevm[2];
-       char rxsnr[4];
+       s8 rxevm[2];
+       s8 rxsnr[4];
        u8 pdsnr[2];
        u8 csi_current[2];
        u8 csi_target[2];
index 4422e31fedd99706169dceede82f3e428b6637b8..6a72d0c8afa073573f886b7455f90ffbc5ff773b 100644 (file)
@@ -135,7 +135,7 @@ void rtl92c_dm_init_edca_turbo(struct ieee80211_hw *hw);
 void rtl92c_dm_check_txpower_tracking(struct ieee80211_hw *hw);
 void rtl92c_dm_init_rate_adaptive_mask(struct ieee80211_hw *hw);
 void rtl92c_dm_rf_saving(struct ieee80211_hw *hw, u8 bforce_in_normal);
-void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta);
+void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta);
 void rtl92c_phy_lc_calibrate(struct ieee80211_hw *hw);
 void rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, bool recovery);
 void rtl92c_dm_dynamic_txpower(struct ieee80211_hw *hw);
index 77e61b19bf36a7f72b264d1d4715d1c5c83aa244..24162e055c25ebbe4ddc7aa11537cb9a79ec32ba 100644 (file)
@@ -1353,7 +1353,7 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw,
 }
 
 static void _rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw,
-                                    char delta, bool is2t)
+                                    s8 delta, bool is2t)
 {
 }
 
@@ -1518,7 +1518,7 @@ void rtl92c_phy_lc_calibrate(struct ieee80211_hw *hw)
 }
 EXPORT_SYMBOL(rtl92c_phy_lc_calibrate);
 
-void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta)
+void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_phy *rtlphy = &(rtlpriv->phy);
index 64bc49f4dbc6c61e941b13e7e9c54cfa326dd290..202412577bf0cf522f0293e97fcd1a6bcb71c57d 100644 (file)
@@ -210,7 +210,7 @@ u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw);
 void rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery);
 void rtl92c_phy_set_beacon_hw_reg(struct ieee80211_hw *hw,
                                         u16 beaconinterval);
-void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta);
+void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta);
 void rtl92c_phy_lc_calibrate(struct ieee80211_hw *hw);
 void rtl92c_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
 bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
index e5e1353a94c35dca2bdcc977b13f2bb9c38a167e..dadc02b5de0bba0c66fb29722e3eccbb0b312ae9 100644 (file)
@@ -102,7 +102,7 @@ void rtl92c_phy_sw_chnl_callback(struct ieee80211_hw *hw);
 u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw);
 void rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery);
 void rtl92c_phy_set_beacon_hw_reg(struct ieee80211_hw *hw, u16 beaconinterval);
-void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta);
+void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta);
 void rtl92c_phy_lc_calibrate(struct ieee80211_hw *hw);
 void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t);
 void rtl92c_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
index 84ddd4d07a1da8731127f6511a1f5145c90e61bd..93d3fba4f6030c9dabdf8dd9a4dea9518c5c0e8e 100644 (file)
@@ -49,7 +49,7 @@ static u8 _rtl92ce_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue)
        return skb->priority;
 }
 
-static u8 _rtl92c_query_rxpwrpercentage(char antpower)
+static u8 _rtl92c_query_rxpwrpercentage(s8 antpower)
 {
        if ((antpower <= -100) || (antpower >= 20))
                return 0;
@@ -59,9 +59,9 @@ static u8 _rtl92c_query_rxpwrpercentage(char antpower)
                return 100 + antpower;
 }
 
-static u8 _rtl92c_evm_db_to_percentage(char value)
+static u8 _rtl92c_evm_db_to_percentage(s8 value)
 {
-       char ret_val;
+       s8 ret_val;
        ret_val = value;
 
        if (ret_val >= 0)
index 4bec4b07e3e017ceee47755dac2e8745a74df4db..607304586c030caf92b7a194853e65e53f2e2163 100644 (file)
@@ -537,8 +537,8 @@ struct rx_fwinfo_92c {
        u8 pwdb_all;
        u8 cfosho[4];
        u8 cfotail[4];
-       char rxevm[2];
-       char rxsnr[4];
+       s8 rxevm[2];
+       s8 rxsnr[4];
        u8 pdsnr[2];
        u8 csi_current[2];
        u8 csi_target[2];
index 035713311a4ab3cdd160d079fa7376fd06c6c7ad..68ca734853c15fd521c516cb06b317994ec8666f 100644 (file)
@@ -596,7 +596,7 @@ void rtl92c_set_min_space(struct ieee80211_hw *hw, bool is2T)
 
 /*==============================================================*/
 
-static u8 _rtl92c_query_rxpwrpercentage(char antpower)
+static u8 _rtl92c_query_rxpwrpercentage(s8 antpower)
 {
        if ((antpower <= -100) || (antpower >= 20))
                return 0;
@@ -606,9 +606,9 @@ static u8 _rtl92c_query_rxpwrpercentage(char antpower)
                return 100 + antpower;
 }
 
-static u8 _rtl92c_evm_db_to_percentage(char value)
+static u8 _rtl92c_evm_db_to_percentage(s8 value)
 {
-       char ret_val;
+       s8 ret_val;
 
        ret_val = value;
        if (ret_val >= 0)
index 553a4bfac66894a2999a61314ea5c6a683aa4854..20a49ec8459b4e740d07b501ffdf90db83b33d2a 100644 (file)
@@ -79,8 +79,8 @@ struct rx_fwinfo_92c {
        u8 pwdb_all;
        u8 cfosho[4];
        u8 cfotail[4];
-       char rxevm[2];
-       char rxsnr[4];
+       s8 rxevm[2];
+       s8 rxsnr[4];
        u8 pdsnr[2];
        u8 csi_current[2];
        u8 csi_target[2];
index 7810fe87dca795b57eec8e9cc7895f4bcd1f615d..d334d2a5ea632e85ffa2a3784a3f8d2d3bd0334f 100644 (file)
@@ -2695,7 +2695,7 @@ void rtl92d_phy_lc_calibrate(struct ieee80211_hw *hw)
        RTPRINT(rtlpriv, FINIT, INIT_IQK,  "LCK:Finish!!!\n");
 }
 
-void rtl92d_phy_ap_calibrate(struct ieee80211_hw *hw, char delta)
+void rtl92d_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta)
 {
        return;
 }
index 48d5c6835b6a98a950daf3f14a5330606a656ba5..8115bf4ac68313570d0277d3e3db56260c30678e 100644 (file)
@@ -160,7 +160,7 @@ void rtl92d_phy_config_maccoexist_rfpage(struct ieee80211_hw *hw);
 bool rtl92d_phy_check_poweroff(struct ieee80211_hw *hw);
 void rtl92d_phy_lc_calibrate(struct ieee80211_hw *hw);
 void rtl92d_update_bbrf_configuration(struct ieee80211_hw *hw);
-void rtl92d_phy_ap_calibrate(struct ieee80211_hw *hw, char delta);
+void rtl92d_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta);
 void rtl92d_phy_iq_calibrate(struct ieee80211_hw *hw);
 void rtl92d_phy_reset_iqk_result(struct ieee80211_hw *hw);
 void rtl92d_release_cckandrw_pagea_ctl(struct ieee80211_hw *hw,
index 1feaa629dd4fb37d1e12ee97385718f33d36ce38..274b0e42ef41a53acbfca40e67f91cb30d8d22fe 100644 (file)
@@ -48,7 +48,7 @@ static u8 _rtl92de_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue)
        return skb->priority;
 }
 
-static u8 _rtl92d_query_rxpwrpercentage(char antpower)
+static u8 _rtl92d_query_rxpwrpercentage(s8 antpower)
 {
        if ((antpower <= -100) || (antpower >= 20))
                return 0;
@@ -58,9 +58,9 @@ static u8 _rtl92d_query_rxpwrpercentage(char antpower)
                return 100 + antpower;
 }
 
-static u8 _rtl92d_evm_db_to_percentage(char value)
+static u8 _rtl92d_evm_db_to_percentage(s8 value)
 {
-       char ret_val = value;
+       s8 ret_val = value;
 
        if (ret_val >= 0)
                ret_val = 0;
index fb5cf0634e8d882ef9f308f631a3272fca69b5c3..194d99f8bacf1504312efa2dd0b6ab1580f66f15 100644 (file)
@@ -554,8 +554,8 @@ struct rx_fwinfo_92d {
        u8 pwdb_all;
        u8 cfosho[4];
        u8 cfotail[4];
-       char rxevm[2];
-       char rxsnr[4];
+       s8 rxevm[2];
+       s8 rxsnr[4];
        u8 pdsnr[2];
        u8 csi_current[2];
        u8 csi_target[2];
index c2bf8d1a7af3cb9f441591d51e6c07e6ce3f7483..b7184f5e2698d05b18afeeb725349c432db145c3 100644 (file)
@@ -547,7 +547,7 @@ static void _rtl92ee_phy_store_txpower_by_rate_base(struct ieee80211_hw *hw)
 static void _phy_convert_txpower_dbm_to_relative_value(u32 *data, u8 start,
                                                       u8 end, u8 base)
 {
-       char i = 0;
+       s8 i = 0;
        u8 tmp = 0;
        u32 temp_data = 0;
 
@@ -1189,7 +1189,7 @@ static u8 _rtl92ee_get_txpower_by_rate(struct ieee80211_hw *hw,
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_phy *rtlphy = &rtlpriv->phy;
        u8 shift = 0, sec, tx_num;
-       char diff = 0;
+       s8 diff = 0;
 
        sec = _rtl92ee_phy_get_ratesection_intxpower_byrate(rf, rate);
        tx_num = RF_TX_NUM_NONIMPLEMENT;
@@ -1265,14 +1265,14 @@ static u8 _rtl92ee_get_txpower_index(struct ieee80211_hw *hw,
                         "Illegal channel!!\n");
        }
 
-       if (IS_CCK_RATE(rate))
+       if (IS_CCK_RATE((s8)rate))
                tx_power = rtlefuse->txpwrlevel_cck[rfpath][index];
        else if (DESC92C_RATE6M <= rate)
                tx_power = rtlefuse->txpwrlevel_ht40_1s[rfpath][index];
 
        /* OFDM-1T*/
        if (DESC92C_RATE6M <= rate && rate <= DESC92C_RATE54M &&
-           !IS_CCK_RATE(rate))
+           !IS_CCK_RATE((s8)rate))
                tx_power += rtlefuse->txpwr_legacyhtdiff[rfpath][TX_1S];
 
        /* BW20-1S, BW20-2S */
@@ -2969,7 +2969,7 @@ void rtl92ee_phy_lc_calibrate(struct ieee80211_hw *hw)
        rtlphy->lck_inprogress = false;
 }
 
-void rtl92ee_phy_ap_calibrate(struct ieee80211_hw *hw, char delta)
+void rtl92ee_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta)
 {
 }
 
index c6e97c8df54c1528fd63bc7458f1ae270467c208..49bd0e554c65f408d4507df4af096643ac6ad6e1 100644 (file)
@@ -141,7 +141,7 @@ void rtl92ee_phy_set_bw_mode(struct ieee80211_hw *hw,
 void rtl92ee_phy_sw_chnl_callback(struct ieee80211_hw *hw);
 u8 rtl92ee_phy_sw_chnl(struct ieee80211_hw *hw);
 void rtl92ee_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery);
-void rtl92ee_phy_ap_calibrate(struct ieee80211_hw *hw, char delta);
+void rtl92ee_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta);
 void rtl92ee_phy_lc_calibrate(struct ieee80211_hw *hw);
 void rtl92ee_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
 bool rtl92ee_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
index 35e6bf7e233d6d71fc359f9649d10a15ac9d284a..582b1fa7f3c515e681512f642d73c4cefd70c317 100644 (file)
@@ -56,7 +56,7 @@ static void _rtl92ee_query_rxphystatus(struct ieee80211_hw *hw,
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct phy_status_rpt *p_phystrpt = (struct phy_status_rpt *)p_drvinfo;
-       char rx_pwr_all = 0, rx_pwr[4];
+       s8 rx_pwr_all = 0, rx_pwr[4];
        u8 rf_rx_num = 0, evm, pwdb_all;
        u8 i, max_spatial_stream;
        u32 rssi, total_rssi = 0;
index a4c38345233e2df9d4e333ab47e7acac93c675e2..8053d1b12ec46c67fa7bbb1863f064b9f7ef08a0 100644 (file)
@@ -650,8 +650,8 @@ struct rx_fwinfo {
        u8 pwdb_all;
        u8 cfosho[4];
        u8 cfotail[4];
-       char rxevm[2];
-       char rxsnr[4];
+       s8 rxevm[2];
+       s8 rxsnr[4];
        u8 pdsnr[2];
        u8 csi_current[2];
        u8 csi_target[2];
index 9475aa2a8fa0aa55c19232dc569bf6735125f13e..34e88a3f6abedcdefd6d4986e674542b0cb12ceb 100644 (file)
@@ -137,7 +137,7 @@ static void _rtl92s_set_antennadiff(struct ieee80211_hw *hw,
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
        struct rtl_phy *rtlphy = &(rtlpriv->phy);
-       char ant_pwr_diff = 0;
+       s8 ant_pwr_diff = 0;
        u32     u4reg_val = 0;
 
        if (rtlphy->rf_type == RF_2T2R) {
index 32970bf18856006fc83f5683d866424083064425..43d4c791d5632c789b3a78205b246a70cba144d1 100644 (file)
@@ -522,8 +522,8 @@ struct rx_fwinfo_8723e {
        u8 pwdb_all;
        u8 cfosho[4];
        u8 cfotail[4];
-       char rxevm[2];
-       char rxsnr[4];
+       s8 rxevm[2];
+       s8 rxsnr[4];
        u8 pdsnr[2];
        u8 csi_current[2];
        u8 csi_target[2];
index 3a81cdba8ca3ef1316d093db9137e779b24fdc04..6f07cd60c7addedb8b14e35851c4d4c03399eb97 100644 (file)
@@ -758,11 +758,11 @@ static void rtl8723be_dm_txpower_tracking_callback_thermalmeter(
        u8 ofdm_min_index = 6;
        u8 index_for_channel = 0;
 
-       char delta_swing_table_idx_tup_a[TXSCALE_TABLE_SIZE] = {
+       s8 delta_swing_table_idx_tup_a[TXSCALE_TABLE_SIZE] = {
                0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,
                5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10,
                10, 11, 11, 12, 12, 13, 14, 15};
-       char delta_swing_table_idx_tdown_a[TXSCALE_TABLE_SIZE] = {
+       s8 delta_swing_table_idx_tdown_a[TXSCALE_TABLE_SIZE] = {
                0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,
                5, 6, 6, 6, 6, 7, 7, 7, 8, 8,  9,
                9, 10, 10, 11, 12, 13, 14, 15};
index c5ca9dfb445caece7139dedf51d54a8c45619090..aa2e670d6beeb8fda7d7cb15776937a0ca2d9167 100644 (file)
@@ -379,7 +379,7 @@ static void _rtl8723be_phy_store_txpower_by_rate_base(struct ieee80211_hw *hw)
 static void _phy_convert_txpower_dbm_to_relative_value(u32 *data, u8 start,
                                                u8 end, u8 base_val)
 {
-       char i = 0;
+       s8 i = 0;
        u8 temp_value = 0;
        u32 temp_data = 0;
 
@@ -953,7 +953,7 @@ static u8 _rtl8723be_get_txpower_by_rate(struct ieee80211_hw *hw,
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_phy *rtlphy = &rtlpriv->phy;
        u8 shift = 0, rate_section, tx_num;
-       char tx_pwr_diff = 0;
+       s8 tx_pwr_diff = 0;
 
        rate_section = _rtl8723be_phy_get_ratesection_intxpower_byrate(rfpath,
                                                                       rate);
index 60345975f9fd3aeabd71d5323ddbf1af9567f658..e881ef8ab27bf5db5db94e2d60c48c6e51c39dad 100644 (file)
@@ -56,7 +56,7 @@ static void _rtl8723be_query_rxphystatus(struct ieee80211_hw *hw,
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct phy_status_rpt *p_phystrpt = (struct phy_status_rpt *)p_drvinfo;
-       char rx_pwr_all = 0, rx_pwr[4];
+       s8 rx_pwr_all = 0, rx_pwr[4];
        u8 rf_rx_num = 0, evm, pwdb_all, pwdb_all_bt = 0;
        u8 i, max_spatial_stream;
        u32 rssi, total_rssi = 0;
index 40c36607b8b93f459c82e1e4c55dc55acba2219a..8a9fe41ac15b05c520e51149eca4beb4ad5ca607 100644 (file)
@@ -385,9 +385,9 @@ struct phy_status_rpt {
        u8 cck_rpt_b_ofdm_cfosho_b;
        u8 rsvd_1;/* ch_corr_msb; */
        u8 noise_power_db_msb;
-       char path_cfotail[2];
+       s8 path_cfotail[2];
        u8 pcts_mask[2];
-       char stream_rxevm[2];
+       s8 stream_rxevm[2];
        u8 path_rxsnr[2];
        u8 noise_power_db_lsb;
        u8 rsvd_2[3];
@@ -422,8 +422,8 @@ struct rx_fwinfo_8723be {
        u8 pwdb_all;
        u8 cfosho[4];
        u8 cfotail[4];
-       char rxevm[2];
-       char rxsnr[2];
+       s8 rxevm[2];
+       s8 rxsnr[2];
        u8 pcts_msk_rpt[2];
        u8 pdsnr[2];
        u8 csi_current[2];
index 17a681788611a7019ec4d11a88b5914cf1006f4d..69de8353d0fe817d16778cf0c133b2801573c10b 100644 (file)
@@ -1355,7 +1355,7 @@ void rtl8812ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
        u32 final_swing_idx[2];
        u8 pwr_tracking_limit = 26; /*+1.0dB*/
        u8 tx_rate = 0xFF;
-       char final_ofdm_swing_index = 0;
+       s8 final_ofdm_swing_index = 0;
 
        if (rtldm->tx_rate != 0xFF)
                tx_rate =
@@ -2045,7 +2045,7 @@ void rtl8821ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
        u32 final_swing_idx[1];
        u8 pwr_tracking_limit = 26; /*+1.0dB*/
        u8 tx_rate = 0xFF;
-       char final_ofdm_swing_index = 0;
+       s8 final_ofdm_swing_index = 0;
 
        if (rtldm->tx_rate != 0xFF)
                tx_rate = rtl8821ae_hw_rate_to_mrate(hw, rtldm->tx_rate);
index 0c3b9ce86e2e516152c6feabbac68d41ad162af9..46ea4f840ab100334302c1bcb56771269d50e3fd 100644 (file)
@@ -366,12 +366,12 @@ u32 phy_get_tx_swing_8812A(struct ieee80211_hw *hw, u8    band,
        struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
        struct rtl_dm *rtldm = rtl_dm(rtlpriv);
        struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
-       char reg_swing_2g = -1;/* 0xff; */
-       char reg_swing_5g = -1;/* 0xff; */
-       char swing_2g = -1 * reg_swing_2g;
-       char swing_5g = -1 * reg_swing_5g;
+       s8 reg_swing_2g = -1;/* 0xff; */
+       s8 reg_swing_5g = -1;/* 0xff; */
+       s8 swing_2g = -1 * reg_swing_2g;
+       s8 swing_5g = -1 * reg_swing_5g;
        u32  out = 0x200;
-       const char auto_temp = -1;
+       const s8 auto_temp = -1;
 
        RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD,
                 "===> PHY_GetTxBBSwing_8812A, bbSwing_2G: %d, bbSwing_5G: %d,autoload_failflag=%d.\n",
@@ -524,7 +524,7 @@ void rtl8821ae_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band)
        struct rtl_dm *rtldm = rtl_dm(rtlpriv);
        u8 current_band = rtlhal->current_bandtype;
        u32 txpath, rxpath;
-       char bb_diff_between_band;
+       s8 bb_diff_between_band;
 
        txpath = rtl8821ae_phy_query_bb_reg(hw, RTXPATH, 0xf0);
        rxpath = rtl8821ae_phy_query_bb_reg(hw, RCCK_RX, 0x0f000000);
@@ -986,7 +986,7 @@ static void _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit(struct ieee8
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_phy *rtlphy = &rtlpriv->phy;
        u8 regulation, bw, channel, rate_section;
-       char temp_pwrlmt = 0;
+       s8 temp_pwrlmt = 0;
 
        for (regulation = 0; regulation < MAX_REGULATION_NUM; ++regulation) {
                for (bw = 0; bw < MAX_5G_BANDWITH_NUM; ++bw) {
@@ -1155,7 +1155,7 @@ static void _rtl8812ae_phy_convert_txpower_limit_to_power_index(struct ieee80211
        u8 regulation, bw, channel, rate_section;
        u8 base_index2_4G = 0;
        u8 base_index5G = 0;
-       char temp_value = 0, temp_pwrlmt = 0;
+       s8 temp_value = 0, temp_pwrlmt = 0;
        u8 rf_path = 0;
 
        RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
@@ -1467,11 +1467,11 @@ static bool _rtl8812ae_eq_n_byte(u8 *str1, u8 *str2, u32 num)
        return true;
 }
 
-static char _rtl8812ae_phy_get_chnl_idx_of_txpwr_lmt(struct ieee80211_hw *hw,
+static s8 _rtl8812ae_phy_get_chnl_idx_of_txpwr_lmt(struct ieee80211_hw *hw,
                                              u8 band, u8 channel)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
-       char channel_index = -1;
+       s8 channel_index = -1;
        u8  i = 0;
 
        if (band == BAND_ON_2_4G)
@@ -1502,7 +1502,7 @@ static void _rtl8812ae_phy_set_txpower_limit(struct ieee80211_hw *hw, u8 *pregul
        struct rtl_phy *rtlphy = &rtlpriv->phy;
        u8 regulation = 0, bandwidth = 0, rate_section = 0, channel;
        u8 channel_index;
-       char power_limit = 0, prev_power_limit, ret;
+       s8 power_limit = 0, prev_power_limit, ret;
 
        if (!_rtl8812ae_get_integer_from_string((char *)pchannel, &channel) ||
            !_rtl8812ae_get_integer_from_string((char *)ppower_limit,
@@ -2254,9 +2254,9 @@ static bool _rtl8821ae_phy_get_chnl_index(u8 channel, u8 *chnl_index)
        return in_24g;
 }
 
-static char _rtl8821ae_phy_get_ratesection_intxpower_byrate(u8 path, u8 rate)
+static s8 _rtl8821ae_phy_get_ratesection_intxpower_byrate(u8 path, u8 rate)
 {
-       char rate_section = 0;
+       s8 rate_section = 0;
        switch (rate) {
        case DESC_RATE1M:
        case DESC_RATE2M:
@@ -2338,9 +2338,9 @@ static char _rtl8821ae_phy_get_ratesection_intxpower_byrate(u8 path, u8 rate)
        return rate_section;
 }
 
-static char _rtl8812ae_phy_get_world_wide_limit(char  *limit_table)
+static s8 _rtl8812ae_phy_get_world_wide_limit(s8  *limit_table)
 {
-       char min = limit_table[0];
+       s8 min = limit_table[0];
        u8 i = 0;
 
        for (i = 0; i < MAX_REGULATION_NUM; ++i) {
@@ -2350,7 +2350,7 @@ static char _rtl8812ae_phy_get_world_wide_limit(char  *limit_table)
        return min;
 }
 
-static char _rtl8812ae_phy_get_txpower_limit(struct ieee80211_hw *hw,
+static s8 _rtl8812ae_phy_get_txpower_limit(struct ieee80211_hw *hw,
                                             u8 band,
                                             enum ht_channel_width bandwidth,
                                             enum radio_path rf_path,
@@ -2362,7 +2362,7 @@ static char _rtl8812ae_phy_get_txpower_limit(struct ieee80211_hw *hw,
        short band_temp = -1, regulation = -1, bandwidth_temp = -1,
                 rate_section = -1, channel_temp = -1;
        u16 bd, regu, bdwidth, sec, chnl;
-       char power_limit = MAX_POWER_INDEX;
+       s8 power_limit = MAX_POWER_INDEX;
 
        if (rtlefuse->eeprom_regulatory == 2)
                return MAX_POWER_INDEX;
@@ -2489,7 +2489,7 @@ static char _rtl8812ae_phy_get_txpower_limit(struct ieee80211_hw *hw,
        chnl = channel_temp;
 
        if (band == BAND_ON_2_4G) {
-               char limits[10] = {0};
+               s8 limits[10] = {0};
                u8 i;
 
                for (i = 0; i < 4; ++i)
@@ -2501,7 +2501,7 @@ static char _rtl8812ae_phy_get_txpower_limit(struct ieee80211_hw *hw,
                        rtlphy->txpwr_limit_2_4g[regu][bdwidth]
                                        [sec][chnl][rf_path];
        } else if (band == BAND_ON_5G) {
-               char limits[10] = {0};
+               s8 limits[10] = {0};
                u8 i;
 
                for (i = 0; i < MAX_REGULATION_NUM; ++i)
@@ -2519,14 +2519,14 @@ static char _rtl8812ae_phy_get_txpower_limit(struct ieee80211_hw *hw,
        return power_limit;
 }
 
-static char _rtl8821ae_phy_get_txpower_by_rate(struct ieee80211_hw *hw,
+static s8 _rtl8821ae_phy_get_txpower_by_rate(struct ieee80211_hw *hw,
                                        u8 band, u8 path, u8 rate)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_phy *rtlphy = &rtlpriv->phy;
        u8 shift = 0, rate_section, tx_num;
-       char tx_pwr_diff = 0;
-       char limit = 0;
+       s8 tx_pwr_diff = 0;
+       s8 limit = 0;
 
        rate_section = _rtl8821ae_phy_get_ratesection_intxpower_byrate(path, rate);
        tx_num = RF_TX_NUM_NONIMPLEMENT;
@@ -2639,7 +2639,7 @@ static u8 _rtl8821ae_get_txpower_index(struct ieee80211_hw *hw, u8 path,
        u8 index = (channel - 1);
        u8 txpower = 0;
        bool in_24g = false;
-       char powerdiff_byrate = 0;
+       s8 powerdiff_byrate = 0;
 
        if (((rtlhal->current_bandtype == BAND_ON_2_4G) &&
            (channel > 14 || channel < 1)) ||
@@ -4637,7 +4637,7 @@ void rtl8821ae_phy_lc_calibrate(struct ieee80211_hw *hw)
 {
 }
 
-void rtl8821ae_phy_ap_calibrate(struct ieee80211_hw *hw, char delta)
+void rtl8821ae_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta)
 {
 }
 
index c411f0a95cc49c35630dbda113b444301c30de19..1285e1adfe9d98f4edf88fc06696eb60b4469e1c 100644 (file)
@@ -236,7 +236,7 @@ void rtl8821ae_phy_iq_calibrate(struct ieee80211_hw *hw,
                                bool b_recovery);
 void rtl8812ae_phy_iq_calibrate(struct ieee80211_hw *hw,
                                bool b_recovery);
-void rtl8821ae_phy_ap_calibrate(struct ieee80211_hw *hw, char delta);
+void rtl8821ae_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta);
 void rtl8821ae_phy_lc_calibrate(struct ieee80211_hw *hw);
 void rtl8821ae_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
 bool rtl8812ae_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
index 41efaa148d138b1f10bcca27a4ad1b1cf5438ac7..8c2a5e21308e724594bbd6c4a152b065b9567814 100644 (file)
@@ -48,7 +48,7 @@ static u8 _rtl8821ae_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue)
        return skb->priority;
 }
 
-static u16 odm_cfo(char value)
+static u16 odm_cfo(s8 value)
 {
        int ret_val;
 
@@ -64,9 +64,9 @@ static u16 odm_cfo(char value)
        return ret_val;
 }
 
-static u8 _rtl8821ae_evm_dbm_jaguar(char value)
+static u8 _rtl8821ae_evm_dbm_jaguar(s8 value)
 {
-       char ret_val = value;
+       s8 ret_val = value;
 
        /* -33dB~0dB to 33dB ~ 0dB*/
        if (ret_val == -128)
@@ -88,7 +88,7 @@ static void query_rxphystatus(struct ieee80211_hw *hw,
        struct phy_status_rpt *p_phystrpt = (struct phy_status_rpt *)p_drvinfo;
        struct rtl_dm *rtldm = rtl_dm(rtl_priv(hw));
        struct rtl_phy *rtlphy = &rtlpriv->phy;
-       char rx_pwr_all = 0, rx_pwr[4];
+       s8 rx_pwr_all = 0, rx_pwr[4];
        u8 rf_rx_num = 0, evm, evmdbm, pwdb_all;
        u8 i, max_spatial_stream;
        u32 rssi, total_rssi = 0;
@@ -170,7 +170,7 @@ static void query_rxphystatus(struct ieee80211_hw *hw,
                                        pwdb_all = 100;
                        }
                } else { /* 8821 */
-                       char pout = -6;
+                       s8 pout = -6;
 
                        switch (lan_idx) {
                        case 5:
@@ -275,7 +275,7 @@ static void query_rxphystatus(struct ieee80211_hw *hw,
                if (bpacket_match_bssid) {
                        for (i = RF90_PATH_A; i <= RF90_PATH_B; i++)
                                rtl_priv(hw)->dm.cfo_tail[i] =
-                                       (char)p_phystrpt->cfotail[i];
+                                       (s8)p_phystrpt->cfotail[i];
 
                        rtl_priv(hw)->dm.packet_count++;
                }
index ad565bebf1d5842a920acfac645aac75b4015d29..b6f3c564b8d1c14d4013cb19d1089a5b88caaeb1 100644 (file)
@@ -390,11 +390,11 @@ struct phy_status_rpt {
        u8 cfosho[4];   /* DW 1 byte 1 DW 2 byte 0 */
 
        /* DWORD 2 */
-       char cfotail[4];        /* DW 2 byte 1 DW 3 byte 0 */
+       s8 cfotail[4];  /* DW 2 byte 1 DW 3 byte 0 */
 
        /* DWORD 3 */
-       char rxevm[2];  /* DW 3 byte 1 DW 3 byte 2 */
-       char rxsnr[2];  /* DW 3 byte 3 DW 4 byte 0 */
+       s8 rxevm[2];    /* DW 3 byte 1 DW 3 byte 2 */
+       s8 rxsnr[2];    /* DW 3 byte 3 DW 4 byte 0 */
 
        /* DWORD 4 */
        u8 pcts_msk_rpt[2];
@@ -418,8 +418,8 @@ struct rx_fwinfo_8821ae {
        u8 pwdb_all;
        u8 cfosho[4];
        u8 cfotail[4];
-       char rxevm[2];
-       char rxsnr[4];
+       s8 rxevm[2];
+       s8 rxsnr[4];
        u8 pdsnr[2];
        u8 csi_current[2];
        u8 csi_target[2];
index d8b30690b00de35aad2595a4e8d28952b9b2ffb4..61700fa05570afc6dc5294c76786ffe0416ef084 100644 (file)
@@ -26,7 +26,7 @@
 #include "stats.h"
 #include <linux/export.h>
 
-u8 rtl_query_rxpwrpercentage(char antpower)
+u8 rtl_query_rxpwrpercentage(s8 antpower)
 {
        if ((antpower <= -100) || (antpower >= 20))
                return 0;
@@ -37,9 +37,9 @@ u8 rtl_query_rxpwrpercentage(char antpower)
 }
 EXPORT_SYMBOL(rtl_query_rxpwrpercentage);
 
-u8 rtl_evm_db_to_percentage(char value)
+u8 rtl_evm_db_to_percentage(s8 value)
 {
-       char ret_val = clamp(-value, 0, 33) * 3;
+       s8 ret_val = clamp(-value, 0, 33) * 3;
 
        if (ret_val == 99)
                ret_val = 100;
index 2b57dffef572f019ac42d5d2465bb82e82bc29ce..bd0108f93182b76ba7b04d81a0dc67e8ed964eb8 100644 (file)
@@ -33,8 +33,8 @@
 /* Rx smooth factor */
 #define        RX_SMOOTH_FACTOR                        20
 
-u8 rtl_query_rxpwrpercentage(char antpower);
-u8 rtl_evm_db_to_percentage(char value);
+u8 rtl_query_rxpwrpercentage(s8 antpower);
+u8 rtl_evm_db_to_percentage(s8 value);
 long rtl_signal_scale_mapping(struct ieee80211_hw *hw, long currsig);
 void rtl_process_phyinfo(struct ieee80211_hw *hw, u8 *buffer,
                         struct rtl_stats *pstatus);
index 4e0ab4d42aa66b7306ed14bca00cbbd42edd6097..c5086c2229aaccbace6c91d28d15b1adec2975dc 100644 (file)
@@ -1089,7 +1089,7 @@ struct dynamic_primary_cca {
 };
 
 struct rtl_regulatory {
-       char alpha2[2];
+       s8 alpha2[2];
        u16 country_code;
        u16 max_power_level;
        u32 tp_scale;
@@ -1256,16 +1256,16 @@ struct rtl_phy {
        u8 cur_bw20_txpwridx;
        u8 cur_bw40_txpwridx;
 
-       char txpwr_limit_2_4g[MAX_REGULATION_NUM]
-                            [MAX_2_4G_BANDWITH_NUM]
-                            [MAX_RATE_SECTION_NUM]
-                            [CHANNEL_MAX_NUMBER_2G]
-                            [MAX_RF_PATH_NUM];
-       char txpwr_limit_5g[MAX_REGULATION_NUM]
-                          [MAX_5G_BANDWITH_NUM]
+       s8 txpwr_limit_2_4g[MAX_REGULATION_NUM]
+                          [MAX_2_4G_BANDWITH_NUM]
                           [MAX_RATE_SECTION_NUM]
-                          [CHANNEL_MAX_NUMBER_5G]
+                          [CHANNEL_MAX_NUMBER_2G]
                           [MAX_RF_PATH_NUM];
+       s8 txpwr_limit_5g[MAX_REGULATION_NUM]
+                        [MAX_5G_BANDWITH_NUM]
+                        [MAX_RATE_SECTION_NUM]
+                        [CHANNEL_MAX_NUMBER_5G]
+                        [MAX_RF_PATH_NUM];
 
        u32 rfreg_chnlval[2];
        bool apk_done;
@@ -1639,7 +1639,7 @@ struct fast_ant_training {
 };
 
 struct dm_phy_dbg_info {
-       char rx_snrdb[4];
+       s8 rx_snrdb[4];
        u64 num_qry_phy_status;
        u64 num_qry_phy_status_cck;
        u64 num_qry_phy_status_ofdm;
@@ -1688,16 +1688,16 @@ struct rtl_dm {
        u8 txpower_track_control;
        bool interrupt_migration;
        bool disable_tx_int;
-       char ofdm_index[MAX_RF_PATH];
+       s8 ofdm_index[MAX_RF_PATH];
        u8 default_ofdm_index;
        u8 default_cck_index;
-       char cck_index;
-       char delta_power_index[MAX_RF_PATH];
-       char delta_power_index_last[MAX_RF_PATH];
-       char power_index_offset[MAX_RF_PATH];
-       char absolute_ofdm_swing_idx[MAX_RF_PATH];
-       char remnant_ofdm_swing_idx[MAX_RF_PATH];
-       char remnant_cck_idx;
+       s8 cck_index;
+       s8 delta_power_index[MAX_RF_PATH];
+       s8 delta_power_index_last[MAX_RF_PATH];
+       s8 power_index_offset[MAX_RF_PATH];
+       s8 absolute_ofdm_swing_idx[MAX_RF_PATH];
+       s8 remnant_ofdm_swing_idx[MAX_RF_PATH];
+       s8 remnant_cck_idx;
        bool modify_txagc_flag_path_a;
        bool modify_txagc_flag_path_b;
 
@@ -1726,8 +1726,8 @@ struct rtl_dm {
        u8      swing_idx_cck_base;
        bool    swing_flag_cck;
 
-       char    swing_diff_2g;
-       char    swing_diff_5g;
+       s8      swing_diff_2g;
+       s8      swing_diff_5g;
 
        u8 delta_swing_table_idx_24gccka_p[DEL_SW_IDX_SZ];
        u8 delta_swing_table_idx_24gccka_n[DEL_SW_IDX_SZ];
@@ -1838,17 +1838,17 @@ struct rtl_efuse {
         *
         * Sizes of these arrays are decided by the larger ones.
         */
-       char txpwr_cckdiff[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
-       char txpwr_ht20diff[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
-       char txpwr_ht40diff[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
-       char txpwr_legacyhtdiff[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
+       s8 txpwr_cckdiff[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
+       s8 txpwr_ht20diff[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
+       s8 txpwr_ht40diff[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
+       s8 txpwr_legacyhtdiff[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
 
        u8 txpwr_5g_bw40base[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
        u8 txpwr_5g_bw80base[MAX_RF_PATH][CHANNEL_MAX_NUMBER_5G_80M];
-       char txpwr_5g_ofdmdiff[MAX_RF_PATH][MAX_TX_COUNT];
-       char txpwr_5g_bw20diff[MAX_RF_PATH][MAX_TX_COUNT];
-       char txpwr_5g_bw40diff[MAX_RF_PATH][MAX_TX_COUNT];
-       char txpwr_5g_bw80diff[MAX_RF_PATH][MAX_TX_COUNT];
+       s8 txpwr_5g_ofdmdiff[MAX_RF_PATH][MAX_TX_COUNT];
+       s8 txpwr_5g_bw20diff[MAX_RF_PATH][MAX_TX_COUNT];
+       s8 txpwr_5g_bw40diff[MAX_RF_PATH][MAX_TX_COUNT];
+       s8 txpwr_5g_bw80diff[MAX_RF_PATH][MAX_TX_COUNT];
 
        u8 txpwr_safetyflag;                    /* Band edge enable flag */
        u16 eeprom_txpowerdiff;
@@ -2006,7 +2006,7 @@ struct rtl_stats {
        bool is_ht;
        bool packet_toself;
        bool packet_beacon;     /*for rssi */
-       char cck_adc_pwdb[4];   /*for rx path selection */
+       s8 cck_adc_pwdb[4];     /*for rx path selection */
 
        bool is_vht;
        bool is_short_gi;
@@ -2413,9 +2413,9 @@ struct dig_t {
        u8 presta_cstate;
        u8 curmultista_cstate;
        u8 stop_dig;
-       char back_val;
-       char back_range_max;
-       char back_range_min;
+       s8 back_val;
+       s8 back_range_max;
+       s8 back_range_min;
        u8 rx_gain_max;
        u8 rx_gain_min;
        u8 min_undec_pwdb_for_dm;
@@ -2441,8 +2441,8 @@ struct dig_t {
        u8 cur_cs_ratiostate;
        u8 pre_cs_ratiostate;
        u8 backoff_enable_flag;
-       char backoffval_range_max;
-       char backoffval_range_min;
+       s8 backoffval_range_max;
+       s8 backoffval_range_min;
        u8 dig_min_0;
        u8 dig_min_1;
        u8 bt30_cur_igi;