aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/usb/qmi_wwan.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index cff0bbdd9f52..2a3579f67910 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -53,6 +53,9 @@ struct qmi_wwan_state {
53 struct usb_interface *data; 53 struct usb_interface *data;
54}; 54};
55 55
56/* default ethernet address used by the modem */
57static const u8 default_modem_addr[ETH_ALEN] = {0x02, 0x50, 0xf3};
58
56/* Make up an ethernet header if the packet doesn't have one. 59/* Make up an ethernet header if the packet doesn't have one.
57 * 60 *
58 * A firmware bug common among several devices cause them to send raw 61 * A firmware bug common among several devices cause them to send raw
@@ -317,6 +320,12 @@ next_desc:
317 usb_driver_release_interface(driver, info->data); 320 usb_driver_release_interface(driver, info->data);
318 } 321 }
319 322
323 /* Never use the same address on both ends of the link, even
324 * if the buggy firmware told us to.
325 */
326 if (!compare_ether_addr(dev->net->dev_addr, default_modem_addr))
327 eth_hw_addr_random(dev->net);
328
320 /* make MAC addr easily distinguishable from an IP header */ 329 /* make MAC addr easily distinguishable from an IP header */
321 if (possibly_iphdr(dev->net->dev_addr)) { 330 if (possibly_iphdr(dev->net->dev_addr)) {
322 dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */ 331 dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */