Skip to contentSkip to conversation

fmvj18x_cs: fix incorrect indexing of dev->dev_addr[] when copying the MAC address

PATCH Applied Ken Kawasaki 2 participants 2 messages Feb 20, 2016 – Feb 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fmvj18x_cs: fix incorrect indexing of dev->dev_addr[] when copying the MAC address

fix incorrect indexing of dev->dev_addr[] when copying the MAC address of FMV-J182 at buf[5].

---

drivers/net/ethernet/fujitsu/fmvj18x_cs.c renamed from drivers/net/ethernet/fujitsu/fmvj18x_cs.c.orig +2 -2
@@ -469,8 +469,8 @@ static int fmvj18x_config(struct pcmcia_
 		    goto failed;
 	    }
 	    /* Read MACID from CIS */
-	    for (i = 5; i < 11; i++)
-		    dev->dev_addr[i] = buf[i];
+	    for (i = 0; i < 6; i++)
+		    dev->dev_addr[i] = buf[i + 5];
 	    kfree(buf);
 	} else {
 	    if (pcmcia_get_mac_from_cis(link, dev))