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

rtlwifi: rtl8192ce: 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 c38af3f0
...@@ -140,8 +140,7 @@ void rtl92ce_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -140,8 +140,7 @@ void rtl92ce_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;
} }
} }
...@@ -364,8 +363,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -364,8 +363,7 @@ void rtl92ce_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;
} }
...@@ -551,8 +549,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -551,8 +549,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2, array); rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2, array);
break; } break; }
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("switch case %d not processed\n", variable);
"switch case %d not processed\n", variable);
break; break;
} }
} }
...@@ -573,8 +570,7 @@ static bool _rtl92ce_llt_write(struct ieee80211_hw *hw, u32 address, u32 data) ...@@ -573,8 +570,7 @@ static bool _rtl92ce_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;
...@@ -963,7 +959,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw) ...@@ -963,7 +959,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
rtlpriv->intf_ops->disable_aspm(hw); rtlpriv->intf_ops->disable_aspm(hw);
rtstatus = _rtl92ce_init_mac(hw); rtstatus = _rtl92ce_init_mac(hw);
if (!rtstatus) { if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n"); pr_err("Init MAC failed\n");
err = 1; err = 1;
goto exit; goto exit;
} }
...@@ -1128,8 +1124,7 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw) ...@@ -1128,8 +1124,7 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw)
break; break;
} }
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, pr_info("Chip Version ID: %s\n", versionid);
"Chip Version ID: %s\n", versionid);
switch (version & 0x3) { switch (version & 0x3) {
case CHIP_88C: case CHIP_88C:
...@@ -1143,8 +1138,7 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw) ...@@ -1143,8 +1138,7 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw)
break; break;
default: default:
rtlphy->rf_type = RF_1T1R; rtlphy->rf_type = RF_1T1R;
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("ERROR RF_Type is set!!\n");
"ERROR RF_Type is set!!\n");
break; break;
} }
...@@ -1193,8 +1187,7 @@ static int _rtl92ce_set_media_status(struct ieee80211_hw *hw, ...@@ -1193,8 +1187,7 @@ static int _rtl92ce_set_media_status(struct ieee80211_hw *hw,
"Set Network type to Mesh Point!\n"); "Set Network type to Mesh Point!\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);
return 1; return 1;
} }
...@@ -1780,7 +1773,7 @@ void rtl92ce_read_eeprom_info(struct ieee80211_hw *hw) ...@@ -1780,7 +1773,7 @@ void rtl92ce_read_eeprom_info(struct ieee80211_hw *hw)
rtlefuse->autoload_failflag = false; rtlefuse->autoload_failflag = false;
_rtl92ce_read_adapter_info(hw); _rtl92ce_read_adapter_info(hw);
} else { } else {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Autoload ERR!!\n"); pr_err("Autoload ERR!!\n");
} }
_rtl92ce_hal_customized_behavior(hw); _rtl92ce_hal_customized_behavior(hw);
} }
...@@ -2152,8 +2145,8 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -2152,8 +2145,8 @@ void rtl92ce_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;
} }
...@@ -2171,9 +2164,7 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -2171,9 +2164,7 @@ void rtl92ce_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 {
......
...@@ -57,8 +57,8 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -57,8 +57,8 @@ void rtl92ce_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;
...@@ -92,8 +92,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -92,8 +92,7 @@ void rtl92ce_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_info("switch case %#x not processed\n", pled->ledpin);
"switch case %#x not processed\n", pled->ledpin);
break; break;
} }
pled->ledon = false; pled->ledon = false;
......
...@@ -297,10 +297,10 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, ...@@ -297,10 +297,10 @@ bool rtl92c_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_info("Incorrect rfpath %#x\n", rfpath);
"switch case %#x not processed\n", rfpath);
break; break;
default: default:
pr_info("switch case %#x not processed\n", rfpath);
break; break;
} }
return true; return true;
...@@ -340,8 +340,7 @@ void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -340,8 +340,7 @@ void rtl92ce_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_info("unknown bandwidth: %#X\n", rtlphy->current_chan_bw);
"unknown bandwidth: %#X\n", rtlphy->current_chan_bw);
break; break;
} }
...@@ -365,8 +364,8 @@ void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -365,8 +364,8 @@ void rtl92ce_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;
} }
rtl92ce_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); rtl92ce_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw);
...@@ -546,8 +545,8 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -546,8 +545,8 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *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 rtl92ce_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -51,8 +51,7 @@ void rtl92ce_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;
} }
} }
......
...@@ -158,8 +158,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) ...@@ -158,8 +158,7 @@ int rtl92c_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;
} }
...@@ -173,8 +172,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) ...@@ -173,8 +172,7 @@ int rtl92c_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_err("Failed to request firmware!\n");
"Failed to request firmware!\n");
return 1; return 1;
} }
...@@ -249,7 +247,7 @@ static struct rtl_mod_params rtl92ce_mod_params = { ...@@ -249,7 +247,7 @@ static struct rtl_mod_params rtl92ce_mod_params = {
.inactiveps = true, .inactiveps = true,
.swctrl_lps = false, .swctrl_lps = false,
.fwctrl_lps = true, .fwctrl_lps = true,
.debug = DBG_EMERG, .debug = 0,
}; };
static const struct rtl_hal_cfg rtl92ce_hal_cfg = { static const struct rtl_hal_cfg rtl92ce_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