Commit f30d7507 authored by Joe Perches's avatar Joe Perches Committed by John W. Linville

rtlwifi: Convert RT_TRACE macro to use ##__VA_ARGS__

Consolidate printks to avoid possible message interleaving
and reduce the object size.

Remove unnecessary RT_TRACE parentheses.

Miscellaneous typo and grammar fixes.
Add missing newlines to formats.
Remove duplicate KERN_DEBUG prefixes.
Coalesce formats.
Align arguments.

$ size drivers/net/wireless/rtlwifi/built-in.o*
   text    data     bss     dec     hex filename
 594841   55333  129680  779854   be64e drivers/net/wireless/rtlwifi/built-in.o.new
 607022   55333  138720  801075   c3933 drivers/net/wireless/rtlwifi/built-in.o.old
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent af08687b
...@@ -211,7 +211,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, ...@@ -211,7 +211,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
*/ */
if (get_rf_type(rtlphy) == RF_1T2R || get_rf_type(rtlphy) == RF_2T2R) { if (get_rf_type(rtlphy) == RF_1T2R || get_rf_type(rtlphy) == RF_2T2R) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("1T2R or 2T2R\n")); RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "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;
...@@ -220,7 +220,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, ...@@ -220,7 +220,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15); ht_cap->mcs.rx_highest = 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")); RT_TRACE(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;
...@@ -302,9 +302,8 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) ...@@ -302,9 +302,8 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
/* <4> set mac->sband to wiphy->sband */ /* <4> set mac->sband to wiphy->sband */
hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband; hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
} else { } else {
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n",
("Err BAND %d\n", rtlhal->current_bandtype);
rtlhal->current_bandtype));
} }
} }
/* <5> set hw caps */ /* <5> set hw caps */
...@@ -436,13 +435,13 @@ int rtl_init_core(struct ieee80211_hw *hw) ...@@ -436,13 +435,13 @@ int rtl_init_core(struct ieee80211_hw *hw)
* mac80211 hw in _rtl_init_mac80211. * mac80211 hw in _rtl_init_mac80211.
*/ */
if (rtl_regd_init(hw, rtl_reg_notifier)) { if (rtl_regd_init(hw, rtl_reg_notifier)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("REGD init failed\n")); RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "REGD init failed\n");
return 1; return 1;
} else { } else {
/* CRDA regd hint must after init CRDA */ /* CRDA regd hint must after init CRDA */
if (regulatory_hint(hw->wiphy, rtlpriv->regd.alpha2)) { if (regulatory_hint(hw->wiphy, rtlpriv->regd.alpha2)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("regulatory_hint fail\n")); "regulatory_hint fail\n");
} }
} }
...@@ -922,17 +921,17 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -922,17 +921,17 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
return false; return false;
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG, RT_TRACE(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);
break; break;
case ACT_ADDBARSP: case ACT_ADDBARSP:
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG, RT_TRACE(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, RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
("ACT_ADDBADEL From :%pM\n", hdr->addr2)); "ACT_ADDBADEL From :%pM\n", hdr->addr2);
break; break;
} }
break; break;
...@@ -975,8 +974,8 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -975,8 +974,8 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
* 67 : UDP BOOTP server * 67 : UDP BOOTP server
*/ */
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV),
DBG_DMESG, ("dhcp %s !!\n", DBG_DMESG, "dhcp %s !!\n",
(is_tx) ? "Tx" : "Rx")); is_tx ? "Tx" : "Rx");
if (is_tx) { if (is_tx) {
rtl_lps_leave(hw); rtl_lps_leave(hw);
...@@ -996,7 +995,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -996,7 +995,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
return true; return true;
} else if (ETH_P_PAE == ether_type) { } else if (ETH_P_PAE == ether_type) {
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG, RT_TRACE(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) {
rtl_lps_leave(hw); rtl_lps_leave(hw);
...@@ -1036,9 +1035,8 @@ int rtl_tx_agg_start(struct ieee80211_hw *hw, ...@@ -1036,9 +1035,8 @@ int rtl_tx_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_SEND, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "on ra = %pM tid = %d seq:%d\n",
("on ra = %pM tid = %d seq:%d\n", sta->addr, tid, sta->addr, tid, tid_data->seq_number);
tid_data->seq_number));
*ssn = tid_data->seq_number; *ssn = tid_data->seq_number;
tid_data->agg.agg_state = RTL_AGG_START; tid_data->agg.agg_state = RTL_AGG_START;
...@@ -1059,12 +1057,12 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw, ...@@ -1059,12 +1057,12 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw,
return -EINVAL; return -EINVAL;
if (!sta->addr) { if (!sta->addr) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("ra = NULL\n")); RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "ra = NULL\n");
return -EINVAL; return -EINVAL;
} }
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "on ra = %pM tid = %d\n",
("on ra = %pM tid = %d\n", sta->addr, tid)); sta->addr, tid);
if (unlikely(tid >= MAX_TID_COUNT)) if (unlikely(tid >= MAX_TID_COUNT))
return -EINVAL; return -EINVAL;
...@@ -1087,12 +1085,12 @@ int rtl_tx_agg_oper(struct ieee80211_hw *hw, ...@@ -1087,12 +1085,12 @@ int rtl_tx_agg_oper(struct ieee80211_hw *hw,
return -EINVAL; return -EINVAL;
if (!sta->addr) { if (!sta->addr) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("ra = NULL\n")); RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "ra = NULL\n");
return -EINVAL; return -EINVAL;
} }
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "on ra = %pM tid = %d\n",
("on ra = %pM tid = %d\n", sta->addr, tid)); sta->addr, tid);
if (unlikely(tid >= MAX_TID_COUNT)) if (unlikely(tid >= MAX_TID_COUNT))
return -EINVAL; return -EINVAL;
...@@ -1474,29 +1472,29 @@ void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len) ...@@ -1474,29 +1472,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")); RT_TRACE(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 findn\n")); RT_TRACE(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")); RT_TRACE(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")); RT_TRACE(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")); RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, "=>marv find\n");
} }
mac->vendor = vendor; mac->vendor = vendor;
......
...@@ -55,10 +55,10 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -55,10 +55,10 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
u8 entry_i; u8 entry_i;
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
("key_cont_128:\n %x:%x:%x:%x:%x:%x\n", "key_cont_128:\n %x:%x:%x:%x:%x:%x\n",
key_cont_128[0], key_cont_128[1], key_cont_128[0], key_cont_128[1],
key_cont_128[2], key_cont_128[3], key_cont_128[2], key_cont_128[3],
key_cont_128[4], key_cont_128[5])); key_cont_128[4], key_cont_128[5]);
for (entry_i = 0; entry_i < CAM_CONTENT_COUNT; entry_i++) { for (entry_i = 0; entry_i < CAM_CONTENT_COUNT; entry_i++) {
target_command = entry_i + CAM_CONTENT_COUNT * entry_no; target_command = entry_i + CAM_CONTENT_COUNT * entry_no;
...@@ -73,14 +73,12 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -73,14 +73,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, "WRITE %x: %x\n",
rtlpriv->cfg->maps[WCAMI], target_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
("WRITE %x: %x\n", "The Key ID is %d\n", entry_no);
rtlpriv->cfg->maps[WCAMI], target_content)); RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, "WRITE %x: %x\n",
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, rtlpriv->cfg->maps[RWCAM], target_command);
("The Key ID is %d\n", entry_no));
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
("WRITE %x: %x\n",
rtlpriv->cfg->maps[RWCAM], target_command));
} else if (entry_i == 1) { } else if (entry_i == 1) {
...@@ -94,10 +92,10 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -94,10 +92,10 @@ 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, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, "WRITE A4: %x\n",
("WRITE A4: %x\n", target_content)); target_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, "WRITE A0: %x\n",
("WRITE A0: %x\n", target_command)); target_command);
} else { } else {
...@@ -114,15 +112,15 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -114,15 +112,15 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
target_command); target_command);
udelay(100); udelay(100);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, "WRITE A4: %x\n",
("WRITE A4: %x\n", target_content)); target_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, "WRITE A0: %x\n",
("WRITE A0: %x\n", target_command)); target_command);
} }
} }
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, "after set key, usconfig:%x\n",
("after set key, usconfig:%x\n", us_config)); us_config);
} }
u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
...@@ -133,14 +131,13 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, ...@@ -133,14 +131,13 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, " "EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, ulUseDK=%x MacAddr %pM\n",
"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, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("<=== ulKeyId exceed!\n")); "<=== ulKeyId exceed!\n");
return 0; return 0;
} }
...@@ -153,7 +150,7 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, ...@@ -153,7 +150,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, ("<===\n")); RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "<===\n");
return 1; return 1;
...@@ -166,7 +163,7 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw, ...@@ -166,7 +163,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)); RT_TRACE(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);
...@@ -175,9 +172,9 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw, ...@@ -175,9 +172,9 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw,
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, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("rtl_cam_delete_one_entry(): WRITE A4: %x\n", 0)); "rtl_cam_delete_one_entry(): WRITE A4: %x\n", 0);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("rtl_cam_delete_one_entry(): WRITE A0: %x\n", ul_command)); "rtl_cam_delete_one_entry(): WRITE A0: %x\n", ul_command);
return 0; return 0;
...@@ -229,9 +226,9 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index) ...@@ -229,9 +226,9 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index)
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, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("rtl_cam_mark_invalid(): WRITE A4: %x\n", ul_content)); "rtl_cam_mark_invalid(): WRITE A4: %x\n", ul_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("rtl_cam_mark_invalid(): WRITE A0: %x\n", ul_command)); "rtl_cam_mark_invalid(): WRITE A0: %x\n", ul_command);
} }
EXPORT_SYMBOL(rtl_cam_mark_invalid); EXPORT_SYMBOL(rtl_cam_mark_invalid);
...@@ -279,11 +276,11 @@ void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index) ...@@ -279,11 +276,11 @@ void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index)
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, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
("rtl_cam_empty_entry(): WRITE A4: %x\n", "rtl_cam_empty_entry(): WRITE A4: %x\n",
ul_content)); ul_content);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
("rtl_cam_empty_entry(): WRITE A0: %x\n", "rtl_cam_empty_entry(): WRITE A0: %x\n",
ul_command)); ul_command);
} }
} }
...@@ -297,8 +294,7 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr) ...@@ -297,8 +294,7 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr)
u8 i, *addr; u8 i, *addr;
if (NULL == sta_addr) { if (NULL == sta_addr) {
RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG, RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG, "sta_addr is NULL\n");
("sta_addr is NULL.\n"));
return TOTAL_CAM_ENTRY; return TOTAL_CAM_ENTRY;
} }
/* Does STA already exist? */ /* Does STA already exist? */
...@@ -311,8 +307,8 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr) ...@@ -311,8 +307,8 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr)
for (entry_idx = 4; entry_idx < TOTAL_CAM_ENTRY; entry_idx++) { for (entry_idx = 4; entry_idx < TOTAL_CAM_ENTRY; entry_idx++) {
if ((bitmap & BIT(0)) == 0) { if ((bitmap & BIT(0)) == 0) {
RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG, RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG,
("-----hwsec_cam_bitmap: 0x%x entry_idx=%d\n", "-----hwsec_cam_bitmap: 0x%x entry_idx=%d\n",
rtlpriv->sec.hwsec_cam_bitmap, entry_idx)); rtlpriv->sec.hwsec_cam_bitmap, entry_idx);
rtlpriv->sec.hwsec_cam_bitmap |= BIT(0) << entry_idx; rtlpriv->sec.hwsec_cam_bitmap |= BIT(0) << entry_idx;
memcpy(rtlpriv->sec.hwsec_cam_sta_addr[entry_idx], memcpy(rtlpriv->sec.hwsec_cam_sta_addr[entry_idx],
sta_addr, ETH_ALEN); sta_addr, ETH_ALEN);
...@@ -331,14 +327,13 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr) ...@@ -331,14 +327,13 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr)
u8 i, *addr; u8 i, *addr;
if (NULL == sta_addr) { if (NULL == sta_addr) {
RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG, RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG, "sta_addr is NULL\n");
("sta_addr is NULL.\n"));
} }
if ((sta_addr[0]|sta_addr[1]|sta_addr[2]|sta_addr[3]|\ if ((sta_addr[0]|sta_addr[1]|sta_addr[2]|sta_addr[3]|\
sta_addr[4]|sta_addr[5]) == 0) { sta_addr[4]|sta_addr[5]) == 0) {
RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG, RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG,
("sta_addr is 00:00:00:00:00:00.\n")); "sta_addr is 00:00:00:00:00:00\n");
return; return;
} }
/* Does STA already exist? */ /* Does STA already exist? */
......
This diff is collapsed.
...@@ -165,14 +165,13 @@ do { \ ...@@ -165,14 +165,13 @@ do { \
} \ } \
} while (0) } while (0)
#define RT_TRACE(rtlpriv, comp, level, fmt) \ #define RT_TRACE(rtlpriv, comp, level, fmt, ...) \
do { \ do { \
if (unlikely(((comp) & rtlpriv->dbg.global_debugcomponents) && \ if (unlikely(((comp) & rtlpriv->dbg.global_debugcomponents) && \
((level) <= rtlpriv->dbg.global_debuglevel))) { \ ((level) <= rtlpriv->dbg.global_debuglevel))) { \
printk(KERN_DEBUG "%s:%s():<%lx-%x> ", \ printk(KERN_DEBUG "%s:%s():<%lx-%x> " fmt, \
KBUILD_MODNAME, __func__, \ KBUILD_MODNAME, __func__, \
in_interrupt(), in_atomic()); \ in_interrupt(), in_atomic(), ##__VA_ARGS__); \
printk fmt; \
} \ } \
} while (0) } while (0)
......
...@@ -162,8 +162,8 @@ void efuse_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value) ...@@ -162,8 +162,8 @@ 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, RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, "Addr=%x Data =%x\n",
("Addr=%x Data =%x\n", address, value)); address, value);
if (address < efuse_len) { if (address < efuse_len) {
rtl_write_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL], value); rtl_write_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL], value);
...@@ -252,8 +252,8 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf) ...@@ -252,8 +252,8 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf)
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, RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD,
("read_efuse(): Invalid offset(%#x) with read " "read_efuse(): Invalid offset(%#x) with read bytes(%#x)!!\n",
"bytes(%#x)!!\n", _offset, _size_byte)); _offset, _size_byte);
return; return;
} }
...@@ -395,9 +395,8 @@ bool efuse_shadow_update_chk(struct ieee80211_hw *hw) ...@@ -395,9 +395,8 @@ bool efuse_shadow_update_chk(struct ieee80211_hw *hw)
result = false; result = false;
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD,
("efuse_shadow_update_chk(): totalbytes(%#x), " "efuse_shadow_update_chk(): totalbytes(%#x), hdr_num(%#x), words_need(%#x), efuse_used(%d)\n",
"hdr_num(%#x), words_need(%#x), efuse_used(%d)\n", totalbytes, hdr_num, words_need, efuse_used);
totalbytes, hdr_num, words_need, efuse_used));
return result; return result;
} }
...@@ -434,7 +433,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) ...@@ -434,7 +433,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")); RT_TRACE(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]);
...@@ -443,7 +442,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) ...@@ -443,7 +442,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]); rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]);
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD,
("<---efuse out of capacity!!\n")); "<---efuse out of capacity!!\n");
return false; return false;
} }
efuse_power_switch(hw, true, true); efuse_power_switch(hw, true, true);
...@@ -483,7 +482,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) ...@@ -483,7 +482,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, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("PG section(%#x) fail!!\n", offset)); "PG section(%#x) fail!!\n", offset);
break; break;
} }
} }
...@@ -497,7 +496,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) ...@@ -497,7 +496,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")); RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, "<---\n");
return true; return true;
} }
...@@ -634,8 +633,8 @@ static int efuse_one_byte_write(struct ieee80211_hw *hw, u16 addr, u8 data) ...@@ -634,8 +633,8 @@ 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, RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, "Addr = %x Data=%x\n",
("Addr = %x Data=%x\n", addr, data)); addr, data);
rtl_write_byte(rtlpriv, rtl_write_byte(rtlpriv,
rtlpriv->cfg->maps[EFUSE_CTRL] + 1, (u8) (addr & 0xff)); rtlpriv->cfg->maps[EFUSE_CTRL] + 1, (u8) (addr & 0xff));
...@@ -1006,7 +1005,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, ...@@ -1006,7 +1005,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
if (efuse_addr >= (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES)) { if (efuse_addr >= (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES)) {
RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD,
("efuse_addr(%#x) Out of size!!\n", efuse_addr)); "efuse_addr(%#x) Out of size!!\n", efuse_addr);
} }
return true; return true;
...@@ -1046,8 +1045,8 @@ static u8 efuse_word_enable_data_write(struct ieee80211_hw *hw, ...@@ -1046,8 +1045,8 @@ static u8 efuse_word_enable_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, RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, "word_en = %x efuse_addr=%x\n",
("word_en = %x efuse_addr=%x\n", word_en, efuse_addr)); word_en, efuse_addr);
if (!(word_en & BIT(0))) { if (!(word_en & BIT(0))) {
tmpaddr = start_addr; tmpaddr = start_addr;
......
This diff is collapsed.
...@@ -44,7 +44,7 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw) ...@@ -44,7 +44,7 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw)
if (is_hal_stop(rtlhal)) if (is_hal_stop(rtlhal))
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("Driver is already down!\n")); "Driver is already down!\n");
/*<2> Enable Adapter */ /*<2> Enable Adapter */
rtlpriv->cfg->ops->hw_init(hw); rtlpriv->cfg->ops->hw_init(hw);
...@@ -120,7 +120,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -120,7 +120,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
...@@ -176,7 +176,7 @@ void rtl_ips_nic_off_wq_callback(void *data) ...@@ -176,7 +176,7 @@ void rtl_ips_nic_off_wq_callback(void *data)
if (mac->opmode != NL80211_IFTYPE_STATION) { if (mac->opmode != NL80211_IFTYPE_STATION) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("not station return\n")); "not station return\n");
return; return;
} }
...@@ -207,7 +207,7 @@ void rtl_ips_nic_off_wq_callback(void *data) ...@@ -207,7 +207,7 @@ void rtl_ips_nic_off_wq_callback(void *data)
(mac->link_state == MAC80211_NOLINK) && (mac->link_state == MAC80211_NOLINK) &&
!mac->act_scanning) { !mac->act_scanning) {
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE,
("IPSEnter(): Turn off RF.\n")); "IPSEnter(): Turn off RF\n");
ppsc->inactive_pwrstate = ERFOFF; ppsc->inactive_pwrstate = ERFOFF;
ppsc->in_powersavemode = true; ppsc->in_powersavemode = true;
...@@ -280,8 +280,7 @@ static bool rtl_get_fwlps_doze(struct ieee80211_hw *hw) ...@@ -280,8 +280,7 @@ static bool rtl_get_fwlps_doze(struct ieee80211_hw *hw)
if (ps_timediff < 2000) { if (ps_timediff < 2000) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("Delay enter Fw LPS for DHCP, ARP," "Delay enter Fw LPS for DHCP, ARP, or EAPOL exchanging state\n");
" or EAPOL exchanging state.\n"));
return false; return false;
} }
...@@ -328,8 +327,8 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -328,8 +327,8 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
bool fw_current_inps; bool fw_current_inps;
if (ppsc->dot11_psmode == EACTIVE) { if (ppsc->dot11_psmode == EACTIVE) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, RT_TRACE(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);
rpwm_val = 0x0C; /* RF on */ rpwm_val = 0x0C; /* RF on */
fw_pwrmode = FW_PS_ACTIVE_MODE; fw_pwrmode = FW_PS_ACTIVE_MODE;
...@@ -347,8 +346,8 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -347,8 +346,8 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
} else { } else {
if (rtl_get_fwlps_doze(hw)) { if (rtl_get_fwlps_doze(hw)) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, RT_TRACE(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);
rpwm_val = 0x02; /* RF off */ rpwm_val = 0x02; /* RF off */
fw_current_inps = true; fw_current_inps = true;
...@@ -402,7 +401,7 @@ void rtl_lps_enter(struct ieee80211_hw *hw) ...@@ -402,7 +401,7 @@ void rtl_lps_enter(struct ieee80211_hw *hw)
if (mac->cnt_after_linked >= 2) { if (mac->cnt_after_linked >= 2) {
if (ppsc->dot11_psmode == EACTIVE) { if (ppsc->dot11_psmode == EACTIVE) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(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);
} }
...@@ -434,7 +433,7 @@ void rtl_lps_leave(struct ieee80211_hw *hw) ...@@ -434,7 +433,7 @@ void rtl_lps_leave(struct ieee80211_hw *hw)
} }
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(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);
} }
...@@ -518,8 +517,8 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len) ...@@ -518,8 +517,8 @@ 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, ("u_bufferd: %x, " RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG,
"m_buffered: %x\n", u_buffed, m_buffed)); "u_bufferd: %x, m_buffered: %x\n", u_buffed, m_buffed);
} }
} }
...@@ -607,8 +606,8 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw) ...@@ -607,8 +606,8 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
* 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, RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG,
("dtim_counter:%x will sleep :%d" "dtim_counter:%x will sleep :%d beacon_intv\n",
" beacon_intv\n", rtlpriv->psc.dtim_counter, sleep_intv)); rtlpriv->psc.dtim_counter, sleep_intv);
/* we tested that 40ms is enough for sw & hw sw delay */ /* we tested that 40ms is enough for sw & hw sw delay */
queue_delayed_work(rtlpriv->works.rtl_wq, &rtlpriv->works.ps_rfon_wq, queue_delayed_work(rtlpriv->works.rtl_wq, &rtlpriv->works.ps_rfon_wq,
......
...@@ -251,7 +251,7 @@ static void *rtl_rate_alloc_sta(void *ppriv, ...@@ -251,7 +251,7 @@ static void *rtl_rate_alloc_sta(void *ppriv,
rate_priv = kzalloc(sizeof(struct rtl_rate_priv), gfp); rate_priv = kzalloc(sizeof(struct rtl_rate_priv), gfp);
if (!rate_priv) { if (!rate_priv) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Unable to allocate private rc structure\n")); "Unable to allocate private rc structure\n");
return NULL; return NULL;
} }
......
...@@ -398,13 +398,11 @@ int rtl_regd_init(struct ieee80211_hw *hw, ...@@ -398,13 +398,11 @@ int rtl_regd_init(struct ieee80211_hw *hw,
rtlpriv->regd.country_code = rtlpriv->efuse.channel_plan; rtlpriv->regd.country_code = rtlpriv->efuse.channel_plan;
RT_TRACE(rtlpriv, COMP_REGD, DBG_TRACE, RT_TRACE(rtlpriv, COMP_REGD, DBG_TRACE,
(KERN_DEBUG "rtl: EEPROM regdomain: 0x%0x\n", "rtl: EEPROM regdomain: 0x%0x\n", rtlpriv->regd.country_code);
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, RT_TRACE(rtlpriv, COMP_REGD, DBG_DMESG,
(KERN_DEBUG "rtl: EEPROM indicates invalid contry code" "rtl: EEPROM indicates invalid contry code, world wide 13 should be used\n");
"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;
} }
...@@ -420,8 +418,8 @@ int rtl_regd_init(struct ieee80211_hw *hw, ...@@ -420,8 +418,8 @@ int rtl_regd_init(struct ieee80211_hw *hw,
} }
RT_TRACE(rtlpriv, COMP_REGD, DBG_TRACE, RT_TRACE(rtlpriv, COMP_REGD, DBG_TRACE,
(KERN_DEBUG "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]);
_rtl_regd_init_wiphy(&rtlpriv->regd, wiphy, reg_notifier); _rtl_regd_init_wiphy(&rtlpriv->regd, wiphy, reg_notifier);
...@@ -433,7 +431,7 @@ int rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) ...@@ -433,7 +431,7 @@ int 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")); RT_TRACE(rtlpriv, COMP_REGD, DBG_LOUD, "\n");
return _rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd); return _rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd);
} }
...@@ -172,7 +172,7 @@ static void _rtl92c_write_fw(struct ieee80211_hw *hw, ...@@ -172,7 +172,7 @@ static void _rtl92c_write_fw(struct ieee80211_hw *hw,
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
u8 *bufferPtr = (u8 *) buffer; u8 *bufferPtr = (u8 *) buffer;
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, ("FW size is %d bytes,\n", size)); RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, "FW size is %d bytes\n", size);
if (IS_CHIP_VER_B(version)) { if (IS_CHIP_VER_B(version)) {
u32 pageNums, remainSize; u32 pageNums, remainSize;
...@@ -186,7 +186,7 @@ static void _rtl92c_write_fw(struct ieee80211_hw *hw, ...@@ -186,7 +186,7 @@ static void _rtl92c_write_fw(struct ieee80211_hw *hw,
if (pageNums > 4) { if (pageNums > 4) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Page numbers should not greater then 4\n")); "Page numbers should not greater then 4\n");
} }
for (page = 0; page < pageNums; page++) { for (page = 0; page < pageNums; page++) {
...@@ -219,13 +219,12 @@ static int _rtl92c_fw_free_to_go(struct ieee80211_hw *hw) ...@@ -219,13 +219,12 @@ static int _rtl92c_fw_free_to_go(struct ieee80211_hw *hw)
if (counter >= FW_8192C_POLLING_TIMEOUT_COUNT) { if (counter >= FW_8192C_POLLING_TIMEOUT_COUNT) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("chksum report faill ! REG_MCUFWDL:0x%08x .\n", "chksum report faill ! REG_MCUFWDL:0x%08x\n", value32);
value32));
return -EIO; return -EIO;
} }
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE,
("Checksum report OK ! REG_MCUFWDL:0x%08x .\n", value32)); "Checksum report OK ! REG_MCUFWDL:0x%08x\n", value32);
value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL); value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
value32 |= MCUFWDL_RDY; value32 |= MCUFWDL_RDY;
...@@ -238,9 +237,8 @@ static int _rtl92c_fw_free_to_go(struct ieee80211_hw *hw) ...@@ -238,9 +237,8 @@ static int _rtl92c_fw_free_to_go(struct ieee80211_hw *hw)
value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL); value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
if (value32 & WINTINI_RDY) { if (value32 & WINTINI_RDY) {
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE,
("Polling FW ready success!!" "Polling FW ready success!! REG_MCUFWDL:0x%08x\n",
" REG_MCUFWDL:0x%08x .\n", value32);
value32));
return 0; return 0;
} }
...@@ -249,7 +247,7 @@ static int _rtl92c_fw_free_to_go(struct ieee80211_hw *hw) ...@@ -249,7 +247,7 @@ static int _rtl92c_fw_free_to_go(struct ieee80211_hw *hw)
} while (counter++ < FW_8192C_POLLING_TIMEOUT_COUNT); } while (counter++ < FW_8192C_POLLING_TIMEOUT_COUNT);
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Polling FW ready fail!! REG_MCUFWDL:0x%08x .\n", value32)); "Polling FW ready fail!! REG_MCUFWDL:0x%08x\n", value32);
return -EIO; return -EIO;
} }
...@@ -272,10 +270,10 @@ int rtl92c_download_fw(struct ieee80211_hw *hw) ...@@ -272,10 +270,10 @@ int rtl92c_download_fw(struct ieee80211_hw *hw)
if (IS_FW_HEADER_EXIST(pfwheader)) { if (IS_FW_HEADER_EXIST(pfwheader)) {
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG,
("Firmware Version(%d), Signature(%#x),Size(%d)\n", "Firmware Version(%d), Signature(%#x),Size(%d)\n",
le16_to_cpu(pfwheader->version), le16_to_cpu(pfwheader->version),
le16_to_cpu(pfwheader->signature), le16_to_cpu(pfwheader->signature),
(uint)sizeof(struct rtl92c_firmware_header))); (uint)sizeof(struct rtl92c_firmware_header));
pfwdata = pfwdata + sizeof(struct rtl92c_firmware_header); pfwdata = pfwdata + sizeof(struct rtl92c_firmware_header);
fwsize = fwsize - sizeof(struct rtl92c_firmware_header); fwsize = fwsize - sizeof(struct rtl92c_firmware_header);
...@@ -287,10 +285,10 @@ int rtl92c_download_fw(struct ieee80211_hw *hw) ...@@ -287,10 +285,10 @@ int rtl92c_download_fw(struct ieee80211_hw *hw)
if (_rtl92c_fw_free_to_go(hw)) { if (_rtl92c_fw_free_to_go(hw)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Firmware is not ready to run!\n")); "Firmware is not ready to run!\n");
} else { } else {
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE,
("Firmware is ready to run!\n")); "Firmware is ready to run!\n");
} }
return 0; return 0;
...@@ -328,22 +326,22 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -328,22 +326,22 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
unsigned long flag; unsigned long flag;
u8 idx; u8 idx;
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, ("come in\n")); RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, "come in\n");
while (true) { while (true) {
spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
if (rtlhal->h2c_setinprogress) { if (rtlhal->h2c_setinprogress) {
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD,
("H2C set in progress! Wait to set.." "H2C set in progress! Wait to set..element_id(%d)\n",
"element_id(%d).\n", element_id)); element_id);
while (rtlhal->h2c_setinprogress) { while (rtlhal->h2c_setinprogress) {
spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock,
flag); flag);
h2c_waitcounter++; h2c_waitcounter++;
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD,
("Wait 100 us (%d times)...\n", "Wait 100 us (%d times)...\n",
h2c_waitcounter)); h2c_waitcounter);
udelay(100); udelay(100);
if (h2c_waitcounter > 1000) if (h2c_waitcounter > 1000)
...@@ -363,8 +361,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -363,8 +361,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
wait_writeh2c_limmit--; wait_writeh2c_limmit--;
if (wait_writeh2c_limmit == 0) { if (wait_writeh2c_limmit == 0) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Write H2C fail because no trigger " "Write H2C fail because no trigger for FW INT!\n");
"for FW INT!\n"));
break; break;
} }
...@@ -388,7 +385,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -388,7 +385,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
...@@ -398,8 +395,8 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -398,8 +395,8 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
wait_h2c_limmit--; wait_h2c_limmit--;
if (wait_h2c_limmit == 0) { if (wait_h2c_limmit == 0) {
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD,
("Wating too long for FW read " "Waiting too long for FW read clear HMEBox(%d)!\n",
"clear HMEBox(%d)!\n", boxnum)); boxnum);
break; break;
} }
...@@ -408,14 +405,14 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -408,14 +405,14 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
isfw_read = _rtl92c_check_fw_read_last_h2c(hw, boxnum); isfw_read = _rtl92c_check_fw_read_last_h2c(hw, boxnum);
u1b_tmp = rtl_read_byte(rtlpriv, 0x1BF); u1b_tmp = rtl_read_byte(rtlpriv, 0x1BF);
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD,
("Wating for FW read clear HMEBox(%d)!!! " "Waiting for FW read clear HMEBox(%d)!!! 0x1BF = %2x\n",
"0x1BF = %2x\n", boxnum, u1b_tmp)); boxnum, u1b_tmp);
} }
if (!isfw_read) { if (!isfw_read) {
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD,
("Write H2C register BOX[%d] fail!!!!! " "Write H2C register BOX[%d] fail!!!!! Fw do not read\n",
"Fw do not read.\n", boxnum)); boxnum);
break; break;
} }
...@@ -423,8 +420,8 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -423,8 +420,8 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
memset(boxextcontent, 0, sizeof(boxextcontent)); memset(boxextcontent, 0, sizeof(boxextcontent));
boxcontent[0] = element_id; boxcontent[0] = element_id;
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD,
("Write element_id box_reg(%4x) = %2x\n", "Write element_id box_reg(%4x) = %2x\n",
box_reg, element_id)); box_reg, element_id);
switch (cmd_len) { switch (cmd_len) {
case 1: case 1:
...@@ -493,7 +490,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -493,7 +490,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
...@@ -504,15 +501,15 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, ...@@ -504,15 +501,15 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
rtlhal->last_hmeboxnum = 0; rtlhal->last_hmeboxnum = 0;
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD,
("pHalData->last_hmeboxnum = %d\n", "pHalData->last_hmeboxnum = %d\n",
rtlhal->last_hmeboxnum)); rtlhal->last_hmeboxnum);
} }
spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
rtlhal->h2c_setinprogress = false; rtlhal->h2c_setinprogress = false;
spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, ("go out\n")); RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, "go out\n");
} }
void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw, void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw,
...@@ -562,7 +559,7 @@ void rtl92c_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode) ...@@ -562,7 +559,7 @@ void rtl92c_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode)
u8 u1_h2c_set_pwrmode[3] = {0}; u8 u1_h2c_set_pwrmode[3] = {0};
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_LOUD, ("FW LPS mode = %d\n", mode)); RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, "FW LPS mode = %d\n", mode);
SET_H2CCMD_PWRMODE_PARM_MODE(u1_h2c_set_pwrmode, mode); SET_H2CCMD_PWRMODE_PARM_MODE(u1_h2c_set_pwrmode, mode);
SET_H2CCMD_PWRMODE_PARM_SMART_PS(u1_h2c_set_pwrmode, 1); SET_H2CCMD_PWRMODE_PARM_SMART_PS(u1_h2c_set_pwrmode, 1);
...@@ -798,14 +795,14 @@ void rtl92c_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished) ...@@ -798,14 +795,14 @@ void rtl92c_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished)
if (dlok) { if (dlok) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("Set RSVD page location to Fw.\n")); "Set RSVD page location to Fw\n");
RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG, RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
"H2C_RSVDPAGE", u1RsvdPageLoc, 3); "H2C_RSVDPAGE", u1RsvdPageLoc, 3);
rtl92c_fill_h2c_cmd(hw, H2C_RSVDPAGE, rtl92c_fill_h2c_cmd(hw, H2C_RSVDPAGE,
sizeof(u1RsvdPageLoc), u1RsvdPageLoc); sizeof(u1RsvdPageLoc), u1RsvdPageLoc);
} else } else
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("Set RSVD page location to Fw FAIL!!!!!!.\n")); "Set RSVD page location to Fw FAIL!!!!!!\n");
} }
EXPORT_SYMBOL(rtl92c_set_fw_rsvdpagepkt); EXPORT_SYMBOL(rtl92c_set_fw_rsvdpagepkt);
......
...@@ -54,7 +54,7 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -54,7 +54,7 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw)
if ((mac->link_state < MAC80211_LINKED) && if ((mac->link_state < MAC80211_LINKED) &&
(rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) { (rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE,
("Not connected to any\n")); "Not connected to any\n");
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
...@@ -67,28 +67,28 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -67,28 +67,28 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw)
undecorated_smoothed_pwdb = undecorated_smoothed_pwdb =
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("AP Client PWDB = 0x%lx\n", "AP Client PWDB = 0x%lx\n",
undecorated_smoothed_pwdb)); undecorated_smoothed_pwdb);
} else { } else {
undecorated_smoothed_pwdb = undecorated_smoothed_pwdb =
rtlpriv->dm.undecorated_smoothed_pwdb; rtlpriv->dm.undecorated_smoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("STA Default Port PWDB = 0x%lx\n", "STA Default Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb)); undecorated_smoothed_pwdb);
} }
} else { } else {
undecorated_smoothed_pwdb = undecorated_smoothed_pwdb =
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("AP Ext Port PWDB = 0x%lx\n", "AP Ext Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb)); undecorated_smoothed_pwdb);
} }
if (undecorated_smoothed_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL2) { if (undecorated_smoothed_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL2) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n")); "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n");
} else if ((undecorated_smoothed_pwdb < } else if ((undecorated_smoothed_pwdb <
(TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) && (TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) &&
(undecorated_smoothed_pwdb >= (undecorated_smoothed_pwdb >=
...@@ -96,18 +96,18 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -96,18 +96,18 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw)
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n")); "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n");
} else if (undecorated_smoothed_pwdb < } else if (undecorated_smoothed_pwdb <
(TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) { (TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("TXHIGHPWRLEVEL_NORMAL\n")); "TXHIGHPWRLEVEL_NORMAL\n");
} }
if ((rtlpriv->dm.dynamic_txhighpower_lvl != rtlpriv->dm.last_dtp_lvl)) { if ((rtlpriv->dm.dynamic_txhighpower_lvl != rtlpriv->dm.last_dtp_lvl)) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("PHY_SetTxPowerLevel8192S() Channel = %d\n", "PHY_SetTxPowerLevel8192S() Channel = %d\n",
rtlphy->current_channel)); rtlphy->current_channel);
rtl92c_phy_set_txpower_level(hw, rtlphy->current_channel); rtl92c_phy_set_txpower_level(hw, rtlphy->current_channel);
} }
......
This diff is collapsed.
...@@ -45,8 +45,8 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -45,8 +45,8 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
u8 ledcfg; u8 ledcfg;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n",
("LedAddr:%X ledpin=%d\n", REG_LEDCFG2, pled->ledpin)); REG_LEDCFG2, pled->ledpin);
ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2); ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2);
...@@ -62,7 +62,7 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -62,7 +62,7 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
pled->ledon = true; pled->ledon = true;
...@@ -74,8 +74,8 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -74,8 +74,8 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
u8 ledcfg; u8 ledcfg;
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n",
("LedAddr:%X ledpin=%d\n", REG_LEDCFG2, pled->ledpin)); REG_LEDCFG2, pled->ledpin);
ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2); ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2);
...@@ -97,7 +97,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -97,7 +97,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
pled->ledon = false; pled->ledon = false;
...@@ -145,7 +145,7 @@ void rtl92ce_led_control(struct ieee80211_hw *hw, ...@@ -145,7 +145,7 @@ void rtl92ce_led_control(struct ieee80211_hw *hw,
ledaction == LED_CTL_POWER_ON)) { ledaction == LED_CTL_POWER_ON)) {
return; return;
} }
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, ("ledaction %d.\n", RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "ledaction %d\n",
ledaction)); ledaction);
_rtl92ce_sw_led_control(hw, ledaction); _rtl92ce_sw_led_control(hw, ledaction);
} }
...@@ -47,9 +47,9 @@ u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw, ...@@ -47,9 +47,9 @@ u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw,
u32 original_value, readback_value, bitshift; u32 original_value, readback_value, bitshift;
struct rtl_phy *rtlphy = &(rtlpriv->phy); struct rtl_phy *rtlphy = &(rtlpriv->phy);
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, ("regaddr(%#x), " RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE,
"rfpath(%#x), bitmask(%#x)\n", "regaddr(%#x), rfpath(%#x), bitmask(%#x)\n",
regaddr, rfpath, bitmask)); regaddr, rfpath, bitmask);
spin_lock(&rtlpriv->locks.rf_lock); spin_lock(&rtlpriv->locks.rf_lock);
...@@ -67,9 +67,8 @@ u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw, ...@@ -67,9 +67,8 @@ u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw,
spin_unlock(&rtlpriv->locks.rf_lock); spin_unlock(&rtlpriv->locks.rf_lock);
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE,
("regaddr(%#x), rfpath(%#x), " "regaddr(%#x), rfpath(%#x), bitmask(%#x), original_value(%#x)\n",
"bitmask(%#x), original_value(%#x)\n", regaddr, rfpath, bitmask, original_value);
regaddr, rfpath, bitmask, original_value));
return readback_value; return readback_value;
} }
...@@ -121,8 +120,8 @@ void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw, ...@@ -121,8 +120,8 @@ void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw,
u32 original_value, bitshift; u32 original_value, bitshift;
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE,
("regaddr(%#x), bitmask(%#x), data(%#x), rfpath(%#x)\n", "regaddr(%#x), bitmask(%#x), data(%#x), rfpath(%#x)\n",
regaddr, bitmask, data, rfpath)); regaddr, bitmask, data, rfpath);
spin_lock(&rtlpriv->locks.rf_lock); spin_lock(&rtlpriv->locks.rf_lock);
...@@ -153,10 +152,9 @@ void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw, ...@@ -153,10 +152,9 @@ void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw,
spin_unlock(&rtlpriv->locks.rf_lock); spin_unlock(&rtlpriv->locks.rf_lock);
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, ("regaddr(%#x), " RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE,
"bitmask(%#x), data(%#x), " "regaddr(%#x), bitmask(%#x), data(%#x), rfpath(%#x)\n",
"rfpath(%#x)\n", regaddr, regaddr, bitmask, data, rfpath);
bitmask, data, rfpath));
} }
static bool _rtl92c_phy_config_mac_with_headerfile(struct ieee80211_hw *hw) static bool _rtl92c_phy_config_mac_with_headerfile(struct ieee80211_hw *hw)
...@@ -166,11 +164,10 @@ static bool _rtl92c_phy_config_mac_with_headerfile(struct ieee80211_hw *hw) ...@@ -166,11 +164,10 @@ static bool _rtl92c_phy_config_mac_with_headerfile(struct ieee80211_hw *hw)
u32 arraylength; u32 arraylength;
u32 *ptrarray; u32 *ptrarray;
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("Read Rtl819XMACPHY_Array\n")); RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Read Rtl819XMACPHY_Array\n");
arraylength = MAC_2T_ARRAYLENGTH; arraylength = MAC_2T_ARRAYLENGTH;
ptrarray = RTL8192CEMAC_2T_ARRAY; ptrarray = RTL8192CEMAC_2T_ARRAY;
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Img:RTL8192CEMAC_2T_ARRAY\n");
("Img:RTL8192CEMAC_2T_ARRAY\n"));
for (i = 0; i < arraylength; i = i + 2) for (i = 0; i < arraylength; i = i + 2)
rtl_write_byte(rtlpriv, ptrarray[i], (u8) ptrarray[i + 1]); rtl_write_byte(rtlpriv, ptrarray[i], (u8) ptrarray[i + 1]);
return true; return true;
...@@ -215,10 +212,9 @@ bool _rtl92ce_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, ...@@ -215,10 +212,9 @@ bool _rtl92ce_phy_config_bb_with_headerfile(struct ieee80211_hw *hw,
phy_regarray_table[i + 1]); phy_regarray_table[i + 1]);
udelay(1); udelay(1);
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("The phy_regarray_table[0] is %x" "The phy_regarray_table[0] is %x Rtl819XPHY_REGArray[1] is %x\n",
" Rtl819XPHY_REGArray[1] is %x\n", phy_regarray_table[i],
phy_regarray_table[i], phy_regarray_table[i + 1]);
phy_regarray_table[i + 1]));
} }
} else if (configtype == BASEBAND_CONFIG_AGC_TAB) { } else if (configtype == BASEBAND_CONFIG_AGC_TAB) {
for (i = 0; i < agctab_arraylen; i = i + 2) { for (i = 0; i < agctab_arraylen; i = i + 2) {
...@@ -226,10 +222,9 @@ bool _rtl92ce_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, ...@@ -226,10 +222,9 @@ bool _rtl92ce_phy_config_bb_with_headerfile(struct ieee80211_hw *hw,
agctab_array_table[i + 1]); agctab_array_table[i + 1]);
udelay(1); udelay(1);
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("The agctab_array_table[0] is " "The agctab_array_table[0] is %x Rtl819XPHY_REGArray[1] is %x\n",
"%x Rtl819XPHY_REGArray[1] is %x\n", agctab_array_table[i],
agctab_array_table[i], agctab_array_table[i + 1]);
agctab_array_table[i + 1]));
} }
} }
return true; return true;
...@@ -269,7 +264,7 @@ bool _rtl92ce_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, ...@@ -269,7 +264,7 @@ bool _rtl92ce_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw,
} else { } else {
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
("configtype != BaseBand_Config_PHY_REG\n")); "configtype != BaseBand_Config_PHY_REG\n");
} }
return true; return true;
} }
...@@ -291,20 +286,20 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, ...@@ -291,20 +286,20 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
radiob_arraylen = RADIOB_2TARRAYLENGTH; radiob_arraylen = RADIOB_2TARRAYLENGTH;
radiob_array_table = RTL8192CE_RADIOB_2TARRAY; radiob_array_table = RTL8192CE_RADIOB_2TARRAY;
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio_A:RTL8192CERADIOA_2TARRAY\n")); "Radio_A:RTL8192CERADIOA_2TARRAY\n");
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio_B:RTL8192CE_RADIOB_2TARRAY\n")); "Radio_B:RTL8192CE_RADIOB_2TARRAY\n");
} else { } else {
radioa_arraylen = RADIOA_1TARRAYLENGTH; radioa_arraylen = RADIOA_1TARRAYLENGTH;
radioa_array_table = RTL8192CE_RADIOA_1TARRAY; radioa_array_table = RTL8192CE_RADIOA_1TARRAY;
radiob_arraylen = RADIOB_1TARRAYLENGTH; radiob_arraylen = RADIOB_1TARRAYLENGTH;
radiob_array_table = RTL8192CE_RADIOB_1TARRAY; radiob_array_table = RTL8192CE_RADIOB_1TARRAY;
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio_A:RTL8192CE_RADIOA_1TARRAY\n")); "Radio_A:RTL8192CE_RADIOA_1TARRAY\n");
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio_B:RTL8192CE_RADIOB_1TARRAY\n")); "Radio_B:RTL8192CE_RADIOB_1TARRAY\n");
} }
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("Radio No %x\n", rfpath)); RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Radio No %x\n", rfpath);
switch (rfpath) { switch (rfpath) {
case RF90_PATH_A: case RF90_PATH_A:
for (i = 0; i < radioa_arraylen; i = i + 2) { for (i = 0; i < radioa_arraylen; i = i + 2) {
...@@ -352,11 +347,11 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, ...@@ -352,11 +347,11 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
break; break;
case RF90_PATH_C: case RF90_PATH_C:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
case RF90_PATH_D: case RF90_PATH_D:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
return true; return true;
...@@ -371,10 +366,9 @@ void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -371,10 +366,9 @@ void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
u8 reg_bw_opmode; u8 reg_bw_opmode;
u8 reg_prsr_rsc; u8 reg_prsr_rsc;
RT_TRACE(rtlpriv, COMP_SCAN, DBG_TRACE, RT_TRACE(rtlpriv, COMP_SCAN, DBG_TRACE, "Switch to %s bandwidth\n",
("Switch to %s bandwidth\n", rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20 ?
rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20 ? "20MHz" : "40MHz");
"20MHz" : "40MHz"));
if (is_hal_stop(rtlhal)) { if (is_hal_stop(rtlhal)) {
rtlphy->set_bwmode_inprogress = false; rtlphy->set_bwmode_inprogress = false;
...@@ -398,7 +392,7 @@ void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -398,7 +392,7 @@ void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("unknown bandwidth: %#X\n", rtlphy->current_chan_bw)); "unknown bandwidth: %#X\n", rtlphy->current_chan_bw);
break; break;
} }
...@@ -423,12 +417,12 @@ void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw) ...@@ -423,12 +417,12 @@ void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("unknown bandwidth: %#X\n", rtlphy->current_chan_bw)); "unknown bandwidth: %#X\n", rtlphy->current_chan_bw);
break; break;
} }
rtl92ce_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); rtl92ce_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw);
rtlphy->set_bwmode_inprogress = false; rtlphy->set_bwmode_inprogress = false;
RT_TRACE(rtlpriv, COMP_SCAN, DBG_TRACE, ("<==\n")); RT_TRACE(rtlpriv, COMP_SCAN, DBG_TRACE, "<==\n");
} }
void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t) void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t)
...@@ -499,7 +493,7 @@ static void _rtl92ce_phy_set_rf_sleep(struct ieee80211_hw *hw) ...@@ -499,7 +493,7 @@ static void _rtl92ce_phy_set_rf_sleep(struct ieee80211_hw *hw)
rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE3); rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE3);
rtl_write_byte(rtlpriv, REG_TXPAUSE, 0x00); rtl_write_byte(rtlpriv, REG_TXPAUSE, 0x00);
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE,
("Switch RF timeout !!!.\n")); "Switch RF timeout !!!\n");
return; return;
} }
rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE2); rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE2);
...@@ -526,7 +520,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -526,7 +520,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
do { do {
InitializeCount++; InitializeCount++;
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("IPS Set eRf nic enable\n")); "IPS Set eRf nic enable\n");
rtstatus = rtl_ps_enable_nic(hw); rtstatus = rtl_ps_enable_nic(hw);
} while ((rtstatus != true) } while ((rtstatus != true)
&& (InitializeCount < 10)); && (InitializeCount < 10));
...@@ -534,10 +528,10 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -534,10 +528,10 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
RT_RF_OFF_LEVL_HALT_NIC); RT_RF_OFF_LEVL_HALT_NIC);
} else { } else {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("Set ERFON sleeped:%d ms\n", "Set ERFON sleeped:%d ms\n",
jiffies_to_msecs(jiffies - jiffies_to_msecs(jiffies -
ppsc-> ppsc->
last_sleep_jiffies))); last_sleep_jiffies));
ppsc->last_awake_jiffies = jiffies; ppsc->last_awake_jiffies = jiffies;
rtl92ce_phy_set_rf_on(hw); rtl92ce_phy_set_rf_on(hw);
} }
...@@ -553,7 +547,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -553,7 +547,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
case ERFOFF:{ case ERFOFF:{
if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_HALT_NIC) { if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_HALT_NIC) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("IPS Set eRf nic disable\n")); "IPS Set eRf nic disable\n");
rtl_ps_disable_nic(hw); rtl_ps_disable_nic(hw);
RT_SET_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); RT_SET_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC);
} else { } else {
...@@ -578,35 +572,33 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -578,35 +572,33 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
continue; continue;
} else { } else {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("eRf Off/Sleep: %d times " "eRf Off/Sleep: %d times TcbBusyQueue[%d] =%d before doze!\n",
"TcbBusyQueue[%d] =%d before " i + 1, queue_id,
"doze!\n", (i + 1), queue_id, skb_queue_len(&ring->queue));
skb_queue_len(&ring->queue)));
udelay(10); udelay(10);
i++; i++;
} }
if (i >= MAX_DOZE_WAITING_TIMES_9x) { if (i >= MAX_DOZE_WAITING_TIMES_9x) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("\n ERFSLEEP: %d times " "ERFSLEEP: %d times TcbBusyQueue[%d] = %d !\n",
"TcbBusyQueue[%d] = %d !\n", MAX_DOZE_WAITING_TIMES_9x,
MAX_DOZE_WAITING_TIMES_9x, queue_id,
queue_id, skb_queue_len(&ring->queue));
skb_queue_len(&ring->queue)));
break; break;
} }
} }
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("Set ERFSLEEP awaked:%d ms\n", "Set ERFSLEEP awaked:%d ms\n",
jiffies_to_msecs(jiffies - jiffies_to_msecs(jiffies -
ppsc->last_awake_jiffies))); ppsc->last_awake_jiffies));
ppsc->last_sleep_jiffies = jiffies; ppsc->last_sleep_jiffies = jiffies;
_rtl92ce_phy_set_rf_sleep(hw); _rtl92ce_phy_set_rf_sleep(hw);
break; break;
} }
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
bresult = false; bresult = false;
break; break;
} }
......
...@@ -56,7 +56,7 @@ void rtl92ce_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -56,7 +56,7 @@ void rtl92ce_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("unknown bandwidth: %#X\n", bandwidth)); "unknown bandwidth: %#X\n", bandwidth);
break; break;
} }
} }
...@@ -512,12 +512,12 @@ static bool _rtl92ce_phy_rf6052_config_parafile(struct ieee80211_hw *hw) ...@@ -512,12 +512,12 @@ static bool _rtl92ce_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
if (rtstatus != true) { if (rtstatus != true) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio[%d] Fail!!", rfpath)); "Radio[%d] Fail!!\n", rfpath);
return false; return false;
} }
} }
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("<---\n")); RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
return rtstatus; return rtstatus;
} }
...@@ -159,7 +159,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) ...@@ -159,7 +159,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->rtlhal.pfirmware = vzalloc(0x4000); rtlpriv->rtlhal.pfirmware = vzalloc(0x4000);
if (!rtlpriv->rtlhal.pfirmware) { if (!rtlpriv->rtlhal.pfirmware) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Can't alloc buffer for fw.\n")); "Can't alloc buffer for fw\n");
return 1; return 1;
} }
...@@ -174,12 +174,12 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) ...@@ -174,12 +174,12 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
err = request_firmware(&firmware, fw_name, rtlpriv->io.dev); err = request_firmware(&firmware, fw_name, rtlpriv->io.dev);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Failed to request firmware!\n")); "Failed to request firmware!\n");
return 1; return 1;
} }
if (firmware->size > 0x4000) { if (firmware->size > 0x4000) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Firmware is too big!\n")); "Firmware is too big!\n");
release_firmware(firmware); release_firmware(firmware);
return 1; return 1;
} }
......
...@@ -725,7 +725,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -725,7 +725,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
if (ieee80211_is_data_qos(fc)) { if (ieee80211_is_data_qos(fc)) {
if (mac->rdg_en) { if (mac->rdg_en) {
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
("Enable RDG function.\n")); "Enable RDG function\n");
SET_TX_DESC_RDG_ENABLE(pdesc, 1); SET_TX_DESC_RDG_ENABLE(pdesc, 1);
SET_TX_DESC_HTC(pdesc, 1); SET_TX_DESC_HTC(pdesc, 1);
} }
...@@ -763,7 +763,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -763,7 +763,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
SET_TX_DESC_BMC(pdesc, 1); SET_TX_DESC_BMC(pdesc, 1);
} }
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, ("\n")); RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, "\n");
} }
void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw,
......
...@@ -52,7 +52,7 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -52,7 +52,7 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw)
if ((mac->link_state < MAC80211_LINKED) && if ((mac->link_state < MAC80211_LINKED) &&
(rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) { (rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE,
("Not connected to any\n")); "Not connected to any\n");
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
...@@ -65,28 +65,28 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -65,28 +65,28 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw)
undecorated_smoothed_pwdb = undecorated_smoothed_pwdb =
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("AP Client PWDB = 0x%lx\n", "AP Client PWDB = 0x%lx\n",
undecorated_smoothed_pwdb)); undecorated_smoothed_pwdb);
} else { } else {
undecorated_smoothed_pwdb = undecorated_smoothed_pwdb =
rtlpriv->dm.undecorated_smoothed_pwdb; rtlpriv->dm.undecorated_smoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("STA Default Port PWDB = 0x%lx\n", "STA Default Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb)); undecorated_smoothed_pwdb);
} }
} else { } else {
undecorated_smoothed_pwdb = undecorated_smoothed_pwdb =
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("AP Ext Port PWDB = 0x%lx\n", "AP Ext Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb)); undecorated_smoothed_pwdb);
} }
if (undecorated_smoothed_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL2) { if (undecorated_smoothed_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL2) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n")); "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n");
} else if ((undecorated_smoothed_pwdb < } else if ((undecorated_smoothed_pwdb <
(TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) && (TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) &&
(undecorated_smoothed_pwdb >= (undecorated_smoothed_pwdb >=
...@@ -94,18 +94,18 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -94,18 +94,18 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw)
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n")); "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n");
} else if (undecorated_smoothed_pwdb < } else if (undecorated_smoothed_pwdb <
(TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) { (TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("TXHIGHPWRLEVEL_NORMAL\n")); "TXHIGHPWRLEVEL_NORMAL\n");
} }
if ((rtlpriv->dm.dynamic_txhighpower_lvl != rtlpriv->dm.last_dtp_lvl)) { if ((rtlpriv->dm.dynamic_txhighpower_lvl != rtlpriv->dm.last_dtp_lvl)) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
("PHY_SetTxPowerLevel8192S() Channel = %d\n", "PHY_SetTxPowerLevel8192S() Channel = %d\n",
rtlphy->current_channel)); rtlphy->current_channel);
rtl92c_phy_set_txpower_level(hw, rtlphy->current_channel); rtl92c_phy_set_txpower_level(hw, rtlphy->current_channel);
} }
......
This diff is collapsed.
...@@ -47,8 +47,8 @@ void rtl92cu_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -47,8 +47,8 @@ void rtl92cu_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
u8 ledcfg; u8 ledcfg;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n",
("LedAddr:%X ledpin=%d\n", REG_LEDCFG2, pled->ledpin)); REG_LEDCFG2, pled->ledpin);
ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2); ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2);
switch (pled->ledpin) { switch (pled->ledpin) {
case LED_PIN_GPIO0: case LED_PIN_GPIO0:
...@@ -62,7 +62,7 @@ void rtl92cu_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -62,7 +62,7 @@ void rtl92cu_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
pled->ledon = true; pled->ledon = true;
...@@ -74,8 +74,8 @@ void rtl92cu_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -74,8 +74,8 @@ void rtl92cu_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
struct rtl_usb_priv *usbpriv = rtl_usbpriv(hw); struct rtl_usb_priv *usbpriv = rtl_usbpriv(hw);
u8 ledcfg; u8 ledcfg;
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n",
("LedAddr:%X ledpin=%d\n", REG_LEDCFG2, pled->ledpin)); REG_LEDCFG2, pled->ledpin);
ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2); ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2);
switch (pled->ledpin) { switch (pled->ledpin) {
case LED_PIN_GPIO0: case LED_PIN_GPIO0:
...@@ -95,7 +95,7 @@ void rtl92cu_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -95,7 +95,7 @@ void rtl92cu_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
pled->ledon = false; pled->ledon = false;
...@@ -136,7 +136,6 @@ void rtl92cu_led_control(struct ieee80211_hw *hw, ...@@ -136,7 +136,6 @@ void rtl92cu_led_control(struct ieee80211_hw *hw,
ledaction == LED_CTL_POWER_ON)) { ledaction == LED_CTL_POWER_ON)) {
return; return;
} }
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, ("ledaction %d,\n", RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "ledaction %d\n", ledaction);
ledaction));
_rtl92cu_sw_led_control(hw, ledaction); _rtl92cu_sw_led_control(hw, ledaction);
} }
...@@ -88,67 +88,59 @@ void rtl92c_read_chip_version(struct ieee80211_hw *hw) ...@@ -88,67 +88,59 @@ void rtl92c_read_chip_version(struct ieee80211_hw *hw)
switch (rtlhal->version) { switch (rtlhal->version) {
case VERSION_NORMAL_TSMC_CHIP_92C_1T2R: case VERSION_NORMAL_TSMC_CHIP_92C_1T2R:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_B_CHIP_92C.\n")); "Chip Version ID: VERSION_B_CHIP_92C\n");
break; break;
case VERSION_NORMAL_TSMC_CHIP_92C: case VERSION_NORMAL_TSMC_CHIP_92C:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMAL_TSMC_CHIP_92C.\n")); "Chip Version ID: VERSION_NORMAL_TSMC_CHIP_92C\n");
break; break;
case VERSION_NORMAL_TSMC_CHIP_88C: case VERSION_NORMAL_TSMC_CHIP_88C:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMAL_TSMC_CHIP_88C.\n")); "Chip Version ID: VERSION_NORMAL_TSMC_CHIP_88C\n");
break; break;
case VERSION_NORMAL_UMC_CHIP_92C_1T2R_A_CUT: case VERSION_NORMAL_UMC_CHIP_92C_1T2R_A_CUT:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMAL_UMC_CHIP_i" "Chip Version ID: VERSION_NORMAL_UMC_CHIP_i92C_1T2R_A_CUT\n");
"92C_1T2R_A_CUT.\n"));
break; break;
case VERSION_NORMAL_UMC_CHIP_92C_A_CUT: case VERSION_NORMAL_UMC_CHIP_92C_A_CUT:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMAL_UMC_CHIP_" "Chip Version ID: VERSION_NORMAL_UMC_CHIP_92C_A_CUT\n");
"92C_A_CUT.\n"));
break; break;
case VERSION_NORMAL_UMC_CHIP_88C_A_CUT: case VERSION_NORMAL_UMC_CHIP_88C_A_CUT:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMAL_UMC_CHIP" "Chip Version ID: VERSION_NORMAL_UMC_CHIP_88C_A_CUT\n");
"_88C_A_CUT.\n"));
break; break;
case VERSION_NORMAL_UMC_CHIP_92C_1T2R_B_CUT: case VERSION_NORMAL_UMC_CHIP_92C_1T2R_B_CUT:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMAL_UMC_CHIP" "Chip Version ID: VERSION_NORMAL_UMC_CHIP_92C_1T2R_B_CUT\n");
"_92C_1T2R_B_CUT.\n"));
break; break;
case VERSION_NORMAL_UMC_CHIP_92C_B_CUT: case VERSION_NORMAL_UMC_CHIP_92C_B_CUT:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMAL_UMC_CHIP" "Chip Version ID: VERSION_NORMAL_UMC_CHIP_92C_B_CUT\n");
"_92C_B_CUT.\n"));
break; break;
case VERSION_NORMAL_UMC_CHIP_88C_B_CUT: case VERSION_NORMAL_UMC_CHIP_88C_B_CUT:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMAL_UMC_CHIP" "Chip Version ID: VERSION_NORMAL_UMC_CHIP_88C_B_CUT\n");
"_88C_B_CUT.\n"));
break; break;
case VERSION_NORMA_UMC_CHIP_8723_1T1R_A_CUT: case VERSION_NORMA_UMC_CHIP_8723_1T1R_A_CUT:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMA_UMC_CHIP" "Chip Version ID: VERSION_NORMA_UMC_CHIP_8723_1T1R_A_CUT\n");
"_8723_1T1R_A_CUT.\n"));
break; break;
case VERSION_NORMA_UMC_CHIP_8723_1T1R_B_CUT: case VERSION_NORMA_UMC_CHIP_8723_1T1R_B_CUT:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_NORMA_UMC_CHIP" "Chip Version ID: VERSION_NORMA_UMC_CHIP_8723_1T1R_B_CUT\n");
"_8723_1T1R_B_CUT.\n"));
break; break;
case VERSION_TEST_CHIP_92C: case VERSION_TEST_CHIP_92C:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_TEST_CHIP_92C.\n")); "Chip Version ID: VERSION_TEST_CHIP_92C\n");
break; break;
case VERSION_TEST_CHIP_88C: case VERSION_TEST_CHIP_88C:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: VERSION_TEST_CHIP_88C.\n")); "Chip Version ID: VERSION_TEST_CHIP_88C\n");
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Chip Version ID: ???????????????.\n")); "Chip Version ID: ???????????????\n");
break; break;
} }
if (IS_92C_SERIAL(rtlhal->version)) if (IS_92C_SERIAL(rtlhal->version))
...@@ -157,15 +149,15 @@ void rtl92c_read_chip_version(struct ieee80211_hw *hw) ...@@ -157,15 +149,15 @@ void rtl92c_read_chip_version(struct ieee80211_hw *hw)
else else
rtlphy->rf_type = RF_1T1R; rtlphy->rf_type = RF_1T1R;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
("Chip RF Type: %s\n", (rtlphy->rf_type == RF_2T2R) ? "Chip RF Type: %s\n",
"RF_2T2R" : "RF_1T1R")); rtlphy->rf_type == RF_2T2R ? "RF_2T2R" : "RF_1T1R");
if (get_rf_type(rtlphy) == RF_1T1R) if (get_rf_type(rtlphy) == RF_1T1R)
rtlpriv->dm.rfpath_rxenable[0] = true; rtlpriv->dm.rfpath_rxenable[0] = true;
else else
rtlpriv->dm.rfpath_rxenable[0] = rtlpriv->dm.rfpath_rxenable[0] =
rtlpriv->dm.rfpath_rxenable[1] = true; rtlpriv->dm.rfpath_rxenable[1] = true;
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("VersionID = 0x%4x\n", RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "VersionID = 0x%4x\n",
rtlhal->version)); rtlhal->version);
} }
/** /**
...@@ -192,9 +184,8 @@ bool rtl92c_llt_write(struct ieee80211_hw *hw, u32 address, u32 data) ...@@ -192,9 +184,8 @@ bool rtl92c_llt_write(struct ieee80211_hw *hw, u32 address, u32 data)
break; break;
if (count > POLLING_LLT_THRESHOLD) { if (count > POLLING_LLT_THRESHOLD) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Failed to polling write LLT done at" "Failed to polling write LLT done at address %d! _LLT_OP_VALUE(%x)\n",
" address %d! _LLT_OP_VALUE(%x)\n", address, _LLT_OP_VALUE(value));
address, _LLT_OP_VALUE(value)));
status = false; status = false;
break; break;
} }
...@@ -272,7 +263,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -272,7 +263,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
u8 cam_offset = 0; u8 cam_offset = 0;
u8 clear_number = 5; u8 clear_number = 5;
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, ("clear_all\n")); RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "clear_all\n");
for (idx = 0; idx < clear_number; idx++) { for (idx = 0; idx < clear_number; idx++) {
rtl_cam_mark_invalid(hw, cam_offset + idx); rtl_cam_mark_invalid(hw, cam_offset + idx);
rtl_cam_empty_entry(hw, cam_offset + idx); rtl_cam_empty_entry(hw, cam_offset + idx);
...@@ -298,7 +289,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -298,7 +289,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("iillegal switch case\n")); "illegal switch case\n");
enc_algo = CAM_TKIP; enc_algo = CAM_TKIP;
break; break;
} }
...@@ -317,18 +308,18 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -317,18 +308,18 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
} }
if (rtlpriv->sec.key_len[key_index] == 0) { if (rtlpriv->sec.key_len[key_index] == 0) {
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("delete one entry\n")); "delete one entry\n");
rtl_cam_delete_one_entry(hw, p_macaddr, entry_id); rtl_cam_delete_one_entry(hw, p_macaddr, entry_id);
} else { } else {
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
("The insert KEY length is %d\n", "The insert KEY length is %d\n",
rtlpriv->sec.key_len[PAIRWISE_KEYIDX])); rtlpriv->sec.key_len[PAIRWISE_KEYIDX]);
RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD,
("The insert KEY is %x %x\n", "The insert KEY is %x %x\n",
rtlpriv->sec.key_buf[0][0], rtlpriv->sec.key_buf[0][0],
rtlpriv->sec.key_buf[0][1])); rtlpriv->sec.key_buf[0][1]);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("add one entry\n")); "add one entry\n");
if (is_pairwise) { if (is_pairwise) {
RT_PRINT_DATA(rtlpriv, COMP_SEC, DBG_LOUD, RT_PRINT_DATA(rtlpriv, COMP_SEC, DBG_LOUD,
"Pairwise Key content", "Pairwise Key content",
...@@ -336,7 +327,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -336,7 +327,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
rtlpriv->sec. rtlpriv->sec.
key_len[PAIRWISE_KEYIDX]); key_len[PAIRWISE_KEYIDX]);
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("set Pairwiase key\n")); "set Pairwise key\n");
rtl_cam_add_one_entry(hw, macaddr, key_index, rtl_cam_add_one_entry(hw, macaddr, key_index,
entry_id, enc_algo, entry_id, enc_algo,
...@@ -345,7 +336,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, ...@@ -345,7 +336,7 @@ void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
key_buf[key_index]); key_buf[key_index]);
} else { } else {
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("set group key\n")); "set group key\n");
if (mac->opmode == NL80211_IFTYPE_ADHOC) { if (mac->opmode == NL80211_IFTYPE_ADHOC) {
rtl_cam_add_one_entry(hw, rtl_cam_add_one_entry(hw,
rtlefuse->dev_addr, rtlefuse->dev_addr,
...@@ -421,8 +412,8 @@ void rtl92c_set_qos(struct ieee80211_hw *hw, int aci) ...@@ -421,8 +412,8 @@ void rtl92c_set_qos(struct ieee80211_hw *hw, int aci)
AC_PARAM_ECW_MAX_OFFSET; AC_PARAM_ECW_MAX_OFFSET;
u4b_ac_param |= (u32) le16_to_cpu(mac->ac[aci].tx_op) << u4b_ac_param |= (u32) le16_to_cpu(mac->ac[aci].tx_op) <<
AC_PARAM_TXOP_OFFSET; AC_PARAM_TXOP_OFFSET;
RT_TRACE(rtlpriv, COMP_QOS, DBG_LOUD, RT_TRACE(rtlpriv, COMP_QOS, DBG_LOUD, "queue:%x, ac_param:%x\n",
("queue:%x, ac_param:%x\n", aci, u4b_ac_param)); aci, u4b_ac_param);
switch (aci) { switch (aci) {
case AC1_BK: case AC1_BK:
rtl_write_dword(rtlpriv, REG_EDCA_BK_PARAM, u4b_ac_param); rtl_write_dword(rtlpriv, REG_EDCA_BK_PARAM, u4b_ac_param);
...@@ -453,14 +444,14 @@ void rtl92c_set_mac_addr(struct ieee80211_hw *hw, const u8 *addr) ...@@ -453,14 +444,14 @@ void rtl92c_set_mac_addr(struct ieee80211_hw *hw, const u8 *addr)
for (i = 0 ; i < ETH_ALEN ; i++) for (i = 0 ; i < ETH_ALEN ; i++)
rtl_write_byte(rtlpriv, (REG_MACID + i), *(addr+i)); rtl_write_byte(rtlpriv, (REG_MACID + i), *(addr+i));
RT_TRACE(rtlpriv, COMP_CMD, DBG_DMESG, ("MAC Address: %02X-%02X-%02X-" RT_TRACE(rtlpriv, COMP_CMD, DBG_DMESG,
"%02X-%02X-%02X\n", "MAC Address: %02X-%02X-%02X-%02X-%02X-%02X\n",
rtl_read_byte(rtlpriv, REG_MACID), rtl_read_byte(rtlpriv, REG_MACID),
rtl_read_byte(rtlpriv, REG_MACID+1), rtl_read_byte(rtlpriv, REG_MACID+1),
rtl_read_byte(rtlpriv, REG_MACID+2), rtl_read_byte(rtlpriv, REG_MACID+2),
rtl_read_byte(rtlpriv, REG_MACID+3), rtl_read_byte(rtlpriv, REG_MACID+3),
rtl_read_byte(rtlpriv, REG_MACID+4), rtl_read_byte(rtlpriv, REG_MACID+4),
rtl_read_byte(rtlpriv, REG_MACID+5))); rtl_read_byte(rtlpriv, REG_MACID+5));
} }
void rtl92c_init_driver_info_size(struct ieee80211_hw *hw, u8 size) void rtl92c_init_driver_info_size(struct ieee80211_hw *hw, u8 size)
...@@ -478,26 +469,26 @@ int rtl92c_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type) ...@@ -478,26 +469,26 @@ int rtl92c_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type)
case NL80211_IFTYPE_UNSPECIFIED: case NL80211_IFTYPE_UNSPECIFIED:
value = NT_NO_LINK; value = NT_NO_LINK;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("Set Network type to NO LINK!\n")); "Set Network type to NO LINK!\n");
break; break;
case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_ADHOC:
value = NT_LINK_AD_HOC; value = NT_LINK_AD_HOC;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("Set Network type to Ad Hoc!\n")); "Set Network type to Ad Hoc!\n");
break; break;
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
value = NT_LINK_AP; value = NT_LINK_AP;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("Set Network type to STA!\n")); "Set Network type to STA!\n");
break; break;
case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP:
value = NT_AS_AP; value = NT_AS_AP;
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("Set Network type to AP!\n")); "Set Network type to AP!\n");
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("Network type %d not support!\n", type)); "Network type %d not supported!\n", type);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
rtl_write_byte(rtlpriv, (REG_CR + 2), value); rtl_write_byte(rtlpriv, (REG_CR + 2), value);
......
...@@ -56,7 +56,7 @@ void rtl92cu_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -56,7 +56,7 @@ void rtl92cu_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("unknown bandwidth: %#X\n", bandwidth)); "unknown bandwidth: %#X\n", bandwidth);
break; break;
} }
} }
...@@ -482,11 +482,11 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw) ...@@ -482,11 +482,11 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
} }
if (rtstatus != true) { if (rtstatus != true) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio[%d] Fail!!", rfpath)); "Radio[%d] Fail!!", rfpath);
goto phy_rf_cfg_fail; goto phy_rf_cfg_fail;
} }
} }
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("<---\n")); RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
return rtstatus; return rtstatus;
phy_rf_cfg_fail: phy_rf_cfg_fail:
return rtstatus; return rtstatus;
......
...@@ -65,7 +65,7 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) ...@@ -65,7 +65,7 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->rtlhal.pfirmware = vmalloc(0x4000); rtlpriv->rtlhal.pfirmware = vmalloc(0x4000);
if (!rtlpriv->rtlhal.pfirmware) { if (!rtlpriv->rtlhal.pfirmware) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Can't alloc buffer for fw.\n")); "Can't alloc buffer for fw\n");
return 1; return 1;
} }
/* request fw */ /* request fw */
...@@ -73,12 +73,12 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) ...@@ -73,12 +73,12 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->io.dev); rtlpriv->io.dev);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Failed to request firmware!\n")); "Failed to request firmware!\n");
return 1; return 1;
} }
if (firmware->size > 0x4000) { if (firmware->size > 0x4000) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Firmware is too big!\n")); "Firmware is too big!\n");
release_firmware(firmware); release_firmware(firmware);
return 1; return 1;
} }
......
...@@ -108,7 +108,7 @@ static void _TwoOutEpMapping(struct ieee80211_hw *hw, bool bIsChipB, ...@@ -108,7 +108,7 @@ static void _TwoOutEpMapping(struct ieee80211_hw *hw, bool bIsChipB,
if (bwificfg) { /* for WMM */ if (bwificfg) { /* for WMM */
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("USB Chip-B & WMM Setting.....\n")); "USB Chip-B & WMM Setting.....\n");
ep_map->ep_mapping[RTL_TXQ_BE] = 2; ep_map->ep_mapping[RTL_TXQ_BE] = 2;
ep_map->ep_mapping[RTL_TXQ_BK] = 3; ep_map->ep_mapping[RTL_TXQ_BK] = 3;
ep_map->ep_mapping[RTL_TXQ_VI] = 3; ep_map->ep_mapping[RTL_TXQ_VI] = 3;
...@@ -118,7 +118,7 @@ static void _TwoOutEpMapping(struct ieee80211_hw *hw, bool bIsChipB, ...@@ -118,7 +118,7 @@ static void _TwoOutEpMapping(struct ieee80211_hw *hw, bool bIsChipB,
ep_map->ep_mapping[RTL_TXQ_HI] = 2; ep_map->ep_mapping[RTL_TXQ_HI] = 2;
} else { /* typical setting */ } else { /* typical setting */
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("USB typical Setting.....\n")); "USB typical Setting.....\n");
ep_map->ep_mapping[RTL_TXQ_BE] = 3; ep_map->ep_mapping[RTL_TXQ_BE] = 3;
ep_map->ep_mapping[RTL_TXQ_BK] = 3; ep_map->ep_mapping[RTL_TXQ_BK] = 3;
ep_map->ep_mapping[RTL_TXQ_VI] = 2; ep_map->ep_mapping[RTL_TXQ_VI] = 2;
...@@ -135,7 +135,7 @@ static void _ThreeOutEpMapping(struct ieee80211_hw *hw, bool bwificfg, ...@@ -135,7 +135,7 @@ static void _ThreeOutEpMapping(struct ieee80211_hw *hw, bool bwificfg,
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
if (bwificfg) { /* for WMM */ if (bwificfg) { /* for WMM */
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("USB 3EP Setting for WMM.....\n")); "USB 3EP Setting for WMM.....\n");
ep_map->ep_mapping[RTL_TXQ_BE] = 5; ep_map->ep_mapping[RTL_TXQ_BE] = 5;
ep_map->ep_mapping[RTL_TXQ_BK] = 3; ep_map->ep_mapping[RTL_TXQ_BK] = 3;
ep_map->ep_mapping[RTL_TXQ_VI] = 3; ep_map->ep_mapping[RTL_TXQ_VI] = 3;
...@@ -145,7 +145,7 @@ static void _ThreeOutEpMapping(struct ieee80211_hw *hw, bool bwificfg, ...@@ -145,7 +145,7 @@ static void _ThreeOutEpMapping(struct ieee80211_hw *hw, bool bwificfg,
ep_map->ep_mapping[RTL_TXQ_HI] = 2; ep_map->ep_mapping[RTL_TXQ_HI] = 2;
} else { /* typical setting */ } else { /* typical setting */
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("USB 3EP Setting for typical.....\n")); "USB 3EP Setting for typical.....\n");
ep_map->ep_mapping[RTL_TXQ_BE] = 5; ep_map->ep_mapping[RTL_TXQ_BE] = 5;
ep_map->ep_mapping[RTL_TXQ_BK] = 5; ep_map->ep_mapping[RTL_TXQ_BK] = 5;
ep_map->ep_mapping[RTL_TXQ_VI] = 3; ep_map->ep_mapping[RTL_TXQ_VI] = 3;
...@@ -270,23 +270,23 @@ static enum rtl_desc_qsel _rtl8192cu_mq_to_descq(struct ieee80211_hw *hw, ...@@ -270,23 +270,23 @@ static enum rtl_desc_qsel _rtl8192cu_mq_to_descq(struct ieee80211_hw *hw,
case 0: /* VO */ case 0: /* VO */
qsel = QSLT_VO; qsel = QSLT_VO;
RT_TRACE(rtlpriv, COMP_USB, DBG_DMESG, RT_TRACE(rtlpriv, COMP_USB, DBG_DMESG,
("VO queue, set qsel = 0x%x\n", QSLT_VO)); "VO queue, set qsel = 0x%x\n", QSLT_VO);
break; break;
case 1: /* VI */ case 1: /* VI */
qsel = QSLT_VI; qsel = QSLT_VI;
RT_TRACE(rtlpriv, COMP_USB, DBG_DMESG, RT_TRACE(rtlpriv, COMP_USB, DBG_DMESG,
("VI queue, set qsel = 0x%x\n", QSLT_VI)); "VI queue, set qsel = 0x%x\n", QSLT_VI);
break; break;
case 3: /* BK */ case 3: /* BK */
qsel = QSLT_BK; qsel = QSLT_BK;
RT_TRACE(rtlpriv, COMP_USB, DBG_DMESG, RT_TRACE(rtlpriv, COMP_USB, DBG_DMESG,
("BK queue, set qsel = 0x%x\n", QSLT_BK)); "BK queue, set qsel = 0x%x\n", QSLT_BK);
break; break;
case 2: /* BE */ case 2: /* BE */
default: default:
qsel = QSLT_BE; qsel = QSLT_BE;
RT_TRACE(rtlpriv, COMP_USB, DBG_DMESG, RT_TRACE(rtlpriv, COMP_USB, DBG_DMESG,
("BE queue, set qsel = 0x%x\n", QSLT_BE)); "BE queue, set qsel = 0x%x\n", QSLT_BE);
break; break;
} }
out: out:
...@@ -422,17 +422,17 @@ static void _rtl_rx_process(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -422,17 +422,17 @@ static void _rtl_rx_process(struct ieee80211_hw *hw, struct sk_buff *skb)
bv = ieee80211_is_probe_resp(fc); bv = ieee80211_is_probe_resp(fc);
if (bv) if (bv)
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("Got probe response frame.\n")); "Got probe response frame\n");
if (ieee80211_is_beacon(fc)) if (ieee80211_is_beacon(fc))
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "Got beacon frame\n");
("Got beacon frame.\n"));
if (ieee80211_is_data(fc)) if (ieee80211_is_data(fc))
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("Got data frame.\n")); RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "Got data frame\n");
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("Fram: fc = 0x%X addr1 = 0x%02X:0x%02X:0x%02X:0x%02X:0x%02X:" "Fram: fc = 0x%X addr1 = 0x%02X:0x%02X:0x%02X:0x%02X:0x%02X:0x%02X\n",
"0x%02X\n", fc, (u32)hdr->addr1[0], (u32)hdr->addr1[1], fc,
(u32)hdr->addr1[2], (u32)hdr->addr1[3], (u32)hdr->addr1[4], (u32)hdr->addr1[0], (u32)hdr->addr1[1],
(u32)hdr->addr1[5])); (u32)hdr->addr1[2], (u32)hdr->addr1[3],
(u32)hdr->addr1[4], (u32)hdr->addr1[5]);
memcpy(IEEE80211_SKB_RXCB(skb), rx_status, sizeof(*rx_status)); memcpy(IEEE80211_SKB_RXCB(skb), rx_status, sizeof(*rx_status));
ieee80211_rx_irqsafe(hw, skb); ieee80211_rx_irqsafe(hw, skb);
} }
...@@ -594,7 +594,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -594,7 +594,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
if (ieee80211_is_data_qos(fc)) { if (ieee80211_is_data_qos(fc)) {
if (mac->rdg_en) { if (mac->rdg_en) {
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
("Enable RDG function.\n")); "Enable RDG function\n");
SET_TX_DESC_RDG_ENABLE(txdesc, 1); SET_TX_DESC_RDG_ENABLE(txdesc, 1);
SET_TX_DESC_HTC(txdesc, 1); SET_TX_DESC_HTC(txdesc, 1);
} }
...@@ -620,7 +620,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -620,7 +620,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
SET_TX_DESC_BMC(txdesc, 1); SET_TX_DESC_BMC(txdesc, 1);
_rtl_fill_usb_tx_desc(txdesc); _rtl_fill_usb_tx_desc(txdesc);
_rtl_tx_desc_checksum(txdesc); _rtl_tx_desc_checksum(txdesc);
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, (" %s ==>\n", __func__)); RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, " %s ==>\n", __func__);
} }
void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc, void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -45,8 +45,8 @@ void rtl92de_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -45,8 +45,8 @@ void rtl92de_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
u8 ledcfg; u8 ledcfg;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n",
("LedAddr:%X ledpin=%d\n", REG_LEDCFG2, pled->ledpin)); REG_LEDCFG2, pled->ledpin);
switch (pled->ledpin) { switch (pled->ledpin) {
case LED_PIN_GPIO0: case LED_PIN_GPIO0:
...@@ -71,7 +71,7 @@ void rtl92de_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -71,7 +71,7 @@ void rtl92de_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
pled->ledon = true; pled->ledon = true;
...@@ -83,8 +83,8 @@ void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -83,8 +83,8 @@ void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
u8 ledcfg; u8 ledcfg;
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n",
("LedAddr:%X ledpin=%d\n", REG_LEDCFG2, pled->ledpin)); REG_LEDCFG2, pled->ledpin);
ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2); ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2);
...@@ -106,7 +106,7 @@ void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -106,7 +106,7 @@ void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("switch case not process\n")); "switch case not processed\n");
break; break;
} }
pled->ledon = false; pled->ledon = false;
...@@ -153,7 +153,7 @@ void rtl92de_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction) ...@@ -153,7 +153,7 @@ void rtl92de_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction)
ledaction == LED_CTL_POWER_ON)) { ledaction == LED_CTL_POWER_ON)) {
return; return;
} }
RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, ("ledaction %d,\n", ledaction)); RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "ledaction %d,\n", ledaction);
_rtl92ce_sw_led_control(hw, ledaction); _rtl92ce_sw_led_control(hw, ledaction);
} }
...@@ -50,8 +50,8 @@ void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -50,8 +50,8 @@ void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
BIT(11), 0x01); BIT(11), 0x01);
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD,
("20M RF 0x18 = 0x%x\n", "20M RF 0x18 = 0x%x\n",
rtlphy->rfreg_chnlval[rfpath])); rtlphy->rfreg_chnlval[rfpath]);
} }
break; break;
...@@ -62,13 +62,13 @@ void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -62,13 +62,13 @@ void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
rtl_set_rfreg(hw, rfpath, RF_CHNLBW, BIT(10) | BIT(11), rtl_set_rfreg(hw, rfpath, RF_CHNLBW, BIT(10) | BIT(11),
0x00); 0x00);
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD,
("40M RF 0x18 = 0x%x\n", "40M RF 0x18 = 0x%x\n",
rtlphy->rfreg_chnlval[rfpath])); rtlphy->rfreg_chnlval[rfpath]);
} }
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("unknown bandwidth: %#X\n", bandwidth)); "unknown bandwidth: %#X\n", bandwidth);
break; break;
} }
} }
...@@ -423,11 +423,11 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0) ...@@ -423,11 +423,11 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0)
rtlhal->during_mac0init_radiob = false; rtlhal->during_mac0init_radiob = false;
rtlhal->during_mac1init_radioa = false; rtlhal->during_mac1init_radioa = false;
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, ("===>\n")); RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "===>\n");
/* MAC0 Need PHY1 load radio_b.txt . Driver use DBI to write. */ /* MAC0 Need PHY1 load radio_b.txt . Driver use DBI to write. */
u1btmp = rtl_read_byte(rtlpriv, mac_reg); u1btmp = rtl_read_byte(rtlpriv, mac_reg);
if (!(u1btmp & mac_on_bit)) { if (!(u1btmp & mac_on_bit)) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("enable BB & RF\n")); RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "enable BB & RF\n");
/* Enable BB and RF power */ /* Enable BB and RF power */
rtl92de_write_dword_dbi(hw, REG_SYS_ISO_CTRL, rtl92de_write_dword_dbi(hw, REG_SYS_ISO_CTRL,
rtl92de_read_dword_dbi(hw, REG_SYS_ISO_CTRL, direct) | rtl92de_read_dword_dbi(hw, REG_SYS_ISO_CTRL, direct) |
...@@ -437,7 +437,7 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0) ...@@ -437,7 +437,7 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0)
* and radio_b.txt has been load. */ * and radio_b.txt has been load. */
bresult = false; bresult = false;
} }
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, ("<===\n")); RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "<===\n");
return bresult; return bresult;
} }
...@@ -453,17 +453,17 @@ void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0) ...@@ -453,17 +453,17 @@ void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0)
rtlhal->during_mac0init_radiob = false; rtlhal->during_mac0init_radiob = false;
rtlhal->during_mac1init_radioa = false; rtlhal->during_mac1init_radioa = false;
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, ("====>\n")); RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "====>\n");
/* check MAC0 enable or not again now, if /* check MAC0 enable or not again now, if
* enabled, not power down radio A. */ * enabled, not power down radio A. */
u1btmp = rtl_read_byte(rtlpriv, mac_reg); u1btmp = rtl_read_byte(rtlpriv, mac_reg);
if (!(u1btmp & mac_on_bit)) { if (!(u1btmp & mac_on_bit)) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("power down\n")); RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "power down\n");
/* power down RF radio A according to YuNan's advice. */ /* power down RF radio A according to YuNan's advice. */
rtl92de_write_dword_dbi(hw, RFPGA0_XA_LSSIPARAMETER, rtl92de_write_dword_dbi(hw, RFPGA0_XA_LSSIPARAMETER,
0x00000000, direct); 0x00000000, direct);
} }
RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, ("<====\n")); RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "<====\n");
} }
bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw) bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
...@@ -606,7 +606,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw) ...@@ -606,7 +606,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
} }
if (rtstatus != true) { if (rtstatus != true) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio[%d] Fail!!", rfpath)); "Radio[%d] Fail!!", rfpath);
goto phy_rf_cfg_fail; goto phy_rf_cfg_fail;
} }
...@@ -620,7 +620,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw) ...@@ -620,7 +620,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
rtl92d_phy_powerdown_anotherphy(hw, false); rtl92d_phy_powerdown_anotherphy(hw, false);
else if (need_pwrdown_radiob) else if (need_pwrdown_radiob)
rtl92d_phy_powerdown_anotherphy(hw, true); rtl92d_phy_powerdown_anotherphy(hw, true);
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("<---\n")); RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
return rtstatus; return rtstatus;
phy_rf_cfg_fail: phy_rf_cfg_fail:
......
...@@ -174,7 +174,7 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw) ...@@ -174,7 +174,7 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->rtlhal.pfirmware = vzalloc(0x8000); rtlpriv->rtlhal.pfirmware = vzalloc(0x8000);
if (!rtlpriv->rtlhal.pfirmware) { if (!rtlpriv->rtlhal.pfirmware) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Can't alloc buffer for fw.\n")); "Can't alloc buffer for fw\n");
return 1; return 1;
} }
...@@ -188,12 +188,12 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw) ...@@ -188,12 +188,12 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw)
rtlpriv->io.dev); rtlpriv->io.dev);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Failed to request firmware!\n")); "Failed to request firmware!\n");
return 1; return 1;
} }
if (firmware->size > 0x8000) { if (firmware->size > 0x8000) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Firmware is too big!\n")); "Firmware is too big!\n");
release_firmware(firmware); release_firmware(firmware);
return 1; return 1;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -756,7 +756,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -756,7 +756,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
/* DOWRD 8 */ /* DOWRD 8 */
SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping)); SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping));
RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, ("\n")); RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, "\n");
} }
void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
......
This diff is collapsed.
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