compat-drivers: fix broken hunks for next-20120822
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Wed, 22 Aug 2012 16:44:09 +0000 (20:44 +0400)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Wed, 22 Aug 2012 16:44:09 +0000 (20:44 +0400)
A few hunks required manual fixing for next-20120822

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
patches/network/0001-netdev_ops.patch
patches/network/0003-netdev-needed_headroom_tailroom.patch
patches/network/25-multicast-list_head.patch

index 96dd5be08931391e02438cc11b92ae41ef279585..7d70e1e04360f7f6ddaaad60e51500554f21f806 100644 (file)
@@ -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;
index 636078027f2a7e300389c160ca98c5c940aeaf77..06bb61ebf666d5e2798aa61ec3e0968460f217ee 100644 (file)
@@ -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
index 1a618a618ccc4bf5059e116bc78f061771bf7991..543844ce454dce0c2f14087bb20caf4edf459659 100644 (file)
@@ -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);