aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/key.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-10-03 20:59:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:42 -0400
commit0795af5729b18218767fab27c44b1384f72dc9ad (patch)
tree67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /net/mac80211/key.c
parent95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff)
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/key.c')
-rw-r--r--net/mac80211/key.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index dd6fc4aa3ff5..c10e53afbb4f 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -63,6 +63,7 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
63{ 63{
64 const u8 *addr; 64 const u8 *addr;
65 int ret; 65 int ret;
66 DECLARE_MAC_BUF(mac);
66 67
67 if (!key->local->ops->set_key) 68 if (!key->local->ops->set_key)
68 return; 69 return;
@@ -78,15 +79,16 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
78 79
79 if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP) 80 if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP)
80 printk(KERN_ERR "mac80211-%s: failed to set key " 81 printk(KERN_ERR "mac80211-%s: failed to set key "
81 "(%d, " MAC_FMT ") to hardware (%d)\n", 82 "(%d, %s) to hardware (%d)\n",
82 wiphy_name(key->local->hw.wiphy), 83 wiphy_name(key->local->hw.wiphy),
83 key->conf.keyidx, MAC_ARG(addr), ret); 84 key->conf.keyidx, print_mac(mac, addr), ret);
84} 85}
85 86
86static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) 87static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
87{ 88{
88 const u8 *addr; 89 const u8 *addr;
89 int ret; 90 int ret;
91 DECLARE_MAC_BUF(mac);
90 92
91 if (!key->local->ops->set_key) 93 if (!key->local->ops->set_key)
92 return; 94 return;
@@ -102,9 +104,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
102 104
103 if (ret) 105 if (ret)
104 printk(KERN_ERR "mac80211-%s: failed to remove key " 106 printk(KERN_ERR "mac80211-%s: failed to remove key "
105 "(%d, " MAC_FMT ") from hardware (%d)\n", 107 "(%d, %s) from hardware (%d)\n",
106 wiphy_name(key->local->hw.wiphy), 108 wiphy_name(key->local->hw.wiphy),
107 key->conf.keyidx, MAC_ARG(addr), ret); 109 key->conf.keyidx, print_mac(mac, addr), ret);
108 110
109 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; 111 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE;
110} 112}