diff -Naur VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/device.h VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/device.h
--- VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/device.h	2006-08-30 17:03:10.000000000 -0400
+++ VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/device.h	2008-03-07 08:15:31.000000000 -0500
@@ -56,7 +56,6 @@
 #include <linux/sched.h>
 #include <asm/io.h>
 #include <linux/if.h>
-#include <linux/config.h>
 #include <asm/uaccess.h>
 #include <linux/proc_fs.h>
 #include <linux/inetdevice.h>
diff -Naur VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/device_main.c VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/device_main.c
--- VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/device_main.c	2006-10-16 19:56:52.000000000 -0400
+++ VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/device_main.c	2008-03-07 07:59:34.000000000 -0500
@@ -126,6 +126,8 @@
 #include "rf.h"
 #endif
 
+#include "skbcompat.h"
+
 // #ifdef PRIVATE_OBJ
 //#if !defined(__DEVICE_EXP_H)
 //#include "device_exp.h"
@@ -150,10 +152,17 @@
 MODULE_DESCRIPTION("VIA Networking Solomon-A/B/G Wireless LAN Adapter Driver"); 
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+  #define DEVICE_PARAM(N,D) \
+        static int N[MAX_UINTS]=OPTION_DEFAULT;\
+	module_param_array(N, int, NULL, 0);\
+        MODULE_PARM_DESC(N,D);
+#else
 #define DEVICE_PARAM(N,D) \
         static const int N[MAX_UINTS]=OPTION_DEFAULT;\
         MODULE_PARM(N, "1-" __MODULE_STRING(MAX_UINTS) "i");\
         MODULE_PARM_DESC(N, D);
+#endif
 
 #define RX_DESC_MIN0     16
 #define RX_DESC_MAX0     128
@@ -982,7 +991,9 @@
     dev->do_ioctl           = device_ioctl;
     
 #ifdef WIRELESS_EXT
+#if WIRELESS_EXT < 13
 	dev->get_wireless_stats = iwctl_get_wireless_stats;
+#endif
 #if WIRELESS_EXT > 12
 	dev->wireless_handlers = (struct iw_handler_def *)&iwctl_handler_def;
 //	netdev->wireless_handlers = NULL;	
@@ -1636,7 +1647,7 @@
 #else
                     skb = pTD->pTDInfo->skb;
 	                skb->dev = pDevice->apdev;
-	                skb->mac.raw = skb->data;
+			skb_reset_mac_header(skb);
 	                skb->pkt_type = PACKET_OTHERHOST;
     	            //skb->protocol = htons(ETH_P_802_2);
 	                memset(skb->cb, 0, sizeof(skb->cb));
@@ -3372,7 +3383,11 @@
     int ret;
     
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+    ret=pci_register_driver(&device_driver);
+#else
     ret=pci_module_init(&device_driver);
+#endif
     
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,9)
 #ifdef CONFIG_PM    
diff -Naur VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/dpc.c VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/dpc.c
--- VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/dpc.c	2006-03-15 19:44:52.000000000 -0500
+++ VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/dpc.c	2008-03-07 07:59:34.000000000 -0500
@@ -93,6 +93,8 @@
 #include "aes_ccmp.h"
 #endif
 
+#include "skbcompat.h"
+
 /*---------------------  Static Definitions -------------------------*/
 
 /*---------------------  Static Classes  ----------------------------*/
@@ -644,7 +646,7 @@
                 ref_skb_add_offset(skb->skb, 4);
                 ref_skb_set_dev(pDevice->apdev, skb->skb);
                 skb_put(skb->skb, FrameSize);
-	            skb->mac.raw = skb->data;
+		skb_reset_mac_header(skb);
 	            *(skb->pkt_type) = PACKET_OTHERHOST;
     	        *(skb->protocol) = htons(ETH_P_802_2);
 	            memset(skb->cb, 0, sizeof(skb->cb));
@@ -653,7 +655,7 @@
 	            skb->data += 4;
 	            skb->tail += 4;
                 skb_put(skb, FrameSize);
-	            skb->mac.raw = skb->data;
+		skb_reset_mac_header(skb);
 	            skb->pkt_type = PACKET_OTHERHOST;
     	        skb->protocol = htons(ETH_P_802_2);
 	            memset(skb->cb, 0, sizeof(skb->cb));
@@ -763,7 +765,7 @@
             ref_skb_add_offset(skb->skb, (cbIVOffset + 4));
             ref_skb_set_dev(pDevice->apdev, skb->skb);
             skb_put(skb->skb, FrameSize);
-            skb->mac.raw = skb->data;
+		skb_reset_mac_header(skb);
             *(skb->pkt_type) = PACKET_OTHERHOST;
 	        *(skb->protocol) = htons(ETH_P_802_2);
             memset(skb->cb, 0, sizeof(skb->cb));
@@ -772,7 +774,7 @@
             skb->data +=  (cbIVOffset + 4);
             skb->tail +=  (cbIVOffset + 4);
             skb_put(skb, FrameSize);
-            skb->mac.raw = skb->data;
+		skb_reset_mac_header(skb);
             skb->pkt_type = PACKET_OTHERHOST;
             skb->protocol = htons(ETH_P_802_2);
             memset(skb->cb, 0, sizeof(skb->cb));
@@ -871,7 +873,7 @@
                      wpahdr->req_ie_len = 0;
                      skb_put(pDevice->skb, sizeof(viawget_wpa_header));
                      pDevice->skb->dev = pDevice->wpadev;
-                     pDevice->skb->mac.raw = pDevice->skb->data;
+                     skb_reset_mac_header(pDevice->skb);
                      pDevice->skb->pkt_type = PACKET_HOST;
                      pDevice->skb->protocol = htons(ETH_P_802_2);
                      memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
diff -Naur VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/iwctl.c VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/iwctl.c
--- VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/iwctl.c	2006-08-02 11:49:50.000000000 -0400
+++ VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/iwctl.c	2008-03-07 07:59:34.000000000 -0500
@@ -766,7 +766,7 @@
         pItemSSID->byElementID = WLAN_EID_SSID;
 		memcpy(pItemSSID->abySSID, extra, wrq->length);
 	    DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set essid = %s \n", pItemSSID->abySSID);
-		pItemSSID->len = wrq->length - 1;
+		pItemSSID->len = wrq->length;
 	}
     if (pDevice->flags & DEVICE_FLAGS_OPENED) {
 	    pDevice->bCommit = TRUE;
diff -Naur VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/skbcompat.h VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/skbcompat.h
--- VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/skbcompat.h	1969-12-31 19:00:00.000000000 -0500
+++ VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/skbcompat.h	2008-03-07 07:59:34.000000000 -0500
@@ -0,0 +1,11 @@
+#if !defined(__SKB_COMPAT__)
+#define __SKB_COMPAT__
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+#include <linux/skbuff.h>
+static inline void skb_reset_mac_header(struct sk_buff *skb) {
+	skb->mac.raw = skb->data;
+}
+#endif
+
+#endif
diff -Naur VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/wmgr.c VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/wmgr.c
--- VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/wmgr.c	2006-09-20 15:33:28.000000000 -0400
+++ VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/wmgr.c	2008-03-07 07:59:34.000000000 -0500
@@ -117,6 +117,9 @@
 #if !defined(__IOWPA_H__)
 #include "iowpa.h"
 #endif
+
+#include "skbcompat.h"
+
 /*---------------------  Static Definitions -------------------------*/
 
 
@@ -1090,7 +1093,7 @@
                        );                
                 skb_put(pDevice->skb, sizeof(viawget_wpa_header) + wpahdr->resp_ie_len + wpahdr->req_ie_len);
                 pDevice->skb->dev = pDevice->wpadev;
-                pDevice->skb->mac.raw = pDevice->skb->data;
+		skb_reset_mac_header(pDevice->skb);
                 pDevice->skb->pkt_type = PACKET_HOST;
                 pDevice->skb->protocol = htons(ETH_P_802_2);
                 memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
@@ -1673,7 +1676,7 @@
              wpahdr->req_ie_len = 0;
              skb_put(pDevice->skb, sizeof(viawget_wpa_header));
              pDevice->skb->dev = pDevice->wpadev;
-             pDevice->skb->mac.raw = pDevice->skb->data;
+		skb_reset_mac_header(pDevice->skb);
              pDevice->skb->pkt_type = PACKET_HOST;
              pDevice->skb->protocol = htons(ETH_P_802_2);
              memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
@@ -1749,7 +1752,7 @@
                  wpahdr->req_ie_len = 0;
                  skb_put(pDevice->skb, sizeof(viawget_wpa_header));
                  pDevice->skb->dev = pDevice->wpadev;
-                 pDevice->skb->mac.raw = pDevice->skb->data;
+		skb_reset_mac_header(pDevice->skb);
                  pDevice->skb->pkt_type = PACKET_HOST;
                  pDevice->skb->protocol = htons(ETH_P_802_2);
                  memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
diff -Naur VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/wpactl.c VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/wpactl.c
--- VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/wpactl.c	2006-08-14 15:16:42.000000000 -0400
+++ VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/driver/wpactl.c	2008-03-07 07:59:34.000000000 -0500
@@ -140,7 +140,11 @@
 	sprintf(pDevice->wpadev->name, "%swpa", dev->name);
 	
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+	#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
+		SET_NETDEV_DEV(pDevice->wpadev, &dev->dev);
+	#else
 	SET_NETDEV_DEV(pDevice->wpadev, dev->class_dev.dev);
+	#endif
 	pDevice->wpadev->destructor = free_netdev;	
 #endif
 	ret = register_netdevice(pDevice->wpadev);
@@ -183,10 +187,16 @@
     }        
 
     if (pDevice->wpadev) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+	unregister_netdevice(pDevice->wpadev);
+	DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n",
+		pDevice->dev->name, pDevice->wpadev->name);
+#else
 		if (unregister_netdevice(pDevice->wpadev) == 0) {
             DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n",
 	        pDevice->dev->name, pDevice->wpadev->name);
 	    }    
+#endif
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
         kfree(pDevice->wpadev);
diff -Naur VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/include/device_cfg.h VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/include/device_cfg.h
--- VT6655-Linux-117-src-CPUPlatform-SAE.orig/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/include/device_cfg.h	2006-07-31 10:51:58.000000000 -0400
+++ VT6655-Linux-117-src-CPUPlatform-SAE.gutsy/VT6655-Linux-117-src-CPUPlatform-SAE/viawget/include/device_cfg.h	2008-03-07 08:16:50.000000000 -0500
@@ -23,7 +23,6 @@
 #ifndef __DEVICE_CONFIG_H
 #define __DEVICE_CONFIG_H
 
-#include <linux/config.h>
 #include <linux/types.h>
 
 #if !defined(__TTYPE_H__)
