summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u
Commit message (Collapse)AuthorAgeFilesLines
* staging: rtl8192u: ieee80211: Do not export static functionAmitoj Kaur Chawla2015-10-271-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | Remove the export symbol for static function. The semantic patch used to find this is: // <smpl> @r@ type T; identifier f; @@ static T f (...) { ... } @@ identifier r.f; declarer name EXPORT_SYMBOL; @@ -EXPORT_SYMBOL(f); // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Eliminate use of MSECS macroShraddha Barke2015-10-251-1/+1
| | | | | | | | | | | | | | Use msecs_to_jiffies instead of driver specific macro MSECS. This is done using Coccinelle and semantic patch used for this is as follows: @@expression t;@@ - MSECS(t) + msecs_to_jiffies(t) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: simplify conditionalLuis de Bethencourt2015-10-251-5/+1Star
| | | | | | | | The code can be much cleaner and readable by simplifying the conditional statement. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: ieee80211_rx: Remove unnecessary codeShivani Bhardwaj2015-10-171-4/+0Star
| | | | | | | | | | | | | | | | | | | | | The variable frame_authorized is declared and mentioned in the code but is not used anywhere so, it should be removed. Also, two case statements are merged by removing an extra break. Semantic patch used: @@ type T; identifier i; constant C; position p != e.p; @@ - T i@p; <+... when != i - i = C; ...+> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: ieee80211_softmac: Remove extra NULL checkShivani Bhardwaj2015-10-171-4/+2Star
| | | | | | | Remove NULL check on a variable as it is already preceded by one. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: BIT() macro cleanupAnish Bhatt2015-10-138-199/+139Star
| | | | | | | | Use the BIT(x) macro directly instead using multiple BITX defines. Signed-off-by: Anish Bhatt <anish@gatech.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_wx: fix negative noise and level valuesLuis de Bethencourt2015-10-131-2/+2
| | | | | | | | | | range->max_qual.noise and level are of type uint8, so they shouldn't be assigned a negative number. Assigning them 0x100 - 98, and 0x100 - 78 which are the equivalent to -98 dBm and -78 dBm, respectively, when IW_QUAL_DBM is set. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_core: fix negative noise valueLuis de Bethencourt2015-10-131-2/+2
| | | | | | | | | ieee80211_rx_stats.noise is of type uint8, so it shouldn't be assigned a negative number. Assigning it 0x100 - 98, which is the equivalent to -98 dBm when IW_QUAL_DBM is set. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: ieee80211: ieee80211_rx: Remove commented printk messagesShraddha Barke2015-10-131-14/+1Star
| | | | | | | | | Remove commented out printk messages since they are not needed. Also remove the unnecessary braces and blank lines Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: ieee80211: ieee80211_wx: Remove commented printk messagesShraddha Barke2015-10-131-8/+0Star
| | | | | | | | Remove commented out printk messages since they are not needed Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: ieee80211: ieee80211_softmac: Remove commented printk ↵Shraddha Barke2015-10-131-3/+0Star
| | | | | | | | | | messages Remove commented printk since it is not needed Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Do not DMA on the stackKsenija Stanojevic2015-10-131-9/+63
| | | | | | | | | | Fix error "doing DMA on the stack" by using kzalloc for buffer allocation. Issue found by smatch. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Remove spaces at the start of linesmike dupuis2015-10-021-1/+1
| | | | | | | | 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>
* Staging: rtl8192u: Correct open brace placementmike dupuis2015-10-021-4/+2Star
| | | | | | | | 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>
* Staging: rtl8192u: Fix block comment formattingmike dupuis2015-10-021-5/+5
| | | | | | | | 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>
* Staging: rtl8192u: missing blank lines after declarationsmike dupuis2015-10-021-0/+2
| | | | | | | | 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>
* Staging: rtl8192u: quoted strings split across linesmike dupuis2015-10-021-16/+11Star
| | | | | | | | 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>
* Staging: rtl819u: Fix brace styling issuesmike dupuis2015-09-291-6/+3Star
| | | | | | | | 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>
* Staging: rtl8192u: spaces required around = operatormike dupuis2015-09-291-5/+5
| | | | | | | | 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>
* Staging: rtl8192u: add spaces around == and || operatorsmike dupuis2015-09-291-1/+1
| | | | | | | | 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>
* Staging: rtl8192u: move open braces to previous linesmike dupuis2015-09-291-6/+3Star
| | | | | | | | 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>
* Staging: rtl8192u: add missing blank lines after declarationsmike dupuis2015-09-291-0/+3
| | | | | | | | 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>
* Staging: rtl8192u: space required after ','mike dupuis2015-09-291-1/+1
| | | | | | | 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>
* staging: rtl8192u: r8192U_core: add line breaks to keep lines under 80 ↵Raphaël Beamonte2015-09-211-199/+409
| | | | | | | | | | 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>
* staging: rtl8192u: r8192U_core: fix comments lines over 80 charactersRaphaël Beamonte2015-09-171-79/+153
| | | | | | | | | 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>
* staging/rtl8192u: remove unused functionNicolas Joseph2015-09-151-44/+0Star
| | | | | | | | | Remove unused function N_DBPSOfRate. This function was only used by function ComputeTxTime that was removed in the previous commit 742728f97a99 ("staging: rtl8192u: remove unused function.") Signed-off-by: Nicolas Joseph <nicolas.joseph@homecomputing.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rlt8192u: Remove spaces at the start of linesMike Dupuis2015-09-151-4/+4
| | | | | | | | 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>
* Staging: rtl8192u: do not use C99 // commentsMike Dupuis2015-09-151-14/+14
| | | | | | | | 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>
* Staging: rtl8192u: suspect code indent for conditional statmentMike Dupuis2015-09-151-3/+2Star
| | | | | | | | 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>
* Staging: rtl8192u: space required before open parenthesesMike Dupuis2015-09-151-6/+6
| | | | | | | | 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>
* Staging: rtl8192u: Remove unnecessary printkShraddha Barke2015-09-141-1/+0Star
| | | | | | | | 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>
* Staging: rtl8192u: space prohibited before close parenthesismike dupuis2015-09-131-2/+2
| | | | | | | | 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>
* Staging: rtl8192u: space required after close bracesmike dupuis2015-09-131-3/+3
| | | | | | | | 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>
* Staging: rtl8192u: space required before open bracesmike dupuis2015-09-131-9/+9
| | | | | | | | 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>
* Staging: rtl8192u: Space not allowed after &mike dupuis2015-09-131-2/+2
| | | | | | | | 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>
* Staging: rtl8192u: ieee80211: ieee80211_softmac.c: Replace "#include ↵Shraddha Barke2015-09-131-1/+1
| | | | | | | | | | <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>
* Staging: rtl8192u: ieee80211: ieee80211_module.c: Replace "#include ↵Shraddha Barke2015-09-131-1/+1
| | | | | | | | | | <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>
* Staging: rtl8192u: ieee80211: Replace "#include <asm/uaccess>" with ↵Shraddha Barke2015-09-131-1/+1
| | | | | | | | | | "#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>
* staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code ↵Raphaël Beamonte2015-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Staging: rtl819u: ieee80211: Remove unused variableShraddha Barke2015-09-131-2/+0Star
| | | | | | | | | | 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>
* staging: rtl8192u: r8192U_core: fix quoted string split across lines code ↵Raphaël Beamonte2015-09-131-4/+4
| | | | | | | | | | | 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>
* staging: rtl8192u: r8192U_core: fix missing blank line after declarations ↵Raphaël Beamonte2015-09-131-3/+41
| | | | | | | | | | 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>
* staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style issueRaphaël Beamonte2015-09-131-6/+6
| | | | | | | 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>
* staging: rtl8192u: r8192U_core: fix unnecessary else after return code style ↵Raphaël Beamonte2015-09-131-17/+14Star
| | | | | | | | | 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>
* staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style issueRaphaël Beamonte2015-09-131-2/+2
| | | | | | | | 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>
* staging: rtl8192u: r8192U_core: fix unnecessary check before kfree code ↵Raphaël Beamonte2015-09-131-8/+5Star
| | | | | | | | | 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>
* staging: rtl8192u: r8192U_core: remove forward declarations in .c fileRaphaël Beamonte2015-09-131-6/+0Star
| | | | | | | | | 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>
* staging: rtl8192u: r8192U_core: fix unecessary braces code style issueRaphaël Beamonte2015-09-131-6/+4Star
| | | | | | | | 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>
* staging: rtl8192u: r8192U_core: remove return statement of void functionRaphaël Beamonte2015-09-131-1/+0Star
| | | | | | | 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>
* staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.hRaphaël Beamonte2015-09-131-1/+1
| | | | | | | 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>