Skip to content

Commit

Permalink
wireless: rtlwifi: throw away MAC_FMT and use %pM instead
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: Larry Finger <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
andy-shev authored and linvjw committed Jul 20, 2011
1 parent a401d2b commit 1d15b5f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 19 deletions.
11 changes: 5 additions & 6 deletions drivers/net/wireless/rtlwifi/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,18 +756,17 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
return false;

RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
("%s ACT_ADDBAREQ From :" MAC_FMT "\n",
is_tx ? "Tx" : "Rx", MAC_ARG(hdr->addr2)));
("%s ACT_ADDBAREQ From :%pM\n",
is_tx ? "Tx" : "Rx", hdr->addr2));
break;
case ACT_ADDBARSP:
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
("%s ACT_ADDBARSP From :" MAC_FMT "\n",
is_tx ? "Tx" : "Rx", MAC_ARG(hdr->addr2)));
("%s ACT_ADDBARSP From :%pM\n",
is_tx ? "Tx" : "Rx", hdr->addr2));
break;
case ACT_DELBA:
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
("ACT_ADDBADEL From :" MAC_FMT "\n",
MAC_ARG(hdr->addr2)));
("ACT_ADDBADEL From :%pM\n", hdr->addr2));
break;
}
break;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/rtlwifi/cam.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,

RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
("EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, "
"ulUseDK=%x MacAddr" MAC_FMT "\n",
"ulUseDK=%x MacAddr %pM\n",
ul_entry_idx, ul_key_id, ul_enc_alg,
ul_default_key, MAC_ARG(mac_addr)));
ul_default_key, mac_addr));

if (ul_key_id == TOTAL_CAM_ENTRY) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/rtlwifi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ static int rtl_op_sta_add(struct ieee80211_hw *hw,
sta_entry->wireless_mode = WIRELESS_MODE_G;

RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG,
("Add sta addr is "MAC_FMT"\n", MAC_ARG(sta->addr)));
("Add sta addr is %pM\n", sta->addr));
rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
}
return 0;
Expand All @@ -469,7 +469,7 @@ static int rtl_op_sta_remove(struct ieee80211_hw *hw,
struct rtl_sta_info *sta_entry;
if (sta) {
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG,
("Remove sta addr is "MAC_FMT"\n", MAC_ARG(sta->addr)));
("Remove sta addr is %pM\n", sta->addr));
sta_entry = (struct rtl_sta_info *) sta->drv_priv;
sta_entry->wireless_mode = 0;
sta_entry->ratr_index = 0;
Expand Down Expand Up @@ -678,7 +678,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
(u8 *) bss_conf->bssid);

RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG,
(MAC_FMT "\n", MAC_ARG(bss_conf->bssid)));
("%pM\n", bss_conf->bssid));

mac->vendor = PEER_UNKNOWN;
memcpy(mac->bssid, bss_conf->bssid, 6);
Expand Down
5 changes: 0 additions & 5 deletions drivers/net/wireless/rtlwifi/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,5 @@ enum dbgp_flag_e {
} \
} while (0);

#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ARG(x) \
((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2],\
((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5]

void rtl_dbgp_flag_init(struct ieee80211_hw *hw);
#endif
2 changes: 1 addition & 1 deletion drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw)
}

RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
(MAC_FMT "\n", MAC_ARG(rtlefuse->dev_addr)));
("%pM\n", rtlefuse->dev_addr));

_rtl92ce_read_txpower_info_from_hwpg(hw,
rtlefuse->autoload_failflag,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rtlwifi/rtl8192de/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,7 @@ static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw)
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR,
rtlefuse->dev_addr);
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
(MAC_FMT "\n", MAC_ARG(rtlefuse->dev_addr)));
("%pM\n", rtlefuse->dev_addr));
_rtl92de_read_txpower_info(hw, rtlefuse->autoload_failflag, hwinfo);

/* Read Channel Plan */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rtlwifi/rtl8192se/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw)
rtl_write_byte(rtlpriv, MACIDR0 + i, rtlefuse->dev_addr[i]);

RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
(MAC_FMT "\n", MAC_ARG(rtlefuse->dev_addr)));
("%pM\n", rtlefuse->dev_addr));

/* Get Tx Power Level by Channel */
/* Read Tx power of Channel 1 ~ 14 from EEPROM. */
Expand Down

0 comments on commit 1d15b5f

Please sign in to comment.