index a0c860f..9c6f214 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
-@@ -124,6 +124,7 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
+@@ -122,6 +122,7 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
if (unlikely(queue >= local->hw.queues))
queue = local->hw.queues - 1;
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
- if (skb->requeue) {
- if (!hw->ampdu_queues)
- return queue;
-@@ -142,6 +143,7 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
-
- return queue;
+ /*
+ * Now we know the 1d priority, fill in the QoS header if
+ * there is one (and we haven't done this before).
+@@ -137,6 +138,7 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
+ *p++ = ack_policy | tid;
+ *p = 0;
}
+#endif
- /* Now we know the 1d priority, fill in the QoS header if
- * there is one.
+ return queue;
+ }
--- a/drivers/net/wireless/Makefile 2008-11-10 12:55:55.000000000 -0800
+++ b/drivers/net/wireless/Makefile 2008-11-10 12:57:30.000000000 -0800
-@@ -5,41 +5,14 @@
+@@ -5,43 +5,17 @@
obj-$(CONFIG_IPW2100) += ipw2x00/
obj-$(CONFIG_IPW2200) += ipw2x00/
-obj-$(CONFIG_PCI_ATMEL) += atmel_pci.o
-obj-$(CONFIG_PCMCIA_ATMEL) += atmel_cs.o
-
+ obj-$(CONFIG_AT76C50X_USB) += at76c50x-usb.o
+
-obj-$(CONFIG_PRISM54) += prism54/
-
-obj-$(CONFIG_HOSTAP) += hostap/
-# 16-bit wireless PCMCIA client drivers
-obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
-obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
--
+
obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o
-obj-$(CONFIG_USB_ZD1201) += zd1201.o
--- a/net/mac80211/iface.c 2009-02-13 14:25:06.000000000 -0800
+++ b/net/mac80211/iface.c 2009-02-13 14:25:08.000000000 -0800
-@@ -657,6 +657,7 @@
+@@ -667,6 +667,7 @@
WARN_ON(flushed);
}
static const struct net_device_ops ieee80211_dataif_ops = {
.ndo_open = ieee80211_open,
.ndo_stop = ieee80211_stop,
-@@ -676,11 +677,22 @@
+@@ -686,11 +687,22 @@
.ndo_change_mtu = ieee80211_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
};
dev->wireless_handlers = &ieee80211_iw_handler_def;
dev->destructor = free_netdev;
}
-@@ -696,7 +708,11 @@
+@@ -706,7 +718,11 @@
/* and set some type-dependent values */
sdata->vif.type = type;
sdata->wdev.iftype = type;
/* only monitor differs */
-@@ -717,7 +733,11 @@
+@@ -729,7 +745,11 @@
break;
case NL80211_IFTYPE_MONITOR:
sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP;
sdata->u.mntr_flags = MONITOR_FLAG_CONTROL |
MONITOR_FLAG_OTHER_BSS;
break;
-@@ -823,6 +843,10 @@
+@@ -836,6 +856,10 @@
if (ret)
goto fail;
ieee80211_sdata_set_mesh_id(sdata,
--- a/net/mac80211/main.c 2009-02-13 14:25:06.000000000 -0800
+++ b/net/mac80211/main.c 2009-02-13 14:25:08.000000000 -0800
-@@ -487,6 +487,7 @@
+@@ -488,6 +488,7 @@
return;
}
if (!test_sta_flags(sta, WLAN_STA_PS) && !skb->requeue) {
/* Software retry the packet once */
skb->requeue = 1;
-@@ -494,6 +495,7 @@
+@@ -495,6 +496,7 @@
dev_queue_xmit(skb);
return;
}
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
if (net_ratelimit())
-@@ -797,6 +799,7 @@
+@@ -803,6 +805,7 @@
}
EXPORT_SYMBOL(ieee80211_alloc_hw);
static const struct net_device_ops ieee80211_master_ops = {
.ndo_start_xmit = ieee80211_master_start_xmit,
.ndo_open = ieee80211_master_open,
-@@ -804,12 +807,22 @@
+@@ -810,12 +813,22 @@
.ndo_set_multicast_list = ieee80211_master_set_multicast_list,
.ndo_select_queue = ieee80211_select_queue,
};
return ops;
}
+diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
+index c157d60..40f86df 100644
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -21,6 +21,7 @@
+ #include "nl80211.h"
+ #include "reg.h"
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
+ static int nl80211_lock_doit(struct sk_buff *skb, struct genl_info *info)
+ {
+ rtnl_lock();
+@@ -38,6 +39,7 @@
+ rtnl_unlock();
+ }
+
++#endif
+ /* the netlink family */
+ static struct genl_family nl80211_fam = {
+ .id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */
+@@ -45,10 +47,12 @@
+ .hdrsize = 0, /* no private header */
+ .version = 1, /* no particular meaning now */
+ .maxattr = NL80211_ATTR_MAX,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
+ .pre_doit = nl80211_lock_doit,
+ .pre_dumpit = nl80211_lock_dumpit,
+ .post_doit = nl80211_unlock,
+ .post_dumpit = nl80211_unlock,
++#endif
+ };
+
+ /* internal helper: get drv and dev */
+@@ -637,12 +641,18 @@
+ flags = &_flags;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++#endif
+ err = drv->ops->change_virtual_intf(&drv->wiphy, ifindex,
+ type, flags, ¶ms);
+
+ dev = __dev_get_by_index(&init_net, ifindex);
+ WARN_ON(!dev || (!err && dev->ieee80211_ptr->iftype != type));
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_unlock();
++#endif
+ unlock:
+ cfg80211_put_dev(drv);
+ return err;
+@@ -683,12 +693,18 @@
+ params.mesh_id_len = nla_len(info->attrs[NL80211_ATTR_MESH_ID]);
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++#endif
+ err = parse_monitor_flags(type == NL80211_IFTYPE_MONITOR ?
+ info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL,
+ &flags);
+ err = drv->ops->add_virtual_intf(&drv->wiphy,
+ nla_data(info->attrs[NL80211_ATTR_IFNAME]),
+ type, err ? NULL : &flags, ¶ms);
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_unlock();
++#endif
+
+ unlock:
+ cfg80211_put_dev(drv);
+@@ -712,7 +728,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->del_virtual_intf(&drv->wiphy, ifindex);
++ rtnl_unlock();
++#else
+ err = drv->ops->del_virtual_intf(&drv->wiphy, ifindex);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -797,8 +819,15 @@
+ if (mac_addr)
+ NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr);
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = drv->ops->get_key(&drv->wiphy, dev, key_idx, mac_addr,
+ &cookie, get_key_callback);
++ rtnl_unlock();
++#else
++ err = drv->ops->get_key(&drv->wiphy, dev, key_idx, mac_addr,
++ &cookie, get_key_callback);
++#endif
+
+ if (err)
+ goto out;
+@@ -858,7 +887,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = func(&drv->wiphy, dev, key_idx);
++ rtnl_unlock();
++#else
++ err = func(&drv->wiphy, dev, key_idx);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -941,7 +976,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->add_key(&drv->wiphy, dev, key_idx, mac_addr, ¶ms);
++ rtnl_unlock();
++#else
+ err = drv->ops->add_key(&drv->wiphy, dev, key_idx, mac_addr, ¶ms);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -975,7 +1016,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->del_key(&drv->wiphy, dev, key_idx, mac_addr);
++ rtnl_unlock();
++#else
+ err = drv->ops->del_key(&drv->wiphy, dev, key_idx, mac_addr);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -1056,7 +1103,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = call(&drv->wiphy, dev, ¶ms);
++ rtnl_unlock();
++#else
++ err = call(&drv->wiphy, dev, ¶ms);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -1079,7 +1132,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = drv->ops->del_beacon(&drv->wiphy, dev);
++ rtnl_unlock();
++#else
++ err = drv->ops->del_beacon(&drv->wiphy, dev);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -1264,13 +1323,20 @@
+ goto out_err;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++#endif
+ while (1) {
+ err = dev->ops->dump_station(&dev->wiphy, netdev, sta_idx,
+ mac_addr, &sinfo);
+ if (err == -ENOENT)
+ break;
+ if (err)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ goto out_err_rtnl;
++#else
+ goto out_err;
++#endif
+
+ if (nl80211_send_station(skb,
+ NETLINK_CB(cb->skb).pid,
+@@ -1286,6 +1352,10 @@
+ out:
+ cb->args[1] = sta_idx;
+ err = skb->len;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ out_err_rtnl:
++ rtnl_unlock();
++#endif
+ out_err:
+ cfg80211_put_dev(dev);
+ out_put_netdev:
+@@ -1319,7 +1389,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = drv->ops->get_station(&drv->wiphy, dev, mac_addr, &sinfo);
++ rtnl_unlock();
++#else
++ err = drv->ops->get_station(&drv->wiphy, dev, mac_addr, &sinfo);
++#endif
+
+ if (err)
+ goto out;
+@@ -1421,7 +1497,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = drv->ops->change_station(&drv->wiphy, dev, mac_addr, ¶ms);
++ rtnl_unlock();
++#else
++ err = drv->ops->change_station(&drv->wiphy, dev, mac_addr, ¶ms);
++#endif
+
+ out:
+ if (params.vlan)
+@@ -1482,7 +1564,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->add_station(&drv->wiphy, dev, mac_addr, ¶ms);
++ rtnl_unlock();
++#else
+ err = drv->ops->add_station(&drv->wiphy, dev, mac_addr, ¶ms);
++#endif
+
+ out:
+ if (params.vlan)
+@@ -1511,7 +1599,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->del_station(&drv->wiphy, dev, mac_addr);
++ rtnl_unlock();
++#else
+ err = drv->ops->del_station(&drv->wiphy, dev, mac_addr);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -1611,13 +1705,20 @@
+ goto out_err;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++#endif
+ while (1) {
+ err = dev->ops->dump_mpath(&dev->wiphy, netdev, path_idx,
+ dst, next_hop, &pinfo);
+ if (err == -ENOENT)
+ break;
+ if (err)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ goto out_err_rtnl;
++#else
+ goto out_err;
++#endif
+
+ if (nl80211_send_mpath(skb, NETLINK_CB(cb->skb).pid,
+ cb->nlh->nlmsg_seq, NLM_F_MULTI,
+@@ -1632,6 +1733,10 @@
+ out:
+ cb->args[1] = path_idx;
+ err = skb->len;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ out_err_rtnl:
++ rtnl_unlock();
++#endif
+ out_err:
+ cfg80211_put_dev(dev);
+ out_put_netdev:
+@@ -1666,7 +1771,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->get_mpath(&drv->wiphy, dev, dst, next_hop, &pinfo);
++ rtnl_unlock();
++#else
+ err = drv->ops->get_mpath(&drv->wiphy, dev, dst, next_hop, &pinfo);
++#endif
+
+ if (err)
+ goto out;
+@@ -1717,7 +1828,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->change_mpath(&drv->wiphy, dev, dst, next_hop);
++ rtnl_unlock();
++#else
+ err = drv->ops->change_mpath(&drv->wiphy, dev, dst, next_hop);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -1750,7 +1867,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->add_mpath(&drv->wiphy, dev, dst, next_hop);
++ rtnl_unlock();
++#else
+ err = drv->ops->add_mpath(&drv->wiphy, dev, dst, next_hop);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -1777,7 +1900,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = drv->ops->del_mpath(&drv->wiphy, dev, dst);
++ rtnl_unlock();
++#else
++ err = drv->ops->del_mpath(&drv->wiphy, dev, dst);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -1823,7 +1952,13 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = drv->ops->change_bss(&drv->wiphy, dev, ¶ms);
++ rtnl_unlock();
++#else
++ err = drv->ops->change_bss(&drv->wiphy, dev, ¶ms);
++#endif
+
+ out:
+ cfg80211_put_dev(drv);
+@@ -1920,7 +2055,13 @@
+ return err;
+
+ /* Get the mesh params */
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->get_mesh_params(&drv->wiphy, dev, &cur_params);
++ rtnl_unlock();
++#else
+ err = drv->ops->get_mesh_params(&drv->wiphy, dev, &cur_params);
++#endif
+ if (err)
+ goto out;
+
+@@ -2066,7 +2207,13 @@
+ nla_get_u16);
+
+ /* Apply changes */
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++ err = drv->ops->set_mesh_params(&drv->wiphy, dev, &cfg, mask);
++ rtnl_unlock();
++#else
+ err = drv->ops->set_mesh_params(&drv->wiphy, dev, &cfg, mask);
++#endif
+
+ /* cleanup */
+ cfg80211_put_dev(drv);
+@@ -2241,9 +2388,15 @@
+ if (err)
+ return err;
+
+- if (drv->ops->set_mgmt_extra_ie)
++ if (drv->ops->set_mgmt_extra_ie) {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
+ err = drv->ops->set_mgmt_extra_ie(&drv->wiphy, dev, ¶ms);
+- else
++ rtnl_unlock();
++#else
++ err = drv->ops->set_mgmt_extra_ie(&drv->wiphy, dev, ¶ms);
++#endif
++ } else
+ err = -EOPNOTSUPP;
+
+ cfg80211_put_dev(drv);
+@@ -2275,9 +2428,16 @@
+ goto out;
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ rtnl_lock();
++#endif
+ if (drv->scan_req) {
+ err = -EBUSY;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ goto out_unlock;
++#else
+ goto out;
++#endif
+ }
+
+ if (info->attrs[NL80211_ATTR_SCAN_FREQUENCIES]) {
+@@ -2285,7 +2445,11 @@
+ n_channels++;
+ if (!n_channels) {
+ err = -EINVAL;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ goto out_unlock;
++#else
+ goto out;
++#endif
+ }
+ } else {
+ for (band = 0; band < IEEE80211_NUM_BANDS; band++)
+@@ -2299,7 +2463,11 @@
+
+ if (n_ssids > wiphy->max_scan_ssids) {
+ err = -EINVAL;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ goto out_unlock;
++#else
+ goto out;
++#endif
+ }
+
+ if (info->attrs[NL80211_ATTR_IE])
+@@ -2313,7 +2481,11 @@
+ + ie_len, GFP_KERNEL);
+ if (!request) {
+ err = -ENOMEM;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ goto out_unlock;
++#else
+ goto out;
++#endif
+ }
+
+ request->channels = (void *)((char *)request + sizeof(*request));
+@@ -2384,6 +2556,10 @@
+ drv->scan_req = NULL;
+ kfree(request);
+ }
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
++ out_unlock:
++ rtnl_unlock();
++#endif
+ out:
+ cfg80211_put_dev(drv);
+ dev_put(dev);