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

staging: wilc1000: remove function pointer cfg_init

This patch removes function pointer cfg_init and call the function
wilc_wlan_cfg_init instead. Remove static from function declaration.
After removing cfg_init, the struct wilc_cfg_func_t is useless so just delete
it and it's related codes.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarTony Cho <tony.cho@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 30f535a6
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
********************************************/ ********************************************/
extern wilc_hif_func_t hif_sdio; extern wilc_hif_func_t hif_sdio;
extern wilc_hif_func_t hif_spi; extern wilc_hif_func_t hif_spi;
extern wilc_cfg_func_t mac_cfg;
extern void WILC_WFI_mgmt_rx(u8 *buff, u32 size); extern void WILC_WFI_mgmt_rx(u8 *buff, u32 size);
u32 wilc_get_chipid(u8 update); u32 wilc_get_chipid(u8 update);
u16 Set_machw_change_vir_if(bool bValue); u16 Set_machw_change_vir_if(bool bValue);
...@@ -1994,7 +1993,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp) ...@@ -1994,7 +1993,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp)
/*** /***
* mac interface init * mac interface init
**/ **/
if (!mac_cfg.cfg_init(wilc_debug)) { if (!wilc_wlan_cfg_init(wilc_debug)) {
/* ENOBUFS 105 */ /* ENOBUFS 105 */
ret = -105; ret = -105;
goto _fail_; goto _fail_;
......
...@@ -295,10 +295,6 @@ typedef struct { ...@@ -295,10 +295,6 @@ typedef struct {
u32 seq_no; u32 seq_no;
} wilc_cfg_rsp_t; } wilc_cfg_rsp_t;
typedef struct {
int (*cfg_init)(wilc_debug_func);
} wilc_cfg_func_t;
int wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size); int wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size);
int wilc_wlan_start(void); int wilc_wlan_start(void);
int wilc_wlan_stop(void); int wilc_wlan_stop(void);
......
...@@ -558,13 +558,9 @@ int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, wilc_cfg_rsp_t *rsp) ...@@ -558,13 +558,9 @@ int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, wilc_cfg_rsp_t *rsp)
return ret; return ret;
} }
static int wilc_wlan_cfg_init(wilc_debug_func func) int wilc_wlan_cfg_init(wilc_debug_func func)
{ {
memset((void *)&g_mac, 0, sizeof(wilc_mac_cfg_t)); memset((void *)&g_mac, 0, sizeof(wilc_mac_cfg_t));
g_mac.dPrint = func; g_mac.dPrint = func;
return 1; return 1;
} }
wilc_cfg_func_t mac_cfg = {
wilc_wlan_cfg_init,
};
...@@ -34,5 +34,6 @@ int wilc_wlan_cfg_set_wid(u8 *frame, u32 offset, u16 id, u8 *buf, int size); ...@@ -34,5 +34,6 @@ int wilc_wlan_cfg_set_wid(u8 *frame, u32 offset, u16 id, u8 *buf, int size);
int wilc_wlan_cfg_get_wid(u8 *frame, u32 offset, u16 id); int wilc_wlan_cfg_get_wid(u8 *frame, u32 offset, u16 id);
int wilc_wlan_cfg_get_wid_value(u16 wid, u8 *buffer, u32 buffer_size); int wilc_wlan_cfg_get_wid_value(u16 wid, u8 *buffer, u32 buffer_size);
int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, wilc_cfg_rsp_t *rsp); int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, wilc_cfg_rsp_t *rsp);
int wilc_wlan_cfg_init(wilc_debug_func func);
#endif #endif
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