Commit 9bf3d727 authored by Glen Lee's avatar Glen Lee Committed by Greg Kroah-Hartman

staging: wilc1000: linux_wlan_start_firmware: change argument with dev

This patch changes argument nic with dev and use netdev private data member
wilc instead of g_linux_wlan, and pass dev to the function as well.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32f03328
...@@ -569,10 +569,15 @@ int linux_wlan_get_firmware(perInterface_wlan_t *p_nic) ...@@ -569,10 +569,15 @@ int linux_wlan_get_firmware(perInterface_wlan_t *p_nic)
} }
static int linux_wlan_start_firmware(perInterface_wlan_t *nic) static int linux_wlan_start_firmware(struct net_device *dev)
{ {
perInterface_wlan_t *nic;
struct wilc *wilc;
int ret = 0; int ret = 0;
nic = netdev_priv(dev);
wilc = nic->wilc;
/* start firmware */ /* start firmware */
PRINT_D(INIT_DBG, "Starting Firmware ...\n"); PRINT_D(INIT_DBG, "Starting Firmware ...\n");
ret = wilc_wlan_start(); ret = wilc_wlan_start();
...@@ -583,7 +588,7 @@ static int linux_wlan_start_firmware(perInterface_wlan_t *nic) ...@@ -583,7 +588,7 @@ static int linux_wlan_start_firmware(perInterface_wlan_t *nic)
/* wait for mac ready */ /* wait for mac ready */
PRINT_D(INIT_DBG, "Waiting for Firmware to get ready ...\n"); PRINT_D(INIT_DBG, "Waiting for Firmware to get ready ...\n");
ret = linux_wlan_lock_timeout(&g_linux_wlan->sync_event, 5000); ret = linux_wlan_lock_timeout(&wilc->sync_event, 5000);
if (ret) { if (ret) {
PRINT_D(INIT_DBG, "Firmware start timed out"); PRINT_D(INIT_DBG, "Firmware start timed out");
goto _fail_; goto _fail_;
...@@ -1135,7 +1140,7 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic) ...@@ -1135,7 +1140,7 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
} }
/* Start firmware*/ /* Start firmware*/
ret = linux_wlan_start_firmware(nic); ret = linux_wlan_start_firmware(dev);
if (ret < 0) { if (ret < 0) {
PRINT_ER("Failed to start firmware\n"); PRINT_ER("Failed to start firmware\n");
ret = -EIO; ret = -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment