Commit 0c68ae26 authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller

mac80211: convert to %pM away from print_mac

Also remove a few stray DECLARE_MAC_BUF that were no longer
used at all.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dd45c9cf
...@@ -188,7 +188,6 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key) ...@@ -188,7 +188,6 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
{ {
static int keycount; static int keycount;
char buf[50]; char buf[50];
DECLARE_MAC_BUF(mac);
struct sta_info *sta; struct sta_info *sta;
if (!key->local->debugfs.keys) if (!key->local->debugfs.keys)
...@@ -206,8 +205,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key) ...@@ -206,8 +205,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
rcu_read_lock(); rcu_read_lock();
sta = rcu_dereference(key->sta); sta = rcu_dereference(key->sta);
if (sta) if (sta)
sprintf(buf, "../../stations/%s", sprintf(buf, "../../stations/%pM", sta->sta.addr);
print_mac(mac, sta->sta.addr));
rcu_read_unlock(); rcu_read_unlock();
/* using sta as a boolean is fine outside RCU lock */ /* using sta as a boolean is fine outside RCU lock */
......
...@@ -104,8 +104,7 @@ static ssize_t ieee80211_if_fmt_##name( \ ...@@ -104,8 +104,7 @@ static ssize_t ieee80211_if_fmt_##name( \
const struct ieee80211_sub_if_data *sdata, char *buf, \ const struct ieee80211_sub_if_data *sdata, char *buf, \
int buflen) \ int buflen) \
{ \ { \
DECLARE_MAC_BUF(mac); \ return scnprintf(buf, buflen, "%pM\n", sdata->field); \
return scnprintf(buf, buflen, "%s\n", print_mac(mac, sdata->field));\
} }
#define __IEEE80211_IF_FILE(name) \ #define __IEEE80211_IF_FILE(name) \
......
...@@ -246,15 +246,14 @@ STA_OPS_WR(agg_status); ...@@ -246,15 +246,14 @@ STA_OPS_WR(agg_status);
void ieee80211_sta_debugfs_add(struct sta_info *sta) void ieee80211_sta_debugfs_add(struct sta_info *sta)
{ {
struct dentry *stations_dir = sta->local->debugfs.stations; struct dentry *stations_dir = sta->local->debugfs.stations;
DECLARE_MAC_BUF(mbuf); u8 mac[3*ETH_ALEN];
u8 *mac;
sta->debugfs.add_has_run = true; sta->debugfs.add_has_run = true;
if (!stations_dir) if (!stations_dir)
return; return;
mac = print_mac(mbuf, sta->sta.addr); snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
/* /*
* This might fail due to a race condition: * This might fail due to a race condition:
......
...@@ -21,14 +21,13 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke ...@@ -21,14 +21,13 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke
{ {
union iwreq_data wrqu; union iwreq_data wrqu;
char *buf = kmalloc(128, GFP_ATOMIC); char *buf = kmalloc(128, GFP_ATOMIC);
DECLARE_MAC_BUF(mac);
if (buf) { if (buf) {
/* TODO: needed parameters: count, key type, TSC */ /* TODO: needed parameters: count, key type, TSC */
sprintf(buf, "MLME-MICHAELMICFAILURE.indication(" sprintf(buf, "MLME-MICHAELMICFAILURE.indication("
"keyid=%d %scast addr=%s)", "keyid=%d %scast addr=%pM)",
keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni", keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni",
print_mac(mac, hdr->addr2)); hdr->addr2);
memset(&wrqu, 0, sizeof(wrqu)); memset(&wrqu, 0, sizeof(wrqu));
wrqu.data.length = strlen(buf); wrqu.data.length = strlen(buf);
wireless_send_event(sdata->dev, IWEVCUSTOM, &wrqu, buf); wireless_send_event(sdata->dev, IWEVCUSTOM, &wrqu, buf);
......
...@@ -241,7 +241,6 @@ void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *r ...@@ -241,7 +241,6 @@ void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *r
struct ieee80211_hw *hw = &local->hw; struct ieee80211_hw *hw = &local->hw;
struct sta_info *sta; struct sta_info *sta;
int ret, i; int ret, i;
DECLARE_MAC_BUF(mac);
rcu_read_lock(); rcu_read_lock();
...@@ -269,8 +268,8 @@ void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *r ...@@ -269,8 +268,8 @@ void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *r
BUG_ON(!local->ops->ampdu_action); BUG_ON(!local->ops->ampdu_action);
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Rx BA session stop requested for %s tid %u\n", printk(KERN_DEBUG "Rx BA session stop requested for %pM tid %u\n",
print_mac(mac, ra), tid); ra, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */ #endif /* CONFIG_MAC80211_HT_DEBUG */
ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_STOP, ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_STOP,
...@@ -383,14 +382,13 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) ...@@ -383,14 +382,13 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid)
u16 start_seq_num; u16 start_seq_num;
u8 *state; u8 *state;
int ret; int ret;
DECLARE_MAC_BUF(mac);
if (tid >= STA_TID_NUM) if (tid >= STA_TID_NUM)
return -EINVAL; return -EINVAL;
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Open BA session requested for %s tid %u\n", printk(KERN_DEBUG "Open BA session requested for %pM tid %u\n",
print_mac(mac, ra), tid); ra, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */ #endif /* CONFIG_MAC80211_HT_DEBUG */
rcu_read_lock(); rcu_read_lock();
...@@ -524,7 +522,6 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, ...@@ -524,7 +522,6 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw,
struct sta_info *sta; struct sta_info *sta;
u8 *state; u8 *state;
int ret = 0; int ret = 0;
DECLARE_MAC_BUF(mac);
if (tid >= STA_TID_NUM) if (tid >= STA_TID_NUM)
return -EINVAL; return -EINVAL;
...@@ -546,8 +543,8 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, ...@@ -546,8 +543,8 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw,
} }
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Tx BA session stop requested for %s tid %u\n", printk(KERN_DEBUG "Tx BA session stop requested for %pM tid %u\n",
print_mac(mac, ra), tid); ra, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */ #endif /* CONFIG_MAC80211_HT_DEBUG */
ieee80211_stop_queue(hw, sta->tid_to_tx_q[tid]); ieee80211_stop_queue(hw, sta->tid_to_tx_q[tid]);
...@@ -579,7 +576,6 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid) ...@@ -579,7 +576,6 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid)
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
struct sta_info *sta; struct sta_info *sta;
u8 *state; u8 *state;
DECLARE_MAC_BUF(mac);
if (tid >= STA_TID_NUM) { if (tid >= STA_TID_NUM) {
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
...@@ -594,8 +590,7 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid) ...@@ -594,8 +590,7 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid)
if (!sta) { if (!sta) {
rcu_read_unlock(); rcu_read_unlock();
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Could not find station: %s\n", printk(KERN_DEBUG "Could not find station: %pM\n", ra);
print_mac(mac, ra));
#endif #endif
return; return;
} }
...@@ -634,7 +629,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) ...@@ -634,7 +629,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid)
struct sta_info *sta; struct sta_info *sta;
u8 *state; u8 *state;
int agg_queue; int agg_queue;
DECLARE_MAC_BUF(mac);
if (tid >= STA_TID_NUM) { if (tid >= STA_TID_NUM) {
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
...@@ -645,16 +639,15 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) ...@@ -645,16 +639,15 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid)
} }
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Stopping Tx BA session for %s tid %d\n", printk(KERN_DEBUG "Stopping Tx BA session for %pM tid %d\n",
print_mac(mac, ra), tid); ra, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */ #endif /* CONFIG_MAC80211_HT_DEBUG */
rcu_read_lock(); rcu_read_lock();
sta = sta_info_get(local, ra); sta = sta_info_get(local, ra);
if (!sta) { if (!sta) {
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Could not find station: %s\n", printk(KERN_DEBUG "Could not find station: %pM\n", ra);
print_mac(mac, ra));
#endif #endif
rcu_read_unlock(); rcu_read_unlock();
return; return;
...@@ -783,7 +776,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, ...@@ -783,7 +776,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num, status; u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num, status;
u8 dialog_token; u8 dialog_token;
int ret = -EOPNOTSUPP; int ret = -EOPNOTSUPP;
DECLARE_MAC_BUF(mac);
/* extract session parameters from addba request frame */ /* extract session parameters from addba request frame */
dialog_token = mgmt->u.action.u.addba_req.dialog_token; dialog_token = mgmt->u.action.u.addba_req.dialog_token;
...@@ -808,8 +800,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, ...@@ -808,8 +800,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_DEBUG "AddBA Req with bad params from " printk(KERN_DEBUG "AddBA Req with bad params from "
"%s on tid %u. policy %d, buffer size %d\n", "%pM on tid %u. policy %d, buffer size %d\n",
print_mac(mac, mgmt->sa), tid, ba_policy, mgmt->sa, tid, ba_policy,
buf_size); buf_size);
#endif /* CONFIG_MAC80211_HT_DEBUG */ #endif /* CONFIG_MAC80211_HT_DEBUG */
goto end_no_lock; goto end_no_lock;
...@@ -831,8 +823,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, ...@@ -831,8 +823,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_DEBUG "unexpected AddBA Req from " printk(KERN_DEBUG "unexpected AddBA Req from "
"%s on tid %u\n", "%pM on tid %u\n",
print_mac(mac, mgmt->sa), tid); mgmt->sa, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */ #endif /* CONFIG_MAC80211_HT_DEBUG */
goto end; goto end;
} }
...@@ -964,7 +956,6 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, ...@@ -964,7 +956,6 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
u16 tid, params; u16 tid, params;
u16 initiator; u16 initiator;
DECLARE_MAC_BUF(mac);
params = le16_to_cpu(mgmt->u.action.u.delba.params); params = le16_to_cpu(mgmt->u.action.u.delba.params);
tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12; tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12;
...@@ -972,9 +963,8 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, ...@@ -972,9 +963,8 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_DEBUG "delba from %s (%s) tid %d reason code %d\n", printk(KERN_DEBUG "delba from %pM (%s) tid %d reason code %d\n",
print_mac(mac, mgmt->sa), mgmt->sa, initiator ? "initiator" : "recipient", tid,
initiator ? "initiator" : "recipient", tid,
mgmt->u.action.u.delba.reason_code); mgmt->u.action.u.delba.reason_code);
#endif /* CONFIG_MAC80211_HT_DEBUG */ #endif /* CONFIG_MAC80211_HT_DEBUG */
......
...@@ -132,7 +132,6 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key) ...@@ -132,7 +132,6 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
{ {
const u8 *addr; const u8 *addr;
int ret; int ret;
DECLARE_MAC_BUF(mac);
assert_key_lock(); assert_key_lock();
might_sleep(); might_sleep();
...@@ -154,16 +153,15 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key) ...@@ -154,16 +153,15 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP) if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP)
printk(KERN_ERR "mac80211-%s: failed to set key " printk(KERN_ERR "mac80211-%s: failed to set key "
"(%d, %s) to hardware (%d)\n", "(%d, %pM) to hardware (%d)\n",
wiphy_name(key->local->hw.wiphy), wiphy_name(key->local->hw.wiphy),
key->conf.keyidx, print_mac(mac, addr), ret); key->conf.keyidx, addr, ret);
} }
static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
{ {
const u8 *addr; const u8 *addr;
int ret; int ret;
DECLARE_MAC_BUF(mac);
assert_key_lock(); assert_key_lock();
might_sleep(); might_sleep();
...@@ -186,9 +184,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) ...@@ -186,9 +184,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
if (ret) if (ret)
printk(KERN_ERR "mac80211-%s: failed to remove key " printk(KERN_ERR "mac80211-%s: failed to remove key "
"(%d, %s) from hardware (%d)\n", "(%d, %pM) from hardware (%d)\n",
wiphy_name(key->local->hw.wiphy), wiphy_name(key->local->hw.wiphy),
key->conf.keyidx, print_mac(mac, addr), ret); key->conf.keyidx, addr, ret);
spin_lock(&todo_lock); spin_lock(&todo_lock);
key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE;
......
...@@ -257,9 +257,6 @@ static void mesh_plink_timer(unsigned long data) ...@@ -257,9 +257,6 @@ static void mesh_plink_timer(unsigned long data)
struct sta_info *sta; struct sta_info *sta;
__le16 llid, plid, reason; __le16 llid, plid, reason;
struct ieee80211_sub_if_data *sdata; struct ieee80211_sub_if_data *sdata;
#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
DECLARE_MAC_BUF(mac);
#endif
/* /*
* This STA is valid because sta_info_destroy() will * This STA is valid because sta_info_destroy() will
...@@ -274,8 +271,8 @@ static void mesh_plink_timer(unsigned long data) ...@@ -274,8 +271,8 @@ static void mesh_plink_timer(unsigned long data)
spin_unlock_bh(&sta->lock); spin_unlock_bh(&sta->lock);
return; return;
} }
mpl_dbg("Mesh plink timer for %s fired on state %d\n", mpl_dbg("Mesh plink timer for %pM fired on state %d\n",
print_mac(mac, sta->sta.addr), sta->plink_state); sta->sta.addr, sta->plink_state);
reason = 0; reason = 0;
llid = sta->llid; llid = sta->llid;
plid = sta->plid; plid = sta->plid;
...@@ -287,9 +284,9 @@ static void mesh_plink_timer(unsigned long data) ...@@ -287,9 +284,9 @@ static void mesh_plink_timer(unsigned long data)
/* retry timer */ /* retry timer */
if (sta->plink_retries < dot11MeshMaxRetries(sdata)) { if (sta->plink_retries < dot11MeshMaxRetries(sdata)) {
u32 rand; u32 rand;
mpl_dbg("Mesh plink for %s (retry, timeout): %d %d\n", mpl_dbg("Mesh plink for %pM (retry, timeout): %d %d\n",
print_mac(mac, sta->sta.addr), sta->sta.addr, sta->plink_retries,
sta->plink_retries, sta->plink_timeout); sta->plink_timeout);
get_random_bytes(&rand, sizeof(u32)); get_random_bytes(&rand, sizeof(u32));
sta->plink_timeout = sta->plink_timeout + sta->plink_timeout = sta->plink_timeout +
rand % sta->plink_timeout; rand % sta->plink_timeout;
...@@ -337,9 +334,6 @@ int mesh_plink_open(struct sta_info *sta) ...@@ -337,9 +334,6 @@ int mesh_plink_open(struct sta_info *sta)
{ {
__le16 llid; __le16 llid;
struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_sub_if_data *sdata = sta->sdata;
#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
DECLARE_MAC_BUF(mac);
#endif
spin_lock_bh(&sta->lock); spin_lock_bh(&sta->lock);
get_random_bytes(&llid, 2); get_random_bytes(&llid, 2);
...@@ -351,8 +345,8 @@ int mesh_plink_open(struct sta_info *sta) ...@@ -351,8 +345,8 @@ int mesh_plink_open(struct sta_info *sta)
sta->plink_state = PLINK_OPN_SNT; sta->plink_state = PLINK_OPN_SNT;
mesh_plink_timer_set(sta, dot11MeshRetryTimeout(sdata)); mesh_plink_timer_set(sta, dot11MeshRetryTimeout(sdata));
spin_unlock_bh(&sta->lock); spin_unlock_bh(&sta->lock);
mpl_dbg("Mesh plink: starting establishment with %s\n", mpl_dbg("Mesh plink: starting establishment with %pM\n",
print_mac(mac, sta->sta.addr)); sta->sta.addr);
return mesh_plink_frame_tx(sdata, PLINK_OPEN, return mesh_plink_frame_tx(sdata, PLINK_OPEN,
sta->sta.addr, llid, 0, 0); sta->sta.addr, llid, 0, 0);
...@@ -360,10 +354,6 @@ int mesh_plink_open(struct sta_info *sta) ...@@ -360,10 +354,6 @@ int mesh_plink_open(struct sta_info *sta)
void mesh_plink_block(struct sta_info *sta) void mesh_plink_block(struct sta_info *sta)
{ {
#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
DECLARE_MAC_BUF(mac);
#endif
spin_lock_bh(&sta->lock); spin_lock_bh(&sta->lock);
__mesh_plink_deactivate(sta); __mesh_plink_deactivate(sta);
sta->plink_state = PLINK_BLOCKED; sta->plink_state = PLINK_BLOCKED;
...@@ -374,12 +364,8 @@ int mesh_plink_close(struct sta_info *sta) ...@@ -374,12 +364,8 @@ int mesh_plink_close(struct sta_info *sta)
{ {
struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_sub_if_data *sdata = sta->sdata;
__le16 llid, plid, reason; __le16 llid, plid, reason;
#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
DECLARE_MAC_BUF(mac);
#endif
mpl_dbg("Mesh plink: closing link with %s\n", mpl_dbg("Mesh plink: closing link with %pM\n", sta->sta.addr);
print_mac(mac, sta->sta.addr));
spin_lock_bh(&sta->lock); spin_lock_bh(&sta->lock);
sta->reason = cpu_to_le16(MESH_LINK_CANCELLED); sta->reason = cpu_to_le16(MESH_LINK_CANCELLED);
reason = sta->reason; reason = sta->reason;
...@@ -417,9 +403,6 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m ...@@ -417,9 +403,6 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
u8 ie_len; u8 ie_len;
u8 *baseaddr; u8 *baseaddr;
__le16 plid, llid, reason; __le16 plid, llid, reason;
#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
DECLARE_MAC_BUF(mac);
#endif
/* need action_code, aux */ /* need action_code, aux */
if (len < IEEE80211_MIN_ACTION_SIZE + 3) if (len < IEEE80211_MIN_ACTION_SIZE + 3)
...@@ -557,10 +540,10 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m ...@@ -557,10 +540,10 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
} }
} }
mpl_dbg("Mesh plink (peer, state, llid, plid, event): %s %d %d %d %d\n", mpl_dbg("Mesh plink (peer, state, llid, plid, event): %pM %d %d %d %d\n",
print_mac(mac, mgmt->sa), sta->plink_state, mgmt->sa, sta->plink_state,
le16_to_cpu(sta->llid), le16_to_cpu(sta->plid), le16_to_cpu(sta->llid), le16_to_cpu(sta->plid),
event); event);
reason = 0; reason = 0;
switch (sta->plink_state) { switch (sta->plink_state) {
/* spin_unlock as soon as state is updated at each case */ /* spin_unlock as soon as state is updated at each case */
...@@ -660,8 +643,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m ...@@ -660,8 +643,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
sta->plink_state = PLINK_ESTAB; sta->plink_state = PLINK_ESTAB;
mesh_plink_inc_estab_count(sdata); mesh_plink_inc_estab_count(sdata);
spin_unlock_bh(&sta->lock); spin_unlock_bh(&sta->lock);
mpl_dbg("Mesh plink with %s ESTABLISHED\n", mpl_dbg("Mesh plink with %pM ESTABLISHED\n",
print_mac(mac, sta->sta.addr)); sta->sta.addr);
break; break;
default: default:
spin_unlock_bh(&sta->lock); spin_unlock_bh(&sta->lock);
...@@ -693,8 +676,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m ...@@ -693,8 +676,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
sta->plink_state = PLINK_ESTAB; sta->plink_state = PLINK_ESTAB;
mesh_plink_inc_estab_count(sdata); mesh_plink_inc_estab_count(sdata);
spin_unlock_bh(&sta->lock); spin_unlock_bh(&sta->lock);
mpl_dbg("Mesh plink with %s ESTABLISHED\n", mpl_dbg("Mesh plink with %pM ESTABLISHED\n",
print_mac(mac, sta->sta.addr)); sta->sta.addr);
mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid, mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid,
plid, 0); plid, 0);
break; break;
......
This diff is collapsed.
...@@ -653,13 +653,12 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx) ...@@ -653,13 +653,12 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
static void ap_sta_ps_start(struct sta_info *sta) static void ap_sta_ps_start(struct sta_info *sta)
{ {
struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_sub_if_data *sdata = sta->sdata;
DECLARE_MAC_BUF(mac);
atomic_inc(&sdata->bss->num_sta_ps); atomic_inc(&sdata->bss->num_sta_ps);
set_and_clear_sta_flags(sta, WLAN_STA_PS, WLAN_STA_PSPOLL); set_and_clear_sta_flags(sta, WLAN_STA_PS, WLAN_STA_PSPOLL);
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "%s: STA %s aid %d enters power save mode\n", printk(KERN_DEBUG "%s: STA %pM aid %d enters power save mode\n",
sdata->dev->name, print_mac(mac, sta->sta.addr), sta->sta.aid); sdata->dev->name, sta->sta.addr, sta->sta.aid);
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
} }
...@@ -670,7 +669,6 @@ static int ap_sta_ps_end(struct sta_info *sta) ...@@ -670,7 +669,6 @@ static int ap_sta_ps_end(struct sta_info *sta)
struct sk_buff *skb; struct sk_buff *skb;
int sent = 0; int sent = 0;
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
DECLARE_MAC_BUF(mac);
atomic_dec(&sdata->bss->num_sta_ps); atomic_dec(&sdata->bss->num_sta_ps);
...@@ -680,8 +678,8 @@ static int ap_sta_ps_end(struct sta_info *sta) ...@@ -680,8 +678,8 @@ static int ap_sta_ps_end(struct sta_info *sta)
sta_info_clear_tim_bit(sta); sta_info_clear_tim_bit(sta);
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "%s: STA %s aid %d exits power save mode\n", printk(KERN_DEBUG "%s: STA %pM aid %d exits power save mode\n",
sdata->dev->name, print_mac(mac, sta->sta.addr), sta->sta.aid); sdata->dev->name, sta->sta.addr, sta->sta.aid);
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
/* Send all buffered frames to the station */ /* Send all buffered frames to the station */
...@@ -696,9 +694,9 @@ static int ap_sta_ps_end(struct sta_info *sta) ...@@ -696,9 +694,9 @@ static int ap_sta_ps_end(struct sta_info *sta)
local->total_ps_buffered--; local->total_ps_buffered--;
sent++; sent++;
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "%s: STA %s aid %d send PS frame " printk(KERN_DEBUG "%s: STA %pM aid %d send PS frame "
"since STA not sleeping anymore\n", sdata->dev->name, "since STA not sleeping anymore\n", sdata->dev->name,
print_mac(mac, sta->sta.addr), sta->sta.aid); sta->sta.addr, sta->sta.aid);
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
info->flags |= IEEE80211_TX_CTL_REQUEUE; info->flags |= IEEE80211_TX_CTL_REQUEUE;
dev_queue_xmit(skb); dev_queue_xmit(skb);
...@@ -789,15 +787,12 @@ ieee80211_reassemble_add(struct ieee80211_sub_if_data *sdata, ...@@ -789,15 +787,12 @@ ieee80211_reassemble_add(struct ieee80211_sub_if_data *sdata,
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
struct ieee80211_hdr *hdr = struct ieee80211_hdr *hdr =
(struct ieee80211_hdr *) entry->skb_list.next->data; (struct ieee80211_hdr *) entry->skb_list.next->data;
DECLARE_MAC_BUF(mac);
DECLARE_MAC_BUF(mac2);
printk(KERN_DEBUG "%s: RX reassembly removed oldest " printk(KERN_DEBUG "%s: RX reassembly removed oldest "
"fragment entry (idx=%d age=%lu seq=%d last_frag=%d " "fragment entry (idx=%d age=%lu seq=%d last_frag=%d "
"addr1=%s addr2=%s\n", "addr1=%pM addr2=%pM\n",
sdata->dev->name, idx, sdata->dev->name, idx,
jiffies - entry->first_frag_time, entry->seq, jiffies - entry->first_frag_time, entry->seq,
entry->last_frag, print_mac(mac, hdr->addr1), entry->last_frag, hdr->addr1, hdr->addr2);
print_mac(mac2, hdr->addr2));
#endif #endif
__skb_queue_purge(&entry->skb_list); __skb_queue_purge(&entry->skb_list);
} }
...@@ -866,7 +861,6 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx) ...@@ -866,7 +861,6 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
unsigned int frag, seq; unsigned int frag, seq;
struct ieee80211_fragment_entry *entry; struct ieee80211_fragment_entry *entry;
struct sk_buff *skb; struct sk_buff *skb;
DECLARE_MAC_BUF(mac);
hdr = (struct ieee80211_hdr *)rx->skb->data; hdr = (struct ieee80211_hdr *)rx->skb->data;
fc = hdr->frame_control; fc = hdr->frame_control;
...@@ -970,7 +964,6 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx) ...@@ -970,7 +964,6 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
struct sk_buff *skb; struct sk_buff *skb;
int no_pending_pkts; int no_pending_pkts;
DECLARE_MAC_BUF(mac);
__le16 fc = ((struct ieee80211_hdr *)rx->skb->data)->frame_control; __le16 fc = ((struct ieee80211_hdr *)rx->skb->data)->frame_control;
if (likely(!rx->sta || !ieee80211_is_pspoll(fc) || if (likely(!rx->sta || !ieee80211_is_pspoll(fc) ||
...@@ -1001,8 +994,8 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx) ...@@ -1001,8 +994,8 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
set_sta_flags(rx->sta, WLAN_STA_PSPOLL); set_sta_flags(rx->sta, WLAN_STA_PSPOLL);
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "STA %s aid %d: PS Poll (entries after %d)\n", printk(KERN_DEBUG "STA %pM aid %d: PS Poll (entries after %d)\n",
print_mac(mac, rx->sta->sta.addr), rx->sta->sta.aid, rx->sta->sta.addr, rx->sta->sta.aid,
skb_queue_len(&rx->sta->ps_tx_buf)); skb_queue_len(&rx->sta->ps_tx_buf));
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
...@@ -1025,9 +1018,9 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx) ...@@ -1025,9 +1018,9 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
* Should we send it a null-func frame indicating we * Should we send it a null-func frame indicating we
* have nothing buffered for it? * have nothing buffered for it?
*/ */
printk(KERN_DEBUG "%s: STA %s sent PS Poll even " printk(KERN_DEBUG "%s: STA %pM sent PS Poll even "
"though there are no buffered frames for it\n", "though there are no buffered frames for it\n",
rx->dev->name, print_mac(mac, rx->sta->sta.addr)); rx->dev->name, rx->sta->sta.addr);
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
} }
...@@ -1097,10 +1090,6 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) ...@@ -1097,10 +1090,6 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx)
u8 src[ETH_ALEN] __aligned(2); u8 src[ETH_ALEN] __aligned(2);
struct sk_buff *skb = rx->skb; struct sk_buff *skb = rx->skb;
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
DECLARE_MAC_BUF(mac);
DECLARE_MAC_BUF(mac2);
DECLARE_MAC_BUF(mac3);
DECLARE_MAC_BUF(mac4);
if (unlikely(!ieee80211_is_data_present(hdr->frame_control))) if (unlikely(!ieee80211_is_data_present(hdr->frame_control)))
return -1; return -1;
...@@ -1279,7 +1268,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx) ...@@ -1279,7 +1268,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx)
int remaining, err; int remaining, err;
u8 dst[ETH_ALEN]; u8 dst[ETH_ALEN];
u8 src[ETH_ALEN]; u8 src[ETH_ALEN];
DECLARE_MAC_BUF(mac);
if (unlikely(!ieee80211_is_data(fc))) if (unlikely(!ieee80211_is_data(fc)))
return RX_CONTINUE; return RX_CONTINUE;
...@@ -1632,8 +1620,6 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev, ...@@ -1632,8 +1620,6 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev,
{ {
int keyidx; int keyidx;
unsigned int hdrlen; unsigned int hdrlen;
DECLARE_MAC_BUF(mac);
DECLARE_MAC_BUF(mac2);
hdrlen = ieee80211_hdrlen(hdr->frame_control); hdrlen = ieee80211_hdrlen(hdr->frame_control);
if (rx->skb->len >= hdrlen + 4) if (rx->skb->len >= hdrlen + 4)
......
...@@ -137,14 +137,12 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx, ...@@ -137,14 +137,12 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx,
static void __sta_info_free(struct ieee80211_local *local, static void __sta_info_free(struct ieee80211_local *local,
struct sta_info *sta) struct sta_info *sta)
{ {
DECLARE_MAC_BUF(mbuf);
rate_control_free_sta(sta); rate_control_free_sta(sta);
rate_control_put(sta->rate_ctrl); rate_control_put(sta->rate_ctrl);
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
printk(KERN_DEBUG "%s: Destroyed STA %s\n", printk(KERN_DEBUG "%s: Destroyed STA %pM\n",
wiphy_name(local->hw.wiphy), print_mac(mbuf, sta->sta.addr)); wiphy_name(local->hw.wiphy), sta->sta.addr);
#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
kfree(sta); kfree(sta);
...@@ -222,7 +220,6 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, ...@@ -222,7 +220,6 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct sta_info *sta; struct sta_info *sta;
int i; int i;
DECLARE_MAC_BUF(mbuf);
sta = kzalloc(sizeof(*sta) + local->hw.sta_data_size, gfp); sta = kzalloc(sizeof(*sta) + local->hw.sta_data_size, gfp);
if (!sta) if (!sta)
...@@ -263,8 +260,8 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, ...@@ -263,8 +260,8 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
skb_queue_head_init(&sta->tx_filtered); skb_queue_head_init(&sta->tx_filtered);
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
printk(KERN_DEBUG "%s: Allocated STA %s\n", printk(KERN_DEBUG "%s: Allocated STA %pM\n",
wiphy_name(local->hw.wiphy), print_mac(mbuf, sta->sta.addr)); wiphy_name(local->hw.wiphy), sta->sta.addr);
#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
#ifdef CONFIG_MAC80211_MESH #ifdef CONFIG_MAC80211_MESH
...@@ -281,7 +278,6 @@ int sta_info_insert(struct sta_info *sta) ...@@ -281,7 +278,6 @@ int sta_info_insert(struct sta_info *sta)
struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_sub_if_data *sdata = sta->sdata;
unsigned long flags; unsigned long flags;
int err = 0; int err = 0;
DECLARE_MAC_BUF(mac);
/* /*
* Can't be a WARN_ON because it can be triggered through a race: * Can't be a WARN_ON because it can be triggered through a race:
...@@ -322,8 +318,8 @@ int sta_info_insert(struct sta_info *sta) ...@@ -322,8 +318,8 @@ int sta_info_insert(struct sta_info *sta)
} }
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
printk(KERN_DEBUG "%s: Inserted STA %s\n", printk(KERN_DEBUG "%s: Inserted STA %pM\n",
wiphy_name(local->hw.wiphy), print_mac(mac, sta->sta.addr)); wiphy_name(local->hw.wiphy), sta->sta.addr);
#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
spin_unlock_irqrestore(&local->sta_lock, flags); spin_unlock_irqrestore(&local->sta_lock, flags);
...@@ -423,9 +419,6 @@ static void __sta_info_unlink(struct sta_info **sta) ...@@ -423,9 +419,6 @@ static void __sta_info_unlink(struct sta_info **sta)
{ {
struct ieee80211_local *local = (*sta)->local; struct ieee80211_local *local = (*sta)->local;
struct ieee80211_sub_if_data *sdata = (*sta)->sdata; struct ieee80211_sub_if_data *sdata = (*sta)->sdata;
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
DECLARE_MAC_BUF(mbuf);
#endif
/* /*
* pull caller's reference if we're already gone. * pull caller's reference if we're already gone.
*/ */
...@@ -468,8 +461,8 @@ static void __sta_info_unlink(struct sta_info **sta) ...@@ -468,8 +461,8 @@ static void __sta_info_unlink(struct sta_info **sta)
} }
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
printk(KERN_DEBUG "%s: Removed STA %s\n", printk(KERN_DEBUG "%s: Removed STA %pM\n",
wiphy_name(local->hw.wiphy), print_mac(mbuf, (*sta)->sta.addr)); wiphy_name(local->hw.wiphy), (*sta)->sta.addr);
#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
/* /*
...@@ -544,7 +537,6 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, ...@@ -544,7 +537,6 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local,
unsigned long flags; unsigned long flags;
struct sk_buff *skb; struct sk_buff *skb;
struct ieee80211_sub_if_data *sdata; struct ieee80211_sub_if_data *sdata;
DECLARE_MAC_BUF(mac);
if (skb_queue_empty(&sta->ps_tx_buf)) if (skb_queue_empty(&sta->ps_tx_buf))
return; return;
...@@ -564,8 +556,8 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, ...@@ -564,8 +556,8 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local,
sdata = sta->sdata; sdata = sta->sdata;
local->total_ps_buffered--; local->total_ps_buffered--;
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "Buffered frame expired (STA " printk(KERN_DEBUG "Buffered frame expired (STA %pM)\n",
"%s)\n", print_mac(mac, sta->sta.addr)); sta->sta.addr);
#endif #endif
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -809,15 +801,14 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata, ...@@ -809,15 +801,14 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct sta_info *sta, *tmp; struct sta_info *sta, *tmp;
LIST_HEAD(tmp_list); LIST_HEAD(tmp_list);
DECLARE_MAC_BUF(mac);
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&local->sta_lock, flags); spin_lock_irqsave(&local->sta_lock, flags);
list_for_each_entry_safe(sta, tmp, &local->sta_list, list) list_for_each_entry_safe(sta, tmp, &local->sta_list, list)
if (time_after(jiffies, sta->last_rx + exp_time)) { if (time_after(jiffies, sta->last_rx + exp_time)) {
#ifdef CONFIG_MAC80211_IBSS_DEBUG #ifdef CONFIG_MAC80211_IBSS_DEBUG
printk(KERN_DEBUG "%s: expiring inactive STA %s\n", printk(KERN_DEBUG "%s: expiring inactive STA %pM\n",
sdata->dev->name, print_mac(mac, sta->sta.addr)); sdata->dev->name, sta->sta.addr);
#endif #endif
__sta_info_unlink(&sta); __sta_info_unlink(&sta);
if (sta) if (sta)
......
...@@ -263,10 +263,9 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, ...@@ -263,10 +263,9 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
(iv32 == key->u.tkip.rx[queue].iv32 && (iv32 == key->u.tkip.rx[queue].iv32 &&
iv16 <= key->u.tkip.rx[queue].iv16))) { iv16 <= key->u.tkip.rx[queue].iv16))) {
#ifdef CONFIG_MAC80211_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG
DECLARE_MAC_BUF(mac);
printk(KERN_DEBUG "TKIP replay detected for RX frame from " printk(KERN_DEBUG "TKIP replay detected for RX frame from "
"%s (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", "%pM (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n",
print_mac(mac, ta), ta,
iv32, iv16, key->u.tkip.rx[queue].iv32, iv32, iv16, key->u.tkip.rx[queue].iv32,
key->u.tkip.rx[queue].iv16); key->u.tkip.rx[queue].iv16);
#endif #endif
...@@ -287,9 +286,8 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, ...@@ -287,9 +286,8 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
{ {
int i; int i;
u8 key_offset = NL80211_TKIP_DATA_OFFSET_ENCR_KEY; u8 key_offset = NL80211_TKIP_DATA_OFFSET_ENCR_KEY;
DECLARE_MAC_BUF(mac); printk(KERN_DEBUG "TKIP decrypt: Phase1 TA=%pM"
printk(KERN_DEBUG "TKIP decrypt: Phase1 TA=%s" " TK=", ta);
" TK=", print_mac(mac, ta));
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
printk("%02x ", printk("%02x ",
key->conf.key[key_offset + i]); key->conf.key[key_offset + i]);
......
...@@ -201,10 +201,9 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx) ...@@ -201,10 +201,9 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
tx->sdata->vif.type != NL80211_IFTYPE_ADHOC && tx->sdata->vif.type != NL80211_IFTYPE_ADHOC &&
ieee80211_is_data(hdr->frame_control))) { ieee80211_is_data(hdr->frame_control))) {
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
DECLARE_MAC_BUF(mac);
printk(KERN_DEBUG "%s: dropped data frame to not " printk(KERN_DEBUG "%s: dropped data frame to not "
"associated station %s\n", "associated station %pM\n",
tx->dev->name, print_mac(mac, hdr->addr1)); tx->dev->name, hdr->addr1);
#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc);
return TX_DROP; return TX_DROP;
...@@ -331,7 +330,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) ...@@ -331,7 +330,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
u32 staflags; u32 staflags;
DECLARE_MAC_BUF(mac);
if (unlikely(!sta || ieee80211_is_probe_resp(hdr->frame_control))) if (unlikely(!sta || ieee80211_is_probe_resp(hdr->frame_control)))
return TX_CONTINUE; return TX_CONTINUE;
...@@ -341,9 +339,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) ...@@ -341,9 +339,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
if (unlikely((staflags & WLAN_STA_PS) && if (unlikely((staflags & WLAN_STA_PS) &&
!(staflags & WLAN_STA_PSPOLL))) { !(staflags & WLAN_STA_PSPOLL))) {
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "STA %s aid %d: PS buffer (entries " printk(KERN_DEBUG "STA %pM aid %d: PS buffer (entries "
"before %d)\n", "before %d)\n",
print_mac(mac, sta->sta.addr), sta->sta.aid, sta->sta.addr, sta->sta.aid,
skb_queue_len(&sta->ps_tx_buf)); skb_queue_len(&sta->ps_tx_buf));
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER)
...@@ -352,9 +350,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) ...@@ -352,9 +350,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf); struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf);
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "%s: STA %s TX " printk(KERN_DEBUG "%s: STA %pM TX "
"buffer full - dropping oldest frame\n", "buffer full - dropping oldest frame\n",
tx->dev->name, print_mac(mac, sta->sta.addr)); tx->dev->name, sta->sta.addr);
} }
#endif #endif
dev_kfree_skb(old); dev_kfree_skb(old);
...@@ -371,9 +369,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) ...@@ -371,9 +369,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
} }
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
else if (unlikely(test_sta_flags(sta, WLAN_STA_PS))) { else if (unlikely(test_sta_flags(sta, WLAN_STA_PS))) {
printk(KERN_DEBUG "%s: STA %s in PS mode, but pspoll " printk(KERN_DEBUG "%s: STA %pM in PS mode, but pspoll "
"set -> send frame\n", tx->dev->name, "set -> send frame\n", tx->dev->name,
print_mac(mac, sta->sta.addr)); sta->sta.addr);
} }
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
clear_sta_flags(sta, WLAN_STA_PSPOLL); clear_sta_flags(sta, WLAN_STA_PSPOLL);
...@@ -1593,12 +1591,10 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb, ...@@ -1593,12 +1591,10 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
compare_ether_addr(dev->dev_addr, compare_ether_addr(dev->dev_addr,
skb->data + ETH_ALEN) == 0))) { skb->data + ETH_ALEN) == 0))) {
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
DECLARE_MAC_BUF(mac);
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_DEBUG "%s: dropped frame to %s" printk(KERN_DEBUG "%s: dropped frame to %pM"
" (unauthorized port)\n", dev->name, " (unauthorized port)\n", dev->name,
print_mac(mac, hdr.addr1)); hdr.addr1);
#endif #endif
I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); I802_DEBUG_INC(local->tx_handlers_drop_unauth_port);
......
...@@ -206,13 +206,11 @@ int ieee80211_ht_agg_queue_add(struct ieee80211_local *local, ...@@ -206,13 +206,11 @@ int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
* on the previous queue * on the previous queue
* since HT is strict in order */ * since HT is strict in order */
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
if (net_ratelimit()) { if (net_ratelimit())
DECLARE_MAC_BUF(mac);
printk(KERN_DEBUG "allocated aggregation queue" printk(KERN_DEBUG "allocated aggregation queue"
" %d tid %d addr %s pool=0x%lX\n", " %d tid %d addr %pM pool=0x%lX\n",
i, tid, print_mac(mac, sta->sta.addr), i, tid, sta->sta.addr,
local->queue_pool[0]); local->queue_pool[0]);
}
#endif /* CONFIG_MAC80211_HT_DEBUG */ #endif /* CONFIG_MAC80211_HT_DEBUG */
return 0; return 0;
} }
......
...@@ -90,7 +90,6 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) ...@@ -90,7 +90,6 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
u8 mic[MICHAEL_MIC_LEN]; u8 mic[MICHAEL_MIC_LEN];
struct sk_buff *skb = rx->skb; struct sk_buff *skb = rx->skb;
int authenticator = 1, wpa_test = 0; int authenticator = 1, wpa_test = 0;
DECLARE_MAC_BUF(mac);
/* /*
* No way to verify the MIC if the hardware stripped it * No way to verify the MIC if the hardware stripped it
...@@ -227,7 +226,6 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx) ...@@ -227,7 +226,6 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx)
int hdrlen, res, hwaccel = 0, wpa_test = 0; int hdrlen, res, hwaccel = 0, wpa_test = 0;
struct ieee80211_key *key = rx->key; struct ieee80211_key *key = rx->key;
struct sk_buff *skb = rx->skb; struct sk_buff *skb = rx->skb;
DECLARE_MAC_BUF(mac);
hdrlen = ieee80211_hdrlen(hdr->frame_control); hdrlen = ieee80211_hdrlen(hdr->frame_control);
...@@ -453,7 +451,6 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx) ...@@ -453,7 +451,6 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx)
struct sk_buff *skb = rx->skb; struct sk_buff *skb = rx->skb;
u8 pn[CCMP_PN_LEN]; u8 pn[CCMP_PN_LEN];
int data_len; int data_len;
DECLARE_MAC_BUF(mac);
hdrlen = ieee80211_hdrlen(hdr->frame_control); hdrlen = ieee80211_hdrlen(hdr->frame_control);
......
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