[OpenWrt-Devel] [PATCH 2/6] [kernel] ath9k: be verbose if platform-supplied hardware MAC is used

Michal Cieslakiewicz michal.cieslakiewicz at wp.pl
Wed Jan 20 18:11:55 EST 2016


From: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>

This patch adds information in logs during module startup if
WLAN device MAC address is overwritten by platform-supplied one.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>

---

When random MAC address is used instead of invalid one, there is notification
in logs. The same rule should apply if hardware MAC for wifi card is
overriden by platform and that is exactly what this patch does.


 547-ath9k-platform-mac-info.patch |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)


diff -pruN a/openwrt/package/kernel/mac80211/patches/547-ath9k-platform-mac-info.patch b/openwrt/package/kernel/mac80211/patches/547-ath9k-platform-mac-info.patch
--- a/openwrt/package/kernel/mac80211/patches/547-ath9k-platform-mac-info.patch	1970-01-01 01:00:00.000000000 +0100
+++ b/openwrt/package/kernel/mac80211/patches/547-ath9k-platform-mac-info.patch	2016-01-20 19:56:46.696692691 +0100
@@ -0,0 +1,17 @@
+diff -pruN a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
+--- a/drivers/net/wireless/ath/ath9k/init.c	2016-01-20 19:52:13.742785462 +0100
++++ b/drivers/net/wireless/ath/ath9k/init.c	2016-01-20 19:52:14.132762433 +0100
+@@ -640,8 +640,12 @@ static int ath9k_init_softc(u16 devid, s
+ 	if (ret)
+ 		goto err_hw;
+ 
+-	if (pdata && pdata->macaddr)
++	if (pdata && pdata->macaddr) {
+ 		memcpy(common->macaddr, pdata->macaddr, ETH_ALEN);
++		ath_info(common,
++			 "platform MAC address will be used: %pM\n",
++			 common->macaddr);
++	}
+ 
+ 	ret = ath9k_init_queues(sc);
+ 	if (ret)
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list