Commit 6bf8bc19 authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

rtlwifi: rtl8192de: Rename RT_TRACE to rtl_dbg

Change the misleading macro name to one that is more descriptive for
rtl8192de. Changes suggested by ckeckpatch.pl have been made.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200723204244.24457-9-Larry.Finger@lwfinger.net
parent 34d7f007
...@@ -47,7 +47,7 @@ static void _rtl92d_write_fw(struct ieee80211_hw *hw, ...@@ -47,7 +47,7 @@ static void _rtl92d_write_fw(struct ieee80211_hw *hw,
u32 pagenums, remainsize; u32 pagenums, remainsize;
u32 page, offset; u32 page, offset;
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, "FW size is %d bytes,\n", size); rtl_dbg(rtlpriv, COMP_FW, DBG_TRACE, "FW size is %d bytes,\n", size);
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192DE) if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192DE)
rtl_fill_dummy(bufferptr, &size); rtl_fill_dummy(bufferptr, &size);
pagenums = size / FW_8192D_PAGE_SIZE; pagenums = size / FW_8192D_PAGE_SIZE;
...@@ -104,8 +104,8 @@ void rtl92d_firmware_selfreset(struct ieee80211_hw *hw) ...@@ -104,8 +104,8 @@ void rtl92d_firmware_selfreset(struct ieee80211_hw *hw)
u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1);
} }
WARN_ONCE((delay <= 0), "rtl8192de: 8051 reset failed!\n"); WARN_ONCE((delay <= 0), "rtl8192de: 8051 reset failed!\n");
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
"=====> 8051 reset success (%d)\n", delay); "=====> 8051 reset success (%d)\n", delay);
} }
static int _rtl92d_fw_init(struct ieee80211_hw *hw) static int _rtl92d_fw_init(struct ieee80211_hw *hw)
...@@ -114,27 +114,27 @@ static int _rtl92d_fw_init(struct ieee80211_hw *hw) ...@@ -114,27 +114,27 @@ static int _rtl92d_fw_init(struct ieee80211_hw *hw)
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
u32 counter; u32 counter;
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, "FW already have download\n"); rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG, "FW already have download\n");
/* polling for FW ready */ /* polling for FW ready */
counter = 0; counter = 0;
do { do {
if (rtlhal->interfaceindex == 0) { if (rtlhal->interfaceindex == 0) {
if (rtl_read_byte(rtlpriv, FW_MAC0_READY) & if (rtl_read_byte(rtlpriv, FW_MAC0_READY) &
MAC0_READY) { MAC0_READY) {
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
"Polling FW ready success!! REG_MCUFWDL: 0x%x\n", "Polling FW ready success!! REG_MCUFWDL: 0x%x\n",
rtl_read_byte(rtlpriv, rtl_read_byte(rtlpriv,
FW_MAC0_READY)); FW_MAC0_READY));
return 0; return 0;
} }
udelay(5); udelay(5);
} else { } else {
if (rtl_read_byte(rtlpriv, FW_MAC1_READY) & if (rtl_read_byte(rtlpriv, FW_MAC1_READY) &
MAC1_READY) { MAC1_READY) {
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
"Polling FW ready success!! REG_MCUFWDL: 0x%x\n", "Polling FW ready success!! REG_MCUFWDL: 0x%x\n",
rtl_read_byte(rtlpriv, rtl_read_byte(rtlpriv,
FW_MAC1_READY)); FW_MAC1_READY));
return 0; return 0;
} }
udelay(5); udelay(5);
...@@ -142,17 +142,17 @@ static int _rtl92d_fw_init(struct ieee80211_hw *hw) ...@@ -142,17 +142,17 @@ static int _rtl92d_fw_init(struct ieee80211_hw *hw)
} while (counter++ < POLLING_READY_TIMEOUT_COUNT); } while (counter++ < POLLING_READY_TIMEOUT_COUNT);
if (rtlhal->interfaceindex == 0) { if (rtlhal->interfaceindex == 0) {
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
"Polling FW ready fail!! MAC0 FW init not ready: 0x%x\n", "Polling FW ready fail!! MAC0 FW init not ready: 0x%x\n",
rtl_read_byte(rtlpriv, FW_MAC0_READY)); rtl_read_byte(rtlpriv, FW_MAC0_READY));
} else { } else {
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
"Polling FW ready fail!! MAC1 FW init not ready: 0x%x\n", "Polling FW ready fail!! MAC1 FW init not ready: 0x%x\n",
rtl_read_byte(rtlpriv, FW_MAC1_READY)); rtl_read_byte(rtlpriv, FW_MAC1_READY));
} }
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
"Polling FW ready fail!! REG_MCUFWDL:0x%08x\n", "Polling FW ready fail!! REG_MCUFWDL:0x%08x\n",
rtl_read_dword(rtlpriv, REG_MCUFWDL)); rtl_read_dword(rtlpriv, REG_MCUFWDL));
return -1; return -1;
} }
...@@ -177,13 +177,13 @@ int rtl92d_download_fw(struct ieee80211_hw *hw) ...@@ -177,13 +177,13 @@ int rtl92d_download_fw(struct ieee80211_hw *hw)
pfwdata = rtlhal->pfirmware; pfwdata = rtlhal->pfirmware;
rtlhal->fw_version = (u16) GET_FIRMWARE_HDR_VERSION(pfwheader); rtlhal->fw_version = (u16) GET_FIRMWARE_HDR_VERSION(pfwheader);
rtlhal->fw_subversion = (u16) GET_FIRMWARE_HDR_SUB_VER(pfwheader); rtlhal->fw_subversion = (u16) GET_FIRMWARE_HDR_SUB_VER(pfwheader);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"FirmwareVersion(%d), FirmwareSubVersion(%d), Signature(%#x)\n", "FirmwareVersion(%d), FirmwareSubVersion(%d), Signature(%#x)\n",
rtlhal->fw_version, rtlhal->fw_subversion, rtlhal->fw_version, rtlhal->fw_subversion,
GET_FIRMWARE_HDR_SIGNATURE(pfwheader)); GET_FIRMWARE_HDR_SIGNATURE(pfwheader));
if (IS_FW_HEADER_EXIST(pfwheader)) { if (IS_FW_HEADER_EXIST(pfwheader)) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Shift 32 bytes for FW header!!\n"); "Shift 32 bytes for FW header!!\n");
pfwdata = pfwdata + 32; pfwdata = pfwdata + 32;
fwsize = fwsize - 32; fwsize = fwsize - 32;
} }
...@@ -214,8 +214,8 @@ int rtl92d_download_fw(struct ieee80211_hw *hw) ...@@ -214,8 +214,8 @@ int rtl92d_download_fw(struct ieee80211_hw *hw)
else if (!fwdl_in_process) else if (!fwdl_in_process)
break; break;
else else
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
"Wait for another mac download fw\n"); "Wait for another mac download fw\n");
} }
spin_lock_irqsave(&globalmutex_for_fwdownload, flags); spin_lock_irqsave(&globalmutex_for_fwdownload, flags);
value = rtl_read_byte(rtlpriv, 0x1f); value = rtl_read_byte(rtlpriv, 0x1f);
...@@ -286,25 +286,25 @@ static void _rtl92d_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -286,25 +286,25 @@ static void _rtl92d_fill_h2c_command(struct ieee80211_hw *hw,
u8 idx; u8 idx;
if (ppsc->rfpwr_state == ERFOFF || ppsc->inactive_pwrstate == ERFOFF) { if (ppsc->rfpwr_state == ERFOFF || ppsc->inactive_pwrstate == ERFOFF) {
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"Return as RF is off!!!\n"); "Return as RF is off!!!\n");
return; return;
} }
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, "come in\n"); rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD, "come in\n");
while (true) { while (true) {
spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
if (rtlhal->h2c_setinprogress) { if (rtlhal->h2c_setinprogress) {
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"H2C set in progress! Wait to set..element_id(%d)\n", "H2C set in progress! Wait to set..element_id(%d)\n",
element_id); element_id);
while (rtlhal->h2c_setinprogress) { while (rtlhal->h2c_setinprogress) {
spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock,
flag); flag);
h2c_waitcounter++; h2c_waitcounter++;
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"Wait 100 us (%d times)...\n", "Wait 100 us (%d times)...\n",
h2c_waitcounter); h2c_waitcounter);
udelay(100); udelay(100);
if (h2c_waitcounter > 1000) if (h2c_waitcounter > 1000)
...@@ -353,30 +353,30 @@ static void _rtl92d_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -353,30 +353,30 @@ static void _rtl92d_fill_h2c_command(struct ieee80211_hw *hw,
while (!isfw_read) { while (!isfw_read) {
wait_h2c_limmit--; wait_h2c_limmit--;
if (wait_h2c_limmit == 0) { if (wait_h2c_limmit == 0) {
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"Waiting too long for FW read clear HMEBox(%d)!\n", "Waiting too long for FW read clear HMEBox(%d)!\n",
boxnum); boxnum);
break; break;
} }
udelay(10); udelay(10);
isfw_read = _rtl92d_check_fw_read_last_h2c(hw, boxnum); isfw_read = _rtl92d_check_fw_read_last_h2c(hw, boxnum);
u1b_tmp = rtl_read_byte(rtlpriv, 0x1BF); u1b_tmp = rtl_read_byte(rtlpriv, 0x1BF);
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"Waiting for FW read clear HMEBox(%d)!!! 0x1BF = %2x\n", "Waiting for FW read clear HMEBox(%d)!!! 0x1BF = %2x\n",
boxnum, u1b_tmp); boxnum, u1b_tmp);
} }
if (!isfw_read) { if (!isfw_read) {
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"Write H2C register BOX[%d] fail!!!!! Fw do not read.\n", "Write H2C register BOX[%d] fail!!!!! Fw do not read.\n",
boxnum); boxnum);
break; break;
} }
memset(boxcontent, 0, sizeof(boxcontent)); memset(boxcontent, 0, sizeof(boxcontent));
memset(boxextcontent, 0, sizeof(boxextcontent)); memset(boxextcontent, 0, sizeof(boxextcontent));
boxcontent[0] = element_id; boxcontent[0] = element_id;
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"Write element_id box_reg(%4x) = %2x\n", "Write element_id box_reg(%4x) = %2x\n",
box_reg, element_id); box_reg, element_id);
switch (cmd_len) { switch (cmd_len) {
case 1: case 1:
boxcontent[0] &= ~(BIT(7)); boxcontent[0] &= ~(BIT(7));
...@@ -430,14 +430,14 @@ static void _rtl92d_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -430,14 +430,14 @@ static void _rtl92d_fill_h2c_command(struct ieee80211_hw *hw,
rtlhal->last_hmeboxnum = boxnum + 1; rtlhal->last_hmeboxnum = boxnum + 1;
if (rtlhal->last_hmeboxnum == 4) if (rtlhal->last_hmeboxnum == 4)
rtlhal->last_hmeboxnum = 0; rtlhal->last_hmeboxnum = 0;
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"pHalData->last_hmeboxnum = %d\n", "pHalData->last_hmeboxnum = %d\n",
rtlhal->last_hmeboxnum); rtlhal->last_hmeboxnum);
} }
spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
rtlhal->h2c_setinprogress = false; rtlhal->h2c_setinprogress = false;
spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, "go out\n"); rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD, "go out\n");
} }
void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw, void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw,
...@@ -653,15 +653,15 @@ void rtl92d_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished) ...@@ -653,15 +653,15 @@ void rtl92d_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished)
dlok = true; dlok = true;
} }
if (dlok) { if (dlok) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD,
"Set RSVD page location to Fw\n"); "Set RSVD page location to Fw\n");
RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG, RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
"H2C_RSVDPAGE", u1rsvdpageloc, 3); "H2C_RSVDPAGE", u1rsvdpageloc, 3);
rtl92d_fill_h2c_cmd(hw, H2C_RSVDPAGE, rtl92d_fill_h2c_cmd(hw, H2C_RSVDPAGE,
sizeof(u1rsvdpageloc), u1rsvdpageloc); sizeof(u1rsvdpageloc), u1rsvdpageloc);
} else } else
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"Set RSVD page location to Fw FAIL!!!!!!\n"); "Set RSVD page location to Fw FAIL!!!!!!\n");
} }
void rtl92d_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus) void rtl92d_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus)
......
...@@ -19,8 +19,8 @@ void rtl92de_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -19,8 +19,8 @@ void rtl92de_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
u8 ledcfg; u8 ledcfg;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n", rtl_dbg(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n",
REG_LEDCFG2, pled->ledpin); REG_LEDCFG2, pled->ledpin);
switch (pled->ledpin) { switch (pled->ledpin) {
case LED_PIN_GPIO0: case LED_PIN_GPIO0:
...@@ -56,8 +56,8 @@ void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -56,8 +56,8 @@ void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
u8 ledcfg; u8 ledcfg;
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n", rtl_dbg(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n",
REG_LEDCFG2, pled->ledpin); REG_LEDCFG2, pled->ledpin);
ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2); ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2);
...@@ -128,7 +128,7 @@ void rtl92de_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction) ...@@ -128,7 +128,7 @@ void rtl92de_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction)
ledaction == LED_CTL_POWER_ON)) { ledaction == LED_CTL_POWER_ON)) {
return; return;
} }
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "ledaction %d,\n", ledaction); rtl_dbg(rtlpriv, COMP_LED, DBG_LOUD, "ledaction %d,\n", ledaction);
_rtl92ce_sw_led_control(hw, ledaction); _rtl92ce_sw_led_control(hw, ledaction);
} }
...@@ -23,9 +23,9 @@ void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -23,9 +23,9 @@ void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
rtl_set_rfreg(hw, rfpath, RF_CHNLBW, BIT(10) | rtl_set_rfreg(hw, rfpath, RF_CHNLBW, BIT(10) |
BIT(11), 0x01); BIT(11), 0x01);
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD,
"20M RF 0x18 = 0x%x\n", "20M RF 0x18 = 0x%x\n",
rtlphy->rfreg_chnlval[rfpath]); rtlphy->rfreg_chnlval[rfpath]);
} }
break; break;
...@@ -35,9 +35,9 @@ void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -35,9 +35,9 @@ void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
((rtlphy->rfreg_chnlval[rfpath] & 0xfffff3ff)); ((rtlphy->rfreg_chnlval[rfpath] & 0xfffff3ff));
rtl_set_rfreg(hw, rfpath, RF_CHNLBW, BIT(10) | BIT(11), rtl_set_rfreg(hw, rfpath, RF_CHNLBW, BIT(10) | BIT(11),
0x00); 0x00);
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD,
"40M RF 0x18 = 0x%x\n", "40M RF 0x18 = 0x%x\n",
rtlphy->rfreg_chnlval[rfpath]); rtlphy->rfreg_chnlval[rfpath]);
} }
break; break;
default: default:
...@@ -391,11 +391,11 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0) ...@@ -391,11 +391,11 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0)
rtlhal->during_mac0init_radiob = false; rtlhal->during_mac0init_radiob = false;
rtlhal->during_mac1init_radioa = false; rtlhal->during_mac1init_radioa = false;
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "===>\n"); rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD, "===>\n");
/* MAC0 Need PHY1 load radio_b.txt . Driver use DBI to write. */ /* MAC0 Need PHY1 load radio_b.txt . Driver use DBI to write. */
u1btmp = rtl_read_byte(rtlpriv, mac_reg); u1btmp = rtl_read_byte(rtlpriv, mac_reg);
if (!(u1btmp & mac_on_bit)) { if (!(u1btmp & mac_on_bit)) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "enable BB & RF\n"); rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "enable BB & RF\n");
/* Enable BB and RF power */ /* Enable BB and RF power */
rtl92de_write_dword_dbi(hw, REG_SYS_ISO_CTRL, rtl92de_write_dword_dbi(hw, REG_SYS_ISO_CTRL,
rtl92de_read_dword_dbi(hw, REG_SYS_ISO_CTRL, direct) | rtl92de_read_dword_dbi(hw, REG_SYS_ISO_CTRL, direct) |
...@@ -405,7 +405,7 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0) ...@@ -405,7 +405,7 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0)
* and radio_b.txt has been load. */ * and radio_b.txt has been load. */
bresult = false; bresult = false;
} }
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "<===\n"); rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD, "<===\n");
return bresult; return bresult;
} }
...@@ -421,17 +421,17 @@ void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0) ...@@ -421,17 +421,17 @@ void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0)
rtlhal->during_mac0init_radiob = false; rtlhal->during_mac0init_radiob = false;
rtlhal->during_mac1init_radioa = false; rtlhal->during_mac1init_radioa = false;
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "====>\n"); rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD, "====>\n");
/* check MAC0 enable or not again now, if /* check MAC0 enable or not again now, if
* enabled, not power down radio A. */ * enabled, not power down radio A. */
u1btmp = rtl_read_byte(rtlpriv, mac_reg); u1btmp = rtl_read_byte(rtlpriv, mac_reg);
if (!(u1btmp & mac_on_bit)) { if (!(u1btmp & mac_on_bit)) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "power down\n"); rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "power down\n");
/* power down RF radio A according to YuNan's advice. */ /* power down RF radio A according to YuNan's advice. */
rtl92de_write_dword_dbi(hw, RFPGA0_XA_LSSIPARAMETER, rtl92de_write_dword_dbi(hw, RFPGA0_XA_LSSIPARAMETER,
0x00000000, direct); 0x00000000, direct);
} }
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "<====\n"); rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD, "<====\n");
} }
bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw) bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
...@@ -573,8 +573,8 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw) ...@@ -573,8 +573,8 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
break; break;
} }
if (!rtstatus) { if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"Radio[%d] Fail!!\n", rfpath); "Radio[%d] Fail!!\n", rfpath);
goto phy_rf_cfg_fail; goto phy_rf_cfg_fail;
} }
...@@ -588,7 +588,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw) ...@@ -588,7 +588,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
rtl92d_phy_powerdown_anotherphy(hw, false); rtl92d_phy_powerdown_anotherphy(hw, false);
else if (need_pwrdown_radiob) else if (need_pwrdown_radiob)
rtl92d_phy_powerdown_anotherphy(hw, true); rtl92d_phy_powerdown_anotherphy(hw, true);
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n"); rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
return rtstatus; return rtstatus;
phy_rf_cfg_fail: phy_rf_cfg_fail:
......
...@@ -511,8 +511,8 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -511,8 +511,8 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE,
"DMA mapping error\n"); "DMA mapping error\n");
return; return;
} }
clear_pci_tx_desc_content(pdesc, sizeof(struct tx_desc_92d)); clear_pci_tx_desc_content(pdesc, sizeof(struct tx_desc_92d));
...@@ -526,9 +526,9 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -526,9 +526,9 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN + set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN +
EM_HDR_LEN); EM_HDR_LEN);
if (ptcb_desc->empkt_num) { if (ptcb_desc->empkt_num) {
RT_TRACE(rtlpriv, COMP_SEND, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEND, DBG_LOUD,
"Insert 8 byte.pTcb->EMPktNum:%d\n", "Insert 8 byte.pTcb->EMPktNum:%d\n",
ptcb_desc->empkt_num); ptcb_desc->empkt_num);
_rtl92de_insert_emcontent(ptcb_desc, _rtl92de_insert_emcontent(ptcb_desc,
(u8 *)(skb->data)); (u8 *)(skb->data));
} }
...@@ -625,8 +625,8 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -625,8 +625,8 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
} }
if (ieee80211_is_data_qos(fc)) { if (ieee80211_is_data_qos(fc)) {
if (mac->rdg_en) { if (mac->rdg_en) {
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE,
"Enable RDG function\n"); "Enable RDG function\n");
set_tx_desc_rdg_enable(pdesc, 1); set_tx_desc_rdg_enable(pdesc, 1);
set_tx_desc_htc(pdesc, 1); set_tx_desc_htc(pdesc, 1);
} }
...@@ -652,7 +652,7 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -652,7 +652,7 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
set_tx_desc_pkt_id(pdesc, 8); set_tx_desc_pkt_id(pdesc, 8);
} }
set_tx_desc_more_frag(pdesc, (lastseg ? 0 : 1)); set_tx_desc_more_frag(pdesc, (lastseg ? 0 : 1));
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, "\n"); rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "\n");
} }
void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw,
...@@ -671,8 +671,8 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, ...@@ -671,8 +671,8 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw,
__le32 *pdesc = (__le32 *)pdesc8; __le32 *pdesc = (__le32 *)pdesc8;
if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE,
"DMA mapping error\n"); "DMA mapping error\n");
return; return;
} }
clear_pci_tx_desc_content(pdesc, TX_DESC_SIZE); clear_pci_tx_desc_content(pdesc, TX_DESC_SIZE);
......
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