This is a note to let you know that I've just added the patch titled net: qmi_wwan: prevent duplicate mac address on link (firmware bug workaround) to the 3.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-qmi_wwan-prevent-duplicate-mac-address-on-link-firmware-bug-workaround.patch and it can be found in the queue-3.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 490fcceee05287b3e9beae54ef7f19814db4a7d9 Mon Sep 17 00:00:00 2001 From: Bjørn Mork <bjorn@xxxxxxx> Date: Thu, 18 Apr 2013 12:57:11 +0000 Subject: net: qmi_wwan: prevent duplicate mac address on link (firmware bug workaround) From: Bjørn Mork <bjorn@xxxxxxx> [ Upstream commit cc6ba5fdaabea7a7b28de3ba1e0fe54d92232fe5 ] We normally trust and use the CDC functional descriptors provided by a number of devices. But some of these will erroneously list the address reserved for the device end of the link. Attempting to use this on both the device and host side will naturally not work. Work around this bug by ignoring the functional descriptor and assign a random address instead in this case. Signed-off-by: Bjørn Mork <bjorn@xxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/usb/qmi_wwan.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -175,6 +175,9 @@ err: return status; } +/* default ethernet address used by the modem */ +static const u8 default_modem_addr[ETH_ALEN] = {0x02, 0x50, 0xf3}; + /* Make up an ethernet header if the packet doesn't have one. * * A firmware bug common among several devices cause them to send raw @@ -342,6 +345,12 @@ static int qmi_wwan_bind_shared(struct u /* save subdriver struct for suspend/resume wrappers */ dev->data[0] = (unsigned long)subdriver; + /* Never use the same address on both ends of the link, even + * if the buggy firmware told us to. + */ + if (!compare_ether_addr(dev->net->dev_addr, default_modem_addr)) + eth_hw_addr_random(dev->net); + /* make MAC addr easily distinguishable from an IP header */ if (possibly_iphdr(dev->net->dev_addr)) { dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */ Patches currently in stable-queue which might be from bjorn@xxxxxxx are queue-3.4/net-vlan-ethtool-netdev_features_t-is-more-than-32-bit.patch queue-3.4/net-qmi_wwan-fixup-missing-ethernet-header-firmware-bug-workaround.patch queue-3.4/net-qmi_wwan-fixup-destination-address-firmware-bug-workaround.patch queue-3.4/net-qmi_wwan-prevent-duplicate-mac-address-on-link-firmware-bug-workaround.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html