summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
Commit message (Collapse)AuthorAgeFilesLines
* rtl8712: replace min with min_tPrzemo Firszt2013-01-111-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>
* rtl8712: replace printk with better solutionsPrzemo Firszt2013-01-111-30/+22
| | | | | | | | 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>
* staging: rtl8712: avoid a useless call to memset().Cyril Roelandt2013-01-071-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>
* staging: r8712u: fix potential NULL pointer dereference in r871x_wps_start()Wei Yongjun2012-10-221-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>
* staging: r8712u: use is_broadcast_ether_addr() to simplify the codeWei Yongjun2012-09-041-3/+1
| | | | | | | | | | | 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>
* staging: rtl8712: Fix typos.Justin P. Mattock2012-05-091-7/+7
| | | | | | 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>
* drivers: staging: rtl8172: Remove unneeded include of version.hMarcos Paulo de Souza2012-04-181-1/+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>
* staging: replace open-coded ARRAY_SIZEsJim Cromie2012-04-101-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>
* staging: r8712u: Fix regression in signal level after commit c6dc001Larry Finger2012-02-291-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>
* staging: r8712u: Most return-values changed from -1 to proper errno macros.Ali Bahar2011-09-061-22/+22
| | | | | | | | | | | | | The ioctl handlers were frequently returning -1 upon failure. Most of these have now been changed to proper errno macros. The few remaining ones have been left untouched because either the handler is not called (and so cannot be tested), or the function never fails (and so cannot be system-tested), or requires new code to distinguish its failures. Signed-off-by: Ali Bahar <ali@internetDog.org> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes.Ali Bahar2011-09-061-6/+138
| | | | | | | | | | | | | | | | | | passive_mode added to private ioctls. New private ioctls added for RSSI, link speed, mac address, scan type, and DCE-D. In r8711_wx_get_scan(), we now sleep only 100 times, instead of 1000. In r8711_wx_set_essid(), added a check for Ad-Hoc state. In r8711_wx_get_rate(), added a check for RTL8712_RF_2T2R RF type. Added Set chplan. In r871x_get_wireless_stats(), updated the mechanism for displaying link quality. Added SetDIG and SetRA commands. r8712_joinbss_cmd() no longer checks for Ad-Hoc mode. Signed-off-by: Ali Bahar <ali@internetDog.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Merging Realtek's latest (v2.6.6). Use stack, not malloc.Ali Bahar2011-09-061-8/+3
| | | | | | | | translate_scan() now uses the stack for some variables, instead of mallocing. Signed-off-by: Ali Bahar <ali@internetDog.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Merging Realtek's latest (v2.6.6). Updated include directives.Ali Bahar2011-09-061-0/+9
| | | | | | | | | | | | These are the new include directives for header files. The following were (somehow!) not explicity in Realtek's, but proved necessary: "linux/usb.h" is needed for usb_alloc_urb(); "linux/interrupt.h" is needed for tasklet_struct. It was often a nested include. Signed-off-by: Ali Bahar <ali@internetDog.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Merging Realtek's latest (v2.6.6). Renamed _netdev_priv.Ali Bahar2011-09-061-34/+34
| | | | | | | | Renamed _netdev_priv to netdev_priv. Signed-off-by: Ali Bahar <ali@internetDog.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* rtl8712: don't just return -EFAULT in wpa_supplicant_ioctl()Dan Carpenter2011-08-231-1/+2
| | | | | | | | | There were some curly braces missing so the original code in wpa_supplicant_ioctl() pretty much always returned -EFAULT without doing anything. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Sets to SSID, and to AP MAC#, can now be done when the ↵Ali Bahar2011-08-231-4/+21
| | | | | | | | | | | | | | | | | | interface is Down. The original Realtek code assumed that ioctl Sets get done after the interface is Up. This included the set to Essid and to the AP MAC#; and it fit Realtek's installation procedure. But there is no such necessity for the adapter, and no stated requirement found elsewhere. Also, wireless drivers typically permit this. A typical error message used to be: Error for wireless request "Set ESSID" (8B1A) : SET failed on device wlan0 ; Operation not permitted. Signed-off-by: Ali Bahar <ali@internetDog.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8712: fixed coding style issuesJavier M. Mellid2011-04-201-2/+4
| | | | | | | Fixed some style and format issues with code. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: rtl8712: redundant null check before kfree()Alexander Beregalov2011-04-201-2/+1
| | | | | Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8712: Remove NULL check before kfreeIlia Mirkin2011-03-141-2/+1
| | | | | | | | | | | | | | | | | This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8712: check _malloc return valueXiaochen Wang2011-03-071-1/+1
| | | | | | | | Description: The original check is wrong. Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8712: check copy_from_user return valueXiaochen Wang2011-03-071-2/+2
| | | | | | | | Description:return -EFAULT if copy_to_user() fails Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: rtl8712: fix math errors in snprintf()Dan Carpenter2011-02-091-9/+13
| | | | | | | | | | | | | The original code had calls to snprintf(p, 7, "wpa_ie=") but that string is 8 characters (because snprintf() puts a NUL terminator on the end). So instead of an '=' the what gets written to buf is a NUL terminator followed by the rest of the string. And actually the %02x formats are three chars as well when you include the terminator. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Fix sparse messageLarry Finger2011-01-211-0/+1
| | | | | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8712: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-201-1/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8712: use '%pM' format to print MAC addressAndy Shevchenko2010-09-161-2/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8712: throw away custom hex_to_bin()Andy Shevchenko2010-09-081-13/+2
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Fix rate setting when HT is not enabledLarry Finger2010-08-301-0/+2
| | | | | | | When operating in normal bg mode, the maximum rate was fixed at 48 Mb/s. Signed-off-by: Albert Wang <albert_wang@realtek.com.tw> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
* staging: r8712u: Add the new driver to the mainline kernelLarry Finger2010-08-201-0/+2256
This code is for a completely new version of the Realtek 8192 USB devices such as the D-Link DWA-130. The Realtek code, which was originally for Linux, Windows XP and Windows CE, has been stripped of all code not needed for Linux. In addition, only one additional configuration variable, which enables AP mode, remains. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Tested-by: Frederic Leroy <fredo@starox.org>
OpenPOWER on IntegriCloud