From bccade717dfec4d9ca43b45b4d43ade0d8bda189 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Wed, 22 Aug 2012 20:44:09 +0400 Subject: [PATCH] compat-drivers: fix broken hunks for next-20120822 A few hunks required manual fixing for next-20120822 Signed-off-by: Luis R. Rodriguez --- patches/network/0001-netdev_ops.patch | 20 ++++++++-------- ...0003-netdev-needed_headroom_tailroom.patch | 24 +++++++++---------- patches/network/25-multicast-list_head.patch | 22 ++++++++--------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/patches/network/0001-netdev_ops.patch b/patches/network/0001-netdev_ops.patch index 96dd5be08931..7d70e1e04360 100644 --- a/patches/network/0001-netdev_ops.patch +++ b/patches/network/0001-netdev_ops.patch @@ -223,7 +223,7 @@ Date: Wed Nov 19 21:32:24 2008 -0800 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -952,7 +952,7 @@ static void ieee80211_if_setup(struct ne +@@ -976,7 +976,7 @@ static void ieee80211_if_setup(struct ne { ether_setup(dev); dev->priv_flags &= ~IFF_TX_SKB_SHARING; @@ -232,16 +232,16 @@ Date: Wed Nov 19 21:32:24 2008 -0800 dev->destructor = free_netdev; } -@@ -1099,7 +1099,7 @@ static void ieee80211_setup_sdata(struct - /* and set some type-dependent values */ - sdata->vif.type = type; - sdata->vif.p2p = false; -- sdata->dev->netdev_ops = &ieee80211_dataif_ops; -+ netdev_attach_ops(sdata->dev, &ieee80211_dataif_ops); - sdata->wdev.iftype = type; +@@ -1132,7 +1132,7 @@ static void ieee80211_setup_sdata(struct - sdata->control_port_protocol = cpu_to_be16(ETH_P_PAE); -@@ -1140,7 +1140,7 @@ static void ieee80211_setup_sdata(struct + /* only monitor/p2p-device differ */ + if (sdata->dev) { +- sdata->dev->netdev_ops = &ieee80211_dataif_ops; ++ netdev_attach_ops(sdata->dev, &ieee80211_dataif_ops); + sdata->dev->type = ARPHRD_ETHER; + } + +@@ -1166,7 +1166,7 @@ static void ieee80211_setup_sdata(struct break; case NL80211_IFTYPE_MONITOR: sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP; diff --git a/patches/network/0003-netdev-needed_headroom_tailroom.patch b/patches/network/0003-netdev-needed_headroom_tailroom.patch index 636078027f2a..06bb61ebf666 100644 --- a/patches/network/0003-netdev-needed_headroom_tailroom.patch +++ b/patches/network/0003-netdev-needed_headroom_tailroom.patch @@ -4,22 +4,22 @@ could be used. --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -1419,6 +1419,7 @@ int ieee80211_if_add(struct ieee80211_lo - return -ENOMEM; - dev_net_set(ndev, wiphy_net(local->hw.wiphy)); +@@ -1461,6 +1461,7 @@ int ieee80211_if_add(struct ieee80211_lo + return -ENOMEM; + dev_net_set(ndev, wiphy_net(local->hw.wiphy)); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) - ndev->needed_headroom = local->tx_headroom + - 4*6 /* four MAC addresses */ - + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */ -@@ -1427,6 +1428,7 @@ int ieee80211_if_add(struct ieee80211_lo - - ETH_HLEN /* ethernet hard_header_len */ - + IEEE80211_ENCRYPT_HEADROOM; - ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; + ndev->needed_headroom = local->tx_headroom + + 4*6 /* four MAC addresses */ + + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */ +@@ -1469,6 +1470,7 @@ int ieee80211_if_add(struct ieee80211_lo + - ETH_HLEN /* ethernet hard_header_len */ + + IEEE80211_ENCRYPT_HEADROOM; + ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; +#endif - ret = dev_alloc_name(ndev, ndev->name); - if (ret < 0) + ret = dev_alloc_name(ndev, ndev->name); + if (ret < 0) { --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c @@ -2285,7 +2285,11 @@ int orinoco_if_add(struct orinoco_privat diff --git a/patches/network/25-multicast-list_head.patch b/patches/network/25-multicast-list_head.patch index 1a618a618ccc..543844ce454d 100644 --- a/patches/network/25-multicast-list_head.patch +++ b/patches/network/25-multicast-list_head.patch @@ -727,21 +727,21 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -693,8 +693,13 @@ static void ieee80211_do_stop(struct iee - - netif_addr_lock_bh(sdata->dev); - spin_lock_bh(&local->filter_lock); +@@ -716,8 +716,13 @@ static void ieee80211_do_stop(struct iee + if (sdata->dev) { + netif_addr_lock_bh(sdata->dev); + spin_lock_bh(&local->filter_lock); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - __hw_addr_unsync(&local->mc_list, &sdata->dev->mc, - sdata->dev->addr_len); + __hw_addr_unsync(&local->mc_list, &sdata->dev->mc, + sdata->dev->addr_len); +#else -+ __dev_addr_unsync(&local->mc_list, &local->mc_count, -+ &sdata->dev->mc_list, &sdata->dev->mc_count); ++ __dev_addr_unsync(&local->mc_list, &local->mc_count, ++ &sdata->dev->mc_list, &sdata->dev->mc_count); +#endif - spin_unlock_bh(&local->filter_lock); - netif_addr_unlock_bh(sdata->dev); + spin_unlock_bh(&local->filter_lock); + netif_addr_unlock_bh(sdata->dev); -@@ -868,7 +873,12 @@ static void ieee80211_set_multicast_list +@@ -888,7 +893,12 @@ static void ieee80211_set_multicast_list sdata->flags ^= IEEE80211_SDATA_PROMISC; } spin_lock_bh(&local->filter_lock); -- 2.30.2