Commit graph

525 commits

Author SHA1 Message Date
Greg Kroah-Hartman
e2aad1d571 Merge 3.12-rc2 into staging-next.
This resolves the merge problem with two iio drivers that Stephen
Rothwell pointed out.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 08:59:04 -07:00
Larry Finger
da6c37392c staging: r8188eu: Fix smatch warning in rtl8188eu/core/rtw_xmit.c
Smatch reports the following:
  CHECK   drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/core/rtw_xmit.c:1570 dequeue_one_xmitframe() info: ignoring unreachable code.

This code uses a while construction that has an unconditional break. This part
of the code was restructured to use an if statement and the dead code was
removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:45 -07:00
Larry Finger
9840093505 staging: r8188eu: Fix smatch warnings in core/rtw_recv.c
Smatch reports the following:
drivers/staging/rtl8188eu/core/rtw_recv.c:211 rtw_free_recvframe() warn: variable dereferenced before check 'precvframe' (see line 207)
drivers/staging/rtl8188eu/core/rtw_recv.c:1803 amsdu_to_msdu() warn: variable dereferenced before check 'sub_skb' (see line 1784)

The code was rearranged to eliminate the dereference before the check.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:45 -07:00
Larry Finger
473803650d staging: r8188eu: Fix smatch warning in core/rtw_wlan_util.c
A misplaced _func_exit_ macro leads to the following smatch warning:
drivers/staging/rtl8188eu/core/rtw_wlan_util.c:1105 rtw_check_bcn_info() info: ignoring unreachable code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:45 -07:00
Larry Finger
9b276d2bd2 staging: r8188eu: Fix a smatch warnings in core/rtw_recv.c
Smatch reports the following:
drivers/staging/rtl8188eu/os_dep/recv_linux.c:227 rtw_recv_indicatepkt() warn: variable dereferenced before check 'precv_frame' (see line 139)

The test in this location is removed and added in the free routine.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:45 -07:00
Larry Finger
e255b0c6f7 staging: r8188eu: Fix some smatch errors in core/rtw_efuse.c
Smatch reports the following situations:

drivers/staging/rtl8188eu/core/rtw_efuse.c:589 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
drivers/staging/rtl8188eu/core/rtw_efuse.c:598 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
drivers/staging/rtl8188eu/core/rtw_efuse.c:681 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
drivers/staging/rtl8188eu/core/rtw_efuse.c:690 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8

In these cases, it is possible to write beyond the end of an array.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:44 -07:00
Larry Finger
9511906776 staging: r8188eu: Remove unreachable code in core/rtw_br_ext.c
In this file, a "return -1" immediately follows a "return 0". Remove the
second line.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:44 -07:00
Larry Finger
fbb57f6d35 staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.
Smatch shows the following warning:
drivers/staging/rtl8188eu/core/rtw_ieee80211.c:161 rtw_set_ie() info: ignoring unreachable code.

The cause is a module exit tracing statement after a return.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:44 -07:00
Faris de Haan
e4309b5dd5 Staging: rtl8188eu: rtw_wlan_util.c: Fixed checkpatch.pl warnings.
Fixed a few of the coding style issues reported by checkpatch.pl

Signed-off-by: Faris de Haan <farisdehaan@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:44 -07:00
Faris de Haan
ecdca55495 Staging: rtl8188eu: checkpatch.pl warnings removed
Fixed some of the coding style issues reported by checkpatch.pl

Signed-off-by: Faris de Haan <farisdehaan@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:43 -07:00
Larry Finger
8429bf1a04 staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.
Smatch shows the following warning:
drivers/staging/rtl8188eu/core/rtw_ieee80211.c:161 rtw_set_ie() info: ignoring unreachable code.

The cause is a module exit tracing statement after a return.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:39:28 -07:00
Geert Uytterhoeven
82f5e5cea5 staging: r8188eu: Fix uninitialized variable change_inx
drivers/staging/rtl8188eu/core/rtw_wlan_util.c: In function ‘WMMOnAssocRsp’:
drivers/staging/rtl8188eu/core/rtw_wlan_util.c:634: warning: ‘change_inx’ may be used uninitialized in this function

And the compiler is right: change_inx should be initialized to false.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:39:27 -07:00
Dave Jones
f0cffa497e staging/rtl8188eu: pass channel list by reference instead of copying struct.
Signed-off-by: Dave Jones <davej@fedoraproject.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:39:27 -07:00
Dan Carpenter
dc427fe72b staging: rtl8188eu: off by one in rtw_set_802_11_add_wep()
"keyid" is used as an offset into the ->dot11DefKey[] array.  The array
has 4 elements.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 11:46:47 -07:00
Dan Carpenter
15f7af8be4 staging: r8188eu: copying one byte too much
There is a copy and paste bug here so we copy 4 bytes instead of 3.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 11:46:47 -07:00
Dan Carpenter
976e0cf685 staging: rtl8188eu: || vs && typo
Obviously it's impossible for ->KeyLength to be both 5 and 13.  I assume
that && was intended here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 11:46:47 -07:00
Dan Carpenter
955fae6fd7 staging: r8188eu: off by one bugs
These should be "<" instead of "<=".  Also we can use the ARRAY_SIZE()
macro.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 11:46:47 -07:00
Larry Finger
d33b128ea9 staging: r8188eu: Fix build errors for allyesconfig
This driver has some global names that are the same as found in
driver r8712. Fix the allyesconfig build errors by changing the
names of those routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-25 10:21:01 -07:00
Larry Finger
d6846af679 staging: r8188eu: Add files for new driver - part 7
This commit adds core/rtw_wlan_util.c and core/rtw_xmit.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger
1b509caf5c staging: r8188eu: Add files for new driver - part 6
This commit adds core/rtw_security.c, core/rtw_sreset.c, and core/rtw_sta_mgt.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger
1cc18a22b9 staging: r8188eu: Add files for new driver - part 5
This commit adds core/rtw_pwrctrl.c, core/rtw_recv.c, and core/rtw_rf.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger
7b464c9fa5 staging: r8188eu: Add files for new driver - part 4
This commit adds files core/rtw_led.c, core/rtw_mlme.c, core/rtw_mlme_ext.c,
core/rtw_mp.c, core/rtw_mp_ioctl.c, and core/rtw_p2p.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger
105981e601 staging: r8188eu: Add files for new driver - part 3
This commit adds core/rtw_io.c, core/rtw_ioctl_set.c, and core/rtw_iol.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:19:59 -07:00
Larry Finger
06a0588468 staging: r8188eu: Add files for new driver - part 2
This commit adds core/rtw_debug.c, core/rtw_efuse.c, and core/rtw_ieee80211.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:19:59 -07:00
Larry Finger
9a7fe54ddc staging: r8188eu: Add source files for new driver - part 1
This commit adds core/rtw_ap.c, core/rtw_br_ext.c, and core/rtw_cmd.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:19:59 -07:00