[PATCH 02/19] staging/wilc1000: make symbols static if possible

2015-11-16 Thread Arnd Bergmann
All symbols that are only referenced in the file that defines
them can be declared 'static' to avoid namespace pollution,
to produce better object code, and to make the source more
readable.

Signed-off-by: Arnd Bergmann 
---
 drivers/staging/wilc1000/Makefile |  3 +-
 drivers/staging/wilc1000/coreconfigurator.c   |  4 +-
 drivers/staging/wilc1000/host_interface.c | 35 --
 drivers/staging/wilc1000/host_interface.h |  8 
 drivers/staging/wilc1000/linux_mon.c  |  6 +--
 drivers/staging/wilc1000/linux_wlan.c | 19 
 drivers/staging/wilc1000/linux_wlan_sdio.c|  4 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 56 +++
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.h |  1 -
 drivers/staging/wilc1000/wilc_wlan.c  | 23 ++
 10 files changed, 81 insertions(+), 78 deletions(-)

diff --git a/drivers/staging/wilc1000/Makefile 
b/drivers/staging/wilc1000/Makefile
index 650123df0b4c..9696f69bda48 100644
--- a/drivers/staging/wilc1000/Makefile
+++ b/drivers/staging/wilc1000/Makefile
@@ -8,8 +8,7 @@ ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \
-DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \
-DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\"
 
-ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \
-   -Wno-unused-function -DWILC_DEBUGFS
+ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 -DWILC_DEBUGFS
 #ccflags-y += -DTCP_ACK_FILTER
 
 ccflags-$(CONFIG_WILC1000_PREALLOCATE_AT_LOADING_DRIVER) += -DMEMORY_STATIC \
diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index fd7240c9da3e..eef06cdcc905 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -285,7 +285,7 @@ static inline u16 get_asoc_id(u8 *data)
return asoc_id;
 }
 
-u8 *get_tim_elm(u8 *pu8msa, u16 u16RxLen, u16 u16TagParamOffset)
+static u8 *get_tim_elm(u8 *pu8msa, u16 u16RxLen, u16 u16TagParamOffset)
 {
u16 u16index;
 
@@ -313,7 +313,7 @@ u8 *get_tim_elm(u8 *pu8msa, u16 u16RxLen, u16 
u16TagParamOffset)
 
 /* This function gets the current channel information from
  * the 802.11n beacon/probe response frame */
-u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
+static u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
 {
u16 index;
 
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 6c205b97293d..93bdb224f973 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -234,7 +234,7 @@ struct join_bss_param {
 static struct host_if_drv *wfidrv_list[NUM_CONCURRENT_IFC + 1];
 struct host_if_drv *terminated_handle;
 bool g_obtainingIP;
-u8 P2P_LISTEN_STATE;
+static u8 P2P_LISTEN_STATE;
 static struct task_struct *hif_thread_handler;
 static WILC_MsgQueueHandle hif_msg_q;
 static struct semaphore hif_sema_thread;
@@ -259,10 +259,10 @@ static u8 del_beacon;
 static u32 clients_count;
 
 static u8 *join_req;
-u8 *info_element;
+static u8 *info_element;
 static u8 mode_11i;
-u8 auth_type;
-u32 join_req_size;
+static u8 auth_type;
+static u32 join_req_size;
 static u32 info_element_size;
 static struct host_if_drv *join_req_drv;
 #define REAL_JOIN_REQ 0
@@ -396,7 +396,9 @@ static s32 handle_set_operation_mode(struct host_if_drv 
*hif_drv,
return result;
 }
 
-s32 handle_set_ip_address(struct host_if_drv *hif_drv, u8 *ip_addr, u8 idx)
+static s32 host_int_get_ipaddress(struct host_if_drv *hif_drv, u8 *u16ipadd, 
u8 idx);
+
+static s32 handle_set_ip_address(struct host_if_drv *hif_drv, u8 *ip_addr, u8 
idx)
 {
s32 result = 0;
struct wid wid;
@@ -430,7 +432,7 @@ s32 handle_set_ip_address(struct host_if_drv *hif_drv, u8 
*ip_addr, u8 idx)
return result;
 }
 
-s32 handle_get_ip_address(struct host_if_drv *hif_drv, u8 idx)
+static s32 handle_get_ip_address(struct host_if_drv *hif_drv, u8 idx)
 {
s32 result = 0;
struct wid wid;
@@ -817,6 +819,9 @@ static void Handle_wait_msg_q_empty(void)
up(_sema_wait_response);
 }
 
+static s32 Handle_ScanDone(struct host_if_drv *hif_drv,
+  enum scan_event enuEvent);
+
 static s32 Handle_Scan(struct host_if_drv *hif_drv,
   struct scan_attr *pstrHostIFscanAttr)
 {
@@ -1483,6 +1488,11 @@ done:
return result;
 }
 
+static s32 host_int_get_assoc_res_info(struct host_if_drv *hif_drv,
+  u8 *pu8AssocRespInfo,
+  u32 u32MaxAssocRespInfoLen,
+  u32 *pu32RcvdAssocRespInfoLen);
+
 static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
struct rcvd_async_info 
*pstrRcvdGnrlAsyncInfo)
 {
@@ -2140,7 +2150,7 @@ static void 

[PATCH 02/19] staging/wilc1000: make symbols static if possible

2015-10-20 Thread Arnd Bergmann
All symbols that are only referenced in the file that defines
them can be declared 'static' to avoid namespace pollution,
to produce better object code, and to make the source more
readable.

Signed-off-by: Arnd Bergmann 
---
 drivers/staging/wilc1000/Makefile |  3 +-
 drivers/staging/wilc1000/coreconfigurator.c   |  6 +--
 drivers/staging/wilc1000/host_interface.c | 28 +++
 drivers/staging/wilc1000/host_interface.h | 29 
 drivers/staging/wilc1000/linux_mon.c  |  6 +--
 drivers/staging/wilc1000/linux_wlan.c | 25 +-
 drivers/staging/wilc1000/linux_wlan_sdio.c|  4 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 58 +++
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.h |  1 -
 drivers/staging/wilc1000/wilc_wlan.c  | 26 ++
 10 files changed, 85 insertions(+), 101 deletions(-)

diff --git a/drivers/staging/wilc1000/Makefile 
b/drivers/staging/wilc1000/Makefile
index 64c2f1b83dfb..55b2ac2b15a8 100644
--- a/drivers/staging/wilc1000/Makefile
+++ b/drivers/staging/wilc1000/Makefile
@@ -8,8 +8,7 @@ ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \
-DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \
-DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\"
 
-ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \
-   -Wno-unused-function -DWILC_DEBUGFS
+ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 -DWILC_DEBUGFS
 #ccflags-y += -DTCP_ACK_FILTER
 
 ccflags-$(CONFIG_WILC1000_PREALLOCATE_AT_LOADING_DRIVER) += -DMEMORY_STATIC \
diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 427adfd295da..28ab89b3a65d 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -287,7 +287,7 @@ static inline u16 get_asoc_id(u8 *data)
return asoc_id;
 }
 
-u8 *get_tim_elm(u8 *pu8msa, u16 u16RxLen, u16 u16TagParamOffset)
+static u8 *get_tim_elm(u8 *pu8msa, u16 u16RxLen, u16 u16TagParamOffset)
 {
u16 u16index;
 
@@ -315,7 +315,7 @@ u8 *get_tim_elm(u8 *pu8msa, u16 u16RxLen, u16 
u16TagParamOffset)
 
 /* This function gets the current channel information from
  * the 802.11n beacon/probe response frame */
-u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
+static u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
 {
u16 index;
 
@@ -333,7 +333,7 @@ u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
return 0;  /* no MIB here */
 }
 
-u8 get_current_channel(u8 *pu8msa, u16 u16RxLen)
+static u8 get_current_channel(u8 *pu8msa, u16 u16RxLen)
 {
/* Extract current channel information from */
/* the beacon/probe response frame  */
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 194ca3d3e920..4e9dfb493b9f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -232,7 +232,7 @@ struct join_bss_param {
 static struct host_if_drv *wfidrv_list[NUM_CONCURRENT_IFC + 1];
 struct host_if_drv *terminated_handle;
 bool g_obtainingIP;
-u8 P2P_LISTEN_STATE;
+static u8 P2P_LISTEN_STATE;
 static struct task_struct *hif_thread_handler;
 static WILC_MsgQueueHandle hif_msg_q;
 static struct semaphore hif_sema_thread;
@@ -256,10 +256,10 @@ static u32 inactive_time;
 static u8 del_beacon;
 
 static u8 *join_req;
-u8 *info_element;
+static u8 *info_element;
 static u8 mode_11i;
-u8 auth_type;
-u32 join_req_size;
+static u8 auth_type;
+static u32 join_req_size;
 static u32 info_element_size;
 static struct host_if_drv *join_req_drv;
 #define REAL_JOIN_REQ 0
@@ -398,7 +398,9 @@ static s32 Handle_SetOperationMode(struct host_if_drv 
*hif_drv,
return s32Error;
 }
 
-s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 *pu8IPAddr, u8 idx)
+static s32 host_int_get_ipaddress(struct host_if_drv *hif_drv, u8 *u16ipadd, 
u8 idx);
+
+static s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 *pu8IPAddr, u8 
idx)
 {
 
s32 s32Error = 0;
@@ -433,7 +435,7 @@ s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
return s32Error;
 }
 
-s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 *pu8IPAddr, u8 idx)
+static s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 *pu8IPAddr, u8 
idx)
 {
 
s32 s32Error = 0;
@@ -812,6 +814,9 @@ static s32 Handle_wait_msg_q_empty(void)
return 0;
 }
 
+static s32 Handle_ScanDone(struct host_if_drv *hif_drv,
+  enum scan_event enuEvent);
+
 static s32 Handle_Scan(struct host_if_drv *hif_drv,
   struct scan_attr *pstrHostIFscanAttr)
 {
@@ -1484,6 +1489,11 @@ done:
return s32Error;
 }
 
+static s32 host_int_get_assoc_res_info(struct host_if_drv *hif_drv,
+  u8 *pu8AssocRespInfo,
+