]> Pileus Git - ~andy/linux/blobdiff - net/wanrouter/wanmain.c
Merge branch 'for-linus' of git://git.infradead.org/~dedekind/ubi-2.6
[~andy/linux] / net / wanrouter / wanmain.c
index c49e223084f12a8ebcdf24c22f6a42a4fffd15c6..9ab31a3ce3ade9c4a40a3dc0f3d34ce3bfe2b192 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/capability.h>
 #include <linux/errno.h>       /* return codes */
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/module.h>      /* support for loadable modules */
 #include <linux/slab.h>                /* kmalloc(), kfree() */
 #include <linux/mm.h>
@@ -277,8 +276,8 @@ int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev,
                skb_push(skb, 7);
                skb->data[0] = 0;
                skb->data[1] = NLPID_SNAP;
-               memcpy(&skb->data[2], wanrouter_oui_ether,
-                      sizeof(wanrouter_oui_ether));
+               skb_copy_to_linear_data_offset(skb, 2, wanrouter_oui_ether,
+                                              sizeof(wanrouter_oui_ether));
                *((unsigned short*)&skb->data[5]) = htons(type);
                break;
 
@@ -454,7 +453,7 @@ static int wanrouter_device_setup(struct wan_device *wandev,
        }
 
        if (conf->data_size && conf->data) {
-               if (conf->data_size > 128000 || conf->data_size < 0) {
+               if (conf->data_size > 128000) {
                        printk(KERN_INFO
                            "%s: ERROR, Invalid firmware data size %i !\n",
                                        wandev->name, conf->data_size);