--- zzzz-none-000/linux-3.10.107/drivers/net/wireless/ath/main.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/wireless/ath/main.c 2021-02-04 17:41:59.000000000 +0000 @@ -20,6 +20,7 @@ #include #include "ath.h" +#include "trace.h" MODULE_AUTHOR("Atheros Communications"); MODULE_DESCRIPTION("Shared library for Atheros wireless LAN cards."); @@ -59,6 +60,14 @@ } EXPORT_SYMBOL(ath_rxbuf_alloc); +bool ath_is_mybeacon(struct ath_common *common, struct ieee80211_hdr *hdr) +{ + return ieee80211_is_beacon(hdr->frame_control) && + !is_zero_ether_addr(common->curbssid) && + ether_addr_equal_64bits(hdr->addr3, common->curbssid); +} +EXPORT_SYMBOL(ath_is_mybeacon); + void ath_printk(const char *level, const struct ath_common* common, const char *fmt, ...) { @@ -70,11 +79,13 @@ vaf.fmt = fmt; vaf.va = &args; - if (common && common->hw && common->hw->wiphy) + if (common && common->hw && common->hw->wiphy) { printk("%sath: %s: %pV", level, wiphy_name(common->hw->wiphy), &vaf); - else + trace_ath_log(common->hw->wiphy, &vaf); + } else { printk("%sath: %pV", level, &vaf); + } va_end(args); }