- zd_chip_control_leds(&mac->chip, LED_OFF);
+ zd_chip_control_leds(&mac->chip, ZD_LED_OFF);
}
---- a/net/wireless/wext.c 2009-07-27 14:43:30.802074596 -0700
-+++ b/net/wireless/wext.c 2009-07-27 14:43:31.310065767 -0700
-@@ -1118,8 +1118,13 @@ static int wireless_process_ioctl(struct
- return private(dev, iwr, cmd, info, handler);
- }
- /* Old driver API : call driver ioctl handler */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- if (dev->netdev_ops->ndo_do_ioctl)
- return dev->netdev_ops->ndo_do_ioctl(dev, ifr, cmd);
-+#else
-+ if (dev->do_ioctl)
-+ return dev->do_ioctl(dev, ifr, cmd);
-+#endif
- return -EOPNOTSUPP;
- }
-
--- a/drivers/net/wireless/libertas/defs.h 2009-07-08 14:04:29.692256519 -0700
+++ b/drivers/net/wireless/libertas/defs.h 2009-07-08 14:03:26.712279246 -0700
@@ -16,6 +16,14 @@
#define LBS_DEB_ENTER 0x00000001
#define LBS_DEB_LEAVE 0x00000002
+--- a/net/wireless/wext.c 2009-07-27 15:38:09.989056661 -0700
++++ b/net/wireless/wext.c 2009-07-27 16:05:06.681045663 -0700
+@@ -1118,8 +1118,13 @@
+ return private(dev, iwr, cmd, info, handler);
+ }
+ /* Old driver API : call driver ioctl handler */
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ if (dev->netdev_ops->ndo_do_ioctl)
+ return dev->netdev_ops->ndo_do_ioctl(dev, ifr, cmd);
++#else
++ if (dev->do_ioctl)
++ return dev->do_ioctl(dev, ifr, cmd);
++#endif
+ return -EOPNOTSUPP;
+ }
+
+@@ -1272,6 +1277,7 @@
+ }
+ #endif
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+ static int __net_init wext_pernet_init(struct net *net)
+ {
+ skb_queue_head_init(&net->wext_nlevents);
+@@ -1315,6 +1321,29 @@
+
+ static DECLARE_WORK(wireless_nlevent_work, wireless_nlevent_process);
+
++#else
++/* Older kernels get the old way of doing stuff*/
++static struct sk_buff_head wireless_nlevent_queue;
++
++static int __init wireless_nlevent_init(void)
++{
++ skb_queue_head_init(&wireless_nlevent_queue);
++ return 0;
++}
++
++subsys_initcall(wireless_nlevent_init);
++
++static void wireless_nlevent_process(unsigned long data)
++{
++ struct sk_buff *skb;
++ while ((skb = skb_dequeue(&wireless_nlevent_queue)))
++ rtnl_notify(skb, &init_net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
++}
++
++static DECLARE_TASKLET(wireless_nlevent_tasklet, wireless_nlevent_process, 0);
++
++#endif
++
+ static struct nlmsghdr *rtnetlink_ifinfo_prep(struct net_device *dev,
+ struct sk_buff *skb)
+ {
+@@ -1525,8 +1554,13 @@
+
+ skb_shinfo(skb)->frag_list = compskb;
+ #endif
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+ skb_queue_tail(&dev_net(dev)->wext_nlevents, skb);
+ schedule_work(&wireless_nlevent_work);
++#else
++ skb_queue_tail(&wireless_nlevent_queue, skb);
++ tasklet_schedule(&wireless_nlevent_tasklet);
++#endif
+ }
+ EXPORT_SYMBOL(wireless_send_event);
+