staging: wilc1000: change parameter type of hif_init
This patch changes parameter type wilc_wlan_inp_t with struct wilc and modify it's related code. Pass wilc to the functions as well. wilc will be used in later patch. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
64ae414fe2
commit
9c800322a5
|
@ -11,6 +11,7 @@
|
|||
#include "wilc_wlan_if.h"
|
||||
#include "wilc_wlan.h"
|
||||
#include "linux_wlan_sdio.h"
|
||||
#include "wilc_wfi_netdevice.h"
|
||||
|
||||
#define WILC_SDIO_BLOCK_SIZE 512
|
||||
|
||||
|
@ -550,7 +551,7 @@ static int sdio_sync(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int sdio_init(wilc_wlan_inp_t *inp, wilc_debug_func func)
|
||||
static int sdio_init(struct wilc *wilc, wilc_debug_func func)
|
||||
{
|
||||
sdio_cmd52_t cmd;
|
||||
int loop;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "wilc_wlan_if.h"
|
||||
#include "wilc_wlan.h"
|
||||
#include "linux_wlan_spi.h"
|
||||
#include "wilc_wfi_netdevice.h"
|
||||
|
||||
typedef struct {
|
||||
wilc_debug_func dPrint;
|
||||
|
@ -945,7 +946,7 @@ static int wilc_spi_sync(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int wilc_spi_init(wilc_wlan_inp_t *inp, wilc_debug_func func)
|
||||
static int wilc_spi_init(struct wilc *wilc, wilc_debug_func func)
|
||||
{
|
||||
u32 reg;
|
||||
u32 chipid;
|
||||
|
|
|
@ -1655,6 +1655,10 @@ _fail_:
|
|||
int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp)
|
||||
{
|
||||
int ret = 0;
|
||||
perInterface_wlan_t *nic = netdev_priv(dev);
|
||||
struct wilc *wilc;
|
||||
|
||||
wilc = nic->wilc;
|
||||
|
||||
PRINT_D(INIT_DBG, "Initializing WILC_Wlan ...\n");
|
||||
|
||||
|
@ -1663,14 +1667,14 @@ int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp)
|
|||
sizeof(wilc_wlan_io_func_t));
|
||||
|
||||
#ifdef WILC_SDIO
|
||||
if (!hif_sdio.hif_init(inp, wilc_debug)) {
|
||||
if (!hif_sdio.hif_init(wilc, wilc_debug)) {
|
||||
ret = -EIO;
|
||||
goto _fail_;
|
||||
}
|
||||
memcpy((void *)&g_wlan.hif_func, &hif_sdio,
|
||||
sizeof(struct wilc_hif_func));
|
||||
#else
|
||||
if (!hif_spi.hif_init(inp, wilc_debug)) {
|
||||
if (!hif_spi.hif_init(wilc, wilc_debug)) {
|
||||
ret = -EIO;
|
||||
goto _fail_;
|
||||
}
|
||||
|
|
|
@ -235,9 +235,9 @@ struct rxq_entry_t {
|
|||
* Host IF Structure
|
||||
*
|
||||
********************************************/
|
||||
|
||||
struct wilc;
|
||||
struct wilc_hif_func {
|
||||
int (*hif_init)(wilc_wlan_inp_t *, wilc_debug_func);
|
||||
int (*hif_init)(struct wilc *, wilc_debug_func);
|
||||
int (*hif_deinit)(void *);
|
||||
int (*hif_read_reg)(u32, u32 *);
|
||||
int (*hif_write_reg)(u32, u32);
|
||||
|
|
Loading…
Reference in New Issue