From: Luis R. Rodriguez Date: Tue, 13 Mar 2012 00:25:25 +0000 (-0700) Subject: compat-wireless: backport addr_assign_type usage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=02a067b7a17932ead95a5d5a96dd6ae6844ada51;p=openwrt%2Fstaging%2Fblogic.git compat-wireless: backport addr_assign_type usage The alx driver uses the addr_assign_type variable from the netdev data structure which was added as of 2.6.35: mcgrof@tux ~/linux-next (git::master)$ git describe --contains c1f79426 v2.6.36-rc1~571^2~104 Although compat.git backported dev_hw_addr_random() the patch in compat.git cannot address usage of addr_assign_type and as such requires an ifdef around it. Signed-off-by: Luis R. Rodriguez --- diff --git a/linux-next-pending/0002-backport-alx.patch b/linux-next-pending/0002-backport-alx.patch index 96b1f18617fd..b5dbace06210 100644 --- a/linux-next-pending/0002-backport-alx.patch +++ b/linux-next-pending/0002-backport-alx.patch @@ -120,3 +120,14 @@ This should go into patches/01-netdev.patch }; +@@ -341,8 +341,10 @@ static int alx_set_mac_address(struct ne + if (netif_running(netdev)) + return -EBUSY; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + if (netdev->addr_assign_type & NET_ADDR_RANDOM) + netdev->addr_assign_type ^= NET_ADDR_RANDOM; ++#endif + + memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); + memcpy(hw->mac_addr, addr->sa_data, netdev->addr_len);