|
@@ -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_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
|
struct rtl_dm *rtldm = rtl_dm(rtlpriv);
|
|
struct rtl_dm *rtldm = rtl_dm(rtlpriv);
|
|
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
|
|
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;
|
|
u32 out = 0x200;
|
|
- const char auto_temp = -1;
|
|
|
|
|
|
+ const s8 auto_temp = -1;
|
|
|
|
|
|
RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD,
|
|
RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD,
|
|
"===> PHY_GetTxBBSwing_8812A, bbSwing_2G: %d, bbSwing_5G: %d,autoload_failflag=%d.\n",
|
|
"===> 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);
|
|
struct rtl_dm *rtldm = rtl_dm(rtlpriv);
|
|
u8 current_band = rtlhal->current_bandtype;
|
|
u8 current_band = rtlhal->current_bandtype;
|
|
u32 txpath, rxpath;
|
|
u32 txpath, rxpath;
|
|
- char bb_diff_between_band;
|
|
|
|
|
|
+ s8 bb_diff_between_band;
|
|
|
|
|
|
txpath = rtl8821ae_phy_query_bb_reg(hw, RTXPATH, 0xf0);
|
|
txpath = rtl8821ae_phy_query_bb_reg(hw, RTXPATH, 0xf0);
|
|
rxpath = rtl8821ae_phy_query_bb_reg(hw, RCCK_RX, 0x0f000000);
|
|
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_priv *rtlpriv = rtl_priv(hw);
|
|
struct rtl_phy *rtlphy = &rtlpriv->phy;
|
|
struct rtl_phy *rtlphy = &rtlpriv->phy;
|
|
u8 regulation, bw, channel, rate_section;
|
|
u8 regulation, bw, channel, rate_section;
|
|
- char temp_pwrlmt = 0;
|
|
|
|
|
|
+ s8 temp_pwrlmt = 0;
|
|
|
|
|
|
for (regulation = 0; regulation < MAX_REGULATION_NUM; ++regulation) {
|
|
for (regulation = 0; regulation < MAX_REGULATION_NUM; ++regulation) {
|
|
for (bw = 0; bw < MAX_5G_BANDWITH_NUM; ++bw) {
|
|
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 regulation, bw, channel, rate_section;
|
|
u8 base_index2_4G = 0;
|
|
u8 base_index2_4G = 0;
|
|
u8 base_index5G = 0;
|
|
u8 base_index5G = 0;
|
|
- char temp_value = 0, temp_pwrlmt = 0;
|
|
|
|
|
|
+ s8 temp_value = 0, temp_pwrlmt = 0;
|
|
u8 rf_path = 0;
|
|
u8 rf_path = 0;
|
|
|
|
|
|
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
|
|
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;
|
|
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)
|
|
u8 band, u8 channel)
|
|
{
|
|
{
|
|
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
|
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
|
- char channel_index = -1;
|
|
|
|
|
|
+ s8 channel_index = -1;
|
|
u8 i = 0;
|
|
u8 i = 0;
|
|
|
|
|
|
if (band == BAND_ON_2_4G)
|
|
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;
|
|
struct rtl_phy *rtlphy = &rtlpriv->phy;
|
|
u8 regulation = 0, bandwidth = 0, rate_section = 0, channel;
|
|
u8 regulation = 0, bandwidth = 0, rate_section = 0, channel;
|
|
u8 channel_index;
|
|
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) ||
|
|
if (!_rtl8812ae_get_integer_from_string((char *)pchannel, &channel) ||
|
|
!_rtl8812ae_get_integer_from_string((char *)ppower_limit,
|
|
!_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;
|
|
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) {
|
|
switch (rate) {
|
|
case DESC_RATE1M:
|
|
case DESC_RATE1M:
|
|
case DESC_RATE2M:
|
|
case DESC_RATE2M:
|
|
@@ -2338,9 +2338,9 @@ static char _rtl8821ae_phy_get_ratesection_intxpower_byrate(u8 path, u8 rate)
|
|
return rate_section;
|
|
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;
|
|
u8 i = 0;
|
|
|
|
|
|
for (i = 0; i < MAX_REGULATION_NUM; ++i) {
|
|
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;
|
|
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,
|
|
u8 band,
|
|
enum ht_channel_width bandwidth,
|
|
enum ht_channel_width bandwidth,
|
|
enum radio_path rf_path,
|
|
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,
|
|
short band_temp = -1, regulation = -1, bandwidth_temp = -1,
|
|
rate_section = -1, channel_temp = -1;
|
|
rate_section = -1, channel_temp = -1;
|
|
u16 bd, regu, bdwidth, sec, chnl;
|
|
u16 bd, regu, bdwidth, sec, chnl;
|
|
- char power_limit = MAX_POWER_INDEX;
|
|
|
|
|
|
+ s8 power_limit = MAX_POWER_INDEX;
|
|
|
|
|
|
if (rtlefuse->eeprom_regulatory == 2)
|
|
if (rtlefuse->eeprom_regulatory == 2)
|
|
return MAX_POWER_INDEX;
|
|
return MAX_POWER_INDEX;
|
|
@@ -2489,7 +2489,7 @@ static char _rtl8812ae_phy_get_txpower_limit(struct ieee80211_hw *hw,
|
|
chnl = channel_temp;
|
|
chnl = channel_temp;
|
|
|
|
|
|
if (band == BAND_ON_2_4G) {
|
|
if (band == BAND_ON_2_4G) {
|
|
- char limits[10] = {0};
|
|
|
|
|
|
+ s8 limits[10] = {0};
|
|
u8 i;
|
|
u8 i;
|
|
|
|
|
|
for (i = 0; i < 4; ++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]
|
|
rtlphy->txpwr_limit_2_4g[regu][bdwidth]
|
|
[sec][chnl][rf_path];
|
|
[sec][chnl][rf_path];
|
|
} else if (band == BAND_ON_5G) {
|
|
} else if (band == BAND_ON_5G) {
|
|
- char limits[10] = {0};
|
|
|
|
|
|
+ s8 limits[10] = {0};
|
|
u8 i;
|
|
u8 i;
|
|
|
|
|
|
for (i = 0; i < MAX_REGULATION_NUM; ++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;
|
|
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)
|
|
u8 band, u8 path, u8 rate)
|
|
{
|
|
{
|
|
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
|
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
|
struct rtl_phy *rtlphy = &rtlpriv->phy;
|
|
struct rtl_phy *rtlphy = &rtlpriv->phy;
|
|
u8 shift = 0, rate_section, tx_num;
|
|
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);
|
|
rate_section = _rtl8821ae_phy_get_ratesection_intxpower_byrate(path, rate);
|
|
tx_num = RF_TX_NUM_NONIMPLEMENT;
|
|
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 index = (channel - 1);
|
|
u8 txpower = 0;
|
|
u8 txpower = 0;
|
|
bool in_24g = false;
|
|
bool in_24g = false;
|
|
- char powerdiff_byrate = 0;
|
|
|
|
|
|
+ s8 powerdiff_byrate = 0;
|
|
|
|
|
|
if (((rtlhal->current_bandtype == BAND_ON_2_4G) &&
|
|
if (((rtlhal->current_bandtype == BAND_ON_2_4G) &&
|
|
(channel > 14 || channel < 1)) ||
|
|
(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)
|
|
{
|
|
{
|
|
}
|
|
}
|
|
|
|
|