aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-04-28staging: rtl8188eu: embedded function name style fixesIan Chard1-2/+2
Replace a couple of function names embedded in trace messages with __func__. One of them had a typo anyway. Signed-off-by: Ian Chard <ian@chard.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()Dan Carpenter1-1/+1
The "len" could be as low as -14 so we should check for negatives. Fixes: 9a7fe54ddc3a ("staging: r8188eu: Add source files for new driver - part 1") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: rtl8188eu: fix sparse signedness warnings in rtw_generate_ieAishwarya Pant2-2/+2
Changed the type of wpa_ie_len from (int *) to (unsigned int *) in the function rtw_get_wpa_ie(..) to suppress signedness mismatch warnings in rtw_generate_ie of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: expected int *wpa_ie_len drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: got unsigned int *<noident> Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: rtl8188eu: fix sparse signedness warnings in rtw_set_ieAishwarya Pant1-1/+2
Changed the type of sz from (int) to (unsigned int) to suppress signedness mismatch warnings of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: expected unsigned int [usertype] *frlen drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: got int *<noident> Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: rtl8188eu: fix sparse signedness warnings in rtw_get_ieAishwarya Pant5-17/+16
Changed the type of len from (int *) to (unsigned int *) in the function rtw_get_ie(..) and wherever this function is called to suppress signedness mismatch warnings of the type- drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: expected int *len drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: got unsigned int *<noident> Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-11staging: rtl8188eu: force driver to be built as a moduleHans de Goede1-0/+1
The rtl8188eu driver defines a ton of global symbols which tend to conflict with other realtek wifi drivers, force it to be built as a module. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging:r8188eu: remove sw_encrypt member of security_priv structIvan Safonov4-10/+5
sw_encrypt always is 0. Replace sw_encrypt with 0. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging:r8188eu: remove software_encrypt member of registry_priv structIvan Safonov2-3/+1
Value of this variable does not changed after initialization. Replace software_encrypt with its default value. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging:r8188eu: replace rtw_software_encrypt with its default valueIvan Safonov1-3/+1
rtw_software_encrypt used only once and does not changed. Replace it with 0. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging:r8188eu: remove sw_decrypt member of security_priv structIvan Safonov3-4/+2
sw_decrypt always is 0, so replace it with 0. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging:r8188eu: remove software_decrypt member of registry_priv structIvan Safonov2-3/+1
Value of this variable has no changes, and used once. Replace software_decrypt with its value. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging:r8188eu: replace rtw_software_decrypt with its valueIvan Safonov1-2/+1
rtw_software_decrypt used only once and does not changed. Replace it with 0. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: rtl8188eu: Remove extra spacesAlfonso Lima Astor1-1/+1
Coding style problem detected by checkpatch.pl ERROR: space prohibited before that ',' Signed-off-by: Alfonso Lima Astor <alfonsolimaastor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: rtl8188eu: Macros with complex values should be enclosed in parenthesesAlfonso Lima Astor1-6/+0
This macro is not used and also had a style error. I have run grep and compiled the module to be sure. Signed-off-by: Alfonso Lima Astor <alfonsolimaastor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging:r8188eu: add iv length to frame data offsetIvan Safonov1-1/+1
If this frame contains IV/ICV fields, ether_type field located a little farther. This bug already fixed here: https://github.com/lwfinger/rtl8188eu/blob/master/core/rtw_recv.c#L569 . Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: rtl8188eu: removed blank lines coding style problemAndrii Vladyka1-1/+0
Fix 'multiple blank lines' coding style problem reported by checkpatch.pl. Signed-off-by: Andrii Vladyka <tulup@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: rtl8188eu: fix some inverted conditionsDan Carpenter1-4/+4
We converted these conditions from == NULL and != NULL but messed up and inverted some. Fixes: e31447f934d3 ("staging: rtl8188eu: Replace x==NULL by !x") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12staging: rtl8188eu: Fix redundant space coding style issueAlex Yashchenko1-1/+1
Signed-off-by: Alex Yashchenko <alexhoppus111@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: rtl8188eu: fix typos in macrosSebastian Haas2-4/+4
Rename macro definition and usage to represent correct spelling of DEFAULT: ODM_REG_RX_DEFUALT_A_11N => ODM_REG_RX_DEFAULT_A_11N ODM_REG_RX_DEFUALT_B_11N => ODM_REG_RX_DEFAULT_B_11N Signed-off-by: Sebastian Haas <sehaas@deebas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: rtl8188eu: fix typos in commentsSebastian Haas7-8/+8
Fix typos reported by checkpatch.pl Signed-off-by: Sebastian Haas <sehaas@deebas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:rtl8188eu Add spaces around binary operatorGeorgiana Rodica Chelu1-12/+12
Add spaces around binary operator '&' in order to increase the readability of the code. Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8188eu: replace explicit NULL comparisonGargi Sharma1-1/+1
Replace explicit NULL comparison with ! operator to simplify code. Found with Coccinelle script: @@ expression ptr; position p; statement s0; @@ ptr@p = \(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\| alloc_netdev\|dev_alloc_skb\)(...) ... when != ptr if ( ( + ! ptr - == NULL ) ) s0 Signed-off-by: Gargi Sharma <gs051095@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8188eu: Fixed "Missing a blank line after declarations".Yamanappagouda Patil7-0/+22
Fixed checkpatch.pl "missing a blank line after declarations" waring messages from rtl8188eu module. Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8188eu: Add a blank lineGargi Sharma1-0/+1
Add a blank line after function declaration to fix the checkpatch issue Please use a blank line after function/struct/union/enum declarations. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8188eu: Remove multiple blank linesGargi Sharma1-11/+0
Remove blank lines to fix the checkpatch issue, don't use multiple blank lines. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8188eu: Remove unnecessary blank linesGargi Sharma1-2/+0
Remove unnecessary blank lines to fix the checkpatch issue, blank lines are not required before '}'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8188eu: Put constant on right side of comparisonGargi Sharma1-9/+9
Constants should be on the right side of comparisons. Issue found by checkpatch.pl script. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8188eu: Fix block comments warningGargi Sharma1-30/+31
Align * on each line and move final */ to a new line, to conform to the kernel coding style for block comments. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8188eu: Replace x==NULL by !xGargi Sharma1-15/+15
Replace x==NULL by !x, to fix the checkpatch issue comparsion with NULL could be written as !x. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: remove unused MCS_rate_2R arrayIvan Safonov3-3/+0
MCS_rate_2R[] does not used. Remove it. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: remove unused HW_VAR_RF_TYPE parameter of HT_caps_handlerIvan Safonov2-4/+0
rtw_hal_get_hwreg() does not used with HW_VAR_RF_TYPE parameter. Remove HW_VAR_RF_TYPE switch case in rtw_hal_get_hwreg and definition. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: refactor HT_caps_handler() - remove rtw_hal_get_hwreg() callIvan Safonov1-9/+2
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor HT_caps_handler(). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: refactor rtw_update_ht_cap() - remove rtw_hal_get_hwreg() callIvan Safonov1-9/+2
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor rtw_update_ht_cap(). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: refactor issue_assocreq() - remove rtw_hal_get_hwreg() callIvan Safonov1-20/+4
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor issue_assocreq(). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: refactor rtw_get_cur_max_rate() - remove rtw_hal_get_hwreg() callIvan Safonov1-3/+1
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor rtw_get_cur_max_rate(). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: refactor rtw_check_beacon_data() - remove rtw_hal_get_hwreg() callIvan Safonov1-7/+2
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor rtw_check_beacon_data(). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: refactor add_RATid() - remove rtw_hal_get_hwreg() callIvan Safonov1-11/+2
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor add_RATid(). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:r8188eu: use DIV_ROUND_UP() in rtw_signal_stat_timer_hdl()Ivan Safonov1-8/+2
DIV_ROUND_UP macro is shorter and look better than if-else construction. DIV_ROUND_UP used in rtw_signal_stat_timer_hdl(). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-02sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>Ingo Molnar1-1/+1
We are going to split <linux/sched/signal.h> out of <linux/sched.h>, which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder <linux/sched/signal.h> file that just maps to <linux/sched.h> to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-02-14Staging: rtl8188eu: core/rtw_led.c: format line to reduce it below 80 charactersShishir Kulkarni1-1/+2
Fixes checkpatch.pl warning: "WARNING: line over 80 characters" Signed-off-by: Shishir Kulkarni <shishir.kulkarni.2307@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging:r8188eu: replace recv_frame->rx_(data|len|tail) with pkt->(data|len|tail) and remove unused recvframe_(put|pull|pull_tail)()Ivan Safonov8-159/+83
recv_frame->rx_(data|len|tail) duplicate pkt (skb) data|len|tail members and require special functions recvframe_(put|pull|pull_tail)() instead of skb_(put|pull|trim). Replace rx_(data|len|tail) with pkt->(data|len|tail), remove rx_(data|len|tail) and remove recvframe_(put|pull|pull_tail)(). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging:r8188eu: update pkt->(data|tail|len) synchronously with rx_(data|tail|len) in recv_frame structureIvan Safonov1-1/+4
Original driver code uses rx_* members to store skb (pkt) fields (instead of pkt->* members), pkt->* updated only after data completely formed, not in process. Update pkt->* after data buffer changed (with rx_*). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging:r8188eu: remove unused rtw_ieee80211_bar structure definitionIvan Safonov1-15/+0
rtw_ieee80211_bar structure definition does not used. Remove it. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging:r8188eu: replace rx_end member of recv_frame with pkt->endIvan Safonov2-3/+1
rx_end is duplication of pkt->end pointer. pkt->end is preferred, because it is native skb field supported by skb_*() functions. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)Martin Karamihov1-2/+1
This is checkpatch fix for hal/bb_cfg.c file: remove not necessary braces {} Signed-off-by: Martin Karamihov <martinowar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-27staging: rtl8188eu: Fix coding style issuesWilliam Blough1-64/+64
Convert leading spaces to tabs Signed-off-by: William Blough <devel@blough.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-23Staging: rtl8188eu: os_dep: usb_ops_linux.c - style fixDerek Robson1-1/+1
Fixed comparison, moved the constant to the right side of the test Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: rtl8188eu: core: Remove NULL test before vfreeShyam Saini1-2/+1
vfree frees the virtually continuous block of memory beginning at addr. If addr is NULL, no operation is performed. So, NULL test is not needed before vfree(). Signed-off-by: Shyam Saini <mayhs11saini@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: rtl8188eu: fix type sign of len in rtw_get_bcn_infoPierre-Yves Kerbrat1-1/+1
len was declared unsigned int where we use an int Fix sparse (-Wtypesign) issues: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1081:88: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1081:88: expected int *len drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1081:88: got unsigned int *<noident> drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1091:86: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1091:86: expected int *len drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1091:86: got unsigned int *<noident> Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: rtl8188eu: fix type of wpa_ielen in rtw_get_cipher_infoPierre-Yves Kerbrat1-1/+1
wpa_ielen was declared u32 when we actually use an int Fix sparse (-Wtypesign) issues: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1008:60: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1008:60: expected int *wpa_ie_len drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1008:60: got unsigned int *<noident> drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1021:69: warning: incorrect type in argument 2 (different signedness) Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>