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

rtlwifi: Replace RT_TRACE with rtl_dbg

The macro name RT_TRACE makes it seem that it is used for tracing, when
is actually used for debugging. Change the name to rtl_dbg. Any Sparse
errors exposed by this change were also fixed.
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-3-Larry.Finger@lwfinger.net
parent 78a7245d
...@@ -195,7 +195,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, ...@@ -195,7 +195,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
} else { } else {
if (get_rf_type(rtlphy) == RF_1T2R || if (get_rf_type(rtlphy) == RF_1T2R ||
get_rf_type(rtlphy) == RF_2T2R) { get_rf_type(rtlphy) == RF_2T2R) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"1T2R or 2T2R\n"); "1T2R or 2T2R\n");
ht_cap->mcs.rx_mask[0] = 0xFF; ht_cap->mcs.rx_mask[0] = 0xFF;
ht_cap->mcs.rx_mask[1] = 0xFF; ht_cap->mcs.rx_mask[1] = 0xFF;
...@@ -204,7 +204,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, ...@@ -204,7 +204,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
ht_cap->mcs.rx_highest = ht_cap->mcs.rx_highest =
cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15); cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15);
} else if (get_rf_type(rtlphy) == RF_1T1R) { } else if (get_rf_type(rtlphy) == RF_1T1R) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "1T1R\n"); rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "1T1R\n");
ht_cap->mcs.rx_mask[0] = 0xFF; ht_cap->mcs.rx_mask[0] = 0xFF;
ht_cap->mcs.rx_mask[1] = 0x00; ht_cap->mcs.rx_mask[1] = 0x00;
...@@ -1324,7 +1324,7 @@ bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -1324,7 +1324,7 @@ bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb)
rtlpriv->cfg->ops->chk_switch_dmdp(hw); rtlpriv->cfg->ops->chk_switch_dmdp(hw);
} }
if (ieee80211_is_auth(fc)) { if (ieee80211_is_auth(fc)) {
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n"); rtl_dbg(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n");
mac->link_state = MAC80211_LINKING; mac->link_state = MAC80211_LINKING;
/* Dul mac */ /* Dul mac */
...@@ -1385,7 +1385,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -1385,7 +1385,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
if (mac->act_scanning) if (mac->act_scanning)
return false; return false;
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG, rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
"%s ACT_ADDBAREQ From :%pM\n", "%s ACT_ADDBAREQ From :%pM\n",
is_tx ? "Tx" : "Rx", hdr->addr2); is_tx ? "Tx" : "Rx", hdr->addr2);
RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "req\n", RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "req\n",
...@@ -1400,7 +1400,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -1400,7 +1400,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
rcu_read_lock(); rcu_read_lock();
sta = rtl_find_sta(hw, hdr->addr3); sta = rtl_find_sta(hw, hdr->addr3);
if (sta == NULL) { if (sta == NULL) {
RT_TRACE(rtlpriv, COMP_SEND | COMP_RECV, rtl_dbg(rtlpriv, COMP_SEND | COMP_RECV,
DBG_DMESG, "sta is NULL\n"); DBG_DMESG, "sta is NULL\n");
rcu_read_unlock(); rcu_read_unlock();
return true; return true;
...@@ -1428,12 +1428,12 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -1428,12 +1428,12 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
} }
break; break;
case ACT_ADDBARSP: case ACT_ADDBARSP:
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG, rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
"%s ACT_ADDBARSP From :%pM\n", "%s ACT_ADDBARSP From :%pM\n",
is_tx ? "Tx" : "Rx", hdr->addr2); is_tx ? "Tx" : "Rx", hdr->addr2);
break; break;
case ACT_DELBA: case ACT_DELBA:
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG, rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
"ACT_ADDBADEL From :%pM\n", hdr->addr2); "ACT_ADDBADEL From :%pM\n", hdr->addr2);
break; break;
} }
...@@ -1519,7 +1519,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx, ...@@ -1519,7 +1519,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx,
/* 68 : UDP BOOTP client /* 68 : UDP BOOTP client
* 67 : UDP BOOTP server * 67 : UDP BOOTP server
*/ */
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV),
DBG_DMESG, "dhcp %s !!\n", DBG_DMESG, "dhcp %s !!\n",
(is_tx) ? "Tx" : "Rx"); (is_tx) ? "Tx" : "Rx");
...@@ -1540,7 +1540,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx, ...@@ -1540,7 +1540,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx,
rtlpriv->btcoexist.btc_info.in_4way = true; rtlpriv->btcoexist.btc_info.in_4way = true;
rtlpriv->btcoexist.btc_info.in_4way_ts = jiffies; rtlpriv->btcoexist.btc_info.in_4way_ts = jiffies;
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG, rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
"802.1X %s EAPOL pkt!!\n", (is_tx) ? "Tx" : "Rx"); "802.1X %s EAPOL pkt!!\n", (is_tx) ? "Tx" : "Rx");
if (is_tx) { if (is_tx) {
...@@ -1583,11 +1583,11 @@ static void rtl_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -1583,11 +1583,11 @@ static void rtl_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb,
info = IEEE80211_SKB_CB(skb); info = IEEE80211_SKB_CB(skb);
ieee80211_tx_info_clear_status(info); ieee80211_tx_info_clear_status(info);
if (ack) { if (ack) {
RT_TRACE(rtlpriv, COMP_TX_REPORT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_TX_REPORT, DBG_LOUD,
"tx report: ack\n"); "tx report: ack\n");
info->flags |= IEEE80211_TX_STAT_ACK; info->flags |= IEEE80211_TX_STAT_ACK;
} else { } else {
RT_TRACE(rtlpriv, COMP_TX_REPORT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_TX_REPORT, DBG_LOUD,
"tx report: not ack\n"); "tx report: not ack\n");
info->flags &= ~IEEE80211_TX_STAT_ACK; info->flags &= ~IEEE80211_TX_STAT_ACK;
} }
...@@ -1626,7 +1626,7 @@ static u16 rtl_get_tx_report_sn(struct ieee80211_hw *hw, ...@@ -1626,7 +1626,7 @@ static u16 rtl_get_tx_report_sn(struct ieee80211_hw *hw,
tx_report->last_sent_time = jiffies; tx_report->last_sent_time = jiffies;
tx_info->sn = sn; tx_info->sn = sn;
tx_info->send_time = tx_report->last_sent_time; tx_info->send_time = tx_report->last_sent_time;
RT_TRACE(rtlpriv, COMP_TX_REPORT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_TX_REPORT, DBG_DMESG,
"Send TX-Report sn=0x%X\n", sn); "Send TX-Report sn=0x%X\n", sn);
return sn; return sn;
...@@ -1674,7 +1674,7 @@ void rtl_tx_report_handler(struct ieee80211_hw *hw, u8 *tmp_buf, u8 c2h_cmd_len) ...@@ -1674,7 +1674,7 @@ void rtl_tx_report_handler(struct ieee80211_hw *hw, u8 *tmp_buf, u8 c2h_cmd_len)
break; break;
} }
} }
RT_TRACE(rtlpriv, COMP_TX_REPORT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_TX_REPORT, DBG_DMESG,
"Recv TX-Report st=0x%02X sn=0x%X retry=0x%X\n", "Recv TX-Report st=0x%02X sn=0x%X retry=0x%X\n",
st, sn, retry); st, sn, retry);
} }
...@@ -1689,7 +1689,7 @@ bool rtl_check_tx_report_acked(struct ieee80211_hw *hw) ...@@ -1689,7 +1689,7 @@ bool rtl_check_tx_report_acked(struct ieee80211_hw *hw)
return true; return true;
if (time_before(tx_report->last_sent_time + 3 * HZ, jiffies)) { if (time_before(tx_report->last_sent_time + 3 * HZ, jiffies)) {
RT_TRACE(rtlpriv, COMP_TX_REPORT, DBG_WARNING, rtl_dbg(rtlpriv, COMP_TX_REPORT, DBG_WARNING,
"Check TX-Report timeout!! s_sn=0x%X r_sn=0x%X\n", "Check TX-Report timeout!! s_sn=0x%X r_sn=0x%X\n",
tx_report->last_sent_sn, tx_report->last_recv_sn); tx_report->last_sent_sn, tx_report->last_recv_sn);
return true; /* 3 sec. (timeout) seen as acked */ return true; /* 3 sec. (timeout) seen as acked */
...@@ -1707,7 +1707,7 @@ void rtl_wait_tx_report_acked(struct ieee80211_hw *hw, u32 wait_ms) ...@@ -1707,7 +1707,7 @@ void rtl_wait_tx_report_acked(struct ieee80211_hw *hw, u32 wait_ms)
if (rtl_check_tx_report_acked(hw)) if (rtl_check_tx_report_acked(hw))
break; break;
usleep_range(1000, 2000); usleep_range(1000, 2000);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"Wait 1ms (%d/%d) to disable key.\n", i, wait_ms); "Wait 1ms (%d/%d) to disable key.\n", i, wait_ms);
} }
} }
...@@ -1770,7 +1770,7 @@ int rtl_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -1770,7 +1770,7 @@ int rtl_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
return -ENXIO; return -ENXIO;
tid_data = &sta_entry->tids[tid]; tid_data = &sta_entry->tids[tid];
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEND, DBG_DMESG,
"on ra = %pM tid = %d seq:%d\n", sta->addr, tid, "on ra = %pM tid = %d seq:%d\n", sta->addr, tid,
*ssn); *ssn);
...@@ -1788,7 +1788,7 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -1788,7 +1788,7 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (sta == NULL) if (sta == NULL)
return -EINVAL; return -EINVAL;
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEND, DBG_DMESG,
"on ra = %pM tid = %d\n", sta->addr, tid); "on ra = %pM tid = %d\n", sta->addr, tid);
if (unlikely(tid >= MAX_TID_COUNT)) if (unlikely(tid >= MAX_TID_COUNT))
...@@ -1828,7 +1828,7 @@ int rtl_rx_agg_start(struct ieee80211_hw *hw, ...@@ -1828,7 +1828,7 @@ int rtl_rx_agg_start(struct ieee80211_hw *hw,
return -ENXIO; return -ENXIO;
tid_data = &sta_entry->tids[tid]; tid_data = &sta_entry->tids[tid];
RT_TRACE(rtlpriv, COMP_RECV, DBG_DMESG, rtl_dbg(rtlpriv, COMP_RECV, DBG_DMESG,
"on ra = %pM tid = %d\n", sta->addr, tid); "on ra = %pM tid = %d\n", sta->addr, tid);
tid_data->agg.rx_agg_state = RTL_RX_AGG_START; tid_data->agg.rx_agg_state = RTL_RX_AGG_START;
...@@ -1844,7 +1844,7 @@ int rtl_rx_agg_stop(struct ieee80211_hw *hw, ...@@ -1844,7 +1844,7 @@ int rtl_rx_agg_stop(struct ieee80211_hw *hw,
if (sta == NULL) if (sta == NULL)
return -EINVAL; return -EINVAL;
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEND, DBG_DMESG,
"on ra = %pM tid = %d\n", sta->addr, tid); "on ra = %pM tid = %d\n", sta->addr, tid);
if (unlikely(tid >= MAX_TID_COUNT)) if (unlikely(tid >= MAX_TID_COUNT))
...@@ -1865,7 +1865,7 @@ int rtl_tx_agg_oper(struct ieee80211_hw *hw, ...@@ -1865,7 +1865,7 @@ int rtl_tx_agg_oper(struct ieee80211_hw *hw,
if (sta == NULL) if (sta == NULL)
return -EINVAL; return -EINVAL;
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEND, DBG_DMESG,
"on ra = %pM tid = %d\n", sta->addr, tid); "on ra = %pM tid = %d\n", sta->addr, tid);
if (unlikely(tid >= MAX_TID_COUNT)) if (unlikely(tid >= MAX_TID_COUNT))
...@@ -1886,7 +1886,7 @@ void rtl_rx_ampdu_apply(struct rtl_priv *rtlpriv) ...@@ -1886,7 +1886,7 @@ void rtl_rx_ampdu_apply(struct rtl_priv *rtlpriv)
btc_ops->btc_get_ampdu_cfg(rtlpriv, &reject_agg, btc_ops->btc_get_ampdu_cfg(rtlpriv, &reject_agg,
&ctrl_agg_size, &agg_size); &ctrl_agg_size, &agg_size);
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_DMESG, rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_DMESG,
"Set RX AMPDU: coex - reject=%d, ctrl_agg_size=%d, size=%d", "Set RX AMPDU: coex - reject=%d, ctrl_agg_size=%d, size=%d",
reject_agg, ctrl_agg_size, agg_size); reject_agg, ctrl_agg_size, agg_size);
...@@ -1976,7 +1976,7 @@ void rtl_scan_list_expire(struct ieee80211_hw *hw) ...@@ -1976,7 +1976,7 @@ void rtl_scan_list_expire(struct ieee80211_hw *hw)
list_del(&entry->list); list_del(&entry->list);
rtlpriv->scan_list.num--; rtlpriv->scan_list.num--;
RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SCAN, DBG_LOUD,
"BSSID=%pM is expire in scan list (total=%d)\n", "BSSID=%pM is expire in scan list (total=%d)\n",
entry->bssid, rtlpriv->scan_list.num); entry->bssid, rtlpriv->scan_list.num);
kfree(entry); kfree(entry);
...@@ -2012,7 +2012,7 @@ void rtl_collect_scan_list(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -2012,7 +2012,7 @@ void rtl_collect_scan_list(struct ieee80211_hw *hw, struct sk_buff *skb)
if (memcmp(entry->bssid, hdr->addr3, ETH_ALEN) == 0) { if (memcmp(entry->bssid, hdr->addr3, ETH_ALEN) == 0) {
list_del_init(&entry->list); list_del_init(&entry->list);
entry_found = true; entry_found = true;
RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SCAN, DBG_LOUD,
"Update BSSID=%pM to scan list (total=%d)\n", "Update BSSID=%pM to scan list (total=%d)\n",
hdr->addr3, rtlpriv->scan_list.num); hdr->addr3, rtlpriv->scan_list.num);
break; break;
...@@ -2028,7 +2028,7 @@ void rtl_collect_scan_list(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -2028,7 +2028,7 @@ void rtl_collect_scan_list(struct ieee80211_hw *hw, struct sk_buff *skb)
memcpy(entry->bssid, hdr->addr3, ETH_ALEN); memcpy(entry->bssid, hdr->addr3, ETH_ALEN);
rtlpriv->scan_list.num++; rtlpriv->scan_list.num++;
RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SCAN, DBG_LOUD,
"Add BSSID=%pM to scan list (total=%d)\n", "Add BSSID=%pM to scan list (total=%d)\n",
hdr->addr3, rtlpriv->scan_list.num); hdr->addr3, rtlpriv->scan_list.num);
} }
...@@ -2190,7 +2190,7 @@ void rtl_watchdog_wq_callback(void *data) ...@@ -2190,7 +2190,7 @@ void rtl_watchdog_wq_callback(void *data)
if ((rtlpriv->link_info.bcn_rx_inperiod + if ((rtlpriv->link_info.bcn_rx_inperiod +
rtlpriv->link_info.num_rx_inperiod) == 0) { rtlpriv->link_info.num_rx_inperiod) == 0) {
rtlpriv->link_info.roam_times++; rtlpriv->link_info.roam_times++;
RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG, rtl_dbg(rtlpriv, COMP_ERR, DBG_DMESG,
"AP off for %d s\n", "AP off for %d s\n",
(rtlpriv->link_info.roam_times * 2)); (rtlpriv->link_info.roam_times * 2));
...@@ -2304,10 +2304,10 @@ static void rtl_c2h_content_parsing(struct ieee80211_hw *hw, ...@@ -2304,10 +2304,10 @@ static void rtl_c2h_content_parsing(struct ieee80211_hw *hw,
switch (cmd_id) { switch (cmd_id) {
case C2H_DBG: case C2H_DBG:
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, "[C2H], C2H_DBG!!\n"); rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "[C2H], C2H_DBG!!\n");
break; break;
case C2H_TXBF: case C2H_TXBF:
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, rtl_dbg(rtlpriv, COMP_FW, DBG_TRACE,
"[C2H], C2H_TXBF!!\n"); "[C2H], C2H_TXBF!!\n");
break; break;
case C2H_TX_REPORT: case C2H_TX_REPORT:
...@@ -2318,19 +2318,19 @@ static void rtl_c2h_content_parsing(struct ieee80211_hw *hw, ...@@ -2318,19 +2318,19 @@ static void rtl_c2h_content_parsing(struct ieee80211_hw *hw,
hal_ops->c2h_ra_report_handler(hw, cmd_buf, cmd_len); hal_ops->c2h_ra_report_handler(hw, cmd_buf, cmd_len);
break; break;
case C2H_BT_INFO: case C2H_BT_INFO:
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, rtl_dbg(rtlpriv, COMP_FW, DBG_TRACE,
"[C2H], C2H_BT_INFO!!\n"); "[C2H], C2H_BT_INFO!!\n");
if (rtlpriv->cfg->ops->get_btc_status()) if (rtlpriv->cfg->ops->get_btc_status())
btc_ops->btc_btinfo_notify(rtlpriv, cmd_buf, cmd_len); btc_ops->btc_btinfo_notify(rtlpriv, cmd_buf, cmd_len);
break; break;
case C2H_BT_MP: case C2H_BT_MP:
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, rtl_dbg(rtlpriv, COMP_FW, DBG_TRACE,
"[C2H], C2H_BT_MP!!\n"); "[C2H], C2H_BT_MP!!\n");
if (rtlpriv->cfg->ops->get_btc_status()) if (rtlpriv->cfg->ops->get_btc_status())
btc_ops->btc_btmpinfo_notify(rtlpriv, cmd_buf, cmd_len); btc_ops->btc_btmpinfo_notify(rtlpriv, cmd_buf, cmd_len);
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, rtl_dbg(rtlpriv, COMP_FW, DBG_TRACE,
"[C2H], Unknown packet!! cmd_id(%#X)!\n", cmd_id); "[C2H], Unknown packet!! cmd_id(%#X)!\n", cmd_id);
break; break;
} }
...@@ -2355,7 +2355,7 @@ void rtl_c2hcmd_launcher(struct ieee80211_hw *hw, int exec) ...@@ -2355,7 +2355,7 @@ void rtl_c2hcmd_launcher(struct ieee80211_hw *hw, int exec)
if (!skb) if (!skb)
break; break;
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, "C2H rx_desc_shift=%d\n", rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG, "C2H rx_desc_shift=%d\n",
*((u8 *)skb->cb)); *((u8 *)skb->cb));
RT_PRINT_DATA(rtlpriv, COMP_FW, DBG_DMESG, RT_PRINT_DATA(rtlpriv, COMP_FW, DBG_DMESG,
"C2H data: ", skb->data, skb->len); "C2H data: ", skb->data, skb->len);
...@@ -2701,29 +2701,29 @@ void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len) ...@@ -2701,29 +2701,29 @@ void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len)
(memcmp(mac->bssid, ap5_6, 3) == 0) || (memcmp(mac->bssid, ap5_6, 3) == 0) ||
vendor == PEER_ATH) { vendor == PEER_ATH) {
vendor = PEER_ATH; vendor = PEER_ATH;
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>ath find\n"); rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>ath find\n");
} else if ((memcmp(mac->bssid, ap4_4, 3) == 0) || } else if ((memcmp(mac->bssid, ap4_4, 3) == 0) ||
(memcmp(mac->bssid, ap4_5, 3) == 0) || (memcmp(mac->bssid, ap4_5, 3) == 0) ||
(memcmp(mac->bssid, ap4_1, 3) == 0) || (memcmp(mac->bssid, ap4_1, 3) == 0) ||
(memcmp(mac->bssid, ap4_2, 3) == 0) || (memcmp(mac->bssid, ap4_2, 3) == 0) ||
(memcmp(mac->bssid, ap4_3, 3) == 0) || (memcmp(mac->bssid, ap4_3, 3) == 0) ||
vendor == PEER_RAL) { vendor == PEER_RAL) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>ral find\n"); rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>ral find\n");
vendor = PEER_RAL; vendor = PEER_RAL;
} else if (memcmp(mac->bssid, ap6_1, 3) == 0 || } else if (memcmp(mac->bssid, ap6_1, 3) == 0 ||
vendor == PEER_CISCO) { vendor == PEER_CISCO) {
vendor = PEER_CISCO; vendor = PEER_CISCO;
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>cisco find\n"); rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>cisco find\n");
} else if ((memcmp(mac->bssid, ap3_1, 3) == 0) || } else if ((memcmp(mac->bssid, ap3_1, 3) == 0) ||
(memcmp(mac->bssid, ap3_2, 3) == 0) || (memcmp(mac->bssid, ap3_2, 3) == 0) ||
(memcmp(mac->bssid, ap3_3, 3) == 0) || (memcmp(mac->bssid, ap3_3, 3) == 0) ||
vendor == PEER_BROAD) { vendor == PEER_BROAD) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>broad find\n"); rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>broad find\n");
vendor = PEER_BROAD; vendor = PEER_BROAD;
} else if (memcmp(mac->bssid, ap7_1, 3) == 0 || } else if (memcmp(mac->bssid, ap7_1, 3) == 0 ||
vendor == PEER_MARV) { vendor == PEER_MARV) {
vendor = PEER_MARV; vendor = PEER_MARV;
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>marv find\n"); rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>marv find\n");
} }
mac->vendor = vendor; mac->vendor = vendor;
......
...@@ -43,12 +43,12 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -43,12 +43,12 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM],
target_command); target_command);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"WRITE %x: %x\n", "WRITE %x: %x\n",
rtlpriv->cfg->maps[WCAMI], target_content); rtlpriv->cfg->maps[WCAMI], target_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"The Key ID is %d\n", entry_no); "The Key ID is %d\n", entry_no);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"WRITE %x: %x\n", "WRITE %x: %x\n",
rtlpriv->cfg->maps[RWCAM], target_command); rtlpriv->cfg->maps[RWCAM], target_command);
...@@ -64,9 +64,9 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -64,9 +64,9 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM],
target_command); target_command);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"WRITE A4: %x\n", target_content); "WRITE A4: %x\n", target_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"WRITE A0: %x\n", target_command); "WRITE A0: %x\n", target_command);
} else { } else {
...@@ -83,14 +83,14 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -83,14 +83,14 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM],
target_command); target_command);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"WRITE A4: %x\n", target_content); "WRITE A4: %x\n", target_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"WRITE A0: %x\n", target_command); "WRITE A0: %x\n", target_command);
} }
} }
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"after set key, usconfig:%x\n", us_config); "after set key, usconfig:%x\n", us_config);
} }
...@@ -101,13 +101,13 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, ...@@ -101,13 +101,13 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
u32 us_config; u32 us_config;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, ulUseDK=%x MacAddr %pM\n", "EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, ulUseDK=%x MacAddr %pM\n",
ul_entry_idx, ul_key_id, ul_enc_alg, ul_entry_idx, ul_key_id, ul_enc_alg,
ul_default_key, mac_addr); ul_default_key, mac_addr);
if (ul_key_id == TOTAL_CAM_ENTRY) { if (ul_key_id == TOTAL_CAM_ENTRY) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"ulKeyId exceed!\n"); "ulKeyId exceed!\n");
return 0; return 0;
} }
...@@ -120,7 +120,7 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, ...@@ -120,7 +120,7 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
rtl_cam_program_entry(hw, ul_entry_idx, mac_addr, rtl_cam_program_entry(hw, ul_entry_idx, mac_addr,
(u8 *)key_content, us_config); (u8 *)key_content, us_config);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "end\n"); rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "end\n");
return 1; return 1;
...@@ -133,7 +133,7 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw, ...@@ -133,7 +133,7 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw,
u32 ul_command; u32 ul_command;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "key_idx:%d\n", ul_key_id); rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "key_idx:%d\n", ul_key_id);
ul_command = ul_key_id * CAM_CONTENT_COUNT; ul_command = ul_key_id * CAM_CONTENT_COUNT;
ul_command = ul_command | BIT(31) | BIT(16); ul_command = ul_command | BIT(31) | BIT(16);
...@@ -141,10 +141,10 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw, ...@@ -141,10 +141,10 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw,
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[WCAMI], 0); rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[WCAMI], 0);
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command); rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"rtl_cam_delete_one_entry(): WRITE A4: %x\n", 0); "%s: WRITE A4: %x\n", __func__, 0);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"rtl_cam_delete_one_entry(): WRITE A0: %x\n", ul_command); "%s: WRITE A0: %x\n", __func__, ul_command);
return 0; return 0;
...@@ -195,10 +195,10 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index) ...@@ -195,10 +195,10 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index)
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[WCAMI], ul_content); rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[WCAMI], ul_content);
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command); rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"rtl_cam_mark_invalid(): WRITE A4: %x\n", ul_content); "%s: WRITE A4: %x\n", __func__, ul_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"rtl_cam_mark_invalid(): WRITE A0: %x\n", ul_command); "%s: WRITE A0: %x\n", __func__, ul_command);
} }
EXPORT_SYMBOL(rtl_cam_mark_invalid); EXPORT_SYMBOL(rtl_cam_mark_invalid);
...@@ -245,12 +245,10 @@ void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index) ...@@ -245,12 +245,10 @@ void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index)
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[WCAMI], ul_content); rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[WCAMI], ul_content);
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command); rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
"rtl_cam_empty_entry(): WRITE A4: %x\n", "%s: WRITE A4: %x\n", __func__, ul_content);
ul_content); rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, "%s: WRITE A0: %x\n", __func__, ul_command);
"rtl_cam_empty_entry(): WRITE A0: %x\n",
ul_command);
} }
} }
...@@ -313,7 +311,7 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr) ...@@ -313,7 +311,7 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr)
/* Remove from HW Security CAM */ /* Remove from HW Security CAM */
eth_zero_addr(rtlpriv->sec.hwsec_cam_sta_addr[i]); eth_zero_addr(rtlpriv->sec.hwsec_cam_sta_addr[i]);
rtlpriv->sec.hwsec_cam_bitmap &= ~(BIT(0) << i); rtlpriv->sec.hwsec_cam_bitmap &= ~(BIT(0) << i);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"&&&&&&&&&del entry %d\n", i); "&&&&&&&&&del entry %d\n", i);
} }
} }
......
...@@ -76,7 +76,7 @@ static void rtl_fw_do_work(const struct firmware *firmware, void *context, ...@@ -76,7 +76,7 @@ static void rtl_fw_do_work(const struct firmware *firmware, void *context,
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
int err; int err;
RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
"Firmware callback routine entered!\n"); "Firmware callback routine entered!\n");
complete(&rtlpriv->firmware_loading_complete); complete(&rtlpriv->firmware_loading_complete);
if (!firmware) { if (!firmware) {
...@@ -214,7 +214,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw, ...@@ -214,7 +214,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
u8 retry_limit = 0x30; u8 retry_limit = 0x30;
if (mac->vif) { if (mac->vif) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"vif has been set!! mac->vif = 0x%p\n", mac->vif); "vif has been set!! mac->vif = 0x%p\n", mac->vif);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -230,7 +230,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw, ...@@ -230,7 +230,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
/*fall through*/ /*fall through*/
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
if (mac->beacon_enabled == 1) { if (mac->beacon_enabled == 1) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"NL80211_IFTYPE_STATION\n"); "NL80211_IFTYPE_STATION\n");
mac->beacon_enabled = 0; mac->beacon_enabled = 0;
rtlpriv->cfg->ops->update_interrupt_mask(hw, 0, rtlpriv->cfg->ops->update_interrupt_mask(hw, 0,
...@@ -238,7 +238,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw, ...@@ -238,7 +238,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
} }
break; break;
case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_ADHOC:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"NL80211_IFTYPE_ADHOC\n"); "NL80211_IFTYPE_ADHOC\n");
mac->link_state = MAC80211_LINKED; mac->link_state = MAC80211_LINKED;
...@@ -256,7 +256,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw, ...@@ -256,7 +256,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
mac->p2p = P2P_ROLE_GO; mac->p2p = P2P_ROLE_GO;
/*fall through*/ /*fall through*/
case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"NL80211_IFTYPE_AP\n"); "NL80211_IFTYPE_AP\n");
mac->link_state = MAC80211_LINKED; mac->link_state = MAC80211_LINKED;
...@@ -271,7 +271,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw, ...@@ -271,7 +271,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
retry_limit = 0x07; retry_limit = 0x07;
break; break;
case NL80211_IFTYPE_MESH_POINT: case NL80211_IFTYPE_MESH_POINT:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"NL80211_IFTYPE_MESH_POINT\n"); "NL80211_IFTYPE_MESH_POINT\n");
mac->link_state = MAC80211_LINKED; mac->link_state = MAC80211_LINKED;
...@@ -293,7 +293,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw, ...@@ -293,7 +293,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
} }
if (mac->p2p) { if (mac->p2p) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"p2p role %x\n", vif->type); "p2p role %x\n", vif->type);
mac->basic_rates = 0xff0;/*disable cck rate for p2p*/ mac->basic_rates = 0xff0;/*disable cck rate for p2p*/
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BASIC_RATE, rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BASIC_RATE,
...@@ -360,7 +360,7 @@ static int rtl_op_change_interface(struct ieee80211_hw *hw, ...@@ -360,7 +360,7 @@ static int rtl_op_change_interface(struct ieee80211_hw *hw,
vif->type = new_type; vif->type = new_type;
vif->p2p = p2p; vif->p2p = p2p;
ret = rtl_op_add_interface(hw, vif); ret = rtl_op_add_interface(hw, vif);
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"p2p %x\n", p2p); "p2p %x\n", p2p);
return ret; return ret;
} }
...@@ -435,7 +435,7 @@ static void _rtl_add_wowlan_patterns(struct ieee80211_hw *hw, ...@@ -435,7 +435,7 @@ static void _rtl_add_wowlan_patterns(struct ieee80211_hw *hw,
memset(mask, 0, MAX_WOL_BIT_MASK_SIZE); memset(mask, 0, MAX_WOL_BIT_MASK_SIZE);
if (patterns[i].pattern_len < 0 || if (patterns[i].pattern_len < 0 ||
patterns[i].pattern_len > MAX_WOL_PATTERN_SIZE) { patterns[i].pattern_len > MAX_WOL_PATTERN_SIZE) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_WARNING, rtl_dbg(rtlpriv, COMP_POWER, DBG_WARNING,
"Pattern[%d] is too long\n", i); "Pattern[%d] is too long\n", i);
continue; continue;
} }
...@@ -515,7 +515,7 @@ static void _rtl_add_wowlan_patterns(struct ieee80211_hw *hw, ...@@ -515,7 +515,7 @@ static void _rtl_add_wowlan_patterns(struct ieee80211_hw *hw,
"pattern to hw\n", content, len); "pattern to hw\n", content, len);
/* 3. calculate crc */ /* 3. calculate crc */
rtl_pattern.crc = _calculate_wol_pattern_crc(content, len); rtl_pattern.crc = _calculate_wol_pattern_crc(content, len);
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, rtl_dbg(rtlpriv, COMP_POWER, DBG_TRACE,
"CRC_Remainder = 0x%x\n", rtl_pattern.crc); "CRC_Remainder = 0x%x\n", rtl_pattern.crc);
/* 4. write crc & mask_for_hw to hw */ /* 4. write crc & mask_for_hw to hw */
...@@ -531,7 +531,7 @@ static int rtl_op_suspend(struct ieee80211_hw *hw, ...@@ -531,7 +531,7 @@ static int rtl_op_suspend(struct ieee80211_hw *hw,
struct rtl_hal *rtlhal = rtl_hal(rtlpriv); struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG, "\n"); rtl_dbg(rtlpriv, COMP_POWER, DBG_DMESG, "\n");
if (WARN_ON(!wow)) if (WARN_ON(!wow))
return -EINVAL; return -EINVAL;
...@@ -557,7 +557,7 @@ static int rtl_op_resume(struct ieee80211_hw *hw) ...@@ -557,7 +557,7 @@ static int rtl_op_resume(struct ieee80211_hw *hw)
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
time64_t now; time64_t now;
RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG, "\n"); rtl_dbg(rtlpriv, COMP_POWER, DBG_DMESG, "\n");
rtlhal->driver_is_goingto_unload = false; rtlhal->driver_is_goingto_unload = false;
rtlhal->enter_pnp_sleep = false; rtlhal->enter_pnp_sleep = false;
rtlhal->wake_from_pnp_sleep = true; rtlhal->wake_from_pnp_sleep = true;
...@@ -588,7 +588,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -588,7 +588,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&rtlpriv->locks.conf_mutex); mutex_lock(&rtlpriv->locks.conf_mutex);
if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) { /* BIT(2)*/ if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) { /* BIT(2)*/
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"IEEE80211_CONF_CHANGE_LISTEN_INTERVAL\n"); "IEEE80211_CONF_CHANGE_LISTEN_INTERVAL\n");
} }
...@@ -632,7 +632,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -632,7 +632,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
} }
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) { if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"IEEE80211_CONF_CHANGE_RETRY_LIMITS %x\n", "IEEE80211_CONF_CHANGE_RETRY_LIMITS %x\n",
hw->conf.long_frame_max_tx_count); hw->conf.long_frame_max_tx_count);
/* brought up everything changes (changed == ~0) indicates first /* brought up everything changes (changed == ~0) indicates first
...@@ -809,12 +809,12 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw, ...@@ -809,12 +809,12 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
if (*new_flags & FIF_ALLMULTI) { if (*new_flags & FIF_ALLMULTI) {
mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AM] | mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AM] |
rtlpriv->cfg->maps[MAC_RCR_AB]; rtlpriv->cfg->maps[MAC_RCR_AB];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Enable receive multicast frame\n"); "Enable receive multicast frame\n");
} else { } else {
mac->rx_conf &= ~(rtlpriv->cfg->maps[MAC_RCR_AM] | mac->rx_conf &= ~(rtlpriv->cfg->maps[MAC_RCR_AM] |
rtlpriv->cfg->maps[MAC_RCR_AB]); rtlpriv->cfg->maps[MAC_RCR_AB]);
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Disable receive multicast frame\n"); "Disable receive multicast frame\n");
} }
update_rcr = true; update_rcr = true;
...@@ -823,11 +823,11 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw, ...@@ -823,11 +823,11 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
if (changed_flags & FIF_FCSFAIL) { if (changed_flags & FIF_FCSFAIL) {
if (*new_flags & FIF_FCSFAIL) { if (*new_flags & FIF_FCSFAIL) {
mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACRC32]; mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACRC32];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Enable receive FCS error frame\n"); "Enable receive FCS error frame\n");
} else { } else {
mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32]; mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Disable receive FCS error frame\n"); "Disable receive FCS error frame\n");
} }
if (!update_rcr) if (!update_rcr)
...@@ -855,11 +855,11 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw, ...@@ -855,11 +855,11 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
if (*new_flags & FIF_CONTROL) { if (*new_flags & FIF_CONTROL) {
mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACF]; mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACF];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Enable receive control frame.\n"); "Enable receive control frame.\n");
} else { } else {
mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF]; mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Disable receive control frame.\n"); "Disable receive control frame.\n");
} }
if (!update_rcr) if (!update_rcr)
...@@ -869,11 +869,11 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw, ...@@ -869,11 +869,11 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
if (changed_flags & FIF_OTHER_BSS) { if (changed_flags & FIF_OTHER_BSS) {
if (*new_flags & FIF_OTHER_BSS) { if (*new_flags & FIF_OTHER_BSS) {
mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AAP]; mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AAP];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Enable receive other BSS's frame.\n"); "Enable receive other BSS's frame.\n");
} else { } else {
mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP]; mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Disable receive other BSS's frame.\n"); "Disable receive other BSS's frame.\n");
} }
if (!update_rcr) if (!update_rcr)
...@@ -923,7 +923,7 @@ static int rtl_op_sta_add(struct ieee80211_hw *hw, ...@@ -923,7 +923,7 @@ static int rtl_op_sta_add(struct ieee80211_hw *hw,
sta->supp_rates[0] &= 0xfffffff0; sta->supp_rates[0] &= 0xfffffff0;
memcpy(sta_entry->mac_addr, sta->addr, ETH_ALEN); memcpy(sta_entry->mac_addr, sta->addr, ETH_ALEN);
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"Add sta addr is %pM\n", sta->addr); "Add sta addr is %pM\n", sta->addr);
rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0, true); rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0, true);
} }
...@@ -939,7 +939,7 @@ static int rtl_op_sta_remove(struct ieee80211_hw *hw, ...@@ -939,7 +939,7 @@ static int rtl_op_sta_remove(struct ieee80211_hw *hw,
struct rtl_sta_info *sta_entry; struct rtl_sta_info *sta_entry;
if (sta) { if (sta) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"Remove sta addr is %pM\n", sta->addr); "Remove sta addr is %pM\n", sta->addr);
sta_entry = (struct rtl_sta_info *)sta->drv_priv; sta_entry = (struct rtl_sta_info *)sta->drv_priv;
sta_entry->wireless_mode = 0; sta_entry->wireless_mode = 0;
...@@ -988,7 +988,7 @@ static int rtl_op_conf_tx(struct ieee80211_hw *hw, ...@@ -988,7 +988,7 @@ static int rtl_op_conf_tx(struct ieee80211_hw *hw,
int aci; int aci;
if (queue >= AC_MAX) { if (queue >= AC_MAX) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"queue number %d is incorrect!\n", queue); "queue number %d is incorrect!\n", queue);
return -EINVAL; return -EINVAL;
} }
...@@ -1034,7 +1034,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1034,7 +1034,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
(changed & BSS_CHANGED_BEACON_ENABLED && (changed & BSS_CHANGED_BEACON_ENABLED &&
bss_conf->enable_beacon)) { bss_conf->enable_beacon)) {
if (mac->beacon_enabled == 0) { if (mac->beacon_enabled == 0) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"BSS_CHANGED_BEACON_ENABLED\n"); "BSS_CHANGED_BEACON_ENABLED\n");
/*start hw beacon interrupt. */ /*start hw beacon interrupt. */
...@@ -1052,7 +1052,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1052,7 +1052,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
if ((changed & BSS_CHANGED_BEACON_ENABLED && if ((changed & BSS_CHANGED_BEACON_ENABLED &&
!bss_conf->enable_beacon)) { !bss_conf->enable_beacon)) {
if (mac->beacon_enabled == 1) { if (mac->beacon_enabled == 1) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"ADHOC DISABLE BEACON\n"); "ADHOC DISABLE BEACON\n");
mac->beacon_enabled = 0; mac->beacon_enabled = 0;
...@@ -1062,7 +1062,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1062,7 +1062,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
} }
} }
if (changed & BSS_CHANGED_BEACON_INT) { if (changed & BSS_CHANGED_BEACON_INT) {
RT_TRACE(rtlpriv, COMP_BEACON, DBG_TRACE, rtl_dbg(rtlpriv, COMP_BEACON, DBG_TRACE,
"BSS_CHANGED_BEACON_INT\n"); "BSS_CHANGED_BEACON_INT\n");
mac->beacon_interval = bss_conf->beacon_int; mac->beacon_interval = bss_conf->beacon_int;
rtlpriv->cfg->ops->set_bcn_intv(hw); rtlpriv->cfg->ops->set_bcn_intv(hw);
...@@ -1102,7 +1102,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1102,7 +1102,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
rcu_read_unlock(); rcu_read_unlock();
goto out; goto out;
} }
RT_TRACE(rtlpriv, COMP_EASY_CONCURRENT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_EASY_CONCURRENT, DBG_LOUD,
"send PS STATIC frame\n"); "send PS STATIC frame\n");
if (rtlpriv->dm.supp_phymode_switch) { if (rtlpriv->dm.supp_phymode_switch) {
if (sta->ht_cap.ht_supported) if (sta->ht_cap.ht_supported)
...@@ -1143,7 +1143,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1143,7 +1143,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
HW_VAR_KEEP_ALIVE, HW_VAR_KEEP_ALIVE,
(u8 *)(&keep_alive)); (u8 *)(&keep_alive));
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"BSS_CHANGED_ASSOC\n"); "BSS_CHANGED_ASSOC\n");
} else { } else {
struct cfg80211_bss *bss = NULL; struct cfg80211_bss *bss = NULL;
...@@ -1161,13 +1161,13 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1161,13 +1161,13 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
IEEE80211_BSS_TYPE_ESS, IEEE80211_BSS_TYPE_ESS,
IEEE80211_PRIVACY_OFF); IEEE80211_PRIVACY_OFF);
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"bssid = %pMF\n", mac->bssid); "bssid = %pMF\n", mac->bssid);
if (bss) { if (bss) {
cfg80211_unlink_bss(hw->wiphy, bss); cfg80211_unlink_bss(hw->wiphy, bss);
cfg80211_put_bss(hw->wiphy, bss); cfg80211_put_bss(hw->wiphy, bss);
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"cfg80211_unlink !!\n"); "cfg80211_unlink !!\n");
} }
...@@ -1179,7 +1179,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1179,7 +1179,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
if (rtlpriv->cfg->ops->chk_switch_dmdp) if (rtlpriv->cfg->ops->chk_switch_dmdp)
rtlpriv->cfg->ops->chk_switch_dmdp(hw); rtlpriv->cfg->ops->chk_switch_dmdp(hw);
} }
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"BSS_CHANGED_UN_ASSOC\n"); "BSS_CHANGED_UN_ASSOC\n");
} }
rtlpriv->cfg->ops->set_network_type(hw, vif->type); rtlpriv->cfg->ops->set_network_type(hw, vif->type);
...@@ -1198,13 +1198,13 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1198,13 +1198,13 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
} }
if (changed & BSS_CHANGED_ERP_CTS_PROT) { if (changed & BSS_CHANGED_ERP_CTS_PROT) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_TRACE,
"BSS_CHANGED_ERP_CTS_PROT\n"); "BSS_CHANGED_ERP_CTS_PROT\n");
mac->use_cts_protect = bss_conf->use_cts_prot; mac->use_cts_protect = bss_conf->use_cts_prot;
} }
if (changed & BSS_CHANGED_ERP_PREAMBLE) { if (changed & BSS_CHANGED_ERP_PREAMBLE) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
"BSS_CHANGED_ERP_PREAMBLE use short preamble:%x\n", "BSS_CHANGED_ERP_PREAMBLE use short preamble:%x\n",
bss_conf->use_short_preamble); bss_conf->use_short_preamble);
...@@ -1214,7 +1214,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1214,7 +1214,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
} }
if (changed & BSS_CHANGED_ERP_SLOT) { if (changed & BSS_CHANGED_ERP_SLOT) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_TRACE,
"BSS_CHANGED_ERP_SLOT\n"); "BSS_CHANGED_ERP_SLOT\n");
if (bss_conf->use_short_slot) if (bss_conf->use_short_slot)
...@@ -1229,7 +1229,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1229,7 +1229,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_HT) { if (changed & BSS_CHANGED_HT) {
struct ieee80211_sta *sta = NULL; struct ieee80211_sta *sta = NULL;
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_TRACE,
"BSS_CHANGED_HT\n"); "BSS_CHANGED_HT\n");
rcu_read_lock(); rcu_read_lock();
...@@ -1261,7 +1261,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1261,7 +1261,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BSSID, rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BSSID,
(u8 *)bss_conf->bssid); (u8 *)bss_conf->bssid);
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_DMESG,
"bssid: %pM\n", bss_conf->bssid); "bssid: %pM\n", bss_conf->bssid);
mac->vendor = PEER_UNKNOWN; mac->vendor = PEER_UNKNOWN;
...@@ -1393,26 +1393,26 @@ static int rtl_op_ampdu_action(struct ieee80211_hw *hw, ...@@ -1393,26 +1393,26 @@ static int rtl_op_ampdu_action(struct ieee80211_hw *hw,
switch (action) { switch (action) {
case IEEE80211_AMPDU_TX_START: case IEEE80211_AMPDU_TX_START:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_TRACE,
"IEEE80211_AMPDU_TX_START: TID:%d\n", tid); "IEEE80211_AMPDU_TX_START: TID:%d\n", tid);
return rtl_tx_agg_start(hw, vif, sta, tid, ssn); return rtl_tx_agg_start(hw, vif, sta, tid, ssn);
case IEEE80211_AMPDU_TX_STOP_CONT: case IEEE80211_AMPDU_TX_STOP_CONT:
case IEEE80211_AMPDU_TX_STOP_FLUSH: case IEEE80211_AMPDU_TX_STOP_FLUSH:
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT: case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_TRACE,
"IEEE80211_AMPDU_TX_STOP: TID:%d\n", tid); "IEEE80211_AMPDU_TX_STOP: TID:%d\n", tid);
return rtl_tx_agg_stop(hw, vif, sta, tid); return rtl_tx_agg_stop(hw, vif, sta, tid);
case IEEE80211_AMPDU_TX_OPERATIONAL: case IEEE80211_AMPDU_TX_OPERATIONAL:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_TRACE,
"IEEE80211_AMPDU_TX_OPERATIONAL:TID:%d\n", tid); "IEEE80211_AMPDU_TX_OPERATIONAL:TID:%d\n", tid);
rtl_tx_agg_oper(hw, sta, tid); rtl_tx_agg_oper(hw, sta, tid);
break; break;
case IEEE80211_AMPDU_RX_START: case IEEE80211_AMPDU_RX_START:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_TRACE,
"IEEE80211_AMPDU_RX_START:TID:%d\n", tid); "IEEE80211_AMPDU_RX_START:TID:%d\n", tid);
return rtl_rx_agg_start(hw, sta, tid); return rtl_rx_agg_start(hw, sta, tid);
case IEEE80211_AMPDU_RX_STOP: case IEEE80211_AMPDU_RX_STOP:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, rtl_dbg(rtlpriv, COMP_MAC80211, DBG_TRACE,
"IEEE80211_AMPDU_RX_STOP:TID:%d\n", tid); "IEEE80211_AMPDU_RX_STOP:TID:%d\n", tid);
return rtl_rx_agg_stop(hw, sta, tid); return rtl_rx_agg_stop(hw, sta, tid);
default: default:
...@@ -1429,7 +1429,7 @@ static void rtl_op_sw_scan_start(struct ieee80211_hw *hw, ...@@ -1429,7 +1429,7 @@ static void rtl_op_sw_scan_start(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, "\n"); rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD, "\n");
mac->act_scanning = true; mac->act_scanning = true;
if (rtlpriv->link_info.higher_busytraffic) { if (rtlpriv->link_info.higher_busytraffic) {
mac->skip_scan = true; mac->skip_scan = true;
...@@ -1467,7 +1467,7 @@ static void rtl_op_sw_scan_complete(struct ieee80211_hw *hw, ...@@ -1467,7 +1467,7 @@ static void rtl_op_sw_scan_complete(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, "\n"); rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD, "\n");
mac->act_scanning = false; mac->act_scanning = false;
mac->skip_scan = false; mac->skip_scan = false;
...@@ -1517,7 +1517,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1517,7 +1517,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
rtlpriv->btcoexist.btc_info.in_4way = false; rtlpriv->btcoexist.btc_info.in_4way = false;
if (rtlpriv->cfg->mod_params->sw_crypto || rtlpriv->sec.use_sw_sec) { if (rtlpriv->cfg->mod_params->sw_crypto || rtlpriv->sec.use_sw_sec) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"not open hw encryption\n"); "not open hw encryption\n");
return -ENOSPC; /*User disabled HW-crypto */ return -ENOSPC; /*User disabled HW-crypto */
} }
...@@ -1526,7 +1526,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1526,7 +1526,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
vif->type == NL80211_IFTYPE_MESH_POINT) && vif->type == NL80211_IFTYPE_MESH_POINT) &&
!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
return -ENOSPC; return -ENOSPC;
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"%s hardware based encryption for keyidx: %d, mac: %pM\n", "%s hardware based encryption for keyidx: %d, mac: %pM\n",
cmd == SET_KEY ? "Using" : "Disabling", key->keyidx, cmd == SET_KEY ? "Using" : "Disabling", key->keyidx,
sta ? sta->addr : bcast_addr); sta ? sta->addr : bcast_addr);
...@@ -1538,27 +1538,27 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1538,27 +1538,27 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
switch (key->cipher) { switch (key->cipher) {
case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP40:
key_type = WEP40_ENCRYPTION; key_type = WEP40_ENCRYPTION;
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "alg:WEP40\n"); rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "alg:WEP40\n");
break; break;
case WLAN_CIPHER_SUITE_WEP104: case WLAN_CIPHER_SUITE_WEP104:
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "alg:WEP104\n"); rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "alg:WEP104\n");
key_type = WEP104_ENCRYPTION; key_type = WEP104_ENCRYPTION;
break; break;
case WLAN_CIPHER_SUITE_TKIP: case WLAN_CIPHER_SUITE_TKIP:
key_type = TKIP_ENCRYPTION; key_type = TKIP_ENCRYPTION;
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "alg:TKIP\n"); rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "alg:TKIP\n");
break; break;
case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_CCMP:
key_type = AESCCMP_ENCRYPTION; key_type = AESCCMP_ENCRYPTION;
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "alg:CCMP\n"); rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "alg:CCMP\n");
break; break;
case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_AES_CMAC:
/* HW don't support CMAC encryption, /* HW don't support CMAC encryption,
* use software CMAC encryption * use software CMAC encryption
*/ */
key_type = AESCMAC_ENCRYPTION; key_type = AESCMAC_ENCRYPTION;
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "alg:CMAC\n"); rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "alg:CMAC\n");
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"HW don't support CMAC encryption, use software CMAC encryption\n"); "HW don't support CMAC encryption, use software CMAC encryption\n");
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
goto out_unlock; goto out_unlock;
...@@ -1605,7 +1605,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1605,7 +1605,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
key_type == WEP104_ENCRYPTION)) key_type == WEP104_ENCRYPTION))
wep_only = true; wep_only = true;
rtlpriv->sec.pairwise_enc_algorithm = key_type; rtlpriv->sec.pairwise_enc_algorithm = key_type;
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"set enable_hw_sec, key_type:%x(OPEN:0 WEP40:1 TKIP:2 AES:4 WEP104:5)\n", "set enable_hw_sec, key_type:%x(OPEN:0 WEP40:1 TKIP:2 AES:4 WEP104:5)\n",
key_type); key_type);
rtlpriv->cfg->ops->enable_hw_sec(hw); rtlpriv->cfg->ops->enable_hw_sec(hw);
...@@ -1615,7 +1615,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1615,7 +1615,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
switch (cmd) { switch (cmd) {
case SET_KEY: case SET_KEY:
if (wep_only) { if (wep_only) {
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"set WEP(group/pairwise) key\n"); "set WEP(group/pairwise) key\n");
/* Pairwise key with an assigned MAC address. */ /* Pairwise key with an assigned MAC address. */
rtlpriv->sec.pairwise_enc_algorithm = key_type; rtlpriv->sec.pairwise_enc_algorithm = key_type;
...@@ -1626,7 +1626,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1626,7 +1626,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
rtlpriv->sec.key_len[key_idx] = key->keylen; rtlpriv->sec.key_len[key_idx] = key->keylen;
eth_zero_addr(mac_addr); eth_zero_addr(mac_addr);
} else if (group_key) { /* group key */ } else if (group_key) { /* group key */
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"set group key\n"); "set group key\n");
/* group key */ /* group key */
rtlpriv->sec.group_enc_algorithm = key_type; rtlpriv->sec.group_enc_algorithm = key_type;
...@@ -1636,7 +1636,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1636,7 +1636,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
rtlpriv->sec.key_len[key_idx] = key->keylen; rtlpriv->sec.key_len[key_idx] = key->keylen;
memcpy(mac_addr, bcast_addr, ETH_ALEN); memcpy(mac_addr, bcast_addr, ETH_ALEN);
} else { /* pairwise key */ } else { /* pairwise key */
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"set pairwise key\n"); "set pairwise key\n");
if (!sta) { if (!sta) {
WARN_ONCE(true, WARN_ONCE(true,
...@@ -1669,7 +1669,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1669,7 +1669,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX; key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
break; break;
case DISABLE_KEY: case DISABLE_KEY:
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"disable key delete one entry\n"); "disable key delete one entry\n");
/*set local buf about wep key. */ /*set local buf about wep key. */
if (vif->type == NL80211_IFTYPE_AP || if (vif->type == NL80211_IFTYPE_AP ||
...@@ -1718,7 +1718,7 @@ static void rtl_op_rfkill_poll(struct ieee80211_hw *hw) ...@@ -1718,7 +1718,7 @@ static void rtl_op_rfkill_poll(struct ieee80211_hw *hw)
if (unlikely(radio_state != rtlpriv->rfkill.rfkill_state)) { if (unlikely(radio_state != rtlpriv->rfkill.rfkill_state)) {
rtlpriv->rfkill.rfkill_state = radio_state; rtlpriv->rfkill.rfkill_state = radio_state;
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
"wireless radio switch turned %s\n", "wireless radio switch turned %s\n",
radio_state ? "on" : "off"); radio_state ? "on" : "off");
...@@ -1765,8 +1765,9 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -1765,8 +1765,9 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
do { do {
cfg_cmd = pwrcfgcmd[ary_idx]; cfg_cmd = pwrcfgcmd[ary_idx];
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"rtl_hal_pwrseqcmdparsing(): offset(%#x),cut_msk(%#x), famsk(%#x), interface_msk(%#x), base(%#x), cmd(%#x), msk(%#x), value(%#x)\n", "%s: offset(%#x),cut_msk(%#x), famsk(%#x), interface_msk(%#x), base(%#x), cmd(%#x), msk(%#x), value(%#x)\n",
__func__,
GET_PWR_CFG_OFFSET(cfg_cmd), GET_PWR_CFG_OFFSET(cfg_cmd),
GET_PWR_CFG_CUT_MASK(cfg_cmd), GET_PWR_CFG_CUT_MASK(cfg_cmd),
GET_PWR_CFG_FAB_MASK(cfg_cmd), GET_PWR_CFG_FAB_MASK(cfg_cmd),
...@@ -1779,11 +1780,11 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -1779,11 +1780,11 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
(GET_PWR_CFG_INTF_MASK(cfg_cmd)&interface_type)) { (GET_PWR_CFG_INTF_MASK(cfg_cmd)&interface_type)) {
switch (GET_PWR_CFG_CMD(cfg_cmd)) { switch (GET_PWR_CFG_CMD(cfg_cmd)) {
case PWR_CMD_READ: case PWR_CMD_READ:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"rtl_hal_pwrseqcmdparsing(): PWR_CMD_READ\n"); "rtl_hal_pwrseqcmdparsing(): PWR_CMD_READ\n");
break; break;
case PWR_CMD_WRITE: case PWR_CMD_WRITE:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"%s(): PWR_CMD_WRITE\n", __func__); "%s(): PWR_CMD_WRITE\n", __func__);
offset = GET_PWR_CFG_OFFSET(cfg_cmd); offset = GET_PWR_CFG_OFFSET(cfg_cmd);
...@@ -1797,7 +1798,7 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -1797,7 +1798,7 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
rtl_write_byte(rtlpriv, offset, value); rtl_write_byte(rtlpriv, offset, value);
break; break;
case PWR_CMD_POLLING: case PWR_CMD_POLLING:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"rtl_hal_pwrseqcmdparsing(): PWR_CMD_POLLING\n"); "rtl_hal_pwrseqcmdparsing(): PWR_CMD_POLLING\n");
polling_bit = false; polling_bit = false;
offset = GET_PWR_CFG_OFFSET(cfg_cmd); offset = GET_PWR_CFG_OFFSET(cfg_cmd);
...@@ -1818,8 +1819,8 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -1818,8 +1819,8 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
} while (!polling_bit); } while (!polling_bit);
break; break;
case PWR_CMD_DELAY: case PWR_CMD_DELAY:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"rtl_hal_pwrseqcmdparsing(): PWR_CMD_DELAY\n"); "%s: PWR_CMD_DELAY\n", __func__);
if (GET_PWR_CFG_VALUE(cfg_cmd) == if (GET_PWR_CFG_VALUE(cfg_cmd) ==
PWRSEQ_DELAY_US) PWRSEQ_DELAY_US)
udelay(GET_PWR_CFG_OFFSET(cfg_cmd)); udelay(GET_PWR_CFG_OFFSET(cfg_cmd));
...@@ -1827,8 +1828,8 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -1827,8 +1828,8 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
mdelay(GET_PWR_CFG_OFFSET(cfg_cmd)); mdelay(GET_PWR_CFG_OFFSET(cfg_cmd));
break; break;
case PWR_CMD_END: case PWR_CMD_END:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"rtl_hal_pwrseqcmdparsing(): PWR_CMD_END\n"); "%s: PWR_CMD_END\n", __func__);
return true; return true;
default: default:
WARN_ONCE(true, WARN_ONCE(true,
......
...@@ -404,7 +404,7 @@ static ssize_t rtl_debugfs_set_write_rfreg(struct file *filp, ...@@ -404,7 +404,7 @@ static ssize_t rtl_debugfs_set_write_rfreg(struct file *filp,
&path, &addr, &bitmask, &data); &path, &addr, &bitmask, &data);
if (num != 4) { if (num != 4) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG, rtl_dbg(rtlpriv, COMP_ERR, DBG_DMESG,
"Format is <path> <addr> <mask> <data>\n"); "Format is <path> <addr> <mask> <data>\n");
return count; return count;
} }
......
...@@ -120,7 +120,7 @@ void efuse_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value) ...@@ -120,7 +120,7 @@ void efuse_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value)
const u32 efuse_len = const u32 efuse_len =
rtlpriv->cfg->maps[EFUSE_REAL_CONTENT_SIZE]; rtlpriv->cfg->maps[EFUSE_REAL_CONTENT_SIZE];
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, "Addr=%x Data =%x\n", rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD, "Addr=%x Data =%x\n",
address, value); address, value);
if (address < efuse_len) { if (address < efuse_len) {
...@@ -211,9 +211,9 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf) ...@@ -211,9 +211,9 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf)
u8 efuse_usage; u8 efuse_usage;
if ((_offset + _size_byte) > rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]) { if ((_offset + _size_byte) > rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]) {
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD,
"read_efuse(): Invalid offset(%#x) with read bytes(%#x)!!\n", "%s: Invalid offset(%#x) with read bytes(%#x)!!\n",
_offset, _size_byte); __func__, _offset, _size_byte);
return; return;
} }
...@@ -376,9 +376,9 @@ bool efuse_shadow_update_chk(struct ieee80211_hw *hw) ...@@ -376,9 +376,9 @@ bool efuse_shadow_update_chk(struct ieee80211_hw *hw)
(EFUSE_MAX_SIZE - rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN])) (EFUSE_MAX_SIZE - rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN]))
result = false; result = false;
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD,
"efuse_shadow_update_chk(): totalbytes(%#x), hdr_num(%#x), words_need(%#x), efuse_used(%d)\n", "%s: totalbytes(%#x), hdr_num(%#x), words_need(%#x), efuse_used(%d)\n",
totalbytes, hdr_num, words_need, efuse_used); __func__, totalbytes, hdr_num, words_need, efuse_used);
return result; return result;
} }
...@@ -416,7 +416,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) ...@@ -416,7 +416,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
u8 word_en = 0x0F; u8 word_en = 0x0F;
u8 first_pg = false; u8 first_pg = false;
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, "\n"); rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD, "\n");
if (!efuse_shadow_update_chk(hw)) { if (!efuse_shadow_update_chk(hw)) {
efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]); efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]);
...@@ -424,7 +424,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) ...@@ -424,7 +424,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
&rtlefuse->efuse_map[EFUSE_INIT_MAP][0], &rtlefuse->efuse_map[EFUSE_INIT_MAP][0],
rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]); rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]);
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD,
"efuse out of capacity!!\n"); "efuse out of capacity!!\n");
return false; return false;
} }
...@@ -464,7 +464,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) ...@@ -464,7 +464,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
if (!efuse_pg_packet_write(hw, (u8) offset, word_en, if (!efuse_pg_packet_write(hw, (u8) offset, word_en,
tmpdata)) { tmpdata)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"PG section(%#x) fail!!\n", offset); "PG section(%#x) fail!!\n", offset);
break; break;
} }
...@@ -478,7 +478,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) ...@@ -478,7 +478,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
&rtlefuse->efuse_map[EFUSE_INIT_MAP][0], &rtlefuse->efuse_map[EFUSE_INIT_MAP][0],
rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]); rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]);
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, "\n"); rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD, "\n");
return true; return true;
} }
...@@ -616,7 +616,7 @@ static int efuse_one_byte_write(struct ieee80211_hw *hw, u16 addr, u8 data) ...@@ -616,7 +616,7 @@ static int efuse_one_byte_write(struct ieee80211_hw *hw, u16 addr, u8 data)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
u8 tmpidx = 0; u8 tmpidx = 0;
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD,
"Addr = %x Data=%x\n", addr, data); "Addr = %x Data=%x\n", addr, data);
rtl_write_byte(rtlpriv, rtl_write_byte(rtlpriv,
...@@ -996,7 +996,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, ...@@ -996,7 +996,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
if (efuse_addr >= (EFUSE_MAX_SIZE - if (efuse_addr >= (EFUSE_MAX_SIZE -
rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN])) { rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN])) {
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD,
"efuse_addr(%#x) Out of size!!\n", efuse_addr); "efuse_addr(%#x) Out of size!!\n", efuse_addr);
} }
...@@ -1037,7 +1037,7 @@ static u8 enable_efuse_data_write(struct ieee80211_hw *hw, ...@@ -1037,7 +1037,7 @@ static u8 enable_efuse_data_write(struct ieee80211_hw *hw,
u8 tmpdata[8]; u8 tmpdata[8];
memset(tmpdata, 0xff, PGPKT_DATA_SIZE); memset(tmpdata, 0xff, PGPKT_DATA_SIZE);
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD,
"word_en = %x efuse_addr=%x\n", word_en, efuse_addr); "word_en = %x efuse_addr=%x\n", word_en, efuse_addr);
if (!(word_en & BIT(0))) { if (!(word_en & BIT(0))) {
...@@ -1240,11 +1240,11 @@ int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv, ...@@ -1240,11 +1240,11 @@ int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv,
eeprom_id = *((u16 *)&hwinfo[0]); eeprom_id = *((u16 *)&hwinfo[0]);
if (eeprom_id != params[0]) { if (eeprom_id != params[0]) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"EEPROM ID(%#x) is invalid!!\n", eeprom_id); "EEPROM ID(%#x) is invalid!!\n", eeprom_id);
rtlefuse->autoload_failflag = true; rtlefuse->autoload_failflag = true;
} else { } else {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Autoload OK\n"); rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "Autoload OK\n");
rtlefuse->autoload_failflag = false; rtlefuse->autoload_failflag = false;
} }
...@@ -1255,29 +1255,29 @@ int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv, ...@@ -1255,29 +1255,29 @@ int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv,
rtlefuse->eeprom_did = *(u16 *)&hwinfo[params[2]]; rtlefuse->eeprom_did = *(u16 *)&hwinfo[params[2]];
rtlefuse->eeprom_svid = *(u16 *)&hwinfo[params[3]]; rtlefuse->eeprom_svid = *(u16 *)&hwinfo[params[3]];
rtlefuse->eeprom_smid = *(u16 *)&hwinfo[params[4]]; rtlefuse->eeprom_smid = *(u16 *)&hwinfo[params[4]];
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"EEPROMId = 0x%4x\n", eeprom_id); "EEPROMId = 0x%4x\n", eeprom_id);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"EEPROM VID = 0x%4x\n", rtlefuse->eeprom_vid); "EEPROM VID = 0x%4x\n", rtlefuse->eeprom_vid);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"EEPROM DID = 0x%4x\n", rtlefuse->eeprom_did); "EEPROM DID = 0x%4x\n", rtlefuse->eeprom_did);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"EEPROM SVID = 0x%4x\n", rtlefuse->eeprom_svid); "EEPROM SVID = 0x%4x\n", rtlefuse->eeprom_svid);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"EEPROM SMID = 0x%4x\n", rtlefuse->eeprom_smid); "EEPROM SMID = 0x%4x\n", rtlefuse->eeprom_smid);
for (i = 0; i < 6; i += 2) { for (i = 0; i < 6; i += 2) {
usvalue = *(u16 *)&hwinfo[params[5] + i]; usvalue = *(u16 *)&hwinfo[params[5] + i];
*((u16 *)(&rtlefuse->dev_addr[i])) = usvalue; *((u16 *)(&rtlefuse->dev_addr[i])) = usvalue;
} }
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "%pM\n", rtlefuse->dev_addr); rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "%pM\n", rtlefuse->dev_addr);
rtlefuse->eeprom_channelplan = *&hwinfo[params[6]]; rtlefuse->eeprom_channelplan = *&hwinfo[params[6]];
rtlefuse->eeprom_version = *(u16 *)&hwinfo[params[7]]; rtlefuse->eeprom_version = *(u16 *)&hwinfo[params[7]];
rtlefuse->txpwr_fromeprom = true; rtlefuse->txpwr_fromeprom = true;
rtlefuse->eeprom_oemid = *&hwinfo[params[8]]; rtlefuse->eeprom_oemid = *&hwinfo[params[8]];
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"EEPROM Customer ID: 0x%2x\n", rtlefuse->eeprom_oemid); "EEPROM Customer ID: 0x%2x\n", rtlefuse->eeprom_oemid);
/* set channel plan to world wide 13 */ /* set channel plan to world wide 13 */
......
...@@ -204,7 +204,7 @@ static void rtl_pci_disable_aspm(struct ieee80211_hw *hw) ...@@ -204,7 +204,7 @@ static void rtl_pci_disable_aspm(struct ieee80211_hw *hw)
return; return;
if (pcibridge_vendor == PCI_BRIDGE_VENDOR_UNKNOWN) { if (pcibridge_vendor == PCI_BRIDGE_VENDOR_UNKNOWN) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, rtl_dbg(rtlpriv, COMP_POWER, DBG_TRACE,
"PCI(Bridge) UNKNOWN\n"); "PCI(Bridge) UNKNOWN\n");
return; return;
...@@ -254,7 +254,7 @@ static void rtl_pci_enable_aspm(struct ieee80211_hw *hw) ...@@ -254,7 +254,7 @@ static void rtl_pci_enable_aspm(struct ieee80211_hw *hw)
return; return;
if (pcibridge_vendor == PCI_BRIDGE_VENDOR_UNKNOWN) { if (pcibridge_vendor == PCI_BRIDGE_VENDOR_UNKNOWN) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, rtl_dbg(rtlpriv, COMP_POWER, DBG_TRACE,
"PCI(Bridge) UNKNOWN\n"); "PCI(Bridge) UNKNOWN\n");
return; return;
} }
...@@ -271,7 +271,7 @@ static void rtl_pci_enable_aspm(struct ieee80211_hw *hw) ...@@ -271,7 +271,7 @@ static void rtl_pci_enable_aspm(struct ieee80211_hw *hw)
pci_write_config_byte(rtlpci->pdev, (num4bytes << 2), pci_write_config_byte(rtlpci->pdev, (num4bytes << 2),
u_pcibridge_aspmsetting); u_pcibridge_aspmsetting);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"PlatformEnableASPM(): Write reg[%x] = %x\n", "PlatformEnableASPM(): Write reg[%x] = %x\n",
(pcipriv->ndis_adapter.pcibridge_pciehdr_offset + 0x10), (pcipriv->ndis_adapter.pcibridge_pciehdr_offset + 0x10),
u_pcibridge_aspmsetting); u_pcibridge_aspmsetting);
...@@ -331,10 +331,10 @@ static bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw, ...@@ -331,10 +331,10 @@ static bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
list_for_each_entry(tpriv, &rtlpriv->glb_var->glb_priv_list, list_for_each_entry(tpriv, &rtlpriv->glb_var->glb_priv_list,
list) { list) {
tpcipriv = (struct rtl_pci_priv *)tpriv->priv; tpcipriv = (struct rtl_pci_priv *)tpriv->priv;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"pcipriv->ndis_adapter.funcnumber %x\n", "pcipriv->ndis_adapter.funcnumber %x\n",
pcipriv->ndis_adapter.funcnumber); pcipriv->ndis_adapter.funcnumber);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"tpcipriv->ndis_adapter.funcnumber %x\n", "tpcipriv->ndis_adapter.funcnumber %x\n",
tpcipriv->ndis_adapter.funcnumber); tpcipriv->ndis_adapter.funcnumber);
...@@ -350,7 +350,7 @@ static bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw, ...@@ -350,7 +350,7 @@ static bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
} }
} }
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"find_buddy_priv %d\n", find_buddy_priv); "find_buddy_priv %d\n", find_buddy_priv);
if (find_buddy_priv) if (find_buddy_priv)
...@@ -388,7 +388,7 @@ static void rtl_pci_parse_configuration(struct pci_dev *pdev, ...@@ -388,7 +388,7 @@ static void rtl_pci_parse_configuration(struct pci_dev *pdev,
pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &linkctrl_reg); pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &linkctrl_reg);
pcipriv->ndis_adapter.linkctrl_reg = (u8)linkctrl_reg; pcipriv->ndis_adapter.linkctrl_reg = (u8)linkctrl_reg;
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Link Control Register =%x\n", rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, "Link Control Register =%x\n",
pcipriv->ndis_adapter.linkctrl_reg); pcipriv->ndis_adapter.linkctrl_reg);
pci_read_config_byte(pdev, 0x98, &tmp); pci_read_config_byte(pdev, 0x98, &tmp);
...@@ -557,7 +557,7 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio) ...@@ -557,7 +557,7 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)
if (rtlpriv->rtlhal.earlymode_enable) if (rtlpriv->rtlhal.earlymode_enable)
skb_pull(skb, EM_HDR_LEN); skb_pull(skb, EM_HDR_LEN);
RT_TRACE(rtlpriv, (COMP_INTR | COMP_SEND), DBG_TRACE, rtl_dbg(rtlpriv, (COMP_INTR | COMP_SEND), DBG_TRACE,
"new ring->idx:%d, free: skb_queue_len:%d, free: seq:%x\n", "new ring->idx:%d, free: skb_queue_len:%d, free: seq:%x\n",
ring->idx, ring->idx,
skb_queue_len(&ring->queue), skb_queue_len(&ring->queue),
...@@ -608,7 +608,7 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio) ...@@ -608,7 +608,7 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)
} }
if ((ring->entries - skb_queue_len(&ring->queue)) <= 4) { if ((ring->entries - skb_queue_len(&ring->queue)) <= 4) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG, rtl_dbg(rtlpriv, COMP_ERR, DBG_DMESG,
"more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%x\n", "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%x\n",
prio, ring->idx, prio, ring->idx,
skb_queue_len(&ring->queue)); skb_queue_len(&ring->queue));
...@@ -801,7 +801,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) ...@@ -801,7 +801,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
skb_reserve(skb, stats.rx_drvinfo_size + skb_reserve(skb, stats.rx_drvinfo_size +
stats.rx_bufshift); stats.rx_bufshift);
} else { } else {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"skb->end - skb->tail = %d, len is %d\n", "skb->end - skb->tail = %d, len is %d\n",
skb->end - skb->tail, len); skb->end - skb->tail, len);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
...@@ -925,34 +925,34 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -925,34 +925,34 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
/*<1> beacon related */ /*<1> beacon related */
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_TBDOK]) if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_TBDOK])
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"beacon ok interrupt!\n"); "beacon ok interrupt!\n");
if (unlikely(intvec.inta & rtlpriv->cfg->maps[RTL_IMR_TBDER])) if (unlikely(intvec.inta & rtlpriv->cfg->maps[RTL_IMR_TBDER]))
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"beacon err interrupt!\n"); "beacon err interrupt!\n");
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BDOK]) if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BDOK])
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, "beacon interrupt!\n"); rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE, "beacon interrupt!\n");
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BCNINT]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BCNINT]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"prepare beacon for interrupt!\n"); "prepare beacon for interrupt!\n");
tasklet_schedule(&rtlpriv->works.irq_prepare_bcn_tasklet); tasklet_schedule(&rtlpriv->works.irq_prepare_bcn_tasklet);
} }
/*<2> Tx related */ /*<2> Tx related */
if (unlikely(intvec.intb & rtlpriv->cfg->maps[RTL_IMR_TXFOVW])) if (unlikely(intvec.intb & rtlpriv->cfg->maps[RTL_IMR_TXFOVW]))
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, "IMR_TXFOVW!\n"); rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING, "IMR_TXFOVW!\n");
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_MGNTDOK]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_MGNTDOK]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"Manage ok interrupt!\n"); "Manage ok interrupt!\n");
_rtl_pci_tx_isr(hw, MGNT_QUEUE); _rtl_pci_tx_isr(hw, MGNT_QUEUE);
} }
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_HIGHDOK]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_HIGHDOK]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"HIGH_QUEUE ok interrupt!\n"); "HIGH_QUEUE ok interrupt!\n");
_rtl_pci_tx_isr(hw, HIGH_QUEUE); _rtl_pci_tx_isr(hw, HIGH_QUEUE);
} }
...@@ -960,7 +960,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -960,7 +960,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BKDOK]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BKDOK]) {
rtlpriv->link_info.num_tx_inperiod++; rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"BK Tx OK interrupt!\n"); "BK Tx OK interrupt!\n");
_rtl_pci_tx_isr(hw, BK_QUEUE); _rtl_pci_tx_isr(hw, BK_QUEUE);
} }
...@@ -968,7 +968,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -968,7 +968,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BEDOK]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BEDOK]) {
rtlpriv->link_info.num_tx_inperiod++; rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"BE TX OK interrupt!\n"); "BE TX OK interrupt!\n");
_rtl_pci_tx_isr(hw, BE_QUEUE); _rtl_pci_tx_isr(hw, BE_QUEUE);
} }
...@@ -976,7 +976,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -976,7 +976,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_VIDOK]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_VIDOK]) {
rtlpriv->link_info.num_tx_inperiod++; rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"VI TX OK interrupt!\n"); "VI TX OK interrupt!\n");
_rtl_pci_tx_isr(hw, VI_QUEUE); _rtl_pci_tx_isr(hw, VI_QUEUE);
} }
...@@ -984,7 +984,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -984,7 +984,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_VODOK]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_VODOK]) {
rtlpriv->link_info.num_tx_inperiod++; rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"Vo TX OK interrupt!\n"); "Vo TX OK interrupt!\n");
_rtl_pci_tx_isr(hw, VO_QUEUE); _rtl_pci_tx_isr(hw, VO_QUEUE);
} }
...@@ -993,7 +993,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -993,7 +993,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
if (intvec.intd & rtlpriv->cfg->maps[RTL_IMR_H2CDOK]) { if (intvec.intd & rtlpriv->cfg->maps[RTL_IMR_H2CDOK]) {
rtlpriv->link_info.num_tx_inperiod++; rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"H2C TX OK interrupt!\n"); "H2C TX OK interrupt!\n");
_rtl_pci_tx_isr(hw, H2C_QUEUE); _rtl_pci_tx_isr(hw, H2C_QUEUE);
} }
...@@ -1003,7 +1003,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -1003,7 +1003,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_COMDOK]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_COMDOK]) {
rtlpriv->link_info.num_tx_inperiod++; rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"CMD TX OK interrupt!\n"); "CMD TX OK interrupt!\n");
_rtl_pci_tx_isr(hw, TXCMD_QUEUE); _rtl_pci_tx_isr(hw, TXCMD_QUEUE);
} }
...@@ -1011,25 +1011,25 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -1011,25 +1011,25 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
/*<3> Rx related */ /*<3> Rx related */
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_ROK]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_ROK]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, "Rx ok interrupt!\n"); rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE, "Rx ok interrupt!\n");
_rtl_pci_rx_interrupt(hw); _rtl_pci_rx_interrupt(hw);
} }
if (unlikely(intvec.inta & rtlpriv->cfg->maps[RTL_IMR_RDU])) { if (unlikely(intvec.inta & rtlpriv->cfg->maps[RTL_IMR_RDU])) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"rx descriptor unavailable!\n"); "rx descriptor unavailable!\n");
_rtl_pci_rx_interrupt(hw); _rtl_pci_rx_interrupt(hw);
} }
if (unlikely(intvec.intb & rtlpriv->cfg->maps[RTL_IMR_RXFOVW])) { if (unlikely(intvec.intb & rtlpriv->cfg->maps[RTL_IMR_RXFOVW])) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, "rx overflow !\n"); rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING, "rx overflow !\n");
_rtl_pci_rx_interrupt(hw); _rtl_pci_rx_interrupt(hw);
} }
/*<4> fw related*/ /*<4> fw related*/
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8723AE) { if (rtlhal->hw_type == HARDWARE_TYPE_RTL8723AE) {
if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_C2HCMD]) { if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_C2HCMD]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"firmware interrupt!\n"); "firmware interrupt!\n");
queue_delayed_work(rtlpriv->works.rtl_wq, queue_delayed_work(rtlpriv->works.rtl_wq,
&rtlpriv->works.fwevt_wq, 0); &rtlpriv->works.fwevt_wq, 0);
...@@ -1046,7 +1046,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) ...@@ -1046,7 +1046,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
rtlhal->hw_type == HARDWARE_TYPE_RTL8723BE) { rtlhal->hw_type == HARDWARE_TYPE_RTL8723BE) {
if (unlikely(intvec.inta & if (unlikely(intvec.inta &
rtlpriv->cfg->maps[RTL_IMR_HSISR_IND])) { rtlpriv->cfg->maps[RTL_IMR_HSISR_IND])) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, rtl_dbg(rtlpriv, COMP_INTR, DBG_TRACE,
"hsisr interrupt!\n"); "hsisr interrupt!\n");
_rtl_pci_hs_interrupt(hw); _rtl_pci_hs_interrupt(hw);
} }
...@@ -1250,7 +1250,7 @@ static int _rtl_pci_init_tx_ring(struct ieee80211_hw *hw, ...@@ -1250,7 +1250,7 @@ static int _rtl_pci_init_tx_ring(struct ieee80211_hw *hw,
rtlpci->tx_ring[prio].entries = entries; rtlpci->tx_ring[prio].entries = entries;
skb_queue_head_init(&rtlpci->tx_ring[prio].queue); skb_queue_head_init(&rtlpci->tx_ring[prio].queue);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "queue:%d, ring_addr:%p\n", rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "queue:%d, ring_addr:%p\n",
prio, desc); prio, desc);
/* init every desc in this ring */ /* init every desc in this ring */
...@@ -1648,7 +1648,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, ...@@ -1648,7 +1648,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
true, HW_DESC_OWN); true, HW_DESC_OWN);
if (own == 1 && hw_queue != BEACON_QUEUE) { if (own == 1 && hw_queue != BEACON_QUEUE) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%x\n", "No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%x\n",
hw_queue, ring->idx, idx, hw_queue, ring->idx, idx,
skb_queue_len(&ring->queue)); skb_queue_len(&ring->queue));
...@@ -1661,7 +1661,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, ...@@ -1661,7 +1661,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
if (rtlpriv->cfg->ops->get_available_desc && if (rtlpriv->cfg->ops->get_available_desc &&
rtlpriv->cfg->ops->get_available_desc(hw, hw_queue) == 0) { rtlpriv->cfg->ops->get_available_desc(hw, hw_queue) == 0) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"get_available_desc fail\n"); "get_available_desc fail\n");
spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags);
return skb->len; return skb->len;
...@@ -1685,7 +1685,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, ...@@ -1685,7 +1685,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
if ((ring->entries - skb_queue_len(&ring->queue)) < 2 && if ((ring->entries - skb_queue_len(&ring->queue)) < 2 &&
hw_queue != BEACON_QUEUE) { hw_queue != BEACON_QUEUE) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
"less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%x\n", "less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%x\n",
hw_queue, ring->idx, idx, hw_queue, ring->idx, idx,
skb_queue_len(&ring->queue)); skb_queue_len(&ring->queue));
...@@ -1793,7 +1793,7 @@ static int rtl_pci_start(struct ieee80211_hw *hw) ...@@ -1793,7 +1793,7 @@ static int rtl_pci_start(struct ieee80211_hw *hw)
err = rtlpriv->cfg->ops->hw_init(hw); err = rtlpriv->cfg->ops->hw_init(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"Failed to config hardware!\n"); "Failed to config hardware!\n");
kfree(rtlpriv->btcoexist.btc_context); kfree(rtlpriv->btcoexist.btc_context);
kfree(rtlpriv->btcoexist.wifi_only_context); kfree(rtlpriv->btcoexist.wifi_only_context);
...@@ -1803,7 +1803,7 @@ static int rtl_pci_start(struct ieee80211_hw *hw) ...@@ -1803,7 +1803,7 @@ static int rtl_pci_start(struct ieee80211_hw *hw)
&rtlmac->retry_long); &rtlmac->retry_long);
rtlpriv->cfg->ops->enable_interrupt(hw); rtlpriv->cfg->ops->enable_interrupt(hw);
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "enable_interrupt OK\n"); rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "enable_interrupt OK\n");
rtl_init_rx_config(hw); rtl_init_rx_config(hw);
...@@ -1814,7 +1814,7 @@ static int rtl_pci_start(struct ieee80211_hw *hw) ...@@ -1814,7 +1814,7 @@ static int rtl_pci_start(struct ieee80211_hw *hw)
rtlpci->up_first_time = false; rtlpci->up_first_time = false;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "%s OK\n", __func__); rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "%s OK\n", __func__);
return 0; return 0;
} }
...@@ -1908,19 +1908,19 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, ...@@ -1908,19 +1908,19 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
deviceid == RTL_PCI_8171_DID) { deviceid == RTL_PCI_8171_DID) {
switch (revisionid) { switch (revisionid) {
case RTL_PCI_REVISION_ID_8192PCIE: case RTL_PCI_REVISION_ID_8192PCIE:
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"8192 PCI-E is found - vid/did=%x/%x\n", "8192 PCI-E is found - vid/did=%x/%x\n",
venderid, deviceid); venderid, deviceid);
rtlhal->hw_type = HARDWARE_TYPE_RTL8192E; rtlhal->hw_type = HARDWARE_TYPE_RTL8192E;
return false; return false;
case RTL_PCI_REVISION_ID_8192SE: case RTL_PCI_REVISION_ID_8192SE:
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"8192SE is found - vid/did=%x/%x\n", "8192SE is found - vid/did=%x/%x\n",
venderid, deviceid); venderid, deviceid);
rtlhal->hw_type = HARDWARE_TYPE_RTL8192SE; rtlhal->hw_type = HARDWARE_TYPE_RTL8192SE;
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"Err: Unknown device - vid/did=%x/%x\n", "Err: Unknown device - vid/did=%x/%x\n",
venderid, deviceid); venderid, deviceid);
rtlhal->hw_type = HARDWARE_TYPE_RTL8192SE; rtlhal->hw_type = HARDWARE_TYPE_RTL8192SE;
...@@ -1928,7 +1928,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, ...@@ -1928,7 +1928,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
} }
} else if (deviceid == RTL_PCI_8723AE_DID) { } else if (deviceid == RTL_PCI_8723AE_DID) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8723AE; rtlhal->hw_type = HARDWARE_TYPE_RTL8723AE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"8723AE PCI-E is found - vid/did=%x/%x\n", "8723AE PCI-E is found - vid/did=%x/%x\n",
venderid, deviceid); venderid, deviceid);
} else if (deviceid == RTL_PCI_8192CET_DID || } else if (deviceid == RTL_PCI_8192CET_DID ||
...@@ -1936,42 +1936,42 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, ...@@ -1936,42 +1936,42 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
deviceid == RTL_PCI_8191CE_DID || deviceid == RTL_PCI_8191CE_DID ||
deviceid == RTL_PCI_8188CE_DID) { deviceid == RTL_PCI_8188CE_DID) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8192CE; rtlhal->hw_type = HARDWARE_TYPE_RTL8192CE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"8192C PCI-E is found - vid/did=%x/%x\n", "8192C PCI-E is found - vid/did=%x/%x\n",
venderid, deviceid); venderid, deviceid);
} else if (deviceid == RTL_PCI_8192DE_DID || } else if (deviceid == RTL_PCI_8192DE_DID ||
deviceid == RTL_PCI_8192DE_DID2) { deviceid == RTL_PCI_8192DE_DID2) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8192DE; rtlhal->hw_type = HARDWARE_TYPE_RTL8192DE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"8192D PCI-E is found - vid/did=%x/%x\n", "8192D PCI-E is found - vid/did=%x/%x\n",
venderid, deviceid); venderid, deviceid);
} else if (deviceid == RTL_PCI_8188EE_DID) { } else if (deviceid == RTL_PCI_8188EE_DID) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8188EE; rtlhal->hw_type = HARDWARE_TYPE_RTL8188EE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Find adapter, Hardware type is 8188EE\n"); "Find adapter, Hardware type is 8188EE\n");
} else if (deviceid == RTL_PCI_8723BE_DID) { } else if (deviceid == RTL_PCI_8723BE_DID) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8723BE; rtlhal->hw_type = HARDWARE_TYPE_RTL8723BE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Find adapter, Hardware type is 8723BE\n"); "Find adapter, Hardware type is 8723BE\n");
} else if (deviceid == RTL_PCI_8192EE_DID) { } else if (deviceid == RTL_PCI_8192EE_DID) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8192EE; rtlhal->hw_type = HARDWARE_TYPE_RTL8192EE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Find adapter, Hardware type is 8192EE\n"); "Find adapter, Hardware type is 8192EE\n");
} else if (deviceid == RTL_PCI_8821AE_DID) { } else if (deviceid == RTL_PCI_8821AE_DID) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8821AE; rtlhal->hw_type = HARDWARE_TYPE_RTL8821AE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Find adapter, Hardware type is 8821AE\n"); "Find adapter, Hardware type is 8821AE\n");
} else if (deviceid == RTL_PCI_8812AE_DID) { } else if (deviceid == RTL_PCI_8812AE_DID) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8812AE; rtlhal->hw_type = HARDWARE_TYPE_RTL8812AE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Find adapter, Hardware type is 8812AE\n"); "Find adapter, Hardware type is 8812AE\n");
} else if (deviceid == RTL_PCI_8822BE_DID) { } else if (deviceid == RTL_PCI_8822BE_DID) {
rtlhal->hw_type = HARDWARE_TYPE_RTL8822BE; rtlhal->hw_type = HARDWARE_TYPE_RTL8822BE;
rtlhal->bandset = BAND_ON_BOTH; rtlhal->bandset = BAND_ON_BOTH;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Find adapter, Hardware type is 8822BE\n"); "Find adapter, Hardware type is 8822BE\n");
} else { } else {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"Err: Unknown device - vid/did=%x/%x\n", "Err: Unknown device - vid/did=%x/%x\n",
venderid, deviceid); venderid, deviceid);
...@@ -1981,16 +1981,16 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, ...@@ -1981,16 +1981,16 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192DE) { if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192DE) {
if (revisionid == 0 || revisionid == 1) { if (revisionid == 0 || revisionid == 1) {
if (revisionid == 0) { if (revisionid == 0) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Find 92DE MAC0\n"); "Find 92DE MAC0\n");
rtlhal->interfaceindex = 0; rtlhal->interfaceindex = 0;
} else if (revisionid == 1) { } else if (revisionid == 1) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Find 92DE MAC1\n"); "Find 92DE MAC1\n");
rtlhal->interfaceindex = 1; rtlhal->interfaceindex = 1;
} }
} else { } else {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Unknown device - VendorID/DeviceID=%x/%x, Revision=%x\n", "Unknown device - VendorID/DeviceID=%x/%x, Revision=%x\n",
venderid, deviceid, revisionid); venderid, deviceid, revisionid);
rtlhal->interfaceindex = 0; rtlhal->interfaceindex = 0;
...@@ -2025,7 +2025,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, ...@@ -2025,7 +2025,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) { for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) {
if (bridge_pdev->vendor == pcibridge_vendors[tmp]) { if (bridge_pdev->vendor == pcibridge_vendors[tmp]) {
pcipriv->ndis_adapter.pcibridge_vendor = tmp; pcipriv->ndis_adapter.pcibridge_vendor = tmp;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"Pci Bridge Vendor is found index: %d\n", "Pci Bridge Vendor is found index: %d\n",
tmp); tmp);
break; break;
...@@ -2055,14 +2055,14 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, ...@@ -2055,14 +2055,14 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
} }
} }
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"pcidev busnumber:devnumber:funcnumber:vendor:link_ctl %d:%d:%d:%x:%x\n", "pcidev busnumber:devnumber:funcnumber:vendor:link_ctl %d:%d:%d:%x:%x\n",
pcipriv->ndis_adapter.busnumber, pcipriv->ndis_adapter.busnumber,
pcipriv->ndis_adapter.devnumber, pcipriv->ndis_adapter.devnumber,
pcipriv->ndis_adapter.funcnumber, pcipriv->ndis_adapter.funcnumber,
pdev->vendor, pcipriv->ndis_adapter.linkctrl_reg); pdev->vendor, pcipriv->ndis_adapter.linkctrl_reg);
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"pci_bridge busnumber:devnumber:funcnumber:vendor:pcie_cap:link_ctl_reg:amd %d:%d:%d:%x:%x:%x:%x\n", "pci_bridge busnumber:devnumber:funcnumber:vendor:pcie_cap:link_ctl_reg:amd %d:%d:%d:%x:%x:%x:%x\n",
pcipriv->ndis_adapter.pcibridge_busnum, pcipriv->ndis_adapter.pcibridge_busnum,
pcipriv->ndis_adapter.pcibridge_devnum, pcipriv->ndis_adapter.pcibridge_devnum,
...@@ -2098,7 +2098,7 @@ static int rtl_pci_intr_mode_msi(struct ieee80211_hw *hw) ...@@ -2098,7 +2098,7 @@ static int rtl_pci_intr_mode_msi(struct ieee80211_hw *hw)
rtlpci->using_msi = true; rtlpci->using_msi = true;
RT_TRACE(rtlpriv, COMP_INIT | COMP_INTR, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT | COMP_INTR, DBG_DMESG,
"MSI Interrupt Mode!\n"); "MSI Interrupt Mode!\n");
return 0; return 0;
} }
...@@ -2116,7 +2116,7 @@ static int rtl_pci_intr_mode_legacy(struct ieee80211_hw *hw) ...@@ -2116,7 +2116,7 @@ static int rtl_pci_intr_mode_legacy(struct ieee80211_hw *hw)
return ret; return ret;
rtlpci->using_msi = false; rtlpci->using_msi = false;
RT_TRACE(rtlpriv, COMP_INIT | COMP_INTR, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT | COMP_INTR, DBG_DMESG,
"Pin-based Interrupt Mode!\n"); "Pin-based Interrupt Mode!\n");
return 0; return 0;
} }
...@@ -2244,7 +2244,7 @@ int rtl_pci_probe(struct pci_dev *pdev, ...@@ -2244,7 +2244,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
goto fail2; goto fail2;
} }
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"mem mapped space: start: 0x%08lx len:%08lx flags:%08lx, after map:0x%08lx\n", "mem mapped space: start: 0x%08lx len:%08lx flags:%08lx, after map:0x%08lx\n",
pmem_start, pmem_len, pmem_flags, pmem_start, pmem_len, pmem_flags,
rtlpriv->io.pci_mem_start); rtlpriv->io.pci_mem_start);
...@@ -2309,7 +2309,7 @@ int rtl_pci_probe(struct pci_dev *pdev, ...@@ -2309,7 +2309,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
rtlpci = rtl_pcidev(pcipriv); rtlpci = rtl_pcidev(pcipriv);
err = rtl_pci_intr_mode_decide(hw); err = rtl_pci_intr_mode_decide(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"%s: failed to register IRQ handler\n", "%s: failed to register IRQ handler\n",
wiphy_name(hw->wiphy)); wiphy_name(hw->wiphy));
goto fail3; goto fail3;
......
...@@ -19,7 +19,7 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw) ...@@ -19,7 +19,7 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw)
rtlpriv->intf_ops->reset_trx_ring(hw); rtlpriv->intf_ops->reset_trx_ring(hw);
if (is_hal_stop(rtlhal)) if (is_hal_stop(rtlhal))
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"Driver is already down!\n"); "Driver is already down!\n");
/*<2> Enable Adapter */ /*<2> Enable Adapter */
...@@ -80,7 +80,7 @@ static bool rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -80,7 +80,7 @@ static bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
if (ppsc->rfchange_inprogress) { if (ppsc->rfchange_inprogress) {
spin_unlock(&rtlpriv->locks.rf_ps_lock); spin_unlock(&rtlpriv->locks.rf_ps_lock);
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"RF Change in progress! Wait to set..state_toset(%d).\n", "RF Change in progress! Wait to set..state_toset(%d).\n",
state_toset); state_toset);
...@@ -191,7 +191,7 @@ void rtl_ips_nic_off_wq_callback(void *data) ...@@ -191,7 +191,7 @@ void rtl_ips_nic_off_wq_callback(void *data)
enum rf_pwrstate rtstate; enum rf_pwrstate rtstate;
if (mac->opmode != NL80211_IFTYPE_STATION) { if (mac->opmode != NL80211_IFTYPE_STATION) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"not station return\n"); "not station return\n");
return; return;
} }
...@@ -228,7 +228,7 @@ void rtl_ips_nic_off_wq_callback(void *data) ...@@ -228,7 +228,7 @@ void rtl_ips_nic_off_wq_callback(void *data)
!ppsc->swrf_processing && !ppsc->swrf_processing &&
(mac->link_state == MAC80211_NOLINK) && (mac->link_state == MAC80211_NOLINK) &&
!mac->act_scanning) { !mac->act_scanning) {
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, rtl_dbg(rtlpriv, COMP_RF, DBG_TRACE,
"IPSEnter(): Turn off RF\n"); "IPSEnter(): Turn off RF\n");
ppsc->inactive_pwrstate = ERFOFF; ppsc->inactive_pwrstate = ERFOFF;
...@@ -307,7 +307,7 @@ static bool rtl_get_fwlps_doze(struct ieee80211_hw *hw) ...@@ -307,7 +307,7 @@ static bool rtl_get_fwlps_doze(struct ieee80211_hw *hw)
ppsc->last_delaylps_stamp_jiffies); ppsc->last_delaylps_stamp_jiffies);
if (ps_timediff < 2000) { if (ps_timediff < 2000) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD,
"Delay enter Fw LPS for DHCP, ARP, or EAPOL exchanging state\n"); "Delay enter Fw LPS for DHCP, ARP, or EAPOL exchanging state\n");
return false; return false;
} }
...@@ -353,7 +353,7 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -353,7 +353,7 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
if ((ppsc->fwctrl_lps) && ppsc->report_linked) { if ((ppsc->fwctrl_lps) && ppsc->report_linked) {
if (ppsc->dot11_psmode == EACTIVE) { if (ppsc->dot11_psmode == EACTIVE) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
"FW LPS leave ps_mode:%x\n", "FW LPS leave ps_mode:%x\n",
FW_PS_ACTIVE_MODE); FW_PS_ACTIVE_MODE);
enter_fwlps = false; enter_fwlps = false;
...@@ -368,7 +368,7 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -368,7 +368,7 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
rtlpriv->btcoexist.btc_ops->btc_lps_notify(rtlpriv, rt_psmode); rtlpriv->btcoexist.btc_ops->btc_lps_notify(rtlpriv, rt_psmode);
} else { } else {
if (rtl_get_fwlps_doze(hw)) { if (rtl_get_fwlps_doze(hw)) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
"FW LPS enter ps_mode:%x\n", "FW LPS enter ps_mode:%x\n",
ppsc->fwctrl_psmode); ppsc->fwctrl_psmode);
if (rtlpriv->cfg->ops->get_btc_status()) if (rtlpriv->cfg->ops->get_btc_status())
...@@ -420,7 +420,7 @@ static void rtl_lps_enter_core(struct ieee80211_hw *hw) ...@@ -420,7 +420,7 @@ static void rtl_lps_enter_core(struct ieee80211_hw *hw)
* bt_ccoexist may ask to enter lps. * bt_ccoexist may ask to enter lps.
* In normal case, this constraint move to rtl_lps_set_psmode(). * In normal case, this constraint move to rtl_lps_set_psmode().
*/ */
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD,
"Enter 802.11 power save mode...\n"); "Enter 802.11 power save mode...\n");
rtl_lps_set_psmode(hw, EAUTOPS); rtl_lps_set_psmode(hw, EAUTOPS);
...@@ -449,7 +449,7 @@ static void rtl_lps_leave_core(struct ieee80211_hw *hw) ...@@ -449,7 +449,7 @@ static void rtl_lps_leave_core(struct ieee80211_hw *hw)
RT_CLEAR_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM); RT_CLEAR_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM);
} }
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD,
"Busy Traffic,Leave 802.11 power save..\n"); "Busy Traffic,Leave 802.11 power save..\n");
rtl_lps_set_psmode(hw, EACTIVE); rtl_lps_set_psmode(hw, EACTIVE);
...@@ -534,7 +534,7 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len) ...@@ -534,7 +534,7 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len)
queue_delayed_work(rtlpriv->works.rtl_wq, queue_delayed_work(rtlpriv->works.rtl_wq,
&rtlpriv->works.ps_work, MSECS(5)); &rtlpriv->works.ps_work, MSECS(5));
} else { } else {
RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG, rtl_dbg(rtlpriv, COMP_POWER, DBG_DMESG,
"u_bufferd: %x, m_buffered: %x\n", u_buffed, m_buffed); "u_bufferd: %x, m_buffered: %x\n", u_buffed, m_buffed);
} }
} }
...@@ -630,7 +630,7 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw) ...@@ -630,7 +630,7 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
/* this print should always be dtim_conter = 0 & /* this print should always be dtim_conter = 0 &
* sleep = dtim_period, that meaons, we should * sleep = dtim_period, that meaons, we should
* awake before every dtim */ * awake before every dtim */
RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG, rtl_dbg(rtlpriv, COMP_POWER, DBG_DMESG,
"dtim_counter:%x will sleep :%d beacon_intv\n", "dtim_counter:%x will sleep :%d beacon_intv\n",
rtlpriv->psc.dtim_counter, sleep_intv); rtlpriv->psc.dtim_counter, sleep_intv);
...@@ -744,7 +744,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ...@@ -744,7 +744,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
if (ie[0] == 12) { if (ie[0] == 12) {
find_p2p_ps_ie = true; find_p2p_ps_ie = true;
if ((noa_len - 2) % 13 != 0) { if ((noa_len - 2) % 13 != 0) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"P2P notice of absence: invalid length.%d\n", "P2P notice of absence: invalid length.%d\n",
noa_len); noa_len);
return; return;
...@@ -757,7 +757,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ...@@ -757,7 +757,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
noa_index = ie[3]; noa_index = ie[3];
if (rtlpriv->psc.p2p_ps_info.p2p_ps_mode == if (rtlpriv->psc.p2p_ps_info.p2p_ps_mode ==
P2P_PS_NONE || noa_index != p2pinfo->noa_index) { P2P_PS_NONE || noa_index != p2pinfo->noa_index) {
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD,
"update NOA ie.\n"); "update NOA ie.\n");
p2pinfo->noa_index = noa_index; p2pinfo->noa_index = noa_index;
p2pinfo->opp_ps = (ie[4] >> 7); p2pinfo->opp_ps = (ie[4] >> 7);
...@@ -829,7 +829,7 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, ...@@ -829,7 +829,7 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
if (ie == NULL) if (ie == NULL)
return; return;
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, "action frame find P2P IE.\n"); rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "action frame find P2P IE.\n");
/*to find noa ie*/ /*to find noa ie*/
while (ie + 1 < end) { while (ie + 1 < end) {
noa_len = le16_to_cpu(*(__le16 *)&ie[1]); noa_len = le16_to_cpu(*(__le16 *)&ie[1]);
...@@ -837,11 +837,11 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, ...@@ -837,11 +837,11 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
return; return;
if (ie[0] == 12) { if (ie[0] == 12) {
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, "find NOA IE.\n"); rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "find NOA IE.\n");
RT_PRINT_DATA(rtlpriv, COMP_FW, DBG_LOUD, "noa ie ", RT_PRINT_DATA(rtlpriv, COMP_FW, DBG_LOUD, "noa ie ",
ie, noa_len); ie, noa_len);
if ((noa_len - 2) % 13 != 0) { if ((noa_len - 2) % 13 != 0) {
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD,
"P2P notice of absence: invalid length.%d\n", "P2P notice of absence: invalid length.%d\n",
noa_len); noa_len);
return; return;
...@@ -901,7 +901,7 @@ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state) ...@@ -901,7 +901,7 @@ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state)
struct rtl_ps_ctl *rtlps = rtl_psc(rtl_priv(hw)); struct rtl_ps_ctl *rtlps = rtl_psc(rtl_priv(hw));
struct rtl_p2p_ps_info *p2pinfo = &(rtlpriv->psc.p2p_ps_info); struct rtl_p2p_ps_info *p2pinfo = &(rtlpriv->psc.p2p_ps_info);
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, " p2p state %x\n" , p2p_ps_state); rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, " p2p state %x\n", p2p_ps_state);
switch (p2p_ps_state) { switch (p2p_ps_state) {
case P2P_PS_DISABLE: case P2P_PS_DISABLE:
p2pinfo->p2p_ps_state = p2p_ps_state; p2pinfo->p2p_ps_state = p2p_ps_state;
...@@ -953,10 +953,10 @@ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state) ...@@ -953,10 +953,10 @@ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state)
default: default:
break; break;
} }
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD,
"ctwindow %x oppps %x\n", "ctwindow %x oppps %x\n",
p2pinfo->ctwindow , p2pinfo->opp_ps); p2pinfo->ctwindow, p2pinfo->opp_ps);
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD,
"count %x duration %x index %x interval %x start time %x noa num %x\n", "count %x duration %x index %x interval %x start time %x noa num %x\n",
p2pinfo->noa_count_type[0], p2pinfo->noa_count_type[0],
p2pinfo->noa_duration[0], p2pinfo->noa_duration[0],
...@@ -964,7 +964,7 @@ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state) ...@@ -964,7 +964,7 @@ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state)
p2pinfo->noa_interval[0], p2pinfo->noa_interval[0],
p2pinfo->noa_start_time[0], p2pinfo->noa_start_time[0],
p2pinfo->noa_num); p2pinfo->noa_num);
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, "end\n"); rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "end\n");
} }
void rtl_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len) void rtl_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len)
......
...@@ -393,12 +393,12 @@ int rtl_regd_init(struct ieee80211_hw *hw, ...@@ -393,12 +393,12 @@ int rtl_regd_init(struct ieee80211_hw *hw,
rtlpriv->regd.country_code = rtlpriv->regd.country_code =
channel_plan_to_country_code(rtlpriv->efuse.channel_plan); channel_plan_to_country_code(rtlpriv->efuse.channel_plan);
RT_TRACE(rtlpriv, COMP_REGD, DBG_DMESG, rtl_dbg(rtlpriv, COMP_REGD, DBG_DMESG,
"rtl: EEPROM regdomain: 0x%0x country code: %d\n", "rtl: EEPROM regdomain: 0x%0x country code: %d\n",
rtlpriv->efuse.channel_plan, rtlpriv->regd.country_code); rtlpriv->efuse.channel_plan, rtlpriv->regd.country_code);
if (rtlpriv->regd.country_code >= COUNTRY_CODE_MAX) { if (rtlpriv->regd.country_code >= COUNTRY_CODE_MAX) {
RT_TRACE(rtlpriv, COMP_REGD, DBG_DMESG, rtl_dbg(rtlpriv, COMP_REGD, DBG_DMESG,
"rtl: EEPROM indicates invalid country code, world wide 13 should be used\n"); "rtl: EEPROM indicates invalid country code, world wide 13 should be used\n");
rtlpriv->regd.country_code = COUNTRY_CODE_WORLD_WIDE_13; rtlpriv->regd.country_code = COUNTRY_CODE_WORLD_WIDE_13;
...@@ -414,7 +414,7 @@ int rtl_regd_init(struct ieee80211_hw *hw, ...@@ -414,7 +414,7 @@ int rtl_regd_init(struct ieee80211_hw *hw,
rtlpriv->regd.alpha2[1] = '0'; rtlpriv->regd.alpha2[1] = '0';
} }
RT_TRACE(rtlpriv, COMP_REGD, DBG_TRACE, rtl_dbg(rtlpriv, COMP_REGD, DBG_TRACE,
"rtl: Country alpha2 being used: %c%c\n", "rtl: Country alpha2 being used: %c%c\n",
rtlpriv->regd.alpha2[0], rtlpriv->regd.alpha2[1]); rtlpriv->regd.alpha2[0], rtlpriv->regd.alpha2[1]);
...@@ -428,7 +428,7 @@ void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) ...@@ -428,7 +428,7 @@ void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(rtlpriv, COMP_REGD, DBG_LOUD, "\n"); rtl_dbg(rtlpriv, COMP_REGD, DBG_LOUD, "\n");
_rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd); _rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd);
} }
...@@ -259,14 +259,14 @@ static int _rtl_usb_init_tx(struct ieee80211_hw *hw) ...@@ -259,14 +259,14 @@ static int _rtl_usb_init_tx(struct ieee80211_hw *hw)
? USB_HIGH_SPEED_BULK_SIZE ? USB_HIGH_SPEED_BULK_SIZE
: USB_FULL_SPEED_BULK_SIZE; : USB_FULL_SPEED_BULK_SIZE;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "USB Max Bulk-out Size=%d\n", rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "USB Max Bulk-out Size=%d\n",
rtlusb->max_bulk_out_size); rtlusb->max_bulk_out_size);
for (i = 0; i < __RTL_TXQ_NUM; i++) { for (i = 0; i < __RTL_TXQ_NUM; i++) {
u32 ep_num = rtlusb->ep_map.ep_mapping[i]; u32 ep_num = rtlusb->ep_map.ep_mapping[i];
if (!ep_num) { if (!ep_num) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"Invalid endpoint map setting!\n"); "Invalid endpoint map setting!\n");
return -EINVAL; return -EINVAL;
} }
...@@ -336,7 +336,7 @@ static int _rtl_usb_init(struct ieee80211_hw *hw) ...@@ -336,7 +336,7 @@ static int _rtl_usb_init(struct ieee80211_hw *hw)
else if (usb_endpoint_dir_out(pep_desc)) else if (usb_endpoint_dir_out(pep_desc))
rtlusb->out_ep_nums++; rtlusb->out_ep_nums++;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
"USB EP(0x%02x), MaxPacketSize=%d, Interval=%d\n", "USB EP(0x%02x), MaxPacketSize=%d, Interval=%d\n",
pep_desc->bEndpointAddress, pep_desc->wMaxPacketSize, pep_desc->bEndpointAddress, pep_desc->wMaxPacketSize,
pep_desc->bInterval); pep_desc->bInterval);
...@@ -932,7 +932,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, ...@@ -932,7 +932,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw,
memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc)); memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc));
if (ieee80211_is_auth(fc)) { if (ieee80211_is_auth(fc)) {
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n"); rtl_dbg(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n");
} }
if (rtlpriv->psc.sw_ps_enabled) { if (rtlpriv->psc.sw_ps_enabled) {
......
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