diff options
Diffstat (limited to 'drivers/net/wireless/ath/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/debug.c | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/debug.c b/drivers/net/wireless/ath/debug.c index 53e77bd131b..5367b1086e0 100644 --- a/drivers/net/wireless/ath/debug.c +++ b/drivers/net/wireless/ath/debug.c @@ -15,18 +15,32 @@ */ #include "ath.h" -#include "debug.h" -void ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...) +const char *ath_opmode_to_string(enum nl80211_iftype opmode) { - va_list args; - - if (likely(!(common->debug_mask & dbg_mask))) - return; - - va_start(args, fmt); - printk(KERN_DEBUG "ath: "); - vprintk(fmt, args); - va_end(args); + switch (opmode) { + case NL80211_IFTYPE_UNSPECIFIED: + return "UNSPEC"; + case NL80211_IFTYPE_ADHOC: + return "ADHOC"; + case NL80211_IFTYPE_STATION: + return "STATION"; + case NL80211_IFTYPE_AP: + return "AP"; + case NL80211_IFTYPE_AP_VLAN: + return "AP-VLAN"; + case NL80211_IFTYPE_WDS: + return "WDS"; + case NL80211_IFTYPE_MONITOR: + return "MONITOR"; + case NL80211_IFTYPE_MESH_POINT: + return "MESH"; + case NL80211_IFTYPE_P2P_CLIENT: + return "P2P-CLIENT"; + case NL80211_IFTYPE_P2P_GO: + return "P2P-GO"; + default: + return "UNKNOWN"; + } } -EXPORT_SYMBOL(ath_print); +EXPORT_SYMBOL(ath_opmode_to_string); |