El Domingo, 5 de Agosto de 2007 06:21, Mayne escribió:
>
> The usual solution would be to find out when exactly the kernel interface
> changed and put #ifdefs around the proper places. For your iw_stats
> changes this should be straightforward - for skb->mac.raw it's probably
> better to find out what exactly happened to the field. If you do that and
> submit the patch (best send it to me directly, too) I'll include it in SF
> SVN trunk.
>
thank for you reply Mayne, 
I research on this issue and found a patch on madwifi driver
http://madwifi.org/changeset/2601

I bassed on these patch and now understand little more how to fix it.
I create this new patch for back compatibility for kernels < 2.6.22
(still research for the iw_statics fix)
im newbie on linux kernel code and still learn. 
i very greateful for your comments
-- 
Dock Sud BBS
http://www.docksud.com.ar
telnet://bbs.docksud.com.ar
Index: src/zd1205.c
===================================================================
--- src/zd1205.c	(revisión: 85)
+++ src/zd1205.c	(copia de trabajo)
@@ -4159,7 +4159,7 @@
                         skb->tail = skb->data = pHdr;
                         /* ath_desc: fix monitor mode frame length */
                         skb_put(skb, data_sz - PLCP_HEADER - EXTRA_INFO_LEN - CRC32_LEN);
-                        skb->mac.raw = skb->data;
+                        skb_reset_mac_header(skb);
                         skb->pkt_type = PACKET_OTHERHOST;
                         skb->protocol = __constant_htons(ETH_P_802_2);
                         skb->dev = dev;
@@ -4780,7 +4780,7 @@
 struct iw_statistics *zd1205wext_iw_get_stats(struct net_device *dev)
 {
 	struct zd1205_private *macp = dev->priv;
-	struct iw_statistics *iw_stats = &macp->drv_stats.iw_stats;
+	struct iw_statistics *iw_stats = &macp->device->stats;
 
 	iw_stats->qual.noise = 0;
 	iw_stats->qual.qual = macp->rxSignalQuality;
Index: src/zdcompat.h
===================================================================
--- src/zdcompat.h	(revisión: 85)
+++ src/zdcompat.h	(copia de trabajo)
@@ -86,5 +86,37 @@
 #define free_netdev(x)       kfree(x)
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+#include <linux/skbuff.h>
+static inline unsigned char *skb_end_pointer(const struct sk_buff *skb)
+{
+    return skb->end;
+}
 
+static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
+{
+    return skb->tail;
+}
+
+static inline void skb_set_network_header(struct sk_buff *skb, const int offset)
+{
+    skb->nh.raw = skb->data + offset;
+}
+
+static inline void skb_reset_network_header(struct sk_buff *skb)
+{
+    skb->nh.raw = skb->data;
+}
+
+static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
+{
+    return skb->mac.raw;
+}
+
+static inline void skb_reset_mac_header(struct sk_buff *skb)
+{
+    skb->mac.raw = skb->data;
+}
 #endif
+
+#endif
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Zd1211-devs mailing list - http://zd1211.wiki.sourceforge.net/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs

Reply via email to