aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2016-10-16 16:59:06 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2016-11-15 09:55:37 -0500
commitb40ded2ad75cc251e7ce4ae0db7098e5a0157200 (patch)
treeeefa2fba971e80e419cec7039dead72c7bc5df7d /drivers/net/wireless/ath
parentfc383ffdb91a393086daf56c3d48a545e1cbd6e4 (diff)
ath9k: add a helper to get the string representation of ath_bus_type
This can be used when the ath_bus_type has to be presented in a log message or firmware filename. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath.h6
-rw-r--r--drivers/net/wireless/ath/main.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index da7a7c8dafb2..f3f2784f6ebd 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -327,4 +327,10 @@ static inline const char *ath_opmode_to_string(enum nl80211_iftype opmode)
327} 327}
328#endif 328#endif
329 329
330extern const char *ath_bus_type_strings[];
331static inline const char *ath_bus_type_to_string(enum ath_bus_type bustype)
332{
333 return ath_bus_type_strings[bustype];
334}
335
330#endif /* ATH_H */ 336#endif /* ATH_H */
diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c
index 338d72337604..89f4b0513946 100644
--- a/drivers/net/wireless/ath/main.c
+++ b/drivers/net/wireless/ath/main.c
@@ -90,3 +90,10 @@ void ath_printk(const char *level, const struct ath_common* common,
90 va_end(args); 90 va_end(args);
91} 91}
92EXPORT_SYMBOL(ath_printk); 92EXPORT_SYMBOL(ath_printk);
93
94const char *ath_bus_type_strings[] = {
95 [ATH_PCI] = "pci",
96 [ATH_AHB] = "ahb",
97 [ATH_USB] = "usb",
98};
99EXPORT_SYMBOL(ath_bus_type_strings);