summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/os_dep
AgeCommit message (Collapse)AuthorFilesLines
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-10-02staging:r8188eu: remove pkt_newalloc member of the recv_buf structureIvan Safonov1-1/+0
This member does not used. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: r8188eu: remove GET_HAL_DATA macroIvan Safonov1-8/+4
GET_HAL_DATA replaced by its definition. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: r8188eu: remove usb_hal.hIvan Safonov2-3/+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-20staging: r8188eu: replace N_BYTE_ALIGMENT macro with PTR_ALIGNIvan Safonov1-1/+1
PTR_ALIGN is a bit shorter than N_BYTE_ALIGMENT. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: r8188eu: change last argument type of the usb_write_port functionIvan Safonov1-15/+14
usb_write_port writes only xmit_buf object data to device. In addition, an appropriate name for this argument is used. 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 Ceresoli2-352/+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: rtl8188eu: ioctl_linux: Clean up if function returned NULL on failure.Amit Ghadge1-17/+17
Clean some all functions to return NULL on failure. Used !x instead of x==NULL. Signed-off-by: Amit Ghadge <amitg.b14@gmail.com> 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: rename usb_read_port_cancel to rtw_hal_inirp_deinitIvan Safonov1-1/+1
And remove three one-line wrappers. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: r8188eu: remove pxmitbuf parameter of rtl8188eu_xmitframe_complete ↵Ivan Safonov1-1/+1
function pxmitbuf always is NULL. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: r8188eu: remove sizeof_priv parameter of ↵Ivan Safonov2-3/+2
rtw_alloc_etherdev_with_old_priv function sizeof_priv 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 sizeof_priv member of rtw_netdev_priv_indicatorIvan Safonov1-1/+0
sizeof_priv 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 some members of registry_priv structureIvan Safonov1-58/+0
some registry_priv members does not used after initialization. Module parameters corresponding to this members deleted too. 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 Safonov2-9/+3
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-12staging: r8188eu: remove rereg_nd_name_priv member of struct adapterIvan Safonov1-6/+0
Only default value of rereg_nd_name_priv was used. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: r8188eu: remove br_ext_lock and fix_rate members of struct adapterIvan Safonov1-2/+0
br_ext_lock and fix_rate are not used after initialization. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: r8188eu: remove bNotifyChannelChange member of struct adapterIvan Safonov1-1/+0
Default value of this variable used only to produce debug output. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging: r8188eu: replace sizeof(struct rtw_ieee80211_ht_cap) with ↵Ivan Safonov1-2/+4
sizeof(struct ieee80211_ht_cap) Values of this expressions are equal, but ieee80211_ht_cap is library type. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging: r8188eu: replace rtw_ieee80211_ht_cap with ieee80211_ht_cap type in ↵Ivan Safonov1-5/+8
translate_scan function rtw_ieee80211_ht_cap is reimplementation of the ieee80211_ht_cap. 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 Jayan2-11/+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-08-21rtl8188eu: Replace semaphore terminate_cmdthread_sema with completionBinoy Jayan1-2/+2
The semaphore 'terminate_cmdthread_sema' is used as completion, so convert it to struct completion. 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-08-21rtl8188eu: Replace semaphore cmd_queue_sema with completionBinoy Jayan1-1/+1
The semaphore 'cmd_queue_sema' is used as completion, so convert it to struct completion. 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-05-20Merge tag 'staging-4.7-rc1' of ↵Linus Torvalds9-49/+5
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver updates from Greg KH: "Here's the big staging and iio driver update for 4.7-rc1. I think we almost broke even with this release, only adding a few more lines than we removed, which isn't bad overall given that there's a bunch of new iio drivers added. The Lustre developers seem to have woken up from their sleep and have been doing a great job in cleaning up the code and pruning unused or old cruft, the filesystem is almost readable :) Other than that, just a lot of basic coding style cleanups in the churn. All have been in linux-next for a while with no reported issues" * tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits) Staging: emxx_udc: emxx_udc: fixed coding style issue staging/gdm724x: fix "alignment should match open parenthesis" issues staging/gdm724x: Fix avoid CamelCase staging: unisys: rename misleading var ii with frag staging: unisys: visorhba: switch success handling to error handling staging: unisys: visorhba: main path needs to flow down the left margin staging: unisys: visorinput: handle_locking_key() simplifications staging: unisys: visorhba: fail gracefully for thread creation failures staging: unisys: visornic: comment restructuring and removing bad diction staging: unisys: fix format string %Lx to %llx for u64 staging: unisys: remove unused struct members staging: unisys: visorchannel: correct variable misspelling staging: unisys: visorhba: replace functionlike macro with function staging: dgnc: Need to check for NULL of ch staging: dgnc: remove redundant condition check staging: dgnc: fix 'line over 80 characters' staging: dgnc: clean up the dgnc_get_modem_info() staging: lustre: lnet: enable configuration per NI interface staging: lustre: o2iblnd: properly set ibr_why staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini ...
2016-04-16staging: rtl8188eu: Convert to using IFF_NO_QUEUEPhil Sutter1-1/+1
Cc: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-28staging: rtl8188eu: os_dep: ioctl_linux: Clean up tests if NULL returned on ↵Bhaktipriya Shridhar1-4/+4
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>
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 Kuffermann9-44/+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: os_dep: Remove unnecessary else after returnBhaktipriya Shridhar1-2/+1
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@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: FIELD_OFFSET macro replaced by offsetof macroIvan Safonov1-3/+3
FIELD_OFFSET and offsetof macro are equal 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-03-11staging: rtl8188eu: os_dep: Remove useless return variablesBhaktipriya Shridhar1-4/+1
This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: rtl8188eu: os_dep: Remove header fileAmitoj Kaur Chawla1-1/+0
Remove duplicate include file. Found using includecheck. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@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>
2016-02-11staging: rtl8188eu: remove pfirmware and fwsize of the hal_data_8188e structureIvan Safonov1-4/+0
The pfirmware is used only in rtl88eu_download_fw function (except the kfree(rtlhal->pfirmware) in netdev_close). The fwsize not used after initialization at all. The pfirmvare replaced by fw_data and fwsize removed. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: rtl8188eu: use eth_broadcast_addr() in place of memsetHari Prasath Gujulan Elango1-1/+1
Replace the memset of array to broadcast address 0xFF by using the eth_broadcast_addr() API Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: rtl8188eu: rename camelcase bAcceptAddbaReqLuca Ceresoli1-1/+1
There is such a field both in struct mlme_ext_info and in struct registry_priv. Rename both. Also fix checkpatch issue in the lines touched: WARNING: line over 80 characters Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: rtl8188eu: remove useless variable rtw_AcceptAddbaReqLuca Ceresoli1-3/+1
rtw_AcceptAddbaReq is a static variable, it is set once and never modified. It is referenced only once, to assign its value to a member of struct registry_priv with practically the same name. Get rid of the variable, and move the meaningful part of the comment near the declaration of the relevant field of struct registry_priv. Raises a new checkpatch issue, which is fixed in a later commit: CHECK: Avoid CamelCase: <bAcceptAddbaReq> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: jiffies are unsigned longRémy Oudompheng3-14/+10
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-10-29staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macroIvan Safonov1-1/+1
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macroIvan Safonov2-13/+12
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macroIvan Safonov2-3/+3
min (or max) kernel macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macroIvan Safonov1-1/+1
ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>