summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u
AgeCommit message (Collapse)AuthorFilesLines
2015-11-15staging: rtl8192u: Remove unnecessary functionAmitoj Kaur Chawla1-20/+5
This patch solves two problems. The function rtl8192_CalculateBitShift() had an unnecessary variable i that could be removed by using a single line of code. After this change, rtl8192_CalculateBitShift() becomes a wrapper function, so the rtl8192_CalculateBitShift() function has been removed completely to replace it with a single line of code. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15Staging: rtl8192u: Remove unused functionKsenija Stanojevic1-15/+0
Function rtl8192_try_wake_queue is defined but not used, so remove it. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: rtl8192u: ieee80211: added missing blank linesKurt Kanzenbach1-0/+5
This patch resolves the following checkpatch warnings: - WARNING: Missing a blank line after declarations Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: rtl8192u: ieee80211: removed unnecessary bracesKurt Kanzenbach1-4/+2
This patch fixes the following checkpatch warning: - WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: rtl8192u: ieee80211: corrected block commentsKurt Kanzenbach1-10/+21
This patch reformats some block comments in order to match the Linux kernel coding style. Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: rtl8192u: ieee80211: corrected indentKurt Kanzenbach1-5/+5
This patch corrects the indentation in five instances in the ieee80211_crypt_tkip.c file. Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: rtl8192u: ieee80211: added missing spaces after ifKurt Kanzenbach1-2/+2
This patch fixes the following checkpatch error: - ERROR: space required before the open parenthesis '(' Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: rtl8192u: ieee80211: added missing space around '='Kurt Kanzenbach1-1/+1
This patch fixes the following checkpatch error: - ERROR: spaces required around that '=' Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: rtl8192u: ieee80211: fixed position of else statementsKurt Kanzenbach1-4/+2
This patch fixes the following checkpatch error: - ERROR: else should follow close brace '}' Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29Staging: rtl8192u: ieee80211: fixed open brace positionsKurt Kanzenbach1-12/+6
This patch fixes the following checkpatch error: - ERROR: that open brace { should be on the previous line Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: rtl8192u: ieee80211: Do not export static functionAmitoj Kaur Chawla1-1/+0
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>
2015-10-24Staging: rtl8192u: Eliminate use of MSECS macroShraddha Barke1-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>
2015-10-24staging: rtl8192u: simplify conditionalLuis de Bethencourt1-5/+1
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>
2015-10-16Staging: rtl8192u: ieee80211_rx: Remove unnecessary codeShivani Bhardwaj1-4/+0
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>
2015-10-16Staging: rtl8192u: ieee80211_softmac: Remove extra NULL checkShivani Bhardwaj1-4/+2
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>
2015-10-13rtl8192u: BIT() macro cleanupAnish Bhatt8-199/+139
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>
2015-10-12staging: rtl8192u: r8192U_wx: fix negative noise and level valuesLuis de Bethencourt1-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>
2015-10-12staging: rtl8192u: r8192U_core: fix negative noise valueLuis de Bethencourt1-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>
2015-10-12Staging: rtl8192u: ieee80211: ieee80211_rx: Remove commented printk messagesShraddha Barke1-14/+1
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>
2015-10-12Staging: rtl8192u: ieee80211: ieee80211_wx: Remove commented printk messagesShraddha Barke1-8/+0
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>
2015-10-12Staging: rtl8192u: ieee80211: ieee80211_softmac: Remove commented printk ↵Shraddha Barke1-3/+0
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>
2015-10-12Staging: rtl8192u: Do not DMA on the stackKsenija Stanojevic1-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>
2015-10-02Staging: rtl8192u: Remove spaces at the start of linesmike dupuis1-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>
2015-10-02Staging: rtl8192u: Correct open brace placementmike dupuis1-4/+2
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-02Staging: rtl8192u: Fix block comment formattingmike dupuis1-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>
2015-10-02Staging: rtl8192u: missing blank lines after declarationsmike dupuis1-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>
2015-10-02Staging: rtl8192u: quoted strings split across linesmike dupuis1-16/+11
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-09-29Staging: rtl819u: Fix brace styling issuesmike dupuis1-6/+3
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-29Staging: rtl8192u: spaces required around = operatormike dupuis1-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>
2015-09-29Staging: rtl8192u: add spaces around == and || operatorsmike dupuis1-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>
2015-09-29Staging: rtl8192u: move open braces to previous linesmike dupuis1-6/+3
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-29Staging: rtl8192u: add missing blank lines after declarationsmike dupuis1-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>
2015-09-29Staging: rtl8192u: space required after ','mike dupuis1-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>
2015-09-20staging: rtl8192u: r8192U_core: add line breaks to keep lines under 80 ↵Raphaël Beamonte1-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>
2015-09-16staging: rtl8192u: r8192U_core: fix comments lines over 80 charactersRaphaël Beamonte1-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>
2015-09-15staging/rtl8192u: remove unused functionNicolas Joseph1-44/+0
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>
2015-09-15Staging: rlt8192u: Remove spaces at the start of linesMike Dupuis1-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>
2015-09-15Staging: rtl8192u: do not use C99 // commentsMike Dupuis1-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>
2015-09-15Staging: rtl8192u: suspect code indent for conditional statmentMike Dupuis1-3/+2
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-15Staging: rtl8192u: space required before open parenthesesMike Dupuis1-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>
2015-09-14Staging: rtl8192u: Remove unnecessary printkShraddha Barke1-1/+0
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-12Staging: rtl8192u: space prohibited before close parenthesismike dupuis1-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>
2015-09-12Staging: rtl8192u: space required after close bracesmike dupuis1-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>
2015-09-12Staging: rtl8192u: space required before open bracesmike dupuis1-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>
2015-09-12Staging: rtl8192u: Space not allowed after &mike dupuis1-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>
2015-09-12Staging: rtl8192u: ieee80211: ieee80211_softmac.c: Replace "#include ↵Shraddha Barke1-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>
2015-09-12Staging: rtl8192u: ieee80211: ieee80211_module.c: Replace "#include ↵Shraddha Barke1-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>
2015-09-12Staging: rtl8192u: ieee80211: Replace "#include <asm/uaccess>" with ↵Shraddha Barke1-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>
2015-09-12staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code ↵Raphaël Beamonte1-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>
2015-09-12Staging: rtl819u: ieee80211: Remove unused variableShraddha Barke1-2/+0
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>