1
0
Fork 0
Commit Graph

234 Commits (8f481b50ea653ff0aea6accbb4bb02a15cf00531)

Author SHA1 Message Date
Larry Finger b2dcff2a91 staging: r8188eu: Replace wrappers ODM_sleep_us and rtw_usleep_os
Each of the uses in the code asks for a sleep of 100 usec or so. On Linux,
these are converted to msleep(1).

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 16:02:09 -08:00
Larry Finger 17d4116595 staging: r8188eu: Fix unused variable warnings
A previous set of patches were test compiled with one of the configuration
variables not set. As a result, a number of unused variables were left in the
code.

In several instances, declaration of the unused variable was the only statement
inside ifdef .. endif pairs. In those cases, the entire block was removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 13:04:55 -08:00
Larry Finger a322b495fa staging: r8188eu: Replace wrappers ODM_StallExecution, ODM_delay_us, and rtw_udelay_os
Each instance may bre replaced by udelay

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger 4063642bd4 staging: r8188eu: Replace wrappers ODM_delay_ms() and rtw_mdelay_os() with a simple mdelay
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger 0da46e6bb1 staging: r8188eu: Replace wrappers ODM_sleep_ms() and rtw_msleep_os() with a simple msleep
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger c01fb49636 staging: r8188eu: Replace rtw_get_current_time() with jiffies
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger 03f4a957e6 staging: r8188eu: Remove calls to _rtw_spinlock_free
This wrapper does nothing on Linux. When calls to it were removed, a number of
routines became empty and could also be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger f214e521d9 staging: r8188eu: Remove wrapper around spin_lock_init
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger 597794f53e staging: r8188eu: Remove wrappers around spin_unlock_irqrestore
Again there are two - _exit_critical() and _exit_critical_ex().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger f937886ba9 staging: r8188eu: Remove wrappers for spin_lock_irqsave
There are two such wrappers - _enter_critical() and _enter_critical_ex().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger e02bcf6126 staging: r8188eu: Remove wrapper around spin_unlock_bh
With this change, a number of variables for storing flags are no longer used.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Larry Finger 7057dcb3af staging: r8188eu: Remove wrapper around spin_lock_bh
Some comment lines that mentioned spin_lock_bh() are also removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Greg Kroah-Hartman 82d939ecf0 Merge branch 'opw-next' into staging-next
This pulls in all of the staging patches applied during the opw
application process, and some other staging patches that were submitted
during that period of time.  All of these are for 3.14-rc1.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-22 14:28:31 -08:00
Geert Uytterhoeven 782872bf7a staging: r8188eu: Remove superfluous name cast
usb_driver.name is "const char *"

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 15:30:33 -08:00
Linus Torvalds 9bc9ccd7db Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro:
 "All kinds of stuff this time around; some more notable parts:

   - RCU'd vfsmounts handling
   - new primitives for coredump handling
   - files_lock is gone
   - Bruce's delegations handling series
   - exportfs fixes

  plus misc stuff all over the place"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (101 commits)
  ecryptfs: ->f_op is never NULL
  locks: break delegations on any attribute modification
  locks: break delegations on link
  locks: break delegations on rename
  locks: helper functions for delegation breaking
  locks: break delegations on unlink
  namei: minor vfs_unlink cleanup
  locks: implement delegations
  locks: introduce new FL_DELEG lock flag
  vfs: take i_mutex on renamed file
  vfs: rename I_MUTEX_QUOTA now that it's not used for quotas
  vfs: don't use PARENT/CHILD lock classes for non-directories
  vfs: pull ext4's double-i_mutex-locking into common code
  exportfs: fix quadratic behavior in filehandle lookup
  exportfs: better variable name
  exportfs: move most of reconnect_path to helper function
  exportfs: eliminate unused "noprogress" counter
  exportfs: stop retrying once we race with rename/remove
  exportfs: clear DISCONNECTED on all parents sooner
  exportfs: more detailed comment for path_reconnect
  ...
2013-11-13 15:34:18 +09:00
Teodora Baluta 1f9d82d293 staging: rtl8188eu: correct code alignment
This patch fixes incorrect code alignment due to mixed indenting with
spaces and tabs. This patch was detected using coccinelle and
silences the following warnings:

drivers/staging/rtl8188eu/core/rtw_io.c:297:2-29: code aligned with following code on line 299
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4420:2-29: code aligned with following code on line 4422
drivers/staging/rtl8188eu/os_dep/osdep_service.c:54:2-17: code aligned with following code on line 55
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:7229:2-17: code aligned with following code on line 7231

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 12:05:04 -08:00
Larry Finger 0d1206be22 staging: r8188eu: Set device type to wlan
The latest version of NetworkManager does not recognize the device as wireless
without this change.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> # [3.12+]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29 09:05:21 -07:00
Al Viro 22bd002ee7 rtl8188eu: remove dead code
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24 23:34:54 -04:00
Greg Kroah-Hartman 73b2277718 Merge 3.12-rc3 into staging-next
We want the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-29 18:42:21 -07:00
Larry Finger df3f4edc6c staging: r8188eu: Add new device ID
The DLink DWA-125 Rev D1 also uses this driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Sergey Kostanbaev <sergey.kostanbaev@gmail.com>
Tested-by: Sergey Kostanbaev <sergey.kostanbaev@gmail.com>
Cc: Sergey Kostanbaev <sergey.kostanbaev@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 16:44:45 -07:00
Masanari Iida 7efc02ca94 staging: rtl8188eu: Fix typo in rtl8188eu/os_dep
Correct spelling typo in rtl8188eu/os_dep

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 09:24:37 -07:00
Thomas Meyer 5a2d8292f1 staging: r8188eu: Cocci spatch "noderef"
sizeof when applied to a pointer typed expression gives the size of the
pointer.
Found by coccinelle spatch "misc/noderef.cocci"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:53:39 -07:00
Wei Yongjun a4ec93d8b4 staging: r8188eu: remove needless check before usb_free_urb()
usb_free_urb(NULL) is safe and this check is not required.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:48:46 -07:00
Larry Finger 22fd8b772c staging: r8188eu: Fix smatch warning in os_dep/ioctl_linux.c
Smatch reports the following:
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4891 set_group_key() warn: missing break? reassigning 'keylen'

As it suggests, there is a missing break statement.

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 dc14a626e4 staging: r8188eu: Fix smatch warnings in os_dep/ioctl_linux.c
Smatch reports the following:
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:941 rtw_wx_set_pmkid() warn: add some parenthesis here?
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:1042 rtw_wx_get_range() warn: assigning (-78) to unsigned variable 'range->avg_qual.level'
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:2629 rtw_get_ap_info() warn: add some parenthesis here?
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4043 rtw_rereg_nd_name() warn: add some parenthesis here?
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4052 rtw_rereg_nd_name() warn: add some parenthesis here?

The warnings calling for adding parentheses all have "if (!memcmp() == true)" and
are fixed by removing the "==true" part.

The warning where a negative number is stored in an unsigned variable is fixed
by biasing the result by 256.

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 efbff73ec1 staging: r8188eu: Fix smatch warning in os_dep/osdep_service.c
Smatch reports the following warning:
drivers/staging/rtl8188eu/os_dep/osdep_service.c:634 rtw_change_ifname() warn: variable dereferenced before check 'padapter' (see line 630)

The dereference in question is deferred until the validity of 'padapter' is verified.

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 dc2f9db955 staging: r8188eu: Fix smatch warning in os_dep/usb_intf.c
Smatch reports the following warning:

  CHECK   drivers/staging/rtl8188eu/os_dep/usb_intf.c
drivers/staging/rtl8188eu/os_dep/usb_intf.c:740 rtw_usb_if1_init() info: redundant null check on padapter->HalData calling kfree()

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
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 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
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 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 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