summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/os_dep
Commit message (Collapse)AuthorAgeFilesLines
* staging: rtl8188eu: os_dep: Remove unnecessary else after returnBhaktipriya Shridhar2016-03-111-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>
* staging: rtl8188eu: remove chip_type of the adapter structureIvan Safonov2016-03-111-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>
* staging: rtl8188eu: replace (a == NULL) to (!a) in rtw_drv_initIvan Safonov2016-03-111-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>
* staging: rtl8188eu: remove unnecessary debug output from os_dep/usb_intf.cIvan Safonov2016-03-111-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>
* staging: rtl8188eu: FIELD_OFFSET macro replaced by offsetof macroIvan Safonov2016-03-111-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>
* staging: rtl8188eu: os_dep: Remove NULL test before vfreeBhaktipriya Shridhar2016-03-111-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>
* staging: rtl8188eu: os_dep: Remove useless return variablesBhaktipriya Shridhar2016-03-111-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>
* staging: rtl8188eu: os_dep: Remove header fileAmitoj Kaur Chawla2016-02-221-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>
* Staging: rtl8188eu: os_dep: Remove NULL test before rtw_free_netdevBhumika Goyal2016-02-141-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>
* staging: rtl8188eu: remove pfirmware and fwsize of the hal_data_8188e structureIvan Safonov2016-02-111-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>
* staging: rtl8188eu: use eth_broadcast_addr() in place of memsetHari Prasath Gujulan Elango2016-02-071-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>
* staging: rtl8188eu: rename camelcase bAcceptAddbaReqLuca Ceresoli2016-02-071-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>
* staging: rtl8188eu: remove useless variable rtw_AcceptAddbaReqLuca Ceresoli2016-02-071-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>
* staging: rtl8188eu: jiffies are unsigned longRémy Oudompheng2015-11-153-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>
* staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macroIvan Safonov2015-10-291-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>
* staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macroIvan Safonov2015-10-292-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>
* staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macroIvan Safonov2015-10-292-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>
* staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macroIvan Safonov2015-10-291-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>
* staging: r8188eu: Add _enter_critical_mutex() error handlingAlexey Khoroshilov2015-10-172-2/+6
| | | | | | | | | | | | | _enter_critical_mutex() is a simple call to mutex_lock_interruptible(), but there is no error handling code for it. The patch removes wrapper _enter_critical_mutex() and adds error handling for mutex_lock_interruptible(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Add missing includeLarry Finger2015-10-021-0/+1
| | | | | | | | | | | | | | | In commit 0a0796eb16f3, there is no include to mon.h, a newly created header file. This omission leads to the following Sparse warnings: CHECK drivers/staging/rtl8188eu/os_dep/mon.c drivers/staging/rtl8188eu/os_dep/mon.c:81:6: warning: symbol 'rtl88eu_mon_recv_hook' was not declared. Should it be static? drivers/staging/rtl8188eu/os_dep/mon.c:113:6: warning: symbol 'rtl88eu_mon_xmit_hook' was not declared. Should it be static? drivers/staging/rtl8188eu/os_dep/mon.c:167:19: warning: symbol 'rtl88eu_mon_init' was not declared. Should it be static? drivers/staging/rtl8188eu/os_dep/mon.c:188:6: warning: symbol 'rtl88eu_mon_deinit' was not declared. Should it be static? Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Introduce monitor interface for IEEE 802.11 framesJakub Sitnicki2015-09-183-0/+209
| | | | | | | | | | | | | | | | 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>
* Staging: rtl8188eu: os_dep: osdep_service.c: Remove explicit NULL comparisonShraddha Barke2015-09-121-1/+1
| | | | | | | | | | | | | | | Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: os_dep: mlme_linux.c: Remove explicit NULL comparisonShraddha Barke2015-09-121-2/+2
| | | | | | | | | | | | | | | Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: os_dep: recv_linux.c: Remove explicit NULL comparisonShraddha Barke2015-09-121-1/+1
| | | | | | | | | | | | | | | Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove unused defineSudip Mukherjee2015-08-071-2/+0
| | | | | | | _RECV_OSDEP_C_ was only defined here but never checked anywhere. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rearrange codeSudip Mukherjee2015-08-071-6/+4
| | | | | | | | Re-arrange the code to directly return success or failure, thus removing the variable used in the function. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: make function voidSudip Mukherjee2015-08-071-2/+1
| | | | | | | | The return value of rtw_os_recv_resource_alloc() is never checked, so make it as void. Moreover as of now the function can not fail. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove unused argumentSudip Mukherjee2015-08-071-2/+1
| | | | | | | | The function rtw_os_recv_resource_alloc() only uses the argument struct recv_frame *. So remove the other unused argument. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging : rtl8188eu : os_dep : Compression of lines for immediate returnShraddha Barke2015-07-311-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch compresses two lines into a single line if immediate return is found. Also remove variable ret as it is no longer needed. Semantic patch used for this is as follows: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: wrap a long if condition and remove extra parenthesisJakub Sitnicki2015-07-311-1/+2
| | | | | Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constantsJakub Sitnicki2015-07-311-1/+1
| | | | | | | | linux/ieee80211.h already defines constants for information element IDs. Resolve discrepancies in naming and remove the duplicated definitions. Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: rtl8188eu Refactored rtw_free_assoc_resourcesBuţiu Alexandru Octavian2015-07-243-3/+3
| | | | | | | | 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>
* staging: rtl8188eu: remove multiple blank lineSudip Mukherjee2015-07-221-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>
* staging: rtl8188eu: dont mix success and error pathSudip Mukherjee2015-07-221-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>
* staging: rtl8188eu: check for kzalloc failureSudip Mukherjee2015-07-221-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>
* staging: rtl8188eu: remove labelSudip Mukherjee2015-07-221-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>
* staging: rtl8188eu: remove unused defineSudip Mukherjee2015-07-221-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>
* staging: rtl8188eu: remove unneeded retSudip Mukherjee2015-07-161-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>
* staging: rtl8188eu: stop using DBG_88ESudip Mukherjee2015-07-161-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>
* staging: rtl8188eu: remove unneeded variableSudip Mukherjee2015-07-161-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>
* staging: rtl8188eu: remove goto labelSudip Mukherjee2015-07-161-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>
* staging: rtl8188eu: remove redundant NULL checkSudip Mukherjee2015-07-161-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>
* staging: rtl8188eu: don't duplicate ieee80211 WLAN_CAPABILITY_* constantsJakub Sitnicki2015-07-141-2/+2
| | | | | | | | | | | | linux/ieee80211.h already defines constants for capability bits. Include it where needed, resolve discrepancies in naming, and remove the duplicated definitions. Also, make use of WLAN_CAPABILITY_IS_STA_BSS() macro to check if neither ESS nor IBSS capability bits are set. Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: fix typo in comments sectionHari Prasath Gujulan Elango2015-06-151-1/+1
| | | | | | | This patch fixes a typo in the comment section. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove unused variablesSudip Mukherjee2015-06-121-2/+1
| | | | | | | These variables were being set but not used afterwards. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: eliminate spaces before commasAndrzej Pietrasiewicz2015-06-101-1/+1
| | | | | | | | | | | | | | Eliminate "space prohibited before that ','" errors found by checkpatch, but do this only to lines which after the patch is applied do not exceed 80 characters. Out of that only those lines are changed, whose context does not exceed 80 characters in each line. In other words the changes are limited to cases where the patch generated is itself checkpatch-correct. Rebased onto next-20150605. Signed-off-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Kill dead calls to kill_pid()Jakub Sitnicki2015-06-012-14/+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>
* staging: rtl8188eu: return an error code, not a booleanLuca Ceresoli2015-05-311-6/+7
| | | | | | | | | | | | | | | | | "If the name of a function is an action or an imperative command, the function should return an error-code integer." (Documentation/CodingStyle) Several action-like functions in this driver return a boolean: _SUCCESS = 1 on success, _FAIL = 0 on error, defined in drivers/staging/rtl8188eu/include/osdep_service.h. Change rtw_start_drv_threads() to return a proper 0-or-error value. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <gregkh@linux.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: declare internal symbols as staticLuca Ceresoli2015-05-311-6/+9
| | | | | | | | | Also remove them from .h files. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <gregkh@linux.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove useless return valueLuca Ceresoli2015-05-311-2/+1
| | | | | | | | | | The loadparam() function cannot fail, it's called only once and its return value is ignored there. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <gregkh@linux.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud