[OPW,kernel] staging: rtl8187se: fix coding style in function declarations
diff mbox

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

Commit Message

Ana Rey Nov. 7, 2013, 4:26 p.m. UTC
From: Ana Rey Botello <anarey@gmail.com>

Removed innecessary spaces and indentation errors in function definition
(including some curly braces wronly placed).

Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org>
Signed-off-by: Ana Rey <anarey@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/dot11d.c       |  36 ++------
 .../staging/rtl8187se/ieee80211/ieee80211_crypt.c  |   3 +-
 .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |   2 +-
 .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |   9 +-
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |  39 ++++----
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |  94 ++++++++++---------
 .../rtl8187se/ieee80211/ieee80211_softmac_wx.c     |  64 +++++++------
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |  16 ++--
 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c |   8 +-
 drivers/staging/rtl8187se/r8180_core.c             |  24 ++---
 drivers/staging/rtl8187se/r8180_wx.c               | 102 +++++++++++----------
 drivers/staging/rtl8187se/r8185b_init.c            |  13 ++-
 12 files changed, 203 insertions(+), 207 deletions(-)

Comments

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

Thanks for sending this patch!  I have a couple comments on it, and I
hope you'll send a second revision to address them.

First, did you run your patch through checkpatch.pl after you committed
it (either manually, or by adding checkpatch.pl your
.git/hooks/pre-commit as described in the first patch tutorial)?

I ask because your patch adds a lot of checkpatch warnings, and those
need to be fixed before we can accept it.  I'm actually a bit surprised
that Pablo acked the patch without running it through checkpatch.pl.

Please fix the checkpatch.pl errors your patch introduces, and resend
this with a v2 subject.

On Thu, Nov 07, 2013 at 05:26:49PM +0100, Ana Rey wrote:
> From: Ana Rey Botello <anarey@gmail.com>
> 
> Removed innecessary spaces and indentation errors in function definition
> (including some curly braces wronly placed).

You also broke up over 80-char lines as well, and that should probably
be mentioned in the commit message.

> Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org>
> Signed-off-by: Ana Rey <anarey@gmail.com>

Generally, your Signed-off-by line should be the first line in the
patch, with other Signed-off-by lines and Acked-by lines second.  Please
fix that in your next patch revision.

Sarah Sharp

> ---
>  drivers/staging/rtl8187se/ieee80211/dot11d.c       |  36 ++------
>  .../staging/rtl8187se/ieee80211/ieee80211_crypt.c  |   3 +-
>  .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |   2 +-
>  .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |   9 +-
>  drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |  39 ++++----
>  .../rtl8187se/ieee80211/ieee80211_softmac.c        |  94 ++++++++++---------
>  .../rtl8187se/ieee80211/ieee80211_softmac_wx.c     |  64 +++++++------
>  drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |  16 ++--
>  drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c |   8 +-
>  drivers/staging/rtl8187se/r8180_core.c             |  24 ++---
>  drivers/staging/rtl8187se/r8180_wx.c               | 102 +++++++++++----------
>  drivers/staging/rtl8187se/r8185b_init.c            |  13 ++-
>  12 files changed, 203 insertions(+), 207 deletions(-)
> 
> diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
> index 9d2d5c5..eac3f43 100644
> --- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
> +++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
> @@ -9,8 +9,7 @@
>  
>  #include "dot11d.h"
>  
> -void
> -Dot11d_Init(struct ieee80211_device *ieee)
> +void Dot11d_Init(struct ieee80211_device *ieee)
>  {
>  	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
>  
> @@ -29,8 +28,7 @@ Dot11d_Init(struct ieee80211_device *ieee)
>  //	Description:
>  //		Reset to the state as we are just entering a regulatory domain.
>  //
> -void
> -Dot11d_Reset(struct ieee80211_device *ieee)
> +void Dot11d_Reset(struct ieee80211_device *ieee)
>  {
>  	u32 i;
>  	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
> @@ -64,13 +62,8 @@ Dot11d_Reset(struct ieee80211_device *ieee)
>  //		1. IS_DOT11D_ENABLE() is TRUE.
>  //		2. Input IE is an valid one.
>  //
> -void
> -Dot11d_UpdateCountryIe(
> -	struct ieee80211_device *dev,
> -	u8 *pTaddr,
> -	u16	CoutryIeLen,
> -	u8 *pCoutryIe
> -	)
> +void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
> +			    u16 CoutryIeLen, u8 *pCoutryIe)
>  {
>  	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
>  	u8 i, j, NumTriples, MaxChnlNum;
> @@ -125,11 +118,7 @@ Dot11d_UpdateCountryIe(
>  	pDot11dInfo->State = DOT11D_STATE_LEARNED;
>  }
>  
> -u8
> -DOT11D_GetMaxTxPwrInDbm(
> -	struct ieee80211_device *dev,
> -	u8 Channel
> -	)
> +u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel)
>  {
>  	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
>  	u8 MaxTxPwrInDbm = 255;
> @@ -146,10 +135,7 @@ DOT11D_GetMaxTxPwrInDbm(
>  }
>  
>  
> -void
> -DOT11D_ScanComplete(
> -	struct ieee80211_device *dev
> -	)
> +void DOT11D_ScanComplete(struct ieee80211_device *dev)
>  {
>  	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
>  
> @@ -169,10 +155,7 @@ DOT11D_ScanComplete(
>  	}
>  }
>  
> -int IsLegalChannel(
> -	struct ieee80211_device *dev,
> -	u8 channel
> -)
> +int IsLegalChannel(struct ieee80211_device *dev, u8 channel)
>  {
>  	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
>  
> @@ -185,10 +168,7 @@ int IsLegalChannel(
>  	return 0;
>  }
>  
> -int ToLegalChannel(
> -	struct ieee80211_device *dev,
> -	u8 channel
> -)
> +int ToLegalChannel(struct ieee80211_device *dev, u8 channel)
>  {
>  	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
>  	u8 default_chn = 0;
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
> index 694eae3..a0340ee 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
> @@ -39,8 +39,7 @@ struct ieee80211_crypto {
>  
>  static struct ieee80211_crypto *hcrypt;
>  
> -void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee,
> -					   int force)
> +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force)
>  {
>  	struct list_head *ptr, *n;
>  	struct ieee80211_crypt_data *entry;
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
> index f5949e8..2fc1bb9 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
> @@ -61,7 +61,7 @@ struct ieee80211_ccmp_data {
>  };
>  
>  void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,
> -			     const u8 pt[16], u8 ct[16])
> +			        const u8 pt[16], u8 ct[16])
>  {
>  	crypto_cipher_encrypt_one((void *)tfm, ct, pt);
>  }
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
> index da24e43..2fc797b 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
> @@ -521,7 +521,8 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 *hdr)
>  }
>  
>  
> -static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, void *priv)
> +static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len,
> +				     void *priv)
>  {
>  	struct ieee80211_tkip_data *tkey = priv;
>  	u8 *pos;
> @@ -554,8 +555,8 @@ static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, void *pri
>  }
>  
>  static void ieee80211_michael_mic_failure(struct net_device *dev,
> -				       struct ieee80211_hdr_4addr *hdr,
> -				       int keyidx)
> +				          struct ieee80211_hdr_4addr *hdr,
> +				          int keyidx)

ERROR: code indent should use tabs where possible
#137: FILE: drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:558:
+^I^I^I^I          struct ieee80211_hdr_4addr *hdr,$

Again, you mixed tabs and spaces here.  Only use tabs.

>  {
>  	union iwreq_data wrqu;
>  	struct iw_michaelmicfailure ev;
> @@ -575,7 +576,7 @@ static void ieee80211_michael_mic_failure(struct net_device *dev,
>  }
>  
>  static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
> -				     int hdr_len, void *priv)
> +				        int hdr_len, void *priv)
>  {
>  	struct ieee80211_tkip_data *tkey = priv;
>  	u8 mic[8];
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> index 10b2210..43971cd 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> @@ -337,8 +337,9 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb,
>  
>  /* Called only as a tasklet (software IRQ), by ieee80211_rx */
>  static inline int
> -ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, struct sk_buff *skb,
> -			     int keyidx, struct ieee80211_crypt_data *crypt)
> +ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee,
> +				struct sk_buff *skb, int keyidx,
> +				struct ieee80211_crypt_data *crypt)
>  {
>  	struct ieee80211_hdr_4addr *hdr;
>  	int res, hdrlen;
> @@ -366,7 +367,7 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, struct sk_buff *s
>  /* this function is stolen from ipw2200 driver*/
>  #define IEEE_PACKET_RETRY_TIME (5*HZ)
>  static int is_duplicate_packet(struct ieee80211_device *ieee,
> -				      struct ieee80211_hdr_4addr *header)
> +			       struct ieee80211_hdr_4addr *header)
>  {
>  	u16 fc = le16_to_cpu(header->frame_ctl);
>  	u16 sc = le16_to_cpu(header->seq_ctl);
> @@ -467,7 +468,7 @@ drop:
>   * IEEE 802.11 format, i.e., in the format it was sent over air.
>   * This function is called only as a tasklet (software IRQ). */
>  int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
> -		 struct ieee80211_rx_stats *rx_stats)
> +		     struct ieee80211_rx_stats *rx_stats)
>  {
>  	struct net_device *dev = ieee->dev;
>  	//struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
> @@ -794,9 +795,7 @@ static inline int ieee80211_is_ofdm_rate(u8 rate)
>  	return 0;
>  }
>  
> -static inline int ieee80211_SignalStrengthTranslate(
> -	int  CurrSS
> -	)
> +static inline int ieee80211_SignalStrengthTranslate(int CurrSS)
>  {
>  	int RetSS;
>  
> @@ -831,12 +830,10 @@ static inline int ieee80211_SignalStrengthTranslate(
>  	return RetSS;
>  }
>  
> -static inline void ieee80211_extract_country_ie(
> -	struct ieee80211_device *ieee,
> -	struct ieee80211_info_element *info_element,
> -	struct ieee80211_network *network,
> -	u8 *addr2
> -)
> +static inline void
> +ieee80211_extract_country_ie(struct ieee80211_device *ieee,
> +			     struct ieee80211_info_element *info_element,
> +			     struct ieee80211_network *network, u8 *addr2)
>  {
>  	if (IS_DOT11D_ENABLE(ieee)) {
>  		if (info_element->len != 0) {
> @@ -858,10 +855,8 @@ static inline void ieee80211_extract_country_ie(
>  
>  }
>  
> -int
> -ieee80211_TranslateToDbm(
> -	unsigned char SignalStrengthIndex	// 0-100 index.
> -	)
> +/* SignalStrengthIndex is 0-100 */
> +int ieee80211_TranslateToDbm(unsigned char SignalStrengthIndex)
>  {
>  	unsigned char SignalPower; // in dBm.
>  
> @@ -1197,7 +1192,7 @@ static inline int is_same_network(struct ieee80211_network *src,
>  }
>  
>  inline void update_network(struct ieee80211_network *dst,
> -				  struct ieee80211_network *src)
> +			   struct ieee80211_network *src)
>  {
>  	unsigned char quality = src->stats.signalstrength;
>  	unsigned char signal = 0;
> @@ -1281,10 +1276,10 @@ inline void update_network(struct ieee80211_network *dst,
>  }
>  
>  
> -inline void ieee80211_process_probe_response(
> -	struct ieee80211_device *ieee,
> -	struct ieee80211_probe_response *beacon,
> -	struct ieee80211_rx_stats *stats)
> +inline void
> +ieee80211_process_probe_response(struct ieee80211_device *ieee,
> +				 struct ieee80211_probe_response *beacon,
> +				 struct ieee80211_rx_stats *stats)
>  {
>  	struct ieee80211_network network;
>  	struct ieee80211_network *target;
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> index b65db54..6eefc27 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> @@ -106,7 +106,8 @@ void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
>  }
>  
>  
> -void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p) {
> +void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
> +{
>  	u8 *tag = *tag_p;
>  
>  	*tag++ = MFIE_TYPE_GENERIC; //0
> @@ -129,7 +130,8 @@ 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) {
> +void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p)
> +{
>  	u8 *tag = *tag_p;
>  
>          *tag++ = MFIE_TYPE_GENERIC; //0
> @@ -187,7 +189,8 @@ void init_mgmt_queue(struct ieee80211_device *ieee)
>  
>  void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl);
>  
> -inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee)
> +inline void softmac_mgmt_xmit(struct sk_buff *skb,
> +			      struct ieee80211_device *ieee)
>  {
>  	unsigned long flags;
>  	short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE;
> @@ -238,7 +241,8 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
>  }
>  
>  
> -inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee)
> +inline void softmac_ps_mgmt_xmit(struct sk_buff *skb,
> +				 struct ieee80211_device *ieee)
>  {
>  
>  	short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE;
> @@ -276,10 +280,9 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i
>  //	dev_kfree_skb_any(skb);//edit by thomas
>  }
>  //by amy for power save
> -inline struct sk_buff *ieee80211_disassociate_skb(
> -							struct ieee80211_network *beacon,
> -							struct ieee80211_device *ieee,
> -							u8	asRsn)
> +inline struct sk_buff *
> +ieee80211_disassociate_skb(struct ieee80211_network *beacon,
> +			   struct ieee80211_device *ieee, u8 asRsn)
>  {
>  	struct sk_buff *skb;
>  	struct ieee80211_disassoc_frame *disass;
> @@ -299,12 +302,7 @@ inline struct sk_buff *ieee80211_disassociate_skb(
>  	disass->reasoncode = asRsn;
>  	return skb;
>  }
> -void
> -SendDisassociation(
> -        struct ieee80211_device *ieee,
> -        u8*                     asSta,
> -        u8                      asRsn
> -)
> +void SendDisassociation(struct ieee80211_device *ieee, u8* asSta, u8 asRsn)
>  {
>          struct ieee80211_network *beacon = &ieee->current_network;
>          struct sk_buff *skb;
> @@ -735,8 +733,9 @@ void ieee80211_start_scan_syncro(struct ieee80211_device *ieee)
>  
>  }
>  
> -inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *beacon,
> -	struct ieee80211_device *ieee, int challengelen)
> +inline struct sk_buff *
> +ieee80211_authentication_req(struct ieee80211_network *beacon,
> +			     struct ieee80211_device *ieee, int challengelen)
>  {
>  	struct sk_buff *skb;
>  	struct ieee80211_authentication *auth;
> @@ -768,7 +767,8 @@ inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *be
>  
>  }
>  
> -static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *dest)
> +static struct sk_buffi *ieee80211_probe_resp(struct ieee80211_device *ieee,
> +					     u8 *dest)
>  {
>  	u8 *tag;
>  	int beacon_size;
> @@ -940,7 +940,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)
> +struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee, int status,
> +				    u8 *dest)
>  {
>  	struct sk_buff *skb;
>  	struct ieee80211_authentication *auth;
> @@ -967,7 +968,7 @@ struct sk_buff* ieee80211_auth_resp(struct ieee80211_device *ieee,int status, u8
>  
>  }
>  
> -struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee,short pwr)
> +struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee, short pwr)
>  {
>  	struct sk_buff *skb;
>  	struct ieee80211_hdr_3addr* hdr;
> @@ -1027,7 +1028,9 @@ void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
>  }
>  
>  
> -inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beacon,struct ieee80211_device *ieee)
> +inline struct sk_buff *
> +ieee80211_association_req(struct ieee80211_network *beacon,
> +			  struct ieee80211_device *ieee)
>  {
>  	struct sk_buff *skb;
>  	//unsigned long flags;
> @@ -1198,7 +1201,8 @@ void ieee80211_associate_step1(struct ieee80211_device *ieee)
>  	}
>  }
>  
> -void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge, int chlen)
> +void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge,
> +				  int chlen)
>  {
>  	u8 *c;
>  	struct sk_buff *skb;
> @@ -1308,7 +1312,8 @@ void ieee80211_associate_procedure_wq(struct work_struct *work)
>  	up(&ieee->wx_sem);
>  }
>  
> -inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net)
> +inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee,
> +				      struct ieee80211_network *net)
>  {
>  	u8 tmp_ssid[IW_ESSID_MAX_SIZE+1];
>  	int tmp_ssid_len = 0;
> @@ -1447,7 +1452,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)
>  }
>  
>  
> -int auth_rq_parse(struct sk_buff *skb,u8* dest)
> +int auth_rq_parse(struct sk_buff *skb, u8* dest)
>  {
>  	struct ieee80211_authentication *a;
>  
> @@ -1465,7 +1470,8 @@ int auth_rq_parse(struct sk_buff *skb,u8* dest)
>  	return WLAN_STATUS_SUCCESS;
>  }
>  
> -static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb, u8 *src)
> +static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
> +			    u8 *src)
>  {
>  	u8 *tag;
>  	u8 *skbend;
> @@ -1503,7 +1509,7 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
>  
>  }
>  
> -int assoc_rq_parse(struct sk_buff *skb,u8* dest)
> +int assoc_rq_parse(struct sk_buff *skb, u8* dest)
>  {
>  	struct ieee80211_assoc_request_frame *a;
>  
> @@ -1534,8 +1540,8 @@ static inline u16 assoc_parse(struct sk_buff *skb, int *aid)
>  	return le16_to_cpu(a->status);
>  }
>  
> -static inline void
> -ieee80211_rx_probe_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
> +static inline void ieee80211_rx_probe_rq(struct ieee80211_device *ieee,
> +					 struct sk_buff *skb)
>  {
>  	u8 dest[ETH_ALEN];
>  
> @@ -1549,8 +1555,8 @@ ieee80211_rx_probe_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
>  	}
>  }
>  
> -inline void
> -ieee80211_rx_auth_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
> +inline void ieee80211_rx_auth_rq(struct ieee80211_device *ieee,
> +				 struct sk_buff *skb)
>  {
>  	u8 dest[ETH_ALEN];
>  	int status;
> @@ -1593,7 +1599,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)
> +short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
> +			     u32 *time_l)
>  {
>          int timeout = 0;
>  
> @@ -1768,10 +1775,10 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
>  	spin_unlock_irqrestore(&ieee->lock, flags);
>  }
>  
> -inline int
> -ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
> -			struct ieee80211_rx_stats *rx_stats, u16 type,
> -			u16 stype)
> +inline int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee,
> +				      struct sk_buff *skb,
> +				      struct ieee80211_rx_stats *rx_stats,
> +				      u16 type,	u16 stype)
>  {
>  	struct ieee80211_hdr_3addr *header = (struct ieee80211_hdr_3addr *) skb->data;
>  	u16 errcode;
> @@ -1974,7 +1981,8 @@ associate_complete:
>   * to the driver later, when it wakes the queue.
>   */
>  
> -void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee)
> +void ieee80211_softmac_xmit(struct ieee80211_txb *txb,
> +			    struct ieee80211_device *ieee)
>  {
>  
>  
> @@ -2617,7 +2625,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)
> +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);
> @@ -2626,7 +2635,8 @@ void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee, char *wpa_ie, int
>  }
>  
>  
> -static int ieee80211_wpa_mlme(struct ieee80211_device *ieee, int command, int reason)
> +static int ieee80211_wpa_mlme(struct ieee80211_device *ieee,
> +			      int command, int reason)
>  {
>  
>  	int ret = 0;
> @@ -2650,7 +2660,7 @@ static int ieee80211_wpa_mlme(struct ieee80211_device *ieee, int command, int re
>  
>  
>  static int ieee80211_wpa_set_wpa_ie(struct ieee80211_device *ieee,
> -			      struct ieee_param *param, int plen)
> +				    struct ieee_param *param, int plen)
>  {
>  	u8 *buf;
>  
> @@ -2704,7 +2714,8 @@ static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value)
>  	return ret;
>  }
>  
> -static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 value)
> +static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name,
> +				   u32 value)
>  {
>  	int ret=0;
>  	unsigned long flags;
> @@ -2782,7 +2793,7 @@ static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 v
>  /* implementation borrowed from hostap driver */
>  
>  static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
> -				  struct ieee_param *param, int param_len)
> +					struct ieee_param *param, int param_len)
>  {
>  	int ret = 0;
>  
> @@ -2929,7 +2940,8 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
>  	return ret;
>  }
>  
> -int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p)
> +int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee,
> +				   struct iw_point *p)
>  {
>  	struct ieee_param *param;
>  	int ret=0;
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
> index e528206..46f3564 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
> @@ -28,8 +28,9 @@ const long ieee80211_wlan_frequencies[] = {
>  };
>  
>  
> -int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
> -			     union iwreq_data *wrqu, char *b)
> +int ieee80211_wx_set_freq(struct ieee80211_device *ieee,
> +			  struct iw_request_info *a, union iwreq_data *wrqu,
> +			  char *b)
>  {
>  	int ret;
>  	struct iw_freq *fwrq = &wrqu->freq;
> @@ -82,8 +83,8 @@ out:
>  
>  
>  int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
> -			     struct iw_request_info *a,
> -			     union iwreq_data *wrqu, char *b)
> +			  struct iw_request_info *a, union iwreq_data *wrqu,
> +			  char *b)
>  {
>  	struct iw_freq *fwrq = &wrqu->freq;
>  
> @@ -97,8 +98,8 @@ int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
>  }
>  
>  int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
> -			    struct iw_request_info *info,
> -			    union iwreq_data *wrqu, char *extra)
> +			 struct iw_request_info *info, union iwreq_data *wrqu,
> +			 char *extra)
>  {
>  	unsigned long flags;
>  
> @@ -126,8 +127,7 @@ int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
>  
>  
>  int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
> -			 struct iw_request_info *info,
> -			 union iwreq_data *awrq,
> +			 struct iw_request_info *info, union iwreq_data *awrq,
>  			 char *extra)
>  {
>  
> @@ -174,8 +174,9 @@ out:
>  	return ret;
>  }
>  
> -int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,
> -			    union iwreq_data *wrqu, char *b)
> +int ieee80211_wx_get_essid(struct ieee80211_device *ieee,
> +			   struct iw_request_info *a, union iwreq_data *wrqu,
> +			   char *b)
>  {
>  	int len, ret = 0;
>  	unsigned long flags;
> @@ -211,8 +212,8 @@ out:
>  }
>  
>  int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			  struct iw_request_info *info, union iwreq_data *wrqu,
> +			  char *extra)
>  {
>  
>  	u32 target_rate = wrqu->bitrate.value;
> @@ -230,8 +231,8 @@ int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
>  
>  
>  int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			  struct iw_request_info *info, union iwreq_data *wrqu,
> +			  char *extra)
>  {
>  
>  	wrqu->bitrate.value = ieee->rate * 100000;
> @@ -239,8 +240,9 @@ int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
>  	return 0;
>  }
>  
> -int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
> -			     union iwreq_data *wrqu, char *b)
> +int ieee80211_wx_set_mode(struct ieee80211_device *ieee,
> +			  struct iw_request_info *a, union iwreq_data *wrqu,
> +			  char *b)
>  {
>  
>  	ieee->sync_scan_hurryup = 1;
> @@ -305,8 +307,9 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
>  
>  }
>  
> -int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
> -			     union iwreq_data *wrqu, char *b)
> +int ieee80211_wx_set_scan(struct ieee80211_device *ieee,
> +			  struct iw_request_info *a, union iwreq_data *wrqu,
> +			  char *b)
>  {
>  	int ret = 0;
>  
> @@ -333,8 +336,8 @@ out:
>  }
>  
>  int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
> -			      struct iw_request_info *a,
> -			      union iwreq_data *wrqu, char *extra)
> +			   struct iw_request_info *a, union iwreq_data *wrqu,
> +			   char *extra)
>  {
>  
>  	int ret = 0, len;
> @@ -395,8 +398,9 @@ out:
>  	return ret;
>  }
>  
> -int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
> -			     union iwreq_data *wrqu, char *b)
> +int ieee80211_wx_get_mode(struct ieee80211_device *ieee,
> +			  struct iw_request_info *a, union iwreq_data *wrqu,
> +			  char *b)
>  {
>  
>  	wrqu->mode = ieee->iw_mode;
> @@ -404,8 +408,8 @@ int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info
>  }
>  
>  int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
> -			       struct iw_request_info *info,
> -			       union iwreq_data *wrqu, char *extra)
> +			   struct iw_request_info *info, union iwreq_data *wrqu,
> +			   char *extra)
>  {
>  
>  	int *parms = (int *)extra;
> @@ -440,8 +444,8 @@ int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
>  }
>  
>  int ieee80211_wx_get_name(struct ieee80211_device *ieee,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			  struct iw_request_info *info, union iwreq_data *wrqu,
> +			  char *extra)
>  {
>  	strlcpy(wrqu->name, "802.11", IFNAMSIZ);
>  	if (ieee->modulation & IEEE80211_CCK_MODULATION) {
> @@ -464,8 +468,8 @@ int ieee80211_wx_get_name(struct ieee80211_device *ieee,
>  
>  /* this is mostly stolen from hostap */
>  int ieee80211_wx_set_power(struct ieee80211_device *ieee,
> -				 struct iw_request_info *info,
> -				 union iwreq_data *wrqu, char *extra)
> +			   struct iw_request_info *info, union iwreq_data *wrqu,
> +			   char *extra)
>  {
>  	int ret = 0;
>  
> @@ -525,8 +529,8 @@ exit:
>  
>  /* this is stolen from hostap */
>  int ieee80211_wx_get_power(struct ieee80211_device *ieee,
> -				 struct iw_request_info *info,
> -				 union iwreq_data *wrqu, char *extra)
> +			   struct iw_request_info *info, union iwreq_data *wrqu,
> +			   char *extra)
>  {
>  	int ret = 0;
>  
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> index b346653..0d03b16 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> @@ -178,10 +178,9 @@ static inline int ieee80211_put_snap(u8 *data, u16 h_proto)
>  	return SNAP_SIZE + sizeof(u16);
>  }
>  
> -int ieee80211_encrypt_fragment(
> -	struct ieee80211_device *ieee,
> -	struct sk_buff *frag,
> -	int hdr_len)
> +int ieee80211_encrypt_fragment(struct ieee80211_device *ieee,
> +			       struct sk_buff *frag,
> +			       int hdr_len)
>  {
>  	struct ieee80211_crypt_data* crypt = ieee->crypt[ieee->tx_keyidx];
>  	int res;
> @@ -229,7 +228,8 @@ int ieee80211_encrypt_fragment(
>  }
>  
>  
> -void ieee80211_txb_free(struct ieee80211_txb *txb) {
> +void ieee80211_txb_free(struct ieee80211_txb *txb)
> +{
>  	int i;
>  	if (unlikely(!txb))
>  		return;
> @@ -272,8 +272,8 @@ struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
>  
>  // Classify the to-be send data packet
>  // Need to acquire the sent queue index.
> -static int
> -ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)
> +static int ieee80211_classify(struct sk_buff *skb,
> +			      struct ieee80211_network *network)
>  {
>    struct ether_header *eh = (struct ether_header*)skb->data;
>    unsigned int wme_UP = 0;
> @@ -305,7 +305,7 @@ ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)
>  
>  /* SKBs are added to the ieee->tx_queue. */
>  int ieee80211_rtl_xmit(struct sk_buff *skb,
> -		   struct net_device *dev)
> +		       struct net_device *dev)
>  {
>  	struct ieee80211_device *ieee = netdev_priv(dev);
>  	struct ieee80211_txb *txb = NULL;
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
> index e014f7e..80cefb8 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
> @@ -632,8 +632,8 @@ done:
>  	return ret;
>  }
>  int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
> -			       struct iw_request_info *info,
> -			       union iwreq_data *wrqu, char *extra)
> +			  struct iw_request_info *info,
> +			  union iwreq_data *wrqu, char *extra)
>  {
>  	struct iw_mlme *mlme = (struct iw_mlme *) extra;
>  //	printk("\ndkgadfslkdjgalskdf===============>%s(), cmd:%x\n", __func__, mlme->cmd);
> @@ -652,8 +652,8 @@ int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
>  }
>  
>  int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
> -			       struct iw_request_info *info,
> -			       struct iw_param *data, char *extra)
> +			  struct iw_request_info *info,
> +			  struct iw_param *data, char *extra)
>  {
>  /*
>  	 struct ieee80211_security sec = {
> diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
> index 5947a6f..a5c183e 100644
> --- a/drivers/staging/rtl8187se/r8180_core.c
> +++ b/drivers/staging/rtl8187se/r8180_core.c
> @@ -79,7 +79,7 @@ module_param(hwwep, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(hwwep, " Try to use hardware WEP support. Still broken and not available on all cards");
>  
>  static int rtl8180_pci_probe(struct pci_dev *pdev,
> -				       const struct pci_device_id *id);
> +			     const struct pci_device_id *id);
>  
>  static void rtl8180_pci_remove(struct pci_dev *pdev);
>  
> @@ -352,7 +352,7 @@ void rtl8180_proc_init_one(struct net_device *dev)
>  */
>  
>  short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
> -		struct buffer **bufferhead)
> +		 struct buffer **bufferhead)
>  {
>  	struct buffer *tmp;
>  
> @@ -387,7 +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)
> +void buffer_free(struct net_device *dev, struct buffer **buffer, int len,
> +		 short consistent)
>  {
>  
>  	struct buffer *tmp, *next;
> @@ -1532,8 +1533,9 @@ 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) {
> +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;
>  	struct ieee80211_hdr_3addr *h = (struct ieee80211_hdr_3addr *) skb->data;
> @@ -2237,7 +2239,8 @@ static CHANNEL_LIST ChannelPlan[] = {
>  	{{1,2,3,4,5,6,7,8,9,10,11,12,13},13} /* world wide 13: ch1~ch11 active scan, ch12~13 passive //lzm add 080826 */
>  };
>  
> -static void rtl8180_set_channel_map(u8 channel_plan, struct ieee80211_device *ieee)
> +static void rtl8180_set_channel_map(u8 channel_plan,
> +				    struct ieee80211_device *ieee)
>  {
>  	int i;
>  
> @@ -2829,11 +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
> -)
> +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)
> @@ -3160,7 +3160,7 @@ static const struct net_device_ops rtl8180_netdev_ops = {
>  };
>  
>  static int rtl8180_pci_probe(struct pci_dev *pdev,
> -				       const struct pci_device_id *id)
> +			     const struct pci_device_id *id)
>  {
>  	unsigned long ioaddr = 0;
>  	struct net_device *dev = NULL;
> diff --git a/drivers/staging/rtl8187se/r8180_wx.c b/drivers/staging/rtl8187se/r8180_wx.c
> index c8fc61b..f35a0c8 100644
> --- a/drivers/staging/rtl8187se/r8180_wx.c
> +++ b/drivers/staging/rtl8187se/r8180_wx.c
> @@ -74,8 +74,9 @@ int r8180_wx_set_key(struct net_device *dev, struct iw_request_info *info,
>  }
>  
>  
> -static int r8180_wx_set_beaconinterval(struct net_device *dev, struct iw_request_info *aa,
> -			  union iwreq_data *wrqu, char *b)
> +static int r8180_wx_set_beaconinterval(struct net_device *dev,
> +				       struct iw_request_info *aa,
> +				       union iwreq_data *wrqu, char *b)
>  {
>  	int *parms = (int *)b;
>  	int bi = parms[0];
> @@ -473,9 +474,8 @@ static int r8180_wx_get_frag(struct net_device *dev,
>  
>  
>  static int r8180_wx_set_wap(struct net_device *dev,
> -			 struct iw_request_info *info,
> -			 union iwreq_data *awrq,
> -			 char *extra)
> +			    struct iw_request_info *info,
> +			    union iwreq_data *awrq, char *extra)
>  {
>  	int ret;
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -537,8 +537,10 @@ static int r8180_wx_get_enc(struct net_device *dev,
>  }
>  
>  
> -static int r8180_wx_set_scan_type(struct net_device *dev, struct iw_request_info *aa, union
> -	iwreq_data *wrqu, char *p)	{
> +static int r8180_wx_set_scan_type(struct net_device *dev,
> +				  struct iw_request_info *aa,
> +				  union	iwreq_data *wrqu, char *p)
> +{
>  
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int *parms = (int*)p;
> @@ -553,8 +555,8 @@ static int r8180_wx_set_scan_type(struct net_device *dev, struct iw_request_info
>  }
>  
>  static int r8180_wx_set_retry(struct net_device *dev,
> -				struct iw_request_info *info,
> -				union iwreq_data *wrqu, char *extra)
> +			      struct iw_request_info *info,
> +			      union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int err = 0;
> @@ -601,8 +603,8 @@ exit:
>  }
>  
>  static int r8180_wx_get_retry(struct net_device *dev,
> -				struct iw_request_info *info,
> -				union iwreq_data *wrqu, char *extra)
> +			      struct iw_request_info *info,
> +			      union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -625,8 +627,8 @@ static int r8180_wx_get_retry(struct net_device *dev,
>  }
>  
>  static int r8180_wx_get_sens(struct net_device *dev,
> -				struct iw_request_info *info,
> -				union iwreq_data *wrqu, char *extra)
> +			     struct iw_request_info *info,
> +			     union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	if (priv->rf_set_sens == NULL)
> @@ -637,8 +639,8 @@ static int r8180_wx_get_sens(struct net_device *dev,
>  
>  
>  static int r8180_wx_set_sens(struct net_device *dev,
> -				struct iw_request_info *info,
> -				union iwreq_data *wrqu, char *extra)
> +			     struct iw_request_info *info,
> +			     union iwreq_data *wrqu, char *extra)
>  {
>  
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -666,8 +668,8 @@ exit:
>  
>  
>  static int r8180_wx_set_rawtx(struct net_device *dev,
> -			       struct iw_request_info *info,
> -			       union iwreq_data *wrqu, char *extra)
> +			      struct iw_request_info *info,
> +			      union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int ret;
> @@ -686,8 +688,8 @@ static int r8180_wx_set_rawtx(struct net_device *dev,
>  }
>  
>  static int r8180_wx_get_power(struct net_device *dev,
> -			       struct iw_request_info *info,
> -			       union iwreq_data *wrqu, char *extra)
> +			      struct iw_request_info *info,
> +			      union iwreq_data *wrqu, char *extra)
>  {
>  	int ret;
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -702,8 +704,8 @@ static int r8180_wx_get_power(struct net_device *dev,
>  }
>  
>  static int r8180_wx_set_power(struct net_device *dev,
> -			       struct iw_request_info *info,
> -			       union iwreq_data *wrqu, char *extra)
> +			      struct iw_request_info *info,
> +			      union iwreq_data *wrqu, char *extra)
>  {
>  	int ret;
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -728,8 +730,8 @@ static int r8180_wx_set_power(struct net_device *dev,
>  }
>  
>  static int r8180_wx_set_rts(struct net_device *dev,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			    struct iw_request_info *info,
> +			    union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -750,8 +752,8 @@ static int r8180_wx_set_rts(struct net_device *dev,
>  	return 0;
>  }
>  static int r8180_wx_get_rts(struct net_device *dev,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			    struct iw_request_info *info,
> +			    union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -841,8 +843,8 @@ static int r8180_wx_set_iwmode(struct net_device *dev,
>  	return ret;
>  }
>  static int r8180_wx_get_preamble(struct net_device *dev,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			         struct iw_request_info *info,
> +			         union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -858,8 +860,8 @@ static int r8180_wx_get_preamble(struct net_device *dev,
>  	return 0;
>  }
>  static int r8180_wx_set_preamble(struct net_device *dev,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			         struct iw_request_info *info,
> +			         union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int ret = 0;
> @@ -881,8 +883,8 @@ static int r8180_wx_set_preamble(struct net_device *dev,
>  	return ret;
>  }
>  static int r8180_wx_get_siglevel(struct net_device *dev,
> -			       struct iw_request_info *info,
> -			       union iwreq_data *wrqu, char *extra)
> +			         struct iw_request_info *info,
> +			         union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int ret = 0;
> @@ -900,8 +902,8 @@ static int r8180_wx_get_siglevel(struct net_device *dev,
>  	return ret;
>  }
>  static int r8180_wx_get_sigqual(struct net_device *dev,
> -			       struct iw_request_info *info,
> -			       union iwreq_data *wrqu, char *extra)
> +			        struct iw_request_info *info,
> +			        union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int ret = 0;
> @@ -959,8 +961,8 @@ static int r8180_wx_reset_stats(struct net_device *dev,
>  
>  }
>  static int r8180_wx_radio_on(struct net_device *dev,
> -				struct iw_request_info *info,
> -				union iwreq_data *wrqu, char *extra)
> +			     struct iw_request_info *info,
> +			     union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -978,8 +980,8 @@ static int r8180_wx_radio_on(struct net_device *dev,
>  }
>  
>  static int r8180_wx_radio_off(struct net_device *dev,
> -				struct iw_request_info *info,
> -				union iwreq_data *wrqu, char *extra)
> +			      struct iw_request_info *info,
> +			      union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -996,8 +998,8 @@ static int r8180_wx_radio_off(struct net_device *dev,
>  
>  }
>  static int r8180_wx_get_channelplan(struct net_device *dev,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			            struct iw_request_info *info,
> +			            union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  
> @@ -1013,8 +1015,8 @@ static int r8180_wx_get_channelplan(struct net_device *dev,
>  	return 0;
>  }
>  static int r8180_wx_set_channelplan(struct net_device *dev,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			            struct iw_request_info *info,
> +			            union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	int *val = (int *)extra;
> @@ -1043,8 +1045,8 @@ static int r8180_wx_set_channelplan(struct net_device *dev,
>  }
>  
>  static int r8180_wx_get_version(struct net_device *dev,
> -			       struct iw_request_info *info,
> -			       union iwreq_data *wrqu, char *extra)
> +			        struct iw_request_info *info,
> +			        union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	/* struct ieee80211_device *ieee; */
> @@ -1059,8 +1061,8 @@ static int r8180_wx_get_version(struct net_device *dev,
>  /* added by amy 080818 */
>  /*receive datarate from user typing valid rate is from 2 to 108 (1 - 54M), if input 0, return to normal rate adaptive. */
>  static int r8180_wx_set_forcerate(struct net_device *dev,
> -			     struct iw_request_info *info,
> -			     union iwreq_data *wrqu, char *extra)
> +			          struct iw_request_info *info,
> +			          union iwreq_data *wrqu, char *extra)
>  {
>  	struct r8180_priv *priv = ieee80211_priv(dev);
>  	u8 forcerate = *extra;
> @@ -1084,8 +1086,8 @@ static int r8180_wx_set_forcerate(struct net_device *dev,
>  }
>  
>  static int r8180_wx_set_enc_ext(struct net_device *dev,
> -										struct iw_request_info *info,
> -										union iwreq_data *wrqu, char *extra)
> +				struct iw_request_info *info,
> +				union iwreq_data *wrqu, char *extra)
>  {
>  
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -1118,8 +1120,8 @@ static int r8180_wx_set_auth(struct net_device *dev,
>  }
>  
>  static int r8180_wx_set_mlme(struct net_device *dev,
> -										struct iw_request_info *info,
> -										union iwreq_data *wrqu, char *extra)
> +			     struct iw_request_info *info,
> +			     union iwreq_data *wrqu, char *extra)
>  {
>  	int ret = 0;
>  	struct r8180_priv *priv = ieee80211_priv(dev);
> @@ -1333,7 +1335,7 @@ static iw_handler r8180_private_handler[] = {
>  };
>  
>  static inline int is_same_network(struct ieee80211_network *src,
> -									struct ieee80211_network *dst,
> +				  struct ieee80211_network *dst,
>  				  struct ieee80211_device *ieee)
>  {
>  		/* A network is only a duplicate if the channel, BSSID, ESSID
> diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c
> index 978dc5f..3e582c6 100644
> --- a/drivers/staging/rtl8187se/r8185b_init.c
> +++ b/drivers/staging/rtl8187se/r8185b_init.c
> @@ -795,9 +795,10 @@ static u8 GetSupportedWirelessMode8185(struct net_device *dev)
>  	return WIRELESS_MODE_B | WIRELESS_MODE_G;
>  }
>  
> -static void ActUpdateChannelAccessSetting(struct net_device *dev,
> -				   WIRELESS_MODE WirelessMode,
> -				   PCHANNEL_ACCESS_SETTING ChnlAccessSetting)
> +static void
> +ActUpdateChannelAccessSetting(struct net_device *dev,
> +			      WIRELESS_MODE WirelessMode,
> +			      PCHANNEL_ACCESS_SETTING ChnlAccessSetting)
>  {
>  	AC_CODING	eACI;
>  
> @@ -984,7 +985,8 @@ static bool MgntDisconnect(struct net_device *dev, u8 asRsn)
>   *	Assumption:
>   *		PASSIVE LEVEL.
>   */
> -static bool SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
> +static bool SetRFPowerState(struct net_device *dev,
> +			    RT_RF_POWER_STATE eRFPowerState)
>  {
>  	struct	r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	bool	bResult = false;
> @@ -997,7 +999,8 @@ static bool SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerSt
>  	return bResult;
>  }
>  
> -bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet, u32 ChangeSource)
> +bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet,
> +			 u32 ChangeSource)
>  {
>  	struct	r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
>  	bool	bActionAllowed = false;
> -- 
> 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.
Pablo Neira Ayuso Nov. 9, 2013, 10:02 a.m. UTC | #2
On Fri, Nov 08, 2013 at 04:36:13PM -0800, Sarah Sharp wrote:
> Hi Ana,
> 
> Thanks for sending this patch!  I have a couple comments on it, and I
> hope you'll send a second revision to address them.
> 
> First, did you run your patch through checkpatch.pl after you committed
> it (either manually, or by adding checkpatch.pl your
> .git/hooks/pre-commit as described in the first patch tutorial)?
> 
> I ask because your patch adds a lot of checkpatch warnings, and those
> need to be fixed before we can accept it.  I'm actually a bit surprised
> that Pablo acked the patch without running it through checkpatch.pl.

My fault, sorry Sarah. We'll make sure patches are clean through
checkpatch.pl. Thanks.

Patch
diff mbox

diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
index 9d2d5c5..eac3f43 100644
--- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
@@ -9,8 +9,7 @@ 
 
 #include "dot11d.h"
 
-void
-Dot11d_Init(struct ieee80211_device *ieee)
+void Dot11d_Init(struct ieee80211_device *ieee)
 {
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
 
@@ -29,8 +28,7 @@  Dot11d_Init(struct ieee80211_device *ieee)
 //	Description:
 //		Reset to the state as we are just entering a regulatory domain.
 //
-void
-Dot11d_Reset(struct ieee80211_device *ieee)
+void Dot11d_Reset(struct ieee80211_device *ieee)
 {
 	u32 i;
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
@@ -64,13 +62,8 @@  Dot11d_Reset(struct ieee80211_device *ieee)
 //		1. IS_DOT11D_ENABLE() is TRUE.
 //		2. Input IE is an valid one.
 //
-void
-Dot11d_UpdateCountryIe(
-	struct ieee80211_device *dev,
-	u8 *pTaddr,
-	u16	CoutryIeLen,
-	u8 *pCoutryIe
-	)
+void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
+			    u16 CoutryIeLen, u8 *pCoutryIe)
 {
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
 	u8 i, j, NumTriples, MaxChnlNum;
@@ -125,11 +118,7 @@  Dot11d_UpdateCountryIe(
 	pDot11dInfo->State = DOT11D_STATE_LEARNED;
 }
 
-u8
-DOT11D_GetMaxTxPwrInDbm(
-	struct ieee80211_device *dev,
-	u8 Channel
-	)
+u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel)
 {
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
 	u8 MaxTxPwrInDbm = 255;
@@ -146,10 +135,7 @@  DOT11D_GetMaxTxPwrInDbm(
 }
 
 
-void
-DOT11D_ScanComplete(
-	struct ieee80211_device *dev
-	)
+void DOT11D_ScanComplete(struct ieee80211_device *dev)
 {
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
 
@@ -169,10 +155,7 @@  DOT11D_ScanComplete(
 	}
 }
 
-int IsLegalChannel(
-	struct ieee80211_device *dev,
-	u8 channel
-)
+int IsLegalChannel(struct ieee80211_device *dev, u8 channel)
 {
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
 
@@ -185,10 +168,7 @@  int IsLegalChannel(
 	return 0;
 }
 
-int ToLegalChannel(
-	struct ieee80211_device *dev,
-	u8 channel
-)
+int ToLegalChannel(struct ieee80211_device *dev, u8 channel)
 {
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
 	u8 default_chn = 0;
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
index 694eae3..a0340ee 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
@@ -39,8 +39,7 @@  struct ieee80211_crypto {
 
 static struct ieee80211_crypto *hcrypt;
 
-void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee,
-					   int force)
+void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force)
 {
 	struct list_head *ptr, *n;
 	struct ieee80211_crypt_data *entry;
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
index f5949e8..2fc1bb9 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
@@ -61,7 +61,7 @@  struct ieee80211_ccmp_data {
 };
 
 void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,
-			     const u8 pt[16], u8 ct[16])
+			        const u8 pt[16], u8 ct[16])
 {
 	crypto_cipher_encrypt_one((void *)tfm, ct, pt);
 }
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
index da24e43..2fc797b 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
@@ -521,7 +521,8 @@  static void michael_mic_hdr(struct sk_buff *skb, u8 *hdr)
 }
 
 
-static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, void *priv)
+static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len,
+				     void *priv)
 {
 	struct ieee80211_tkip_data *tkey = priv;
 	u8 *pos;
@@ -554,8 +555,8 @@  static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, void *pri
 }
 
 static void ieee80211_michael_mic_failure(struct net_device *dev,
-				       struct ieee80211_hdr_4addr *hdr,
-				       int keyidx)
+				          struct ieee80211_hdr_4addr *hdr,
+				          int keyidx)
 {
 	union iwreq_data wrqu;
 	struct iw_michaelmicfailure ev;
@@ -575,7 +576,7 @@  static void ieee80211_michael_mic_failure(struct net_device *dev,
 }
 
 static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
-				     int hdr_len, void *priv)
+				        int hdr_len, void *priv)
 {
 	struct ieee80211_tkip_data *tkey = priv;
 	u8 mic[8];
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index 10b2210..43971cd 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -337,8 +337,9 @@  ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb,
 
 /* Called only as a tasklet (software IRQ), by ieee80211_rx */
 static inline int
-ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, struct sk_buff *skb,
-			     int keyidx, struct ieee80211_crypt_data *crypt)
+ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee,
+				struct sk_buff *skb, int keyidx,
+				struct ieee80211_crypt_data *crypt)
 {
 	struct ieee80211_hdr_4addr *hdr;
 	int res, hdrlen;
@@ -366,7 +367,7 @@  ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, struct sk_buff *s
 /* this function is stolen from ipw2200 driver*/
 #define IEEE_PACKET_RETRY_TIME (5*HZ)
 static int is_duplicate_packet(struct ieee80211_device *ieee,
-				      struct ieee80211_hdr_4addr *header)
+			       struct ieee80211_hdr_4addr *header)
 {
 	u16 fc = le16_to_cpu(header->frame_ctl);
 	u16 sc = le16_to_cpu(header->seq_ctl);
@@ -467,7 +468,7 @@  drop:
  * IEEE 802.11 format, i.e., in the format it was sent over air.
  * This function is called only as a tasklet (software IRQ). */
 int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
-		 struct ieee80211_rx_stats *rx_stats)
+		     struct ieee80211_rx_stats *rx_stats)
 {
 	struct net_device *dev = ieee->dev;
 	//struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
@@ -794,9 +795,7 @@  static inline int ieee80211_is_ofdm_rate(u8 rate)
 	return 0;
 }
 
-static inline int ieee80211_SignalStrengthTranslate(
-	int  CurrSS
-	)
+static inline int ieee80211_SignalStrengthTranslate(int CurrSS)
 {
 	int RetSS;
 
@@ -831,12 +830,10 @@  static inline int ieee80211_SignalStrengthTranslate(
 	return RetSS;
 }
 
-static inline void ieee80211_extract_country_ie(
-	struct ieee80211_device *ieee,
-	struct ieee80211_info_element *info_element,
-	struct ieee80211_network *network,
-	u8 *addr2
-)
+static inline void
+ieee80211_extract_country_ie(struct ieee80211_device *ieee,
+			     struct ieee80211_info_element *info_element,
+			     struct ieee80211_network *network, u8 *addr2)
 {
 	if (IS_DOT11D_ENABLE(ieee)) {
 		if (info_element->len != 0) {
@@ -858,10 +855,8 @@  static inline void ieee80211_extract_country_ie(
 
 }
 
-int
-ieee80211_TranslateToDbm(
-	unsigned char SignalStrengthIndex	// 0-100 index.
-	)
+/* SignalStrengthIndex is 0-100 */
+int ieee80211_TranslateToDbm(unsigned char SignalStrengthIndex)
 {
 	unsigned char SignalPower; // in dBm.
 
@@ -1197,7 +1192,7 @@  static inline int is_same_network(struct ieee80211_network *src,
 }
 
 inline void update_network(struct ieee80211_network *dst,
-				  struct ieee80211_network *src)
+			   struct ieee80211_network *src)
 {
 	unsigned char quality = src->stats.signalstrength;
 	unsigned char signal = 0;
@@ -1281,10 +1276,10 @@  inline void update_network(struct ieee80211_network *dst,
 }
 
 
-inline void ieee80211_process_probe_response(
-	struct ieee80211_device *ieee,
-	struct ieee80211_probe_response *beacon,
-	struct ieee80211_rx_stats *stats)
+inline void
+ieee80211_process_probe_response(struct ieee80211_device *ieee,
+				 struct ieee80211_probe_response *beacon,
+				 struct ieee80211_rx_stats *stats)
 {
 	struct ieee80211_network network;
 	struct ieee80211_network *target;
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
index b65db54..6eefc27 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@ -106,7 +106,8 @@  void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
 }
 
 
-void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p) {
+void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
+{
 	u8 *tag = *tag_p;
 
 	*tag++ = MFIE_TYPE_GENERIC; //0
@@ -129,7 +130,8 @@  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) {
+void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p)
+{
 	u8 *tag = *tag_p;
 
         *tag++ = MFIE_TYPE_GENERIC; //0
@@ -187,7 +189,8 @@  void init_mgmt_queue(struct ieee80211_device *ieee)
 
 void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl);
 
-inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee)
+inline void softmac_mgmt_xmit(struct sk_buff *skb,
+			      struct ieee80211_device *ieee)
 {
 	unsigned long flags;
 	short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE;
@@ -238,7 +241,8 @@  inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
 }
 
 
-inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee)
+inline void softmac_ps_mgmt_xmit(struct sk_buff *skb,
+				 struct ieee80211_device *ieee)
 {
 
 	short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE;
@@ -276,10 +280,9 @@  inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i
 //	dev_kfree_skb_any(skb);//edit by thomas
 }
 //by amy for power save
-inline struct sk_buff *ieee80211_disassociate_skb(
-							struct ieee80211_network *beacon,
-							struct ieee80211_device *ieee,
-							u8	asRsn)
+inline struct sk_buff *
+ieee80211_disassociate_skb(struct ieee80211_network *beacon,
+			   struct ieee80211_device *ieee, u8 asRsn)
 {
 	struct sk_buff *skb;
 	struct ieee80211_disassoc_frame *disass;
@@ -299,12 +302,7 @@  inline struct sk_buff *ieee80211_disassociate_skb(
 	disass->reasoncode = asRsn;
 	return skb;
 }
-void
-SendDisassociation(
-        struct ieee80211_device *ieee,
-        u8*                     asSta,
-        u8                      asRsn
-)
+void SendDisassociation(struct ieee80211_device *ieee, u8* asSta, u8 asRsn)
 {
         struct ieee80211_network *beacon = &ieee->current_network;
         struct sk_buff *skb;
@@ -735,8 +733,9 @@  void ieee80211_start_scan_syncro(struct ieee80211_device *ieee)
 
 }
 
-inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *beacon,
-	struct ieee80211_device *ieee, int challengelen)
+inline struct sk_buff *
+ieee80211_authentication_req(struct ieee80211_network *beacon,
+			     struct ieee80211_device *ieee, int challengelen)
 {
 	struct sk_buff *skb;
 	struct ieee80211_authentication *auth;
@@ -768,7 +767,8 @@  inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *be
 
 }
 
-static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *dest)
+static struct sk_buffi *ieee80211_probe_resp(struct ieee80211_device *ieee,
+					     u8 *dest)
 {
 	u8 *tag;
 	int beacon_size;
@@ -940,7 +940,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)
+struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee, int status,
+				    u8 *dest)
 {
 	struct sk_buff *skb;
 	struct ieee80211_authentication *auth;
@@ -967,7 +968,7 @@  struct sk_buff* ieee80211_auth_resp(struct ieee80211_device *ieee,int status, u8
 
 }
 
-struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee,short pwr)
+struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee, short pwr)
 {
 	struct sk_buff *skb;
 	struct ieee80211_hdr_3addr* hdr;
@@ -1027,7 +1028,9 @@  void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
 }
 
 
-inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beacon,struct ieee80211_device *ieee)
+inline struct sk_buff *
+ieee80211_association_req(struct ieee80211_network *beacon,
+			  struct ieee80211_device *ieee)
 {
 	struct sk_buff *skb;
 	//unsigned long flags;
@@ -1198,7 +1201,8 @@  void ieee80211_associate_step1(struct ieee80211_device *ieee)
 	}
 }
 
-void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge, int chlen)
+void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge,
+				  int chlen)
 {
 	u8 *c;
 	struct sk_buff *skb;
@@ -1308,7 +1312,8 @@  void ieee80211_associate_procedure_wq(struct work_struct *work)
 	up(&ieee->wx_sem);
 }
 
-inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net)
+inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee,
+				      struct ieee80211_network *net)
 {
 	u8 tmp_ssid[IW_ESSID_MAX_SIZE+1];
 	int tmp_ssid_len = 0;
@@ -1447,7 +1452,7 @@  static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)
 }
 
 
-int auth_rq_parse(struct sk_buff *skb,u8* dest)
+int auth_rq_parse(struct sk_buff *skb, u8* dest)
 {
 	struct ieee80211_authentication *a;
 
@@ -1465,7 +1470,8 @@  int auth_rq_parse(struct sk_buff *skb,u8* dest)
 	return WLAN_STATUS_SUCCESS;
 }
 
-static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb, u8 *src)
+static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
+			    u8 *src)
 {
 	u8 *tag;
 	u8 *skbend;
@@ -1503,7 +1509,7 @@  static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
 
 }
 
-int assoc_rq_parse(struct sk_buff *skb,u8* dest)
+int assoc_rq_parse(struct sk_buff *skb, u8* dest)
 {
 	struct ieee80211_assoc_request_frame *a;
 
@@ -1534,8 +1540,8 @@  static inline u16 assoc_parse(struct sk_buff *skb, int *aid)
 	return le16_to_cpu(a->status);
 }
 
-static inline void
-ieee80211_rx_probe_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
+static inline void ieee80211_rx_probe_rq(struct ieee80211_device *ieee,
+					 struct sk_buff *skb)
 {
 	u8 dest[ETH_ALEN];
 
@@ -1549,8 +1555,8 @@  ieee80211_rx_probe_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	}
 }
 
-inline void
-ieee80211_rx_auth_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
+inline void ieee80211_rx_auth_rq(struct ieee80211_device *ieee,
+				 struct sk_buff *skb)
 {
 	u8 dest[ETH_ALEN];
 	int status;
@@ -1593,7 +1599,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)
+short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
+			     u32 *time_l)
 {
         int timeout = 0;
 
@@ -1768,10 +1775,10 @@  void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
 	spin_unlock_irqrestore(&ieee->lock, flags);
 }
 
-inline int
-ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
-			struct ieee80211_rx_stats *rx_stats, u16 type,
-			u16 stype)
+inline int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee,
+				      struct sk_buff *skb,
+				      struct ieee80211_rx_stats *rx_stats,
+				      u16 type,	u16 stype)
 {
 	struct ieee80211_hdr_3addr *header = (struct ieee80211_hdr_3addr *) skb->data;
 	u16 errcode;
@@ -1974,7 +1981,8 @@  associate_complete:
  * to the driver later, when it wakes the queue.
  */
 
-void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee)
+void ieee80211_softmac_xmit(struct ieee80211_txb *txb,
+			    struct ieee80211_device *ieee)
 {
 
 
@@ -2617,7 +2625,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)
+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);
@@ -2626,7 +2635,8 @@  void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee, char *wpa_ie, int
 }
 
 
-static int ieee80211_wpa_mlme(struct ieee80211_device *ieee, int command, int reason)
+static int ieee80211_wpa_mlme(struct ieee80211_device *ieee,
+			      int command, int reason)
 {
 
 	int ret = 0;
@@ -2650,7 +2660,7 @@  static int ieee80211_wpa_mlme(struct ieee80211_device *ieee, int command, int re
 
 
 static int ieee80211_wpa_set_wpa_ie(struct ieee80211_device *ieee,
-			      struct ieee_param *param, int plen)
+				    struct ieee_param *param, int plen)
 {
 	u8 *buf;
 
@@ -2704,7 +2714,8 @@  static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value)
 	return ret;
 }
 
-static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 value)
+static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name,
+				   u32 value)
 {
 	int ret=0;
 	unsigned long flags;
@@ -2782,7 +2793,7 @@  static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 v
 /* implementation borrowed from hostap driver */
 
 static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
-				  struct ieee_param *param, int param_len)
+					struct ieee_param *param, int param_len)
 {
 	int ret = 0;
 
@@ -2929,7 +2940,8 @@  static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
 	return ret;
 }
 
-int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p)
+int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee,
+				   struct iw_point *p)
 {
 	struct ieee_param *param;
 	int ret=0;
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
index e528206..46f3564 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
@@ -28,8 +28,9 @@  const long ieee80211_wlan_frequencies[] = {
 };
 
 
-int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
-			     union iwreq_data *wrqu, char *b)
+int ieee80211_wx_set_freq(struct ieee80211_device *ieee,
+			  struct iw_request_info *a, union iwreq_data *wrqu,
+			  char *b)
 {
 	int ret;
 	struct iw_freq *fwrq = &wrqu->freq;
@@ -82,8 +83,8 @@  out:
 
 
 int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
-			     struct iw_request_info *a,
-			     union iwreq_data *wrqu, char *b)
+			  struct iw_request_info *a, union iwreq_data *wrqu,
+			  char *b)
 {
 	struct iw_freq *fwrq = &wrqu->freq;
 
@@ -97,8 +98,8 @@  int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
 }
 
 int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
-			    struct iw_request_info *info,
-			    union iwreq_data *wrqu, char *extra)
+			 struct iw_request_info *info, union iwreq_data *wrqu,
+			 char *extra)
 {
 	unsigned long flags;
 
@@ -126,8 +127,7 @@  int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
 
 
 int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
-			 struct iw_request_info *info,
-			 union iwreq_data *awrq,
+			 struct iw_request_info *info, union iwreq_data *awrq,
 			 char *extra)
 {
 
@@ -174,8 +174,9 @@  out:
 	return ret;
 }
 
-int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,
-			    union iwreq_data *wrqu, char *b)
+int ieee80211_wx_get_essid(struct ieee80211_device *ieee,
+			   struct iw_request_info *a, union iwreq_data *wrqu,
+			   char *b)
 {
 	int len, ret = 0;
 	unsigned long flags;
@@ -211,8 +212,8 @@  out:
 }
 
 int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			  struct iw_request_info *info, union iwreq_data *wrqu,
+			  char *extra)
 {
 
 	u32 target_rate = wrqu->bitrate.value;
@@ -230,8 +231,8 @@  int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
 
 
 int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			  struct iw_request_info *info, union iwreq_data *wrqu,
+			  char *extra)
 {
 
 	wrqu->bitrate.value = ieee->rate * 100000;
@@ -239,8 +240,9 @@  int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
 	return 0;
 }
 
-int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
-			     union iwreq_data *wrqu, char *b)
+int ieee80211_wx_set_mode(struct ieee80211_device *ieee,
+			  struct iw_request_info *a, union iwreq_data *wrqu,
+			  char *b)
 {
 
 	ieee->sync_scan_hurryup = 1;
@@ -305,8 +307,9 @@  void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 
 }
 
-int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
-			     union iwreq_data *wrqu, char *b)
+int ieee80211_wx_set_scan(struct ieee80211_device *ieee,
+			  struct iw_request_info *a, union iwreq_data *wrqu,
+			  char *b)
 {
 	int ret = 0;
 
@@ -333,8 +336,8 @@  out:
 }
 
 int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
-			      struct iw_request_info *a,
-			      union iwreq_data *wrqu, char *extra)
+			   struct iw_request_info *a, union iwreq_data *wrqu,
+			   char *extra)
 {
 
 	int ret = 0, len;
@@ -395,8 +398,9 @@  out:
 	return ret;
 }
 
-int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
-			     union iwreq_data *wrqu, char *b)
+int ieee80211_wx_get_mode(struct ieee80211_device *ieee,
+			  struct iw_request_info *a, union iwreq_data *wrqu,
+			  char *b)
 {
 
 	wrqu->mode = ieee->iw_mode;
@@ -404,8 +408,8 @@  int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info
 }
 
 int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
+			   struct iw_request_info *info, union iwreq_data *wrqu,
+			   char *extra)
 {
 
 	int *parms = (int *)extra;
@@ -440,8 +444,8 @@  int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
 }
 
 int ieee80211_wx_get_name(struct ieee80211_device *ieee,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			  struct iw_request_info *info, union iwreq_data *wrqu,
+			  char *extra)
 {
 	strlcpy(wrqu->name, "802.11", IFNAMSIZ);
 	if (ieee->modulation & IEEE80211_CCK_MODULATION) {
@@ -464,8 +468,8 @@  int ieee80211_wx_get_name(struct ieee80211_device *ieee,
 
 /* this is mostly stolen from hostap */
 int ieee80211_wx_set_power(struct ieee80211_device *ieee,
-				 struct iw_request_info *info,
-				 union iwreq_data *wrqu, char *extra)
+			   struct iw_request_info *info, union iwreq_data *wrqu,
+			   char *extra)
 {
 	int ret = 0;
 
@@ -525,8 +529,8 @@  exit:
 
 /* this is stolen from hostap */
 int ieee80211_wx_get_power(struct ieee80211_device *ieee,
-				 struct iw_request_info *info,
-				 union iwreq_data *wrqu, char *extra)
+			   struct iw_request_info *info, union iwreq_data *wrqu,
+			   char *extra)
 {
 	int ret = 0;
 
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
index b346653..0d03b16 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
@@ -178,10 +178,9 @@  static inline int ieee80211_put_snap(u8 *data, u16 h_proto)
 	return SNAP_SIZE + sizeof(u16);
 }
 
-int ieee80211_encrypt_fragment(
-	struct ieee80211_device *ieee,
-	struct sk_buff *frag,
-	int hdr_len)
+int ieee80211_encrypt_fragment(struct ieee80211_device *ieee,
+			       struct sk_buff *frag,
+			       int hdr_len)
 {
 	struct ieee80211_crypt_data* crypt = ieee->crypt[ieee->tx_keyidx];
 	int res;
@@ -229,7 +228,8 @@  int ieee80211_encrypt_fragment(
 }
 
 
-void ieee80211_txb_free(struct ieee80211_txb *txb) {
+void ieee80211_txb_free(struct ieee80211_txb *txb)
+{
 	int i;
 	if (unlikely(!txb))
 		return;
@@ -272,8 +272,8 @@  struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
 
 // Classify the to-be send data packet
 // Need to acquire the sent queue index.
-static int
-ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)
+static int ieee80211_classify(struct sk_buff *skb,
+			      struct ieee80211_network *network)
 {
   struct ether_header *eh = (struct ether_header*)skb->data;
   unsigned int wme_UP = 0;
@@ -305,7 +305,7 @@  ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)
 
 /* SKBs are added to the ieee->tx_queue. */
 int ieee80211_rtl_xmit(struct sk_buff *skb,
-		   struct net_device *dev)
+		       struct net_device *dev)
 {
 	struct ieee80211_device *ieee = netdev_priv(dev);
 	struct ieee80211_txb *txb = NULL;
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
index e014f7e..80cefb8 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
@@ -632,8 +632,8 @@  done:
 	return ret;
 }
 int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
+			  struct iw_request_info *info,
+			  union iwreq_data *wrqu, char *extra)
 {
 	struct iw_mlme *mlme = (struct iw_mlme *) extra;
 //	printk("\ndkgadfslkdjgalskdf===============>%s(), cmd:%x\n", __func__, mlme->cmd);
@@ -652,8 +652,8 @@  int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
 }
 
 int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
-			       struct iw_request_info *info,
-			       struct iw_param *data, char *extra)
+			  struct iw_request_info *info,
+			  struct iw_param *data, char *extra)
 {
 /*
 	 struct ieee80211_security sec = {
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 5947a6f..a5c183e 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -79,7 +79,7 @@  module_param(hwwep, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(hwwep, " Try to use hardware WEP support. Still broken and not available on all cards");
 
 static int rtl8180_pci_probe(struct pci_dev *pdev,
-				       const struct pci_device_id *id);
+			     const struct pci_device_id *id);
 
 static void rtl8180_pci_remove(struct pci_dev *pdev);
 
@@ -352,7 +352,7 @@  void rtl8180_proc_init_one(struct net_device *dev)
 */
 
 short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
-		struct buffer **bufferhead)
+		 struct buffer **bufferhead)
 {
 	struct buffer *tmp;
 
@@ -387,7 +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)
+void buffer_free(struct net_device *dev, struct buffer **buffer, int len,
+		 short consistent)
 {
 
 	struct buffer *tmp, *next;
@@ -1532,8 +1533,9 @@  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) {
+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;
 	struct ieee80211_hdr_3addr *h = (struct ieee80211_hdr_3addr *) skb->data;
@@ -2237,7 +2239,8 @@  static CHANNEL_LIST ChannelPlan[] = {
 	{{1,2,3,4,5,6,7,8,9,10,11,12,13},13} /* world wide 13: ch1~ch11 active scan, ch12~13 passive //lzm add 080826 */
 };
 
-static void rtl8180_set_channel_map(u8 channel_plan, struct ieee80211_device *ieee)
+static void rtl8180_set_channel_map(u8 channel_plan,
+				    struct ieee80211_device *ieee)
 {
 	int i;
 
@@ -2829,11 +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
-)
+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)
@@ -3160,7 +3160,7 @@  static const struct net_device_ops rtl8180_netdev_ops = {
 };
 
 static int rtl8180_pci_probe(struct pci_dev *pdev,
-				       const struct pci_device_id *id)
+			     const struct pci_device_id *id)
 {
 	unsigned long ioaddr = 0;
 	struct net_device *dev = NULL;
diff --git a/drivers/staging/rtl8187se/r8180_wx.c b/drivers/staging/rtl8187se/r8180_wx.c
index c8fc61b..f35a0c8 100644
--- a/drivers/staging/rtl8187se/r8180_wx.c
+++ b/drivers/staging/rtl8187se/r8180_wx.c
@@ -74,8 +74,9 @@  int r8180_wx_set_key(struct net_device *dev, struct iw_request_info *info,
 }
 
 
-static int r8180_wx_set_beaconinterval(struct net_device *dev, struct iw_request_info *aa,
-			  union iwreq_data *wrqu, char *b)
+static int r8180_wx_set_beaconinterval(struct net_device *dev,
+				       struct iw_request_info *aa,
+				       union iwreq_data *wrqu, char *b)
 {
 	int *parms = (int *)b;
 	int bi = parms[0];
@@ -473,9 +474,8 @@  static int r8180_wx_get_frag(struct net_device *dev,
 
 
 static int r8180_wx_set_wap(struct net_device *dev,
-			 struct iw_request_info *info,
-			 union iwreq_data *awrq,
-			 char *extra)
+			    struct iw_request_info *info,
+			    union iwreq_data *awrq, char *extra)
 {
 	int ret;
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -537,8 +537,10 @@  static int r8180_wx_get_enc(struct net_device *dev,
 }
 
 
-static int r8180_wx_set_scan_type(struct net_device *dev, struct iw_request_info *aa, union
-	iwreq_data *wrqu, char *p)	{
+static int r8180_wx_set_scan_type(struct net_device *dev,
+				  struct iw_request_info *aa,
+				  union	iwreq_data *wrqu, char *p)
+{
 
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int *parms = (int*)p;
@@ -553,8 +555,8 @@  static int r8180_wx_set_scan_type(struct net_device *dev, struct iw_request_info
 }
 
 static int r8180_wx_set_retry(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
+			      struct iw_request_info *info,
+			      union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int err = 0;
@@ -601,8 +603,8 @@  exit:
 }
 
 static int r8180_wx_get_retry(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
+			      struct iw_request_info *info,
+			      union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -625,8 +627,8 @@  static int r8180_wx_get_retry(struct net_device *dev,
 }
 
 static int r8180_wx_get_sens(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
+			     struct iw_request_info *info,
+			     union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	if (priv->rf_set_sens == NULL)
@@ -637,8 +639,8 @@  static int r8180_wx_get_sens(struct net_device *dev,
 
 
 static int r8180_wx_set_sens(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
+			     struct iw_request_info *info,
+			     union iwreq_data *wrqu, char *extra)
 {
 
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -666,8 +668,8 @@  exit:
 
 
 static int r8180_wx_set_rawtx(struct net_device *dev,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
+			      struct iw_request_info *info,
+			      union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int ret;
@@ -686,8 +688,8 @@  static int r8180_wx_set_rawtx(struct net_device *dev,
 }
 
 static int r8180_wx_get_power(struct net_device *dev,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
+			      struct iw_request_info *info,
+			      union iwreq_data *wrqu, char *extra)
 {
 	int ret;
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -702,8 +704,8 @@  static int r8180_wx_get_power(struct net_device *dev,
 }
 
 static int r8180_wx_set_power(struct net_device *dev,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
+			      struct iw_request_info *info,
+			      union iwreq_data *wrqu, char *extra)
 {
 	int ret;
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -728,8 +730,8 @@  static int r8180_wx_set_power(struct net_device *dev,
 }
 
 static int r8180_wx_set_rts(struct net_device *dev,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			    struct iw_request_info *info,
+			    union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -750,8 +752,8 @@  static int r8180_wx_set_rts(struct net_device *dev,
 	return 0;
 }
 static int r8180_wx_get_rts(struct net_device *dev,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			    struct iw_request_info *info,
+			    union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -841,8 +843,8 @@  static int r8180_wx_set_iwmode(struct net_device *dev,
 	return ret;
 }
 static int r8180_wx_get_preamble(struct net_device *dev,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			         struct iw_request_info *info,
+			         union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -858,8 +860,8 @@  static int r8180_wx_get_preamble(struct net_device *dev,
 	return 0;
 }
 static int r8180_wx_set_preamble(struct net_device *dev,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			         struct iw_request_info *info,
+			         union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int ret = 0;
@@ -881,8 +883,8 @@  static int r8180_wx_set_preamble(struct net_device *dev,
 	return ret;
 }
 static int r8180_wx_get_siglevel(struct net_device *dev,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
+			         struct iw_request_info *info,
+			         union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int ret = 0;
@@ -900,8 +902,8 @@  static int r8180_wx_get_siglevel(struct net_device *dev,
 	return ret;
 }
 static int r8180_wx_get_sigqual(struct net_device *dev,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
+			        struct iw_request_info *info,
+			        union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int ret = 0;
@@ -959,8 +961,8 @@  static int r8180_wx_reset_stats(struct net_device *dev,
 
 }
 static int r8180_wx_radio_on(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
+			     struct iw_request_info *info,
+			     union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -978,8 +980,8 @@  static int r8180_wx_radio_on(struct net_device *dev,
 }
 
 static int r8180_wx_radio_off(struct net_device *dev,
-				struct iw_request_info *info,
-				union iwreq_data *wrqu, char *extra)
+			      struct iw_request_info *info,
+			      union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -996,8 +998,8 @@  static int r8180_wx_radio_off(struct net_device *dev,
 
 }
 static int r8180_wx_get_channelplan(struct net_device *dev,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			            struct iw_request_info *info,
+			            union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 
@@ -1013,8 +1015,8 @@  static int r8180_wx_get_channelplan(struct net_device *dev,
 	return 0;
 }
 static int r8180_wx_set_channelplan(struct net_device *dev,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			            struct iw_request_info *info,
+			            union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	int *val = (int *)extra;
@@ -1043,8 +1045,8 @@  static int r8180_wx_set_channelplan(struct net_device *dev,
 }
 
 static int r8180_wx_get_version(struct net_device *dev,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
+			        struct iw_request_info *info,
+			        union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	/* struct ieee80211_device *ieee; */
@@ -1059,8 +1061,8 @@  static int r8180_wx_get_version(struct net_device *dev,
 /* added by amy 080818 */
 /*receive datarate from user typing valid rate is from 2 to 108 (1 - 54M), if input 0, return to normal rate adaptive. */
 static int r8180_wx_set_forcerate(struct net_device *dev,
-			     struct iw_request_info *info,
-			     union iwreq_data *wrqu, char *extra)
+			          struct iw_request_info *info,
+			          union iwreq_data *wrqu, char *extra)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
 	u8 forcerate = *extra;
@@ -1084,8 +1086,8 @@  static int r8180_wx_set_forcerate(struct net_device *dev,
 }
 
 static int r8180_wx_set_enc_ext(struct net_device *dev,
-										struct iw_request_info *info,
-										union iwreq_data *wrqu, char *extra)
+				struct iw_request_info *info,
+				union iwreq_data *wrqu, char *extra)
 {
 
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -1118,8 +1120,8 @@  static int r8180_wx_set_auth(struct net_device *dev,
 }
 
 static int r8180_wx_set_mlme(struct net_device *dev,
-										struct iw_request_info *info,
-										union iwreq_data *wrqu, char *extra)
+			     struct iw_request_info *info,
+			     union iwreq_data *wrqu, char *extra)
 {
 	int ret = 0;
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -1333,7 +1335,7 @@  static iw_handler r8180_private_handler[] = {
 };
 
 static inline int is_same_network(struct ieee80211_network *src,
-									struct ieee80211_network *dst,
+				  struct ieee80211_network *dst,
 				  struct ieee80211_device *ieee)
 {
 		/* A network is only a duplicate if the channel, BSSID, ESSID
diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c
index 978dc5f..3e582c6 100644
--- a/drivers/staging/rtl8187se/r8185b_init.c
+++ b/drivers/staging/rtl8187se/r8185b_init.c
@@ -795,9 +795,10 @@  static u8 GetSupportedWirelessMode8185(struct net_device *dev)
 	return WIRELESS_MODE_B | WIRELESS_MODE_G;
 }
 
-static void ActUpdateChannelAccessSetting(struct net_device *dev,
-				   WIRELESS_MODE WirelessMode,
-				   PCHANNEL_ACCESS_SETTING ChnlAccessSetting)
+static void
+ActUpdateChannelAccessSetting(struct net_device *dev,
+			      WIRELESS_MODE WirelessMode,
+			      PCHANNEL_ACCESS_SETTING ChnlAccessSetting)
 {
 	AC_CODING	eACI;
 
@@ -984,7 +985,8 @@  static bool MgntDisconnect(struct net_device *dev, u8 asRsn)
  *	Assumption:
  *		PASSIVE LEVEL.
  */
-static bool SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
+static bool SetRFPowerState(struct net_device *dev,
+			    RT_RF_POWER_STATE eRFPowerState)
 {
 	struct	r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	bool	bResult = false;
@@ -997,7 +999,8 @@  static bool SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerSt
 	return bResult;
 }
 
-bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet, u32 ChangeSource)
+bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet,
+			 u32 ChangeSource)
 {
 	struct	r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
 	bool	bActionAllowed = false;