return 1;
}
-int wilc_spi_write(u8 *b, u32 len)
+int wilc_spi_write(struct wilc *wilc, u8 *b, u32 len)
{
- struct spi_device *spi = to_spi_device(wilc_dev->dev);
+ struct spi_device *spi = to_spi_device(wilc->dev);
int ret;
struct spi_message msg;
#define LINUX_WLAN_SPI_H
#include <linux/spi/spi.h>
+#include "wilc_wfi_netdevice.h"
int wilc_spi_init(void);
-int wilc_spi_write(u8 *b, u32 len);
+int wilc_spi_write(struct wilc *wilc, u8 *b, u32 len);
int wilc_spi_read(u8 *rb, u32 rlen);
int wilc_spi_write_read(u8 *wb, u8 *rb, u32 rlen);
#endif
order = 0x2;
}
cmd |= order;
- if (!wilc_spi_write(&cmd, 1)) {
+ if (!wilc_spi_write(wilc, &cmd, 1)) {
PRINT_ER("[wilc spi]: Failed data block cmd write, bus error...\n");
result = N_FAIL;
break;
/**
* Write data
**/
- if (!wilc_spi_write(&b[ix], nbytes)) {
+ if (!wilc_spi_write(wilc, &b[ix], nbytes)) {
PRINT_ER("[wilc spi]: Failed data block write, bus error...\n");
result = N_FAIL;
break;
* Write Crc
**/
if (!g_spi.crc_off) {
- if (!wilc_spi_write(crc, 2)) {
+ if (!wilc_spi_write(wilc, crc, 2)) {
PRINT_ER("[wilc spi]: Failed data block crc write, bus error...\n");
result = N_FAIL;
break;