summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712
Commit message (Collapse)AuthorAgeFilesLines
* staging: rtl8712: Remove unnecessary ret variableJoseph Bisch2016-02-141-2/+1
| | | | | | | | | | Since the variable ret is set at the beginning of the function and never changes its value, we can just return the value it was set to. Found using coccinelle with misc/returnvar.cocci. Signed-off-by: Joseph Bisch <joseph.bisch@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fixed a comparision coding style warning.Rakhi Sharma2016-02-141-4/+4
| | | | | | | | WARNING: Comparisons should place the constant on the right side of the test Fixed this warning by placing the constant on right side. Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com>- Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: use list_first_entry_or_null()Geliang Tang2016-02-075-55/+34
| | | | | | | | Use list_first_entry_or_null() instead of list_empty() + LIST_CONTAINOR() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl8712_cmd: Fixed a warning.Rakhi Sharma2016-02-071-1/+1
| | | | | | | | Warning:Comparisons should place the constant on the right side of the test Fixed by placing the comparisions constant on right side of the test. Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: memory corruption in wpa_set_encryption()Dan Carpenter2016-02-071-4/+1
| | | | | | | | | | | | | ->KeyMaterial is declared as a 16 byte array, but we only ever allocate either 5 or 13 bytes of it. The problem is that we memset() all 16 bytes to zero so we're memsetting past the end of the allocated memory. I fixed this in slightly lazy way, by just allocating 16 bytes. This works but there is a lot more cleanup you could do to this code if you wanted. Which is why this code is in staging. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Remove unnecessary cast on void pointerLucas Tanure2016-02-071-30/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The conversion from void pointer to any other pointer type is guaranteed by the C programming language. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Lucas Tanure <tanure@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: consolidate kmalloc + memset 0 to kzallocNicholas Mc Guire2016-02-071-3/+1
| | | | | | | | This is an API consolidation only. The use of kmalloc + memset to 0 here is equivalent to kzalloc. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Improve suspend/resume functionality.Hemmo Nieminen2016-02-073-1/+17
| | | | | | | | | | | | Cancel pending URBs during suspend operation to avoid receiving ESHUTDOWN in read/write completion callbacks while the device is suspended. Receiving ESHUTDOWN in read/write completion callbacks will cause the driver to enter a non-functioning "stopped" state from which the driver is unable to recover without reloading the module. Signed-off-by: Hemmo Nieminen <hemmo.nieminen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Cleanup _io_ops wrappersMauro Dreissig2016-02-071-55/+22
| | | | | | | This removes ugly and unnecessary declarations. Signed-off-by: Mauro Dreissig <mukadr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove unused CamelCase defineMichael Hornung2016-02-071-1/+0
| | | | | | | | * Remove unused CamelCase in order to get rid of the corresponding checkpatch.pl "CHECK: Avoid CamelCase: <IEEE80211_QoS_DATAGRP>" Signed-off-by: Michael Hornung <mhornung.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Coding style: Fix alignmentMichael Hornung2016-02-071-1/+1
| | | | | | | * Fix alignment which did not match open parenthesis Signed-off-by: Michael Hornung <mhornung.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Replace FSF mailing address by URLMichael Hornung2016-02-071-2/+1
| | | | | | | | * Fix checkpatch.pl output about not including the paragraph about writing to the Free Software Foundation's mailing address Signed-off-by: Michael Hornung <mhornung.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Coding style: Fix missing spacesMichael Hornung2016-02-071-1/+1
| | | | | | | | * Add missing spaces around bitwise OR operation in order to get rid of checkpatch.pl's "CHECK: spaces preferred around that '|'" Signed-off-by: Michael Hornung <mhornung.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Coding style: Make use of BIT macroMichael Hornung2016-02-071-46/+46
| | | | | | | | * Replace all occurences of (1<<x) by BIT(x) in order to get rid of checkpatch.pl "CHECK" output "Prefer using the BIT macro" Signed-off-by: Michael Hornung <mhornung.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Coding style: Remove multiple blank linesMichael Hornung2016-02-071-12/+0
| | | | | | | | * Remove multiple blank lines in order to get rid of checkpatch.pl "CHECK" output Signed-off-by: Michael Hornung <mhornung.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl871x_sta_mgt: Remove wrapper functionAmitoj Kaur Chawla2016-02-071-7/+2
| | | | | | | | Remove wrapper function mfree_sta_priv_lock() that can be replaced by a direct call to mfree_all_stainfo(). Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl871x_mlme: Remove wrapper functionAmitoj Kaur Chawla2015-11-151-7/+1
| | | | | | | | | Remove wrapper function free_network_nolock() that can be replaced by a single line of code. This patch renames _free_network_nolock() function to free_network_nolock(). Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl871x_io: Remove unused functionAmitoj Kaur Chawla2015-10-291-8/+0
| | | | | | | Drop function that is declared but not called anywhere. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl871x_mp: Remove unused functionAmitoj Kaur Chawla2015-10-272-7/+0
| | | | | | | Drop unused function that is defined but is not called anywhere. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove unnecessary variablesAmitoj Kaur Chawla2015-10-271-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary variables that can be replaced with a single line of code. The semantic patch used to find this is: // <smpl> @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; expression E; @@ - T i = E; ... when != i @@ type T; identifier i; @@ - T i; ... when != i // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Replace kmalloc with kmalloc_arrayCristina Moraru2015-10-241-2/+2
| | | | | | | | | Replace kmalloc with specialized function kmalloc_array when the size is a multiplication of: number_of_elements * size_of_element Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: spaces preferred around operandsLuis de Bethencourt2015-10-2422-234/+256
| | | | | | | | | Clean up all instances of checkpatch.pl checks: CHECK: spaces preferred around that '+' (and other operands) Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: braces should be used on all armsLuis de Bethencourt2015-10-2421-137/+216
| | | | | | | | Fix all instances of the following checkpatch.pl check: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove boolean comparisonsLuis de Bethencourt2015-10-2423-307/+291
| | | | | | | Boolean tests do not need explicit comparison to true or false. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Add device ID for Sitecom WLA2100Larry Finger2015-10-241-0/+1
| | | | | | | | | | | This adds the USB ID for the Sitecom WLA2100. The Windows 10 inf file was checked to verify that the addition is correct. Reported-by: Frans van de Wiel <fvdw@fvdw.eu> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Frans van de Wiel <fvdw@fvdw.eu> Cc: Stable <stable@vger.kernel.org> [All stable versions] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Coding style warnings fix for block commentsPunit Vara2015-10-161-11/+15
| | | | | | | | | | | This patch is to the rtl871x_ioctl_linux.c file that fixes up following warnings reported by checkpatch.pl : -Block comments use * on subsequent lines -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Use ether_addr_equal() over memcmp()Punit Vara2015-10-161-1/+1
| | | | | | | | | | | | | This patch is to the rtl871x_ioctl_linux.c file that fixes up following warning reported by checkpatch.pl : -Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() bssid and pnetwork->network.MacAddress both are 6 byte array which aligned with u16 Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Fix warning prefer eth_broadcast_addr() over memset()Punit Vara2015-10-161-2/+1
| | | | | | | | | | This patch is to the rtl871x_ioctl_linux.c that fixes up following warning by checkpatch.pl: -Prefer eth_broadcast_addr() over memset() Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl8712_recv: Remove useless intialisationAmitoj Kaur Chawla2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: usb_ops_linux: Remove useless castShivani Bhardwaj2015-10-161-3/+3
| | | | | | | | | | | | | | | Explicit type conversion is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl871x_io: Remove explicit castShivani Bhardwaj2015-10-161-1/+1
| | | | | | | | | | | | | | | Explicit typecasting is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl8712_xmit: Remove useless castShivani Bhardwaj2015-10-161-6/+6
| | | | | | | | | | | | | | | Explicit typecasting of variables is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl8712_io: Remove unnecessary castShivani Bhardwaj2015-10-161-11/+11
| | | | | | | | | | | | | | | Typecasting should be removed from variables as it is not required. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl8712_cmd: Remove useless castShivani Bhardwaj2015-10-161-2/+1
| | | | | | | | | | | | | | | Explicit type conversions are not required so, remove them. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: os_intfs: Remove unnecessary castShivani Bhardwaj2015-10-161-1/+1
| | | | | | | | | | | | | | | | Explicit type conversions are not required and so, they should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix negative level valueLuis de Bethencourt2015-10-121-1/+1
| | | | | | | | | range->avg_qual.level is of type uint8, so it shouldn't be assigned a negative number. Assigning it 0x100 - 78, which is the equivalent to (20 + -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: rtl8712: usleep_range is preferred over udelayAmitoj Kaur Chawla2015-10-121-2/+2
| | | | | | | | | | | Fix checkpatch.pl issue: "CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt". Replace `udelay()` with a call to `usleep_range()` with a reasonable upper limit determined by the other sleeping functions present. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Replace GFP_ATOMIC with GFP_KERNELAmitoj Kaur Chawla2015-10-121-1/+1
| | | | | | | | | Replace GFP_ATOMIC with GFP_KERNEL since GFP_ATOMIC is used in atomic context and only needed when functions are not allowed to sleep whereas the function is later calling msleep(). Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Use ARRAY_SIZE macroShraddha Barke2015-10-121-2/+1
| | | | | | | | | | | | | | | | | | ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type Changes made using Coccinelle- @@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl8712_hal.h: Coding style warnings fix for block commentsPunit Vara2015-10-081-5/+9
| | | | | | | | | | This is patch to the rtl8712_hal.h file that fixes up following warning reported by checkpatch.pl : -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl8712_gp_bitdef.h: Coding style warning fix for block ↵Punit Vara2015-10-081-1/+2
| | | | | | | | | | | | comment This is patch to the rtl8712_gp_bitdef.h file that fixes up following warning reported by checkpatch.pl : -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl8712_cmdctrl_bitdef.h: Coding style warning fix for ↵Punit Vara2015-10-081-1/+2
| | | | | | | | | | | | block comment This is patch to the rtl8712_cmdctrl_bitdef.h file that fixes up following warning reported by checkpatch.pl : -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl8712_cmd.c: Coding style warnings fix for block commentsPunit Vara2015-10-081-4/+8
| | | | | | | | | | This is patch to the rtl8712_cmd.c file that fixes up following warning reported by checkpatch.pl : -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: recv_linux.c: Coding style warning fix for block commentPunit Vara2015-10-081-1/+2
| | | | | | | | | | This is patch to the recv_linux.c file that fixes up following warning reported by checkpatch.pl : -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: os_intfs.c : Coding style warning fix for block commentPunit Vara2015-10-081-1/+2
| | | | | | | | | | This is patch to the os_intfs.c file that fixes up following warning reported by checkpatch.pl : -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: ieee80211.h: Coding style warnings fix for block commentsPunit Vara2015-10-081-22/+26
| | | | | | | | | | | This is patch to the ieee80211.h file that fixes up following warning reported by checkpatch.pl : -Block comments use * on subsequent lines -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: ieee80211.c: Coding style warnings fix for block commentsPunit Vara2015-10-081-3/+4
| | | | | | | | | | | This is patch to the ieee80211.c file that fixes up following warning reported by checkpatch.pl : -Block comments use * on subsequent lines -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: drv_types.h:Coding style warnings fix for block commentsPunit Vara2015-10-081-5/+6
| | | | | | | | | | | This is patch to the drv_types.h file that fixes up following warning reported by checkpatch.pl : -Block comments use * on subsequent lines -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove NULL comparisonAmitoj Kaur Chawla2015-10-081-1/+1
| | | | | | | | | Remove NULL comparison by using '!' operator. Problem found using checkpatch.pl CHECK: Comparison to NULL could be written "!padapter->halpriv.hal_bus_init" Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove NULL comparisonAmitoj Kaur Chawla2015-10-081-1/+1
| | | | | | | | | Remove NULL comparison by using '!' operator. Problem found using checkpatch.pl CHECK: Comparison to NULL could be written "!ptmpchar" Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud