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;
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;
--- 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
--- 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);