Commit 02527a73 authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

rtlwifi: rtl8188ee: Remove all instances of DBG_EMERG

This is a step toward eliminating the RT_TRACE macros. Those calls that
have DBG_EMERG as the level are always logged, and they represent error
conditions, thus they are replaced with pr_err().
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 0fc30e93
...@@ -125,10 +125,8 @@ static void _rtl88e_write_fw(struct ieee80211_hw *hw, ...@@ -125,10 +125,8 @@ static void _rtl88e_write_fw(struct ieee80211_hw *hw,
pagenums = size / FW_8192C_PAGE_SIZE; pagenums = size / FW_8192C_PAGE_SIZE;
remainsize = size % FW_8192C_PAGE_SIZE; remainsize = size % FW_8192C_PAGE_SIZE;
if (pagenums > 8) { if (pagenums > 8)
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Page numbers should not greater then 8\n");
"Page numbers should not greater then 8\n");
}
for (page = 0; page < pagenums; page++) { for (page = 0; page < pagenums; page++) {
offset = page * FW_8192C_PAGE_SIZE; offset = page * FW_8192C_PAGE_SIZE;
...@@ -157,15 +155,10 @@ static int _rtl88e_fw_free_to_go(struct ieee80211_hw *hw) ...@@ -157,15 +155,10 @@ static int _rtl88e_fw_free_to_go(struct ieee80211_hw *hw)
(!(value32 & FWDL_CHKSUM_RPT))); (!(value32 & FWDL_CHKSUM_RPT)));
if (counter >= FW_8192C_POLLING_TIMEOUT_COUNT) { if (counter >= FW_8192C_POLLING_TIMEOUT_COUNT) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("chksum report fail! REG_MCUFWDL:0x%08x .\n",
"chksum report faill ! REG_MCUFWDL:0x%08x .\n",
value32); value32);
goto exit; goto exit;
} }
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE,
"Checksum report OK ! REG_MCUFWDL:0x%08x .\n", value32);
value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL); value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
value32 |= MCUFWDL_RDY; value32 |= MCUFWDL_RDY;
value32 &= ~WINTINI_RDY; value32 &= ~WINTINI_RDY;
...@@ -176,20 +169,15 @@ static int _rtl88e_fw_free_to_go(struct ieee80211_hw *hw) ...@@ -176,20 +169,15 @@ static int _rtl88e_fw_free_to_go(struct ieee80211_hw *hw)
do { do {
value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL); value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
if (value32 & WINTINI_RDY) { if (value32 & WINTINI_RDY)
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, return 0;
"Polling FW ready success!! REG_MCUFWDL:0x%08x.\n",
value32);
err = 0;
goto exit;
}
udelay(FW_8192C_POLLING_DELAY); udelay(FW_8192C_POLLING_DELAY);
} while (counter++ < FW_8192C_POLLING_TIMEOUT_COUNT); } while (counter++ < FW_8192C_POLLING_TIMEOUT_COUNT);
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Polling FW ready fail!! REG_MCUFWDL:0x%08x .\n",
"Polling FW ready fail!! REG_MCUFWDL:0x%08x .\n", value32); value32);
exit: exit:
return err; return err;
...@@ -235,8 +223,7 @@ int rtl88e_download_fw(struct ieee80211_hw *hw, ...@@ -235,8 +223,7 @@ int rtl88e_download_fw(struct ieee80211_hw *hw,
err = _rtl88e_fw_free_to_go(hw); err = _rtl88e_fw_free_to_go(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Firmware is not ready to run!\n");
"Firmware is not ready to run!\n");
} else { } else {
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD,
"Firmware is ready to run!\n"); "Firmware is ready to run!\n");
...@@ -309,8 +296,7 @@ static void _rtl88e_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -309,8 +296,7 @@ static void _rtl88e_fill_h2c_command(struct ieee80211_hw *hw,
while (!write_sucess) { while (!write_sucess) {
wait_writeh2c_limit--; wait_writeh2c_limit--;
if (wait_writeh2c_limit == 0) { if (wait_writeh2c_limit == 0) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Write H2C fail because no trigger for FW INT!\n");
"Write H2C fail because no trigger for FW INT!\n");
break; break;
} }
......
...@@ -358,8 +358,7 @@ void rtl88ee_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -358,8 +358,7 @@ void rtl88ee_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
case HAL_DEF_WOWLAN: case HAL_DEF_WOWLAN:
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("switch case %#x not processed\n", variable);
"switch case %#x not processed\n", variable);
break; break;
} }
} }
...@@ -572,8 +571,7 @@ void rtl88ee_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -572,8 +571,7 @@ void rtl88ee_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
acm_ctrl &= (~ACMHW_VOQEN); acm_ctrl &= (~ACMHW_VOQEN);
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("switch case %#x not processed\n",
"switch case %#x not processed\n",
e_aci); e_aci);
break; break;
} }
...@@ -737,8 +735,7 @@ void rtl88ee_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -737,8 +735,7 @@ void rtl88ee_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
2, array); 2, array);
break; } break; }
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("switch case %#x not processed\n", variable);
"switch case %#x not processed\n", variable);
break; break;
} }
} }
...@@ -759,8 +756,7 @@ static bool _rtl88ee_llt_write(struct ieee80211_hw *hw, u32 address, u32 data) ...@@ -759,8 +756,7 @@ static bool _rtl88ee_llt_write(struct ieee80211_hw *hw, u32 address, u32 data)
break; break;
if (count > POLLING_LLT_THRESHOLD) { if (count > POLLING_LLT_THRESHOLD) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Failed to polling write LLT done at address %d!\n",
"Failed to polling write LLT done at address %d!\n",
address); address);
status = false; status = false;
break; break;
...@@ -1096,7 +1092,7 @@ int rtl88ee_hw_init(struct ieee80211_hw *hw) ...@@ -1096,7 +1092,7 @@ int rtl88ee_hw_init(struct ieee80211_hw *hw)
rtstatus = _rtl88ee_init_mac(hw); rtstatus = _rtl88ee_init_mac(hw);
if (rtstatus != true) { if (rtstatus != true) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n"); pr_info("Init MAC failed\n");
err = 1; err = 1;
goto exit; goto exit;
} }
...@@ -1252,8 +1248,7 @@ static int _rtl88ee_set_media_status(struct ieee80211_hw *hw, ...@@ -1252,8 +1248,7 @@ static int _rtl88ee_set_media_status(struct ieee80211_hw *hw,
"Set Network type to AP!\n"); "Set Network type to AP!\n");
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Network type %d not support!\n", type);
"Network type %d not support!\n", type);
return 1; return 1;
break; break;
} }
...@@ -1987,7 +1982,7 @@ void rtl88ee_read_eeprom_info(struct ieee80211_hw *hw) ...@@ -1987,7 +1982,7 @@ void rtl88ee_read_eeprom_info(struct ieee80211_hw *hw)
rtlefuse->autoload_failflag = false; rtlefuse->autoload_failflag = false;
_rtl88ee_read_adapter_info(hw); _rtl88ee_read_adapter_info(hw);
} else { } else {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Autoload ERR!!\n"); pr_err("Autoload ERR!!\n");
} }
_rtl88ee_hal_customized_behavior(hw); _rtl88ee_hal_customized_behavior(hw);
} }
...@@ -2354,8 +2349,8 @@ void rtl88ee_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -2354,8 +2349,8 @@ void rtl88ee_set_key(struct ieee80211_hw *hw, u32 key_index,
enc_algo = CAM_AES; enc_algo = CAM_AES;
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("switch case %#x not processed\n",
"switch case %#x not processed\n", enc_algo); enc_algo);
enc_algo = CAM_TKIP; enc_algo = CAM_TKIP;
break; break;
} }
...@@ -2373,9 +2368,7 @@ void rtl88ee_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -2373,9 +2368,7 @@ void rtl88ee_set_key(struct ieee80211_hw *hw, u32 key_index,
entry_id = entry_id =
rtl_cam_get_free_entry(hw, p_macaddr); rtl_cam_get_free_entry(hw, p_macaddr);
if (entry_id >= TOTAL_CAM_ENTRY) { if (entry_id >= TOTAL_CAM_ENTRY) {
RT_TRACE(rtlpriv, COMP_SEC, pr_err("Can not find free hw security cam entry\n");
DBG_EMERG,
"Can not find free hw security cam entry\n");
return; return;
} }
} else { } else {
......
...@@ -176,7 +176,7 @@ static u32 _rtl88e_phy_rf_serial_read(struct ieee80211_hw *hw, ...@@ -176,7 +176,7 @@ static u32 _rtl88e_phy_rf_serial_read(struct ieee80211_hw *hw,
offset &= 0xff; offset &= 0xff;
newoffset = offset; newoffset = offset;
if (RT_CANNOT_IO(hw)) { if (RT_CANNOT_IO(hw)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "return all one\n"); pr_err("return all one\n");
return 0xFFFFFFFF; return 0xFFFFFFFF;
} }
tmplong = rtl_get_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD); tmplong = rtl_get_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD);
...@@ -220,7 +220,7 @@ static void _rtl88e_phy_rf_serial_write(struct ieee80211_hw *hw, ...@@ -220,7 +220,7 @@ static void _rtl88e_phy_rf_serial_write(struct ieee80211_hw *hw,
struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath]; struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath];
if (RT_CANNOT_IO(hw)) { if (RT_CANNOT_IO(hw)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "stop\n"); pr_err("stop\n");
return; return;
} }
offset &= 0xff; offset &= 0xff;
...@@ -373,7 +373,7 @@ static bool _rtl88e_phy_bb8188e_config_parafile(struct ieee80211_hw *hw) ...@@ -373,7 +373,7 @@ static bool _rtl88e_phy_bb8188e_config_parafile(struct ieee80211_hw *hw)
rtstatus = phy_config_bb_with_headerfile(hw, BASEBAND_CONFIG_PHY_REG); rtstatus = phy_config_bb_with_headerfile(hw, BASEBAND_CONFIG_PHY_REG);
if (!rtstatus) { if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Write BB Reg Fail!!\n"); pr_err("Write BB Reg Fail!!\n");
return false; return false;
} }
...@@ -383,13 +383,13 @@ static bool _rtl88e_phy_bb8188e_config_parafile(struct ieee80211_hw *hw) ...@@ -383,13 +383,13 @@ static bool _rtl88e_phy_bb8188e_config_parafile(struct ieee80211_hw *hw)
phy_config_bb_with_pghdr(hw, BASEBAND_CONFIG_PHY_REG); phy_config_bb_with_pghdr(hw, BASEBAND_CONFIG_PHY_REG);
} }
if (!rtstatus) { if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "BB_PG Reg Fail!!\n"); pr_err("BB_PG Reg Fail!!\n");
return false; return false;
} }
rtstatus = rtstatus =
phy_config_bb_with_headerfile(hw, BASEBAND_CONFIG_AGC_TAB); phy_config_bb_with_headerfile(hw, BASEBAND_CONFIG_AGC_TAB);
if (!rtstatus) { if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "AGC Table Fail\n"); pr_err("AGC Table Fail\n");
return false; return false;
} }
rtlphy->cck_high_power = rtlphy->cck_high_power =
...@@ -1095,8 +1095,7 @@ void rtl88e_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation) ...@@ -1095,8 +1095,7 @@ void rtl88e_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
(u8 *)&iotype); (u8 *)&iotype);
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Unknown Scan Backup operation.\n");
"Unknown Scan Backup operation.\n");
break; break;
} }
} }
...@@ -1137,8 +1136,8 @@ void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -1137,8 +1136,8 @@ void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
rtl_write_byte(rtlpriv, REG_RRSR + 2, reg_prsr_rsc); rtl_write_byte(rtlpriv, REG_RRSR + 2, reg_prsr_rsc);
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("unknown bandwidth: %#X\n",
"unknown bandwidth: %#X\n", rtlphy->current_chan_bw); rtlphy->current_chan_bw);
break; break;
} }
...@@ -1162,8 +1161,8 @@ void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -1162,8 +1161,8 @@ void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
HAL_PRIME_CHNL_OFFSET_LOWER) ? 2 : 1); HAL_PRIME_CHNL_OFFSET_LOWER) ? 2 : 1);
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("unknown bandwidth: %#X\n",
"unknown bandwidth: %#X\n", rtlphy->current_chan_bw); rtlphy->current_chan_bw);
break; break;
} }
rtl88e_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); rtl88e_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw);
...@@ -1303,8 +1302,8 @@ static bool _rtl88e_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw, ...@@ -1303,8 +1302,8 @@ static bool _rtl88e_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
currentcmd = &postcommoncmd[*step]; currentcmd = &postcommoncmd[*step];
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Invalid 'stage' = %d, Check it!\n",
"Invalid 'stage' = %d, Check it!\n", *stage); *stage);
return true; return true;
} }
......
...@@ -51,8 +51,7 @@ void rtl88e_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -51,8 +51,7 @@ void rtl88e_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
rtlphy->rfreg_chnlval[0]); rtlphy->rfreg_chnlval[0]);
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("unknown bandwidth: %#X\n", bandwidth);
"unknown bandwidth: %#X\n", bandwidth);
break; break;
} }
} }
......
...@@ -165,8 +165,7 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw) ...@@ -165,8 +165,7 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw)
/* for firmware buf */ /* for firmware buf */
rtlpriv->rtlhal.pfirmware = vzalloc(0x8000); rtlpriv->rtlhal.pfirmware = vzalloc(0x8000);
if (!rtlpriv->rtlhal.pfirmware) { if (!rtlpriv->rtlhal.pfirmware) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_info("Can't alloc buffer for fw.\n");
"Can't alloc buffer for fw.\n");
return 1; return 1;
} }
...@@ -177,8 +176,7 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw) ...@@ -177,8 +176,7 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->io.dev, GFP_KERNEL, hw, rtlpriv->io.dev, GFP_KERNEL, hw,
rtl_fw_cb); rtl_fw_cb);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_info("Failed to request firmware!\n");
"Failed to request firmware!\n");
return 1; return 1;
} }
...@@ -278,7 +276,7 @@ static struct rtl_mod_params rtl88ee_mod_params = { ...@@ -278,7 +276,7 @@ static struct rtl_mod_params rtl88ee_mod_params = {
.swctrl_lps = false, .swctrl_lps = false,
.fwctrl_lps = false, .fwctrl_lps = false,
.msi_support = true, .msi_support = true,
.debug = DBG_EMERG, .debug = 0,
}; };
static const struct rtl_hal_cfg rtl88ee_hal_cfg = { static const struct rtl_hal_cfg rtl88ee_hal_cfg = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment