K. Y. Srinivasan [Mon, 16 May 2011 13:44:36 +0000 (06:44 -0700)]
Staging: hv: Re-implement the synchronization for util channels
The util module expects that the util channels are fully initialized
when the module loads. To deal with the race condition which can result
in a NULL pointer dereferencing if the util module were to load before
all the util channels are fully initialized, in commit:
code was introduced in the vmbus driver to ensure that all the
util channels were fully initialized before returning from the load
of the vmbus driver. This solution has several problems: if for whatever
reason, any util channel were to fail to initialize, vmbus driver would
wait indefinitely. We deal with this synchronization issue very differently
in this patch.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Mon, 16 May 2011 13:44:35 +0000 (06:44 -0700)]
Staging: hv: vmbus_drv: Introduce state in struct vmbus_channel to track util services
In preparation for getting rid of util channel synchronization based on
counting util channels, introduce state in struct vmbus_channel to
track util services.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ian Abbott [Mon, 16 May 2011 14:28:16 +0000 (15:28 +0100)]
staging: comedi: addi-data: Get rid of redundant ps_BoardInfo
The ps_BoardInfo pointer in the device private data is redundant as we
can just use the this_board macro to access the same data, as is done
elsewhere in the code. Get rid of the pointer and change the code to
use the this_board macro instead.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ian Abbott [Mon, 16 May 2011 14:28:15 +0000 (15:28 +0100)]
staging: comedi: addi-data: Don't overwrite read-only data
The drivers for ADDI-DATA cards can override some static parameters for
the board type using information read from EEPROM. Unfortunately, they
currently write the parameters from the EEPROM back to the shared,
read-only board data! The problem has been masked during compilation by
type-casting away the const-ness of the data.
This patch changes the code to use an area in the private data for the
board instance to hold the parameters read from EEPROM (after
initializing the parameters from the static board data). It also
changes the type-casts to the read-only data to preserve the const
qualifier.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ian Abbott [Mon, 16 May 2011 11:05:54 +0000 (12:05 +0100)]
staging: comedi: adv_pci_dio: Add a counter subdevice to PCI-1751
The Advantech PCI-1751 has a 8254 counter chip on board. Add it to the
device as a counter subdevice. Apparently the counter can generate
interrupts although the driver does not currently use this capability.
Original patch by Ivan Russkih (Иван Русских) <vanekrus at gmail dot
com>.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Mon, 16 May 2011 12:24:57 +0000 (14:24 +0200)]
drivers/staging/line6/driver.c: Drop unneeded put functions.
This seems to be the result of patches ab366c1a and 1027f476 crossing each
other. Patch ab366c1a adds calls to usb_put_intf and usb_put_dev at the
end of the function line6_probe, in the error handling code, while patch 1027f476 moves the calls to the corresponding get function from the
beginning to the end of line6_probe, making the calls to put in the error
handling code unnecessary.
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Mon, 16 May 2011 09:20:29 +0000 (11:20 +0200)]
drivers/staging/ath6kl/os/linux/cfg80211.c: Add missing call to cfg80211_put_bss
A call to cfg80211_get_bss hould be accompanied by a call to
cfg80211_put_bss in error-handling code.
A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
local idexpression struct cfg80211_bss * x;
expression ra,rr;
position p1,p2;
@@
x = cfg80211_get_bss@p1(...)
... when != x = rr
when != cfg80211_put_bss(x,...)
when != if (...) { ... cfg80211_put_bss(x,...) ...}
if(...) { ... when != x = ra
when forall
when != cfg80211_put_bss(x,...)
\(return <+...x...+>; \| return@p2...; \) }
Clemens Noss [Sun, 15 May 2011 20:50:46 +0000 (22:50 +0200)]
staging: brcm80211: use correct pointer types in bcm_pktq_flush
to clarify the intention:
On Sun, May 15, 2011 at 09:54:26PM +0200, Arend van Spriel wrote:
> On 05/15/2011 08:10 PM, Hauke Mehrtens wrote:
[...]
>> Why don't you use the correct pointer type here instead of casting then
>> around and the parameter names are meaningless too.
>>
>> static bool cb_del_ampdu_pkt(struct sk_buff *mpdu, struct
>> cb_del_ampdu_pars *ampdu_pars)
[...]
> Actually this is a generic callback mechanism in which an additional
> parameter can be passed, which can be of *any* type hence a void pointer
> seems justified here and a meaningless name is used. I do agree that the
> txi parameter will always be a struct sk_buff and should be indicated as
> such.
Reported-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Clemens Noss <cnoss@gmx.de> Acked-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
matt mooney [Sat, 14 May 2011 10:55:14 +0000 (03:55 -0700)]
staging: usbip: userspace: cleanup makefiles
Remove unneeded comments; change deprecated flag INCLUDE to
AM_CPPFLAGS and put -D option in *_CPPFLAGS; and use "simply
expanded variables" in assignments.
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
matt mooney [Sat, 14 May 2011 10:55:13 +0000 (03:55 -0700)]
staging: usbip: userspace: configure.ac: major overhaul
All parameters have been quoted; and autoscan was rerun so new
headers, types, and functions were added. The deprecated macros
AM_CONFIG_HEADER and AM_PROG_LIBTOOL were changed to
AC_CONFIG_HEADERS and LT_INIT, respectively. The AS_HELP_STRING
macro is used to avoid arbitrary spacing for proper help menu
alignment, and AS_CASE to avoid quoting issues. And finally, the
macros were realigned to allow mere mortals the ability to read them.
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 13 May 2011 02:34:47 +0000 (19:34 -0700)]
Staging: hv: netvsc_drv: Clean up the netvsc_drv_exit() function
To conform to the Linux device model, the device should persist even
when there is no driver bound to it. Cleanup the netvsc_drv_exit() routine
keeping this in mind.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 13 May 2011 02:34:46 +0000 (19:34 -0700)]
Staging: hv: mousevsc_drv: Cleanup mousevsc_drv_exit() function
To conform to the Linux device model, the device should persist even
when there is no driver bound to it. Cleanup the mousevsc_drv_exit() routine
keeping this in mind.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 13 May 2011 02:34:45 +0000 (19:34 -0700)]
Staging: hv: storvsc_drv: Cleanup storvsc_drv_exit() function
To conform to the Linux device model, the device should persist even
when there is no driver bound to it. Cleanup the storvsc_drv_exit() routine
keeping this in mind.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 13 May 2011 02:34:44 +0000 (19:34 -0700)]
Staging: hv: blkvsc_drv: Cleanup the blkvsc_drv_exit() function
To conform to the Linux device model, the device should persist even
when there is no driver bound to it. Cleanup the blkvsc_drv_exit() routine
keeping this in mind.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sukesh Srikakula [Fri, 13 May 2011 09:59:50 +0000 (11:59 +0200)]
staging: brcm80211: Better debug support added to brcmfmac driver
With the current implementation there is no way to selectively enable
required debug messages, as all the messages are currently under WL_DBG.
With this fix, we are introducing several log levels which will enable
us to print only the required debug messages.
WL_ERR --> Prints error messages
WL_CONN --> Prints all debug messages pertaining to connection
management
WL_SCAN --> Prints all debug messages pertaining to scanning
WL_TRACE --> Prints all trace(Enter/Exit) sequence of cfg80211 calls
WL_INFO --> Prints all informational messages.
By default, only WL_ERR messages are enabled.
Sukesh Srikakula [Fri, 13 May 2011 09:59:42 +0000 (11:59 +0200)]
staging: brcm80211: Optimized wl_inform_single_bss function in brcmfmac driver
Earlier verion of wl_inform_single_bss function is using
'cfg80211_inform_bss_frame' API for sending bss info to cfg80211.
With this patch same will be done through a more optimal
'cfg80211_inform_bss' API.
Sukesh Srikakula [Fri, 13 May 2011 09:59:39 +0000 (11:59 +0200)]
staging: brcm80211: Fix for suspend issue in brcmfmac driver
Currently, there are 2 callbacks registered with OS for getting
notifications when system goes to suspend/resume. Racing between
these 2 callbacks results in random suspend failures. With this fix,
we avoid registering dhd callback for suspend/resume notification
when cfg80211 is used. Relevent functionality in dhd suspend/resume
callback function is moved to cfg80211 suspend/resume functions.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Grant Grundler <grundler@chromium.org> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sukesh Srikakula [Fri, 13 May 2011 09:59:38 +0000 (11:59 +0200)]
staging: brcm80211: Fix for WPA GTK install issue in brcmfmac driver
Last 16 bytes of the key sent by cfg80211 needs to be swapped before
installing it to FW for TKIP encryption. This is not done for group
key in current code, which is corrected with this fix.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Tested-by: Grant Grundler <grundler@chromium.org> Tested-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Fri, 13 May 2011 09:59:36 +0000 (11:59 +0200)]
staging: brcm80211: removed counter related struct wl_cnt
Code cleanup. Struct wl_cnt contains all sorts of counters, but either these
were written and never read, or set to zero at initialization but never
updated. Therefore the struct and any code accessing the struct has been
removed.
Arend van Spriel [Fri, 13 May 2011 09:59:29 +0000 (11:59 +0200)]
staging: brcm80211: cleanup functions in nvram.c
Several function in nvram.c take a pointer value which is not
actually used. These are removed and the header file contained
some other prototypes that were not implemented. As this source
file was the only one using the header file siutils.h it has been
removed.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Fri, 13 May 2011 09:59:28 +0000 (11:59 +0200)]
staging: brcm80211: make function definitions and prototype consistent
Couple of functions that are only used within wlc_channel.c have been
prototyped with static keyword. For the function definition itself this
has been added when missing.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>