summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
Commit message (Collapse)AuthorAgeFilesLines
* Staging: rtl8712: fix spelling errorsJoseph Wright2017-01-251-1/+1
| | | | | | | | | | | Found by checkpatch: - s/cacluated/calculated/ - s/convertor/converter/ - s/psudo/pseudo/ - s/halfs/halves/ Signed-off-by: Joseph Wright <rjosephwright@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fixed little endian problemJannik Becher2017-01-031-1/+1
| | | | | | | | | Fixed a sparse warning. Using function le16_to_cpus() to avoid double assignment. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl871x_*: Removed unnecessary else statements after a ↵Shiva Kerdel2016-11-211-2/+2
| | | | | | | | | | break or return The indent code blocks of the else statements were unnecessary and are better written without them. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix coding style error reported from checkpatchOmri Arad2016-09-131-2/+2
| | | | | | | | | | removed the following: ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line WARNING: Statements should start on a tabstop Signed-off-by: Omri Arad <omriarad3@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: use container_of() instead of LIST_CONTAINOR()Geliang Tang2016-04-291-6/+6
| | | | | | | | This patch drops the local definition of LIST_CONTAINOR(), and uses container_of() instead of it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl871x_ioctl_linux: Clean up tests if NULL returned on ↵Bhaktipriya Shridhar2016-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl871x: avoid running off end of bufferAlan2016-03-051-1/+2
| | | | | | | | | If 32 bytes of non zero are passed in pdata->pointer then the mac_pton function will run off the end of the buffer. Make sure we always have a terminated string kernel side. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: reduce stack usageArnd Bergmann2016-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | The "translate_scan" function in rtl8712 uses a lot of stack, and gets inlined into its single caller, r8711_wx_get_scan, which in some configurations now blows the 1024 byte stack warning limit: drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'r8711_wx_get_scan': drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1227:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] This somewhat reduces the stack usage by moving the translate_scan function out of line with the noinline_for_stack annotation. It might be possible to modify translate_scan() a little further to reduce the stack usage, but with this patch, we can build without the warning, the the call chain to get here is rather predictable (sys_ioctl->vfs_ioctl->sock_ioctl->dev_ioctl->wext_ioctl-> r8711_wx_get_scan). Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> 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: spaces preferred around operandsLuis de Bethencourt2015-10-241-22/+25
| | | | | | | | | 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-241-20/+30
| | | | | | | | 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-241-28/+28
| | | | | | | 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: 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: 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: Move constant to right of test or replace with "!"Alison Schofield2015-10-081-10/+10
| | | | | | | | | | | | | | Move constant to the right side of comparison operator or replace equality operator (==) with the unary negation operator (!) if the comparison is to zero. Addesses multiple instances of the checkpatch.pl warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Alison Schofield <amsfield22@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: re-use mac_pton()Andy Shevchenko2015-10-021-27/+1
| | | | | | | | ...instead of custom approach Cc: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: change SupportedRates to ratesJoshua Clayton2015-08-071-10/+8
| | | | | | | | | | Change the value to a name that conforms to Linux coding style. "rates" is equally expressive in this context, and I have left alone a comment and function name that describe the rates as supported rates. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove typedefsJoshua Clayton2015-08-071-6/+6
| | | | | | | | | Coding style fix. Get rid of typedefs NDIS_802_11_RATES and NDIS_802_11_RATES_EX Undo any casting that was done as a result of the typedef. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove duplicate structJoshua Clayton2015-08-071-5/+5
| | | | | | | | | | | | struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex, and is used about a third as often. Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex This also gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix else after break or return warningDogukan Ergun2015-06-131-2/+1
| | | | | | | | This patch fixes checkpatch.pl warning. WARNING: else is not generally useful after a break or return Signed-off-by: Dogukan Ergun <dogukan.ergun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: freeing an ERR_PTRDan Carpenter2015-05-081-10/+7
| | | | | | | | | | | | | | If memdup_user() fails then "pparmbuf" is an error pointer and we can't pass it to kfree(). I changed the "goto _r871x_mp_ioctl_hdl_exit" to a direct return. I changed the earlier goto to a direct return as well for consistency and removed the "pparmbuf = NULL" initializer since it's no longer needed. Fixes: 45de432775d6 ('Staging: rtl8712: Use memdup_user() instead of copy_from_user()') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Drop unneeded cast on netdev_privJulia Lawall2015-04-031-35/+35
| | | | | | | | | | | | | | | | | | | | | | The result of netdev_priv is already implicitly cast to the type of the left side of the assignment. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T *x; @@ x = - (T *) netdev_priv(...) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Use memdup_user() instead of copy_from_user()Cristina Opriceana2015-04-011-7/+3
| | | | | | | | | | Use memdup_user() to avoid its duplicated implementation and simplify code. memdup_user() uses GFP_KERNEL instead of GFP_ATOMIC, which is valid because copy_from_user() might sleep and it's useless to make the allocation atomic. Found with coccinelle. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: replace memcpy with ether_addr_copyHaneen Mohammed2015-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replace memcpy with ethe_addr_copy to address the following warning generated by checkpatch.pl: ""Prefer ether_addr_copy over memcpy if the Ethernet addresses are __aligned(2)" Follwoing is the output of pahole for the relevant datastructures: 1- for "iwe.u.ap_addr.sa_data" and "wrqu->ap_addr.sa_data" struct sockaddr { sa_family_t sa_family; /* 0 2 */ char sa_data[14]; /* 2 14 */ /* size: 16, cachelines: 1, members: 2 */ /* last cacheline: 16 bytes */ }; struct iw_event { __u16 len; /* 0 2 */ __u16 cmd; /* 2 2 */ /* XXX 4 bytes hole, try to pack */ union iwreq_data u; /* 8 16 */ /* size: 24, cachelines: 1, members: 3 */ /* sum members: 20, holes: 1, sum holes: 4 */ /* last cacheline: 24 bytes */ }; 2- for "pnetwork->network.MacAddress" and "pcur_bss->MacAddress" struct wlan_network { struct list_head list; /* 0 16 */ int network_type; /* 16 4 */ int fixed; /* 20 4 */ unsigned int last_scanned; /* 24 4 */ int aid; /* 28 4 */ int join_res; /* 32 4 */ struct ndis_wlan_bssid_ex network; /* 36 884 */ /* --- cacheline 14 boundary (896 bytes) was 24 bytes ago --- */ /* size: 920, cachelines: 15, members: 7 */ /* last cacheline: 24 bytes */ }; struct ndis_wlan_bssid_ex { u32 Length; /* 0 4 */ unsigned char MacAddress[6]; /* 4 6 */ u8 Reserved[2]; /* 10 2 */ struct ndis_802_11_ssid Ssid; /* 12 36 */ u32 Privacy; /* 48 4 */ s32 Rssi; /* 52 4 */ enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; /* 56 4 */ struct NDIS_802_11_CONFIGURATION Configuration; /* 60 32 */ /* --- cacheline 1 boundary (64 bytes) was 28 bytes ago --- */ enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; /* 92 4 */ NDIS_802_11_RATES_EX SupportedRates; /* 96 16 */ u32 IELength; /* 112 4 */ u8 IEs[768]; /* 116 768 */ /* --- cacheline 13 boundary (832 bytes) was 52 bytes ago --- */ /* size: 884, cachelines: 14, members: 12 */ /* last cacheline: 52 bytes */ }; Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: replace memset(x,0,ETH_ALEN)Aya Mahfouz2015-03-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eth_zero_addr() is a wrapper function for memset if 0 is going to be assigned to a mac address. The aforementioned function replaces memset. In addition, linux/etherdevice.h was included as a header since it is the file that defines the inline function eth_zero_addr(). The changes were carried out using the following coccinelle script: @header@ @@ #include <linux/etherdevice.h> @eth_zero_addr@ expression e; @@ -memset(e,0,ETH_ALEN); +eth_zero_addr(e); @eth_broadcast_addr@ identifier e; @@ -memset(e,\(0xff\|0xFF\|255\),ETH_ALEN); +eth_broadcast_addr(e); @linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @ @@ + #include <linux/etherdevice.h> + @special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> + @custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Use mod_timerVaishali Thakkar2015-02-261-3/+4
| | | | | | | | | | This patch introduces the use of API function mod_timer instead of driver specific function as it is a more efficient and standard way to update the expire field of an active timer. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove spaces before commasMax Perepelitsyn2015-01-171-2/+2
| | | | | | | | checkpatch.pl fix for ERROR: space prohibited before that ',' (ctx:WxE) Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove unused variablesSudip Mukherjee2014-10-291-14/+5
| | | | | | | | | | | | | | | | | | unused variables are removed. These variables were only assigned some values and after that they were never being used. So they are safe to be removed , and it has been build tested. I left a call to r8712_read32(padapter, TCR) and r8712_read8(padapter, SDIO_HCPWM) . r8712_read32() and r8712_read8() is ultimately calling usb_read32() and usb_read8() respectively. and they are again calling r8712_usbctrl_vendorreq(). this r8712_usbctrl_vendorreq() is communicating through the usb bus and is sending and receiving the control msg. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove unnecessary cast for argument of kfreeTapasweni Pathak2014-10-201-2/+2
| | | | | | | | | | | | This patch removes all occurrences of unnecessary cast on the argument to kfree, all over in rtl8712. There is no need of the cast on the argument to kfree. Greped to find occurrences. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: add new line after declarationsTapasweni Pathak2014-09-281-0/+8
| | | | | | | | This patch fixes checkpatch.pl warning in hal_init.c file WARNING : Missing a blank line after declarations Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712 : Fix line over 80 charactersTapasweni Pathak2014-09-231-3/+4
| | | | | | | | This patch fixes checkpatch.pl warning in files of rtl8712 WARNING : line over 80 characters Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: remove break after return statementTapasweni Pathak2014-09-231-1/+0
| | | | | | | | This patch fixes checkpatch.pl warning in rtl871x_ioctl_linux.c file WARNING : break is not useful after goto or return Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove function get_list_headJames A Shackleford2014-06-261-4/+4
| | | | | | | | get_list_head is an inline that returns &list->head. This patch removes this inline and directly applies &list->head where applicable. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove wrapper function get_nextJames A Shackleford2014-06-261-8/+8
| | | | | | | | | get_next is just an inline wrapper around return list->next. This patch removes the wrapper and directly uses list->next where applicable. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl871x_ioctl_linux.c: Cleaning up useless if statementRickard Strandqvist2014-06-191-6/+1
| | | | | | | | The same code regardless of the outcome of the if statement. And clean up another duplicate line of code. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove _malloc()Vitaly Osipov2014-05-251-23/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes all usage of _malloc() and the function itself. Most uses are straightforward replacements by kmalloc(..., GFP_ATOMIC), because this was the definition of _malloc(). In a few places it was possible to use kzalloc() or memdup_user. A further improvement would be to replace GFP_ATOMIC with GFP_KERNEL where possible. Verified by compilation only. Initial replacement done by running a Coccinelle script along the lines of: @@ type T; expression E; identifier V; @@ - V = (T) _malloc(E); + V = kmalloc(E, GFP_ATOMIC); @@ expression E, E1; @@ - E1 = _malloc(E); + E1 = kmalloc(E, GFP_ATOMIC); Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix potential leak in r871x_wx_set_enc_ext()Christian Engelmayer2014-05-241-7/+9
| | | | | | | | | | | Fix a potential leak in the error path of r871x_wx_set_enc_ext(). In case the requested algorithm is not supported by the driver, the function returns without freeing the already allocated 'param' struct. Move the input verification to the beginning of the function so that the direct return is safe. Detected by Coverity - CID 144373. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: delete non-required instances of include <linux/init.h>Paul Gortmaker2013-12-171-1/+0
| | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: fix spaces before semicolonsThomas Cort2013-10-031-4/+4
| | | | | | | | Resolve all of the 'WARNING: space prohibited before semicolon' checkpatch warnings for rtl8712. Signed-off-by: Thomas Cort <linuxgeek@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: return MAC in standard formAndy Shevchenko2013-07-231-6/+2
| | | | | | | | MAC respresentation should follow standard form. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* 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>
OpenPOWER on IntegriCloud