From 02a067b7a17932ead95a5d5a96dd6ae6844ada51 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Mon, 12 Mar 2012 17:25:25 -0700 Subject: [PATCH] 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 --- linux-next-pending/0002-backport-alx.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- 2.30.2