Commit c38af3f0 authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

rtlwifi: rtl8192cu: 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 b8c79f45
...@@ -452,8 +452,7 @@ static int _rtl92cu_init_power_on(struct ieee80211_hw *hw) ...@@ -452,8 +452,7 @@ static int _rtl92cu_init_power_on(struct ieee80211_hw *hw)
break; break;
} }
if (pollingCount++ > 100) { if (pollingCount++ > 100) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, pr_err("Failed to polling REG_APS_FSMCO[PFM_ALDN] done!\n");
"Failed to polling REG_APS_FSMCO[PFM_ALDN] done!\n");
return -ENODEV; return -ENODEV;
} }
} while (true); } while (true);
...@@ -486,8 +485,7 @@ static int _rtl92cu_init_power_on(struct ieee80211_hw *hw) ...@@ -486,8 +485,7 @@ static int _rtl92cu_init_power_on(struct ieee80211_hw *hw)
break; break;
} }
if (pollingCount++ > 1000) { if (pollingCount++ > 1000) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, pr_err("Failed to polling REG_APS_FSMCO[APFM_ONMAC] done!\n");
"Failed to polling REG_APS_FSMCO[APFM_ONMAC] done!\n");
return -ENODEV; return -ENODEV;
} }
} while (true); } while (true);
...@@ -687,7 +685,6 @@ static void _rtl92cu_init_chipN_three_out_ep_priority(struct ieee80211_hw *hw, ...@@ -687,7 +685,6 @@ static void _rtl92cu_init_chipN_three_out_ep_priority(struct ieee80211_hw *hw,
u8 queue_sel) u8 queue_sel)
{ {
u16 beQ, bkQ, viQ, voQ, mgtQ, hiQ; u16 beQ, bkQ, viQ, voQ, mgtQ, hiQ;
struct rtl_priv *rtlpriv = rtl_priv(hw);
if (!wmm_enable) { /* typical setting */ if (!wmm_enable) { /* typical setting */
beQ = QUEUE_LOW; beQ = QUEUE_LOW;
...@@ -705,8 +702,7 @@ static void _rtl92cu_init_chipN_three_out_ep_priority(struct ieee80211_hw *hw, ...@@ -705,8 +702,7 @@ static void _rtl92cu_init_chipN_three_out_ep_priority(struct ieee80211_hw *hw,
hiQ = QUEUE_HIGH; hiQ = QUEUE_HIGH;
} }
_rtl92c_init_chipN_reg_priority(hw, beQ, bkQ, viQ, voQ, mgtQ, hiQ); _rtl92c_init_chipN_reg_priority(hw, beQ, bkQ, viQ, voQ, mgtQ, hiQ);
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Tx queue select :0x%02x..\n", pr_info("Tx queue select :0x%02x..\n", queue_sel);
queue_sel);
} }
static void _rtl92cu_init_chipN_queue_priority(struct ieee80211_hw *hw, static void _rtl92cu_init_chipN_queue_priority(struct ieee80211_hw *hw,
...@@ -765,8 +761,7 @@ static void _rtl92cu_init_chipT_queue_priority(struct ieee80211_hw *hw, ...@@ -765,8 +761,7 @@ static void _rtl92cu_init_chipT_queue_priority(struct ieee80211_hw *hw,
break; break;
} }
rtl_write_byte(rtlpriv, (REG_TRXDMA_CTRL+1), hq_sele); rtl_write_byte(rtlpriv, (REG_TRXDMA_CTRL+1), hq_sele);
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Tx queue select :0x%02x..\n", pr_info("Tx queue select :0x%02x..\n", hq_sele);
hq_sele);
} }
static void _rtl92cu_init_queue_priority(struct ieee80211_hw *hw, static void _rtl92cu_init_queue_priority(struct ieee80211_hw *hw,
...@@ -848,8 +843,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw) ...@@ -848,8 +843,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw)
err = _rtl92cu_init_power_on(hw); err = _rtl92cu_init_power_on(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Failed to init power on!\n");
"Failed to init power on!\n");
return err; return err;
} }
if (!wmm_enable) { if (!wmm_enable) {
...@@ -860,8 +854,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw) ...@@ -860,8 +854,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw)
: WMM_CHIP_A_TX_PAGE_BOUNDARY; : WMM_CHIP_A_TX_PAGE_BOUNDARY;
} }
if (false == rtl92c_init_llt_table(hw, boundary)) { if (false == rtl92c_init_llt_table(hw, boundary)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Failed to init LLT Table!\n");
"Failed to init LLT Table!\n");
return -EINVAL; return -EINVAL;
} }
_rtl92cu_init_queue_reserved_page(hw, wmm_enable, out_ep_nums, _rtl92cu_init_queue_reserved_page(hw, wmm_enable, out_ep_nums,
...@@ -986,7 +979,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) ...@@ -986,7 +979,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
rtlhal->hw_type = HARDWARE_TYPE_RTL8192CU; rtlhal->hw_type = HARDWARE_TYPE_RTL8192CU;
err = _rtl92cu_init_mac(hw); err = _rtl92cu_init_mac(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "init mac failed!\n"); pr_err("init mac failed!\n");
goto exit; goto exit;
} }
err = rtl92c_download_fw(hw); err = rtl92c_download_fw(hw);
...@@ -1099,8 +1092,7 @@ static void _ResetDigitalProcedure1(struct ieee80211_hw *hw, bool bWithoutHWSM) ...@@ -1099,8 +1092,7 @@ static void _ResetDigitalProcedure1(struct ieee80211_hw *hw, bool bWithoutHWSM)
udelay(50); udelay(50);
} }
if (retry_cnts >= 100) { if (retry_cnts >= 100) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("8051 reset failed!.........................\n");
"#####=> 8051 reset failed!.........................\n");
/* if 8051 reset fail, reset MAC. */ /* if 8051 reset fail, reset MAC. */
rtl_write_byte(rtlpriv, rtl_write_byte(rtlpriv,
REG_SYS_FUNC_EN + 1, REG_SYS_FUNC_EN + 1,
...@@ -1340,8 +1332,7 @@ static int _rtl92cu_set_media_status(struct ieee80211_hw *hw, ...@@ -1340,8 +1332,7 @@ static int _rtl92cu_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 supported!\n", type);
"Network type %d not supported!\n", type);
goto error_out; goto error_out;
} }
rtl_write_byte(rtlpriv, MSR, bt_msr); rtl_write_byte(rtlpriv, MSR, bt_msr);
...@@ -1555,8 +1546,7 @@ void rtl92cu_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -1555,8 +1546,7 @@ void rtl92cu_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;
} }
} }
...@@ -1926,8 +1916,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -1926,8 +1916,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
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;
} }
} }
......
...@@ -57,8 +57,8 @@ void rtl92cu_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -57,8 +57,8 @@ void rtl92cu_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg & 0x0f) | BIT(5)); rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg & 0x0f) | BIT(5));
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", pled->ledpin); pled->ledpin);
break; break;
} }
pled->ledon = true; pled->ledon = true;
...@@ -90,8 +90,8 @@ void rtl92cu_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -90,8 +90,8 @@ void rtl92cu_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg | BIT(3))); rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg | BIT(3)));
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", pled->ledpin); pled->ledpin);
break; break;
} }
pled->ledon = false; pled->ledon = false;
......
...@@ -157,9 +157,8 @@ bool rtl92c_llt_write(struct ieee80211_hw *hw, u32 address, u32 data) ...@@ -157,9 +157,8 @@ bool rtl92c_llt_write(struct ieee80211_hw *hw, u32 address, u32 data)
if (_LLT_NO_ACTIVE == _LLT_OP_VALUE(value)) if (_LLT_NO_ACTIVE == _LLT_OP_VALUE(value))
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! _LLT_OP_VALUE(%x)\n",
"Failed to polling write LLT done at address %d! _LLT_OP_VALUE(%x)\n", address, _LLT_OP_VALUE(value));
address, _LLT_OP_VALUE(value));
status = false; status = false;
break; break;
} }
...@@ -262,8 +261,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -262,8 +261,7 @@ void rtl92c_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("illegal switch case\n");
"illegal switch case\n");
enc_algo = CAM_TKIP; enc_algo = CAM_TKIP;
break; break;
} }
...@@ -280,9 +278,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -280,9 +278,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
entry_id = rtl_cam_get_free_entry(hw, entry_id = rtl_cam_get_free_entry(hw,
p_macaddr); 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 {
......
...@@ -274,8 +274,7 @@ bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, ...@@ -274,8 +274,7 @@ bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
break; break;
case RF90_PATH_C: case RF90_PATH_C:
case RF90_PATH_D: case RF90_PATH_D:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("switch case %#x not processed\n", rfpath);
"switch case %#x not processed\n", rfpath);
break; break;
default: default:
break; break;
...@@ -314,8 +313,8 @@ void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -314,8 +313,8 @@ void rtl92cu_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;
} }
switch (rtlphy->current_chan_bw) { switch (rtlphy->current_chan_bw) {
...@@ -336,8 +335,8 @@ void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -336,8 +335,8 @@ void rtl92cu_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;
} }
rtl92cu_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); rtl92cu_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw);
...@@ -509,8 +508,8 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -509,8 +508,8 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
_rtl92c_phy_set_rf_sleep(hw); _rtl92c_phy_set_rf_sleep(hw);
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", rfpwr_state); rfpwr_state);
bresult = false; bresult = false;
break; break;
} }
......
...@@ -51,8 +51,7 @@ void rtl92cu_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -51,8 +51,7 @@ void rtl92cu_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;
} }
} }
......
...@@ -68,8 +68,7 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) ...@@ -68,8 +68,7 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
/* for firmware buf */ /* for firmware buf */
rtlpriv->rtlhal.pfirmware = vzalloc(0x4000); rtlpriv->rtlhal.pfirmware = vzalloc(0x4000);
if (!rtlpriv->rtlhal.pfirmware) { if (!rtlpriv->rtlhal.pfirmware) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Can't alloc buffer for fw\n");
"Can't alloc buffer for fw\n");
return 1; return 1;
} }
if (IS_VENDOR_UMC_A_CUT(rtlpriv->rtlhal.version) && if (IS_VENDOR_UMC_A_CUT(rtlpriv->rtlhal.version) &&
...@@ -158,7 +157,7 @@ static struct rtl_hal_ops rtl8192cu_hal_ops = { ...@@ -158,7 +157,7 @@ static struct rtl_hal_ops rtl8192cu_hal_ops = {
static struct rtl_mod_params rtl92cu_mod_params = { static struct rtl_mod_params rtl92cu_mod_params = {
.sw_crypto = 0, .sw_crypto = 0,
.debug = DBG_EMERG, .debug = 0,
}; };
module_param_named(swenc, rtl92cu_mod_params.sw_crypto, bool, 0444); module_param_named(swenc, rtl92cu_mod_params.sw_crypto, bool, 0444);
......
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