diff mbox

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

Message ID 56a0143b9f4588.15871564@wp.pl
State Superseded
Headers show

Commit Message

Michal Cieslakiewicz Jan. 20, 2016, 11:11 p.m. UTC
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 mbox

Patch

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)