Commit Graph
264775 Commits
Author SHA1 Message Date
K. Y. Srinivasan 8ec31f9385 Staging: hv: mousevsc: Get rid of mousevsc_on_device_remove() by inlining code
Get rid of mousevsc_on_device_remove() by inlining code.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:36 -07:00
K. Y. Srinivasan 8660e38fab Staging: hv: mousevsc: Cleanup mousevsc_connect_to_vsp()
Cleanup mousevsc_connect_to_vsp(). There is no need to take reference on the
mousevsc device object when we are setting up the device. As part of this
cleanup get rid of get_input_device() as this function is only used here.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:36 -07:00
K. Y. Srinivasan 1486dd0d0a Staging: hv: mousevsc: Get rid of mousevsc_on_send_completion()
We don't need to handle the "send complete" callback - nothing needs to be done
here; get rid of the code.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:35 -07:00
K. Y. Srinivasan bdbbdb2d63 Staging: hv: mousevsc: Cleanup alloc_input_device()
Cleanup alloc_input_device(); you can directly set the reference count.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:34 -07:00
K. Y. Srinivasan c5b71fc71f Staging: hv: mousevsc: Get rid of the unused state: num_outstanding_req
Get rid of the unused state: num_outstanding_req in struct mousevsc_dev.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:34 -07:00
K. Y. Srinivasan ea8646b92f Staging: hv: mousevsc: Free allocated memory in free_input_device()
Free all allocated memory in free_input_device().

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:34 -07:00
K. Y. Srinivasan 61c4fb47cf Staging: hv: mousevsc: Get rid of unnecessary pr_* calls
Get rid of unnecessary pr_* calls.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:34 -07:00
K. Y. Srinivasan 5cd4d0302c Staging: hv: mousevsc: Cleanup error handling
Cleanup error handling in this driver; use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:33 -07:00
K. Y. Srinivasan 0b1f0da005 Staging: hv: mousevsc: Get rid of unnecessary DPRINT calls
Get rid of unnecessary DPRINT calls.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:33 -07:00
K. Y. Srinivasan da5969e4cc Staging: hv: mousevsc: Cleanup and properly implement reportdesc_callback()
Cleanup and properly implement reportdesc_callback(); properly allocate the
hid_device and properly initialize the hid device structure.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:33 -07:00
K. Y. Srinivasan 622a50dce0 Staging: hv: mousevsc: Use completion primitive to synchronize
Use completion primitive to synchronize.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:32 -07:00
K. Y. Srinivasan 1738067e5d Staging: hv: mousevsc: Correctly initialize the header size
Correctly initialize the header size.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:32 -07:00
K. Y. Srinivasan 60e8615ad6 Staging: hv: mousevsc: Handle the case where we may get bogus report desc size
Handle the case where we may get bogus report desc size from the host.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:32 -07:00
K. Y. Srinivasan 01584892db Staging: hv: mousevsc: Change the allocation flags to reflect interrupt context
Change the allocation flags to reflect interrupt context.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:32 -07:00
K. Y. Srinivasan 7f2bad4bd0 Staging: hv: mousevsc: Fixup some bogus WARN_ON() calls
Fix the bogus WARN_ON() calls.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:31 -07:00
K. Y. Srinivasan 28e0d06655 Staging: hv: mousevsc: Get rid of the struct input_device_context
The state maintained in struct input_device_context can easily be included
in the struct mousevsc_dev structure. Simplify the code by consolidating
the state.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:31 -07:00
K. Y. Srinivasan 870e53adbd Staging: hv: mousevsc: Fixup struct hv_input_dev_info
This structure is protocol defined structure and must match the definition
on the host side. Make appropriate adjustments.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:39:30 -07:00
Jonathan Cameron 9d5d11539a staging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN
Unsuprisingly this symbol isn't defined on big endian systems.

Signed-off-by: Jonathan Cameron <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:37:06 -07:00
Stephen Rothwell 81e07c06e6 staging: r8712u: include module.h where needed
Signed-off-by: Stephen Rothwell <[email protected]>
Acked-by: Larry Finger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:37:06 -07:00
Stephen Rothwell 6a37b041d2 staging: iio: adc: add includes of module.h and stat.h
fixes these build problems:

drivers/staging/iio/adc/ad7746.c:345:8: error: 'S_IWUSR' undeclared here (not in a function)
drivers/staging/iio/adc/ad7746.c:436:8: error: 'S_IRUGO' undeclared here (not in a function)
drivers/staging/iio/adc/ad7746.c:681:19: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/staging/iio/adc/ad7746.c:778:1: warning: data definition has no type or storage class [enabled by default]
drivers/staging/iio/adc/ad7746.c:778:1: warning: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Wimplicit-int]
drivers/staging/iio/adc/ad7746.c:778:1: warning: parameter names (without types) in function declaration [enabled by default]
drivers/staging/iio/adc/ad7746.c:799:15: error: expected declaration specifiers or '...' before string constant
drivers/staging/iio/adc/ad7746.c:800:20: error: expected declaration specifiers or '...' before string constant
drivers/staging/iio/adc/ad7746.c:801:16: error: expected declaration specifiers or '...' before string constant

Signed-off-by: Stephen Rothwell <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04 10:37:05 -07:00
Roland Vossen 358830e372 staging: brcm80211: removed functionality to disable N mode
NVRAM contains a parameter that can disable N mode. This functionality
is not needed. As a consequence, brcms_c_protection_upd() could be
simplified.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:51 -07:00
Roland Vossen 44a94f62f1 staging: brcm80211: cleaned up buffer len defines in fullmac
Code cleanup. Replaced identical definition BRCMF_C_DCMD_MAXLEN
by BRCMF_DCMD_MAXLEN. Renamed related buffer len definitions.

Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:51 -07:00
Roland Vossen 2228b27da6 staging: brcm80211: renamed ioctl functions/structs to dcmd
The fullmac dongle communicates with the driver using certain codes. These
codes were named 'ioctls' in the code, but this term is confusing since
it is used in kernel<->driver context. The term 'ioctl' has been replaced
with 'dcmd' for 'dongle command'.

Reported-by: Johannes Berg <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Reviewed-by: Franky (Zhenhui) Lin <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:50 -07:00
Roland Vossen 8ff3a89684 staging: brcm80211: removed 'enforce_mutex' parameter in fullmac
Parameter was always called with the value 'true'.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Reviewed-by: Franky (Zhenhui) Lin <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:50 -07:00
Roland Vossen 9ee777a558 staging: brcm80211: removed fullmac function brcmf_bus_devreset()
Function is not called anymore.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Reviewed-by: Franky (Zhenhui) Lin <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:50 -07:00
Roland Vossen 4be9393fb8 staging: brcm80211: removed unused softmac mimo disable code
No element in array locale_bn[] has the 'no mimo' flag bit set.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:50 -07:00
Roland Vossen 93a03c62ed staging: brcm80211: removed unused fullmac spinlock
Usage of spinlock depended on module parameters that are going to
be removed in a subsequent patch. Parameter wlc->threads_only is
always 'true'.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Reviewed-by: Franky Lin <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:50 -07:00
Arend van Spriel 8b36ac445a staging: brcm80211: reducing indentation levels in bcmsdh_sdmmc.c
Some functions in the source file had a lot of indentation levels
forcing statements to be spread over multiple lines impairing the
readability of the code.

Reported-by: Joe Perches <[email protected]>
Reviewed-by: Franky (Zhenhui) Lin <[email protected]>
Reviewed-by: Roland Vossen <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:49 -07:00
Roland Vossen 9f3697f950 staging: brcm80211: reduce indentation level in dhd_sdio.c #3
By introducing 1 new function.

Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:49 -07:00
Roland Vossen 800c2b6750 staging: brcm80211: reduce indentation level in dhd_sdio.c #2
By introducing 1 new function.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Reviewed-by: Franky (Zhenhui) Lin <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:49 -07:00
Roland Vossen 875176bb0b staging: brcm80211: reduce indentation level in dhd_sdio.c #1
By introducing two new functions.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Reviewed-by: Franky (Zhenhui) Lin <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:49 -07:00
Arend van Spriel 683fbb4239 staging: brcm80211: only allow one call to add_interface callback
The driver only supports one network interface to be associated
with it. Only for the first call it does actually something. For
subsequent calls it does return -ENODEV error code.

Reported-by: Johannes Berg <[email protected]>
Reviewed-by: Roland Vossen <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:48 -07:00
Roland Vossen 71e233a2ab staging: brcm80211: added __iomem qualifier to softmac phy
Code cleanup. Makes it clear when an address is mapped IO space.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:48 -07:00
Roland Vossen ffa1350e50 staging: brcm80211: added __iomem qualifier to softmac dma.c
Code cleanup. Makes it clear when an address is mapped IO space.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:48 -07:00
Roland Vossen d892735338 staging: brcm80211: added __iomem qualifier to softmac main.c
Code cleanup. Makes it clear when an address is mapped IO space.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:48 -07:00
Roland Vossen f2ac3b297d staging: brcm80211: reduced softmac sparse warnings
By declaring certain variables static. One unused array induced a warning,
array was deleted.

Reviewed-by: Arend van Spriel <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:47 -07:00
Roland Vossen 9d1b113e2b staging: brcm80211: various __iomem additions to softmac.
So it is clear to the reader what memory is IO mapped

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:47 -07:00
Roland Vossen 24cca4aafb staging: brcm80211: cleaning up tx rate control code in softmac
Code cleanup. Code was unnecessarily complex.

Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:47 -07:00
Roland Vossen 7983a5a7ff staging: brcm80211: removed unused smac tx ampdu packet queue
A remnant of the past.

Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:46 -07:00
Roland Vossen 3e8eda4447 staging: brcm80211: removed some unused fmac variable declarations
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:16:46 -07:00
Roland Vossen c4aa147ac3 staging: brcm80211: declared global vars in softmac phy as const
Global variables are undesirable unless they are read only.

Reported-by: Johannes Berg <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:33 -07:00
Roland Vossen 5c0fd595e2 staging: brcm80211: simple changes to softmac phy variables
Code cleanup resulting in less sparse warnings.

Reported-by: Johannes Berg <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:33 -07:00
Arend van Spriel e4e2f462ae staging: brcm80211: use d11rxhdr structure in brcms_c_recover_tsf64()
All information needed for this function is available in the d11rxhdr
structure. This is the last place where the brcms_d11rxhdr structure
so it can be removed.

Reviewed-by: Roland Vossen <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:32 -07:00
Arend van Spriel 28bb0f60ce staging: brcm80211: move rssi computation to place we need it
The rssi computation was done upon getting the frame from the
queue, but the value is needed when filling in the receive status
data for mac80211. The call to wlc_phy_rssi_compute() has been
deferred.

Reviewed-by: Roland Vossen <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:32 -07:00
Arend van Spriel 776dddc52d staging: brcm80211: use endian annotated structures in brcmsmac
Structures interfacing with the device have a specific endianess and
structures exchanged between host and device have been annotated so
sparse checking can be done. The Makefile has been modified to add
the __CHECK_ENDIAN__ flag.

Reported-by: Johannes Berg <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Roland Vossen <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:32 -07:00
Arend van Spriel f32f116bda staging: brcm80211: convert endianess before handling the frame
The received frame from the device is in little-endian order and
converted in the receive path. However, the phy code was doing
the rssi calculation with packet in LE order. This has been changed
to do the le_to_cpu conversion before doing the rssi computation
and further receive processing.

Reviewed-by: Roland Vossen <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:32 -07:00
Arend van Spriel e053edb69a staging: brcm80211: change interface for common rssi compute function
The function wlc_phy_rssi_compute() now uses d11rxhdr struct as
purely input parameter and returns the computed rssi value.

Reviewed-by: Roland Vossen <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:31 -07:00
Arend van Spriel d6cf28b310 staging: brcm80211: changing interface to n-phy rssi compute function
The function wlc_phy_rssi_compute_nphy() was called with pointer to
brcms_d11rxhdr structure in which it filled in the received power
per antenna. However, these are not used further in the driver so
it only needs the d11rxhdr structure as input for rssi calculation.

Reviewed-by: Roland Vossen <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:31 -07:00
Roland Vossen e429e0b7f4 staging: brcm80211: removed global variable in softmac otp
Placed variable on the stack instead and deleted unused functions.
Softmac was tested to function properly with multiple adapters in one
system.

Reported-by: Johannes Berg <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:31 -07:00
Roland Vossen 3cfbbacd81 staging: brcm80211: various global var related changes in softmac
Reported-by: Johannes Berg <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Signed-off-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-03 16:12:31 -07:00