staging/rtl8187se: Fix spacing coding style in r8180_dm.h
PATCH 1/16 staging/rtl8187se: Fix spacing coding style in r8180_dm.h
The following errors fixed.-ERROR: "foo * bar" should be "foo *bar"
--- drivers/staging/rtl8187se/r8180_dm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8187se/r8180_dm.h +2 -2
@@ -13,10 +13,10 @@ bool CheckDig(struct net_device *dev);bool CheckHighPower (struct net_device *dev);void rtl8180_hw_dig_wq (struct work_struct *work);void rtl8180_tx_pw_wq (struct work_struct *work); -void rtl8180_rate_adapter (struct work_struct * work); +void rtl8180_rate_adapter (struct work_struct *work);void TxPwrTracking87SE (struct net_device *dev);bool CheckTxPwrTracking (struct net_device *dev); -void rtl8180_rate_adapter (struct work_struct * work); +void rtl8180_rate_adapter (struct work_struct *work);void timer_rate_adaptive (unsigned long data);
Signature · 1 line
1.7.9.5
PATCH 2/16 staging/rtl8187se: Fix include file issue in ieee80211/ieee80211_crypt.c
The following warnings fixed.
- WARNING: Use #include <linux/string.h> instead of <asm/string.h>
- WARNING: Use #include <linux/errno.h> instead of <asm/errno.h>
--- .../staging/rtl8187se/ieee80211/ieee80211_crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c +2 -2
@@ -15,8 +15,8 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> -#include <asm/string.h> -#include <asm/errno.h> +#include <linux/string.h> +#include <linux/errno.h> #include "ieee80211.h"
Signature · 1 line
1.7.9.5
PATCH 3/16 staging/rtl8187se: Use pr_ printks in ieee80211/ieee80211_crypt.c
In reply to YAMANE ToshiakiThe following warnings fixed.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
and add pr_fmt.
--- .../staging/rtl8187se/ieee80211/ieee80211_crypt.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c +7 -9
@@ -11,6 +11,8 @@* */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +//#include <linux/config.h> #include <linux/module.h> #include <linux/init.h>
@@ -66,8 +68,7 @@ void ieee80211_crypt_deinit_handler(unsigned long data)spin_lock_irqsave (&ieee->lock, flags);ieee80211_crypt_deinit_entries (ieee,0 );if (!list_empty (&ieee->crypt_deinit_list)) { -printk (KERN_DEBUG "%s: entries remaining in delayed crypt " -"deletion list\n" , ieee->dev->name); +pr_debug ("entries remaining in delayed crypt deletion list\n" ); ieee->crypt_deinit_timer.expires = jiffies +HZ ;add_timer (&ieee->crypt_deinit_timer); }
@@ -118,8 +119,7 @@ int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops)list_add (&alg->list, &hcrypt->algs);spin_unlock_irqrestore (&hcrypt->lock, flags); -printk (KERN_DEBUG "ieee80211_crypt: registered algorithm '%s'\n" , - ops->name); +pr_debug ("registered algorithm '%s'\n" , ops->name);return 0 ; }
@@ -146,8 +146,7 @@ int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops)spin_unlock_irqrestore (&hcrypt->lock, flags);if (del_alg) { -printk (KERN_DEBUG "ieee80211_crypt: unregistered algorithm " -"'%s'\n" , ops->name); +pr_debug ("unregistered algorithm '%s'\n" , ops->name);kfree (del_alg); }
@@ -234,9 +233,8 @@ void ieee80211_crypto_deinit(void) alg = list_entry(ptr, struct ieee80211_crypto_alg, list);if (alg) {list_del (ptr); -printk (KERN_DEBUG -"ieee80211_crypt: unregistered algorithm '%s' (deinit)\n" , - alg->ops->name); +pr_debug ("unregistered algorithm '%s' (deinit)\n" , + alg->ops->name);kfree (alg); } }
Signature · 1 line
1.7.9.5
PATCH 4/16 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt.c
In reply to YAMANE ToshiakiThe following errors fixed.-ERROR: "foo * bar" should be "foo *bar"
--- .../staging/rtl8187se/ieee80211/ieee80211_crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c +2 -2
@@ -154,7 +154,7 @@ int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops) } -struct ieee80211_crypto_ops *ieee80211_get_crypto_ops (const char *name) +struct ieee80211_crypto_ops *ieee80211_get_crypto_ops (const char *name) {unsigned long flags;struct list_head *ptr;
@@ -181,7 +181,7 @@ struct ieee80211_crypto_ops * ieee80211_get_crypto_ops(const char *name) } -static void *ieee80211_crypt_null_init (int keyidx) {return (void *)1 ; } +static void *ieee80211_crypt_null_init (int keyidx) {return (void *)1 ; }static void ieee80211_crypt_null_deinit (void *priv) {}static struct ieee80211_crypto_ops ieee80211_crypt_null = {
Signature · 1 line
1.7.9.5
PATCH 5/16 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt.h
In reply to YAMANE ToshiakiThe following error fixed.-ERROR: "foo * bar" should be "foo *bar"
--- .../staging/rtl8187se/ieee80211/ieee80211_crypt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h +1 -1
@@ -77,7 +77,7 @@ struct ieee80211_crypt_data {int ieee80211_register_crypto_ops (struct ieee80211_crypto_ops *ops);int ieee80211_unregister_crypto_ops (struct ieee80211_crypto_ops *ops); -struct ieee80211_crypto_ops *ieee80211_get_crypto_ops (const char *name); +struct ieee80211_crypto_ops *ieee80211_get_crypto_ops (const char *name);void ieee80211_crypt_deinit_entries (struct ieee80211_device *,int );void ieee80211_crypt_deinit_handler (unsigned long ); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee,
Signature · 1 line
1.7.9.5
PATCH 6/16 staging/rtl8187se: Fix include file issue in ieee80211/ieee80211_module.c
In reply to YAMANE ToshiakiThe following warning fixed.
- WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
--- .../staging/rtl8187se/ieee80211/ieee80211_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_module.c +1 -1
@@ -48,7 +48,7 @@#include <linux/types.h> #include <linux/wireless.h> #include <linux/etherdevice.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> #include <net/arp.h> #include <net/net_namespace.h>
Signature · 1 line
1.7.9.5
PATCH 7/16 staging/rtl8187se: Use netdev_ printks in ieee80211/ieee80211_module.c
In reply to YAMANE ToshiakiThe following warning fixed.
- WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ...
--- .../staging/rtl8187se/ieee80211/ieee80211_module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_module.c +1 -2
@@ -69,8 +69,7 @@ static inline int ieee80211_networks_allocate(struct ieee80211_device *ieee)MAX_NETWORK_COUNT ,sizeof (struct ieee80211_network ), GFP_KERNEL);if (!ieee->networks) { -printk (KERN_WARNING "%s: Out of memory allocating beacons\n" , - ieee->dev->name); +netdev_warn (ieee->dev,"Out of memory allocating beacons\n" );return -ENOMEM ; }
Signature · 1 line
1.7.9.5
PATCH 8/16 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_module.c
In reply to YAMANE ToshiakiThe following errors and warnings fixed.
- ERROR: space required after that ',' (ctx:VxV)
- ERROR: code indent should use tabs where possible
- WARNING: please, no space before tabs
- WARNING: please, no spaces at the start of a line
- WARNING: suspect code indent for conditional statements (8, 10)
--- .../staging/rtl8187se/ieee80211/ieee80211_module.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_module.c +9 -9
@@ -99,7 +99,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv) {struct ieee80211_device *ieee;struct net_device *dev; -int i,err; +int i, err;IEEE80211_DEBUG_INFO ("Initializing...\n" );
@@ -139,11 +139,11 @@ struct net_device *alloc_ieee80211(int sizeof_priv)spin_lock_init (&ieee->wpax_suitlist_lock); ieee->wpax_type_set =0 ; - ieee->wpa_enabled =0 ; - ieee->tkip_countermeasures =0 ; - ieee->drop_unencrypted =0 ; - ieee->privacy_invoked =0 ; - ieee->ieee802_1x =1 ; + ieee->wpa_enabled =0 ; + ieee->tkip_countermeasures =0 ; + ieee->drop_unencrypted =0 ; + ieee->privacy_invoked =0 ; + ieee->ieee802_1x =1 ; ieee->raw_tx =0 ;ieee80211_softmac_init (ieee);
@@ -152,9 +152,9 @@ struct net_device *alloc_ieee80211(int sizeof_priv)INIT_LIST_HEAD (&ieee->ibss_mac_hash[i]);for (i =0 ; i <17 ; i++) { - ieee->last_rxseq_num[i] =-1 ; - ieee->last_rxfrag_num[i] =-1 ; - ieee->last_packet_time[i] =0 ; + ieee->last_rxseq_num[i] =-1 ; + ieee->last_rxfrag_num[i] =-1 ; + ieee->last_packet_time[i] =0 ; }//These function were added to load crypte module autoly ieee80211_tkip_null ();
Signature · 1 line
1.7.9.5
PATCH 9/16 staging/rtl8187se: Fix include file issue in ieee80211/ieee80211_crypt_ccmp.c
In reply to YAMANE ToshiakiThe following warnings fixed.
- WARNING: Use #include <linux/string.h> instead of <asm/string.h>
--- .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c +1 -1
@@ -18,7 +18,7 @@#include <linux/netdevice.h> #include <linux/if_ether.h> #include <linux/if_arp.h> -#include <asm/string.h> +#include <linux/string.h> #include <linux/wireless.h> #include "ieee80211.h"
Signature · 1 line
1.7.9.5
PATCH 10/16 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt_ccmp.c
In reply to YAMANE ToshiakiThe following errors fixed.-ERROR: "foo * bar" should be "foo *bar"
--- .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c +2 -2
@@ -64,7 +64,7 @@ void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,crypto_cipher_encrypt_one ((void *)tfm, ct, pt); } -static void *ieee80211_ccmp_init (int key_idx) +static void *ieee80211_ccmp_init (int key_idx) {struct ieee80211_ccmp_data *priv;
@@ -415,7 +415,7 @@ static int ieee80211_ccmp_get_key(void *key, int len, u8 *seq, void *priv) } -static char *ieee80211_ccmp_print_stats (char *p,void *priv) +static char *ieee80211_ccmp_print_stats (char *p,void *priv) {struct ieee80211_ccmp_data *ccmp = priv; p += sprintf(p, "key[%d] alg=CCMP key_set=%d "
Signature · 1 line
1.7.9.5
PATCH 11/16 staging/rtl8187se: Use pr_ printks in ieee80211/ieee80211_crypt_ccmp.c
In reply to YAMANE ToshiakiThe following warnings fixed.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
and add pr_fmt.
--- .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c | 26 +++++++++----------- 1 file changed, 12 insertions(+), 14 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c +12 -14
@@ -9,6 +9,8 @@* more details. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +//#include <linux/config.h> #include <linux/module.h> #include <linux/init.h>
@@ -75,8 +77,7 @@ static void *ieee80211_ccmp_init(int key_idx) priv->tfm = (void *)crypto_alloc_cipher ("aes" ,0 ,CRYPTO_ALG_ASYNC );if (IS_ERR (priv->tfm)) { -printk (KERN_DEBUG "ieee80211_crypt_ccmp: could not allocate " -"crypto API aes\n" ); +pr_debug ("could not allocate crypto API aes\n" ); priv->tfm =NULL ; goto fail; }
@@ -282,23 +283,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) keyidx = pos[3 ];if (!(keyidx & (1 <<5 ))) {if (net_ratelimit ()) { -printk (KERN_DEBUG "CCMP: received packet without ExtIV" -" flag from %pM\n" , hdr->addr2); +pr_debug ("received packet without ExtIV flag from %pM\n" , + hdr->addr2); } key->dot11RSNAStatsCCMPFormatErrors++;return -2 ; } keyidx >>=6 ;if (key->key_idx != keyidx) { -printk (KERN_DEBUG "CCMP: RX tkey->key_idx=%d frame " -"keyidx=%d priv=%p\n" , key->key_idx, keyidx, priv); +pr_debug ("RX tkey->key_idx=%d frame keyidx=%d priv=%p\n" , + key->key_idx, keyidx, priv);return -6 ; }if (!key->key_set) {if (net_ratelimit ()) { -printk (KERN_DEBUG "CCMP: received packet from %pM" -" with keyid=%d that does not have a configured" -" key\n" , hdr->addr2, keyidx); +pr_debug ("received packet from %pM with keyid=%d that does not have a configured key\n" , + hdr->addr2, keyidx); }return -3 ; }
@@ -313,9 +313,8 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)if (memcmp (pn, key->rx_pn,CCMP_PN_LEN ) <=0 ) {if (net_ratelimit ()) { -printk (KERN_DEBUG "CCMP: replay detected: STA=%pM" -" previous PN %pm received PN %pm\n" , - hdr->addr2, key->rx_pn, pn); +pr_debug ("replay detected: STA=%pM previous PN %pm received PN %pm\n" , + hdr->addr2, key->rx_pn, pn); } key->dot11RSNAStatsCCMPReplays++;return -4 ;
@@ -342,8 +341,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)if (memcmp (mic, a,CCMP_MIC_LEN ) !=0 ) {if (net_ratelimit ()) { -printk (KERN_DEBUG "CCMP: decrypt failed: STA=" -"%pM\n" , hdr->addr2); +pr_debug ("decrypt failed: STA=%pM\n" , hdr->addr2); } key->dot11RSNAStatsCCMPDecryptErrors++;return -5 ;
Signature · 1 line
1.7.9.5
PATCH 12/16 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt_ccmp.c
In reply to YAMANE ToshiakiThe following error and warning fixed.
- ERROR: code indent should use tabs where possible
- WARNING: braces {} are not necessary for single statement blocks
--- .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c +3 -3
@@ -129,7 +129,7 @@ static void ccmp_init_blocks(struct crypto_tfm *tfm,/* qc_included = ((WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA) && (WLAN_FC_GET_STYPE(fc) & 0x08)); -*/ +*/ // fixed by David :2006.9.6 qc_included = ((WLAN_FC_GET_TYPE (fc) ==IEEE80211_FTYPE_DATA ) && (WLAN_FC_GET_STYPE (fc) &0x80 ));
@@ -340,9 +340,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) }if (memcmp (mic, a,CCMP_MIC_LEN ) !=0 ) { -if (net_ratelimit ()) { +if (net_ratelimit ())pr_debug ("decrypt failed: STA=%pM\n" , hdr->addr2); - } + key->dot11RSNAStatsCCMPDecryptErrors++;return -5 ; }
Signature · 1 line
1.7.9.5
PATCH 13/16 staging/rtl8187se: Fix include file issue in ieee80211/ieee80211_crypt_wep.c
In reply to YAMANE ToshiakiThe following warning fixed.
- WARNING: Use #include <linux/string.h> instead of <asm/string.h>
--- .../rtl8187se/ieee80211/ieee80211_crypt_wep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c +1 -1
@@ -15,7 +15,7 @@#include <linux/slab.h> #include <linux/random.h> #include <linux/skbuff.h> -#include <asm/string.h> +#include <linux/string.h> #include "ieee80211.h"
Signature · 1 line
1.7.9.5
PATCH 14/16 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt_wep.c
In reply to YAMANE ToshiakiThe following errors fixed.-ERROR: "foo * bar" should be "foo *bar"
--- .../rtl8187se/ieee80211/ieee80211_crypt_wep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c +2 -2
@@ -40,7 +40,7 @@ struct prism2_wep_data { }; -static void *prism2_wep_init (int keyidx) +static void *prism2_wep_init (int keyidx) {struct prism2_wep_data *priv;
@@ -248,7 +248,7 @@ static int prism2_wep_get_key(void *key, int len, u8 *seq, void *priv) } -static char *prism2_wep_print_stats (char *p,void *priv) +static char *prism2_wep_print_stats (char *p,void *priv) {struct prism2_wep_data *wep = priv; p += sprintf(p, "key[%d] alg=WEP len=%d\n",
Signature · 1 line
1.7.9.5
PATCH 15/16 staging/rtl8187se: Use pr_ printks in ieee80211/ieee80211_crypt_wep.c
In reply to YAMANE ToshiakiThe following warnings fixed.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
and add pr_fmt.
--- .../rtl8187se/ieee80211/ieee80211_crypt_wep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c +4 -4
@@ -9,6 +9,8 @@* more details. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +//#include <linux/config.h> #include <linux/module.h> #include <linux/init.h>
@@ -50,15 +52,13 @@ static void *prism2_wep_init(int keyidx) priv->key_idx = keyidx; priv->tx_tfm =crypto_alloc_blkcipher ("ecb(arc4)" ,0 ,CRYPTO_ALG_ASYNC );if (IS_ERR (priv->tx_tfm)) { -printk (KERN_DEBUG "ieee80211_crypt_wep: could not allocate " -"crypto API arc4\n" ); +pr_debug ("could not allocate crypto API arc4\n" ); priv->tx_tfm =NULL ; goto fail; } priv->rx_tfm =crypto_alloc_blkcipher ("ecb(arc4)" ,0 ,CRYPTO_ALG_ASYNC );if (IS_ERR (priv->rx_tfm)) { -printk (KERN_DEBUG "ieee80211_crypt_wep: could not allocate " -"crypto API arc4\n" ); +pr_debug ("could not allocate crypto API arc4\n" ); priv->rx_tfm =NULL ; goto fail; }
Signature · 1 line
1.7.9.5
PATCH 16/16 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt_wep.c
In reply to YAMANE ToshiakiThe following errors and warnings fixed.
- ERROR: code indent should use tabs where possible
- WARNING: please, no spaces at the start of a line
--- .../rtl8187se/ieee80211/ieee80211_crypt_wep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c +2 -2
@@ -217,7 +217,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)memmove (skb->data +4 , skb->data, hdr_len);skb_pull (skb,4 );skb_trim (skb, skb->len -4 ); -return 0 ; +return 0 ; }
@@ -289,5 +289,5 @@ void ieee80211_crypto_wep_exit(void)void ieee80211_wep_null (void ) {// printk("============>%s()\n", __func__); -return ; +return ; }
Signature · 1 line
1.7.9.5