summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/os_dep/usb_intf.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-28Merge 5.0-rc4 into staging-nextGreg Kroah-Hartman1-0/+1
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: rtl8188eu: Refactoring struct ndis_802_11_ssid from CamelCase to ↵Florian Büstgens1-3/+3
correct code style. rtl8188eu uses CamelCase for many struct members. Refactors the ndis_802_11_ssid members Ssid and SsidLength to keep correct code style. Issue found by checkpatch. Signed-off-by: Florian Büstgens <flbue@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: rtl8188eu: Add device code for D-Link DWA-121 rev B1Michael Straube1-0/+1
This device was added to the stand-alone driver on github. Add it to the staging driver as well. Link: https://github.com/lwfinger/rtl8188eu/commit/a0619a07cd1e Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging: rtl8188eu: fix comparsions to NULL - styleMichael Straube1-3/+3
Use x instead of x != NULL. Use !x instead of x == NULL. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging: rtl8188eu: fix indentation - styleMichael Straube1-1/+1
Fix indentation to clear checkpatch warnings. WARNING: suspect code indent for conditional statements Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24staging: rtl8188eu: remove blank linesMichael Straube1-1/+0
Remove unrequired blank lines reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26staging: rtl8188eu: add SPDX identifiersMichael Straube1-9/+1
This satisfies a checkpatch warning and is the preferred method for notating the license. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: rtl8188eu: Remove unneeded castChristopher Diaz Riveros1-1/+1
Fix Coccinelle alert: drivers/staging//rtl8188eu/os_dep/usb_intf.c:336:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28Merge 4.13-rc7 into staging-nextGreg Kroah-Hartman1-0/+1
We want the staging and iio fixes in here to handle the merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18staging: rtl8188eu: add RNX-N150NUB supportCharles Milette1-0/+1
Add support for USB Device Rosewill RNX-N150NUB. VendorID: 0x0bda, ProductID: 0xffef Signed-off-by: Charles Milette <charles.milette@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18staging: rtl8188eu: constify usb_device_idArvind Yadav1-1/+1
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-18staging: rtl8188eu: add TL-WN722N v2 supportMichael Gugino1-0/+1
Add support for USB Device TP-Link TL-WN722N v2. VendorID: 0x2357, ProductID: 0x010c Signed-off-by: Michael Gugino <michael.gugino.2@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: rtl8188eu: Fixed 'Missing a blank line after declarations' warnings.Yamanappagouda Patil1-0/+1
Fixed checkpatch.pl 'Missing a blank line after declarations' in rtl8188eu module. Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging:r8188eu: remove intf_stop member of adapter structureIvan Safonov1-5/+2
call usb_intf_stop directly. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging:r8188eu: remove pm_netdev_open functionIvan Safonov1-1/+1
netdev_open and ips_netdrv_open are used instead of pm_netdev_open. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging:r8188eu: remove wrappers for rtw_hal_inirp_init functionIvan Safonov1-10/+0
There is no reason to use these wrappers. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: rtl8188eu: fix double unlock error in rtw_resume_process()Wei Yongjun1-4/+4
Fix following static checker warning: drivers/staging/rtl8188eu/os_dep/usb_intf.c:311 rtw_resume_process() error: double unlock 'mutex:&pwrpriv->mutex_lock' Fixes: eaf47b713b60 ("staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()") Reported-By: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: r8188eu: remove usb_hal.hIvan Safonov1-1/+0
usb_hal.h is empty. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: r8188eu: remove rtl8188eu_set_hal_ops functionIvan Safonov1-2/+5
rtl8188eu_set_hal_ops only allocates HalData member of adapter structure. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: rtl8188eu: remove rtw_proc_{init,remove}_oneLuca Ceresoli1-5/+3
rtw_proc_init_one() and rtw_proc_remove_one() are two very long functions that are supposed to create a bunch of proc entries to access debugging features of the driver. But both of them are under #if 0 since their first commit three years ago (5adef66acf73705ae95ea0b1e6b5fc7f17d82d30), replaced by two empty functions. Should they be moved out of #if 0 thay would not even compile, as they used functions that have been removed years ago (create_proc_read_entry()) and they use variables that are not defined (e.g. rtw_proc_cnt). rtw_proc_init_one() mentions several other functions that are not mentioned anywhere else in the kernel tree. Thus, after the present patch, all of those other functions can be cleanly removed as well, as they will be not mentioned anymore, not even in disabled code. Subsequent commits remove those other functions. Should anybody want to implement (in a proper way) the mentioned debugging features, they can still fetch this code from the git history. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Kyle Kuffermann <kyle.kuffermann@gmail.com> Cc: Binoy Jayan <binoy.jayan@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Rémy Oudompheng" <remyoudompheng@gmail.com> Cc: Ivan Safonov <insafonov@gmail.com> Cc: Jakub Sitnicki <jsitnicki@gmail.com> Cc: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Cc: Bhumika Goyal <bhumirks@gmail.com> Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: r8188eu: remove hal_set_hal_ops macroIvan Safonov1-1/+1
hal_set_hal_ops is a trivial wrapper for rtl8188eu_set_hal_ops. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: r8188eu: remove nr_endpoint member of dvobj_priv structureIvan Safonov1-2/+1
nr_endpoint used as local variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: r8188eu: remove ep_num member of dvobj_priv structureIvan Safonov1-1/+0
Value of the ep_num does not used. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: r8188eu: remove usb_vendor_req_buf member of dvobj_privIvan Safonov1-8/+0
Memory allocation moved into usbctrl_vendorreq function. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()Wei Yongjun1-1/+3
Add the missing unlock before return from function rtw_resume_process() in the error handling case. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutexBinoy Jayan1-4/+4
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. _enter_pwrlock was using down_interruptible(), so the lock could be broken by sending a signal. This could be a bug, because nothing checks the return code here. Hence, using mutex_lock instead of the interruptible version. Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock, _exit_pwrlock and _rtw_down_sema. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: rtl8188eu: os_dep: usb_intf: Clean up tests if NULL returned on failureBhaktipriya Shridhar1-1/+1
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>
2016-03-28staging: rtl8188eu: Remove license paragraph with mailing addressKyle Kuffermann1-5/+0
This fixes the issue reported by checkpatch.pl: "Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL." in all files for the rtl8188eu driver. Signed-off-by: Kyle Kuffermann <kyle.kuffermann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rtl8188eu: remove chip_type of the adapter structureIvan Safonov1-1/+0
chip_type variable is unnecessary here, because this driver is only for one chip and it is not used after initialization. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rtl8188eu: replace (a == NULL) to (!a) in rtw_drv_initIvan Safonov1-2/+2
It is a checkpatch cleanups: CHECK: Comparasion to NULL could be written ... Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rtl8188eu: remove unnecessary debug output from os_dep/usb_intf.cIvan Safonov1-4/+0
Debug output in rtw_drw_init is excess Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rtl8188eu: os_dep: Remove NULL test before vfreeBhaktipriya Shridhar1-1/+1
vfree frees the virtually continuous memory area starting at addr. If addr is NULL, no operation is performed. So NULL test is not needed before vfree. This was done using Coccinelle: @@ expression x; @@ -if (x != NULL) vfree(x); @@ expression x; @@ -if (x != NULL) { vfree(x); x = NULL; -} Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14Staging: rtl8188eu: os_dep: Remove NULL test before rtw_free_netdevBhumika Goyal1-2/+1
The function rtw_free_netdev test whether its argument is NULL and return immediately. So NULL test before this function is not needed. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: jiffies are unsigned longRémy Oudompheng1-4/+4
Remove rtw_get_passing_time_ms function and adjust type of relevant variables. Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18staging: rtl8188eu: Introduce monitor interface for IEEE 802.11 framesJakub Sitnicki1-0/+10
This adds support for monitoring IEEE 802.11 Data and Management frames received or transmitted by a RTL8188EU-based device handled by this driver. The monitor interface is not enabled by default and will be registered only if monitor_enable module parameter is set to 1. When enabled it will show up as a monX network device, which can be used by the userspace programs for monitoring network traffic. It is intended as an exploratory/debugging tool for rtl8188eu driver. Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24drivers: staging: rtl8188eu Refactored rtw_free_assoc_resourcesBuţiu Alexandru Octavian1-1/+1
Refactored rtw_free_assoc_resources to avoid sparse warnings about different contexts for basic lock Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: rtl8188eu: remove multiple blank lineSudip Mukherjee1-4/+0
Multiple blank lines should be avoided. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: rtl8188eu: dont mix success and error pathSudip Mukherjee1-5/+3
Success and error path was mixed. Separate them by directly returning 0 from the success path. In the process remove the variable which became unused. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: rtl8188eu: check for kzalloc failureSudip Mukherjee1-4/+3
Check for kzalloc failure and directly return from the error patch thus simplifying the success path. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: rtl8188eu: remove labelSudip Mukherjee1-2/+2
Directly return NULL instead of using another label and goto. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: rtl8188eu: remove unused defineSudip Mukherjee1-1/+0
_HCI_INTF_C_ was only defined here but not being used anywhere. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16staging: rtl8188eu: remove unneeded retSudip Mukherjee1-6/+3
The variable ret was always 0. So remove the variable and always return 0 from the function. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16staging: rtl8188eu: stop using DBG_88ESudip Mukherjee1-19/+20
Stop using DBG_88E which is a custom macro for printing debugging messages. Instead start using pr_debug and in the process define pr_fmt. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16staging: rtl8188eu: remove unneeded variableSudip Mukherjee1-5/+1
The default value of status was _FAIL, it was only changed if kzalloc succeeds and the check for status is immediately following kzalloc. We can have the failure code in the else part as the failure code will be executed only if kzalloc fails. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16staging: rtl8188eu: remove goto labelSudip Mukherjee1-7/+4
By checking for the success of kzalloc we were able to remove the goto label thus making the code more readable. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16staging: rtl8188eu: remove redundant NULL checkSudip Mukherjee1-1/+1
The check for pstat and pdvobjpriv is not required here as we have already checked for them before. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: rtl8188eu: Kill dead calls to kill_pid()Jakub Sitnicki1-12/+0
There is no interface to register PIDs of processes the driver should send a signal to. Remove it. Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: rtl8188eu: Fix trivial typos in commentsYannick Guerrini1-1/+1
Change 'disabed' and 'disabel' to 'disabled' Change 'inviation' to 'invitation' Change 'negoitation' to 'negotiation' Signed-off-by: Yannick Guerrini <yguerrini@tomshardware.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: rtl8188eu: usb_dvobj_init(): A NULL pointer check for ↵Jes Sorensen1-18/+15
usb_host_endpoints makes no sense struct usb_host_interface points to an array of struct usb_host_endpoints - it makes no sense to do a NULL pointer check for each pointer. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02Merge 3.18-rc7 into staging-work.Greg Kroah-Hartman1-0/+1
We want those staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>