Commit Graph

45 Commits

Author SHA1 Message Date
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 40fac5a132 staging: r8188eu: Fix compiler warnings in os_dep/ioctl_linux.c
The 0-DAY kernel build testing backend reports the following compiler
warnings not shown on my compiler version/options:

   drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function 'rtw_mp_efuse_get':
>> drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:5836:65: warning: iteration 16u invokes undefined behavior [-Waggressive-loop-optimizations]
        sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeEfuseInitMap[i+j]);
                                                                    ^
   drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:5830:3: note: containing loop
      for (i = 0; i < EFUSE_MAP_SIZE; i += 16) {
      ^
>> drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:6042:69: warning: iteration 16u invokes undefined behavior [-Waggressive-loop-optimizations]
        sprintf(extra, "%s %02X", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);
                                                                        ^
   drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:6036:3: note: containing loop
      for (i = 0; i < EFUSE_MAP_SIZE; i += 16) {
      ^

The problem is due to improper settings for some of the EFUSE_XXX defines such that
EFUSE_MAP_SIZE was larger than the sizes of the marked arrays. Thanks to
Fengguang Wu for helping me understand the root cause.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 11:46:46 -07:00
Sachin Kamat 6554f313d1 staging: rtl8188eu: Remove duplicate header inclusion in ioctl_linux.c
Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 15:17:35 -07:00
Sachin Kamat 12b54e0f60 staging: rtl8188eu: Remove duplicate incusion in drv_types.h
wlan_bssdef.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 15:17:35 -07:00
Sachin Kamat 55350178ce staging: rtl8188eu: Include version.h in usb_ops.h
Include version.h header file as detected by versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 15:17:35 -07:00
Sachin Kamat d605eb150d staging: rtl8188eu: Include version.h header in xmit_linux.c
Include version.h header file as detected by versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 15:17:35 -07:00
Sachin Kamat ccaf5bd061 staging: rtl8188eu: Remove version.h inclusion in osdep_service.h
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 15:17:35 -07:00
Larry Finger 854984d70c staging: r8188eu: Fix build error with random configuration
The kbuild test robot reports the following error:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e4a745f9519ef2bbb9d75212ae1cca7582d76266
commit: b63c05394f [7011/7939] staging: r8188eu: Turn on build of new driver
config: x86_64-randconfig-x0-0828 (attached as .config)

All error/warnings:

   drivers/staging/rtl8188eu/core/rtw_p2p.c: In function 'go_add_group_info_attr':
>> drivers/staging/rtl8188eu/core/rtw_p2p.c:70:11: error: 'struct sta_info' has no member named 'is_p2p_device'
      if (psta->is_p2p_device) {

This and the following errors were caused by an incorrect nesting of
conditional compilation directives.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 17:00:46 -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 b63c05394f staging: r8188eu: Turn on build of new driver
This commit modifies drivers/staging/Makefile, and adds the
drivers/staging/rtl8188eu/Makefile.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:31 -07:00
Larry Finger 9a60271187 staging: r8188eu: Add files for new driver - part 31
This commit adds files include/sta_info.h, include/usb_hal.h,
include/usb_ops.h, include/usb_ops_linux.h, include/usb_osintf.h,
include/usb_vendor_req.h, include/wifi.h, include/wlan_bssdef.h,
and include/xmit_osdep.h.

The commit also deleted include/autoconf.h, which is no longer needed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:31 -07:00
Larry Finger 6ddfa35a4a staging: r8188eu: Insert Kconfig files for new driver
The configuration options include those to add code needed for
AP mode, and peer-to-peer mode.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:31 -07:00
Larry Finger 7f8a0fba8c staging: r8188eu: Add files for new driver - part 30
This commit adds files include/rtw_security.h, include/rtw_sreset.h,
include/rtw_version.h, and include/rtw_xmit.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:13 -07:00
Larry Finger fff3340fc0 staging: r8188eu: Add files for new driver - part 29
This commit adds files include/rtw_p2p.h, include/rtw_pwrctrl.h,
include/rtw_qos.h, include/rtw_recv.h, and include/rtw_rf.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger 4218e5be86 staging: r8188eu: Add files for new driver - part 28
This commit adds files include/rtw_mlme.h, include/rtw_mlme_ext.h,
include/rtw_mp.h, include/rtw_mp_ioctl.h, and include/rtw_mp_phy_regdef.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger 93dc9cc661 staging: r8188eu: Add files for new driver - part 27
This commit adds files include/rtw_ht.h, include/rtw_io.h,
include/rtw_ioctl.h, include/rtw_ioctl_rtl.h, include/rtw_ioctl_set.h,
include/rtw_iol.h, and include/rtw_led.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger 475b922e84 staging: r8188eu: Add files for new driver - part 26
This commit adds files include/rtw_android.h, include/rtw_ap.h,
include/rtw_br_ext.h, include/rtw_cmd.h, include/rtw_debug.h,
include/rtw_eeprom.h, include/rtw_efuse.h, and include/rtw_event.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger 58c434013a staging: r8188eu: Add files for new driver - part 25
This commit adds files include/recv_osdep.h, include/rtl8188e_cmd.h,
include/rtl8188e_dm.h, include/rtl8188e_hal.h, include/rtl8188e_led.h,
include/rtl8188e_recv.h, include/rtl8188e_rf.h, include/rtl8188e_spec.h,
include/rtl8188e_sreset.h, and include/rtl8188e_xmit.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger f9f08d70b0 staging: r8188eu: Add files for new driver - part 24
This commit adds files include/odm.h, include/odm_HWConfig.h,
include/odm_RTL8188E.h, include/odm_RegConfig8188E.h, include/odm_RegDefine11AC.h,
include/odm_RegDefine11N.h, include/odm_debug.h, include/odm_interface.h,
include/odm_precomp.h, include/odm_reg.h, include/odm_types.h,
include/osdep_intf.h, and include/osdep_service.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger fe223017c4 staging: r8188eu: Add files for new driver - part 23
This commit adds files include/ieee80211.h, include/ieee80211_ext.h,
include/if_ether.h, include/ioctl_cfg80211.h, include/ip.h,
include/mlme_osdep.h, include/mp_custom_oid.h, and include/nic_spec.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger b1da99bbf2 staging: r8188eu: Add files for new driver - part 22
This commit adds files include/Hal8188EFWImg_CE.h, include/Hal8188EPhyCfg.h,
include/Hal8188EPhyReg.h, include/Hal8188EPwrSeq.h, include/Hal8188ERateAdaptive.h,
include/Hal8188EReg.h, include/HalHWImg8188E_BB.h, include/HalHWImg8188E_FW.h,
include/HalHWImg8188E_MAC.h, include/HalHWImg8188E_RF.h, include/HalPhyRf.h,
include/HalPhyRf_8188e.h, include/HalPwrSeqCmd.h, and include/HalVerDef.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger a7c947b7f3 staging: r8188eu: Add files for new driver - part 21
This commit adds files include/autoconf.h, include/basic_types.h,
include/cmd_osdep.h, include/drv_types.h, include/drv_types_linux.h,
include/ethernet.h. include/h2clbk.h, include/hal_com.h, and include/hal_intf.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger c2478d3907 staging: r8188eu: Add files for new driver - part 20
This commit adds files os_dep/usb_intf.c, os_dep/usb_ops_linux.c,
and os_dep/xmit_linux.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger 5adef66acf staging: r8188eu: Add files for new driver - part 19
This commit adds files os_dep/os_intfs.c, os_dep/recv_linux.c,
and os_dep/rtw_android.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger d3f4b8280a staging: r8188eu: Add files for new driver - part 18
This commit adds files hal/usb_halinit.c and hal/usb_ops_linux.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger 7bc88639ad staging: r8188eu: Add files for new driver - part 17
This commit adds files hal/rtl8188eu_led.c, hal/rtl8188eu_recv.c,
and hal/rtl8188eu_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:10 -07:00
Larry Finger a2c60d42d9 staging: r8188eu: Add files for new driver - part 16
This commit adds files os_dep/ioctl_linux.c, os_dep/mlme_linux.c, and
os_dep/osdep_service.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:06 -07:00
Larry Finger fc324b6a93 staging: r8188eu: Add files for new driver - part 15
This commit adds files hal/rtl8188e_rxdesc.c, hal/rtl8188e_sreset.c, and
hal/rtl8188e_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:01 -07:00
Larry Finger 615a4d12e5 staging: r8188eu: Add files for new driver - part 14
This commit adds files hal/rtl8188e_hal_init.c, hal/rtl8188e_mp.c,
hal/rtl8188e_phycfg.c, and hal/rtl8188e_rf6052.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 7ef8ded0cf staging: r8188eu: Add files for new driver - part 13
This commit adds files hal/odm_RTL8188E.c, hal/odm_RegConfig8188E.c,
hal/rtl8188e_cmd.c, and hal/rtl8188e_dm.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 6c984c81fe staging: r8188eu: Add files for new driver - part 12
This commit adds files odm_HWConfig.c and odm_interface.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 18b0950e02 staging: r8188eu: Add files for new driver - part 11
This commit adds files hal/HalPwrSeqCmd.c, hal/odm.c, and hal/odm_debug.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 8ccfdd440e staging: r8188eu: Add files for new driver - part 10
This commit adds files hal/HalPhyRf.c, hal/HalPhyRf_8188e.c, and hal/hal_intf.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger c59c7267a2 staging: r8188eu: Add files for new driver - part 9
This commit adds files hal/HalHWImg8188E_BB.c, hal/HalHWImg8188E_MAC.c, hal/HalHWImg8188E_RF.c, and
hal/hal_com.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 a0da203b14 staging: r8188eu: Add files for new driver - part 8
This commit adds files hal/Hal8188EFWImg_CE.c, hal/Hal8188EPwrSeq.c, and hal/Hal8188ERateAdaptive.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 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