Commit Graph

536 Commits

Author SHA1 Message Date
mike dupuis
0c9fc85c0e Staging: rtl8192u: Remove spaces at the start of lines
This is a patch to correct indentation in one instance in
ieee80211_crypt_ccmp.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:52:26 +02:00
mike dupuis
d9098c551a Staging: rtl8192u: Correct open brace placement
This is a patch to move open braces to the appropriate lines in
two instances in ieee80211_crypt_ccmp.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:52:26 +02:00
mike dupuis
27a98a28e0 Staging: rtl8192u: Fix block comment formatting
This is a patch to correct block comment formatting in two
instances in ieee80211_crypt_ccmp.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:52:26 +02:00
mike dupuis
28b70100da Staging: rtl8192u: missing blank lines after declarations
This is a patch to add missing lines after variable decalarations
in two functions in ieee80211_crypt_ccmp.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:52:26 +02:00
mike dupuis
2043397283 Staging: rtl8192u: quoted strings split across lines
This is a patch to fix up instances where quoted strings are split
across multiple lines in several instances in ieee80211_crypt_ccmp.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:52:26 +02:00
mike dupuis
c3a5536a7d Staging: rtl819u: Fix brace styling issues
This is a patch to correct two flavors of brace styling issues in
ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:29:03 +02:00
mike dupuis
7b85e56beb Staging: rtl8192u: spaces required around = operator
This is a patch to add spaces around = operators in several instances
in ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:29:02 +02:00
mike dupuis
0bde11cb45 Staging: rtl8192u: add spaces around == and || operators
This is a patch to add missing spaces around == and || operators in one
instance in ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:29:02 +02:00
mike dupuis
b117d1a0da Staging: rtl8192u: move open braces to previous lines
This is a patch to move opening braces to the lines on which their
corresponding if-statements exist in ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:29:02 +02:00
mike dupuis
dbb192d151 Staging: rtl8192u: add missing blank lines after declarations
This is a patch to add blank lines after declaration ins several
instances in iee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:29:02 +02:00
mike dupuis
dc9db95017 Staging: rtl8192u: space required after ','
This is a fix to add spaces after commas in ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:29:02 +02:00
Raphaël Beamonte
069b316259 staging: rtl8192u: r8192U_core: add line breaks to keep lines under 80 characters
Add line breaks in multiple lines to keep them under 80 characters,
as to follow the kernel code style.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:16:13 -07:00
Raphaël Beamonte
0063fdfb12 staging: rtl8192u: r8192U_core: fix comments lines over 80 characters
Move, replace and reorganize comments to stay under 80 characters
per line, as to follow the kernel code style. Some unuseful comments
have been removed.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:52:29 -07:00
Nicolas Joseph
703b0d4bbb staging/rtl8192u: remove unused function
Remove unused function N_DBPSOfRate. This function was only used by
function ComputeTxTime that was removed in the previous
commit 742728f97a ("staging: rtl8192u: remove unused function.")

Signed-off-by: Nicolas Joseph <nicolas.joseph@homecomputing.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:47:06 -07:00
Mike Dupuis
70b49cd526 Staging: rlt8192u: Remove spaces at the start of lines
This is a patch to remove spaces at the start of lines in
ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:36:25 -07:00
Mike Dupuis
1dfec54516 Staging: rtl8192u: do not use C99 // comments
This is a patch to convert C99-style comments to C89-style comments in
ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:36:24 -07:00
Mike Dupuis
e9bcffdc77 Staging: rtl8192u: suspect code indent for conditional statment
This is a patch to correct an improperly indented block of code in
ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:36:24 -07:00
Mike Dupuis
96d6a31837 Staging: rtl8192u: space required before open parentheses
This is a patch to add spaces where required before open parentheses in
ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:36:24 -07:00
Shraddha Barke
433c7f8fe2 Staging: rtl8192u: Remove unnecessary printk
This patch removes the commented printk inside else block as
it is not needed.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:44 -07:00
mike dupuis
077d4575c9 Staging: rtl8192u: space prohibited before close parenthesis
This is a style change to remove whitespace before close parentheses in
ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:59 -07:00
mike dupuis
a02c67382d Staging: rtl8192u: space required after close braces
This is a style change to insert spaces before closed braces in
ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:59 -07:00
mike dupuis
c5ad7c0ece Staging: rtl8192u: space required before open braces
This is a change to add spaces before open braces to
ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:59 -07:00
mike dupuis
4fee29ba6f Staging: rtl8192u: Space not allowed after &
This is a change to ieee80211_softmac_wx.c to remove spaces after unary
& operators.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:59 -07:00
Shraddha Barke
03c7da4fe1 Staging: rtl8192u: ieee80211: ieee80211_softmac.c: Replace "#include <asm/uaccess>" with "#include <linux/uaccess>"
Fix checkpatch.pl warning "Use #include <linux/uaccess.h>
instead of <asm/uaccess.h>"

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:58 -07:00
Shraddha Barke
2245e1492e Staging: rtl8192u: ieee80211: ieee80211_module.c: Replace "#include <asm/uaccess>" with "#include <linux/uaccess>"
Fix checkpatch.pl warning "Use #include <linux/uaccess.h>
instead of <asm/uaccess.h>"

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:58 -07:00
Shraddha Barke
aecdac15d9 Staging: rtl8192u: ieee80211: Replace "#include <asm/uaccess>" with "#include <linux/uaccess>"
Fix checkpatch.pl warning "Use #include <linux/uaccess.h> instead of
<asm/uaccess.h>"

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:58 -07:00
Raphaël Beamonte
4e0407b453 staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

The values used are stored as dev_addr in net_device (declared in
include/linux/netdevice.h) and sa_data in sockaddr (declared in
include/linux/socket.h). Both these elements are u16 aligned as
shown by using pahole (position must be a multiple of sizeof(u16)):
unsigned char *            dev_addr;             /*   888     8 */
char                       sa_data[14];          /*     2    14 */

It is thus safe to use ether_addr_copy() instead of memcpy() for
that call, as it is already done in multiple files in the Linux
kernel sources:
  drivers/net/ethernet/broadcom/genet/bcmgenet.c
  drivers/net/ethernet/brocade/bna/bnad.c
  drivers/net/ethernet/emulex/benet/be_main.c
  drivers/net/ethernet/ezchip/nps_enet.c
  drivers/net/ethernet/ibm/ibmveth.c
  drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
  drivers/net/ethernet/intel/i40e/i40e_main.c
  drivers/net/ethernet/mellanox/mlx5/core/en_main.c
  drivers/net/usb/lan78xx.c
  net/8021q/vlan_dev.c
  net/batman-adv/soft-interface.c
  net/dsa/slave.c

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:54 -07:00
Shraddha Barke
d40d3e117a Staging: rtl819u: ieee80211: Remove unused variable
This patch discards the variable count as it is not used anywhere
throughout the kernel.

Build tested it.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:37 -07:00
Raphaël Beamonte
85a22e42f5 staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue
Quoted strings should not be split to help text grep in the source.
All quoted strings that were split have thus been merged to one unique
quoted string each to follow the code style.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:35 -07:00
Raphaël Beamonte
7b25c24e3f staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue
Adds whitespaces to separate the variables declarations and the
function content.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:35 -07:00
Raphaël Beamonte
25e4b9d586 staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style issue
Whitespaces are not necessary before a quoted newline. Remove those.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:34 -07:00
Raphaël Beamonte
9647a6d534 staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue
An else statement is not useful after a return.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:34 -07:00
Raphaël Beamonte
2054df8690 staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style issue
Two sets of parentheses were used to contain the same statement.
In those cases, one of them has been removed, as unnecessary.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:34 -07:00
Raphaël Beamonte
efe8a7fad5 staging: rtl8192u: r8192U_core: fix unnecessary check before kfree code style issue
kfree(NULL) is safe and the checks were not required.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:34 -07:00
Raphaël Beamonte
b31c101350 staging: rtl8192u: r8192U_core: remove forward declarations in .c file
Checkpatch was giving a "externs should be avoided in .c files" because
of these forward declarations. As these were not useful in this case,
they have been removed.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:34 -07:00
Raphaël Beamonte
cf47ca0225 staging: rtl8192u: r8192U_core: fix unecessary braces code style issue
braces {} are not necessary for any arm of a statement containing
one statement on each side.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:34 -07:00
Raphaël Beamonte
4c21f566c7 staging: rtl8192u: r8192U_core: remove return statement of void function
void function return statement was not useful in this case.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:34 -07:00
Raphaël Beamonte
8f94967a4b staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h
Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:33 -07:00
Raphaël Beamonte
14285c1f97 staging: rtl8192u: r8192U_core: clean C99 // comments
Replace C99 // comments by /* comments */ to follow the
kernel code style. Remove some unuseful comments.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:33 -07:00
Raphaël Beamonte
74a0266c07 staging: rtl8192u: r8192U_core: whitespace neatening to fix consistent spacing code style errors
Clean-up the file by using a cleaner spacing around symbols and
words. Mostly use the automatic checkpatch whitespacing fixes.
This takes care of the consistent spacing errors reported by
checkpatch.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:33 -07:00
Raphaël Beamonte
b54cc8d8e8 staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error
A missing struct keyword in variable declaration triggered a
need consistent spacing around '*' code style error. The struct
keyword thus has been added everywhere for the rtl8192_rx_info
struct, and therefore its typedef removed as not needed anymore.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:33 -07:00
Raphaël Beamonte
70cdcac563 staging: rtl8192u: r8192U_core: fix else following close brace code style error
Fix "else should follow close brace" checkpatch error.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:33 -07:00
Raphaël Beamonte
c745f26770 staging: rtl8192u: r8192U_core: fix code indent using spaces code style error
Fix "code indent should use tabs where possible" checkpatch error

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:33 -07:00
Raphaël Beamonte
28071d3400 staging: rtl8192u: r8192U_core: fix space before close parenthesis code style error
A space existed before the close parenthesis of an if statement. This patch
removes it to follow the kernel code style.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:32 -07:00
Raphaël Beamonte
a7be027984 staging: rtl8192u: r8192U_core: fix switch and case indent code style error
Some switch and case were not be at the same indent level.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:32 -07:00
Joe Perches
beb1216708 staging: rtl8192u: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignments

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:57 -07:00
Kent Gustavsson
5bb546f755 staging: rtl8192u: r819xU_firmware: fix coding style
Line over 80 characters. This is for Eudyptula Challenge

Signed-off-by: Kent Gustavsson <kent@minoris.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 17:48:17 -07:00
Freeman Zhang
bd1ccd3315 staging: rtl8192u: Fix checkpatch issue with comma in r819xU_firmware.c
Add space after ',' to fix the error message provided by checkpatch.pl:
ERROR: space required after that ','

Signed-off-by: Freeman Zhang <freeman.zhang1992@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:14:53 -07:00
Luis de Bethencourt
2ee4c3dc55 staging: rtl8192u: remove unneeded bool
bool Reval is set to match the value of bHalfWirelessN24GMode just to
this. The value can be returned directly. Removing uneeded bool.

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Suggested-by: Joe Perches <joe@perches.com>
Suggested-by: Franks Klaver <fransklaver@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:03:04 -07:00
Luis de Bethencourt
f9bd549aa9 staging: rtl8192u: remove bool comparisons
Remove explicit true/false comparisons to bool variables.

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:03:04 -07:00