From b0b8a2b08f77e8c0d4d4825835a032a07ea5deec Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Tue, 8 Jan 2013 16:04:47 -0600 Subject: [PATCH] compat-drivers: fix 61-netdev-addr_assign_type.patch The following two patches adjusted uses of NET_ADDR_RANDOM on some Ethernet drivers. This change adopts these changes on the 61-netdev-addr_assign_type.patch patch. commit 15c6ff3bc0ff3464a8c7efcdea09c86454571622 Author: Jiri Pirko Date: Tue Jan 1 03:30:17 2013 +0000 net: remove unnecessary NET_ADDR_RANDOM "bitclean" NET_ADDR_SET is set in dev_set_mac_address() no need to alter dev->addr_assign_type value in drivers. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit e41b2d7fe7803e85e1202d0eb172717d7bf1bbaf Author: Jiri Pirko Date: Tue Jan 1 03:30:15 2013 +0000 net: set dev->addr_assign_type correctly Not a bitfield, but a plain value. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller Signed-off-by: Luis R. Rodriguez --- .../network/61-netdev-addr_assign_type.patch | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/patches/collateral-evolutions/network/61-netdev-addr_assign_type.patch b/patches/collateral-evolutions/network/61-netdev-addr_assign_type.patch index b4766170a832..91c7e80ff4fb 100644 --- a/patches/collateral-evolutions/network/61-netdev-addr_assign_type.patch +++ b/patches/collateral-evolutions/network/61-netdev-addr_assign_type.patch @@ -7,38 +7,16 @@ v2.6.36-rc1~571^2~104 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -@@ -476,7 +476,9 @@ static int atl1c_set_mac_addr(struct net - - memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); - memcpy(adapter->hw.mac_addr, addr->sa_data, netdev->addr_len); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - netdev->addr_assign_type &= ~NET_ADDR_RANDOM; -+#endif - - atl1c_hw_set_mac_addr(&adapter->hw, adapter->hw.mac_addr); - @@ -2568,7 +2570,9 @@ static int atl1c_probe(struct pci_dev *p } if (atl1c_read_mac_addr(&adapter->hw)) { /* got a random MAC address, set NET_ADDR_RANDOM to netdev */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - netdev->addr_assign_type |= NET_ADDR_RANDOM; + netdev->addr_assign_type = NET_ADDR_RANDOM; +#endif } memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len); memcpy(netdev->perm_addr, adapter->hw.mac_addr, netdev->addr_len); ---- a/drivers/net/ethernet/atheros/atlx/atlx.c -+++ b/drivers/net/ethernet/atheros/atlx/atlx.c -@@ -84,7 +84,9 @@ static int atlx_set_mac(struct net_devic - - memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); - memcpy(adapter->hw.mac_addr, addr->sa_data, netdev->addr_len); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - netdev->addr_assign_type &= ~NET_ADDR_RANDOM; -+#endif - - atlx_set_mac_addr(&adapter->hw); - return 0; --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c @@ -3060,7 +3060,9 @@ static int atl1_probe(struct pci_dev *pd @@ -46,7 +24,7 @@ v2.6.36-rc1~571^2~104 if (atl1_read_mac_addr(&adapter->hw)) { /* mark random mac */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - netdev->addr_assign_type |= NET_ADDR_RANDOM; + netdev->addr_assign_type = NET_ADDR_RANDOM; +#endif } memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len); -- 2.30.2