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

staging: wilc1000: remove function pointer mac_indicate

No need for a pointer to a function. Just call linux_wlan_mac_indicate.
Remove mac_indicate and also wilc_wlan_indicate_func_t since no members in it.
Variable indicate_func is not used so delete it and related codes.
Finally remove static from the function linux_wlan_mac_indicate.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 63611670
...@@ -393,7 +393,7 @@ static int linux_wlan_lock_timeout(void *vp, u32 timeout) ...@@ -393,7 +393,7 @@ static int linux_wlan_lock_timeout(void *vp, u32 timeout)
return error; return error;
} }
static void linux_wlan_mac_indicate(int flag) void linux_wlan_mac_indicate(int flag)
{ {
/*I have to do it that way becuase there is no mean to encapsulate device pointer /*I have to do it that way becuase there is no mean to encapsulate device pointer
* as a parameter * as a parameter
...@@ -1095,7 +1095,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) ...@@ -1095,7 +1095,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic)
/*for now - to be revised*/ /*for now - to be revised*/
nwi->net_func.rx_complete = linux_wlan_rx_complete; nwi->net_func.rx_complete = linux_wlan_rx_complete;
nwi->indicate_func.mac_indicate = linux_wlan_mac_indicate;
} }
int wlan_initialize_threads(perInterface_wlan_t *nic) int wlan_initialize_threads(perInterface_wlan_t *nic)
......
...@@ -217,5 +217,6 @@ struct WILC_WFI_mon_priv { ...@@ -217,5 +217,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);
#endif #endif
...@@ -33,7 +33,6 @@ typedef struct { ...@@ -33,7 +33,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; wilc_wlan_net_func_t net_func;
wilc_wlan_indicate_func_t indicate_func;
/** /**
* host interface functions * host interface functions
...@@ -1223,13 +1222,10 @@ static void wilc_wlan_handle_rxq(void) ...@@ -1223,13 +1222,10 @@ static void wilc_wlan_handle_rxq(void)
/** /**
* Call back to indicate status... * Call back to indicate status...
**/ **/
if (p->indicate_func.mac_indicate) { linux_wlan_mac_indicate(WILC_MAC_INDICATE_STATUS);
p->indicate_func.mac_indicate(WILC_MAC_INDICATE_STATUS);
}
} else if (rsp.type == WILC_CFG_RSP_SCAN) { } else if (rsp.type == WILC_CFG_RSP_SCAN) {
if (p->indicate_func.mac_indicate) linux_wlan_mac_indicate(WILC_MAC_INDICATE_SCAN);
p->indicate_func.mac_indicate(WILC_MAC_INDICATE_SCAN);
} }
} }
} }
...@@ -1978,7 +1974,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) ...@@ -1978,7 +1974,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)); memcpy((void *)&g_wlan.net_func, (void *)&inp->net_func, sizeof(wilc_wlan_net_func_t));
memcpy((void *)&g_wlan.indicate_func, (void *)&inp->indicate_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;
......
...@@ -103,9 +103,6 @@ typedef struct { ...@@ -103,9 +103,6 @@ typedef struct {
void (*rx_complete)(void); void (*rx_complete)(void);
} wilc_wlan_net_func_t; } wilc_wlan_net_func_t;
typedef struct {
void (*mac_indicate)(int);
} wilc_wlan_indicate_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
...@@ -139,7 +136,6 @@ typedef struct { ...@@ -139,7 +136,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; wilc_wlan_net_func_t net_func;
wilc_wlan_indicate_func_t indicate_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