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

staging: wilc1000: remove function pointer rx_complete

just call the function linux_wlan_rx_complete directly. No need for a pointer
to the functions. Remove rx_complete, wilc_wlan_net_func_t and net_func which
are not used anymore.
Finally remove static from the function linux_wlan_rx_complete.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4417d3da
...@@ -555,7 +555,7 @@ static int linux_wlan_txq_task(void *vp) ...@@ -555,7 +555,7 @@ static int linux_wlan_txq_task(void *vp)
return 0; return 0;
} }
static void linux_wlan_rx_complete(void) void linux_wlan_rx_complete(void)
{ {
PRINT_D(RX_DBG, "RX completed\n"); PRINT_D(RX_DBG, "RX completed\n");
} }
...@@ -1092,9 +1092,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) ...@@ -1092,9 +1092,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic)
nwi->io_func.u.spi.spi_trx = linux_spi_write_read; nwi->io_func.u.spi.spi_trx = linux_spi_write_read;
nwi->io_func.u.spi.spi_max_speed = linux_spi_set_max_speed; nwi->io_func.u.spi.spi_max_speed = linux_spi_set_max_speed;
#endif #endif
/*for now - to be revised*/
nwi->net_func.rx_complete = linux_wlan_rx_complete;
} }
int wlan_initialize_threads(perInterface_wlan_t *nic) int wlan_initialize_threads(perInterface_wlan_t *nic)
......
...@@ -218,5 +218,6 @@ struct WILC_WFI_mon_priv { ...@@ -218,5 +218,6 @@ struct WILC_WFI_mon_priv {
extern struct net_device *WILC_WFI_devs[]; extern struct net_device *WILC_WFI_devs[];
void frmw_to_linux(u8 *buff, u32 size, u32 pkt_offset); void frmw_to_linux(u8 *buff, u32 size, u32 pkt_offset);
void linux_wlan_mac_indicate(int flag); void linux_wlan_mac_indicate(int flag);
void linux_wlan_rx_complete(void);
#endif #endif
...@@ -32,7 +32,6 @@ typedef struct { ...@@ -32,7 +32,6 @@ typedef struct {
**/ **/
wilc_wlan_os_func_t os_func; wilc_wlan_os_func_t os_func;
wilc_wlan_io_func_t io_func; wilc_wlan_io_func_t io_func;
wilc_wlan_net_func_t net_func;
/** /**
* host interface functions * host interface functions
...@@ -1241,8 +1240,7 @@ static void wilc_wlan_handle_rxq(void) ...@@ -1241,8 +1240,7 @@ static void wilc_wlan_handle_rxq(void)
kfree(rqe); kfree(rqe);
if (has_packet) { if (has_packet) {
if (p->net_func.rx_complete) linux_wlan_rx_complete();
p->net_func.rx_complete();
} }
} while (1); } while (1);
...@@ -1973,7 +1971,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) ...@@ -1973,7 +1971,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
**/ **/
memcpy((void *)&g_wlan.os_func, (void *)&inp->os_func, sizeof(wilc_wlan_os_func_t)); memcpy((void *)&g_wlan.os_func, (void *)&inp->os_func, sizeof(wilc_wlan_os_func_t));
memcpy((void *)&g_wlan.io_func, (void *)&inp->io_func, sizeof(wilc_wlan_io_func_t)); memcpy((void *)&g_wlan.io_func, (void *)&inp->io_func, sizeof(wilc_wlan_io_func_t));
memcpy((void *)&g_wlan.net_func, (void *)&inp->net_func, sizeof(wilc_wlan_net_func_t));
g_wlan.hif_lock = inp->os_context.hif_critical_section; g_wlan.hif_lock = inp->os_context.hif_critical_section;
g_wlan.txq_lock = inp->os_context.txq_critical_section; g_wlan.txq_lock = inp->os_context.txq_critical_section;
......
...@@ -99,10 +99,6 @@ typedef struct { ...@@ -99,10 +99,6 @@ typedef struct {
} u; } u;
} wilc_wlan_io_func_t; } wilc_wlan_io_func_t;
typedef struct {
void (*rx_complete)(void);
} wilc_wlan_net_func_t;
#define WILC_MAC_INDICATE_STATUS 0x1 #define WILC_MAC_INDICATE_STATUS 0x1
#define WILC_MAC_STATUS_INIT -1 #define WILC_MAC_STATUS_INIT -1
#define WILC_MAC_STATUS_READY 0 #define WILC_MAC_STATUS_READY 0
...@@ -135,7 +131,6 @@ typedef struct { ...@@ -135,7 +131,6 @@ typedef struct {
wilc_wlan_os_context_t os_context; wilc_wlan_os_context_t os_context;
wilc_wlan_os_func_t os_func; wilc_wlan_os_func_t os_func;
wilc_wlan_io_func_t io_func; wilc_wlan_io_func_t io_func;
wilc_wlan_net_func_t net_func;
} wilc_wlan_inp_t; } wilc_wlan_inp_t;
struct tx_complete_data { struct tx_complete_data {
......
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