logo       
Google Custom Search
    AddThis Social Bookmark Button

revision 2339 committed: msg#00034

Subject: revision 2339 committed
Project     : madwifi
Revision    : 2339
Author      : mentor (Matthew W. S. Bell)
Date        : 2007-05-15 22:46:14 +0200 (Tue, 15 May 2007)

Log Message :
Changes to compile against Linux 2.6.22.

Signed-off-by: GrimRC (Eugene St Leger) <grimrc@xxxxxxxxx>

Affected Files:
* trunk/ath/if_ath_pci.c                              updated             
* trunk/net80211/ieee80211_input.c                    updated             
* trunk/net80211/ieee80211_monitor.c                  updated             


Modified: trunk/ath/if_ath_pci.c
===================================================================
--- trunk/ath/if_ath_pci.c      2007-05-14 19:37:53 UTC (rev 2338)
+++ trunk/ath/if_ath_pci.c      2007-05-15 20:46:14 UTC (rev 2339)
@@ -207,7 +207,12 @@
 
        pci_set_drvdata(pdev, dev);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+       if (request_irq(dev->irq, ath_intr, IRQF_SHARED, dev->name, dev)) {
+#else
        if (request_irq(dev->irq, ath_intr, SA_SHIRQ, dev->name, dev)) {
+#endif
+
                printk(KERN_WARNING "%s: request_irq failed\n", dev->name);
                goto bad3;
        }

Modified: trunk/net80211/ieee80211_input.c
===================================================================
--- trunk/net80211/ieee80211_input.c    2007-05-14 19:37:53 UTC (rev 2338)
+++ trunk/net80211/ieee80211_input.c    2007-05-15 20:46:14 UTC (rev 2339)
@@ -1135,8 +1135,15 @@
                }
                if (skb1 != NULL) {
                        skb1->dev = dev;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+                       skb1->mac_header = skb1->data;
+                       skb1->network_header = skb1->data + sizeof(struct 
ether_header);
+#else
                        skb1->mac.raw = skb1->data;
                        skb1->nh.raw = skb1->data + sizeof(struct ether_header);
+#endif
+
                        skb1->protocol = __constant_htons(ETH_P_802_2);
                        /* XXX insert vlan tag before queue it? */
                        dev_queue_xmit(skb1);
@@ -2262,7 +2269,13 @@
                if (skb1 == NULL)
                        return;
                skb1->dev = dev;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+               skb1->mac_header = skb1->data;
+#else
                skb1->mac.raw = skb1->data;
+#endif
+
                skb1->ip_summed = CHECKSUM_NONE;
                skb1->pkt_type = PACKET_OTHERHOST;
                skb1->protocol = __constant_htons(0x0019);  /* ETH_P_80211_RAW 
*/
@@ -2540,7 +2553,13 @@
         * constants instead. We know the packet type anyway. */
        skb->pkt_type = PACKET_BROADCAST;
        skb->protocol = htons(ETH_P_802_2);
+ 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+       skb->mac_header = skb->data;
+#else
        skb->mac.raw = skb->data;
+#endif
+
        ieee80211_deliver_data(ni, skb);
        return;
 }
@@ -3710,15 +3729,25 @@
 ath_eth_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct ethhdr *eth;
-       
-       skb->mac.raw=skb->data;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)       
+       skb->mac_header = skb->data;
+#else
+       skb->mac.raw = skb->data;
+#endif
+
        skb_pull(skb, ETH_HLEN);
        /*
         * NB: mac.ethernet is replaced in 2.6.9 by eth_hdr but
         *     since that's an inline and not a define there's
         *     no easy way to do this cleanly.
         */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+       eth = (struct ethhdr *)skb->mac_header;
+#else
        eth = (struct ethhdr *)skb->mac.raw;
+#endif
        
        if (*eth->h_dest & 1)
                if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0)

Modified: trunk/net80211/ieee80211_monitor.c
===================================================================
--- trunk/net80211/ieee80211_monitor.c  2007-05-14 19:37:53 UTC (rev 2338)
+++ trunk/net80211/ieee80211_monitor.c  2007-05-15 20:46:14 UTC (rev 2339)
@@ -368,7 +368,13 @@
                if (vap->iv_monitor_txf_len && tx) {
                        /* truncate transmit feedback packets */
                        skb_trim(skb1, vap->iv_monitor_txf_len);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+                       skb1->network_header = skb1->data;
+#else
                        skb1->nh.raw = skb1->data;
+#endif
+
                }
                switch (vap->iv_dev->type) {
                case ARPHRD_IEEE80211:
@@ -555,7 +561,13 @@
                                skb_trim(skb1, skb1->len - IEEE80211_CRC_LEN);
                        }
                        skb1->dev = dev; /* NB: deliver to wlanX */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+                       skb1->mac_header = skb1->data;
+#else
                        skb1->mac.raw = skb1->data;
+#endif
+
                        skb1->ip_summed = CHECKSUM_NONE;
                        skb1->pkt_type = pkttype;
                        skb1->protocol = __constant_htons(0x0019); /* 
ETH_P_80211_RAW */

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>