[PATCH v2 2/4] Clarify error message when loading mac addresses
Olof Johansson
dev at skyshaper.net
Mon Jun 10 01:56:47 EDT 2013
Currently the mac address printout is wrong since it says it can't
readd MAC_ADDR0 for mac addresses where it doesn't even try to do
this.
Use this message only for addr[0] and another for the ones where we
use locally assigned addresses.
Signed-off-by: Olof Johansson <dev at skyshaper.net>
---
main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c
index ae67b46..dbff3da 100644
--- a/main.c
+++ b/main.c
@@ -700,13 +700,14 @@ static int wcn36xx_read_mac_addresses(struct wcn36xx *wcn)
wcn->dev);
if (status) {
- wcn36xx_warn("Failed to read macaddress file %s, using a random
address instead",
- files[i]);
if (i == 0) {
/* Assign a random mac with Qualcomm oui */
+ wcn36xx_warn("Failed to read macaddress file %s, using a random
address instead",
+ files[i]);
memcpy(wcn->addresses[i].addr, qcom_oui, 3);
get_random_bytes(wcn->addresses[i].addr + 3, 3);
} else {
+ wcn36xx_warn("Failed to read macaddress file, using a random
address instead");
/* Assign locally administered mac addresses to
* all but the first mac */
memcpy(wcn->addresses[i].addr,
--
1.8.2.2
More information about the wcn36xx
mailing list