[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191017093954.657-5-Jerome.Pouiller@silabs.com>
Date: Thu, 17 Oct 2019 09:40:06 +0000
From: Jerome Pouiller <Jerome.Pouiller@...abs.com>
To: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jerome Pouiller <Jerome.Pouiller@...abs.com>,
Marc Dorval <Marc.Dorval@...abs.com>
Subject: [PATCH 5/6] staging: wfx: fix setting MAC address from DT
From: Jérôme Pouiller <jerome.pouiller@...abs.com>
MAC address read from chip is unconditionally used even if a MAC
address is configured in device tree.
Reported-by: Marc Dorval <marc.dorval@...abs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
---
drivers/staging/wfx/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c
index 205b5bc8872e..18f07f7ad347 100644
--- a/drivers/staging/wfx/main.c
+++ b/drivers/staging/wfx/main.c
@@ -410,8 +410,9 @@ int wfx_probe(struct wfx_dev *wdev)
if (!IS_ERR_OR_NULL(macaddr)) {
ether_addr_copy(wdev->addresses[i].addr, macaddr);
wdev->addresses[i].addr[ETH_ALEN - 1] += i;
+ } else {
+ ether_addr_copy(wdev->addresses[i].addr, wdev->hw_caps.mac_addr[i]);
}
- ether_addr_copy(wdev->addresses[i].addr, wdev->hw_caps.mac_addr[i]);
if (!is_valid_ether_addr(wdev->addresses[i].addr)) {
dev_warn(wdev->dev, "using random MAC address\n");
eth_random_addr(wdev->addresses[i].addr);
--
2.20.1
Powered by blists - more mailing lists