summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712
AgeCommit message (Collapse)Author
2014-05-06staging: r8712u: Fix case where ethtype was never obtained and always be ↵Larry Finger
checked against 0 commit f764cd68d9036498f08fe8834deb6a367b5c2542 upstream. Zero-initializing ether_type masked that the ether type would never be obtained for 8021x packets and the comparison against eapol_type would always fail. Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-06staging: r8712u: Set device type to wlanLarry Finger
commit 3a21f00a5002b14e4aab52aef59d33ed28468a13 upstream. The latest version of NetworkManager does not recognize the device as wireless without this change. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11rtl8712: remove redundant if statementNiklas Söderlund
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öderlund
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öderlund
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öderlund
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 Firszt
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 Firszt
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 Firszt
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 Firszt
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 Firszt
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 Firszt
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 Firszt
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 Roelandt
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-Hartman
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 Roelandt
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 Finger
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 Finger
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 Carpenter
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 Yongjun
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 Finger
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 Naga
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 Naga
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 Naga
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-Hartman
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 Dumazet
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 Yongjun
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 Finger
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 Finger
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 Yongjun
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 Yongjun
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 Finger
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-Hartman
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 Finger
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 IDsstaging-3.5-rc4Lubomir Schmidt
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 Iida
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 Finger
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 Gortmaker
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 Gortmaker
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 Gortmaker
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. Mattock
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 Souza
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 Cromie
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 Finger
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 Krause
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 Krause
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 Finger
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 Finger
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 Finger
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-Hartman
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>