aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.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/sta_info.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/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index c17172abb21c..44d983404952 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -132,6 +132,7 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,
132 struct net_device *dev, u8 *addr, gfp_t gfp) 132 struct net_device *dev, u8 *addr, gfp_t gfp)
133{ 133{
134 struct sta_info *sta; 134 struct sta_info *sta;
135 DECLARE_MAC_BUF(mac);
135 136
136 sta = kzalloc(sizeof(*sta), gfp); 137 sta = kzalloc(sizeof(*sta), gfp);
137 if (!sta) 138 if (!sta)
@@ -164,8 +165,8 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,
164 write_unlock_bh(&local->sta_lock); 165 write_unlock_bh(&local->sta_lock);
165 166
166#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 167#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
167 printk(KERN_DEBUG "%s: Added STA " MAC_FMT "\n", 168 printk(KERN_DEBUG "%s: Added STA %s\n",
168 local->mdev->name, MAC_ARG(addr)); 169 local->mdev->name, print_mac(mac, addr));
169#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 170#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
170 171
171#ifdef CONFIG_MAC80211_DEBUGFS 172#ifdef CONFIG_MAC80211_DEBUGFS
@@ -207,6 +208,7 @@ void sta_info_free(struct sta_info *sta)
207{ 208{
208 struct sk_buff *skb; 209 struct sk_buff *skb;
209 struct ieee80211_local *local = sta->local; 210 struct ieee80211_local *local = sta->local;
211 DECLARE_MAC_BUF(mac);
210 212
211 might_sleep(); 213 might_sleep();
212 214
@@ -223,8 +225,8 @@ void sta_info_free(struct sta_info *sta)
223 } 225 }
224 226
225#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 227#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
226 printk(KERN_DEBUG "%s: Removed STA " MAC_FMT "\n", 228 printk(KERN_DEBUG "%s: Removed STA %s\n",
227 local->mdev->name, MAC_ARG(sta->addr)); 229 local->mdev->name, print_mac(mac, sta->addr));
228#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 230#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
229 231
230 ieee80211_key_free(sta->key); 232 ieee80211_key_free(sta->key);
@@ -263,6 +265,7 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local,
263{ 265{
264 unsigned long flags; 266 unsigned long flags;
265 struct sk_buff *skb; 267 struct sk_buff *skb;
268 DECLARE_MAC_BUF(mac);
266 269
267 if (skb_queue_empty(&sta->ps_tx_buf)) 270 if (skb_queue_empty(&sta->ps_tx_buf))
268 return; 271 return;
@@ -281,7 +284,7 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local,
281 if (skb) { 284 if (skb) {
282 local->total_ps_buffered--; 285 local->total_ps_buffered--;
283 printk(KERN_DEBUG "Buffered frame expired (STA " 286 printk(KERN_DEBUG "Buffered frame expired (STA "
284 MAC_FMT ")\n", MAC_ARG(sta->addr)); 287 "%s)\n", print_mac(mac, sta->addr));
285 dev_kfree_skb(skb); 288 dev_kfree_skb(skb);
286 } else 289 } else
287 break; 290 break;