kernel: add missing config symbols for 4.9
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 327-ath9k-add-a-helper-to-get-the-string-representation-.patch
1 From 25b8b2d57def4854558c135228a52326a7d346ad Mon Sep 17 00:00:00 2001
2 From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
3 Date: Sun, 16 Oct 2016 22:59:06 +0200
4 Subject: [PATCH 2/3] ath9k: add a helper to get the string representation of
5 ath_bus_type
6
7 This can be used when the ath_bus_type has to be presented in a log
8 message or firmware filename.
9
10 Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
11 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 ---
13 drivers/net/wireless/ath/ath.h | 6 ++++++
14 drivers/net/wireless/ath/main.c | 7 +++++++
15 2 files changed, 13 insertions(+)
16
17 --- a/drivers/net/wireless/ath/ath.h
18 +++ b/drivers/net/wireless/ath/ath.h
19 @@ -327,4 +327,10 @@ static inline const char *ath_opmode_to_
20 }
21 #endif
22
23 +extern const char *ath_bus_type_strings[];
24 +static inline const char *ath_bus_type_to_string(enum ath_bus_type bustype)
25 +{
26 + return ath_bus_type_strings[bustype];
27 +}
28 +
29 #endif /* ATH_H */
30 --- a/drivers/net/wireless/ath/main.c
31 +++ b/drivers/net/wireless/ath/main.c
32 @@ -90,3 +90,10 @@ void ath_printk(const char *level, const
33 va_end(args);
34 }
35 EXPORT_SYMBOL(ath_printk);
36 +
37 +const char *ath_bus_type_strings[] = {
38 + [ATH_PCI] = "pci",
39 + [ATH_AHB] = "ahb",
40 + [ATH_USB] = "usb",
41 +};
42 +EXPORT_SYMBOL(ath_bus_type_strings);