Commit Graph

1400 Commits

Author SHA1 Message Date
David S. Miller cf124db566 net: Fix inconsistent teardown and release of private netdev state.
Network devices can allocate reasources and private memory using
netdev_ops->ndo_init().  However, the release of these resources
can occur in one of two different places.

Either netdev_ops->ndo_uninit() or netdev->destructor().

The decision of which operation frees the resources depends upon
whether it is necessary for all netdev refs to be released before it
is safe to perform the freeing.

netdev_ops->ndo_uninit() presumably can occur right after the
NETDEV_UNREGISTER notifier completes and the unicast and multicast
address lists are flushed.

netdev->destructor(), on the other hand, does not run until the
netdev references all go away.

Further complicating the situation is that netdev->destructor()
almost universally does also a free_netdev().

This creates a problem for the logic in register_netdevice().
Because all callers of register_netdevice() manage the freeing
of the netdev, and invoke free_netdev(dev) if register_netdevice()
fails.

If netdev_ops->ndo_init() succeeds, but something else fails inside
of register_netdevice(), it does call ndo_ops->ndo_uninit().  But
it is not able to invoke netdev->destructor().

This is because netdev->destructor() will do a free_netdev() and
then the caller of register_netdevice() will do the same.

However, this means that the resources that would normally be released
by netdev->destructor() will not be.

Over the years drivers have added local hacks to deal with this, by
invoking their destructor parts by hand when register_netdevice()
fails.

Many drivers do not try to deal with this, and instead we have leaks.

Let's close this hole by formalizing the distinction between what
private things need to be freed up by netdev->destructor() and whether
the driver needs unregister_netdevice() to perform the free_netdev().

netdev->priv_destructor() performs all actions to free up the private
resources that used to be freed by netdev->destructor(), except for
free_netdev().

netdev->needs_free_netdev is a boolean that indicates whether
free_netdev() should be done at the end of unregister_netdevice().

Now, register_netdevice() can sanely release all resources after
ndo_ops->ndo_init() succeeds, by invoking both ndo_ops->ndo_uninit()
and netdev->priv_destructor().

And at the end of unregister_netdevice(), we invoke
netdev->priv_destructor() and optionally call free_netdev().

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-07 15:53:24 -04:00
Ian Chard 3292bae3b4 staging: rtl8188eu: embedded function name style fixes
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-28 12:30:21 +02:00
Dan Carpenter 784047eb2d staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
The "len" could be as low as -14 so we should check for negatives.

Fixes: 9a7fe54ddc ("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-28 12:30:20 +02:00
Aishwarya Pant df93c720e1 staging: rtl8188eu: fix sparse signedness warnings in rtw_generate_ie
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-18 13:54:25 +02:00
Aishwarya Pant 8321643ccc staging: rtl8188eu: fix sparse signedness warnings in rtw_set_ie
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-18 13:54:25 +02:00
Aishwarya Pant af27bea462 staging: rtl8188eu: fix sparse signedness warnings in rtw_get_ie
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-18 13:54:25 +02:00
Hans de Goede 5c42e7efbb staging: rtl8188eu: force driver to be built as a module
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-11 15:59:33 +02:00
Ivan Safonov 1375baa965 staging:r8188eu: remove sw_encrypt member of security_priv struct
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-08 17:11:54 +02:00
Ivan Safonov 82407f388e staging:r8188eu: remove software_encrypt member of registry_priv struct
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-08 17:11:54 +02:00
Ivan Safonov d79640dac7 staging:r8188eu: replace rtw_software_encrypt with its default value
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-08 17:11:54 +02:00
Ivan Safonov 2288387936 staging:r8188eu: remove sw_decrypt member of security_priv struct
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-08 17:11:54 +02:00
Ivan Safonov 8c986111a6 staging:r8188eu: remove software_decrypt member of registry_priv struct
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-08 17:11:53 +02:00
Ivan Safonov 0e7018b4b0 staging:r8188eu: replace rtw_software_decrypt with its value
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-08 17:11:53 +02:00
Alfonso Lima Astor 62f9868990 staging: rtl8188eu: Remove extra spaces
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-08 12:58:30 +02:00
Alfonso Lima Astor 6cd43f0ca0 staging: rtl8188eu: Macros with complex values should be enclosed in parentheses
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-04-08 12:58:29 +02:00
Ivan Safonov 90a6969250 staging:r8188eu: add iv length to frame data offset
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-23 14:28:47 +01:00
Andrii Vladyka adab24a4a7 staging: rtl8188eu: removed blank lines coding style problem
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-16 11:34:53 +09:00
Dan Carpenter 5629ff0ffe staging: rtl8188eu: fix some inverted conditions
We converted these conditions from == NULL and != NULL but messed up
and inverted some.

Fixes: e31447f934 ("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-16 11:34:53 +09:00
Alex Yashchenko 37c002299c staging: rtl8188eu: Fix redundant space coding style issue
Signed-off-by: Alex Yashchenko <alexhoppus111@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12 15:27:40 +01:00
Sebastian Haas 36a803d8c0 staging: rtl8188eu: fix typos in macros
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-09 18:19:07 +01:00
Sebastian Haas fae4ab6b4b staging: rtl8188eu: fix typos in comments
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-09 18:19:07 +01:00
Georgiana Rodica Chelu c89e986910 staging:rtl8188eu Add spaces around binary operator
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-06 09:17:07 +01:00
Gargi Sharma c01496a7d2 staging: rtl8188eu: replace explicit NULL comparison
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-06 09:17:01 +01:00
Yamanappagouda Patil fc988e144c staging: rtl8188eu: Fixed "Missing a blank line after declarations".
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-06 09:17:01 +01:00
Gargi Sharma 5a12a59ec9 staging: rtl8188eu: Add a blank line
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-06 09:17:01 +01:00
Gargi Sharma f10ee27e83 staging: rtl8188eu: Remove multiple blank lines
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-06 09:17:01 +01:00
Gargi Sharma 43a7ea6e3d staging: rtl8188eu: Remove unnecessary blank lines
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-06 09:17:01 +01:00
Gargi Sharma 2091eda1f2 staging: rtl8188eu: Put constant on right side of comparison
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-06 09:17:01 +01:00
Gargi Sharma de109778e7 staging: rtl8188eu: Fix block comments warning
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-06 09:17:01 +01:00
Gargi Sharma e31447f934 staging: rtl8188eu: Replace x==NULL by !x
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-06 09:17:01 +01:00
Ivan Safonov f6712b9fd1 staging:r8188eu: remove unused MCS_rate_2R array
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-06 09:17:01 +01:00
Ivan Safonov ca5508bd0b staging:r8188eu: remove unused HW_VAR_RF_TYPE parameter of HT_caps_handler
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-06 09:17:00 +01:00
Ivan Safonov 19a6e10e14 staging:r8188eu: refactor HT_caps_handler() - remove rtw_hal_get_hwreg() call
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-06 09:17:00 +01:00
Ivan Safonov 8241f92610 staging:r8188eu: refactor rtw_update_ht_cap() - remove rtw_hal_get_hwreg() call
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-06 09:17:00 +01:00
Ivan Safonov 465095ef1c staging:r8188eu: refactor issue_assocreq() - remove rtw_hal_get_hwreg() call
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-06 09:17:00 +01:00
Ivan Safonov 06b2775eca staging:r8188eu: refactor rtw_get_cur_max_rate() - remove rtw_hal_get_hwreg() call
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-06 09:17:00 +01:00
Ivan Safonov a7980ce2e1 staging:r8188eu: refactor rtw_check_beacon_data() - remove rtw_hal_get_hwreg() call
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-06 09:17:00 +01:00
Ivan Safonov b6ba87d54f staging:r8188eu: refactor add_RATid() - remove rtw_hal_get_hwreg() call
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-06 09:17:00 +01:00
Ivan Safonov 0bb2b81ee4 staging:r8188eu: use DIV_ROUND_UP() in rtw_signal_stat_timer_hdl()
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-06 09:17:00 +01:00
Ingo Molnar 3f07c01441 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>
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-03-02 08:42:29 +01:00
Shishir Kulkarni 842954a8e3 Staging: rtl8188eu: core/rtw_led.c: format line to reduce it below 80 characters
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-14 09:23:20 -08:00
Ivan Safonov df47a14c2c staging:r8188eu: replace recv_frame->rx_(data|len|tail) with pkt->(data|len|tail) and remove unused recvframe_(put|pull|pull_tail)()
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-09 13:22:09 +01:00
Ivan Safonov e038e67f08 staging:r8188eu: update pkt->(data|tail|len) synchronously with rx_(data|tail|len) in recv_frame structure
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-09 13:22:09 +01:00
Ivan Safonov bdf299c140 staging:r8188eu: remove unused rtw_ieee80211_bar structure definition
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-09 13:22:09 +01:00
Ivan Safonov 35abf582a5 staging:r8188eu: replace rx_end member of recv_frame with pkt->end
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-09 13:22:09 +01:00
Martin Karamihov b878077905 staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
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-02-03 13:01:36 +01:00
William Blough 4d9119132b staging: rtl8188eu: Fix coding style issues
Convert leading spaces to tabs

Signed-off-by: William Blough <devel@blough.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-27 21:09:33 +01:00
Derek Robson 11b74593cb Staging: rtl8188eu: os_dep: usb_ops_linux.c - style fix
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-23 09:56:29 +01:00
Shyam Saini f17331eb4b staging: rtl8188eu: core: Remove NULL test before vfree
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-19 11:32:29 +01:00
Pierre-Yves Kerbrat ca366962ee staging: rtl8188eu: fix type sign of len in rtw_get_bcn_info
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-19 10:53:15 +01:00