rtlwifi: rtl8192c-common: 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: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
@@ -145,10 +145,8 @@ static void _rtl92c_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 > 4) {
|
if (pageNums > 4)
|
||||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
pr_err("Page numbers should not greater then 4\n");
|
||||||
"Page numbers should not greater then 4\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;
|
||||||
@@ -180,15 +178,10 @@ static int _rtl92c_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;
|
||||||
@@ -198,20 +191,15 @@ static int _rtl92c_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;
|
|
||||||
}
|
|
||||||
|
|
||||||
mdelay(FW_8192C_POLLING_DELAY);
|
mdelay(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;
|
||||||
@@ -251,8 +239,7 @@ int rtl92c_download_fw(struct ieee80211_hw *hw)
|
|||||||
|
|
||||||
err = _rtl92c_fw_free_to_go(hw);
|
err = _rtl92c_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_TRACE,
|
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE,
|
||||||
"Firmware is ready to run!\n");
|
"Firmware is ready to run!\n");
|
||||||
@@ -327,8 +314,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
|
|||||||
while (!bwrite_sucess) {
|
while (!bwrite_sucess) {
|
||||||
wait_writeh2c_limmit--;
|
wait_writeh2c_limmit--;
|
||||||
if (wait_writeh2c_limmit == 0) {
|
if (wait_writeh2c_limmit == 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -104,7 +104,7 @@ u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw,
|
|||||||
offset &= 0x3f;
|
offset &= 0x3f;
|
||||||
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);
|
||||||
@@ -152,7 +152,7 @@ void _rtl92c_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 &= 0x3f;
|
offset &= 0x3f;
|
||||||
@@ -209,7 +209,7 @@ bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
|
|||||||
rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw,
|
rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw,
|
||||||
BASEBAND_CONFIG_PHY_REG);
|
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;
|
||||||
}
|
}
|
||||||
if (rtlphy->rf_type == RF_1T2R) {
|
if (rtlphy->rf_type == RF_1T2R) {
|
||||||
@@ -222,13 +222,13 @@ bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
|
|||||||
BASEBAND_CONFIG_PHY_REG);
|
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 = rtlpriv->cfg->ops->config_bb_with_headerfile(hw,
|
rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw,
|
||||||
BASEBAND_CONFIG_AGC_TAB);
|
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 =
|
||||||
@@ -860,8 +860,8 @@ bool _rtl92c_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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user