[PATCH 04/19] staging/wilc1000: move extern declarations to headers
'extern' declarations belong into a header file rather than a .c file, to ensure that the definition matches the declaration. This moves all declarations into a header file that seems most appropriate for it. Signed-off-by: Arnd Bergmann--- drivers/staging/wilc1000/host_interface.c | 9 + drivers/staging/wilc1000/host_interface.h | 9 + drivers/staging/wilc1000/linux_mon.c | 3 --- drivers/staging/wilc1000/linux_wlan.c | 9 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 1 - drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 ++ drivers/staging/wilc1000/wilc_wlan.c | 8 +--- drivers/staging/wilc1000/wilc_wlan.h | 21 + 9 files changed, 35 insertions(+), 33 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 228a2fefe714..d968483c6f00 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -4,17 +4,12 @@ #include #include "host_interface.h" #include "coreconfigurator.h" +#include "wilc_wlan.h" #include "wilc_wlan_if.h" #include "wilc_msgqueue.h" #include #include "wilc_wfi_netdevice.h" -extern u8 wilc_connecting; - -extern struct timer_list wilc_during_ip_timer; - -extern u8 wilc_initialized; - #define HOST_IF_MSG_SCAN0 #define HOST_IF_MSG_CONNECT 1 #define HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO2 @@ -271,8 +266,6 @@ static struct host_if_drv *join_req_drv; static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo); -extern int wilc_wlan_get_num_conn_ifcs(void); - static int add_handler_in_list(struct host_if_drv *handler) { int i; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index d0b85a53c29e..efeb9e233589 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -394,4 +394,13 @@ void wilc_free_join_params(void *pJoinParams); s32 wilc_get_statistics(struct host_if_drv *hWFIDrv, struct rf_info *pstrStatistics); void wilc_resolve_disconnect_aberration(struct host_if_drv *hif_drv); + +extern bool wilc_optaining_ip; +extern u8 wilc_connected_SSID[6]; +extern u8 wilc_multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; + +extern int wilc_connecting; +extern u8 wilc_initialized; +extern struct timer_list wilc_during_ip_timer; + #endif diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index f0a458764ff2..e550027645b7 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -26,9 +26,6 @@ struct wilc_wfi_radiotap_cb_hdr { static struct net_device *wilc_wfi_mon; /* global monitor netdev */ -extern int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev); - - static u8 srcAdd[6]; static u8 bssid[6]; static u8 broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index d3d07fc30e23..f1e70b225deb 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -37,10 +37,6 @@ #define _linux_wlan_device_detection(){} #define _linux_wlan_device_removal() {} -extern bool wilc_optaining_ip; -extern u8 wilc_multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; -extern struct timer_list wilc_during_ip_timer; - static int linux_wlan_device_power(int on_off) { PRINT_D(INIT_DBG, "linux_wlan_device_power.. (%d)\n", on_off); @@ -81,14 +77,9 @@ static struct semaphore close_exit_sync; static int wlan_deinit_locks(struct net_device *dev); static void wlan_deinitialize_threads(struct net_device *dev); -extern void WILC_WFI_monitor_rx(u8 *buff, u32 size); -extern void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size); static void linux_wlan_tx_complete(void *priv, int status); static int mac_init_fn(struct net_device *ndev); -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev); -int wilc_mac_open(struct net_device *ndev); -int wilc_mac_close(struct net_device *ndev); static struct net_device_stats *mac_stats(struct net_device *dev); static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd); static void wilc_set_multicast_list(struct net_device *dev); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index f8fd7a895d44..49b82b4a0688 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -14,6 +14,7 @@ #ifdef WILC_SDIO #include "linux_wlan_sdio.h" #endif +#include "host_interface.h" #include #define IS_MANAGMEMENT
[PATCH 04/19] staging/wilc1000: move extern declarations to headers
'extern' declarations belong into a header file rather than a .c file, to ensure that the definition matches the declaration. This moves all declarations into a header file that seems most appropriate for it. Signed-off-by: Arnd Bergmann--- drivers/staging/wilc1000/host_interface.c | 10 +--- drivers/staging/wilc1000/host_interface.h | 10 drivers/staging/wilc1000/linux_mon.c | 3 --- drivers/staging/wilc1000/linux_wlan.c | 16 - drivers/staging/wilc1000/linux_wlan_sdio.c| 3 --- drivers/staging/wilc1000/linux_wlan_spi.c | 1 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 15 +--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 1 - drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 drivers/staging/wilc1000/wilc_wlan.c | 9 +-- drivers/staging/wilc1000/wilc_wlan.h | 29 ++- 11 files changed, 45 insertions(+), 56 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c8c5f5c602c7..99c78d395653 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -4,16 +4,11 @@ #include #include "host_interface.h" #include "coreconfigurator.h" +#include "wilc_wlan.h" #include "wilc_wlan_if.h" #include "wilc_msgqueue.h" #include -extern u8 wilc1000_connecting; - -extern struct timer_list wilc1000_during_ip_timer; - -extern u8 wilc1000_initialized; - #define HOST_IF_MSG_SCAN0 #define HOST_IF_MSG_CONNECT 1 #define HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO2 @@ -268,9 +263,6 @@ static struct host_if_drv *join_req_drv; static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo); -extern void wilc1000_chip_sleep_manually(u32 u32SleepTime); -extern int wilc1000_wlan_get_num_conn_ifcs(void); - static int add_handler_in_list(struct host_if_drv *handler) { int i; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 826ed0f30615..1f537ed9d7f3 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -925,4 +925,14 @@ void wilc1000_free_join_params(void *pJoinParams); s32 wilc1000_get_statistics(struct host_if_drv *hWFIDrv, struct rf_info *pstrStatistics); +void wilc1000_resolve_disconnect_aberration(struct host_if_drv *drvHandler); + +extern bool wilc1000_optaining_ip; +extern u8 wilc1000_connected_SSID[6]; +extern u8 wilc1000_multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; + +extern int wilc1000_connecting; +extern u8 wilc1000_initialized; +extern struct timer_list wilc1000_during_ip_timer; + #endif diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 52443f039a43..50196c3aa61d 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -26,9 +26,6 @@ struct wilc_wfi_radiotap_cb_hdr { static struct net_device *wilc_wfi_mon; /* global monitor netdev */ -extern int wilc1000_mac_xmit(struct sk_buff *skb, struct net_device *dev); - - static u8 srcAdd[6]; static u8 bssid[6]; static u8 broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index be4b1b1199f8..50477d70eb24 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -45,13 +45,6 @@ #define _linux_wlan_device_removal() {} #endif -extern bool wilc1000_optaining_ip; -extern u16 wilc1000_set_machw_change_vir_if(bool bValue); -extern void wilc1000_resolve_disconnect_aberration(void *drvHandler); -extern u8 wilc1000_multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; -void wilc1000_wlan_deinit(struct wilc *nic); -extern struct timer_list wilc1000_during_ip_timer; - static int linux_wlan_device_power(int on_off) { PRINT_D(INIT_DBG, "linux_wlan_device_power.. (%d)\n", on_off); @@ -98,14 +91,9 @@ static struct semaphore close_exit_sync; static int wlan_deinit_locks(struct wilc *nic); static void wlan_deinitialize_threads(struct wilc *nic); -extern void WILC_WFI_monitor_rx(u8 *buff, u32 size); -extern void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size); static void linux_wlan_tx_complete(void *priv, int status); static int mac_init_fn(struct net_device *ndev); -int wilc1000_mac_xmit(struct sk_buff *skb, struct net_device *dev); -int wilc1000_mac_open(struct net_device *ndev); -int wilc1000_mac_close(struct net_device *ndev); static struct net_device_stats *mac_stats(struct net_device *dev); static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd); static void wilc_set_multicast_list(struct net_device *dev); @@ -1047,11 +1035,7 @@ static void wlan_deinitialize_threads(struct wilc *nic)