aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/debug.c
diff options
context:
space:
mode:
authorBen Greear <[email protected]>2010-10-08 16:43:29 +0000
committerJohn W. Linville <[email protected]>2010-10-11 19:04:19 +0000
commit92c68a66a8f73c51f062ae8cae958c86a21fea78 (patch)
tree5bb9371f703dcec76ad27b067e1098c1fb5d3ee6 /drivers/net/wireless/ath/debug.c
parentwireless: Set some stats used by /proc/net/wireless (wext) (diff)
downloadkernel-92c68a66a8f73c51f062ae8cae958c86a21fea78.tar.gz
kernel-92c68a66a8f73c51f062ae8cae958c86a21fea78.zip
ath5k: Print out opmode in debugfs.
Helps debug multi-VIF scenarios. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: John W. Linville <[email protected]>
Diffstat (limited to 'drivers/net/wireless/ath/debug.c')
-rw-r--r--drivers/net/wireless/ath/debug.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/debug.c b/drivers/net/wireless/ath/debug.c
index 53e77bd131b9..a9eb7876dbe1 100644
--- a/drivers/net/wireless/ath/debug.c
+++ b/drivers/net/wireless/ath/debug.c
@@ -30,3 +30,32 @@ void ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
va_end(args);
}
EXPORT_SYMBOL(ath_print);
+
+const char *ath_opmode_to_string(enum nl80211_iftype opmode)
+{
+ 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 NULL;
+ }
+}
+EXPORT_SYMBOL(ath_opmode_to_string);