staging: wilc1000: host_int_init: add argument net_device
authorGlen Lee <glen.lee@atmel.com>
Tue, 27 Oct 2015 09:27:49 +0000 (18:27 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Oct 2015 23:10:39 +0000 (08:10 +0900)
This patch add argument net_device and pass netdev private data member wilc
to kthread_run. Pass net_device to the function as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/host_interface.h
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index 930dcba665e52e0004a8ab1fe5ad255a672e264f..f65859421bd243f4ddebf3e8a035cd0c74a3b41c 100644 (file)
@@ -7,6 +7,7 @@
 #include "wilc_wlan_if.h"
 #include "wilc_msgqueue.h"
 #include <linux/etherdevice.h>
+#include "wilc_wfi_netdevice.h"
 
 extern u8 connecting;
 
@@ -4131,11 +4132,16 @@ void host_int_send_network_info_to_host
 {
 }
 
-s32 host_int_init(struct host_if_drv **hif_drv_handler)
+s32 host_int_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 {
        s32 result = 0;
        struct host_if_drv *hif_drv;
        int err;
+       perInterface_wlan_t *nic;
+       struct wilc *wilc;
+
+       nic = netdev_priv(dev);
+       wilc = nic->wilc;
 
        PRINT_D(HOSTINF_DBG, "Initializing host interface for client %d\n", clients_count + 1);
 
@@ -4181,7 +4187,8 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler)
                        goto _fail_;
                }
 
-               hif_thread_handler = kthread_run(hostIFthread, NULL, "WILC_kthread");
+               hif_thread_handler = kthread_run(hostIFthread, wilc,
+                                                "WILC_kthread");
 
                if (IS_ERR(hif_thread_handler)) {
                        PRINT_ER("Failed to creat Thread\n");
index f3fb628f661b5ff9bb2cd7a5d35b9bc592ef2eb8..0fd2edaea5f7ddd844449c0b55bb996e67022ea4 100644 (file)
@@ -911,7 +911,7 @@ void host_int_send_network_info_to_host
  *  @date              8 March 2012
  *  @version           1.0
  */
-s32 host_int_init(struct host_if_drv **phWFIDrv);
+s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 
 /**
  *  @brief              host interface initialization function
index ac32d2b521e2a032cbf4c735cdcca637510073f3..21d053da63c558758fc062cae1560b86be488646 100644 (file)
@@ -3464,7 +3464,7 @@ int wilc_init_host_int(struct net_device *net)
        priv->bInP2PlistenState = false;
 
        sema_init(&(priv->hSemScanReq), 1);
-       s32Error = host_int_init(&priv->hWILCWFIDrv);
+       s32Error = host_int_init(net, &priv->hWILCWFIDrv);
        if (s32Error)
                PRINT_ER("Error while initializing hostinterface\n");