[OPW,kernel] staging: rtl8187se: fixed declarations. Added static when it was necessary
diff mbox

Message ID 1383915558-18387-1-git-send-email-anarey@gmail.com
State Changes Requested
Headers show

Commit Message

Ana Rey Nov. 8, 2013, 12:59 p.m. UTC
This patch fixes lots of sparse warnings that look like:

[...]
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:380:6: warning: symbol
'ieee80211_send_beacon' was not declared. Should it be static?
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:405:6: warning: symbol
'ieee80211_send_beacon_cb' was not declared. Should it be static?
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:416:6: warning: symbol
'ieee80211_send_probe' was not declared. Should it be static?

[...]

The solution is to add static to the functions indicated by sparse.

After this patch, It seems these functions are not used in the driver code:

  CHECK   drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
  CC [M]  drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.o
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:27:11: warning:
‘rsn_authen_cipher_suite’ defined but not used [-Wunused-variable]
 static u8 rsn_authen_cipher_suite[16][4] = {
           ^
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:355:13: warning:
‘ext_ieee80211_send_beacon_wq’ defined but not used [-Wunused-function]
 static void ext_ieee80211_send_beacon_wq(struct ieee80211_device *ieee)

Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org>
Signed-off-by: Ana Rey <anarey@gmail.com>
---
 .../staging/rtl8187se/ieee80211/ieee80211_crypt.c  |   4 +-
 .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |   8 +-
 .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |   4 +-
 .../rtl8187se/ieee80211/ieee80211_crypt_wep.c      |   4 +-
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |   2 +-
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |  97 +++++++++--------
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |   4 +-
 drivers/staging/rtl8187se/r8180_core.c             | 118 ++++++++++-----------
 drivers/staging/rtl8187se/r8180_dm.c               |  16 +--
 drivers/staging/rtl8187se/r8180_rtl8225z2.c        |   8 +-
 drivers/staging/rtl8187se/r8180_wx.c               |   9 +-
 11 files changed, 139 insertions(+), 135 deletions(-)

Comments

Sarah Sharp Nov. 9, 2013, 12:46 a.m. UTC | #1
Hi Ana,

A couple comments below.

On Fri, Nov 08, 2013 at 01:59:18PM +0100, Ana Rey wrote:
> This patch fixes lots of sparse warnings that look like:
> 
> [...]
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:380:6: warning: symbol
> 'ieee80211_send_beacon' was not declared. Should it be static?
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:405:6: warning: symbol
> 'ieee80211_send_beacon_cb' was not declared. Should it be static?
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:416:6: warning: symbol
> 'ieee80211_send_probe' was not declared. Should it be static?

You probably shouldn't word-wrap sparse warnings in your commit
messages.  It's a little backwards from what you'd normally expect from
kernel coding 80-char line limit rules, but both Josh and PJ have
commented before that not word-wrapping these lines actually makes it
easier to read.  Compiler warning messages and dmesg output also
shouldn't be word-wrapped.

> [...]
> 
> The solution is to add static to the functions indicated by sparse.
> 
> After this patch, It seems these functions are not used in the driver code:
> 
>   CHECK   drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
>   CC [M]  drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.o
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:27:11: warning:
> ‘rsn_authen_cipher_suite’ defined but not used [-Wunused-variable]
>  static u8 rsn_authen_cipher_suite[16][4] = {
>            ^
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:355:13: warning:
> ‘ext_ieee80211_send_beacon_wq’ defined but not used [-Wunused-function]
>  static void ext_ieee80211_send_beacon_wq(struct ieee80211_device *ieee)

If the functions are unused after you've marked them static, you should
just remove them instead.  We have them in git history, so there's no
use keeping the code around if it's never executed.  Besides, most of
the functions you marked as static take no arguments, and then go onto
pass another function a global variable.  Definitely not worth keeping
around if they're unused.

Can you send a second patch revision to address these changes, with a v2
subject, please?

Sarah Sharp

> Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org>
> Signed-off-by: Ana Rey <anarey@gmail.com>
> ---
>  .../staging/rtl8187se/ieee80211/ieee80211_crypt.c  |   4 +-
>  .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |   8 +-
>  .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |   4 +-
>  .../rtl8187se/ieee80211/ieee80211_crypt_wep.c      |   4 +-
>  drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |   2 +-
>  .../rtl8187se/ieee80211/ieee80211_softmac.c        |  97 +++++++++--------
>  drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |   4 +-
>  drivers/staging/rtl8187se/r8180_core.c             | 118 ++++++++++-----------
>  drivers/staging/rtl8187se/r8180_dm.c               |  16 +--
>  drivers/staging/rtl8187se/r8180_rtl8225z2.c        |   8 +-
>  drivers/staging/rtl8187se/r8180_wx.c               |   9 +-
>  11 files changed, 139 insertions(+), 135 deletions(-)
> 
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
> index a0340ee..1fecad3 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
> @@ -199,7 +199,7 @@ static struct ieee80211_crypto_ops ieee80211_crypt_null = {
>  };
>  
>  
> -int ieee80211_crypto_init(void)
> +static int ieee80211_crypto_init(void)
>  {
>  	int ret = -ENOMEM;
>  
> @@ -220,7 +220,7 @@ out:
>  }
>  
>  
> -void ieee80211_crypto_deinit(void)
> +static void ieee80211_crypto_deinit(void)
>  {
>  	struct list_head *ptr, *n;
>  	struct ieee80211_crypto_alg *alg = NULL;
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
> index 2fc1bb9..0dca088 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
> @@ -60,8 +60,8 @@ struct ieee80211_ccmp_data {
>  	u8 rx_b0[AES_BLOCK_LEN], rx_b[AES_BLOCK_LEN], rx_a[AES_BLOCK_LEN];
>  };
>  
> -void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,
> -			        const u8 pt[16], u8 ct[16])
> +static void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,
> +				       const u8 pt[16], u8 ct[16])
>  {
>  	crypto_cipher_encrypt_one((void *)tfm, ct, pt);
>  }
> @@ -450,13 +450,13 @@ static struct ieee80211_crypto_ops ieee80211_crypt_ccmp = {
>  };
>  
>  
> -int ieee80211_crypto_ccmp_init(void)
> +static int ieee80211_crypto_ccmp_init(void)
>  {
>  	return ieee80211_register_crypto_ops(&ieee80211_crypt_ccmp);
>  }
>  
>  
> -void ieee80211_crypto_ccmp_exit(void)
> +static void ieee80211_crypto_ccmp_exit(void)
>  {
>  	ieee80211_unregister_crypto_ops(&ieee80211_crypt_ccmp);
>  }
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
> index 2fc797b..40c9280 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
> @@ -733,13 +733,13 @@ static struct ieee80211_crypto_ops ieee80211_crypt_tkip = {
>  };
>  
>  
> -int ieee80211_crypto_tkip_init(void)
> +static int ieee80211_crypto_tkip_init(void)
>  {
>  	return ieee80211_register_crypto_ops(&ieee80211_crypt_tkip);
>  }
>  
>  
> -void ieee80211_crypto_tkip_exit(void)
> +static void ieee80211_crypto_tkip_exit(void)
>  {
>  	ieee80211_unregister_crypto_ops(&ieee80211_crypt_tkip);
>  }
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
> index bba7714..15da091 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
> @@ -274,13 +274,13 @@ static struct ieee80211_crypto_ops ieee80211_crypt_wep = {
>  };
>  
>  
> -int ieee80211_crypto_wep_init(void)
> +static int ieee80211_crypto_wep_init(void)
>  {
>  	return ieee80211_register_crypto_ops(&ieee80211_crypt_wep);
>  }
>  
>  
> -void ieee80211_crypto_wep_exit(void)
> +static void ieee80211_crypto_wep_exit(void)
>  {
>  	ieee80211_unregister_crypto_ops(&ieee80211_crypt_wep);
>  }
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> index 43971cd..b522b57 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> @@ -856,7 +856,7 @@ ieee80211_extract_country_ie(struct ieee80211_device *ieee,
>  }
>  
>  /* SignalStrengthIndex is 0-100 */
> -int ieee80211_TranslateToDbm(unsigned char SignalStrengthIndex)
> +static int ieee80211_TranslateToDbm(unsigned char SignalStrengthIndex)
>  {
>  	unsigned char SignalPower; // in dBm.
>  
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> index 6eefc27..2cc2435 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> @@ -24,7 +24,7 @@
>  #include <linux/etherdevice.h>
>  
>  #include "dot11d.h"
> -u8 rsn_authen_cipher_suite[16][4] = {
> +static u8 rsn_authen_cipher_suite[16][4] = {
>  	{0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved
>  	{0x00,0x0F,0xAC,0x01}, //WEP-40         //RSNA default
>  	{0x00,0x0F,0xAC,0x02}, //TKIP           //NONE		//{used just as default}
> @@ -47,7 +47,7 @@ short ieee80211_is_shortslot(const struct ieee80211_network *net)
>   * tag and the EXTENDED RATE MFIE tag if needed.
>   * It encludes two bytes per tag for the tag itself and its len
>   */
> -unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
> +static unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
>  {
>  	unsigned int rate_len = 0;
>  
> @@ -65,7 +65,7 @@ unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
>   * Then it updates the pointer so that
>   * it points after the new MFIE tag added.
>   */
> -void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
> +static void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
>  {
>  	u8 *tag = *tag_p;
>  
> @@ -82,7 +82,7 @@ void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
>  	*tag_p = tag;
>  }
>  
> -void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
> +static void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
>  {
>  	u8 *tag = *tag_p;
>  
> @@ -106,7 +106,7 @@ void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
>  }
>  
>  
> -void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
> +static void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
>  {
>  	u8 *tag = *tag_p;
>  
> @@ -130,7 +130,7 @@ void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
>  	*tag_p = tag;
>  }
>  
> -void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p)
> +static void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p)
>  {
>  	u8 *tag = *tag_p;
>  
> @@ -148,7 +148,7 @@ void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p)
>  	printk(KERN_ALERT "This is enable turbo mode IE process\n");
>  }
>  
> -void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
> +static void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
>  {
>  	int nh;
>  	nh = (ieee->mgmt_queue_head +1) % MGMT_QUEUE_NUM;
> @@ -166,7 +166,7 @@ void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
>  	//return 0;
>  }
>  
> -struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
> +static struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
>  {
>  	struct sk_buff *ret;
>  
> @@ -181,7 +181,7 @@ struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
>  	return ret;
>  }
>  
> -void init_mgmt_queue(struct ieee80211_device *ieee)
> +static void init_mgmt_queue(struct ieee80211_device *ieee)
>  {
>  	ieee->mgmt_queue_tail = ieee->mgmt_queue_head = 0;
>  }
> @@ -352,7 +352,7 @@ inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee)
>  
>  struct sk_buff *ieee80211_get_beacon_(struct ieee80211_device *ieee);
>  
> -void ext_ieee80211_send_beacon_wq(struct ieee80211_device *ieee)
> +static void ext_ieee80211_send_beacon_wq(struct ieee80211_device *ieee)
>  {
>  	struct sk_buff *skb;
>  
> @@ -377,7 +377,7 @@ void ext_ieee80211_send_beacon_wq(struct ieee80211_device *ieee)
>  	//spin_unlock_irqrestore(&ieee->beacon_lock,flags);
>  }
>  
> -void ieee80211_send_beacon(struct ieee80211_device *ieee)
> +static void ieee80211_send_beacon(struct ieee80211_device *ieee)
>  {
>  	struct sk_buff *skb;
>  
> @@ -402,7 +402,7 @@ void ieee80211_send_beacon(struct ieee80211_device *ieee)
>  }
>  
>  
> -void ieee80211_send_beacon_cb(unsigned long _ieee)
> +static void ieee80211_send_beacon_cb(unsigned long _ieee)
>  {
>  	struct ieee80211_device *ieee =
>  		(struct ieee80211_device *) _ieee;
> @@ -413,7 +413,7 @@ void ieee80211_send_beacon_cb(unsigned long _ieee)
>  	spin_unlock_irqrestore(&ieee->beacon_lock, flags);
>  }
>  
> -void ieee80211_send_probe(struct ieee80211_device *ieee)
> +static void ieee80211_send_probe(struct ieee80211_device *ieee)
>  {
>  	struct sk_buff *skb;
>  
> @@ -425,7 +425,7 @@ void ieee80211_send_probe(struct ieee80211_device *ieee)
>  	}
>  }
>  
> -void ieee80211_send_probe_requests(struct ieee80211_device *ieee)
> +static void ieee80211_send_probe_requests(struct ieee80211_device *ieee)
>  {
>  	if (ieee->active_scan && (ieee->softmac_features & IEEE_SOFTMAC_PROBERQ)){
>  		ieee80211_send_probe(ieee);
> @@ -436,7 +436,7 @@ void ieee80211_send_probe_requests(struct ieee80211_device *ieee)
>  /* this performs syncro scan blocking the caller until all channels
>   * in the allowed channel map has been checked.
>   */
> -void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
> +static void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
>  {
>  	short ch = 0;
>  	u8 channel_map[MAX_CHANNEL_NUMBER+1];
> @@ -574,7 +574,7 @@ out:
>  		DOT11D_ScanComplete(ieee);
>  }
>  
> -void ieee80211_softmac_scan_wq(struct work_struct *work)
> +static void ieee80211_softmac_scan_wq(struct work_struct *work)
>  {
>  	struct delayed_work *dwork = to_delayed_work(work);
>  	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq);
> @@ -617,7 +617,7 @@ out:
>  	return;
>  }
>  
> -void ieee80211_beacons_start(struct ieee80211_device *ieee)
> +static void ieee80211_beacons_start(struct ieee80211_device *ieee)
>  {
>  	unsigned long flags;
>  
> @@ -629,7 +629,7 @@ void ieee80211_beacons_start(struct ieee80211_device *ieee)
>  	spin_unlock_irqrestore(&ieee->beacon_lock,flags);
>  }
>  
> -void ieee80211_beacons_stop(struct ieee80211_device *ieee)
> +static void ieee80211_beacons_stop(struct ieee80211_device *ieee)
>  {
>  	unsigned long flags;
>  
> @@ -661,7 +661,7 @@ void ieee80211_start_send_beacons(struct ieee80211_device *ieee)
>  }
>  
>  
> -void ieee80211_softmac_stop_scan(struct ieee80211_device *ieee)
> +static void ieee80211_softmac_stop_scan(struct ieee80211_device *ieee)
>  {
>  //	unsigned long flags;
>  
> @@ -767,8 +767,8 @@ ieee80211_authentication_req(struct ieee80211_network *beacon,
>  
>  }
>  
> -static struct sk_buffi *ieee80211_probe_resp(struct ieee80211_device *ieee,
> -					     u8 *dest)
> +static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee,
> +					    u8 *dest)
>  {
>  	u8 *tag;
>  	int beacon_size;
> @@ -887,7 +887,8 @@ static struct sk_buffi *ieee80211_probe_resp(struct ieee80211_device *ieee,
>  	return skb;
>  }
>  
> -struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
> +static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
> +					    u8 *dest)
>  {
>  	struct sk_buff *skb;
>  	u8* tag;
> @@ -940,8 +941,8 @@ struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
>  	return skb;
>  }
>  
> -struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee, int status,
> -				    u8 *dest)
> +static struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee,
> +					   int status, u8 *dest)
>  {
>  	struct sk_buff *skb;
>  	struct ieee80211_authentication *auth;
> @@ -968,7 +969,8 @@ struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee, int status,
>  
>  }
>  
> -struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee, short pwr)
> +static struct sk_buff *ieee80211_null_func(struct ieee80211_device *ieee,
> +					   short pwr)
>  {
>  	struct sk_buff *skb;
>  	struct ieee80211_hdr_3addr* hdr;
> @@ -994,7 +996,7 @@ struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee, short pwr)
>  }
>  
>  
> -void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8* dest)
> +static void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8* dest)
>  {
>  	struct sk_buff *buf = ieee80211_assoc_resp(ieee, dest);
>  
> @@ -1005,7 +1007,8 @@ void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8* dest)
>  }
>  
>  
> -void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s, u8* dest)
> +static void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s,
> +				   u8* dest)
>  {
>  	struct sk_buff *buf = ieee80211_auth_resp(ieee, s, dest);
>  
> @@ -1016,7 +1019,7 @@ void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s, u8* dest)
>  }
>  
>  
> -void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
> +static void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
>  {
>  
>  	struct sk_buff *buf = ieee80211_probe_resp(ieee, dest);
> @@ -1165,13 +1168,13 @@ void ieee80211_associate_abort(struct ieee80211_device *ieee)
>  	spin_unlock_irqrestore(&ieee->lock, flags);
>  }
>  
> -void ieee80211_associate_abort_cb(unsigned long dev)
> +static void ieee80211_associate_abort_cb(unsigned long dev)
>  {
>  	ieee80211_associate_abort((struct ieee80211_device *) dev);
>  }
>  
>  
> -void ieee80211_associate_step1(struct ieee80211_device *ieee)
> +static void ieee80211_associate_step1(struct ieee80211_device *ieee)
>  {
>  	struct ieee80211_network *beacon = &ieee->current_network;
>  	struct sk_buff *skb;
> @@ -1201,8 +1204,8 @@ void ieee80211_associate_step1(struct ieee80211_device *ieee)
>  	}
>  }
>  
> -void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge,
> -				  int chlen)
> +static void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee,
> +					 u8 *challenge, int chlen)
>  {
>  	u8 *c;
>  	struct sk_buff *skb;
> @@ -1236,7 +1239,7 @@ void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge,
>  	kfree(challenge);
>  }
>  
> -void ieee80211_associate_step2(struct ieee80211_device *ieee)
> +static void ieee80211_associate_step2(struct ieee80211_device *ieee)
>  {
>  	struct sk_buff* skb;
>  	struct ieee80211_network *beacon = &ieee->current_network;
> @@ -1258,7 +1261,7 @@ void ieee80211_associate_step2(struct ieee80211_device *ieee)
>  	}
>  }
>  
> -void ieee80211_associate_complete_wq(struct work_struct *work)
> +static void ieee80211_associate_complete_wq(struct work_struct *work)
>  {
>  	struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq);
>  
> @@ -1279,7 +1282,7 @@ void ieee80211_associate_complete_wq(struct work_struct *work)
>  	netif_carrier_on(ieee->dev);
>  }
>  
> -void ieee80211_associate_complete(struct ieee80211_device *ieee)
> +static void ieee80211_associate_complete(struct ieee80211_device *ieee)
>  {
>  	int i;
>  	del_timer_sync(&ieee->associate_timer);
> @@ -1293,7 +1296,7 @@ void ieee80211_associate_complete(struct ieee80211_device *ieee)
>  	queue_work(ieee->wq, &ieee->associate_complete_wq);
>  }
>  
> -void ieee80211_associate_procedure_wq(struct work_struct *work)
> +static void ieee80211_associate_procedure_wq(struct work_struct *work)
>  {
>  	struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_procedure_wq);
>  
> @@ -1452,7 +1455,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)
>  }
>  
>  
> -int auth_rq_parse(struct sk_buff *skb, u8* dest)
> +static int auth_rq_parse(struct sk_buff *skb, u8* dest)
>  {
>  	struct ieee80211_authentication *a;
>  
> @@ -1509,7 +1512,7 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
>  
>  }
>  
> -int assoc_rq_parse(struct sk_buff *skb, u8* dest)
> +static int assoc_rq_parse(struct sk_buff *skb, u8* dest)
>  {
>  	struct ieee80211_assoc_request_frame *a;
>  
> @@ -1599,8 +1602,8 @@ void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr)
>  }
>  
>  
> -short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
> -			     u32 *time_l)
> +static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
> +			     	    u32 *time_l)
>  {
>          int timeout = 0;
>  
> @@ -1653,7 +1656,7 @@ short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
>  
>  }
>  
> -inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
> +static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
>  {
>  
>  	u32 th,tl;
> @@ -2019,7 +2022,7 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb,
>  }
>  
>  /* called with ieee->lock acquired */
> -void ieee80211_resume_tx(struct ieee80211_device *ieee)
> +static void ieee80211_resume_tx(struct ieee80211_device *ieee)
>  {
>  	int i;
>  	for(i = ieee->tx_pending.frag; i < ieee->tx_pending.txb->nr_frags; i++) {
> @@ -2149,7 +2152,7 @@ void ieee80211_start_master_bss(struct ieee80211_device *ieee)
>  	netif_carrier_on(ieee->dev);
>  }
>  
> -void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
> +static void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
>  {
>  	if(ieee->raw_tx){
>  
> @@ -2160,7 +2163,7 @@ void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
>  	}
>  }
>  
> -void ieee80211_start_ibss_wq(struct work_struct *work)
> +static void ieee80211_start_ibss_wq(struct work_struct *work)
>  {
>  	struct delayed_work *dwork = to_delayed_work(work);
>  	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, start_ibss_wq);
> @@ -2333,7 +2336,7 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)
>  	ieee->state = IEEE80211_NOLINK;
>  
>  }
> -void ieee80211_associate_retry_wq(struct work_struct *work)
> +static void ieee80211_associate_retry_wq(struct work_struct *work)
>  {
>  	struct delayed_work *dwork = to_delayed_work(work);
>  	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, associate_retry_wq);
> @@ -2625,8 +2628,8 @@ static int ieee80211_wpa_enable(struct ieee80211_device *ieee, int value)
>  }
>  
>  
> -void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee,
> -			       char *wpa_ie, int wpa_ie_len)
> +static void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee,
> +				      char *wpa_ie, int wpa_ie_len)
>  {
>  	/* make sure WPA is enabled */
>  	ieee80211_wpa_enable(ieee, 1);
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> index 0d03b16..df09920 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> @@ -239,8 +239,8 @@ void ieee80211_txb_free(struct ieee80211_txb *txb)
>  	kfree(txb);
>  }
>  
> -struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
> -					  int gfp_mask)
> +static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
> +						 int gfp_mask)
>  {
>  	struct ieee80211_txb *txb;
>  	int i;
> diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
> index a5c183e..e9b0fac 100644
> --- a/drivers/staging/rtl8187se/r8180_core.c
> +++ b/drivers/staging/rtl8187se/r8180_core.c
> @@ -198,7 +198,7 @@ inline void force_pci_posting(struct net_device *dev)
>  }
>  
>  static irqreturn_t rtl8180_interrupt(int irq, void *netdev);
> -void set_nic_rxring(struct net_device *dev);
> +static void set_nic_rxring(struct net_device *dev);
>  void set_nic_txring(struct net_device *dev);
>  static struct net_device_stats *rtl8180_stats(struct net_device *dev);
>  void rtl8180_commit(struct net_device *dev);
> @@ -275,18 +275,18 @@ static int proc_get_stats_tx(struct seq_file *m, void *v)
>  	return 0;
>  }
>  
> -void rtl8180_proc_module_init(void)
> +static void rtl8180_proc_module_init(void)
>  {
>  	DMESG("Initializing proc filesystem");
>  	rtl8180_proc = proc_mkdir(RTL8180_MODULE_NAME, init_net.proc_net);
>  }
>  
> -void rtl8180_proc_module_remove(void)
> +static void rtl8180_proc_module_remove(void)
>  {
>  	remove_proc_entry(RTL8180_MODULE_NAME, init_net.proc_net);
>  }
>  
> -void rtl8180_proc_remove_one(struct net_device *dev)
> +static void rtl8180_proc_remove_one(struct net_device *dev)
>  {
>  	remove_proc_subtree(dev->name, rtl8180_proc);
>  }
> @@ -325,7 +325,7 @@ static const struct rtl8180_proc_file rtl8180_proc_files[] = {
>  	{ "" }
>  };
>  
> -void rtl8180_proc_init_one(struct net_device *dev)
> +static void rtl8180_proc_init_one(struct net_device *dev)
>  {
>  	const struct rtl8180_proc_file *f;
>  	struct proc_dir_entry *dir;
> @@ -351,8 +351,8 @@ void rtl8180_proc_init_one(struct net_device *dev)
>    data type+functions in kernel
>  */
>  
> -short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
> -		 struct buffer **bufferhead)
> +static short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
> +			struct buffer **bufferhead)
>  {
>  	struct buffer *tmp;
>  
> @@ -387,8 +387,8 @@ short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
>  	return 0;
>  }
>  
> -void buffer_free(struct net_device *dev, struct buffer **buffer, int len,
> -		 short consistent)
> +static void buffer_free(struct net_device *dev, struct buffer **buffer, int len,
> +			short consistent)
>  {
>  
>  	struct buffer *tmp, *next;
> @@ -464,7 +464,7 @@ int get_curr_tx_free_desc(struct net_device *dev, int priority)
>  	return ret;
>  }
>  
> -short check_nic_enought_desc(struct net_device *dev, int priority)
> +static short check_nic_enought_desc(struct net_device *dev, int priority)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	struct ieee80211_device *ieee = netdev_priv(dev);
> @@ -590,7 +590,7 @@ void fix_rx_fifo(struct net_device *dev)
>  	set_nic_rxring(dev);
>  }
>  
> -void rtl8180_irq_disable(struct net_device *dev)
> +static void rtl8180_irq_disable(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  
> @@ -706,8 +706,8 @@ void rtl8180_rtx_disable(struct net_device *dev)
>  		dev_kfree_skb_any(priv->rx_skb);
>  }
>  
> -short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
> -			 int addr)
> +static short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
> +				int addr)
>  {
>  	int i;
>  	u32 *desc;
> @@ -831,7 +831,7 @@ short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
>  	return 0;
>  }
>  
> -void free_tx_desc_rings(struct net_device *dev)
> +static void free_tx_desc_rings(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	struct pci_dev *pdev = priv->pdev;
> @@ -867,7 +867,7 @@ void free_tx_desc_rings(struct net_device *dev)
>  	buffer_free(dev, &(priv->txbeaconbufs), priv->txbuffsize, 1);
>  }
>  
> -void free_rx_desc_ring(struct net_device *dev)
> +static void free_rx_desc_ring(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	struct pci_dev *pdev = priv->pdev;
> @@ -879,7 +879,7 @@ void free_rx_desc_ring(struct net_device *dev)
>  	buffer_free(dev, &(priv->rxbuffer), priv->rxbuffersize, 0);
>  }
>  
> -short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
> +static short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
>  {
>  	int i;
>  	u32 *desc;
> @@ -941,7 +941,7 @@ short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
>  }
>  
>  
> -void set_nic_rxring(struct net_device *dev)
> +static void set_nic_rxring(struct net_device *dev)
>  {
>  	u8 pgreg;
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
> @@ -1028,8 +1028,8 @@ inline u8 rtl8180_IsWirelessBMode(u16 rate)
>  
>  u16 N_DBPSOfRate(u16 DataRate);
>  
> -u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
> -		  u8 bShortPreamble)
> +static u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
> +			 u8 bShortPreamble)
>  {
>  	u16	FrameTime;
>  	u16	N_DBPS;
> @@ -1093,7 +1093,7 @@ u16 N_DBPSOfRate(u16 DataRate)
>  /*
>   * For Netgear case, they want good-looking signal strength.
>   */
> -long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
> +static long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
>  {
>  	long RetSS;
>  
> @@ -1129,7 +1129,7 @@ long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
>  /*
>   * Translate 0-100 signal strength index into dBm.
>   */
> -long TranslateToDbm8185(u8 SignalStrengthIndex)
> +static long TranslateToDbm8185(u8 SignalStrengthIndex)
>  {
>  	long SignalPower;
>  
> @@ -1146,8 +1146,8 @@ long TranslateToDbm8185(u8 SignalStrengthIndex)
>   * No dramatic adjustion is apply because dynamic mechanism need some degree
>   * of correctness. Ported from 8187B.
>   */
> -void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
> -					   bool bCckRate)
> +static void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
> +						  bool bCckRate)
>  {
>  	/* Determin the current packet is CCK rate. */
>  	priv->bCurCCKPkt = bCckRate;
> @@ -1171,7 +1171,7 @@ void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
>  /*
>   * This is rough RX isr handling routine
>   */
> -void rtl8180_rx(struct net_device *dev)
> +static void rtl8180_rx(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	struct sk_buff *tmp_skb;
> @@ -1497,7 +1497,7 @@ drop: /* this is used when we have not enough mem */
>  }
>  
>  
> -void rtl8180_dma_kick(struct net_device *dev, int priority)
> +static void rtl8180_dma_kick(struct net_device *dev, int priority)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  
> @@ -1509,7 +1509,7 @@ void rtl8180_dma_kick(struct net_device *dev, int priority)
>  	force_pci_posting(dev);
>  }
>  
> -void rtl8180_data_hard_stop(struct net_device *dev)
> +static void rtl8180_data_hard_stop(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  
> @@ -1519,7 +1519,7 @@ void rtl8180_data_hard_stop(struct net_device *dev)
>  	rtl8180_set_mode(dev, EPROM_CMD_NORMAL);
>  }
>  
> -void rtl8180_data_hard_resume(struct net_device *dev)
> +static void rtl8180_data_hard_resume(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  
> @@ -1533,8 +1533,8 @@ void rtl8180_data_hard_resume(struct net_device *dev)
>   * This function TX data frames when the ieee80211 stack requires this.
>   * It checks also if we need to stop the ieee tx queue, eventually do it
>   */
> -void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
> -			    int rate)
> +static void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
> +				   int rate)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	int mode;
> @@ -1586,7 +1586,7 @@ void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
>   * might use a different lock than tx_lock (for example mgmt_tx_lock)
>   */
>  /* these function may loop if invoked with 0 descriptors or 0 len buffer */
> -int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
> +static int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	unsigned long flags;
> @@ -1614,7 +1614,7 @@ int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  }
>  
>  /* longpre 144+48 shortpre 72+24 */
> -u16 rtl8180_len2duration(u32 len, short rate, short *ext)
> +static u16 rtl8180_len2duration(u32 len, short rate, short *ext)
>  {
>  	u16 duration;
>  	u16 drift;
> @@ -1662,7 +1662,7 @@ u16 rtl8180_len2duration(u32 len, short rate, short *ext)
>  	return duration;
>  }
>  
> -void rtl8180_prepare_beacon(struct net_device *dev)
> +static void rtl8180_prepare_beacon(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	struct sk_buff *skb;
> @@ -1955,7 +1955,7 @@ short rtl8180_tx(struct net_device *dev, u8 *txbuf, int len, int priority,
>  
>  void rtl8180_irq_rx_tasklet(struct r8180_priv *priv);
>  
> -void rtl8180_link_change(struct net_device *dev)
> +static void rtl8180_link_change(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	u16 beacon_interval;
> @@ -1978,7 +1978,7 @@ void rtl8180_link_change(struct net_device *dev)
>  	rtl8180_set_chan(dev, priv->chan);
>  }
>  
> -void rtl8180_rq_tx_ack(struct net_device *dev)
> +static void rtl8180_rq_tx_ack(struct net_device *dev)
>  {
>  
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -1987,7 +1987,7 @@ void rtl8180_rq_tx_ack(struct net_device *dev)
>  	priv->ack_tx_to_ieee = 1;
>  }
>  
> -short rtl8180_is_tx_queue_empty(struct net_device *dev)
> +static short rtl8180_is_tx_queue_empty(struct net_device *dev)
>  {
>  
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -2025,7 +2025,7 @@ short rtl8180_is_tx_queue_empty(struct net_device *dev)
>  	return 1;
>  }
>  
> -void rtl8180_hw_wakeup(struct net_device *dev)
> +static void rtl8180_hw_wakeup(struct net_device *dev)
>  {
>  	unsigned long flags;
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -2037,7 +2037,7 @@ void rtl8180_hw_wakeup(struct net_device *dev)
>  	spin_unlock_irqrestore(&priv->ps_lock, flags);
>  }
>  
> -void rtl8180_hw_sleep_down(struct net_device *dev)
> +static void rtl8180_hw_sleep_down(struct net_device *dev)
>  {
>  	unsigned long flags;
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -2048,7 +2048,7 @@ void rtl8180_hw_sleep_down(struct net_device *dev)
>  	spin_unlock_irqrestore(&priv->ps_lock, flags);
>  }
>  
> -void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
> +static void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	u32 rb = jiffies;
> @@ -2095,7 +2095,7 @@ void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
>  	spin_unlock_irqrestore(&priv->ps_lock, flags);
>  }
>  
> -void rtl8180_wmm_param_update(struct work_struct *work)
> +static void rtl8180_wmm_param_update(struct work_struct *work)
>  {
>  	struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, wmm_param_update_wq);
>  	struct net_device *dev = ieee->dev;
> @@ -2192,12 +2192,12 @@ void rtl8180_wmm_param_update(struct work_struct *work)
>  void rtl8180_restart_wq(struct work_struct *work);
>  /* void rtl8180_rq_tx_ack(struct work_struct *work); */
>  void rtl8180_watch_dog_wq(struct work_struct *work);
> -void rtl8180_hw_wakeup_wq(struct work_struct *work);
> -void rtl8180_hw_sleep_wq(struct work_struct *work);
> +static void rtl8180_hw_wakeup_wq(struct work_struct *work);
> +static void rtl8180_hw_sleep_wq(struct work_struct *work);
>  void rtl8180_sw_antenna_wq(struct work_struct *work);
>  void rtl8180_watch_dog(struct net_device *dev);
>  
> -void watch_dog_adaptive(unsigned long data)
> +static void watch_dog_adaptive(unsigned long data)
>  {
>  	struct r8180_priv *priv = ieee80211_priv((struct net_device *)data);
>  
> @@ -2342,7 +2342,7 @@ static void rtl8187se_eeprom_register_write(struct eeprom_93cx6 *eeprom)
>  	udelay(10);
>  }
>  
> -short rtl8180_init(struct net_device *dev)
> +static short rtl8180_init(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	u16 word;
> @@ -2760,7 +2760,7 @@ void rtl8185_tx_antenna(struct net_device *dev, u8 ant)
>  	mdelay(1);
>  }
>  
> -void rtl8185_write_phy(struct net_device *dev, u8 adr, u32 data)
> +static void rtl8185_write_phy(struct net_device *dev, u8 adr, u32 data)
>  {
>  	u32 phyw;
>  
> @@ -2832,8 +2832,8 @@ static struct net_device_stats *rtl8180_stats(struct net_device *dev)
>  /*
>   * Change current and default preamble mode.
>   */
> -bool MgntActSet_802_11_PowerSaveMode(struct r8180_priv *priv,
> -				     RT_PS_MODE rtPsMode)
> +static bool MgntActSet_802_11_PowerSaveMode(struct r8180_priv *priv,
> +					    RT_PS_MODE rtPsMode)
>  {
>  	/* Currently, we do not change power save mode on IBSS mode. */
>  	if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
> @@ -2844,7 +2844,7 @@ bool MgntActSet_802_11_PowerSaveMode(struct r8180_priv *priv,
>  	return true;
>  }
>  
> -void LeisurePSEnter(struct r8180_priv *priv)
> +static void LeisurePSEnter(struct r8180_priv *priv)
>  {
>  	if (priv->bLeisurePs) {
>  		if (priv->ieee80211->ps == IEEE80211_PS_DISABLED)
> @@ -2853,7 +2853,7 @@ void LeisurePSEnter(struct r8180_priv *priv)
>  	}
>  }
>  
> -void LeisurePSLeave(struct r8180_priv *priv)
> +static void LeisurePSLeave(struct r8180_priv *priv)
>  {
>  	if (priv->bLeisurePs) {
>  		if (priv->ieee80211->ps != IEEE80211_PS_DISABLED)
> @@ -2861,7 +2861,7 @@ void LeisurePSLeave(struct r8180_priv *priv)
>  	}
>  }
>  
> -void rtl8180_hw_wakeup_wq(struct work_struct *work)
> +static void rtl8180_hw_wakeup_wq(struct work_struct *work)
>  {
>  	struct delayed_work *dwork = to_delayed_work(work);
>  	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, hw_wakeup_wq);
> @@ -2870,7 +2870,7 @@ void rtl8180_hw_wakeup_wq(struct work_struct *work)
>  	rtl8180_hw_wakeup(dev);
>  }
>  
> -void rtl8180_hw_sleep_wq(struct work_struct *work)
> +static void rtl8180_hw_sleep_wq(struct work_struct *work)
>  {
>  	struct delayed_work *dwork = to_delayed_work(work);
>  	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, hw_sleep_wq);
> @@ -2969,7 +2969,7 @@ void rtl8180_watch_dog(struct net_device *dev)
>  	priv->ieee80211->NumRxBcnInPeriod = 0;
>  }
>  
> -int _rtl8180_up(struct net_device *dev)
> +static int _rtl8180_up(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -2991,7 +2991,7 @@ int _rtl8180_up(struct net_device *dev)
>  	return 0;
>  }
>  
> -int rtl8180_open(struct net_device *dev)
> +static int rtl8180_open(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int ret;
> @@ -3012,7 +3012,7 @@ int rtl8180_up(struct net_device *dev)
>  	return _rtl8180_up(dev);
>  }
>  
> -int rtl8180_close(struct net_device *dev)
> +static int rtl8180_close(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int ret;
> @@ -3065,7 +3065,7 @@ void rtl8180_restart_wq(struct work_struct *work)
>  	up(&priv->wx_sem);
>  }
>  
> -void rtl8180_restart(struct net_device *dev)
> +static void rtl8180_restart(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -3106,7 +3106,7 @@ static void r8180_set_multicast(struct net_device *dev)
>  	priv->promisc = promisc;
>  }
>  
> -int r8180_set_mac_adr(struct net_device *dev, void *mac)
> +static int r8180_set_mac_adr(struct net_device *dev, void *mac)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	struct sockaddr *addr = mac;
> @@ -3129,7 +3129,7 @@ int r8180_set_mac_adr(struct net_device *dev, void *mac)
>  }
>  
>  /* based on ipw2200 driver */
> -int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
> +static int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	struct iwreq *wrq = (struct iwreq *) rq;
> @@ -3369,7 +3369,7 @@ static void __exit rtl8180_pci_module_exit(void)
>  	DMESG("Exiting");
>  }
>  
> -void rtl8180_try_wake_queue(struct net_device *dev, int pri)
> +static void rtl8180_try_wake_queue(struct net_device *dev, int pri)
>  {
>  	unsigned long flags;
>  	short enough_desc;
> @@ -3383,7 +3383,7 @@ void rtl8180_try_wake_queue(struct net_device *dev, int pri)
>  		ieee80211_rtl_wake_queue(priv->ieee80211);
>  }
>  
> -void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
> +static void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	u32 *tail; /* tail virtual addr */
> @@ -3537,7 +3537,7 @@ void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
>  	spin_unlock_irqrestore(&priv->tx_lock, flag);
>  }
>  
> -irqreturn_t rtl8180_interrupt(int irq, void *netdev)
> +static irqreturn_t rtl8180_interrupt(int irq, void *netdev)
>  {
>  	struct net_device *dev = (struct net_device *) netdev;
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
> diff --git a/drivers/staging/rtl8187se/r8180_dm.c b/drivers/staging/rtl8187se/r8180_dm.c
> index b8f2ba0..dad59d0 100644
> --- a/drivers/staging/rtl8187se/r8180_dm.c
> +++ b/drivers/staging/rtl8187se/r8180_dm.c
> @@ -30,7 +30,7 @@ bool CheckHighPower(struct net_device *dev)
>   *		and they are related to OFDM and MAC registers.
>   *		So, we don't want to update it so frequently in per-Rx packet base.
>   */
> -void DoTxHighPower(struct net_device *dev)
> +static void DoTxHighPower(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	u16			HiPwrUpperTh = 0;
> @@ -125,7 +125,7 @@ bool CheckDig(struct net_device *dev)
>  /*
>   *	Implementation of DIG for Zebra and Zebra2.
>   */
> -void DIG_Zebra(struct net_device *dev)
> +static void DIG_Zebra(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	u16			CCKFalseAlarm, OFDMFalseAlarm;
> @@ -202,7 +202,7 @@ void DIG_Zebra(struct net_device *dev)
>  /*
>   *	Dispatch DIG implementation according to RF.
>   */
> -void DynamicInitGain(struct net_device *dev)
> +static void DynamicInitGain(struct net_device *dev)
>  {
>  	DIG_Zebra(dev);
>  }
> @@ -223,7 +223,7 @@ void rtl8180_hw_dig_wq(struct work_struct *work)
>  
>  }
>  
> -int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
> +static int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
>  {
>  	u8 rate_len;
>  	u8 rate_ex_len;
> @@ -255,7 +255,7 @@ int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
>   *	Get the Tx rate one degree up form the input rate in the supported rates.
>   *	Return the upgrade rate if it is successed, otherwise return the input rate.
>   */
> -u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
> +static u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	u8                      UpRate;
> @@ -315,7 +315,7 @@ u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
>   *	Return the degrade rate if it is successed, otherwise return the input rate.
>   */
>  
> -u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
> +static u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	u8                      DownRate;
> @@ -375,7 +375,7 @@ u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
>   *      CCK rate.
>   */
>  
> -bool MgntIsCckRate(u16 rate)
> +static bool MgntIsCckRate(u16 rate)
>  {
>  	bool bReturn = false;
>  
> @@ -435,7 +435,7 @@ void TxPwrTracking87SE(struct net_device *dev)
>  	}
>  	priv->ThermalMeter = CurrentThermal;
>  }
> -void StaRateAdaptive87SE(struct net_device *dev)
> +static void StaRateAdaptive87SE(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	unsigned long	CurrTxokCnt;
> diff --git a/drivers/staging/rtl8187se/r8180_rtl8225z2.c b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
> index 9ae96b7..6c4b9f6 100644
> --- a/drivers/staging/rtl8187se/r8180_rtl8225z2.c
> +++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
> @@ -136,7 +136,7 @@ static const u16 rtl8225z2_rxgain[] = {
>  
>  };
>  
> -void rtl8225z2_set_gain(struct net_device *dev, short gain)
> +static void rtl8225z2_set_gain(struct net_device *dev, short gain)
>  {
>  	const u8 *rtl8225_gain;
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -279,8 +279,8 @@ void rtl8225z2_rf_close(struct net_device *dev)
>   * Map dBm into Tx power index according to current HW model, for example,
>   * RF and PA, and current wireless mode.
>   */
> -s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
> -		 s32 PowerInDbm)
> +static s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
> +			s32 PowerInDbm)
>  {
>  	bool bUseDefault = true;
>  	s8 TxPwrIdx = 0;
> @@ -606,7 +606,7 @@ void rtl8225z2_rf_init(struct net_device *dev)
>  	rtl8225z2_rf_set_chan(dev, priv->chan);
>  }
>  
> -void rtl8225z2_rf_set_mode(struct net_device *dev)
> +static void rtl8225z2_rf_set_mode(struct net_device *dev)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> diff --git a/drivers/staging/rtl8187se/r8180_wx.c b/drivers/staging/rtl8187se/r8180_wx.c
> index f35a0c8..bb54d26 100644
> --- a/drivers/staging/rtl8187se/r8180_wx.c
> +++ b/drivers/staging/rtl8187se/r8180_wx.c
> @@ -24,7 +24,7 @@
>  #include <net/iw_handler.h>
>  #include "ieee80211/dot11d.h"
>  
> -u32 rtl8180_rates[] = {1000000, 2000000, 5500000, 11000000,
> +static u32 rtl8180_rates[] = {1000000, 2000000, 5500000, 11000000,
>  	6000000, 9000000, 12000000, 18000000, 24000000, 36000000, 48000000, 54000000};
>  
>  #define RATE_COUNT ARRAY_SIZE(rtl8180_rates)
> @@ -51,8 +51,9 @@ static int r8180_wx_get_freq(struct net_device *dev,
>  }
>  
>  
> -int r8180_wx_set_key(struct net_device *dev, struct iw_request_info *info,
> -		     union iwreq_data *wrqu, char *key)
> +static int r8180_wx_set_key(struct net_device *dev,
> +			    struct iw_request_info *info,
> +			    union iwreq_data *wrqu, char *key)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	struct iw_point *erq = &(wrqu->encoding);
> @@ -1382,7 +1383,7 @@ static struct iw_statistics *r8180_get_wireless_stats(struct net_device *dev)
>  	return wstats;
>  }
>  
> -struct iw_handler_def  r8180_wx_handlers_def = {
> +static struct iw_handler_def  r8180_wx_handlers_def = {
>  	.standard = r8180_wx_handlers,
>  	.num_standard = ARRAY_SIZE(r8180_wx_handlers),
>  	.private = r8180_private_handler,
> -- 
> 1.8.4.rc3
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Patch
diff mbox

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
index a0340ee..1fecad3 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
@@ -199,7 +199,7 @@  static struct ieee80211_crypto_ops ieee80211_crypt_null = {
 };
 
 
-int ieee80211_crypto_init(void)
+static int ieee80211_crypto_init(void)
 {
 	int ret = -ENOMEM;
 
@@ -220,7 +220,7 @@  out:
 }
 
 
-void ieee80211_crypto_deinit(void)
+static void ieee80211_crypto_deinit(void)
 {
 	struct list_head *ptr, *n;
 	struct ieee80211_crypto_alg *alg = NULL;
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
index 2fc1bb9..0dca088 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
@@ -60,8 +60,8 @@  struct ieee80211_ccmp_data {
 	u8 rx_b0[AES_BLOCK_LEN], rx_b[AES_BLOCK_LEN], rx_a[AES_BLOCK_LEN];
 };
 
-void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,
-			        const u8 pt[16], u8 ct[16])
+static void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,
+				       const u8 pt[16], u8 ct[16])
 {
 	crypto_cipher_encrypt_one((void *)tfm, ct, pt);
 }
@@ -450,13 +450,13 @@  static struct ieee80211_crypto_ops ieee80211_crypt_ccmp = {
 };
 
 
-int ieee80211_crypto_ccmp_init(void)
+static int ieee80211_crypto_ccmp_init(void)
 {
 	return ieee80211_register_crypto_ops(&ieee80211_crypt_ccmp);
 }
 
 
-void ieee80211_crypto_ccmp_exit(void)
+static void ieee80211_crypto_ccmp_exit(void)
 {
 	ieee80211_unregister_crypto_ops(&ieee80211_crypt_ccmp);
 }
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
index 2fc797b..40c9280 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
@@ -733,13 +733,13 @@  static struct ieee80211_crypto_ops ieee80211_crypt_tkip = {
 };
 
 
-int ieee80211_crypto_tkip_init(void)
+static int ieee80211_crypto_tkip_init(void)
 {
 	return ieee80211_register_crypto_ops(&ieee80211_crypt_tkip);
 }
 
 
-void ieee80211_crypto_tkip_exit(void)
+static void ieee80211_crypto_tkip_exit(void)
 {
 	ieee80211_unregister_crypto_ops(&ieee80211_crypt_tkip);
 }
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
index bba7714..15da091 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
@@ -274,13 +274,13 @@  static struct ieee80211_crypto_ops ieee80211_crypt_wep = {
 };
 
 
-int ieee80211_crypto_wep_init(void)
+static int ieee80211_crypto_wep_init(void)
 {
 	return ieee80211_register_crypto_ops(&ieee80211_crypt_wep);
 }
 
 
-void ieee80211_crypto_wep_exit(void)
+static void ieee80211_crypto_wep_exit(void)
 {
 	ieee80211_unregister_crypto_ops(&ieee80211_crypt_wep);
 }
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index 43971cd..b522b57 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -856,7 +856,7 @@  ieee80211_extract_country_ie(struct ieee80211_device *ieee,
 }
 
 /* SignalStrengthIndex is 0-100 */
-int ieee80211_TranslateToDbm(unsigned char SignalStrengthIndex)
+static int ieee80211_TranslateToDbm(unsigned char SignalStrengthIndex)
 {
 	unsigned char SignalPower; // in dBm.
 
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
index 6eefc27..2cc2435 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@ -24,7 +24,7 @@ 
 #include <linux/etherdevice.h>
 
 #include "dot11d.h"
-u8 rsn_authen_cipher_suite[16][4] = {
+static u8 rsn_authen_cipher_suite[16][4] = {
 	{0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved
 	{0x00,0x0F,0xAC,0x01}, //WEP-40         //RSNA default
 	{0x00,0x0F,0xAC,0x02}, //TKIP           //NONE		//{used just as default}
@@ -47,7 +47,7 @@  short ieee80211_is_shortslot(const struct ieee80211_network *net)
  * tag and the EXTENDED RATE MFIE tag if needed.
  * It encludes two bytes per tag for the tag itself and its len
  */
-unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
+static unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
 {
 	unsigned int rate_len = 0;
 
@@ -65,7 +65,7 @@  unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
  * Then it updates the pointer so that
  * it points after the new MFIE tag added.
  */
-void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
+static void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
 {
 	u8 *tag = *tag_p;
 
@@ -82,7 +82,7 @@  void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
 	*tag_p = tag;
 }
 
-void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
+static void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
 {
 	u8 *tag = *tag_p;
 
@@ -106,7 +106,7 @@  void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
 }
 
 
-void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
+static void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
 {
 	u8 *tag = *tag_p;
 
@@ -130,7 +130,7 @@  void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
 	*tag_p = tag;
 }
 
-void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p)
+static void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p)
 {
 	u8 *tag = *tag_p;
 
@@ -148,7 +148,7 @@  void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p)
 	printk(KERN_ALERT "This is enable turbo mode IE process\n");
 }
 
-void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
+static void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
 {
 	int nh;
 	nh = (ieee->mgmt_queue_head +1) % MGMT_QUEUE_NUM;
@@ -166,7 +166,7 @@  void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
 	//return 0;
 }
 
-struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
+static struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
 {
 	struct sk_buff *ret;
 
@@ -181,7 +181,7 @@  struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
 	return ret;
 }
 
-void init_mgmt_queue(struct ieee80211_device *ieee)
+static void init_mgmt_queue(struct ieee80211_device *ieee)
 {
 	ieee->mgmt_queue_tail = ieee->mgmt_queue_head = 0;
 }
@@ -352,7 +352,7 @@  inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee)
 
 struct sk_buff *ieee80211_get_beacon_(struct ieee80211_device *ieee);
 
-void ext_ieee80211_send_beacon_wq(struct ieee80211_device *ieee)
+static void ext_ieee80211_send_beacon_wq(struct ieee80211_device *ieee)
 {
 	struct sk_buff *skb;
 
@@ -377,7 +377,7 @@  void ext_ieee80211_send_beacon_wq(struct ieee80211_device *ieee)
 	//spin_unlock_irqrestore(&ieee->beacon_lock,flags);
 }
 
-void ieee80211_send_beacon(struct ieee80211_device *ieee)
+static void ieee80211_send_beacon(struct ieee80211_device *ieee)
 {
 	struct sk_buff *skb;
 
@@ -402,7 +402,7 @@  void ieee80211_send_beacon(struct ieee80211_device *ieee)
 }
 
 
-void ieee80211_send_beacon_cb(unsigned long _ieee)
+static void ieee80211_send_beacon_cb(unsigned long _ieee)
 {
 	struct ieee80211_device *ieee =
 		(struct ieee80211_device *) _ieee;
@@ -413,7 +413,7 @@  void ieee80211_send_beacon_cb(unsigned long _ieee)
 	spin_unlock_irqrestore(&ieee->beacon_lock, flags);
 }
 
-void ieee80211_send_probe(struct ieee80211_device *ieee)
+static void ieee80211_send_probe(struct ieee80211_device *ieee)
 {
 	struct sk_buff *skb;
 
@@ -425,7 +425,7 @@  void ieee80211_send_probe(struct ieee80211_device *ieee)
 	}
 }
 
-void ieee80211_send_probe_requests(struct ieee80211_device *ieee)
+static void ieee80211_send_probe_requests(struct ieee80211_device *ieee)
 {
 	if (ieee->active_scan && (ieee->softmac_features & IEEE_SOFTMAC_PROBERQ)){
 		ieee80211_send_probe(ieee);
@@ -436,7 +436,7 @@  void ieee80211_send_probe_requests(struct ieee80211_device *ieee)
 /* this performs syncro scan blocking the caller until all channels
  * in the allowed channel map has been checked.
  */
-void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
+static void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
 {
 	short ch = 0;
 	u8 channel_map[MAX_CHANNEL_NUMBER+1];
@@ -574,7 +574,7 @@  out:
 		DOT11D_ScanComplete(ieee);
 }
 
-void ieee80211_softmac_scan_wq(struct work_struct *work)
+static void ieee80211_softmac_scan_wq(struct work_struct *work)
 {
 	struct delayed_work *dwork = to_delayed_work(work);
 	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq);
@@ -617,7 +617,7 @@  out:
 	return;
 }
 
-void ieee80211_beacons_start(struct ieee80211_device *ieee)
+static void ieee80211_beacons_start(struct ieee80211_device *ieee)
 {
 	unsigned long flags;
 
@@ -629,7 +629,7 @@  void ieee80211_beacons_start(struct ieee80211_device *ieee)
 	spin_unlock_irqrestore(&ieee->beacon_lock,flags);
 }
 
-void ieee80211_beacons_stop(struct ieee80211_device *ieee)
+static void ieee80211_beacons_stop(struct ieee80211_device *ieee)
 {
 	unsigned long flags;
 
@@ -661,7 +661,7 @@  void ieee80211_start_send_beacons(struct ieee80211_device *ieee)
 }
 
 
-void ieee80211_softmac_stop_scan(struct ieee80211_device *ieee)
+static void ieee80211_softmac_stop_scan(struct ieee80211_device *ieee)
 {
 //	unsigned long flags;
 
@@ -767,8 +767,8 @@  ieee80211_authentication_req(struct ieee80211_network *beacon,
 
 }
 
-static struct sk_buffi *ieee80211_probe_resp(struct ieee80211_device *ieee,
-					     u8 *dest)
+static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee,
+					    u8 *dest)
 {
 	u8 *tag;
 	int beacon_size;
@@ -887,7 +887,8 @@  static struct sk_buffi *ieee80211_probe_resp(struct ieee80211_device *ieee,
 	return skb;
 }
 
-struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
+static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
+					    u8 *dest)
 {
 	struct sk_buff *skb;
 	u8* tag;
@@ -940,8 +941,8 @@  struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
 	return skb;
 }
 
-struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee, int status,
-				    u8 *dest)
+static struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee,
+					   int status, u8 *dest)
 {
 	struct sk_buff *skb;
 	struct ieee80211_authentication *auth;
@@ -968,7 +969,8 @@  struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee, int status,
 
 }
 
-struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee, short pwr)
+static struct sk_buff *ieee80211_null_func(struct ieee80211_device *ieee,
+					   short pwr)
 {
 	struct sk_buff *skb;
 	struct ieee80211_hdr_3addr* hdr;
@@ -994,7 +996,7 @@  struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee, short pwr)
 }
 
 
-void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8* dest)
+static void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8* dest)
 {
 	struct sk_buff *buf = ieee80211_assoc_resp(ieee, dest);
 
@@ -1005,7 +1007,8 @@  void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8* dest)
 }
 
 
-void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s, u8* dest)
+static void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s,
+				   u8* dest)
 {
 	struct sk_buff *buf = ieee80211_auth_resp(ieee, s, dest);
 
@@ -1016,7 +1019,7 @@  void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s, u8* dest)
 }
 
 
-void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
+static void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
 {
 
 	struct sk_buff *buf = ieee80211_probe_resp(ieee, dest);
@@ -1165,13 +1168,13 @@  void ieee80211_associate_abort(struct ieee80211_device *ieee)
 	spin_unlock_irqrestore(&ieee->lock, flags);
 }
 
-void ieee80211_associate_abort_cb(unsigned long dev)
+static void ieee80211_associate_abort_cb(unsigned long dev)
 {
 	ieee80211_associate_abort((struct ieee80211_device *) dev);
 }
 
 
-void ieee80211_associate_step1(struct ieee80211_device *ieee)
+static void ieee80211_associate_step1(struct ieee80211_device *ieee)
 {
 	struct ieee80211_network *beacon = &ieee->current_network;
 	struct sk_buff *skb;
@@ -1201,8 +1204,8 @@  void ieee80211_associate_step1(struct ieee80211_device *ieee)
 	}
 }
 
-void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge,
-				  int chlen)
+static void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee,
+					 u8 *challenge, int chlen)
 {
 	u8 *c;
 	struct sk_buff *skb;
@@ -1236,7 +1239,7 @@  void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge,
 	kfree(challenge);
 }
 
-void ieee80211_associate_step2(struct ieee80211_device *ieee)
+static void ieee80211_associate_step2(struct ieee80211_device *ieee)
 {
 	struct sk_buff* skb;
 	struct ieee80211_network *beacon = &ieee->current_network;
@@ -1258,7 +1261,7 @@  void ieee80211_associate_step2(struct ieee80211_device *ieee)
 	}
 }
 
-void ieee80211_associate_complete_wq(struct work_struct *work)
+static void ieee80211_associate_complete_wq(struct work_struct *work)
 {
 	struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq);
 
@@ -1279,7 +1282,7 @@  void ieee80211_associate_complete_wq(struct work_struct *work)
 	netif_carrier_on(ieee->dev);
 }
 
-void ieee80211_associate_complete(struct ieee80211_device *ieee)
+static void ieee80211_associate_complete(struct ieee80211_device *ieee)
 {
 	int i;
 	del_timer_sync(&ieee->associate_timer);
@@ -1293,7 +1296,7 @@  void ieee80211_associate_complete(struct ieee80211_device *ieee)
 	queue_work(ieee->wq, &ieee->associate_complete_wq);
 }
 
-void ieee80211_associate_procedure_wq(struct work_struct *work)
+static void ieee80211_associate_procedure_wq(struct work_struct *work)
 {
 	struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_procedure_wq);
 
@@ -1452,7 +1455,7 @@  static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)
 }
 
 
-int auth_rq_parse(struct sk_buff *skb, u8* dest)
+static int auth_rq_parse(struct sk_buff *skb, u8* dest)
 {
 	struct ieee80211_authentication *a;
 
@@ -1509,7 +1512,7 @@  static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
 
 }
 
-int assoc_rq_parse(struct sk_buff *skb, u8* dest)
+static int assoc_rq_parse(struct sk_buff *skb, u8* dest)
 {
 	struct ieee80211_assoc_request_frame *a;
 
@@ -1599,8 +1602,8 @@  void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr)
 }
 
 
-short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
-			     u32 *time_l)
+static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
+			     	    u32 *time_l)
 {
         int timeout = 0;
 
@@ -1653,7 +1656,7 @@  short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
 
 }
 
-inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
+static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
 {
 
 	u32 th,tl;
@@ -2019,7 +2022,7 @@  void ieee80211_softmac_xmit(struct ieee80211_txb *txb,
 }
 
 /* called with ieee->lock acquired */
-void ieee80211_resume_tx(struct ieee80211_device *ieee)
+static void ieee80211_resume_tx(struct ieee80211_device *ieee)
 {
 	int i;
 	for(i = ieee->tx_pending.frag; i < ieee->tx_pending.txb->nr_frags; i++) {
@@ -2149,7 +2152,7 @@  void ieee80211_start_master_bss(struct ieee80211_device *ieee)
 	netif_carrier_on(ieee->dev);
 }
 
-void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
+static void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
 {
 	if(ieee->raw_tx){
 
@@ -2160,7 +2163,7 @@  void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
 	}
 }
 
-void ieee80211_start_ibss_wq(struct work_struct *work)
+static void ieee80211_start_ibss_wq(struct work_struct *work)
 {
 	struct delayed_work *dwork = to_delayed_work(work);
 	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, start_ibss_wq);
@@ -2333,7 +2336,7 @@  void ieee80211_disassociate(struct ieee80211_device *ieee)
 	ieee->state = IEEE80211_NOLINK;
 
 }
-void ieee80211_associate_retry_wq(struct work_struct *work)
+static void ieee80211_associate_retry_wq(struct work_struct *work)
 {
 	struct delayed_work *dwork = to_delayed_work(work);
 	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, associate_retry_wq);
@@ -2625,8 +2628,8 @@  static int ieee80211_wpa_enable(struct ieee80211_device *ieee, int value)
 }
 
 
-void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee,
-			       char *wpa_ie, int wpa_ie_len)
+static void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee,
+				      char *wpa_ie, int wpa_ie_len)
 {
 	/* make sure WPA is enabled */
 	ieee80211_wpa_enable(ieee, 1);
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
index 0d03b16..df09920 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
@@ -239,8 +239,8 @@  void ieee80211_txb_free(struct ieee80211_txb *txb)
 	kfree(txb);
 }
 
-struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
-					  int gfp_mask)
+static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
+						 int gfp_mask)
 {
 	struct ieee80211_txb *txb;
 	int i;
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index a5c183e..e9b0fac 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -198,7 +198,7 @@  inline void force_pci_posting(struct net_device *dev)
 }
 
 static irqreturn_t rtl8180_interrupt(int irq, void *netdev);
-void set_nic_rxring(struct net_device *dev);
+static void set_nic_rxring(struct net_device *dev);
 void set_nic_txring(struct net_device *dev);
 static struct net_device_stats *rtl8180_stats(struct net_device *dev);
 void rtl8180_commit(struct net_device *dev);
@@ -275,18 +275,18 @@  static int proc_get_stats_tx(struct seq_file *m, void *v)
 	return 0;
 }
 
-void rtl8180_proc_module_init(void)
+static void rtl8180_proc_module_init(void)
 {
 	DMESG("Initializing proc filesystem");
 	rtl8180_proc = proc_mkdir(RTL8180_MODULE_NAME, init_net.proc_net);
 }
 
-void rtl8180_proc_module_remove(void)
+static void rtl8180_proc_module_remove(void)
 {
 	remove_proc_entry(RTL8180_MODULE_NAME, init_net.proc_net);
 }
 
-void rtl8180_proc_remove_one(struct net_device *dev)
+static void rtl8180_proc_remove_one(struct net_device *dev)
 {
 	remove_proc_subtree(dev->name, rtl8180_proc);
 }
@@ -325,7 +325,7 @@  static const struct rtl8180_proc_file rtl8180_proc_files[] = {
 	{ "" }
 };
 
-void rtl8180_proc_init_one(struct net_device *dev)
+static void rtl8180_proc_init_one(struct net_device *dev)
 {
 	const struct rtl8180_proc_file *f;
 	struct proc_dir_entry *dir;
@@ -351,8 +351,8 @@  void rtl8180_proc_init_one(struct net_device *dev)
   data type+functions in kernel
 */
 
-short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
-		 struct buffer **bufferhead)
+static short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
+			struct buffer **bufferhead)
 {
 	struct buffer *tmp;
 
@@ -387,8 +387,8 @@  short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
 	return 0;
 }
 
-void buffer_free(struct net_device *dev, struct buffer **buffer, int len,
-		 short consistent)
+static void buffer_free(struct net_device *dev, struct buffer **buffer, int len,
+			short consistent)
 {
 
 	struct buffer *tmp, *next;
@@ -464,7 +464,7 @@  int get_curr_tx_free_desc(struct net_device *dev, int priority)
 	return ret;
 }
 
-short check_nic_enought_desc(struct net_device *dev, int priority)
+static short check_nic_enought_desc(struct net_device *dev, int priority)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	struct ieee80211_device *ieee = netdev_priv(dev);
@@ -590,7 +590,7 @@  void fix_rx_fifo(struct net_device *dev)
 	set_nic_rxring(dev);
 }
 
-void rtl8180_irq_disable(struct net_device *dev)
+static void rtl8180_irq_disable(struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 
@@ -706,8 +706,8 @@  void rtl8180_rtx_disable(struct net_device *dev)
 		dev_kfree_skb_any(priv->rx_skb);
 }
 
-short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
-			 int addr)
+static short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
+				int addr)
 {
 	int i;
 	u32 *desc;
@@ -831,7 +831,7 @@  short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
 	return 0;
 }
 
-void free_tx_desc_rings(struct net_device *dev)
+static void free_tx_desc_rings(struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	struct pci_dev *pdev = priv->pdev;
@@ -867,7 +867,7 @@  void free_tx_desc_rings(struct net_device *dev)
 	buffer_free(dev, &(priv->txbeaconbufs), priv->txbuffsize, 1);
 }
 
-void free_rx_desc_ring(struct net_device *dev)
+static void free_rx_desc_ring(struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	struct pci_dev *pdev = priv->pdev;
@@ -879,7 +879,7 @@  void free_rx_desc_ring(struct net_device *dev)
 	buffer_free(dev, &(priv->rxbuffer), priv->rxbuffersize, 0);
 }
 
-short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
+static short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
 {
 	int i;
 	u32 *desc;
@@ -941,7 +941,7 @@  short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
 }
 
 
-void set_nic_rxring(struct net_device *dev)
+static void set_nic_rxring(struct net_device *dev)
 {
 	u8 pgreg;
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
@@ -1028,8 +1028,8 @@  inline u8 rtl8180_IsWirelessBMode(u16 rate)
 
 u16 N_DBPSOfRate(u16 DataRate);
 
-u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
-		  u8 bShortPreamble)
+static u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
+			 u8 bShortPreamble)
 {
 	u16	FrameTime;
 	u16	N_DBPS;
@@ -1093,7 +1093,7 @@  u16 N_DBPSOfRate(u16 DataRate)
 /*
  * For Netgear case, they want good-looking signal strength.
  */
-long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
+static long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
 {
 	long RetSS;
 
@@ -1129,7 +1129,7 @@  long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
 /*
  * Translate 0-100 signal strength index into dBm.
  */
-long TranslateToDbm8185(u8 SignalStrengthIndex)
+static long TranslateToDbm8185(u8 SignalStrengthIndex)
 {
 	long SignalPower;
 
@@ -1146,8 +1146,8 @@  long TranslateToDbm8185(u8 SignalStrengthIndex)
  * No dramatic adjustion is apply because dynamic mechanism need some degree
  * of correctness. Ported from 8187B.
  */
-void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
-					   bool bCckRate)
+static void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
+						  bool bCckRate)
 {
 	/* Determin the current packet is CCK rate. */
 	priv->bCurCCKPkt = bCckRate;
@@ -1171,7 +1171,7 @@  void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
 /*
  * This is rough RX isr handling routine
  */
-void rtl8180_rx(struct net_device *dev)
+static void rtl8180_rx(struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	struct sk_buff *tmp_skb;
@@ -1497,7 +1497,7 @@  drop: /* this is used when we have not enough mem */
 }
 
 
-void rtl8180_dma_kick(struct net_device *dev, int priority)
+static void rtl8180_dma_kick(struct net_device *dev, int priority)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 
@@ -1509,7 +1509,7 @@  void rtl8180_dma_kick(struct net_device *dev, int priority)
 	force_pci_posting(dev);
 }
 
-void rtl8180_data_hard_stop(struct net_device *dev)
+static void rtl8180_data_hard_stop(struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 
@@ -1519,7 +1519,7 @@  void rtl8180_data_hard_stop(struct net_device *dev)
 	rtl8180_set_mode(dev, EPROM_CMD_NORMAL);
 }
 
-void rtl8180_data_hard_resume(struct net_device *dev)
+static void rtl8180_data_hard_resume(struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 
@@ -1533,8 +1533,8 @@  void rtl8180_data_hard_resume(struct net_device *dev)
  * This function TX data frames when the ieee80211 stack requires this.
  * It checks also if we need to stop the ieee tx queue, eventually do it
  */
-void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
-			    int rate)
+static void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
+				   int rate)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	int mode;
@@ -1586,7 +1586,7 @@  void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
  * might use a different lock than tx_lock (for example mgmt_tx_lock)
  */
 /* these function may loop if invoked with 0 descriptors or 0 len buffer */
-int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	unsigned long flags;
@@ -1614,7 +1614,7 @@  int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 }
 
 /* longpre 144+48 shortpre 72+24 */
-u16 rtl8180_len2duration(u32 len, short rate, short *ext)
+static u16 rtl8180_len2duration(u32 len, short rate, short *ext)
 {
 	u16 duration;
 	u16 drift;
@@ -1662,7 +1662,7 @@  u16 rtl8180_len2duration(u32 len, short rate, short *ext)
 	return duration;
 }
 
-void rtl8180_prepare_beacon(struct net_device *dev)
+static void rtl8180_prepare_beacon(struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	struct sk_buff *skb;
@@ -1955,7 +1955,7 @@  short rtl8180_tx(struct net_device *dev, u8 *txbuf, int len, int priority,
 
 void rtl8180_irq_rx_tasklet(struct r8180_priv *priv);
 
-void rtl8180_link_change(struct net_device *dev)
+static void rtl8180_link_change(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	u16 beacon_interval;
@@ -1978,7 +1978,7 @@  void rtl8180_link_change(struct net_device *dev)
 	rtl8180_set_chan(dev, priv->chan);
 }
 
-void rtl8180_rq_tx_ack(struct net_device *dev)
+static void rtl8180_rq_tx_ack(struct net_device *dev)
 {
 
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -1987,7 +1987,7 @@  void rtl8180_rq_tx_ack(struct net_device *dev)
 	priv->ack_tx_to_ieee = 1;
 }
 
-short rtl8180_is_tx_queue_empty(struct net_device *dev)
+static short rtl8180_is_tx_queue_empty(struct net_device *dev)
 {
 
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -2025,7 +2025,7 @@  short rtl8180_is_tx_queue_empty(struct net_device *dev)
 	return 1;
 }
 
-void rtl8180_hw_wakeup(struct net_device *dev)
+static void rtl8180_hw_wakeup(struct net_device *dev)
 {
 	unsigned long flags;
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -2037,7 +2037,7 @@  void rtl8180_hw_wakeup(struct net_device *dev)
 	spin_unlock_irqrestore(&priv->ps_lock, flags);
 }
 
-void rtl8180_hw_sleep_down(struct net_device *dev)
+static void rtl8180_hw_sleep_down(struct net_device *dev)
 {
 	unsigned long flags;
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -2048,7 +2048,7 @@  void rtl8180_hw_sleep_down(struct net_device *dev)
 	spin_unlock_irqrestore(&priv->ps_lock, flags);
 }
 
-void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
+static void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	u32 rb = jiffies;
@@ -2095,7 +2095,7 @@  void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
 	spin_unlock_irqrestore(&priv->ps_lock, flags);
 }
 
-void rtl8180_wmm_param_update(struct work_struct *work)
+static void rtl8180_wmm_param_update(struct work_struct *work)
 {
 	struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, wmm_param_update_wq);
 	struct net_device *dev = ieee->dev;
@@ -2192,12 +2192,12 @@  void rtl8180_wmm_param_update(struct work_struct *work)
 void rtl8180_restart_wq(struct work_struct *work);
 /* void rtl8180_rq_tx_ack(struct work_struct *work); */
 void rtl8180_watch_dog_wq(struct work_struct *work);
-void rtl8180_hw_wakeup_wq(struct work_struct *work);
-void rtl8180_hw_sleep_wq(struct work_struct *work);
+static void rtl8180_hw_wakeup_wq(struct work_struct *work);
+static void rtl8180_hw_sleep_wq(struct work_struct *work);
 void rtl8180_sw_antenna_wq(struct work_struct *work);
 void rtl8180_watch_dog(struct net_device *dev);
 
-void watch_dog_adaptive(unsigned long data)
+static void watch_dog_adaptive(unsigned long data)
 {
 	struct r8180_priv *priv = ieee80211_priv((struct net_device *)data);
 
@@ -2342,7 +2342,7 @@  static void rtl8187se_eeprom_register_write(struct eeprom_93cx6 *eeprom)
 	udelay(10);
 }
 
-short rtl8180_init(struct net_device *dev)
+static short rtl8180_init(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	u16 word;
@@ -2760,7 +2760,7 @@  void rtl8185_tx_antenna(struct net_device *dev, u8 ant)
 	mdelay(1);
 }
 
-void rtl8185_write_phy(struct net_device *dev, u8 adr, u32 data)
+static void rtl8185_write_phy(struct net_device *dev, u8 adr, u32 data)
 {
 	u32 phyw;
 
@@ -2832,8 +2832,8 @@  static struct net_device_stats *rtl8180_stats(struct net_device *dev)
 /*
  * Change current and default preamble mode.
  */
-bool MgntActSet_802_11_PowerSaveMode(struct r8180_priv *priv,
-				     RT_PS_MODE rtPsMode)
+static bool MgntActSet_802_11_PowerSaveMode(struct r8180_priv *priv,
+					    RT_PS_MODE rtPsMode)
 {
 	/* Currently, we do not change power save mode on IBSS mode. */
 	if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
@@ -2844,7 +2844,7 @@  bool MgntActSet_802_11_PowerSaveMode(struct r8180_priv *priv,
 	return true;
 }
 
-void LeisurePSEnter(struct r8180_priv *priv)
+static void LeisurePSEnter(struct r8180_priv *priv)
 {
 	if (priv->bLeisurePs) {
 		if (priv->ieee80211->ps == IEEE80211_PS_DISABLED)
@@ -2853,7 +2853,7 @@  void LeisurePSEnter(struct r8180_priv *priv)
 	}
 }
 
-void LeisurePSLeave(struct r8180_priv *priv)
+static void LeisurePSLeave(struct r8180_priv *priv)
 {
 	if (priv->bLeisurePs) {
 		if (priv->ieee80211->ps != IEEE80211_PS_DISABLED)
@@ -2861,7 +2861,7 @@  void LeisurePSLeave(struct r8180_priv *priv)
 	}
 }
 
-void rtl8180_hw_wakeup_wq(struct work_struct *work)
+static void rtl8180_hw_wakeup_wq(struct work_struct *work)
 {
 	struct delayed_work *dwork = to_delayed_work(work);
 	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, hw_wakeup_wq);
@@ -2870,7 +2870,7 @@  void rtl8180_hw_wakeup_wq(struct work_struct *work)
 	rtl8180_hw_wakeup(dev);
 }
 
-void rtl8180_hw_sleep_wq(struct work_struct *work)
+static void rtl8180_hw_sleep_wq(struct work_struct *work)
 {
 	struct delayed_work *dwork = to_delayed_work(work);
 	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, hw_sleep_wq);
@@ -2969,7 +2969,7 @@  void rtl8180_watch_dog(struct net_device *dev)
 	priv->ieee80211->NumRxBcnInPeriod = 0;
 }
 
-int _rtl8180_up(struct net_device *dev)
+static int _rtl8180_up(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -2991,7 +2991,7 @@  int _rtl8180_up(struct net_device *dev)
 	return 0;
 }
 
-int rtl8180_open(struct net_device *dev)
+static int rtl8180_open(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int ret;
@@ -3012,7 +3012,7 @@  int rtl8180_up(struct net_device *dev)
 	return _rtl8180_up(dev);
 }
 
-int rtl8180_close(struct net_device *dev)
+static int rtl8180_close(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int ret;
@@ -3065,7 +3065,7 @@  void rtl8180_restart_wq(struct work_struct *work)
 	up(&priv->wx_sem);
 }
 
-void rtl8180_restart(struct net_device *dev)
+static void rtl8180_restart(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -3106,7 +3106,7 @@  static void r8180_set_multicast(struct net_device *dev)
 	priv->promisc = promisc;
 }
 
-int r8180_set_mac_adr(struct net_device *dev, void *mac)
+static int r8180_set_mac_adr(struct net_device *dev, void *mac)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	struct sockaddr *addr = mac;
@@ -3129,7 +3129,7 @@  int r8180_set_mac_adr(struct net_device *dev, void *mac)
 }
 
 /* based on ipw2200 driver */
-int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+static int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	struct iwreq *wrq = (struct iwreq *) rq;
@@ -3369,7 +3369,7 @@  static void __exit rtl8180_pci_module_exit(void)
 	DMESG("Exiting");
 }
 
-void rtl8180_try_wake_queue(struct net_device *dev, int pri)
+static void rtl8180_try_wake_queue(struct net_device *dev, int pri)
 {
 	unsigned long flags;
 	short enough_desc;
@@ -3383,7 +3383,7 @@  void rtl8180_try_wake_queue(struct net_device *dev, int pri)
 		ieee80211_rtl_wake_queue(priv->ieee80211);
 }
 
-void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
+static void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	u32 *tail; /* tail virtual addr */
@@ -3537,7 +3537,7 @@  void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
 	spin_unlock_irqrestore(&priv->tx_lock, flag);
 }
 
-irqreturn_t rtl8180_interrupt(int irq, void *netdev)
+static irqreturn_t rtl8180_interrupt(int irq, void *netdev)
 {
 	struct net_device *dev = (struct net_device *) netdev;
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
diff --git a/drivers/staging/rtl8187se/r8180_dm.c b/drivers/staging/rtl8187se/r8180_dm.c
index b8f2ba0..dad59d0 100644
--- a/drivers/staging/rtl8187se/r8180_dm.c
+++ b/drivers/staging/rtl8187se/r8180_dm.c
@@ -30,7 +30,7 @@  bool CheckHighPower(struct net_device *dev)
  *		and they are related to OFDM and MAC registers.
  *		So, we don't want to update it so frequently in per-Rx packet base.
  */
-void DoTxHighPower(struct net_device *dev)
+static void DoTxHighPower(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	u16			HiPwrUpperTh = 0;
@@ -125,7 +125,7 @@  bool CheckDig(struct net_device *dev)
 /*
  *	Implementation of DIG for Zebra and Zebra2.
  */
-void DIG_Zebra(struct net_device *dev)
+static void DIG_Zebra(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	u16			CCKFalseAlarm, OFDMFalseAlarm;
@@ -202,7 +202,7 @@  void DIG_Zebra(struct net_device *dev)
 /*
  *	Dispatch DIG implementation according to RF.
  */
-void DynamicInitGain(struct net_device *dev)
+static void DynamicInitGain(struct net_device *dev)
 {
 	DIG_Zebra(dev);
 }
@@ -223,7 +223,7 @@  void rtl8180_hw_dig_wq(struct work_struct *work)
 
 }
 
-int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
+static int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
 {
 	u8 rate_len;
 	u8 rate_ex_len;
@@ -255,7 +255,7 @@  int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
  *	Get the Tx rate one degree up form the input rate in the supported rates.
  *	Return the upgrade rate if it is successed, otherwise return the input rate.
  */
-u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
+static u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	u8                      UpRate;
@@ -315,7 +315,7 @@  u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
  *	Return the degrade rate if it is successed, otherwise return the input rate.
  */
 
-u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
+static u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	u8                      DownRate;
@@ -375,7 +375,7 @@  u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
  *      CCK rate.
  */
 
-bool MgntIsCckRate(u16 rate)
+static bool MgntIsCckRate(u16 rate)
 {
 	bool bReturn = false;
 
@@ -435,7 +435,7 @@  void TxPwrTracking87SE(struct net_device *dev)
 	}
 	priv->ThermalMeter = CurrentThermal;
 }
-void StaRateAdaptive87SE(struct net_device *dev)
+static void StaRateAdaptive87SE(struct net_device *dev)
 {
 	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	unsigned long	CurrTxokCnt;
diff --git a/drivers/staging/rtl8187se/r8180_rtl8225z2.c b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
index 9ae96b7..6c4b9f6 100644
--- a/drivers/staging/rtl8187se/r8180_rtl8225z2.c
+++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
@@ -136,7 +136,7 @@  static const u16 rtl8225z2_rxgain[] = {
 
 };
 
-void rtl8225z2_set_gain(struct net_device *dev, short gain)
+static void rtl8225z2_set_gain(struct net_device *dev, short gain)
 {
 	const u8 *rtl8225_gain;
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -279,8 +279,8 @@  void rtl8225z2_rf_close(struct net_device *dev)
  * Map dBm into Tx power index according to current HW model, for example,
  * RF and PA, and current wireless mode.
  */
-s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
-		 s32 PowerInDbm)
+static s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
+			s32 PowerInDbm)
 {
 	bool bUseDefault = true;
 	s8 TxPwrIdx = 0;
@@ -606,7 +606,7 @@  void rtl8225z2_rf_init(struct net_device *dev)
 	rtl8225z2_rf_set_chan(dev, priv->chan);
 }
 
-void rtl8225z2_rf_set_mode(struct net_device *dev)
+static void rtl8225z2_rf_set_mode(struct net_device *dev)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
diff --git a/drivers/staging/rtl8187se/r8180_wx.c b/drivers/staging/rtl8187se/r8180_wx.c
index f35a0c8..bb54d26 100644
--- a/drivers/staging/rtl8187se/r8180_wx.c
+++ b/drivers/staging/rtl8187se/r8180_wx.c
@@ -24,7 +24,7 @@ 
 #include <net/iw_handler.h>
 #include "ieee80211/dot11d.h"
 
-u32 rtl8180_rates[] = {1000000, 2000000, 5500000, 11000000,
+static u32 rtl8180_rates[] = {1000000, 2000000, 5500000, 11000000,
 	6000000, 9000000, 12000000, 18000000, 24000000, 36000000, 48000000, 54000000};
 
 #define RATE_COUNT ARRAY_SIZE(rtl8180_rates)
@@ -51,8 +51,9 @@  static int r8180_wx_get_freq(struct net_device *dev,
 }
 
 
-int r8180_wx_set_key(struct net_device *dev, struct iw_request_info *info,
-		     union iwreq_data *wrqu, char *key)
+static int r8180_wx_set_key(struct net_device *dev,
+			    struct iw_request_info *info,
+			    union iwreq_data *wrqu, char *key)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	struct iw_point *erq = &(wrqu->encoding);
@@ -1382,7 +1383,7 @@  static struct iw_statistics *r8180_get_wireless_stats(struct net_device *dev)
 	return wstats;
 }
 
-struct iw_handler_def  r8180_wx_handlers_def = {
+static struct iw_handler_def  r8180_wx_handlers_def = {
 	.standard = r8180_wx_handlers,
 	.num_standard = ARRAY_SIZE(r8180_wx_handlers),
 	.private = r8180_private_handler,