just an update of vntwusb via driver (device 160a:3184) to a recent kernel


Signed-off-by: Domen Puncer <domen@coderock.org>

diff -pru driver.orig/dpc.c driver/dpc.c
--- driver.orig/dpc.c	2006-08-17 11:42:26.000000000 +0200
+++ driver/dpc.c	2008-06-26 09:24:54.000000000 +0200
@@ -648,7 +648,8 @@ RXbBulkInProcessData (
 	            skb->data += 8;
 	            skb->tail += 8;
                 skb_put(skb, FrameSize);
-	            skb->mac.raw = skb->data;
+	           // 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));
@@ -775,7 +776,8 @@ RXbBulkInProcessData (
             skb->data +=  (cbIVOffset + 8);
             skb->tail +=  (cbIVOffset + 8);
             skb_put(skb, FrameSize);
-            skb->mac.raw = skb->data;
+ //           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));
@@ -867,7 +869,8 @@ RXbBulkInProcessData (
                      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;
+                  //   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 -pru driver.orig/main_usb.c driver/main_usb.c
--- driver.orig/main_usb.c	2007-01-18 15:26:04.000000000 +0100
+++ driver/main_usb.c	2008-06-26 09:16:42.000000000 +0200
@@ -317,7 +317,10 @@ static const long frequency_list[] = { 
 #endif 
 
 #if WIRELESS_EXT > 12
-static const struct iw_handler_def	iwctl_handler_def;
+//static const struct iw_handler_def	iwctl_handler_def;
+static const struct iw_handler_def	iwctl_handler_def = {
+	.get_wireless_stats = iwctl_get_wireless_stats;
+};
 #else	
 struct iw_request_info {};
 #endif	//WIRELESS_EXT > 12
@@ -781,7 +784,7 @@ vntwusb_found1(struct usb_device *udev, 
     pDevice->usb = udev;
 
     // Chain it all together 
-    SET_MODULE_OWNER(netdev); 
+//    SET_MODULE_OWNER(netdev); 
     
     // Set initial settings   
     device_set_options(pDevice);
@@ -798,7 +801,7 @@ vntwusb_found1(struct usb_device *udev, 
     netdev->set_multicast_list = device_set_multi;
     netdev->do_ioctl           = device_ioctl;
 #ifdef WIRELESS_EXT
-	netdev->get_wireless_stats = iwctl_get_wireless_stats;
+//	netdev->get_wireless_stats = iwctl_get_wireless_stats;
 #if WIRELESS_EXT > 12
 	netdev->wireless_handlers = (struct iw_handler_def *)&iwctl_handler_def;
 //	netdev->wireless_handlers = NULL;	
diff -pru driver.orig/Makefile driver/Makefile
--- driver.orig/Makefile	2006-07-19 17:03:42.000000000 +0200
+++ driver/Makefile	2008-06-26 09:10:27.000000000 +0200
@@ -61,11 +61,11 @@ SRC = main_usb.c card.c mac.c baseband.c
 
 
 ifeq ($(HOSTAP), 1)
-  CFLAGS += -DHOSTAP
+  EXTRA_CFLAGS += -DHOSTAP
 endif
 
 
-CFLAGS += -I$(PWD) -I$(PWD)/../include -I$(PWD)/include
+EXTRA_CFLAGS += -I$(PWD) -I$(PWD)/../include -I$(PWD)/include
 
 
 # build rule
@@ -87,7 +87,7 @@ vntwusb-objs :=	main_usb.o card.o mac.o 
 	usbpipe.o channel.o control.o firmware.o int.o
 
 .c.o:
-	$(CC) $(CFLAGS) -o $@ $<
+	$(CC) $(EXTRA_CFLAGS) -o $@ $<
 
 default:
 	make -C $(KSRC) SUBDIRS=$(shell pwd) modules
@@ -123,16 +123,16 @@ test_cc = $(shell which $(cc) > /dev/nul
 CC := $(foreach cc, $(CC), $(test_cc))
 CC := $(firstword $(CC))
 
-CFLAGS += -Wall -DLINUX -D__KERNEL__ -DMODULE  -DEXPORT_SYMTAB -D__NO_VERSION__ -O2 -pipe
-CFLAGS += -I$(KSRC)/include -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing
-CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
+EXTRA_CFLAGS += -Wall -DLINUX -D__KERNEL__ -DMODULE  -DEXPORT_SYMTAB -D__NO_VERSION__ -O2 -pipe
+EXTRA_CFLAGS += -I$(KSRC)/include -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing
+EXTRA_CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
             echo "-DMODVERSIONS -include $(KSRC)/include/linux/modversions.h")
             
 .SILENT: $(TARGET) clean            
             
 
 # look for SMP in config.h
-SMP := $(shell $(CC) $(CFLAGS) -E -dM $(CONFIG_FILE) | \
+SMP := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(CONFIG_FILE) | \
          grep CONFIG_SMP | awk '{ print $$3 }')
          
 ifneq ($(SMP),1)
@@ -141,7 +141,7 @@ endif
 
 
 ifeq ($(SMP), 1)
-  CFLAGS += -D__SMP__
+  EXTRA_CFLAGS += -D__SMP__
 endif
 
 
@@ -149,7 +149,7 @@ endif
 # check x86_64
 SUBARCH := $(shell uname -m)
 ifeq ($(SUBARCH),x86_64)
-    CFLAGS += -mcmodel=kernel -mno-red-zone
+    EXTRA_CFLAGS += -mcmodel=kernel -mno-red-zone
 endif
 
 
diff -pru driver.orig/wmgr.c driver/wmgr.c
--- driver.orig/wmgr.c	2007-01-12 11:18:20.000000000 +0100
+++ driver/wmgr.c	2008-06-26 09:21:46.000000000 +0200
@@ -1027,7 +1027,8 @@ s_vMgrRxAssocResponse(
                        );                
                 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;
+               // 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));
@@ -1610,7 +1611,8 @@ s_vMgrRxDisassociation(
              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;
+             //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));
@@ -1687,7 +1689,8 @@ s_vMgrRxDeauthentication(
                  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;
+              //   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));
