Arend van Spriel [Sun, 2 Oct 2011 17:14:34 +0000 (10:14 -0700)]
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 <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Sun, 2 Oct 2011 17:14:33 +0000 (10:14 -0700)]
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 <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Sun, 2 Oct 2011 17:14:32 +0000 (10:14 -0700)]
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 <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Sun, 2 Oct 2011 17:14:31 +0000 (10:14 -0700)]
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 <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Sun, 2 Oct 2011 17:14:30 +0000 (10:14 -0700)]
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 <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Sun, 2 Oct 2011 17:14:29 +0000 (10:14 -0700)]
staging: brcm80211: various __iomem additions to softmac.
So it is clear to the reader what memory is IO mapped
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Sun, 2 Oct 2011 17:14:28 +0000 (10:14 -0700)]
staging: brcm80211: cleaning up tx rate control code in softmac
Code cleanup. Code was unnecessarily complex.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Sun, 2 Oct 2011 17:14:27 +0000 (10:14 -0700)]
staging: brcm80211: removed unused smac tx ampdu packet queue
A remnant of the past.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Sun, 2 Oct 2011 17:14:26 +0000 (10:14 -0700)]
staging: brcm80211: removed some unused fmac variable declarations
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:36 +0000 (15:34 -0700)]
staging: brcm80211: declared global vars in softmac phy as const
Global variables are undesirable unless they are read only.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:35 +0000 (15:34 -0700)]
staging: brcm80211: simple changes to softmac phy variables
Code cleanup resulting in less sparse warnings.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:34 +0000 (15:34 -0700)]
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 <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:33 +0000 (15:34 -0700)]
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 <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:32 +0000 (15:34 -0700)]
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 <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:31 +0000 (15:34 -0700)]
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 <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:30 +0000 (15:34 -0700)]
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 <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:29 +0000 (15:34 -0700)]
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 <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:28 +0000 (15:34 -0700)]
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 <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:27 +0000 (15:34 -0700)]
staging: brcm80211: various global var related changes in softmac
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:26 +0000 (15:34 -0700)]
staging: brcm80211: removed global var global_scb from softmac
Global variables are undesirable unless they are read only. Removed by
instead using an already defined Station Control Block variable in a
per-device structure.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:25 +0000 (15:34 -0700)]
staging: brcm80211: removed band related global vars from softmac
Global variables are undesirable unless they are read only. Variables are
now maintained in a device specific structure.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:24 +0000 (15:34 -0700)]
staging: brcm80211: remove unnecessary mac80211 callbacks
Several callback were implemented without executing any further
function calls into the driver. Review feedback indicated that
these could be removed.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:23 +0000 (15:34 -0700)]
staging: brcm80211: remove dongle firmware related debug code
When the device dies the driver could extract cpu registers on
the device to analyze the trap handling on the dongle. As the
firmware with this driver is stable this code does not belong
in the brcmfmac driver.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:22 +0000 (15:34 -0700)]
staging: brcm80211: make device initializer table for wme constant
For chip initialisation of the wme parameters a table is used, but
it was not marked as constant.
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:21 +0000 (15:34 -0700)]
staging: brcm80211: remove unused function si_pmu_ilp_clock()
The function is not used in the driver and has been removed.
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:20 +0000 (15:34 -0700)]
staging: brcm80211: use fragment number provided in transmit frame
In the transmit path the field seq_ctrl is filled in, but the fragment
number was not properly determined.
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:19 +0000 (15:34 -0700)]
staging: brcm80211: remove ht_cap field from brcms_c_info structure
The field ht_cap was typed ieee80211_ht_cap from ieee80211.h. This
contained little endian annotated field cap_info resulting in sparse
endian warnings. It turned out the driver was setting the field, but
it was actually never used. Therefore it has been removed.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:18 +0000 (15:34 -0700)]
staging: brcm80211: removed unused softmac workaround
WAR16165 is only used on older PCI chips, the driver does not support
these chips.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:17 +0000 (15:34 -0700)]
staging: brcm80211: removed global vars in softmac ucode handling
Moved global vars into a per-device structure.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:16 +0000 (15:34 -0700)]
staging: brcm80211: removed global var from aiutils.c
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:15 +0000 (15:34 -0700)]
staging: brcm80211: removed redundant wlc->cfg struct member
After initialization ('attach'), this struct member always pointed at
the same memory as wlc->bsscfg.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:14 +0000 (15:34 -0700)]
staging: brcm80211: deleted unused array of bss configurations in softmac
List always had one element. Converted the array to a scalar.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 29 Sep 2011 22:34:13 +0000 (15:34 -0700)]
staging: brcm80211: removed unused argument from softmac functions
Parameter 's2' was unused. Affected function was only used internally
to main.c and has been made static and moved above its callers.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Thu, 29 Sep 2011 22:34:12 +0000 (15:34 -0700)]
staging: brcm80211: remove uncoditional code blocks from brcmsmac
Using a block statement to scope function variables is not
common in linux kernel development. Browsed through the brcmsmac
to remove those.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Paul Gortmaker [Fri, 30 Sep 2011 22:06:58 +0000 (18:06 -0400)]
staging: add module.h to various iio drivers
Since they are assuming it is there implicitly and will fail otherwise
with things like:
drivers/staging/iio/impedance-analyzer/ad5933.c:816: warning: type
defaults to ‘int’ in declaration of ‘MODULE_AUTHOR’
drivers/staging/iio/adc/ad7280a.c:990: warning: type defaults to ‘int’
in declaration of ‘MODULE_AUTHOR’
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lu Guanqun [Fri, 30 Sep 2011 02:35:35 +0000 (10:35 +0800)]
staging: intel_sst: fix compile error
include module.h to fix the following compile errors:
drivers/staging/intel_sst/intelmid.c:52: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:52: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:52: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:52: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:53: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:53: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:53: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:53: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:54: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:54: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:54: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:54: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:55: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:55: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:55: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:55: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:56: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:56: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:56: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/staging/intel_sst/intelmid.c:56: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:57: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:57: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:57: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/staging/intel_sst/intelmid.c:57: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:58: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:58: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:58: warning: type defaults to 'int' in declaration of 'MODULE_SUPPORTED_DEVICE'
drivers/staging/intel_sst/intelmid.c:58: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:64: error: expected ')' before 'int'
drivers/staging/intel_sst/intelmid.c:65: error: expected ')' before string constant
drivers/staging/intel_sst/intelmid.c:66: error: expected ')' before numeric constant
drivers/staging/intel_sst/intelmid.c:67: error: expected ')' before string constant
drivers/staging/intel_sst/intelmid.c:461: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:461: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/staging/intel_sst/intelmid.c:461: warning: parameter names (without types) in function declaration
drivers/staging/intel_sst/intelmid.c:475: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:475: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/staging/intel_sst/intelmid.c:475: warning: parameter names (without types) in function declaration
drivers/staging/intel_sst/intelmid.c: In function 'snd_intelmad_probe':
drivers/staging/intel_sst/intelmid.c:859: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/staging/intel_sst/intelmid.c:859: error: (Each undeclared identifier is reported only once
drivers/staging/intel_sst/intelmid.c:859: error: for each function it appears in.)
drivers/staging/intel_sst/intelmid.c: At top level:
drivers/staging/intel_sst/intelmid.c:989: error: 'THIS_MODULE' undeclared here (not in a function)
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:45 +0000 (10:05 +0100)]
staging:iio:imu:adis16400 rename adis16344 -> adis16334.
Part never existed under that name. Ooops
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:44 +0000 (10:05 +0100)]
staging:iio:adc:ad7887 stop using IIO_CHAN macro.
It's going away.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:43 +0000 (10:05 +0100)]
staging:iio:adc:ad7606 remove unused chip info elements.
These are now handled through the chan_spec arrays and no one
is using them anymore.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:42 +0000 (10:05 +0100)]
staging:iio:adc:ad7606 refactor to remove st->irq and st->id.
id wasn't used anywhere and st->irq can be removed by simply
passing it into the core remove function (trivially available in
the two bus implementations).
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:41 +0000 (10:05 +0100)]
staging;iio:adc:ad7606 use iio_sw_buffer_preenable rather than local equiv
Other than a few slight refactorings the local version was pretty standard
so replace it and rework to get rid of st->d_size which it setup.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:40 +0000 (10:05 +0100)]
staging:iio:adc:ad7606 make gpio request failures more consistent
To my mind, if a gpio is specified in the board file, yet fails
to be successfully requested, that is an error condidtion and
the driver should not muddle on regardless.
This does mean unwinding the gpios on error. Also the free_gpios
function is reordered so that it is consistent with the request one
(reverse order obviously).
This patch is the category of not technically fixing anything, just
making the driver be more in line with what a reviewer will expect.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:39 +0000 (10:05 +0100)]
staging:iio:adc:ad7606 trivial code style fix.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:38 +0000 (10:05 +0100)]
staging:iio:adc:ad7606 add local define for chan_spec structures.
IIO_CHAN is being phased out and in this case things are so
simple it makes sense to have a local one parameter equivalent.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:37 +0000 (10:05 +0100)]
staging:iio:adc:ad799x address and scan_index always match so stop using address
Saves on setting the value of address for the simple situation seen in this
device. They are already used interchangably to get data from the buffer.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:36 +0000 (10:05 +0100)]
staging:iio:adc:ad799x set the device name only once.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:35 +0000 (10:05 +0100)]
staging:iio:adc:ad799x use the core handling for as much of the events as possible.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:34 +0000 (10:05 +0100)]
staging:iio:adc:ad799x avoid bouncing back and forth from iio_priv space.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:33 +0000 (10:05 +0100)]
staging:iio:adc:ad799x use a table for frequency values rather than big switch.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:32 +0000 (10:05 +0100)]
staging:iio:adc:ad799x trivial: use the convenient chan struct.
This is much cleaner than bouncing through the various structures
to get to the same thing.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:31 +0000 (10:05 +0100)]
staging:iio:adc:ad799x stop using IIO_CHAN macro.
Preparation for moving driver out of staging.
That macro is a nightmare to maintain so it is going away.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 30 Sep 2011 09:05:30 +0000 (10:05 +0100)]
staging:iio:adc:ad799x fix incorrect scan_type descriptions.
A few of these had the wrong shifts, which would lead to
userspace hacking off the top couple of bits. Also, one
part had the wrong accuracy.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Mon, 3 Oct 2011 23:02:41 +0000 (16:02 -0700)]
MAINTAINERS: the staging tree dropped the "-2.6" suffix
Now that we are in the 3.x days, "2.6" doesn't make sense.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 27 Sep 2011 17:01:08 +0000 (19:01 +0200)]
staging: nvec: send suspend messages synchronously
The suspend commands need to be sent using the
synchronous method, otherwise the power gets
disabled before the messages are transferred.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Rewrote commit message]
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:01:07 +0000 (19:01 +0200)]
staging: nvec: Add a udelay(100) to nvec_interrupt
As the comment indicates, adding that udelay seems to
improve the stability of the communication, although
it is not known why this is the case.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:01:06 +0000 (19:01 +0200)]
staging: nvec: Add missing includes and reorder them
Add the includes that are currently missing in nvec.h
and nvec.c and reorder them alphabetically.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:01:05 +0000 (19:01 +0200)]
staging: nvec: Add myself to MAINTAINERS
I intent to support this code, especially the parts
I wrote; and will thus enter as co-maintainer.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:01:04 +0000 (19:01 +0200)]
staging: nvec: Add battery quirk to ignore incomplete responses
The nvec_power system polls nvec for battery information. In some
cases, that part seems to be overloaded and unable to respond
fast in which case it sends an incomplete response. We need to
mark the transfer as completed, though, in order to prevent
endless retries which can kill nvec.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:01:03 +0000 (19:01 +0200)]
staging: nvec: ps2: Always sample 4 bytes instead of just 1
Get 4 bytes of data from nvec at once instead of just a single
byte. This makes the driver more similar to nvidias and might
improve reliability.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:01:02 +0000 (19:01 +0200)]
staging: nvec: Return error in PS2 driver if write fails
Return the return value of nvec_write_async() in the methods
returning an int.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:01:01 +0000 (19:01 +0200)]
staging: nvec: Reject incomplete messages
Reject incomplete messages, causing the request to be
transmitted again. This should fix various problems
out there.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:01:00 +0000 (19:01 +0200)]
staging: nvec: Handle filled up RX buffers
If no RX buffer is available in state 1, jump to state
0 again. This will produce an incredible amount of
warnings, but it is not supposed to happen anyway.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:59 +0000 (19:00 +0200)]
staging: nvec: Allow TX buffers only in the upper 75% of the pool
Allow TX buffers to be allocated only in the upper 75% of the pool
to avoid a completely filled buffer preventing the driver from
processing responses. This also improves performance, as RX
allocations do not require checking buffers allocated for TX
unless there are more than 16 incoming messages -- which is
highly unlikely.
An earlier version used the lower 75% for TX messages, but
that was considered to be not that effective due to the
overlaps of RX and TX buffers mentioned above.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:58 +0000 (19:00 +0200)]
staging: nvec: Export nvec_msg_free() to clients
Client code wishing to make use of nvec_write_sync() must
have a way to free the returned pointer, otherwise we run
out of poool memory fairly soon.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:57 +0000 (19:00 +0200)]
staging: nvec: Move implementation-only macros out of the header
Those macros are needed only for implementation purposes and
do not have any use for other code wishing to use nvec.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:56 +0000 (19:00 +0200)]
staging: nvec: Document public and private API
Add kernel-doc comments describing the functions
and structs we currently have.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:55 +0000 (19:00 +0200)]
staging: nvec: Have nvec_write_async() return -ENOMEM on OOM
Change nvec_write_async() to return an integer, 0 by default,
a negative error on failure. Change nvec_write_sync() to
check the return value and abort if it is negative.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:54 +0000 (19:00 +0200)]
staging: nvec: Enable the capslock LED in the keyboard driver
When the caps lock key is pressed, toggle the associated
LED. According to Nvidia code, we should send 0x01 where
we sent 0x07, but this does not appear to work correctly
on the AC100.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:53 +0000 (19:00 +0200)]
staging: nvec: Add myself to copyright and authors list
Forgotten in the last commit(s) which contained the copyrightable
material, so let's add it now. I believe that only my nvec.c
contributions are copyrightable, nvec.h is just interface naming,
so does not deserve that yet.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:52 +0000 (19:00 +0200)]
staging: nvec: Do not print free message for tx_scratch
The scratch area is not part of the pool and thus gets
no allocation message. Printing a free message would
be confusing, and the pointer subtraction would be
undefined behavior.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:51 +0000 (19:00 +0200)]
staging: nvec: Rewrite the interrupt handler
Rewrite the interrupt handler to use a state machine similar to
that found in the various kernels for the Advent Vega. This also
changes the code to use the new functions introduced in the
previous commits.
This also merges the rewrite sent in August 2011 by Marc
Dietrich, and thus also includes code by him. His original
patch can be found on the mailing list.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:50 +0000 (19:00 +0200)]
staging: nvec: Add is_event() and size() functions for nvec_msg
Add functions nvec_msg_is_event() and nvec_msg_size() which
do just what the say: tell whether the message is an event,
and getting the size of the message.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:49 +0000 (19:00 +0200)]
staging: nvec: Introduce nvec_gpio_set_value()
Introduce nvec_gpio_set_value(), which works like
gpio_set_value(), but also creates a debugging
message, if that's enabled.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:48 +0000 (19:00 +0200)]
staging: nvec: Introduce new internal API for msg alloc/free
Introduce two new functions nvec_msg_alloc() and nvec_msg_free()
that allocate and free message buffers from the internal pool
of messages.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 27 Sep 2011 17:00:47 +0000 (19:00 +0200)]
staging: nvec: fix Kconfig dependencies
This patch adds config dependencies for the NVEC keyboard, mouse,
and power drivers.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 27 Sep 2011 17:00:46 +0000 (19:00 +0200)]
staging: nvec: add MAINTAINERS info
This adds the relevant info to the MAINTAINERS file so people can
find the right person to blame.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 27 Sep 2011 17:00:45 +0000 (19:00 +0200)]
staging: nvec: update ToDo list
Mostly small stuff only. Hopefully completed during the next
release cycle.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Removed some items no longer valid]
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ilya Petrov [Tue, 27 Sep 2011 17:00:44 +0000 (19:00 +0200)]
staging: nvec: add LED support
This patch adds support for LEDs connect to a nvec. A single brightness
property is exported to sysfs. LEDs are selected via bitfields in the
brightness value. Also the blinking behavior is selected through this
method. Vendors may use different values for different HW designs.
Signed-off-by: Ilya Petrov <ilya.muromec@gmail.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Fixed checkpatch warnings]
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 27 Sep 2011 17:00:43 +0000 (19:00 +0200)]
staging: nvec: fix unmute of speakers
The ec command used was for muting, not unmuting.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 27 Sep 2011 17:00:42 +0000 (19:00 +0200)]
staging: nvec: rework the nvec slave init
Rework the tegra slave controller init to look more like in
tegra-i2c.c. This makes the nvec init reliable. Also add de-init of
the slave to be used during suspend.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 27 Sep 2011 17:00:41 +0000 (19:00 +0200)]
staging: nvec: Use print_hex_dump() where appropriate
Split of the previous patch and the next by Marc, as that
patch is not strictly a coding style fix only.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 27 Sep 2011 17:00:40 +0000 (19:00 +0200)]
staging: nvec: coding style fixes / add copyright notice
This patch fixes coding style and adds copyright notices.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Merge later cleanup into that patch]
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julian Andres Klode [Tue, 27 Sep 2011 17:00:39 +0000 (19:00 +0200)]
staging: nvec: Include missing headers
Those headers were apparently included by other headers
previously, but are not anymore.
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Wed, 28 Sep 2011 01:28:11 +0000 (21:28 -0400)]
Staging: bcm: Alter LOC for readability/understandability purposes
This patch alters a line of code to make it more readable
and easier to understand. The purpose of the original line
of code was to compute the amount of memory to request from
kmalloc. This mulit-step algorithm was being done in one
line of code, thus making it more difficult to understand.
Therefore, I split this algorithm into three logical steps.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Tue, 27 Sep 2011 02:03:59 +0000 (22:03 -0400)]
Staging: bcm: Add min/max restrictions for IOCTL_BCM_REGISTER_READ_PRIVATE
This patch fixes two issues within bcm/Bcmchar.c. The
first condition in the or statement checks if variable
IoBuffer.OutputLength, defined from user space, is
greater than the maximum value allowed for an
unsigned short. IoBuffer.OutputLength is then used
in a kmalloc call to return a pointer to memory. If
this size is greater than an unsigned short, it
becomes useless. The second condition in the or statement
checks if the same variable, IoBuffer.OutputLength is
equal to zero before invoking the kmalloc call. In
this case, if a zero size is sent to kmalloc, a valid
pointer to memory is returned instead of the expected NULL.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Wed, 28 Sep 2011 20:24:15 +0000 (13:24 -0700)]
staging: hv: remove the carrier status check from netvsc_open()
Checking carrier status in netvsc_open() is not necessary.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Thu, 29 Sep 2011 06:13:18 +0000 (09:13 +0300)]
Staging: vt6656: potential memory corruption
param->u.wpa_key.key_len comes from the user. If it's too large we
would write past the end of the array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Tue, 27 Sep 2011 08:56:41 +0000 (09:56 +0100)]
staging:iio: unwind the IIO_IN -> IIO_VOLTAGE define
This was originally there to avoid churn during a complex change.
Now everything is stable lets get rid of this as it is missleading
and confusing.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Thu, 22 Sep 2011 19:40:50 +0000 (12:40 -0700)]
Staging: hv: Update the TODO file
Now that all vmbus audit related comments have been addressed,
update the TODO file to reflect this.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Kilroy [Sun, 25 Sep 2011 07:30:21 +0000 (08:30 +0100)]
staging: wlags49_h2: Use IW_HANDLER macro
to declare wireless handlers.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Kilroy [Sun, 25 Sep 2011 07:30:19 +0000 (08:30 +0100)]
staging: wlags49_h2: Stop playing with length in GIWESSID handler
WE21 clarified that ESSID should not be NULL terminated.
The existing code didn't NULL terminate, but did play with length
and then reset it again. Just stop it.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Kilroy [Sun, 25 Sep 2011 07:30:20 +0000 (08:30 +0100)]
staging: wlags49_h2: Declare support for WEXT 21
WEXT changes between versions 15 and 21 have been taken care of,
so update the declared support.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Kilroy [Sun, 25 Sep 2011 07:30:18 +0000 (08:30 +0100)]
staging: wlags49_h2: Fixup WEXT capabilities
Add recently added events to the capabilities reported in iw_range.
Use capability macros instead of assuming the array offsets.
Explicitly list scan capabilities.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Christopher Rice [Fri, 23 Sep 2011 23:53:09 +0000 (16:53 -0700)]
drivers:staging:comedi:drivers:cb_das_cs.c codeing style issue
drivers: staging: comedi: cb_das16_cs.c
fixed over 80 line issue, and removed a space before tab issue.
Signed-off-by: Christopher Rice <rice.christopher.a@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Johannes Thumshirn [Sun, 25 Sep 2011 04:49:12 +0000 (06:49 +0200)]
staging: comedi: Added log subjects to printk()s in pcmmio
Added log subject to printk()s in drivers/staging/comedi/drivers/pcmmio.c.
Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Fri, 23 Sep 2011 06:23:22 +0000 (09:23 +0300)]
Staging: vt6655-6: potential info leak in private_ioctl()
Smatch has a new check for Rosenberg type information leaks where
structs are copied to the user with uninitialized stack data in them.
In this path, the .uLinkRate member doesn't get initialized so I've
set it to zero.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marcos Paulo de Souza [Fri, 23 Sep 2011 03:20:09 +0000 (00:20 -0300)]
drivers/staging/bcm/InterfaceDld.c: Fix checkpatch warnings
In the source file there are a lot of warnings. I will send it in parts to be more easy to
review. All the changes in this file its just alignment, and things like that.
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Sun, 25 Sep 2011 18:17:57 +0000 (19:17 +0100)]
staging: et131x: Bugfix - driver doesn't autoreneg after cable unplug/plug events
This driver has a long standing bug where removing and inserting the ethernet cable results in no packets being
trnasmitted / received and hence no autonegotiation occurring.
Fixed by resetting the rx/tx engines and queue on detecting a cable being removed.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Sun, 25 Sep 2011 18:17:56 +0000 (19:17 +0100)]
staging: et131x: Remove header declaration of et131x_check_mii()
et131x_check_mii no longer exists, remove its declaration from the header file
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Sun, 25 Sep 2011 18:17:55 +0000 (19:17 +0100)]
staging: et131x: Create et131x_[dis|en]able_txrx() calls
In et131x_netdev.c, a series of calls to enable and diasble the rx/tx engine and queue are being used in several different places.
Create two functions to encapsulate these calls, and replace many calls with just the one.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>