aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-03-11rtl8712: remove redundant if statementNiklas Söderlund1-6/+2
Same result no matter what path is taken. Signed-off-by: Niklas Söderlund <niso@kth.se> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11rtl8712: remove unused definitions from rtl871x_recv.hNiklas Söderlund1-3/+0
Signed-off-by: Niklas Söderlund <niso@kth.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11rtl8712: remove dead function prototypes from rtl871x_recv.hNiklas Söderlund1-31/+0
There is no implementation of these functions anywhere in the code. Signed-off-by: Niklas Söderlund <niso@kth.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11rtl8712: remove unused functions from rtl871x_recv.hNiklas Söderlund1-74/+0
Signed-off-by: Niklas Söderlund <niso@kth.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: remove unused definitions from ethernet.hPrzemo Firszt1-7/+0
Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: remove all NDIS_* definitions and use rndis.h insteadPrzemo Firszt3-342/+288
Remove duplicate code.The definitions are already in include/linux/rndis.h Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: remove unused macrosPrzemo Firszt1-3/+0
Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: replace min with min_tPrzemo Firszt1-4/+2
I've changed the ugly casting here and used min_t() instead. I also changed the u16 to a u32 because ->network.Ssid.SsidLength is 32 bits. It doesn't make a difference, but truncating the upper bits away is sloppy. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: replace printk with better solutionsPrzemo Firszt8-77/+61
Replace printk with netdev_printk helpers, dev_printk helpers or pr_err/warn/info if there is no device info available. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: remove unused macros from rtl8712/wifi.hPrzemo Firszt1-4/+0
Those definitions are not used anywhere in the kernel. If you know any reason why they should stay in the code please speak up! Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: code clean upPrzemo Firszt5-100/+79
Clean some trivial formating problems in rtl8712 from staging tree. This patch also changes the way preprocessor macros are defined to keep checkpatch.pl quiet. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: remove useless calls to memset().Cyril Roelandt4-10/+0
These calls are followed by calls to memcpy() on the same memory area, so they can be safely removed. Signed-off-by: Cyril Roelandt <tipecaml@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07Merge branch 'staging-linus' into staging-nextGreg Kroah-Hartman1-0/+2
This is to get the comedi fixes, and resolve the issue in comdi_test.c and comedi_fops.c that were caused by changes in both branches. It also allows the fwserial driver changes to be applied, as they required the fixes that are in staging-linus. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: rtl8712: avoid a useless call to memset().Cyril Roelandt1-4/+4
In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that has just been zeroed by a call to memset(). Signed-off-by: Cyril Roelandt <tipecaml@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: r8712u: Add new device IDLarry Finger1-0/+2
The ISY IWL 1000 USB WLAN stick with USB ID 050d:11f1 is a clone of the Belkin F7D1101 V1 device. Reported-by: Thomas Hartmann <hartmann@ict.tuwien.ac.at> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Thomas Hartmann <hartmann@ict.tuwien.ac.at> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28staging: r8712u: Fix possible buffer overrunLarry Finger1-1/+1
In routine r8712_report_sec_ie(), the code could set the length of the buffer to 256; however, that value is one larger than the corresponding memory allocation. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: r8712u: cleanup pointer type in r8712_setassocsta_cmd()Dan Carpenter1-2/+2
This seems like a cut and paste bug. Smatch complains that we don't allocate enough memory for a set_stakey_rsp struct. In fact this is used as a set_assocsta_rsp struct throughout and that also matches the name of the function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22staging: r8712u: fix potential NULL pointer dereference in r871x_wps_start()Wei Yongjun1-2/+2
The dereference should be moved below the NULL test. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: r8712u: Do not queue cloned skbLarry Finger1-1/+4
Some post-3.4 kernels have a problem when a cloned skb is used in the RX path. This patch handles one such case for r8712u. The patch was suggested by Eric Dumazet. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [v3.4+] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: rtl8712: fix foo* bar (foo*) errors reported by checkpatchDevendra Naga1-4/+4
fixes the following errors: drivers/staging/rtl8712/rtl871x_security.c:61: ERROR: "foo * bar" should be "foo *bar" drivers/staging/rtl8712/rtl871x_security.c:291: ERROR: "foo * bar" should be "foo *bar" drivers/staging/rtl8712/rtl871x_security.c:323: ERROR: "foo * bar" should be "foo *bar" drivers/staging/rtl8712/rtl871x_security.c:1371: ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: rtl8712: fix a foo * bar errors reported by checkpatchDevendra Naga1-1/+1
fixes the following error: drivers/staging/rtl8712/rtl8712_xmit.c:379: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: rtl8712: remove assignment of 0 to a static global variableDevendra Naga1-1/+1
fixes the following checkpatch warning: drivers/staging/rtl8712/os_intfs.c:99: ERROR: do not initialise statics to 0 or NULL as statics are always initialised to 0. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-16Merge 3.6-rc6 into staging-nextGreg Kroah-Hartman1-6/+1
This pulls in the staging tree fixes in 3.6-rc6 into our branch to resolve the merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: r8712u: fix bug in r8712_recv_indicatepkt()Eric Dumazet1-6/+1
64bit arches have a buggy r8712u driver, let's fix it. skb->tail must be set properly or network stack behavior is undefined. Addresses https://bugzilla.redhat.com/show_bug.cgi?id=847525 Addresses https://bugzilla.kernel.org/show_bug.cgi?id=45071 Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Dave Jones <davej@redhat.com> Cc: stable <stable@vger.kernel.org> [2.6.37+] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: r8712u: use is_zero_ether_addr() instead of memcmp()Wei Yongjun1-4/+5
Using is_zero_ether_addr() instead of directly use memcmp(addr, "\x00\x00\x00\x00\x00\x00", ETH_ALEN) to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: r8712u: Remove defines that are not usedLarry Finger5-91/+0
This driver has a number of defines, etc. that are not used. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: r8712u: Fix allocations not checked for failureLarry Finger1-0/+4
The driver has a dev_alloc_skb() and an skb_clone() call that are not checked for failure. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: r8712u: rtl871x_mlme.c: use is_zero_ether_addr() instead of memcmp()Wei Yongjun1-2/+3
Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: r8712u: use is_broadcast_ether_addr() to simplify the codeWei Yongjun3-15/+2
Using is_broadcast_ether_addr() to simplify the code. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13staging: r8712u: Reduce maximum receive buffer size to a more sensible valueLarry Finger1-1/+1
The current value for the maximum receive buffer size is 30720, which is too large. For long-running systems, memory fragmentation may make it difficult to obtain the buffers of O(2) needed for aggregation. Buffers of O(3) are even worse, particularly when not needed. The new size is set to 9100, which will allow aggregation. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25Merge 3.5-rc4 into staging-nextGreg Kroah-Hartman1-0/+2
This picks up the staging changes made in 3.5-rc4 so that everyone can sync up properly. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: r8712u: Remove useless driver version infoLarry Finger1-3/+1
This driver contains version information that is outdated, has no real value in terms of the Linux update process, and tends to confuse users. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15staging: r8712u: Add new USB IDsLubomir Schmidt1-0/+2
There are two new devices for this driver. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15staging: rtl8712: Fix typo in rtl871x_io.hMasanari Iida1-1/+1
Correct spelling typo "padater" to "padapter" in rtl871x_io.h Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: r8712u: Remove needless test for NULLLarry Finger1-18/+16
In commit ee6aeff, a swatch warning was fixed by moving some code inside an if block that is executed only when the pointer padapter is not NULL. In fact, padapter can never be NULL and the corect fix should have been the removal of the test of padapter. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10staging: delete all duplicated endian crap from rtl8712 driverPaul Gortmaker14-539/+0
This driver had headers like big_endian.h, little_endian.h, swab.h and yet we can throw them all in the trash can and the thing still builds on x86-64 and ppc, just by deleting the references to the deleted files. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-05-10staging: wean rtl8712 off of its ancient duplicate of ip.hPaul Gortmaker4-141/+3
This driver should not be carrying around ancient copies of headers like <linux/ip.h> for its own use. Mapping it onto the mainline one uncovers no build issues. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-05-10staging: wean rtl8712 off of its ancient duplicate of if_ether.hPaul Gortmaker4-144/+4
This driver should not be carrying around ancient copies of headers like <linux/if_ether.h> for its own use. Mapping it onto the mainline one uncovers no build issues. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-05-09staging: rtl8712: Fix typos.Justin P. Mattock21-41/+41
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18drivers: staging: rtl8172: Remove unneeded include of version.hMarcos Paulo de Souza2-2/+0
The output of "make versioncheck" told us that: drivers/staging/rtl8712/osdep_service.h: 32 linux/version.h not needed. drivers/staging/rtl8712/rtl871x_ioctl_linux.c: 46 linux/version.h not needed. If we take a look at these files, we will agree to remove it. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Cc: <devel@driverdev.osuosl.org> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> ACKed-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: replace open-coded ARRAY_SIZEsJim Cromie1-2/+2
spatch http://coccinelle.lip6.fr/rules/array.cocci did these. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07staging: r8712u: Fix Smatch warningLarry Finger1-4/+4
The patch 2080913e017a: "staging: r8712u: Fix regression caused by commit 8c213fa" from Feb 25, 2012, leads to the following Smatch complaint: drivers/staging/rtl8712/usb_intf.c:629 r871xu_dev_remove() warn: variable dereferenced before check 'padapter' (see line 625) The fix is to move the new statements inside the block where padapter is not NULL. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02Staging: rtl8712/rtl8192u: move USB device ID within staging drivers.Martin Krause1-0/+1
It seems the USB device ID 0bda:8192 is wrongly assigned to the RTL8192SU chip and not to the RTL8191SU chip in the USB database. So this patch moves this device ID from the rtl8192u staging driver to the rtl8712 staging driver. This patch was tested with a Radicom WIFIHU embedded wireless module with a RTL8191SU chip and the USB device ID 0bda:8192. Without the patch the rtl8192u driver claims this device, but it does not work. With the patch the rtl8712 driver services this device and it works. Signed-off-by: Martin Krause <martin.krause@tqs.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02Staging rtl8712: Remove double USB device IDsMartin Krause1-2/+0
Remove copies of the double USB device IDs: - 0bda:8172 - 0bda:8174 Signed-off-by: Martin Krause <martin.krause@tqs.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29staging: r8712u: Fix regression in signal level after commit c6dc001Larry Finger1-7/+1
In commit c6dc001 "staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes", the returned qual.qual member of the iw_statistics struct was changed. For strong signals, this change made no difference; however for medium and weak signals it results in a low signal that shows considerable fluctuation, When using wicd for a medium-strength AP, the value reported in the status line is reduced from 100% to 60% by this bug. This problem is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42826. Reported-and-tested-by: Robert Crawford <wrc1944@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29staging: r8712u: Fix regression caused by commit 8c213faLarry Finger2-3/+5
In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading", the command to release the firmware was placed in the wrong routine. In combination with the bug introduced in commit a5ee652 "staging: r8712u: Interface-state not fully tracked", the driver attempts to upload firmware that had already been released. This bug is the source of one of the problems in https://bugs.archlinux.org/task/27996#comment89833. Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com> Tested-by: Adrian <agib@gmx.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29staging: r8712u: Fix regression introduced by commit a5ee652Larry Finger1-2/+0
In commit a5ee652 "staging: r8712u: Interface-state not fully tracked", the private boolean "bup" was set false when the interface was brought down, as that seemed appropriate. This change has not caused any problems when using NetworkManager or manual control of the device; however, when wicd control is used, there is a locking problem in wpa_supplicant, as shown in https://bugzilla.kernel.org/show_bug.cgi?id=42818. This fix reverts the only code change in commit a5ee652. My analysis is that "bup" is badly named. In its present form, it seems to indicate the up/down state of the device, but its usage is more consistent with an initialized/uninitialized state. That problem will be addressed in a later patch. Note: Commit 8c213fa, which introdued asynchronous firmware loading for this driver, exposed this bug to a greater extent. That bug is addressed in the next patch in this series. This bug is also responsible for the bug in https://bugzilla.kernel.org/show_bug.cgi?id=42815. and this bug is also part of the problems discussed at https://bugs.archlinux.org/task/27996#comment89950. Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com> Tested-by: Adrian <agib@gmx.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [3.2+] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10Merge tag 'staging-3.3-rc3' into staging-nextGreg Kroah-Hartman16-57/+4
This was done to resolve some merge issues with the following files that had changed in both branches: drivers/staging/rtl8712/rtl871x_sta_mgt.c drivers/staging/tidspbridge/rmgr/drv_interface.c drivers/staging/zcache/zcache-main.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging: r8712u: Add missing initialization and remove configuration parameter CONFIG_R8712_APLarry Finger3-15/+1
When this driver was upgraded to the vendor 20100831 version in commit 93c55dda092c7 et al,, one listhead initialization was missed. This broke complete operation of the driver whenever AP mode was enabled. This fixes https://bugs.archlinux.org/task/27996. The configuration parameter R8712_AP is misleading as the driver cannot function as an AP without a heavily hacked version of hostapd. Thus, it makes sense to remove the parameter; however the code and data configured for the option is left in. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: r8712u: Simplify semaphoresLarry Finger13-42/+4
I am preparing to convert this driver from semaphore to mutex locking, The first step has been to eliminate a number of semaphores that were initialized but never used, and one whose only use was a single "up" after initialization. A total of 9 semaphores were removed in this process. One other change was to remove some inline semaphore routines that were unused. In addition, several cases had the following structure: down() if () { ... } up() The locking overhead was reduced by moving the up/down inside the if block. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>