Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b40ded2a authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Kalle Valo
Browse files

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: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent fc383ffd
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -327,4 +327,10 @@ static inline const char *ath_opmode_to_string(enum nl80211_iftype opmode)
}
}
#endif
#endif


extern const char *ath_bus_type_strings[];
static inline const char *ath_bus_type_to_string(enum ath_bus_type bustype)
{
	return ath_bus_type_strings[bustype];
}

#endif /* ATH_H */
#endif /* ATH_H */
+7 −0
Original line number Original line Diff line number Diff line
@@ -90,3 +90,10 @@ void ath_printk(const char *level, const struct ath_common* common,
	va_end(args);
	va_end(args);
}
}
EXPORT_SYMBOL(ath_printk);
EXPORT_SYMBOL(ath_printk);

const char *ath_bus_type_strings[] = {
	[ATH_PCI] = "pci",
	[ATH_AHB] = "ahb",
	[ATH_USB] = "usb",
};
EXPORT_SYMBOL(ath_bus_type_strings);