From: Glen Lee <glen....@atmel.com>

This patch adds struct wilc to struct perInterface_wlan_t which is netdev
private data to access wilc via netdev_priv function and assigns wilc to
nic->wilc. The global variable wl will be replaced with netdev private data
member wilc step by step.

Signed-off-by: Glen Lee <glen....@atmel.com>
Signed-off-by: Tony Cho <tony....@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c         | 1 +
 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 3cc4861..90c39b6 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1658,6 +1658,7 @@ int wilc_netdev_init(struct wilc **wilc)
 
                nic->u8IfIdx = wl->vif_num;
                nic->wilc_netdev = ndev;
+               nic->wilc = *wilc;
                wl->vif[wl->vif_num].ndev = ndev;
                wl->vif_num++;
                ndev->netdev_ops = &wilc_netdev_ops;
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h 
b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index 9a9e082..cb23134 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -199,7 +199,7 @@ typedef struct {
        struct_frame_reg g_struct_frame_reg[num_reg_frame];
        struct net_device *wilc_netdev;
        struct net_device_stats netstats;
-
+       struct wilc *wilc;
 } perInterface_wlan_t;
 
 struct WILC_WFI_mon_priv {
-- 
1.9.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to