Skip to content

Commit

Permalink
rtlwifi_new: Add rtlpriv to every RT_TRACE call
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Finger <[email protected]>
  • Loading branch information
lwfinger committed Aug 7, 2014
1 parent 06dae10 commit 72390d5
Show file tree
Hide file tree
Showing 82 changed files with 2,608 additions and 2,609 deletions.
64 changes: 32 additions & 32 deletions base.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
*highest supported RX rate
*/
if (rtlpriv->dm.supp_phymode_switch) {
RT_TRACE(COMP_INIT, DBG_EMERG, ("Support phy mode switch\n"));
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, ("Support phy mode switch\n"));

ht_cap->mcs.rx_mask[0] = 0xFF;
ht_cap->mcs.rx_mask[1] = 0xFF;
Expand All @@ -222,7 +222,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) {

RT_TRACE(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[1] = 0xFF;
Expand All @@ -232,7 +232,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15);
} else if (get_rf_type(rtlphy) == RF_1T1R) {

RT_TRACE(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[1] = 0x00;
Expand Down Expand Up @@ -400,7 +400,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
/* <4> set mac->sband to wiphy->sband */
hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
} else {
RT_TRACE(COMP_INIT, DBG_EMERG, ("Err BAND %d\n",
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, ("Err BAND %d\n",
rtlhal->current_bandtype));
}
}
Expand Down Expand Up @@ -592,7 +592,7 @@ int rtl_init_core(struct ieee80211_hw *hw)
* mac80211 hw in _rtl_init_mac80211.
*/
if (rtl_regd_init(hw, rtl_reg_notifier)) {
RT_TRACE(COMP_ERR, DBG_EMERG, ("REGD init failed\n"));
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("REGD init failed\n"));
return 1;
}

Expand Down Expand Up @@ -1015,7 +1015,7 @@ bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb)
rtlpriv->cfg->ops->check_switch_to_dmdp(hw);
}
if (ieee80211_is_auth(fc)) {
RT_TRACE(COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n"));
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n"));
rtl_ips_nic_on(hw);

mac->link_state = MAC80211_LINKING;
Expand Down Expand Up @@ -1051,7 +1051,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
if (mac->act_scanning)
return false;

RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG,
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
("%s ACT_ADDBAREQ From :%pM\n",
is_tx ? "Tx" : "Rx", hdr->addr2));
RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, ("req\n"),
Expand All @@ -1068,7 +1068,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
rcu_read_lock();
sta = rtl_find_sta(hw, hdr->addr3);
if (sta == NULL) {
RT_TRACE((COMP_SEND | COMP_RECV),
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV),
DBG_EMERG, ("sta is NULL\n"));
rcu_read_unlock();
return true;
Expand Down Expand Up @@ -1118,12 +1118,12 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
}
break;
case ACT_ADDBARSP:
RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG,
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
("%s ACT_ADDBARSP From :%pM\n",
is_tx ? "Tx" : "Rx", hdr->addr2));
break;
case ACT_DELBA:
RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG,
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
("ACT_ADDBADEL From :%pM\n", hdr->addr2));
break;
}
Expand Down Expand Up @@ -1167,7 +1167,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
* 68 : UDP BOOTP client
* 67 : UDP BOOTP server
*/
RT_TRACE((COMP_SEND | COMP_RECV),
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV),
DBG_DMESG, ("dhcp %s !!\n",
(is_tx) ? "Tx" : "Rx"));

Expand Down Expand Up @@ -1196,7 +1196,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)

return true;
} else if (ETH_P_PAE == ether_type) {
RT_TRACE((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"));

if (is_tx) {
Expand Down Expand Up @@ -1239,7 +1239,7 @@ int rtl_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
return -ENXIO;
tid_data = &sta_entry->tids[tid];

RT_TRACE(COMP_SEND, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG,
("on ra = %pM tid = %d seq:%d\n", sta->addr, tid,
tid_data->seq_number));

Expand All @@ -1262,11 +1262,11 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif,

/* Comparing an array to null is not useful */
/*if (!sta->addr) {
RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n"));
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("ra = NULL\n"));
return -EINVAL;
}*/

RT_TRACE(COMP_SEND, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG,
("on ra = %pM tid = %d\n", sta->addr, tid));

if (unlikely(tid >= MAX_TID_COUNT))
Expand Down Expand Up @@ -1298,7 +1298,7 @@ int rtl_rx_agg_start(struct ieee80211_hw *hw,
return -ENXIO;
tid_data = &sta_entry->tids[tid];

RT_TRACE(COMP_RECV, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_RECV, DBG_DMESG,
("on ra = %pM tid = %d seq:%d\n", sta->addr, tid,
tid_data->seq_number));

Expand All @@ -1318,11 +1318,11 @@ int rtl_rx_agg_stop(struct ieee80211_hw *hw,

/* Comparing an array to null is not useful */
/*if (!sta->addr) {
RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n"));
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("ra = NULL\n"));
return -EINVAL;
}*/

RT_TRACE(COMP_SEND, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG,
("on ra = %pM tid = %d\n", sta->addr, tid));

if (unlikely(tid >= MAX_TID_COUNT))
Expand All @@ -1346,11 +1346,11 @@ int rtl_tx_agg_oper(struct ieee80211_hw *hw,

/* Comparing an array to null is not useful */
/*if (!sta->addr) {
RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n"));
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("ra = NULL\n"));
return -EINVAL;
}*/

RT_TRACE(COMP_SEND, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG,
("on ra = %pM tid = %d\n", sta->addr, tid));

if (unlikely(tid >= MAX_TID_COUNT))
Expand Down Expand Up @@ -1533,13 +1533,13 @@ void rtl_watchdog_wq_callback(void *data)
if ((rtlpriv->link_info.bcn_rx_inperiod +
rtlpriv->link_info.num_rx_inperiod) == 0) {
rtlpriv->link_info.roam_times++;
RT_TRACE(COMP_ERR, DBG_DMESG, ("AP off for %d s\n",
RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG, ("AP off for %d s\n",
(rtlpriv->link_info.roam_times * 2)));

/* if we can't recv beacon for 10s,
* we should reconnect this AP */
if (rtlpriv->link_info.roam_times >= 5) {
RT_TRACE(COMP_ERR, DBG_EMERG,
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("AP off, try to reconnect now\n"));
rtlpriv->link_info.roam_times = 0;
ieee80211_connection_loss(
Expand Down Expand Up @@ -1885,29 +1885,29 @@ void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len)
(memcmp(mac->bssid, ap5_6, 3) == 0) ||
vendor == PEER_ATH) {
vendor = PEER_ATH;
RT_TRACE(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) ||
(memcmp(mac->bssid, ap4_5, 3) == 0) ||
(memcmp(mac->bssid, ap4_1, 3) == 0) ||
(memcmp(mac->bssid, ap4_2, 3) == 0) ||
(memcmp(mac->bssid, ap4_3, 3) == 0) ||
vendor == PEER_RAL) {
RT_TRACE(COMP_MAC80211, DBG_LOUD, ("=>ral findn\n"));
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, ("=>ral findn\n"));
vendor = PEER_RAL;
} else if (memcmp(mac->bssid, ap6_1, 3) == 0 ||
vendor == PEER_CISCO) {
vendor = PEER_CISCO;
RT_TRACE(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) ||
(memcmp(mac->bssid, ap3_2, 3) == 0) ||
(memcmp(mac->bssid, ap3_3, 3) == 0) ||
vendor == PEER_BROAD) {
RT_TRACE(COMP_MAC80211, DBG_LOUD, ("=>broad find\n"));
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, ("=>broad find\n"));
vendor = PEER_BROAD;
} else if (memcmp(mac->bssid, ap7_1, 3) == 0 ||
vendor == PEER_MARV) {
vendor = PEER_MARV;
RT_TRACE(COMP_MAC80211, DBG_LOUD, ("=>marv find\n"));
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD, ("=>marv find\n"));
}

mac->vendor = vendor;
Expand Down Expand Up @@ -1940,11 +1940,11 @@ static ssize_t rtl_store_debug_level(struct device *d,
ret = strict_strtoul(buf, 0, &val);
if (ret) {

RT_TRACE(COMP_ERR, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG,
("%s is not in hex or decimal form.\n", buf));
} else {
rtlpriv->dbg.global_debuglevel = val;
RT_TRACE(COMP_ERR, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG,
("debuglevel:%x\n",
rtlpriv->dbg.global_debuglevel));
}
Expand Down Expand Up @@ -2018,7 +2018,7 @@ bool rtl_set_vif_info(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
int vif_id = -1;

if (rtlpriv->vif_priv.vifs >= MAX_VIRTUAL_MAC) {
RT_TRACE(COMP_ERR, DBG_WARNING,
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("vif number can not bigger than %d, now vifs is:%d\n",
MAX_VIRTUAL_MAC, rtlpriv->vif_priv.vifs));
return false;
Expand All @@ -2027,7 +2027,7 @@ bool rtl_set_vif_info(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
rcu_read_lock();
vif_id = bitmap_find_free_region(&rtlpriv->vif_priv.vif_bitmap,
MAX_VIRTUAL_MAC, 0);
RT_TRACE(COMP_MAC80211, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG,
("%s vid_id:%d\n", __func__, vif_id));

if (vif_id < 0) {
Expand All @@ -2049,7 +2049,7 @@ bool rtl_set_vif_info(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
list_add_tail_rcu(&vif_info->list, &rtlpriv->vif_priv.vif_list);
rcu_assign_pointer(rtlpriv->vif_priv.vif[vif_id].vif, vif);

RT_TRACE(COMP_MAC80211, DBG_DMESG, ("vifaddress:%p %p %p\n",
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, ("vifaddress:%p %p %p\n",
rtlpriv->vif_priv.vif[vif_id].vif, vif, rtl_get_main_vif(hw)));

rcu_read_unlock();
Expand Down
6 changes: 3 additions & 3 deletions btcoexist/rtl_btc.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ void rtl_btc_init_hal_vars(struct rtl_priv *rtlpriv)
u8 bt_exist;
u8 bt_type;
ant_num = rtl_get_hwpg_ant_num(rtlpriv);
RT_TRACE(COMP_INIT, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("%s, antNum is %d\n", __func__, ant_num));

bt_exist = rtl_get_hwpg_bt_exist(rtlpriv);
RT_TRACE(COMP_INIT, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("%s, bt_exist is %d\n", __func__, bt_exist));
exhalbtc_set_bt_exist(bt_exist);

bt_type = rtl_get_hwpg_bt_type(rtlpriv);
RT_TRACE(COMP_INIT, DBG_DMESG,
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
("%s, bt_type is %d\n", __func__, bt_type));
exhalbtc_set_chip_type(bt_type);

Expand Down
Loading

0 comments on commit 72390d5

Please sign in to comment.