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

staging: wilc1000: wilc_wlan_cfg_get: pass struct wilc

This patch passes the struct wilc to the function and use it instead of
global variable wilc_dev.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 89758e13
...@@ -597,7 +597,7 @@ s32 wilc_send_config_pkt(struct wilc *wilc, u8 mode, struct wid *wids, ...@@ -597,7 +597,7 @@ s32 wilc_send_config_pkt(struct wilc *wilc, u8 mode, struct wid *wids,
for (counter = 0; counter < count; counter++) { for (counter = 0; counter < count; counter++) {
PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter, PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter,
(counter == count - 1)); (counter == count - 1));
if (!wilc_wlan_cfg_get(!counter, if (!wilc_wlan_cfg_get(wilc, !counter,
wids[counter].id, wids[counter].id,
(counter == count - 1), (counter == count - 1),
drv)) { drv)) {
......
...@@ -939,7 +939,7 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic) ...@@ -939,7 +939,7 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
goto _fail_irq_enable_; goto _fail_irq_enable_;
} }
if (wilc_wlan_cfg_get(1, WID_FIRMWARE_VERSION, 1, 0)) { if (wilc_wlan_cfg_get(wl, 1, WID_FIRMWARE_VERSION, 1, 0)) {
int size; int size;
char Firmware_ver[20]; char Firmware_ver[20];
......
...@@ -1540,10 +1540,10 @@ int wilc_wlan_cfg_set(struct wilc *wilc, int start, u32 wid, u8 *buffer, ...@@ -1540,10 +1540,10 @@ int wilc_wlan_cfg_set(struct wilc *wilc, int start, u32 wid, u8 *buffer,
return ret_size; return ret_size;
} }
int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drv_handler) int wilc_wlan_cfg_get(struct wilc *wilc, int start, u32 wid, int commit,
u32 drv_handler)
{ {
wilc_wlan_dev_t *p = &g_wlan; wilc_wlan_dev_t *p = &g_wlan;
struct wilc *wilc = wilc_dev;
u32 offset; u32 offset;
int ret_size; int ret_size;
......
...@@ -291,7 +291,8 @@ void wilc_handle_isr(struct wilc *wilc); ...@@ -291,7 +291,8 @@ void wilc_handle_isr(struct wilc *wilc);
void wilc_wlan_cleanup(struct net_device *dev); void wilc_wlan_cleanup(struct net_device *dev);
int wilc_wlan_cfg_set(struct wilc *wilc, int start, u32 wid, u8 *buffer, int wilc_wlan_cfg_set(struct wilc *wilc, int start, u32 wid, u8 *buffer,
u32 buffer_size, int commit, u32 drv_handler); u32 buffer_size, int commit, u32 drv_handler);
int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drv_handler); int wilc_wlan_cfg_get(struct wilc *wilc, int start, u32 wid, int commit,
u32 drv_handler);
int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 buffer_size); int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 buffer_size);
int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
u32 buffer_size, wilc_tx_complete_func_t func); u32 buffer_size, wilc_tx_complete_func_t func);
......
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