Commit cb418e57 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: rtl8192ee: Fix RT_TRACE #define and uses

RT_TRACE uses require unnecessary parentheses.

Fix the #define and remove the uses.

Neaten the RT_TRACE lines and multi-line argument wrapping.

dynamic debug can add KBUILD_MODNAME and __func__ so remove those
from the #define.

Use a single statement pr_debug instead of pr_debug and pr_cont
which doesn't support dynamic debug anyway.

Miscellaneous grammar and spelling fixes on the RT_TRACE uses.

Compile tested only.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 63d29d51
...@@ -206,7 +206,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, ...@@ -206,7 +206,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
*highest supported RX rate *highest supported RX rate
*/ */
if (rtlpriv->dm.supp_phymode_switch) { if (rtlpriv->dm.supp_phymode_switch) {
RT_TRACE(COMP_INIT, DBG_EMERG, ("Support phy mode switch\n")); RT_TRACE(COMP_INIT, DBG_EMERG, "Support phy mode switch\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;
...@@ -216,7 +216,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, ...@@ -216,7 +216,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
} else { } else {
if (get_rf_type(rtlphy) == RF_1T2R || if (get_rf_type(rtlphy) == RF_1T2R ||
get_rf_type(rtlphy) == RF_2T2R) { get_rf_type(rtlphy) == RF_2T2R) {
RT_TRACE(COMP_INIT, DBG_DMESG, ("1T2R or 2T2R\n")); RT_TRACE(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;
...@@ -224,7 +224,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, ...@@ -224,7 +224,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(COMP_INIT, DBG_DMESG, ("1T1R\n")); RT_TRACE(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;
...@@ -388,7 +388,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) ...@@ -388,7 +388,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband; hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
} else { } else {
RT_TRACE(COMP_INIT, DBG_EMERG, RT_TRACE(COMP_INIT, DBG_EMERG,
("Err BAND %d\n", rtlhal->current_bandtype)); "Err BAND %d\n", rtlhal->current_bandtype);
} }
} }
/* <5> set hw caps */ /* <5> set hw caps */
...@@ -556,7 +556,7 @@ int rtl92e_init_core(struct ieee80211_hw *hw) ...@@ -556,7 +556,7 @@ int rtl92e_init_core(struct ieee80211_hw *hw)
* mac80211 hw in _rtl_init_mac80211. * mac80211 hw in _rtl_init_mac80211.
*/ */
if (rtl92e_regd_init(hw, rtl92e_reg_notifier)) { if (rtl92e_regd_init(hw, rtl92e_reg_notifier)) {
RT_TRACE(COMP_ERR, DBG_EMERG, ("REGD init failed\n")); RT_TRACE(COMP_ERR, DBG_EMERG, "REGD init failed\n");
return 1; return 1;
} }
...@@ -952,7 +952,7 @@ bool rtl92e_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -952,7 +952,7 @@ bool rtl92e_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb)
rtlpriv->cfg->ops->check_switch_to_dmdp(hw); rtlpriv->cfg->ops->check_switch_to_dmdp(hw);
} }
if (ieee80211_is_auth(fc)) { if (ieee80211_is_auth(fc)) {
RT_TRACE(COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n")); RT_TRACE(COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n");
rtl92e_ips_nic_on(hw); rtl92e_ips_nic_on(hw);
mac->link_state = MAC80211_LINKING; mac->link_state = MAC80211_LINKING;
...@@ -987,8 +987,8 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -987,8 +987,8 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
return false; return false;
RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG, RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG,
("%s ACT_ADDBAREQ From:%pM\n", "%s ACT_ADDBAREQ From:%pM\n",
is_tx ? "Tx" : "Rx", hdr->addr2)); is_tx ? "Tx" : "Rx", hdr->addr2);
RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "req\n", RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "req\n",
skb->data, skb->len); skb->data, skb->len);
if (!is_tx) { if (!is_tx) {
...@@ -1004,7 +1004,7 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -1004,7 +1004,7 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
sta = rtl_find_sta(hw, hdr->addr3); sta = rtl_find_sta(hw, hdr->addr3);
if (sta == NULL) { if (sta == NULL) {
RT_TRACE((COMP_SEND | COMP_RECV), RT_TRACE((COMP_SEND | COMP_RECV),
DBG_TRACE, ("sta is NULL\n")); DBG_TRACE, "sta is NULL\n");
rcu_read_unlock(); rcu_read_unlock();
return true; return true;
} }
...@@ -1047,12 +1047,12 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) ...@@ -1047,12 +1047,12 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
break; break;
case ACT_ADDBARSP: case ACT_ADDBARSP:
RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG, RT_TRACE((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((COMP_SEND | COMP_RECV), DBG_DMESG, RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG,
("ACT_ADDBADEL From :%pM\n", hdr->addr2)); "ACT_ADDBADEL From :%pM\n", hdr->addr2);
break; break;
} }
break; break;
...@@ -1094,9 +1094,8 @@ u8 rtl92e_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -1094,9 +1094,8 @@ u8 rtl92e_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb,
* 68 : UDP BOOTP client * 68 : UDP BOOTP client
* 67 : UDP BOOTP server * 67 : UDP BOOTP server
*/ */
RT_TRACE((COMP_SEND | COMP_RECV), RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG,
DBG_DMESG, ("dhcp %s !!\n", "dhcp %s !!\n", is_tx ? "Tx" : "Rx");
(is_tx) ? "Tx" : "Rx"));
if (is_tx) { if (is_tx) {
rtlpriv->ra.is_special_data = true; rtlpriv->ra.is_special_data = true;
...@@ -1124,7 +1123,7 @@ u8 rtl92e_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -1124,7 +1123,7 @@ u8 rtl92e_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb,
return true; return true;
} else if (ETH_P_PAE == ether_type) { } else if (ETH_P_PAE == ether_type) {
RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG, RT_TRACE((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) {
rtlpriv->ra.is_special_data = true; rtlpriv->ra.is_special_data = true;
...@@ -1165,9 +1164,8 @@ int rtl92e_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -1165,9 +1164,8 @@ int rtl92e_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
return -ENXIO; return -ENXIO;
tid_data = &sta_entry->tids[tid]; tid_data = &sta_entry->tids[tid];
RT_TRACE(COMP_SEND, DBG_DMESG, RT_TRACE(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;
...@@ -1188,12 +1186,12 @@ int rtl92e_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -1188,12 +1186,12 @@ int rtl92e_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
/* Comparing an array to null is not useful */ /* Comparing an array to null is not useful */
/*if (!sta->addr) { /*if (!sta->addr) {
RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n")); RT_TRACE(COMP_ERR, DBG_EMERG, "ra = NULL\n");
return -EINVAL; return -EINVAL;
}*/ }*/
RT_TRACE(COMP_SEND, DBG_DMESG, RT_TRACE(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;
...@@ -1224,9 +1222,8 @@ int rtl92e_rx_agg_start(struct ieee80211_hw *hw, ...@@ -1224,9 +1222,8 @@ int rtl92e_rx_agg_start(struct ieee80211_hw *hw,
return -ENXIO; return -ENXIO;
tid_data = &sta_entry->tids[tid]; tid_data = &sta_entry->tids[tid];
RT_TRACE(COMP_RECV, DBG_DMESG, RT_TRACE(COMP_RECV, 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));
tid_data->agg.rx_agg_state = RTL_RX_AGG_START; tid_data->agg.rx_agg_state = RTL_RX_AGG_START;
return 0; return 0;
...@@ -1244,12 +1241,12 @@ int rtl92e_rx_agg_stop(struct ieee80211_hw *hw, ...@@ -1244,12 +1241,12 @@ int rtl92e_rx_agg_stop(struct ieee80211_hw *hw,
/* Comparing an array to null is not useful */ /* Comparing an array to null is not useful */
/*if (!sta->addr) { /*if (!sta->addr) {
RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n")); RT_TRACE(COMP_ERR, DBG_EMERG, "ra = NULL\n");
return -EINVAL; return -EINVAL;
}*/ }*/
RT_TRACE(COMP_SEND, DBG_DMESG, RT_TRACE(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;
...@@ -1273,12 +1270,12 @@ int rtl92e_tx_agg_oper(struct ieee80211_hw *hw, ...@@ -1273,12 +1270,12 @@ int rtl92e_tx_agg_oper(struct ieee80211_hw *hw,
/* Comparing an array to null is not useful */ /* Comparing an array to null is not useful */
/*if (!sta->addr) { /*if (!sta->addr) {
RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n")); RT_TRACE(COMP_ERR, DBG_EMERG, "ra = NULL\n");
return -EINVAL; return -EINVAL;
}*/ }*/
RT_TRACE(COMP_SEND, DBG_DMESG, RT_TRACE(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;
...@@ -1454,15 +1451,14 @@ void rtl92e_watchdog_wq_callback(void *data) ...@@ -1454,15 +1451,14 @@ void rtl92e_watchdog_wq_callback(void *data)
if ((rtlpriv->link_info.bcn_rx_inperiod + if ((rtlpriv->link_info.bcn_rx_inperiod +
rtlpriv->link_info.num_rx_inperiod) == 0) { rtlpriv->link_info.num_rx_inperiod) == 0) {
rtlpriv->link_info.roam_times++; rtlpriv->link_info.roam_times++;
RT_TRACE(COMP_ERR, DBG_DMESG, RT_TRACE(COMP_ERR, DBG_DMESG, "AP off for %d s\n",
("AP off for %d s\n", rtlpriv->link_info.roam_times * 2);
(rtlpriv->link_info.roam_times * 2)));
/* if we can't recv beacon for 10s, /* if we can't recv beacon for 10s,
* we should reconnect this AP */ * we should reconnect this AP */
if (rtlpriv->link_info.roam_times >= 5) { if (rtlpriv->link_info.roam_times >= 5) {
RT_TRACE(COMP_ERR, DBG_EMERG, RT_TRACE(COMP_ERR, DBG_EMERG,
("AP off, try to reconnect now\n")); "AP off, try to reconnect now\n");
rtlpriv->link_info.roam_times = 0; rtlpriv->link_info.roam_times = 0;
ieee80211_connection_loss( ieee80211_connection_loss(
rtlpriv->mac80211.vif); rtlpriv->mac80211.vif);
...@@ -1793,29 +1789,29 @@ void rtl92e_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len) ...@@ -1793,29 +1789,29 @@ void rtl92e_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(COMP_MAC80211, DBG_LOUD, ("=>ath find\n")); RT_TRACE(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(COMP_MAC80211, DBG_LOUD, ("=>ral findn\n")); RT_TRACE(COMP_MAC80211, DBG_LOUD, "=>ral findn\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(COMP_MAC80211, DBG_LOUD, ("=>cisco find\n")); RT_TRACE(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(COMP_MAC80211, DBG_LOUD, ("=>broad find\n")); RT_TRACE(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(COMP_MAC80211, DBG_LOUD, ("=>marv find\n")); RT_TRACE(COMP_MAC80211, DBG_LOUD, "=>marv find\n");
} }
mac->vendor = vendor; mac->vendor = vendor;
......
...@@ -57,17 +57,14 @@ void rtl92e_btc_init_hal_vars(struct rtl_priv *rtlpriv) ...@@ -57,17 +57,14 @@ void rtl92e_btc_init_hal_vars(struct rtl_priv *rtlpriv)
u8 bt_exist; u8 bt_exist;
u8 bt_type; u8 bt_type;
ant_num = rtl92e_get_hwpg_ant_num(rtlpriv); ant_num = rtl92e_get_hwpg_ant_num(rtlpriv);
RT_TRACE(COMP_INIT, DBG_DMESG, RT_TRACE(COMP_INIT, DBG_DMESG, "antNum is %d\n", ant_num);
("%s, antNum is %d\n", __func__, ant_num));
bt_exist = rtl92e_get_hwpg_bt_exist(rtlpriv); bt_exist = rtl92e_get_hwpg_bt_exist(rtlpriv);
RT_TRACE(COMP_INIT, DBG_DMESG, RT_TRACE(COMP_INIT, DBG_DMESG, "bt_exist is %d\n", bt_exist);
("%s, bt_exist is %d\n", __func__, bt_exist));
exhalbtc92e_set_bt_exist(bt_exist); exhalbtc92e_set_bt_exist(bt_exist);
bt_type = rtl92e_get_hwpg_bt_type(rtlpriv); bt_type = rtl92e_get_hwpg_bt_type(rtlpriv);
RT_TRACE(COMP_INIT, DBG_DMESG, RT_TRACE(COMP_INIT, DBG_DMESG, "bt_type is %d\n", bt_type);
("%s, bt_type is %d\n", __func__, bt_type));
exhalbtc92e_set_chip_type(bt_type); exhalbtc92e_set_chip_type(bt_type);
exhalbtc92e_set_ant_num(BT_COEX_ANT_TYPE_PG, ant_num); exhalbtc92e_set_ant_num(BT_COEX_ANT_TYPE_PG, ant_num);
......
...@@ -62,14 +62,12 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -62,14 +62,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(COMP_SEC, DBG_LOUD, RT_TRACE(COMP_SEC, DBG_LOUD, "WRITE %x: %x\n",
("WRITE %x: %x\n", rtlpriv->cfg->maps[WCAMI], target_content);
rtlpriv->cfg->maps[WCAMI], target_content)); RT_TRACE(COMP_SEC, DBG_LOUD, "The Key ID is %d\n",
RT_TRACE(COMP_SEC, DBG_LOUD, entry_no);
("The Key ID is %d\n", entry_no)); RT_TRACE(COMP_SEC, DBG_LOUD, "WRITE %x: %x\n",
RT_TRACE(COMP_SEC, DBG_LOUD, rtlpriv->cfg->maps[RWCAM], target_command);
("WRITE %x: %x\n",
rtlpriv->cfg->maps[RWCAM], target_command));
} else if (entry_i == 1) { } else if (entry_i == 1) {
target_content = (u32) (*(mac_addr + 5)) << 24 | target_content = (u32) (*(mac_addr + 5)) << 24 |
(u32) (*(mac_addr + 4)) << 16 | (u32) (*(mac_addr + 4)) << 16 |
...@@ -81,10 +79,10 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -81,10 +79,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(COMP_SEC, DBG_LOUD, RT_TRACE(COMP_SEC, DBG_LOUD, "WRITE A4: %x\n",
("WRITE A4: %x\n", target_content)); target_content);
RT_TRACE(COMP_SEC, DBG_LOUD, RT_TRACE(COMP_SEC, DBG_LOUD, "WRITE A0: %x\n",
("WRITE A0: %x\n", target_command)); target_command);
} else { } else {
target_content = target_content =
(u32) (*(key_cont_128 + (entry_i * 4 - 8) + 3)) << (u32) (*(key_cont_128 + (entry_i * 4 - 8) + 3)) <<
...@@ -99,15 +97,14 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no, ...@@ -99,15 +97,14 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
target_command); target_command);
udelay(100); udelay(100);
RT_TRACE(COMP_SEC, DBG_LOUD, RT_TRACE(COMP_SEC, DBG_LOUD, "WRITE A4: %x\n",
("WRITE A4: %x\n", target_content)); target_content);
RT_TRACE(COMP_SEC, DBG_LOUD, RT_TRACE(COMP_SEC, DBG_LOUD, "WRITE A0: %x\n",
("WRITE A0: %x\n", target_command)); target_command);
} }
} }
RT_TRACE(COMP_SEC, DBG_LOUD, RT_TRACE(COMP_SEC, DBG_LOUD, "after set key, usconfig:%x\n", us_config);
("after set key, usconfig:%x\n", us_config));
} }
u8 stg_rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, u8 stg_rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
...@@ -118,13 +115,11 @@ u8 stg_rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, ...@@ -118,13 +115,11 @@ u8 stg_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(COMP_SEC, DBG_DMESG, RT_TRACE(COMP_SEC, DBG_DMESG,
("EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, ulUseDK=%x MacAddr %pM\n", "EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, ulUseDK=%x MacAddr %pM\n",
ul_entry_idx, ul_key_id, ul_enc_alg, ul_entry_idx, ul_key_id, ul_enc_alg, ul_default_key, mac_addr);
ul_default_key, mac_addr));
if (ul_key_id == TOTAL_CAM_ENTRY) { if (ul_key_id == TOTAL_CAM_ENTRY) {
RT_TRACE(COMP_ERR, DBG_WARNING, RT_TRACE(COMP_ERR, DBG_WARNING, "ulKeyId exceed!\n");
("ulKeyId exceed!\n"));
return 0; return 0;
} }
...@@ -136,7 +131,7 @@ u8 stg_rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr, ...@@ -136,7 +131,7 @@ u8 stg_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(COMP_SEC, DBG_DMESG, ("end\n")); RT_TRACE(COMP_SEC, DBG_DMESG, "end\n");
return 1; return 1;
} }
...@@ -148,7 +143,7 @@ int stg_rtl_cam_delete_one_entry(struct ieee80211_hw *hw, ...@@ -148,7 +143,7 @@ int stg_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(COMP_SEC, DBG_DMESG, ("key_idx:%d\n", ul_key_id)); RT_TRACE(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);
...@@ -157,10 +152,10 @@ int stg_rtl_cam_delete_one_entry(struct ieee80211_hw *hw, ...@@ -157,10 +152,10 @@ int stg_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(COMP_SEC, DBG_DMESG, RT_TRACE(COMP_SEC, DBG_DMESG,
("stg_rtl_cam_delete_one_entry(): WRITE A4: %x\n", 0)); "stg_rtl_cam_delete_one_entry(): WRITE A4: %x\n", 0);
RT_TRACE(COMP_SEC, DBG_DMESG, RT_TRACE(COMP_SEC, DBG_DMESG,
("stg_rtl_cam_delete_one_entry(): WRITE A0: %x\n", "stg_rtl_cam_delete_one_entry(): WRITE A0: %x\n",
ul_command)); ul_command);
return 0; return 0;
} }
EXPORT_SYMBOL(stg_rtl_cam_delete_one_entry); EXPORT_SYMBOL(stg_rtl_cam_delete_one_entry);
...@@ -210,9 +205,9 @@ void stg_rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index) ...@@ -210,9 +205,9 @@ void stg_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(COMP_SEC, DBG_DMESG, RT_TRACE(COMP_SEC, DBG_DMESG,
("stg_rtl_cam_mark_invalid(): WRITE A4: %x\n", ul_content)); "stg_rtl_cam_mark_invalid(): WRITE A4: %x\n", ul_content);
RT_TRACE(COMP_SEC, DBG_DMESG, RT_TRACE(COMP_SEC, DBG_DMESG,
("stg_rtl_cam_mark_invalid(): WRITE A0: %x\n", ul_command)); "stg_rtl_cam_mark_invalid(): WRITE A0: %x\n", ul_command);
} }
EXPORT_SYMBOL(stg_rtl_cam_mark_invalid); EXPORT_SYMBOL(stg_rtl_cam_mark_invalid);
...@@ -259,11 +254,11 @@ void stg_rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index) ...@@ -259,11 +254,11 @@ void stg_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(COMP_SEC, DBG_LOUD, RT_TRACE(COMP_SEC, DBG_LOUD,
("stg_rtl_cam_empty_entry(): WRITE A4: %x\n", "stg_rtl_cam_empty_entry(): WRITE A4: %x\n",
ul_content)); ul_content);
RT_TRACE(COMP_SEC, DBG_LOUD, RT_TRACE(COMP_SEC, DBG_LOUD,
("stg_rtl_cam_empty_entry(): WRITE A0: %x\n", "stg_rtl_cam_empty_entry(): WRITE A0: %x\n",
ul_command)); ul_command);
} }
} }
EXPORT_SYMBOL(stg_rtl_cam_empty_entry); EXPORT_SYMBOL(stg_rtl_cam_empty_entry);
...@@ -276,8 +271,7 @@ u8 stg_rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr) ...@@ -276,8 +271,7 @@ u8 stg_rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr)
u8 i, *addr; u8 i, *addr;
if (!sta_addr) { if (!sta_addr) {
RT_TRACE(COMP_SEC, DBG_EMERG, RT_TRACE(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? */
...@@ -290,8 +284,8 @@ u8 stg_rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr) ...@@ -290,8 +284,8 @@ u8 stg_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(COMP_SEC, DBG_EMERG, RT_TRACE(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);
...@@ -310,14 +304,13 @@ void stg_rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr) ...@@ -310,14 +304,13 @@ void stg_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(COMP_SEC, DBG_EMERG, RT_TRACE(COMP_SEC, DBG_EMERG, "sta_addr is NULL\n");
("sta_addr is NULL.\n"));
return; return;
} }
if (is_zero_ether_addr(sta_addr)) { if (is_zero_ether_addr(sta_addr)) {
RT_TRACE(COMP_SEC, DBG_EMERG, RT_TRACE(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.
...@@ -779,9 +779,9 @@ void rtl_proc_add_one(struct ieee80211_hw *hw) ...@@ -779,9 +779,9 @@ void rtl_proc_add_one(struct ieee80211_hw *hw)
rtlpriv->dbg.proc_dir = proc_mkdir(rtlpriv->dbg.proc_name, proc_topdir); rtlpriv->dbg.proc_dir = proc_mkdir(rtlpriv->dbg.proc_name, proc_topdir);
if (!rtlpriv->dbg.proc_dir) { if (!rtlpriv->dbg.proc_dir) {
RT_TRACE(COMP_INIT, DBG_EMERG, RT_TRACE(COMP_INIT, DBG_EMERG,
("Unable to init /proc/net/%s/%s\n", "Unable to init /proc/net/%s/%s\n",
rtlpriv->cfg->name, rtlpriv->cfg->name,
rtlpriv->dbg.proc_name)); rtlpriv->dbg.proc_name);
return; return;
} }
...@@ -789,148 +789,148 @@ void rtl_proc_add_one(struct ieee80211_hw *hw) ...@@ -789,148 +789,148 @@ void rtl_proc_add_one(struct ieee80211_hw *hw)
rtlpriv->dbg.proc_dir, &file_ops_mac_0, hw); rtlpriv->dbg.proc_dir, &file_ops_mac_0, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, DBG_EMERG, RT_TRACE(COMP_INIT, DBG_EMERG,
("Unable to initialize /proc/net/%s/%s/mac-0\n", "Unable to initialize /proc/net/%s/%s/mac-0\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("mac-1", S_IFREG | S_IRUGO, entry = proc_create_data("mac-1", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_mac_1, hw); rtlpriv->dbg.proc_dir, &file_ops_mac_1, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/mac-1\n", "Unable to initialize /proc/net/%s/%s/mac-1\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("mac-2", S_IFREG | S_IRUGO, entry = proc_create_data("mac-2", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_mac_2, hw); rtlpriv->dbg.proc_dir, &file_ops_mac_2, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/mac-2\n", "Unable to initialize /proc/net/%s/%s/mac-2\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("mac-3", S_IFREG | S_IRUGO, entry = proc_create_data("mac-3", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_mac_3, hw); rtlpriv->dbg.proc_dir, &file_ops_mac_3, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/mac-3\n", "Unable to initialize /proc/net/%s/%s/mac-3\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("mac-4", S_IFREG | S_IRUGO, entry = proc_create_data("mac-4", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_mac_4, hw); rtlpriv->dbg.proc_dir, &file_ops_mac_4, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/mac-4\n", "Unable to initialize /proc/net/%s/%s/mac-4\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("mac-5", S_IFREG | S_IRUGO, entry = proc_create_data("mac-5", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_mac_5, hw); rtlpriv->dbg.proc_dir, &file_ops_mac_5, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/mac-5\n", "Unable to initialize /proc/net/%s/%s/mac-5\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("mac-6", S_IFREG | S_IRUGO, entry = proc_create_data("mac-6", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_mac_6, hw); rtlpriv->dbg.proc_dir, &file_ops_mac_6, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/mac-6\n", "Unable to initialize /proc/net/%s/%s/mac-6\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("mac-7", S_IFREG | S_IRUGO, entry = proc_create_data("mac-7", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_mac_7, hw); rtlpriv->dbg.proc_dir, &file_ops_mac_7, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/mac-7\n", "Unable to initialize /proc/net/%s/%s/mac-7\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("bb-8", S_IFREG | S_IRUGO, entry = proc_create_data("bb-8", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_bb_8, hw); rtlpriv->dbg.proc_dir, &file_ops_bb_8, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/bb-8\n", "Unable to initialize /proc/net/%s/%s/bb-8\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("bb-9", S_IFREG | S_IRUGO, entry = proc_create_data("bb-9", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_bb_9, hw); rtlpriv->dbg.proc_dir, &file_ops_bb_9, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/bb-9\n", "Unable to initialize /proc/net/%s/%s/bb-9\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("bb-a", S_IFREG | S_IRUGO, entry = proc_create_data("bb-a", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_bb_a, hw); rtlpriv->dbg.proc_dir, &file_ops_bb_a, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/bb-a\n", "Unable to initialize /proc/net/%s/%s/bb-a\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("bb-b", S_IFREG | S_IRUGO, entry = proc_create_data("bb-b", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_bb_b, hw); rtlpriv->dbg.proc_dir, &file_ops_bb_b, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/bb-b\n", "Unable to initialize /proc/net/%s/%s/bb-b\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("bb-c", S_IFREG | S_IRUGO, entry = proc_create_data("bb-c", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_bb_c, hw); rtlpriv->dbg.proc_dir, &file_ops_bb_c, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/bb-c\n", "Unable to initialize /proc/net/%s/%s/bb-c\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("bb-d", S_IFREG | S_IRUGO, entry = proc_create_data("bb-d", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_bb_d, hw); rtlpriv->dbg.proc_dir, &file_ops_bb_d, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/bb-d\n", "Unable to initialize /proc/net/%s/%s/bb-d\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("bb-e", S_IFREG | S_IRUGO, entry = proc_create_data("bb-e", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_bb_e, hw); rtlpriv->dbg.proc_dir, &file_ops_bb_e, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/bb-e\n", "Unable to initialize /proc/net/%s/%s/bb-e\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("bb-f", S_IFREG | S_IRUGO, entry = proc_create_data("bb-f", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_bb_f, hw); rtlpriv->dbg.proc_dir, &file_ops_bb_f, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/bb-f\n", "Unable to initialize /proc/net/%s/%s/bb-f\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("rf-a", S_IFREG | S_IRUGO, entry = proc_create_data("rf-a", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_rf_a, hw); rtlpriv->dbg.proc_dir, &file_ops_rf_a, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/rf-a\n", "Unable to initialize /proc/net/%s/%s/rf-a\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("rf-b", S_IFREG | S_IRUGO, entry = proc_create_data("rf-b", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_rf_b, hw); rtlpriv->dbg.proc_dir, &file_ops_rf_b, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/rf-b\n", "Unable to initialize /proc/net/%s/%s/rf-b\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("cam-1", S_IFREG | S_IRUGO, entry = proc_create_data("cam-1", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_cam_1, hw); rtlpriv->dbg.proc_dir, &file_ops_cam_1, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/cam-1\n", "Unable to initialize /proc/net/%s/%s/cam-1\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("cam-2", S_IFREG | S_IRUGO, entry = proc_create_data("cam-2", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_cam_2, hw); rtlpriv->dbg.proc_dir, &file_ops_cam_2, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/cam-2\n", "Unable to initialize /proc/net/%s/%s/cam-2\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
entry = proc_create_data("cam-3", S_IFREG | S_IRUGO, entry = proc_create_data("cam-3", S_IFREG | S_IRUGO,
rtlpriv->dbg.proc_dir, &file_ops_cam_3, hw); rtlpriv->dbg.proc_dir, &file_ops_cam_3, hw);
if (!entry) if (!entry)
RT_TRACE(COMP_INIT, COMP_ERR, RT_TRACE(COMP_INIT, COMP_ERR,
("Unable to initialize /proc/net/%s/%s/cam-3\n", "Unable to initialize /proc/net/%s/%s/cam-3\n",
rtlpriv->cfg->name, rtlpriv->dbg.proc_name)); rtlpriv->cfg->name, rtlpriv->dbg.proc_name);
} }
void rtl_proc_remove_one(struct ieee80211_hw *hw) void rtl_proc_remove_one(struct ieee80211_hw *hw)
......
...@@ -171,17 +171,15 @@ enum dbgp_flag_e { ...@@ -171,17 +171,15 @@ enum dbgp_flag_e {
} \ } \
} while (0) } while (0)
#define RT_TRACE(comp, level, fmt)\ #define RT_TRACE(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))) { \
pr_debug("%s-%d:%s():<%lx> ", \ pr_debug("%d:<%lx> " fmt, \
KBUILD_MODNAME, \ rtlpriv->rtlhal.interfaceindex, \
rtlpriv->rtlhal.interfaceindex, __func__, \ in_interrupt(), ##__VA_ARGS__); \
in_interrupt()); \
pr_cont fmt; \
} \ } \
} while (0) } while (0)
#define RTPRINT(rtlpriv, dbgtype, dbgflag, fmt, ...) \ #define RTPRINT(rtlpriv, dbgtype, dbgflag, fmt, ...) \
do { \ do { \
......
...@@ -151,8 +151,7 @@ void efuse92e_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value) ...@@ -151,8 +151,7 @@ void efuse92e_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value)
const u32 efuse_real_content_len = const u32 efuse_real_content_len =
rtlpriv->cfg->maps[EFUSE_REAL_CONTENT_SIZE]; rtlpriv->cfg->maps[EFUSE_REAL_CONTENT_SIZE];
RT_TRACE(COMP_EFUSE, DBG_LOUD, RT_TRACE(COMP_EFUSE, DBG_LOUD, "Addr=%x Data =%x\n", address, value);
("Addr=%x Data =%x\n", address, value));
if (address < efuse_real_content_len) { if (address < efuse_real_content_len) {
rtl_write_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL], value); rtl_write_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL], value);
...@@ -242,8 +241,8 @@ void read92e_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, ...@@ -242,8 +241,8 @@ void read92e_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte,
if ((_offset + _size_byte) > rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]) { if ((_offset + _size_byte) > rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]) {
RT_TRACE(COMP_EFUSE, DBG_LOUD, RT_TRACE(COMP_EFUSE, DBG_LOUD,
("read92e_efuse(): Invalid offset(%#x) with read bytes(%#x)!!\n", "read92e_efuse(): Invalid offset(%#x) with read bytes(%#x)!!\n",
_offset, _size_byte)); _offset, _size_byte);
return; return;
} }
...@@ -411,8 +410,8 @@ bool efuse92e_shadow_update_chk(struct ieee80211_hw *hw) ...@@ -411,8 +410,8 @@ bool efuse92e_shadow_update_chk(struct ieee80211_hw *hw)
bresult = false; bresult = false;
RT_TRACE(COMP_EFUSE, DBG_LOUD, RT_TRACE(COMP_EFUSE, DBG_LOUD,
("efuse92e_shadow_update_chk(): totalbytes(%#x), hdr_num(%#x), words_need(%#x), efuse_used(%d)\n", "efuse92e_shadow_update_chk(): totalbytes(%#x), 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 bresult; return bresult;
} }
...@@ -448,7 +447,7 @@ bool efuse92e_shadow_update(struct ieee80211_hw *hw) ...@@ -448,7 +447,7 @@ bool efuse92e_shadow_update(struct ieee80211_hw *hw)
u8 word_en = 0x0F; u8 word_en = 0x0F;
u8 first_pg = false; u8 first_pg = false;
RT_TRACE(COMP_EFUSE, DBG_LOUD, ("\n")); RT_TRACE(COMP_EFUSE, DBG_LOUD, "\n");
if (!efuse92e_shadow_update_chk(hw)) { if (!efuse92e_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]);
...@@ -456,8 +455,7 @@ bool efuse92e_shadow_update(struct ieee80211_hw *hw) ...@@ -456,8 +455,7 @@ bool efuse92e_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(COMP_EFUSE, DBG_LOUD, RT_TRACE(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);
...@@ -494,7 +492,7 @@ bool efuse92e_shadow_update(struct ieee80211_hw *hw) ...@@ -494,7 +492,7 @@ bool efuse92e_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(COMP_ERR, DBG_WARNING, RT_TRACE(COMP_ERR, DBG_WARNING,
("PG section(%#x) fail!!\n", offset)); "PG section(%#x) fail!!\n", offset);
break; break;
} }
} }
...@@ -507,7 +505,7 @@ bool efuse92e_shadow_update(struct ieee80211_hw *hw) ...@@ -507,7 +505,7 @@ bool efuse92e_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(COMP_EFUSE, DBG_LOUD, ("\n")); RT_TRACE(COMP_EFUSE, DBG_LOUD, "\n");
return true; return true;
} }
...@@ -640,8 +638,7 @@ static int efuse_one_byte_write(struct ieee80211_hw *hw, u16 addr, u8 data) ...@@ -640,8 +638,7 @@ static int efuse_one_byte_write(struct ieee80211_hw *hw, u16 addr, u8 data)
u8 tmpidx = 0; u8 tmpidx = 0;
bool bresult; bool bresult;
RT_TRACE(COMP_EFUSE, DBG_LOUD, RT_TRACE(COMP_EFUSE, DBG_LOUD, "Addr = %x Data=%x\n", addr, data);
("Addr = %x Data=%x\n", addr, data));
rtl_write_byte(rtlpriv, rtl_write_byte(rtlpriv,
rtlpriv->cfg->maps[EFUSE_CTRL] + 1, (u8) (addr & 0xff)); rtlpriv->cfg->maps[EFUSE_CTRL] + 1, (u8) (addr & 0xff));
...@@ -1021,7 +1018,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, ...@@ -1021,7 +1018,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
if (efuse_addr >= (EFUSE_MAX_SIZE - if (efuse_addr >= (EFUSE_MAX_SIZE -
rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN])) { rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN])) {
RT_TRACE(COMP_EFUSE, DBG_LOUD, RT_TRACE(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;
...@@ -1061,8 +1058,8 @@ static u8 efuse_word_enable_data_write(struct ieee80211_hw *hw, ...@@ -1061,8 +1058,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(COMP_EFUSE, DBG_LOUD, RT_TRACE(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.
...@@ -40,7 +40,7 @@ bool stg_rtl_ps_enable_nic(struct ieee80211_hw *hw) ...@@ -40,7 +40,7 @@ bool stg_rtl_ps_enable_nic(struct ieee80211_hw *hw)
rtlpriv->intf_ops->reset_trx_ring(hw); rtlpriv->intf_ops->reset_trx_ring(hw);
if (is_hal_stop(rtlhal)) if (is_hal_stop(rtlhal))
RT_TRACE(COMP_ERR, DBG_WARNING, ("Driver is already down!\n")); RT_TRACE(COMP_ERR, DBG_WARNING, "Driver is already down!\n");
/*<2> Enable Adapter */ /*<2> Enable Adapter */
rtlpriv->cfg->ops->hw_init(hw); rtlpriv->cfg->ops->hw_init(hw);
...@@ -101,8 +101,8 @@ bool stg_rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -101,8 +101,8 @@ bool stg_rtl_ps_set_rf_state(struct ieee80211_hw *hw,
spin_unlock(&rtlpriv->locks.rf_ps_lock); spin_unlock(&rtlpriv->locks.rf_ps_lock);
RT_TRACE(COMP_ERR, DBG_WARNING, RT_TRACE(COMP_ERR, DBG_WARNING,
("RF Change in progress! Wait to set..state_toset(%d)\n", "RF Change in progress! Wait to set..state_toset(%d)\n",
state_toset)); state_toset);
/* Set RF after the previous action is done. */ /* Set RF after the previous action is done. */
while (ppsc->rfchange_inprogress) { while (ppsc->rfchange_inprogress) {
...@@ -151,7 +151,7 @@ bool stg_rtl_ps_set_rf_state(struct ieee80211_hw *hw, ...@@ -151,7 +151,7 @@ bool stg_rtl_ps_set_rf_state(struct ieee80211_hw *hw,
b_actionallowed = true; b_actionallowed = true;
break; break;
default: default:
RT_TRACE(COMP_ERR, DBG_EMERG, ("switch case not process\n")); RT_TRACE(COMP_ERR, DBG_EMERG, "switch case not process\n");
break; break;
} }
...@@ -212,7 +212,7 @@ void rtl92e_ips_nic_off_wq_callback(void *data) ...@@ -212,7 +212,7 @@ void rtl92e_ips_nic_off_wq_callback(void *data)
enum rf_pwrstate rtstate; enum rf_pwrstate rtstate;
if (mac->opmode != NL80211_IFTYPE_STATION) { if (mac->opmode != NL80211_IFTYPE_STATION) {
RT_TRACE(COMP_ERR, DBG_WARNING, ("not station return\n")); RT_TRACE(COMP_ERR, DBG_WARNING, "not station return\n");
return; return;
} }
...@@ -249,7 +249,7 @@ void rtl92e_ips_nic_off_wq_callback(void *data) ...@@ -249,7 +249,7 @@ void rtl92e_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(COMP_RF, DBG_LOUD, RT_TRACE(COMP_RF, DBG_LOUD,
("IPSEnter(): Turn off RF.\n")); "IPSEnter(): Turn off RF\n");
ppsc->inactive_pwrstate = ERFOFF; ppsc->inactive_pwrstate = ERFOFF;
ppsc->b_in_powersavemode = true; ppsc->b_in_powersavemode = true;
...@@ -326,7 +326,7 @@ static bool rtl_get_fwlps_doze(struct ieee80211_hw *hw) ...@@ -326,7 +326,7 @@ static bool rtl_get_fwlps_doze(struct ieee80211_hw *hw)
if (ps_timediff < 2000) { if (ps_timediff < 2000) {
RT_TRACE(COMP_POWER, DBG_LOUD, RT_TRACE(COMP_POWER, DBG_LOUD,
("Delay enter Fw LPS for DHCP, ARP, or EAPOL exchanging state\n")); "Delay enter Fw LPS for DHCP, ARP, or EAPOL exchanging state\n");
return false; return false;
} }
...@@ -372,8 +372,8 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -372,8 +372,8 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
if ((ppsc->b_fwctrl_lps) && ppsc->report_linked) { if ((ppsc->b_fwctrl_lps) && ppsc->report_linked) {
if (ppsc->dot11_psmode == EACTIVE) { if (ppsc->dot11_psmode == EACTIVE) {
RT_TRACE(COMP_RF, DBG_DMESG, RT_TRACE(COMP_RF, DBG_DMESG,
("FW LPS leave ps_mode:%x\n", "FW LPS leave ps_mode:%x\n",
FW_PS_ACTIVE_MODE)); FW_PS_ACTIVE_MODE);
enter_fwlps = false; enter_fwlps = false;
ppsc->pwr_mode = FW_PS_ACTIVE_MODE; ppsc->pwr_mode = FW_PS_ACTIVE_MODE;
ppsc->smart_ps = 0; ppsc->smart_ps = 0;
...@@ -387,8 +387,8 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) ...@@ -387,8 +387,8 @@ 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(COMP_RF, DBG_DMESG, RT_TRACE(COMP_RF, DBG_DMESG,
("FW LPS enter ps_mode:%x\n", "FW LPS enter ps_mode:%x\n",
ppsc->fwctrl_psmode)); ppsc->fwctrl_psmode);
if (rtlpriv->cfg->ops->get_btc_status()) if (rtlpriv->cfg->ops->get_btc_status())
rtlpriv->btcoexist.btc_ops->btc_lps_notify(rtlpriv, rt_psmode); rtlpriv->btcoexist.btc_ops->btc_lps_notify(rtlpriv, rt_psmode);
enter_fwlps = true; enter_fwlps = true;
...@@ -439,7 +439,7 @@ void rtl92e_lps_enter(struct ieee80211_hw *hw) ...@@ -439,7 +439,7 @@ void rtl92e_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(COMP_POWER, DBG_LOUD, RT_TRACE(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);
} }
...@@ -469,7 +469,7 @@ void rtl92e_lps_leave(struct ieee80211_hw *hw) ...@@ -469,7 +469,7 @@ void rtl92e_lps_leave(struct ieee80211_hw *hw)
} }
RT_TRACE(COMP_POWER, DBG_LOUD, RT_TRACE(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);
} }
...@@ -555,8 +555,8 @@ void rtl92e_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len) ...@@ -555,8 +555,8 @@ void rtl92e_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len)
&rtlpriv->works.ps_work, MSECS(5)); &rtlpriv->works.ps_work, MSECS(5));
} else { } else {
RT_TRACE(COMP_POWER, DBG_DMESG, RT_TRACE(COMP_POWER, DBG_DMESG,
("u_bufferd: %x, m_buffered: %x\n", "u_bufferd: %x, m_buffered: %x\n",
u_buffed, m_buffed)); u_buffed, m_buffed);
} }
} }
...@@ -653,8 +653,8 @@ void rtl92e_swlps_rf_sleep(struct ieee80211_hw *hw) ...@@ -653,8 +653,8 @@ void rtl92e_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(COMP_POWER, DBG_DMESG, RT_TRACE(COMP_POWER, DBG_DMESG,
("dtim_counter:%x will sleep :%d beacon_intv\n", "dtim_counter:%x will sleep :%d beacon_intv\n",
rtlpriv->psc.dtim_counter, sleep_intv)); rtlpriv->psc.dtim_counter, sleep_intv);
/* 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,
...@@ -731,8 +731,8 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ...@@ -731,8 +731,8 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
find_p2p_ps_ie = true; find_p2p_ps_ie = true;
if ((noa_len - 2) % 13 != 0) { if ((noa_len - 2) % 13 != 0) {
RT_TRACE(COMP_INIT, DBG_LOUD, RT_TRACE(COMP_INIT, DBG_LOUD,
("P2P notice of absence: invalid length%d\n", "P2P notice of absence: invalid length%d\n",
noa_len)); noa_len);
return; return;
} else { } else {
noa_num = (noa_len - 2) / 13; noa_num = (noa_len - 2) / 13;
...@@ -740,8 +740,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ...@@ -740,8 +740,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
noa_index = ie[3]; noa_index = ie[3];
if (rtlpriv->psc.p2p_ps_info.p2p_ps_mode == if (rtlpriv->psc.p2p_ps_info.p2p_ps_mode ==
P2P_PS_NONE || noa_index != p2pinfo->noa_index) { P2P_PS_NONE || noa_index != p2pinfo->noa_index) {
RT_TRACE(COMP_FW, DBG_LOUD, RT_TRACE(COMP_FW, DBG_LOUD, "update NOA ie\n");
("update NOA ie.\n"));
p2pinfo->noa_index = noa_index; p2pinfo->noa_index = noa_index;
p2pinfo->opp_ps = (ie[4] >> 7); p2pinfo->opp_ps = (ie[4] >> 7);
p2pinfo->ctwindow = ie[4] & 0x7F; p2pinfo->ctwindow = ie[4] & 0x7F;
...@@ -815,7 +814,7 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, ...@@ -815,7 +814,7 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
return; return;
find_p2p_ie = true; find_p2p_ie = true;
RT_TRACE(COMP_FW, DBG_LOUD, ("action frame find P2P IE.\n")); RT_TRACE(COMP_FW, DBG_LOUD, "action frame find P2P IE.\n");
/*to find noa ie*/ /*to find noa ie*/
while (ie + 1 < end) { while (ie + 1 < end) {
noa_len = READEF2BYTE((__le16 *)&ie[1]); noa_len = READEF2BYTE((__le16 *)&ie[1]);
...@@ -823,14 +822,14 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, ...@@ -823,14 +822,14 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
return; return;
if (ie[0] == 12) { if (ie[0] == 12) {
RT_TRACE(COMP_FW, DBG_LOUD, ("find NOA IE\n")); RT_TRACE(COMP_FW, DBG_LOUD, "find NOA IE\n");
RT_PRINT_DATA(rtlpriv, COMP_FW, DBG_LOUD, "noa ie ", RT_PRINT_DATA(rtlpriv, COMP_FW, DBG_LOUD, "noa ie ",
ie, noa_len); ie, noa_len);
find_p2p_ps_ie = true; find_p2p_ps_ie = true;
if ((noa_len - 2) % 13 != 0) { if ((noa_len - 2) % 13 != 0) {
RT_TRACE(COMP_FW, DBG_LOUD, RT_TRACE(COMP_FW, DBG_LOUD,
("P2P notice of absence: invalid length%d\n", "P2P notice of absence: invalid length%d\n",
noa_len)); noa_len);
return; return;
} else { } else {
noa_num = (noa_len - 2) / 13; noa_num = (noa_len - 2) / 13;
...@@ -887,7 +886,7 @@ void rtl92e_p2p_ps_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state) ...@@ -887,7 +886,7 @@ void rtl92e_p2p_ps_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
struct rtl_ps_ctl *rtlps = rtl_psc(rtl_priv(hw)); struct rtl_ps_ctl *rtlps = rtl_psc(rtl_priv(hw));
struct rtl_p2p_ps_info *p2pinfo = &(rtlpriv->psc.p2p_ps_info); struct rtl_p2p_ps_info *p2pinfo = &(rtlpriv->psc.p2p_ps_info);
RT_TRACE(COMP_FW, DBG_LOUD, ("p2p state %x\n", p2p_ps_state)); RT_TRACE(COMP_FW, DBG_LOUD, "p2p state %x\n", p2p_ps_state);
switch (p2p_ps_state) { switch (p2p_ps_state) {
case P2P_PS_DISABLE: case P2P_PS_DISABLE:
p2pinfo->p2p_ps_state = p2p_ps_state; p2pinfo->p2p_ps_state = p2p_ps_state;
...@@ -939,17 +938,17 @@ void rtl92e_p2p_ps_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state) ...@@ -939,17 +938,17 @@ void rtl92e_p2p_ps_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
default: default:
break; break;
} }
RT_TRACE(COMP_FW, DBG_LOUD, (" ctwindow %x oppps %x\n", RT_TRACE(COMP_FW, DBG_LOUD, " ctwindow %x oppps %x\n",
p2pinfo->ctwindow , p2pinfo->opp_ps)); p2pinfo->ctwindow , p2pinfo->opp_ps);
RT_TRACE(COMP_FW, DBG_LOUD, RT_TRACE(COMP_FW, DBG_LOUD,
("count %x duration %x index %x interval %x start time %x noa num %x\n", "count %x duration %x index %x interval %x start time %x noa num %x\n",
p2pinfo->noa_count_type[0], p2pinfo->noa_count_type[0],
p2pinfo->noa_duration[0], p2pinfo->noa_duration[0],
p2pinfo->noa_index, p2pinfo->noa_index,
p2pinfo->noa_interval[0], p2pinfo->noa_interval[0],
p2pinfo->noa_start_time[0], p2pinfo->noa_start_time[0],
p2pinfo->noa_num)); p2pinfo->noa_num);
RT_TRACE(COMP_FW, DBG_LOUD, ("end\n")); RT_TRACE(COMP_FW, DBG_LOUD, "end\n");
} }
void rtl92e_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len) void rtl92e_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len)
......
...@@ -250,7 +250,7 @@ static void *rtl_rate_alloc_sta(void *ppriv, ...@@ -250,7 +250,7 @@ static void *rtl_rate_alloc_sta(void *ppriv,
rate_priv = kzalloc(sizeof(*rate_priv), gfp); rate_priv = kzalloc(sizeof(*rate_priv), gfp);
if (!rate_priv) { if (!rate_priv) {
RT_TRACE(COMP_ERR, DBG_EMERG, RT_TRACE(COMP_ERR, DBG_EMERG,
("Unable to allocate private rc structure\n")); "Unable to allocate private rc structure\n");
return NULL; return NULL;
} }
......
...@@ -407,12 +407,12 @@ int rtl92e_regd_init(struct ieee80211_hw *hw, ...@@ -407,12 +407,12 @@ int rtl92e_regd_init(struct ieee80211_hw *hw,
rtlpriv->regd.country_code = rtlpriv->efuse.channel_plan; rtlpriv->regd.country_code = rtlpriv->efuse.channel_plan;
RT_TRACE(COMP_REGD, DBG_TRACE, RT_TRACE(COMP_REGD, DBG_TRACE,
(KERN_DEBUG "rtl: EEPROM regdomain: 0x%0x\n", KERN_DEBUG "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(COMP_REGD, DBG_DMESG, RT_TRACE(COMP_REGD, DBG_DMESG,
("rtl: EEPROM indicates invalid contry code world wide 13 should be used\n")); "rtl: EEPROM indicates invalid contry code world wide 13 should be used\n");
rtlpriv->regd.country_code = COUNTRY_CODE_WORLD_WIDE_13; rtlpriv->regd.country_code = COUNTRY_CODE_WORLD_WIDE_13;
} }
...@@ -428,8 +428,8 @@ int rtl92e_regd_init(struct ieee80211_hw *hw, ...@@ -428,8 +428,8 @@ int rtl92e_regd_init(struct ieee80211_hw *hw,
} }
RT_TRACE(COMP_REGD, DBG_TRACE, RT_TRACE(COMP_REGD, DBG_TRACE,
(KERN_DEBUG "rtl: Country alpha2 being used: %c%c\n", KERN_DEBUG "rtl: Country alpha2 being used: %c%c\n",
rtlpriv->regd.alpha2[0], rtlpriv->regd.alpha2[1])); rtlpriv->regd.alpha2[0], rtlpriv->regd.alpha2[1]);
_rtl92e_regd_init_wiphy(&rtlpriv->regd, wiphy, reg_notifier); _rtl92e_regd_init_wiphy(&rtlpriv->regd, wiphy, reg_notifier);
...@@ -442,7 +442,7 @@ void rtl92e_reg_notifier(struct wiphy *wiphy, ...@@ -442,7 +442,7 @@ void rtl92e_reg_notifier(struct wiphy *wiphy,
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(COMP_REGD, DBG_LOUD, ("\n")); RT_TRACE(COMP_REGD, DBG_LOUD, "\n");
_rtl92e_reg_notifier_apply(wiphy, request, &rtlpriv->regd); _rtl92e_reg_notifier_apply(wiphy, request, &rtlpriv->regd);
} }
...@@ -256,16 +256,15 @@ static void rtl92ee_dm_false_alarm_counter_statistics(struct ieee80211_hw *hw) ...@@ -256,16 +256,15 @@ static void rtl92ee_dm_false_alarm_counter_statistics(struct ieee80211_hw *hw)
RT_TRACE(COMP_DIG, DBG_TRACE, RT_TRACE(COMP_DIG, DBG_TRACE,
("cnt_parity_fail = %d, cnt_rate_illegal = %d, " "cnt_parity_fail = %d, cnt_rate_illegal = %d, cnt_crc8_fail = %d, cnt_mcs_fail = %d\n",
"cnt_crc8_fail = %d, cnt_mcs_fail = %d\n",
falsealm_cnt->cnt_parity_fail, falsealm_cnt->cnt_parity_fail,
falsealm_cnt->cnt_rate_illegal, falsealm_cnt->cnt_rate_illegal,
falsealm_cnt->cnt_crc8_fail, falsealm_cnt->cnt_mcs_fail)); falsealm_cnt->cnt_crc8_fail, falsealm_cnt->cnt_mcs_fail);
RT_TRACE(COMP_DIG, DBG_TRACE, RT_TRACE(COMP_DIG, DBG_TRACE,
("cnt_ofdm_fail = %x, cnt_cck_fail = %x, cnt_all = %x\n", "cnt_ofdm_fail = %x, cnt_cck_fail = %x, cnt_all = %x\n",
falsealm_cnt->cnt_ofdm_fail, falsealm_cnt->cnt_ofdm_fail,
falsealm_cnt->cnt_cck_fail, falsealm_cnt->cnt_all)); falsealm_cnt->cnt_cck_fail, falsealm_cnt->cnt_all);
} }
static void rtl92ee_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw) static void rtl92ee_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw)
...@@ -341,7 +340,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw) ...@@ -341,7 +340,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
} else { } else {
dm_dig.rx_gain_range_max = dm_dig_max; dm_dig.rx_gain_range_max = dm_dig_max;
dig_dynamic_min = dm_dig_min; dig_dynamic_min = dm_dig_min;
RT_TRACE(COMP_DIG, DBG_LOUD, ("no link\n")); RT_TRACE(COMP_DIG, DBG_LOUD, "no link\n");
} }
if (rtlpriv->falsealm_cnt.cnt_all > 10000) { if (rtlpriv->falsealm_cnt.cnt_all > 10000) {
...@@ -496,7 +495,7 @@ static void rtl92ee_dm_find_minimum_rssi(struct ieee80211_hw *hw) ...@@ -496,7 +495,7 @@ static void rtl92ee_dm_find_minimum_rssi(struct ieee80211_hw *hw)
(rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) { (rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) {
rtl_dm_dig->min_undecorated_pwdb_for_dm = 0; rtl_dm_dig->min_undecorated_pwdb_for_dm = 0;
RT_TRACE(COMP_BB_POWERSAVING, DBG_LOUD, RT_TRACE(COMP_BB_POWERSAVING, DBG_LOUD,
("Not connected to any\n")); "Not connected to any\n");
} }
if (mac->link_state >= MAC80211_LINKED) { if (mac->link_state >= MAC80211_LINKED) {
if (mac->opmode == NL80211_IFTYPE_AP || if (mac->opmode == NL80211_IFTYPE_AP ||
...@@ -504,24 +503,24 @@ static void rtl92ee_dm_find_minimum_rssi(struct ieee80211_hw *hw) ...@@ -504,24 +503,24 @@ static void rtl92ee_dm_find_minimum_rssi(struct ieee80211_hw *hw)
rtl_dm_dig->min_undecorated_pwdb_for_dm = rtl_dm_dig->min_undecorated_pwdb_for_dm =
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(COMP_BB_POWERSAVING, DBG_LOUD, RT_TRACE(COMP_BB_POWERSAVING, DBG_LOUD,
("AP Client PWDB = 0x%lx\n", "AP Client PWDB = 0x%lx\n",
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb)); rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb);
} else { } else {
rtl_dm_dig->min_undecorated_pwdb_for_dm = rtl_dm_dig->min_undecorated_pwdb_for_dm =
rtlpriv->dm.undecorated_smoothed_pwdb; rtlpriv->dm.undecorated_smoothed_pwdb;
RT_TRACE(COMP_BB_POWERSAVING, DBG_LOUD, RT_TRACE(COMP_BB_POWERSAVING, DBG_LOUD,
("STA Default Port PWDB = 0x%x\n", "STA Default Port PWDB = 0x%x\n",
rtl_dm_dig->min_undecorated_pwdb_for_dm)); rtl_dm_dig->min_undecorated_pwdb_for_dm);
} }
} else { } else {
rtl_dm_dig->min_undecorated_pwdb_for_dm = rtl_dm_dig->min_undecorated_pwdb_for_dm =
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb; rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(COMP_BB_POWERSAVING, DBG_LOUD, RT_TRACE(COMP_BB_POWERSAVING, DBG_LOUD,
("AP Ext Port or disconnet PWDB = 0x%x\n", "AP Ext Port or disconnet PWDB = 0x%x\n",
rtl_dm_dig->min_undecorated_pwdb_for_dm)); rtl_dm_dig->min_undecorated_pwdb_for_dm);
} }
RT_TRACE(COMP_DIG, DBG_LOUD, ("MinUndecoratedPWDBForDM =%d\n", RT_TRACE(COMP_DIG, DBG_LOUD, "MinUndecoratedPWDBForDM =%d\n",
rtl_dm_dig->min_undecorated_pwdb_for_dm)); rtl_dm_dig->min_undecorated_pwdb_for_dm);
} }
static void rtl92ee_dm_check_rssi_monitor(struct ieee80211_hw *hw) static void rtl92ee_dm_check_rssi_monitor(struct ieee80211_hw *hw)
...@@ -842,8 +841,7 @@ static void rtl92ee_dm_dynamic_atc_switch(struct ieee80211_hw *hw) ...@@ -842,8 +841,7 @@ static void rtl92ee_dm_dynamic_atc_switch(struct ieee80211_hw *hw)
if (rtlpriv->cfg->ops->get_btc_status()) { if (rtlpriv->cfg->ops->get_btc_status()) {
if (!rtlpriv->btcoexist.btc_ops->btc_is_bt_disabled(rtlpriv)) { if (!rtlpriv->btcoexist.btc_ops->btc_is_bt_disabled(rtlpriv)) {
RT_TRACE(COMP_BT_COEXIST, DBG_LOUD, RT_TRACE(COMP_BT_COEXIST, DBG_LOUD,
("odm_DynamicATCSwitch(): " "odm_DynamicATCSwitch(): Disable CFO tracking for BT!!\n");
"Disable CFO tracking for BT!!\n"));
return; return;
} }
} }
...@@ -1003,7 +1001,8 @@ static bool _rtl92ee_dm_ra_state_check(struct ieee80211_hw *hw, ...@@ -1003,7 +1001,8 @@ static bool _rtl92ee_dm_ra_state_check(struct ieee80211_hw *hw,
default: default:
RT_TRACE(COMP_RATR, DBG_DMESG, RT_TRACE(COMP_RATR, DBG_DMESG,
("wrong rssi level setting %d !", *ratr_state)); "wrong rssi level setting %d !\n",
*ratr_state);
break; break;
} }
...@@ -1032,14 +1031,13 @@ static void rtl92ee_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw) ...@@ -1032,14 +1031,13 @@ static void rtl92ee_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw)
struct ieee80211_sta *sta = NULL; struct ieee80211_sta *sta = NULL;
if (is_hal_stop(rtlhal)) { if (is_hal_stop(rtlhal)) {
RT_TRACE(COMP_RATE, DBG_LOUD, RT_TRACE(COMP_RATE, DBG_LOUD, "driver is going to unload\n");
("driver is going to unload\n"));
return; return;
} }
if (!rtlpriv->dm.b_useramask) { if (!rtlpriv->dm.b_useramask) {
RT_TRACE(COMP_RATE, DBG_LOUD, RT_TRACE(COMP_RATE, DBG_LOUD,
("driver does not control rate adaptive mask\n")); "driver does not control rate adaptive mask\n");
return; return;
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -41,8 +41,8 @@ void rtl92ee_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -41,8 +41,8 @@ void rtl92ee_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
u32 ledcfg; u32 ledcfg;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(COMP_LED, DBG_LOUD, RT_TRACE(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:
...@@ -55,8 +55,7 @@ void rtl92ee_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -55,8 +55,7 @@ void rtl92ee_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
case LED_PIN_LED1: case LED_PIN_LED1:
break; break;
default: default:
RT_TRACE(COMP_ERR, DBG_EMERG, RT_TRACE(COMP_ERR, DBG_EMERG, "switch case not processed\n");
("switch case not process\n"));
break; break;
} }
pled->b_ledon = true; pled->b_ledon = true;
...@@ -67,8 +66,8 @@ void rtl92ee_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -67,8 +66,8 @@ void rtl92ee_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
u32 ledcfg; u32 ledcfg;
RT_TRACE(COMP_LED, DBG_LOUD, RT_TRACE(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:
...@@ -81,8 +80,7 @@ void rtl92ee_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) ...@@ -81,8 +80,7 @@ void rtl92ee_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
case LED_PIN_LED1: case LED_PIN_LED1:
break; break;
default: default:
RT_TRACE(COMP_ERR, DBG_LOUD, RT_TRACE(COMP_ERR, DBG_LOUD, "switch case not processed\n");
("switch case not process\n"));
break; break;
} }
pled->b_ledon = false; pled->b_ledon = false;
...@@ -129,6 +127,6 @@ void rtl92ee_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction) ...@@ -129,6 +127,6 @@ void rtl92ee_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(COMP_LED, DBG_TRACE, ("ledaction %d,\n", ledaction)); RT_TRACE(COMP_LED, DBG_TRACE, "ledaction %d\n", ledaction);
_rtl92ee_sw_led_control(hw, ledaction); _rtl92ee_sw_led_control(hw, ledaction);
} }
This diff is collapsed.
...@@ -51,7 +51,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -51,7 +51,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
do { do {
pwr_cfg_cmd = pwrcfgcmd[ary_idx]; pwr_cfg_cmd = pwrcfgcmd[ary_idx];
RT_TRACE(COMP_INIT, DBG_TRACE, RT_TRACE(COMP_INIT, DBG_TRACE,
("offset(%#x), cut_msk(%#x), fab_msk(%#x), interface_msk(%#x), base(%#x), cmd(%#x), msk(%#x), value(%#x)\n", "offset(%#x), cut_msk(%#x), fab_msk(%#x), interface_msk(%#x), base(%#x), cmd(%#x), msk(%#x), value(%#x)\n",
GET_PWR_CFG_OFFSET(pwr_cfg_cmd), GET_PWR_CFG_OFFSET(pwr_cfg_cmd),
GET_PWR_CFG_CUT_MASK(pwr_cfg_cmd), GET_PWR_CFG_CUT_MASK(pwr_cfg_cmd),
GET_PWR_CFG_FAB_MASK(pwr_cfg_cmd), GET_PWR_CFG_FAB_MASK(pwr_cfg_cmd),
...@@ -59,7 +59,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -59,7 +59,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
GET_PWR_CFG_BASE(pwr_cfg_cmd), GET_PWR_CFG_BASE(pwr_cfg_cmd),
GET_PWR_CFG_CMD(pwr_cfg_cmd), GET_PWR_CFG_CMD(pwr_cfg_cmd),
GET_PWR_CFG_MASK(pwr_cfg_cmd), GET_PWR_CFG_MASK(pwr_cfg_cmd),
GET_PWR_CFG_VALUE(pwr_cfg_cmd))); GET_PWR_CFG_VALUE(pwr_cfg_cmd));
if ((GET_PWR_CFG_FAB_MASK(pwr_cfg_cmd)&fab_version) && if ((GET_PWR_CFG_FAB_MASK(pwr_cfg_cmd)&fab_version) &&
(GET_PWR_CFG_CUT_MASK(pwr_cfg_cmd)&cut_version) && (GET_PWR_CFG_CUT_MASK(pwr_cfg_cmd)&cut_version) &&
...@@ -67,12 +67,12 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -67,12 +67,12 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
switch (GET_PWR_CFG_CMD(pwr_cfg_cmd)) { switch (GET_PWR_CFG_CMD(pwr_cfg_cmd)) {
case PWR_CMD_READ: case PWR_CMD_READ:
RT_TRACE(COMP_INIT, DBG_TRACE, RT_TRACE(COMP_INIT, DBG_TRACE,
("PWR_CMD_READ\n")); "PWR_CMD_READ\n");
break; break;
case PWR_CMD_WRITE: case PWR_CMD_WRITE:
RT_TRACE(COMP_INIT, DBG_TRACE, RT_TRACE(COMP_INIT, DBG_TRACE,
("PWR_CMD_WRITE\n")); "PWR_CMD_WRITE\n");
offset = GET_PWR_CFG_OFFSET(pwr_cfg_cmd); offset = GET_PWR_CFG_OFFSET(pwr_cfg_cmd);
/*Read the value from system register*/ /*Read the value from system register*/
...@@ -87,7 +87,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -87,7 +87,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
case PWR_CMD_POLLING: case PWR_CMD_POLLING:
RT_TRACE(COMP_INIT, DBG_TRACE, RT_TRACE(COMP_INIT, DBG_TRACE,
("PWR_CMD_POLLING\n")); "PWR_CMD_POLLING\n");
b_polling_bit = false; b_polling_bit = false;
offset = GET_PWR_CFG_OFFSET(pwr_cfg_cmd); offset = GET_PWR_CFG_OFFSET(pwr_cfg_cmd);
...@@ -104,7 +104,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -104,7 +104,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
if (polling_count++ > max_polling_cnt) { if (polling_count++ > max_polling_cnt) {
RT_TRACE(COMP_INIT, DBG_LOUD, RT_TRACE(COMP_INIT, DBG_LOUD,
("polling fail\n")); "polling fail\n");
return false; return false;
} }
} while (!b_polling_bit); } while (!b_polling_bit);
...@@ -113,7 +113,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -113,7 +113,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
case PWR_CMD_DELAY: case PWR_CMD_DELAY:
RT_TRACE(COMP_INIT, DBG_TRACE, RT_TRACE(COMP_INIT, DBG_TRACE,
("PWR_CMD_DELAY\n")); "PWR_CMD_DELAY\n");
if (GET_PWR_CFG_VALUE(pwr_cfg_cmd) == if (GET_PWR_CFG_VALUE(pwr_cfg_cmd) ==
PWRSEQ_DELAY_US) PWRSEQ_DELAY_US)
udelay(GET_PWR_CFG_OFFSET(pwr_cfg_cmd)); udelay(GET_PWR_CFG_OFFSET(pwr_cfg_cmd));
...@@ -122,8 +122,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version, ...@@ -122,8 +122,7 @@ bool rtl92e_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
break; break;
case PWR_CMD_END: case PWR_CMD_END:
RT_TRACE(COMP_INIT, DBG_TRACE, RT_TRACE(COMP_INIT, DBG_TRACE, "PWR_CMD_END\n");
("PWR_CMD_END\n"));
return true; return true;
break; break;
......
...@@ -55,8 +55,8 @@ void rtl92ee_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) ...@@ -55,8 +55,8 @@ void rtl92ee_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
rtlphy->rfreg_chnlval[0]); rtlphy->rfreg_chnlval[0]);
break; break;
default: default:
RT_TRACE(COMP_ERR, DBG_EMERG, RT_TRACE(COMP_ERR, DBG_EMERG, "unknown bandwidth: %#X\n",
("unknown bandwidth: %#X\n", bandwidth)); bandwidth);
break; break;
} }
} }
...@@ -139,12 +139,12 @@ static bool _rtl92ee_phy_rf6052_config_parafile(struct ieee80211_hw *hw) ...@@ -139,12 +139,12 @@ static bool _rtl92ee_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
break; break;
} }
if (!rtstatus) { if (!rtstatus) {
RT_TRACE(COMP_INIT, DBG_TRACE, RT_TRACE(COMP_INIT, DBG_TRACE, "Radio[%d] Fail!!\n",
("Radio[%d] Fail!!", rfpath)); rfpath);
return false; return false;
} }
} }
RT_TRACE(COMP_INIT, DBG_TRACE, ("\n")); RT_TRACE(COMP_INIT, DBG_TRACE, "\n");
return rtstatus; return rtstatus;
} }
...@@ -171,8 +171,7 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw) ...@@ -171,8 +171,7 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw)
/* for firmware buf */ /* for firmware buf */
rtlpriv->rtlhal.pfirmware = vmalloc(0x8000); rtlpriv->rtlhal.pfirmware = vmalloc(0x8000);
if (!rtlpriv->rtlhal.pfirmware) { if (!rtlpriv->rtlhal.pfirmware) {
RT_TRACE(COMP_ERR, DBG_EMERG, RT_TRACE(COMP_ERR, DBG_EMERG, "Can't alloc buffer for fw\n");
("Can't alloc buffer for fw.\n"));
return 1; return 1;
} }
...@@ -180,13 +179,11 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw) ...@@ -180,13 +179,11 @@ int rtl92ee_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(COMP_ERR, DBG_EMERG, RT_TRACE(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(COMP_ERR, DBG_EMERG, RT_TRACE(COMP_ERR, DBG_EMERG, "Firmware is too big!\n");
("Firmware is too big!\n"));
release_firmware(firmware); release_firmware(firmware);
return 1; return 1;
} }
......
...@@ -531,9 +531,9 @@ bool rtl92ee_rx_query_desc(struct ieee80211_hw *hw, ...@@ -531,9 +531,9 @@ bool rtl92ee_rx_query_desc(struct ieee80211_hw *hw,
else else
status->wake_match = 0; status->wake_match = 0;
if (status->wake_match) if (status->wake_match)
RT_TRACE(COMP_RXDESC , DBG_LOUD, RT_TRACE(COMP_RXDESC, DBG_LOUD,
("GGGGGGGGGGGGGet Wakeup Packet!! WakeMatch =%d\n", "GGGGGGGGGGGGGet Wakeup Packet!! WakeMatch =%d\n",
status->wake_match)); status->wake_match);
rx_status->freq = hw->conf.chandef.chan->center_freq; rx_status->freq = hw->conf.chandef.chan->center_freq;
rx_status->band = hw->conf.chandef.chan->band; rx_status->band = hw->conf.chandef.chan->band;
...@@ -645,8 +645,8 @@ u16 rtl92ee_rx_desc_buff_remained_cnt(struct ieee80211_hw *hw , u8 queue_index) ...@@ -645,8 +645,8 @@ u16 rtl92ee_rx_desc_buff_remained_cnt(struct ieee80211_hw *hw , u8 queue_index)
if (write_point != rtlpci->rx_ring[queue_index].next_rx_rp) { if (write_point != rtlpci->rx_ring[queue_index].next_rx_rp) {
RT_TRACE(COMP_RXDESC, DBG_DMESG, RT_TRACE(COMP_RXDESC, DBG_DMESG,
("!!!write point is 0x%x, reg 0x3B4 value is 0x%x\n", "!!!write point is 0x%x, reg 0x3B4 value is 0x%x\n",
write_point, tmp_4byte)); write_point, tmp_4byte);
tmp_4byte = rtl_read_dword(rtlpriv, REG_RXQ_TXBD_IDX); tmp_4byte = rtl_read_dword(rtlpriv, REG_RXQ_TXBD_IDX);
read_point = (u16)((tmp_4byte>>16) & 0x7ff); read_point = (u16)((tmp_4byte>>16) & 0x7ff);
write_point = (u16)(tmp_4byte & 0x7ff); write_point = (u16)(tmp_4byte & 0x7ff);
...@@ -868,8 +868,7 @@ void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -868,8 +868,7 @@ void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw,
mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
RT_TRACE(COMP_SEND, DBG_TRACE, RT_TRACE(COMP_SEND, DBG_TRACE, "DMA mapping error\n");
("DMA mapping error"));
return; return;
} }
if (pbd_desc_tx != NULL) if (pbd_desc_tx != NULL)
...@@ -887,8 +886,8 @@ void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -887,8 +886,8 @@ void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw,
USB_HWDESC_HEADER_LEN + EM_HDR_LEN); USB_HWDESC_HEADER_LEN + EM_HDR_LEN);
if (ptcb_desc->empkt_num) { if (ptcb_desc->empkt_num) {
RT_TRACE(COMP_SEND, DBG_TRACE, RT_TRACE(COMP_SEND, DBG_TRACE,
("Insert 8 byte.pTcb->EMPktNum:%d\n", "Insert 8 byte.pTcb->EMPktNum:%d\n",
ptcb_desc->empkt_num)); ptcb_desc->empkt_num);
_rtl92ee_insert_emcontent(ptcb_desc, _rtl92ee_insert_emcontent(ptcb_desc,
(u8 *)(skb->data)); (u8 *)(skb->data));
} }
...@@ -990,7 +989,7 @@ void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -990,7 +989,7 @@ void rtl92ee_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(COMP_SEND, DBG_TRACE, RT_TRACE(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);
} }
...@@ -1013,7 +1012,7 @@ void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -1013,7 +1012,7 @@ void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw,
is_broadcast_ether_addr(ieee80211_get_DA(hdr))) { is_broadcast_ether_addr(ieee80211_get_DA(hdr))) {
SET_TX_DESC_BMC(pdesc, 1); SET_TX_DESC_BMC(pdesc, 1);
} }
RT_TRACE(COMP_SEND, DBG_TRACE, ("\n")); RT_TRACE(COMP_SEND, DBG_TRACE, "\n");
} }
void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw, void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw,
...@@ -1032,8 +1031,7 @@ void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw, ...@@ -1032,8 +1031,7 @@ void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw,
u8 txdesc_len = 40; u8 txdesc_len = 40;
if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
RT_TRACE(COMP_SEND, DBG_TRACE, RT_TRACE(COMP_SEND, DBG_TRACE, "DMA mapping error\n");
("DMA mapping error"));
return; return;
} }
CLEAR_PCI_TX_DESC_CONTENT(pdesc, txdesc_len); CLEAR_PCI_TX_DESC_CONTENT(pdesc, txdesc_len);
...@@ -1278,7 +1276,7 @@ u32 rtl92ee_rx_command_packet(struct ieee80211_hw *hw, ...@@ -1278,7 +1276,7 @@ u32 rtl92ee_rx_command_packet(struct ieee80211_hw *hw,
result = 1; result = 1;
break; break;
default: default:
RT_TRACE(COMP_RECV, DBG_TRACE, ("No this packet type!!\n")); RT_TRACE(COMP_RECV, DBG_TRACE, "No this packet type!!\n");
break; break;
} }
......
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