Commit graph

579 commits

Author SHA1 Message Date
Larry Finger
43dd404762 rtl8188eu: Fix smatch warning in os_dep/osdep_service.c
Smatch shows the following warning:
  CHECK   /home/finger/rtl8188eu/os_dep/osdep_service.c
/home/finger/rtl8188eu/os_dep/osdep_service.c:670 rtw_change_ifname() warn: variable dereferenced before check 'padapter' (see line 666)

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 17:30:18 -05:00
Larry Finger
be114f8fae rtl8188eu: Fix smatch warning in os_dep/recv_linux.c
Smatch shows the following warning:
  CHECK   /home/finger/rtl8188eu/os_dep/recv_linux.c
/home/finger/rtl8188eu/os_dep/recv_linux.c:236 rtw_recv_indicatepkt() warn: variable dereferenced before check 'precv_frame' (see line 142)

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 17:23:55 -05:00
Larry Finger
72c61c0cb2 rtl8188eu: Fix smatch warning in os_dep/usb_intf.c
iSmatch shows the following warning:
  CHECK   /home/finger/rtl8188eu/os_dep/usb_intf.c
/home/finger/rtl8188eu/os_dep/usb_intf.c:720 rtw_resume_process() error: potentially dereferencing uninitialized 'pwrpriv'.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 17:21:46 -05:00
Larry Finger
ffac87a92b rtl8188eu: Fix code error in include/rtw_xmit.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 17:13:58 -05:00
Larry Finger
65c4e60be3 rtl8188eu: Fix smatch problems in core/rtw_ioctl_set.c
Smatch reports the following problems:
  CHECK   /home/finger/rtl8188eu/core/rtw_ioctl_set.c
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:593 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:595 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKeylen' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:599 rtw_set_802_11_add_wep() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4
/home/finger/rtl8188eu/core/rtw_ioctl_set.c:745 rtw_set_802_11_add_key() warn: was && intended here instead of ||?

The buffer overflow messages are due to an off-by-one problem. An if test skips code
for a value > 4. It should be >= 4.

The warning for a suspect logical operator was correct. With a logical or in the statement,
it made no sense.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 12:26:29 -05:00
Larry Finger
d1d8ed064b rtl8188eu: Fix smatch warning in core/rtw_ieee80211.c
Smatch reports the following warning:
  CHECK   /home/finger/rtl8188eu/core/rtw_ieee80211.c
/home/finger/rtl8188eu/core/rtw_ieee80211.c:161 rtw_set_ie() info: ignoring unreachable code.

This warning is caused by a _func_exit_ macro placed after the return.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 12:10:47 -05:00
Larry Finger
8f7fde8d6a rtl8188eu: Fix smatch warnings in core/rtw_efuse.c
Smatch reports the following warnings:

  CHECK   /home/finger/rtl8188eu/core/rtw_efuse.c
/home/finger/rtl8188eu/core/rtw_efuse.c:646 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
/home/finger/rtl8188eu/core/rtw_efuse.c:655 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
/home/finger/rtl8188eu/core/rtw_efuse.c:738 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
/home/finger/rtl8188eu/core/rtw_efuse.c:747 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8

These are due to an off-by-one error in an array size.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 12:08:39 -05:00
Larry Finger
4769256ac2 rtl8188eu: Fix smatch warnings in core/rtw_cmd.c
Smatch reports the following warnings:
  CHECK   /home/finger/rtl8188eu/core/rtw_cmd.c
/home/finger/rtl8188eu/core/rtw_cmd.c:385 rtw_cmd_thread() error: buffer overflow 'wlancmds' 63 <= 63
/home/finger/rtl8188eu/core/rtw_cmd.c:403 rtw_cmd_thread() error: buffer overflow 'rtw_cmd_callback' 63 <= 63

These are caused by an off-by-one error using <= rather than <.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 12:03:09 -05:00
Larry Finger
ccd4c72b62 rtl8188eu: Fix smatch warning in core/rtw_br_ext.c
Smatch reports the following warning:
  CHECK   /home/finger/rtl8188eu/core/rtw_br_ext.c
/home/finger/rtl8188eu/core/rtw_br_ext.c:693 nat25_db_handle() info: ignoring unreachable code.

Remove an entra return statement.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-09-05 11:58:02 -05:00
Álvaro Fernández Rojas
9d32703c93 Remove duplicated CONFIG_AP_MODE check. 2013-09-05 15:16:49 +02:00
Larry Finger
9e9f54983f rtl8188eu: Increase maximum RX gain
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-31 20:02:19 -05:00
Larry Finger
993b021502 rtl8188eu: Fix bug introduced in commit ef1472a
The bug caused failure to transfter data for any B/G network.

Reported by Paolo Valleri
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-19 13:10:26 -05:00
Larry Finger
0306cad214 rtl8188eu: A few fixups
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-19 12:21:40 -05:00
Larry Finger
7446992dc4 rtl8188eu: Remove include/circ_buf.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-15 20:09:00 -05:00
Larry Finger
168faff726 rtl8188eu: Fix checkpatch errors in include/*.h - part 4
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-15 20:04:25 -05:00
Larry Finger
8a46c9e7a5 rtl8188eu: Fix checkpatch errors in include/*.h - part 3
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-15 16:11:51 -05:00
Larry Finger
7120e63109 rtl8188eu: Fix chackpatch errors in include/*.h - part 2
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-14 22:03:17 -05:00
Larry Finger
2db42a3fbf rtl8188eu: Convert non-standard variable types to regular ones
These include changing s1Byte to s8, etc.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-14 12:03:28 -05:00
Larry Finger
9dd1827027 rtl8188eu: Fix checkpatch errors in include/*.h - part 1
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-13 21:01:38 -05:00
Larry Finger
f9d86b986b rtl8188eu: Fix C90 comments in include/*.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-11 23:36:23 -05:00
Larry Finger
49ab4b6c4f rtl8188eu: Fix checkpatch errors in os_dep/xmit_linux.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-11 22:07:26 -05:00
Larry Finger
aa6edf1619 rtl8188eu: Fix checkpatch errors for os_dep/usb_ops_linux.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-11 21:47:28 -05:00
Larry Finger
30b92ac1c6 rtl8188eu: Fix checkpatch errors in os_dep/usb_intf.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-11 20:59:28 -05:00
Larry Finger
b5d91ff7e0 rtl8188eu: Fix checkpatch errors in os_dep/rtw_android.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-10 22:41:06 -05:00
Larry Finger
13e0c8cab0 rtl8188eu: Fix checkpatch errors for os_dep/recv_linux.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-10 22:17:11 -05:00
Larry Finger
a90ca697ca rtl8188eu: Fix checkpatch errors in os_dep/os_intfs.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-10 21:53:06 -05:00
Larry Finger
394828ff89 rtl8188eu: Fix checkpatch errors in os_dep/osdep_service.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-10 12:57:27 -05:00
Larry Finger
5a7c47efff rtl8188eu: Fix checkpatch errors in os_dep/mlme_linux.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-10 12:20:19 -05:00
Larry Finger
8414aef8bd rtl8188eu: Fix checkpatch errors in os_dep/ioctl_linux.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-10 11:56:55 -05:00
Larry Finger
a311b57c32 rtl8188eu: Fix remaining checkfile errors in hal/*.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-08 22:23:49 -05:00
Larry Finger
f527ca59c9 rtl8188eu: Fix checkpatch errors in hal/rtl8188e_mp.c, hal/rtl8188e_phycfg.c, and hal/rtl8188e_rf6052.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-08 09:31:29 -05:00
Larry Finger
9c3c9ddc8c rtl8188eu: Fix checkpatch errors for hal/rtl8188e_hal_init.c and hal/rtl8188e_dm.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-08 00:41:21 -05:00
Larry Finger
5a29bf421e rtl8188eu: Fix checkpatch errors for hal/rtl8188e_cmd.c, hal/odm_interface.c, hal/odm_RegConfig8188E.c, and hal/odm_RTL8188E.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-07 16:24:48 -05:00
Larry Finger
f083317939 rtl8188eu: Fix checkpatch errors in hal/odm_HWConfig.c and hal/odm_debug.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-07 14:30:06 -05:00
Larry Finger
bc21c61991 rtl8188eu: Fix checkpatch errors in hal/odm.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-06 22:34:32 -05:00
Larry Finger
98a63bfadd rtl8188eu: Fix checkpatch errors and checks in hal/HalPwrSeqCmd.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-06 15:50:37 -05:00
Larry Finger
cacca3d6b2 rtl8188eu: Fix checkpatch errors in hal/HalPhyRf.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-06 15:37:28 -05:00
Larry Finger
f1cf522a99 rtl8188eu: Fix checkpatch errors in hal/HalPhyRf_8188e.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-06 15:24:06 -05:00
Larry Finger
574e5bb72b rtl8188eu: Fix checkpatch errors and warnings in hal/hal_intf.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-04 18:08:37 -05:00
Larry Finger
e0542cf999 rtl8188eu: Fix checkfile errors in hal/HalHWImg8188E_RF.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-04 17:34:48 -05:00
Larry Finger
4e6e85f466 rtl8188eu: Fix checkpatch errors in hal/HalHWImg8188E_MAC.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-04 17:14:19 -05:00
Larry Finger
265bcabda9 rtl8188eu: Fix errors in hal/hal_com.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-04 15:12:30 -05:00
Larry Finger
716a0e47ff rtl8188eu: Fix checkpatch errors in hal/Hal8188EPwrSeq.c and hal/HalHWImg8188E_BB.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-04 14:20:21 -05:00
Larry Finger
a153120e2e rtl8188eu: Fix checkpatch errors and warnings in hal/Hal8188EFWImg_CE.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-03 11:04:21 -05:00
Larry Finger
527bc4066f rtl8188eu: Fix checkpatch errors in core/rtw_xmit.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-02 22:16:03 -05:00
Larry Finger
7b59aa12db rtl8188eu: Fix checkpatch errors in core/rtw_wlan_util.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-02 12:12:37 -05:00
Larry Finger
9e855cb914 rtl8188eu: Fix checkpatch errors in core/rtw_sta_mgt.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-01 13:33:20 -05:00
Larry Finger
79b808ad13 rtl8188eu: Fix checkpatch errors in core/rtw_sreset.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-01 13:10:46 -05:00
Larry Finger
539fbbc437 rtl8188eu: Fix checkpatch errors for core/rtw_security.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-08-01 12:59:07 -05:00
Larry Finger
37c22805d1 rtl8188eu: Fix checkpatch errors in core/rtw_rf.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2013-07-31 21:46:50 -05:00