Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300665
b: refs/heads/master
c: 227842d
h: refs/heads/master
i:
  300663: 75a891e
v: v3
  • Loading branch information
Joe Perches authored and John W. Linville committed Apr 10, 2012
1 parent 2a9ca36 commit e42ed4a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 516304b0f45614fb8967dc86ff681499204cdbb1
refs/heads/master: 227842d1176019512d24236f7fb894f0fadd30d1
9 changes: 5 additions & 4 deletions trunk/drivers/net/wireless/ath/ath5k/ath5k.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@
#define ATH5K_PRINTF(fmt, ...) \
pr_warn("%s: " fmt, __func__, ##__VA_ARGS__)

void __printf(3, 4)
_ath5k_printk(const struct ath5k_hw *ah, const char *level,
const char *fmt, ...);

#define ATH5K_PRINTK(_sc, _level, _fmt, ...) \
printk(_level pr_fmt("%s%s" _fmt), \
((_sc) && (_sc)->hw) ? wiphy_name((_sc)->hw->wiphy) : "", \
((_sc) && (_sc)->hw) ? ": " : "", \
##__VA_ARGS__)
_ath5k_printk(_sc, _level, _fmt, ##__VA_ARGS__)

#define ATH5K_PRINTK_LIMIT(_sc, _level, _fmt, ...) \
do { \
Expand Down
20 changes: 20 additions & 0 deletions trunk/drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3040,3 +3040,23 @@ ath5k_set_beacon_filter(struct ieee80211_hw *hw, bool enable)
ath5k_hw_set_rx_filter(ah, rfilt);
ah->filter_flags = rfilt;
}

void _ath5k_printk(const struct ath5k_hw *ah, const char *level,
const char *fmt, ...)
{
struct va_format vaf;
va_list args;

va_start(args, fmt);

vaf.fmt = fmt;
vaf.va = &args;

if (ah && ah->hw)
printk("%s" pr_fmt("%s: %pV"),
level, wiphy_name(ah->hw->wiphy), &vaf);
else
printk("%s" pr_fmt("%pV"), level, &vaf);

va_end(args);
}

0 comments on commit e42ed4a

Please sign in to comment.