It's only ever set to one function, so just call that function instead.
Actually, that wrapper function only ever called vmbus_request_offers()
so just call that function instead, no need for a do-nothing
intermediate step here.
Roland Vossen [Wed, 1 Dec 2010 20:37:34 +0000 (21:37 +0100)]
staging: brcm80211: replaced typedef struct wl_info_t by struct wl_info.
Part of the code cleanup effort. CodingStyle doc advises to restrict the usage
of typedefs. Also moved several function declarations from .c to .h file
because this typedef replace operation induced checkpatch.pl warnings.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Wed, 1 Dec 2010 19:16:35 +0000 (11:16 -0800)]
staging: brcm80211 needs lots of delay.h
Fix lots of errors like:
drivers/staging/brcm80211/phy/wlc_phy_n.c:17613: error: implicit declaration of function 'mdelay'
drivers/staging/brcm80211/util/nicpci.c:246: error: implicit declaration of function 'udelay'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Dowan Kim <dowan@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Cc: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Chosrova [Wed, 1 Dec 2010 12:42:16 +0000 (13:42 +0100)]
Staging: rtl8192u: check return code kmalloc.
This patch checks the return code of kmalloc when trying to allocate
memory for priv->rx_urb in rtl8192_usb_initendpoints(), return -ENOMEM
when failed.
Signed-off-by: David Chosrova <david.chosrova@libertysurf.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Chosrova [Mon, 29 Nov 2010 20:50:48 +0000 (21:50 +0100)]
Staging: rtl8192u: remove dead code to disable dot11d
This patch removes all the ENABLE_DOT11D ifdefs.
It is always defined for driver. DOT11D has to do with regulatory domains.
What prompted this patch was a warning message in Sparse.
drivers/staging/rtl8192u/r8192U_core.c:247:1: warning: "eqMacAddr"
redefined in file included from drivers/staging/rtl8192u/:81:81:
drivers/staging/rtl8192u/dot11d.h:35:1: warning: this is the location
of the previous definition
Now there are no ifdefs around dot11d.h it made no sense to have this
second definition, so I removed that macro as well. ( Thanks Dan ;-) ).
Acked-by. Dan Carpenter <error27@gmail.com> Signed-off-by: David Chosrova <dada2372@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pekka Enberg [Sun, 28 Nov 2010 21:00:00 +0000 (23:00 +0200)]
Staging: w35und: Use pr_debug() for debugging
Use pr_debug() for debugging printk's and kill the FULL_DEBUG macro. It would
be even better to use dev_dbg() but unfortunately looking up struct device in
the current code structure makes things very ugly.
Please note that I dropped the DataDmp() calls from
RFSynthesizer_SwitchingChannel() because that function doesn't exist.
Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pekka Enberg [Sun, 28 Nov 2010 20:59:57 +0000 (22:59 +0200)]
Staging: w35und: Kill _USE_FALLBACK_RATE_ macro
The _USE_FALLBACK_RATE_ macro parametrizes DEFAULT_RATE_RETRY_LIMIT. It's only
used in Mxx_initial() in reg.c where _USE_FALLBACK_RATE_ is always defined
because the reg.c file includes sysdef.h at the top. It's therefore safe to
remove the _USE_FALLBACK_RATE_ macro.
Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Belisko [Wed, 24 Nov 2010 09:42:39 +0000 (10:42 +0100)]
staging: ft1000: Fix goto error logic.
Fix goto error logic which could lead to kernel panics
because kthread_stop() is called in not correct error
conditions. Seen it sometimes when dsp_reload() fails
then I got kernel panic.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Wed, 24 Nov 2010 19:46:09 +0000 (11:46 -0800)]
staging: fix intel_sst/intelmid sound build
SND_INTELMID selects 3 SND_* kconfig symbols, but that is useless
if the SOUND & SND symbols in their hierarchy are not enabled,
so make this symbol depend on SOUND & SND.
Arend van Spriel [Tue, 23 Nov 2010 13:06:24 +0000 (14:06 +0100)]
staging: brcm80211: removed packet macros for accessing sk_buff fields
With the packet storage type changed from void pointer to struct sk_buff
pointer there is no need for macros for accessing these fields through
casting. These can now be accessed directly.
Arend van Spriel [Tue, 23 Nov 2010 13:06:23 +0000 (14:06 +0100)]
staging: brcm80211: change packet buffer type to native struct sk_buff
The packet queues now store struct sk_buff pointer and subsequently
all driver code handling packets now use struct sk_buff as package
storage type. Next step will be getting rid of packet macros.
Alan Cox [Wed, 24 Nov 2010 19:39:20 +0000 (19:39 +0000)]
Staging: sep: Fix crash if a device is not found
The existing code works mostly by luck. The PCI probe is done by the
register and completes before the register returns thus allowing the other
init code to run in time. Without a SEP or if unlucky this doesn't occur
and you get an OOPS which for some reason causes grumpiness.
As the season of good b^Hcheer is supposed to be approaching we should
probably fix it.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Wed, 24 Nov 2010 19:38:02 +0000 (19:38 +0000)]
Staging: sep: clean up some of the obvious sillies
Various assignments are done but not used
dev_dbg formatting is a bit weird and wraps when not needed
Take out some of the blank lines and reformat a bit to reduce view size
Remove some comments that are obvious
Fix else formatting
Remove some user triggerable dev_warns
Fix copy_from_user error return cases (-EFAULT not bytes copied)
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Vinod Koul [Mon, 22 Nov 2010 10:33:51 +0000 (10:33 +0000)]
Staging: sst: add ioctls for post processing algorithm interface
This patch adds two new ioctls to intel_sst_ctrl device.
This i/f can be used by application to send algorithm parameters
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
[This will need further discussion in the context of the final ALSA interface
but is fine for staging, ie anyone who relies on it should expect changes
Also fixed a missing kmalloc fail check] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Vinod Koul [Mon, 22 Nov 2010 10:33:40 +0000 (10:33 +0000)]
Staging: sst: Construct fw string name runtime
The firmware name for each platform is appended by PCI id of device.
This patch makes use of pci id to construct the string rather than
hardcode the string.
Sven Eckelmann [Sun, 21 Nov 2010 23:56:07 +0000 (00:56 +0100)]
Staging: batman-adv: Use kernel functions to identify broadcasts
linux/etherdevice.h already provides functions to classify different
ethernet addresses. These inlineable functions should be used instead of
custom functions.
The check for multicast together with multicast can also be replaced
with a single test for multicast because for every ethernet address x
following is always true:
Marek Lindner [Sun, 21 Nov 2010 23:56:05 +0000 (00:56 +0100)]
Staging: batman-adv: add gateway IPv6 support by filtering DHCPv6 messages
Some additional checks will be needed in case of extension headers
like the fragmentation or hop-by-hop (for jumbo frames for example)
headers or ipsec stuff. But this patch should do for most people
for now, the rest can be added with a later one.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Lindner [Sun, 21 Nov 2010 23:56:04 +0000 (00:56 +0100)]
Staging: batman-adv: best gw DHCP filter 802.1Q support
The DHCP filter inspects packets to determine whether or not to send
them via ethernet unicast. This patch adds 802.1Q (vlan) support for
this check.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Lindner [Sun, 21 Nov 2010 23:56:03 +0000 (00:56 +0100)]
Staging: batman-adv: send DHCP requests directly to the chosen gw
If the gateway client mode is active batman-adv will send the
broadcasted DHCP requests via unicast to the currently selected best
gateway. Therefore attached clients can profit from batman's knowledge
about the network topology.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Lindner [Sun, 21 Nov 2010 23:56:02 +0000 (00:56 +0100)]
Staging: batman-adv: adding gateway functionality
Via the /sys filesystem you can change the gateway mode of a node using
gw_mode. Adjustments to it can be done using gw_bandwidth for server
mode and gw_sel_class for client mode.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sun, 21 Nov 2010 23:56:01 +0000 (00:56 +0100)]
Staging: batman-adv: Limit spin_locks to spin_lock_bh
spin_lock_irqsave disables the IRQs and stores them inside the flags
provided by the caller. This is needed to protect a bottom half handler
or a user context critical section from being interrupted by an
interrupt handler which also tries to acquire the spinlock and locks
forever.
The linux device drivers will receive the packets inside an interrupt
handler and the network infrastructure will process them inside bottom
half. Thus batman-adv will only run in user context and bottom half
handlers. We can conclude that batman-adv doesn't share its own
spinlocks with real interrupt handlers.
This makes it possible to exchange the quite complex spin_lock_irqsave
with spin_lock_bh which only stops bottom halves from running on the
current cpu, but allows interrupt handlers to take over to keep the
interrupt latency low.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sun, 21 Nov 2010 23:56:00 +0000 (00:56 +0100)]
Staging: batman-adv: Rewrite hash using hlist_*
The hash implementation is a complete implementation of a hash using
buckets as hash entries and overflow buckets attached to them.
The kernel already provides datastructures hlist_head and hlist_node
which can be used to implement an hash using lists as hash buckets. So
it is better to implement heavily used functionality on top of those
instead of providing a full hash implementation.
The rewrite changes the behavior of some functions slightly:
* hash_add add elements to the front instead of the tail
* hash_iterate doesn't provide pointer to access bucket->data directly,
but it can be accessed using hlist_entry
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sun, 21 Nov 2010 23:55:59 +0000 (00:55 +0100)]
Staging: batman-adv: Make hash_iterate inlineable
hash_iterate is next to the function pointers the most called function
related to hashes which benefits from inlining as it is uses in loops.
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sun, 21 Nov 2010 23:55:58 +0000 (00:55 +0100)]
Staging: batman-adv: Move hash callback related function to header
To enable inlining of the function pointers hashdata_choose_cb,
hashdata_choose_cb and hashdata_free_cb, also the hash functions which
uses them must be inlined by the called function.
This should increase the performance, but also increases the size of the
generated machine code slightly.
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sun, 21 Nov 2010 23:55:57 +0000 (00:55 +0100)]
Staging: batman-adv: Remove hashdata_choose_cb from hash
Function pointers cannot be inlined by a compiler and thus always has
the overhead of an call. hashdata_choose_cb's are one of the most often
called function pointers and its overhead must kept relative low.
As first step, every function which uses this function pointer takes it
as parameter instead of storing it inside the hash abstraction
structure.
This not generate any performance gain right now. The called functions
must also be able to be inlined by the calling functions to enable
inlining of the function pointer.
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sun, 21 Nov 2010 23:55:56 +0000 (00:55 +0100)]
Staging: batman-adv: Remove hashdata_compare_cb from hash
Function pointers cannot be inlined by a compiler and thus always has
the overhead of an call. hashdata_compare_cb's are one of the most often
called function pointers and its overhead must kept relative low.
As first step, every function which uses this function pointer takes it
as parameter instead of storing it inside the hash abstraction
structure.
This not generate any performance gain right now. The called functions
must also be able to be inlined by the calling functions to enable
inlining of the function pointer.
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Lüssing [Sun, 21 Nov 2010 23:55:55 +0000 (00:55 +0100)]
Staging: batman-adv: Make hop_penalty configurable via sysfs
When having a mixed topology of both very mobile and rather static
nodes, you are usually best advised to set the originator interval on
all nodes to a level best suited for the most mobile node.
However, if most of the nodes are rather static, this can create a lot
of undesired overhead as a trade-off then. If setting the interval too
low on the static nodes, a mobile node might be chosen as a router for
too long, not switching away from it fast enough because of its
mobility and the low frequency of ogms of static nodes.
Exposing the hop_penalty is especially useful for the stated scenario: A
static node can keep the default originator interval, a mobile node can
select a quicker one resulting in faster route updates towards this
mobile node. Additionally, such a mobile node could select a higher hop
penalty (or even set it to 255 to disable acting as a router for other
nodes) to make it less desirable, letting other nodes avoid selecting
this mobile node as a router.
Linus Lüssing [Sun, 21 Nov 2010 23:55:54 +0000 (00:55 +0100)]
Staging: batman-adv: Ommit storing struct device in sysfs functions
We actually do not need an extra struct device variable, therefore
replacing them with defines that directly get the bat_priv or
net_device. This further reduces the code size in bat_sysfs.c and
especially shortens some macros.
Linus Lüssing [Sun, 21 Nov 2010 23:55:53 +0000 (00:55 +0100)]
Staging: batman-adv: Wrapper functions for sysfs storing
Sysfs configuration options that just took a boolean value
(enable(d)/disable(d)/0/1) and integer setting basically all had the same
structure.
To avoid even more copy and pasting in the future and to make introducing
new configuration parameters for batman-adv simpler, more generic
wrapper functions are being introduced with this commit. They can deal with
boolean and unsigned integer parameters, storing them in the specified
atomic_t variables.
Linus Lüssing [Sun, 21 Nov 2010 23:55:52 +0000 (00:55 +0100)]
Staging: batman-adv: Unify sysfs file names with their bat_priv atomics
Both sysfs entries and variable names shall be as descriptive as
possible while not exceeding a certain length. This patch renames
bat_priv atomics to be equally descriptive with their according sysfs
entries.
Unifying sysfs and bat_priv atomic names also makes it easier to find
each others pendant.
The reduced ("type"-)information which was previously indicated with a
_enabled for booleans got substituted by a comment in bat_priv.
This patch has also been done in regards for the future BAT_ATTR_*
macros (they only need one name argument instead of a file and variable
name).
Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Lindner [Sun, 21 Nov 2010 23:55:51 +0000 (00:55 +0100)]
Staging: batman-adv: softif bridge loop avoidance
By connecting multiple batman-adv mesh nodes to the same ethernet
segment a loop can be created when the soft-interface is bridged
into that ethernet segment. A simple visualization of the loop
involving the most common case - a LAN as ethernet segment:
Packets from the LAN (e.g. ARP broadcasts) will circle forever from
node1 or node2 over the mesh back into the LAN.
This patch adds the functionality to detect other batman-adv nodes
connected to the LAN and select a 'gateway' to talk to the
non-batman-adv devices on this LAN. All traffic from and to the mesh
will be handled by this gateway to avoid the loop. OGMs received via
the soft-interface are interpreted as 'port announcements' to locate
potential batman-adv nodes. The patch can also deal with vlans on
top of batX and offers a list of LAN neighbors via debugfs.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andreas Langer [Sun, 21 Nov 2010 23:55:45 +0000 (00:55 +0100)]
Staging: batman-adv: restructure fragmentation to handle batman unicast packets
The unicast_frag_send_skb() function expected 'raw' packets (without any
batman-adv header) to fragment them. This needs to be changed, so that
this function is able to fragment packets that already traveled inside
the mesh but need to be fragmented now.
Signed-off-by: Andreas Langer <an.langer@gmx.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sun, 21 Nov 2010 23:55:42 +0000 (00:55 +0100)]
Staging: batman-adv: Don't remove interface with spinlock held
We call a lot of the netdevice code when holding if_list_lock which will
spin the whole time. This is not necessary because we only want to
protect the access to the list to be serialized. An extra queue can be
used which hold all interfaces which should be removed and then use that
queue without any locks for netdevice cleanup.
Marek Lindner [Sun, 21 Nov 2010 23:55:40 +0000 (00:55 +0100)]
Staging: batman-adv: ensure that eth_type_trans gets linear memory
eth_type_trans tries to pull data with the length of the ethernet header
from the skb. We only ensured that enough data for the first ethernet
header and the batman header is available in non-paged memory of the skb
and not for the ethernet after the batman header.
eth_type_trans would fail sometimes with drivers which don't ensure that
all there data is perfectly linearised.
Reported-by: Rafal Lesniak <lesniak@eresi-project.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 22 Nov 2010 23:31:16 +0000 (23:31 +0000)]
staging: iio: documentation rewrite and cleanup of sysfs documetation
Change to capital syntax for documetation e.g. 'inX-inY_raw'
Use multiple 'What:' entries rather than wild cards or options so
as to make the documentation clearer and easier to search.
Some trivial spelling fixes.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 22 Nov 2010 23:09:48 +0000 (23:09 +0000)]
staging: iio: adis16260 add suppport for adis16255 and adis16250.
Unusual element is addition of 'negate' and 'axis' platform data
to ensure we support all the functionality of the adis16255 driver
currently in staging.