aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2016-12-15 12:22:57 -0600
committerKalle Valo <kvalo@codeaurora.org>2016-12-30 15:54:19 +0200
commit531940f9644da798f04382aeb5e8929295dfde61 (patch)
tree3b75bae7c789853f6003a7d4dcd8e9a1b36b094b /drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
parentrt2x00: add mutex to synchronize config and link tuner (diff)
downloadlinux-dev-531940f9644da798f04382aeb5e8929295dfde61.tar.xz
linux-dev-531940f9644da798f04382aeb5e8929295dfde61.zip
rtlwifi: Replace local debug macro RT_ASSERT
This macro can be replaced with WARN_ONCE. In addition to using a standard debugging macro for these critical errors, we also get a stack dump. In rtl8821ae/hw.c, a senseless comment was removed, and an incorrect indentation was fixed. This patch also fixes two places in each of rtl8192ee, rtl8723be, and rtl8821ae where the logical condition was incorrect. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
index 5ad7e753c357..c35ba764a6c5 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
@@ -1176,7 +1176,7 @@ static u8 _rtl92ee_phy_get_ratesection_intxpower_byrate(enum radio_path path,
rate_section = 7;
break;
default:
- RT_ASSERT(true, "Rate_Section is Illegal\n");
+ WARN_ONCE(true, "rtl8192ee: Rate_Section is Illegal\n");
break;
}
return rate_section;
@@ -1239,7 +1239,7 @@ static u8 _rtl92ee_get_txpower_by_rate(struct ieee80211_hw *hw,
shift = 24;
break;
default:
- RT_ASSERT(true, "Rate_Section is Illegal\n");
+ WARN_ONCE(true, "rtl8192ee: Rate_Section is Illegal\n");
break;
}
@@ -1811,8 +1811,8 @@ u8 rtl92ee_phy_sw_chnl(struct ieee80211_hw *hw)
return 0;
if (rtlphy->set_bwmode_inprogress)
return 0;
- RT_ASSERT((rtlphy->current_channel <= 14),
- "WIRELESS_MODE_G but channel>14");
+ WARN_ONCE((rtlphy->current_channel > 14),
+ "rtl8192ee: WIRELESS_MODE_G but channel>14");
rtlphy->sw_chnl_inprogress = true;
rtlphy->sw_chnl_stage = 0;
rtlphy->sw_chnl_step = 0;
@@ -1860,8 +1860,8 @@ static bool _rtl92ee_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
rfdependcmdcnt = 0;
- RT_ASSERT((channel >= 1 && channel <= 14),
- "illegal channel for Zebra: %d\n", channel);
+ WARN_ONCE((channel < 1 || channel > 14),
+ "rtl8192ee: illegal channel for Zebra: %d\n", channel);
_rtl92ee_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++,
MAX_RFDEPENDCMD_CNT,
@@ -1948,7 +1948,7 @@ static bool _rtl92ee_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
struct swchnlcmd *pcmd;
if (cmdtable == NULL) {
- RT_ASSERT(false, "cmdtable cannot be NULL.\n");
+ WARN_ONCE(true, "rtl8192ee: cmdtable cannot be NULL.\n");
return false;
}