From 38b3001de95ad5a52cf32ebb9c7fe1fd2b16c396 Mon Sep 17 00:00:00 2001 From: Glen Lee Date: Tue, 20 Oct 2015 17:13:51 +0900 Subject: [PATCH] staging: wilc1000: add wilc to netdev private data structure This patch add wilc to struct perInterface_wlan_t which is netdev private data to access wilc via netdev_priv function. Assign wilc to nic->wilc. The global variable g_linux_wlan will be replaced with netdev private data member wilc step by step. Signed-off-by: Glen Lee Signed-off-by: Tony Cho Signed-off-by: Greg Kroah-Hartman --- 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 5701e58f7c4e..8fa6b7c54f5a 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1662,6 +1662,7 @@ int wilc_netdev_init(struct wilc **wilc) nic->u8IfIdx = g_linux_wlan->vif_num; nic->wilc_netdev = ndev; + nic->wilc = *wilc; g_linux_wlan->vif[g_linux_wlan->vif_num].ndev = ndev; g_linux_wlan->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 e0c66bcdf88a..40a44f8318eb 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 { -- 2.39.5