safe/jmp/linux-2.6
14 years agotulip/pnic.c: Use dev_<level> and pr_<level>
Joe Perches [Thu, 28 Jan 2010 20:59:24 +0000 (20:59 +0000)]
tulip/pnic.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip/media.c: Use dev_<level> and pr_<level>
Joe Perches [Thu, 28 Jan 2010 20:59:23 +0000 (20:59 +0000)]
tulip/media.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip/interrupt.c: Use dev_<level> and pr_<level>
Joe Perches [Thu, 28 Jan 2010 20:59:22 +0000 (20:59 +0000)]
tulip/interrupt.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip/eeprom.c: Use dev_<level> and pr_<level>
Joe Perches [Thu, 28 Jan 2010 20:59:21 +0000 (20:59 +0000)]
tulip/eeprom.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip/dmfe.c: Use dev_<level> and pr_<level>
Joe Perches [Thu, 28 Jan 2010 20:59:20 +0000 (20:59 +0000)]
tulip/dmfe.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove 'DRV_NAME ": ' from logging messages
Convert commented out printks to pr_debug

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip/de2104x.c: Use dev_<level> and pr_<level>
Joe Perches [Thu, 28 Jan 2010 20:59:19 +0000 (20:59 +0000)]
tulip/de2104x.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip/21142.c: Use dev_<level> and pr_<level>
Joe Perches [Thu, 28 Jan 2010 20:59:18 +0000 (20:59 +0000)]
tulip/21142.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip_core: Use dev_<level> and pr_<level>
Joe Perches [Thu, 28 Jan 2010 20:59:17 +0000 (20:59 +0000)]
tulip_core: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where appropriate
Convert printks to pr_<level>
Change print formats with %d.dx to %0dx
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoBluetooth: Use the control channel for raw HID reports
Bastien Nocera [Wed, 20 Jan 2010 12:00:42 +0000 (12:00 +0000)]
Bluetooth: Use the control channel for raw HID reports

In commit 2da31939a42f7a676a0bc5155d6a0a39ed8451f2, support
for Bluetooth hid_output_raw_report was added, but it pushes
the data to the interrupt channel instead of the contol one.

This patch makes hid_output_raw_report use the control channel
instead. Using the interrupt channel was a mistake.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Add DFU driver for Atheros Bluetooth chipset AR3011
Vikram Kandukuri [Wed, 6 Jan 2010 13:34:15 +0000 (19:04 +0530)]
Bluetooth: Add DFU driver for Atheros Bluetooth chipset AR3011

Signed-off-by: Vikram Kandukuri <vikram.kandukuri@atheros.com>
Signed-off-by: Alicke Xu <sxu@atheros.com>
Reviewed-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Redo checks in IRQ handler for shared IRQ support
Mike Frysinger [Mon, 14 Sep 2009 17:43:49 +0000 (13:43 -0400)]
Bluetooth: Redo checks in IRQ handler for shared IRQ support

Commit ac019360fe3 changed the irq handler logic to BUG_ON rather than
returning IRQ_NONE when the incoming argument is invalid.  While this
works in most cases, it doesn't work when the IRQ is shared with other
devices (or when DEBUG_SHIRQ is enabled).

So revert the previous change and replace the warning message with a
comment explaining that we want this behavior.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix memory leak in L2CAP
Andrei Emeltchenko [Wed, 23 Dec 2009 11:07:14 +0000 (13:07 +0200)]
Bluetooth: Fix memory leak in L2CAP

Move skb_clone after error confition check so it is not going
potentially out of the scope.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Remove double free of SKB pointer in L2CAP
Andrei Emeltchenko [Tue, 22 Dec 2009 13:58:08 +0000 (15:58 +0200)]
Bluetooth: Remove double free of SKB pointer in L2CAP

Trivial fix for double free of SKB pointer with kfree_skb to
make code simplier and cleaner. Remove unused variable err.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoiwlwifi: iwl_power_update_mode always hold mutex
Reinette Chatre [Thu, 21 Jan 2010 19:52:28 +0000 (11:52 -0800)]
iwlwifi: iwl_power_update_mode always hold mutex

iwl_power_update_mode expects to be called with mutex held, for example to
protect priv->vif. Only one caller currently does not do this, fix this.
Also, add a comment to iwl_power_update_mode to indicate this requirement.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: fix typo in IWL_CCK_RATES_MASK
Johannes Berg [Thu, 21 Jan 2010 19:47:59 +0000 (11:47 -0800)]
iwlwifi: fix typo in IWL_CCK_RATES_MASK

Due to a typo, the variable contains OFDM
rates as well. The only user doesn't care,
so this change doesn't really do anything
but fix up my confusion.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoiwlwifi: remove unused work structs
Johannes Berg [Thu, 21 Jan 2010 14:08:19 +0000 (06:08 -0800)]
iwlwifi: remove unused work structs

auth_work, calibrated_work, update_link_led
and report_work are never used, so remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove bg_up work
Johannes Berg [Thu, 21 Jan 2010 14:07:17 +0000 (06:07 -0800)]
iwlwifi: remove bg_up work

There's no need to queue a work struct from
within a work struct, just move the code to
execute directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlagn: simplify ucode loading
Johannes Berg [Thu, 21 Jan 2010 13:28:40 +0000 (05:28 -0800)]
iwlagn: simplify ucode loading

Move the waiting into iwl5000_load_section instead
of duplicating it in the caller.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: no need to test iw_mode in power saving
Johannes Berg [Thu, 21 Jan 2010 13:24:04 +0000 (05:24 -0800)]
iwlwifi: no need to test iw_mode in power saving

mac80211 will only enable powersaving for station mode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: update sensitivity calibration data for 1000 series
Wey-Yi Guy [Wed, 20 Jan 2010 20:22:54 +0000 (12:22 -0800)]
iwlwifi: update sensitivity calibration data for 1000 series

Update sensitivity range values for 1000 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: update sensitivity calibration data for 5x00 series
Wey-Yi Guy [Wed, 20 Jan 2010 20:22:53 +0000 (12:22 -0800)]
iwlwifi: update sensitivity calibration data for 5x00 series

Update sensitivity range values for 5x00 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: update sensitivity calibration data for 6x00 series
Wey-Yi Guy [Wed, 20 Jan 2010 20:22:52 +0000 (12:22 -0800)]
iwlwifi: update sensitivity calibration data for 6x00 series

Update sensitivity range values for 6000 & 6x50 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: fix locking in iwl_mac_add_interface
Johannes Berg [Wed, 20 Jan 2010 19:21:06 +0000 (11:21 -0800)]
iwlwifi: fix locking in iwl_mac_add_interface

The corresponding iwl_mac_remove_interface only
acquires the mutex, leading me to believe that
the spinlock is not necessary. However, this
doesn't actually acquire the mutex around the
vif pointer check and assignment, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: sysassert identifier change
Wey-Yi Guy [Wed, 20 Jan 2010 00:51:50 +0000 (16:51 -0800)]
iwlwifi: sysassert identifier change

Change in uCode to include a unique identifier as part of sysassert,
in order to tell the difference, add the "ADVANCED SYSASSERT" description
when dump nic error to indicate the difference.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: optimize power saving
Daniel Halperin [Tue, 19 Jan 2010 18:22:19 +0000 (10:22 -0800)]
iwlwifi: optimize power saving

In hostap AP mode, every time the client sends the AP
a packet the STA_NOTIFY_AWAKE code is sent from mac80211.
This results in a command being sent to the uCode even if
the client was not asleep.

The following simple patch has fixed the issue for me without any
degradation that I can find.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoath9k: Handle full sleep in ps_restore.
Vivek Natarajan [Fri, 29 Jan 2010 11:26:51 +0000 (16:56 +0530)]
ath9k: Handle full sleep in ps_restore.

IDLE PS (Full Sleep) doesn't work when ifconfig up
is done during Idle unassociated state.
Fix this by restoring FULL SLEEP in ps_restore if CONF_IDLE
is set.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocdc_ether: Partially revert "usbnet: Set link down initially ..."
Ben Hutchings [Fri, 29 Jan 2010 05:37:18 +0000 (21:37 -0800)]
cdc_ether: Partially revert "usbnet: Set link down initially ..."

Commit 37e8273cd30592d3a82bcb70cbb1bdc4eaeb6b71 ("usbnet: Set link down
initially for drivers that update link state") changed the initial link
state in cdc_ether and other drivers based on the understanding that the
devices they support generate link change interrupts.  However, this is
optional in the CDC Ethernet protocol, and two users have reported in
<http://bugzilla.kernel.org/show_bug.cgi?id=14791> that the link state
for their devices remains down.  Therefore, revert the change in
cdc_ether.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Avi Rozen <avi.rozen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Fix memset() arg ordering.
David S. Miller [Fri, 29 Jan 2010 05:36:21 +0000 (21:36 -0800)]
be2net: Fix memset() arg ordering.

Noticed by Ben Hutchings.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosched: add head drop fifo queue
Hagen Paul Pfeifer [Sun, 24 Jan 2010 12:30:59 +0000 (12:30 +0000)]
sched: add head drop fifo queue

This adds an additional queuing strategy, called pfifo_head_drop,
to remove the oldest skb in the case of an overflow within the queue -
the head element - instead of the last skb (tail). To remove the oldest
skb in congested situations is useful for sensor network environments
where newer packets reflect the superior information.

Reviewed-by: Florian Westphal <fw@strlen.de>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agops3_gelic_wireless: fix directed ssid scan
Hamish Guthrie [Thu, 28 Jan 2010 11:54:10 +0000 (12:54 +0100)]
ps3_gelic_wireless: fix directed ssid scan

If the association worker requests a directed ssid scan and a bss list
already exists, the directed scan is not done. This patch corrects this
and cleans up a few typos and debug messages.

Signed-off-by: Hamish Guthrie <hamish.guthrie@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agops3_gelic_wireless: Remove PS3 gelic legacy wpa support
Hamish Guthrie [Thu, 28 Jan 2010 11:54:09 +0000 (12:54 +0100)]
ps3_gelic_wireless: Remove PS3 gelic legacy wpa support

The current PS3 gelic wireless driver has support for wireless
extensions. The original PS3 gelic wireless driver exposed a
dedicated API for a dedicated wpa_supplicant driver. This old
API could be enabled with CONFIG_GELIC_WIRELESS_OLD_PSK_INTERFACE,
however, as this is not being used by any distros, and it is being
removed from the driver and from wpa_supplicant.

Signed-off-by: Hamish Guthrie <hamish.guthrie@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonetns xfrm: ipcomp6 support
Alexey Dobriyan [Mon, 25 Jan 2010 10:39:09 +0000 (10:39 +0000)]
netns xfrm: ipcomp6 support

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetns xfrm: ipcomp support
Alexey Dobriyan [Mon, 25 Jan 2010 10:38:34 +0000 (10:38 +0000)]
netns xfrm: ipcomp support

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetns xfrm: xfrm6_tunnel in netns
Alexey Dobriyan [Mon, 25 Jan 2010 10:37:54 +0000 (10:37 +0000)]
netns xfrm: xfrm6_tunnel in netns

I'm not sure about rcu stuff near kmem cache destruction:
* checks for non-empty hashes look bogus, they're done _before_
  rcu_berrier()
* unregistering netns ops is done before kmem_cache destoy
  (as it should), and unregistering involves rcu barriers by itself

So it looks nothing should be done.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetns xfrm: fixup xfrm6_tunnel error propagation
Alexey Dobriyan [Mon, 25 Jan 2010 10:28:21 +0000 (10:28 +0000)]
netns xfrm: fixup xfrm6_tunnel error propagation

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: merge fixup for qlge_main
Stephen Rothwell [Thu, 28 Jan 2010 14:13:13 +0000 (06:13 -0800)]
net: merge fixup for qlge_main

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 28 Jan 2010 14:12:38 +0000 (06:12 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

14 years agonetdev: remove HAVE_ leftovers
Alexey Dobriyan [Wed, 27 Jan 2010 10:17:41 +0000 (10:17 +0000)]
netdev: remove HAVE_ leftovers

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: bond_open error return value
stephen hemminger [Mon, 25 Jan 2010 23:34:15 +0000 (23:34 +0000)]
bonding: bond_open error return value

The convention for API functions in kernel is to return errno value;
bond_open would return -1 if alb setup failed. The only reason that
could happen is if kmalloc() failed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: if ixgbe_copy_dcb_cfg is going to fail learn about it early
John Fastabend [Wed, 27 Jan 2010 16:38:06 +0000 (16:38 +0000)]
ixgbe: if ixgbe_copy_dcb_cfg is going to fail learn about it early

Call ixgbe_copy_dcb_cfg() earlier in the ixgbe_dcbnl_set_all() so that
we can learn if this is going to fail as early as possible.  Previously,
ixgbe_down or ixgbe_close were being called before this check and the
IXGBE_RESETTING bit was being set and cleared.  Worse if this failed
the corresponding ixgbe_up/ndo_open would not called.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: set the correct DCB bit for pg tx settings
John Fastabend [Wed, 27 Jan 2010 16:37:44 +0000 (16:37 +0000)]
ixgbe: set the correct DCB bit for pg tx settings

Set the correct bit BIT_PG_TX when tx PG settings are set.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigbvf: fix issue w/ mapped_as_page being left set after unmap
Alexander Duyck [Wed, 27 Jan 2010 15:30:39 +0000 (15:30 +0000)]
igbvf: fix issue w/ mapped_as_page being left set after unmap

This change fixes an issue in igbvf with mapped_as_page being left set
after a page is unmapped which results in buffers which are mapped via map
single being unmapped as page.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: ks8851_mll ethernet network driver
Choi, David [Wed, 27 Jan 2010 06:03:16 +0000 (06:03 +0000)]
drivers/net: ks8851_mll ethernet network driver

Hello David Miller,

I fix a bug in ks8851_mll driver, which has existed since 2.6.32-rc6.

>From : David J. Choi <david.choi@micrel.com>

Fix a bug that the data pointers in the interrupt handler are set wrong, which is related with the 5th parameter of request_irq().

Signed-off-by : David J. Choi <david.choi@micrel.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Bug fix to support newer generation of BE ASIC
Ajit Khaparde [Wed, 27 Jan 2010 21:56:44 +0000 (21:56 +0000)]
be2net: Bug fix to support newer generation of BE ASIC

Bug fix in be2net for newer generation of BladeEngine ASIC.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 28 Jan 2010 13:42:33 +0000 (05:42 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agocfg80211: fix wext-compat for setting rate to 'auto'
John W. Linville [Wed, 27 Jan 2010 14:44:48 +0000 (09:44 -0500)]
cfg80211: fix wext-compat for setting rate to 'auto'

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8187: Add callback for get_tsf
Larry Finger [Tue, 26 Jan 2010 23:45:28 +0000 (17:45 -0600)]
rtl8187: Add callback for get_tsf

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N PHY: Fix compilation after removal of typdef b43_c32
Larry Finger [Tue, 26 Jan 2010 22:42:02 +0000 (16:42 -0600)]
b43: N PHY: Fix compilation after removal of typdef b43_c32

In the conversion between typedef and struct, two places that needed a "struct"
were missed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8180: implement get_tsf op for mac80211
John W. Linville [Tue, 26 Jan 2010 21:22:20 +0000 (16:22 -0500)]
rtl8180: implement get_tsf op for mac80211

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: add comment re: v10 firmware key handling
John W. Linville [Wed, 27 Jan 2010 19:23:17 +0000 (14:23 -0500)]
libertas: add comment re: v10 firmware key handling

Comment text suggested by Dan Williams <dcbw@redhat.com> in
<1263952092.4481.2.camel@localhost.localdomain>.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: adding LED support for AR5BXB63 cards
Luca Verdesca [Tue, 22 Dec 2009 17:10:01 +0000 (18:10 +0100)]
ath5k: adding LED support for AR5BXB63 cards

With following patch, LED should now work with LiteOn AR5BXB63 mini
pci-e cards.

(Broken patch fixed-up by me...let's hope I did it right! -- JWL)

Signed-off-by: Luca Verdesca <magooz@salug.it>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet/atm: Cleanup dprint/ddprintk #defines and uses
Joe Perches [Tue, 26 Jan 2010 11:40:20 +0000 (11:40 +0000)]
net/atm: Cleanup dprint/ddprintk #defines and uses

Move "mpoa:%s: ", __func__/__FILE__ to #defines
Remove mpoa __func__/__FILE__ from dprintk uses
Add and use #define dprint_cont where appropriate

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/lec.c: Add __lec_arp_check_expire and other cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:19 +0000 (11:40 +0000)]
net/atm/lec.c: Add __lec_arp_check_expire and other cleanups

Reduce indentation in lec_arp_check_expire
Indent a case label
Remove != NULL logical tests from while ((skb = foo())) assign and tests

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/svc.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:18 +0000 (11:40 +0000)]
net/atm/svc.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Spacing cleanups
Mostly 80 column wrapped
Move trailing statements to new lines
switch/case cleanups

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/signaling.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:17 +0000 (11:40 +0000)]
net/atm/signaling.c: checkpatch cleanups

Mostly 80 column wrapped.
Move embedded assigns out of tests
Move trailing statements to new lines
switch/case cleanups

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/resources.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:16 +0000 (11:40 +0000)]
net/atm/resources.c: checkpatch cleanups

Spacing cleanups
Mostly 80 column wrapped.
Move embedded assigns out of tests
Move trailing statements to new lines
switch/case cleanups

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/raw.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:15 +0000 (11:40 +0000)]
net/atm/raw.c: checkpatch cleanups

Spacing cleanups
Mostly 80 column wrapped.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/pvc.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:14 +0000 (11:40 +0000)]
net/atm/pvc.c: checkpatch cleanups

Spacing cleanups
Mostly 80 column wrapped.
Move trailing statements to new lines

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/proc.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:13 +0000 (11:40 +0000)]
net/atm/proc.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Mostly 80 column wrapped.
Spacing cleanups
Move trailing statements to new lines
switch/case cleanups

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/pppoatm.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:12 +0000 (11:40 +0000)]
net/atm/pppoatm.c: checkpatch cleanups

Move embedded assigns out of tests
Move trailing statements to new lines
Move labels to column 1

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/mpoa_proc.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:11 +0000 (11:40 +0000)]
net/atm/mpoa_proc.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Add printk argument verification to dprintk and ddprintk
Spacing cleanups
Mostly 80 column wrapped.
Removed unnecessary breaks after returns
Use %pI4 in seq_printf of IP address

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/mpoa_caches.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:10 +0000 (11:40 +0000)]
net/atm/mpoa_caches.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Add printk argument verification to dprintk and ddprintk
Spacing cleanups
Mostly 80 column wrapped.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/mpc.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:09 +0000 (11:40 +0000)]
net/atm/mpc.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Add printk argument verification to dprintk and ddprintk
Spacing cleanups
Mostly 80 column wrapped.
printk->pr_info and pr_cont
Moved labels to column 1
Move trailing statements to new lines
switch/case cleanups
remove unnecessary breaks after returns
Remove unnecessary braces around single line statements

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/lec.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:08 +0000 (11:40 +0000)]
net/atm/lec.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Mostly 80 column wrapped.
Spacing cleanups
Convert printks to pr_<level>
Use print_hex_dump
Move embedded assigns out of tests
Move trailing statements to new lines
Remove unnecessary braces around single line statements
switch/case cleanups
Removed paren around returns
Use %pM
Moved leading continuation logical tests to end of previous line

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/ioctl.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:07 +0000 (11:40 +0000)]
net/atm/ioctl.c: checkpatch cleanups

Spacing cleanups
Moved EXPORT_SYMBOL
Mostly 80 column wrapped.
switch/case cleanups

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/common.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:06 +0000 (11:40 +0000)]
net/atm/common.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Move EXPORT_SYMBOL
Spacing cleanups
Use __func__ in printks
Indent switch/case statements
Move trailing statements to new line
Hoist assigns from if tests

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/clip.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:05 +0000 (11:40 +0000)]
net/atm/clip.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Spacing cleanups
Move labels to column 1
Move logical continuation tests to end of previous line

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/br2684.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:04 +0000 (11:40 +0000)]
net/atm/br2684.c: checkpatch cleanups

Convert #include <asm... to #include <linux...
Use print_hex_dump
Spacing cleanups
Move logical continuation tests to end of previous line
80 column wrapping
Move goto branch label to column 1
Remove unnecessary single statement braces

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/atm_sysfs.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:03 +0000 (11:40 +0000)]
net/atm/atm_sysfs.c: checkpatch cleanups

Add space after for
Indent switch/case statements
80 column wrapping

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/atm_misc.c: checkpatch cleanups
Joe Perches [Tue, 26 Jan 2010 11:40:02 +0000 (11:40 +0000)]
net/atm/atm_misc.c: checkpatch cleanups

Moved EXPORT_SYMBOL to follow definition
Add space after commas

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm/addr.c: Convert include <asm to include <linux
Joe Perches [Tue, 26 Jan 2010 11:40:01 +0000 (11:40 +0000)]
net/atm/addr.c: Convert include <asm to include <linux

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/atm: Convert printk to pr_<level>
Joe Perches [Tue, 26 Jan 2010 11:40:00 +0000 (11:40 +0000)]
net/atm: Convert printk to pr_<level>

Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
Remove function names from output
Use single line pr_debug instead of broken multiple uses without newline

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostarfire: clean up properly if firmware loading fails
Ben Hutchings [Tue, 26 Jan 2010 18:27:09 +0000 (18:27 +0000)]
starfire: clean up properly if firmware loading fails

netdev_open() will return without cleaning up net device or hardware state
if firmware loading fails.  This results in a BUG() on a second attempt to
bring the interface up, reported in
<http://bugzilla.kernel.org/show_bug.cgi?id=15091>, and probably has even
worse effects if the driver is removed afterwards.

Call netdev_close() to clean up on failure.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=15091

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Reported-by: Michael Moffatt <michael@moffatt.org.nz>
Tested-by: Michael Moffatt <michael@moffatt.org.nz>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: wait for beacon before enabling powersave
Johannes Berg [Tue, 26 Jan 2010 13:19:52 +0000 (14:19 +0100)]
mac80211: wait for beacon before enabling powersave

Because DTIM information is required for powersave
but is only conveyed in beacons, wait for a beacon
before enabling powersave, and change the way the
information is conveyed to the driver accordingly.

mwl8k doesn't currently seem to implement PS but
requires the DTIM period in a different way; after
talking to Lennert we agreed to just have mwl8k do
the parsing itself in the finalize_join work.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: export cfg80211_find_ie
Johannes Berg [Tue, 26 Jan 2010 13:15:46 +0000 (14:15 +0100)]
cfg80211: export cfg80211_find_ie

This new function (previously a static function
called just "find_ie" can be used to find a
specific IE in a buffer of IEs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix NULL pointer dereference when ftrace is enabled
Zhu Yi [Tue, 26 Jan 2010 07:58:57 +0000 (15:58 +0800)]
mac80211: fix NULL pointer dereference when ftrace is enabled

I got below kernel oops when I try to bring down the network interface if
ftrace is enabled. The root cause is drv_ampdu_action() is passed with a
NULL ssn pointer in the BA session tear down case. We need to check and
avoid dereferencing it in trace entry assignment.

BUG: unable to handle kernel NULL pointer dereference
Modules linked in: at (null)
IP: [<f98fe02a>] ftrace_raw_event_drv_ampdu_action+0x10a/0x160 [mac80211]
*pde = 00000000
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
[...]
Call Trace:
 [<f98fdf20>] ? ftrace_raw_event_drv_ampdu_action+0x0/0x160 [mac80211]
 [<f98dac4c>] ? __ieee80211_stop_rx_ba_session+0xfc/0x220 [mac80211]
 [<f98d97fb>] ? ieee80211_sta_tear_down_BA_sessions+0x3b/0x50 [mac80211]
 [<f98dc6f6>] ? ieee80211_set_disassoc+0xe6/0x230 [mac80211]
 [<f98dc6ac>] ? ieee80211_set_disassoc+0x9c/0x230 [mac80211]
 [<f98dcbb8>] ? ieee80211_mgd_deauth+0x158/0x170 [mac80211]
 [<f98e4bdb>] ? ieee80211_deauth+0x1b/0x20 [mac80211]
 [<f8987f49>] ? __cfg80211_mlme_deauth+0xe9/0x120 [cfg80211]
 [<f898b870>] ? __cfg80211_disconnect+0x170/0x1d0 [cfg80211]

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonetfilter: ctnetlink: fix expectation mask dump
Patrick McHardy [Tue, 26 Jan 2010 16:04:02 +0000 (17:04 +0100)]
netfilter: ctnetlink: fix expectation mask dump

The protocol number is not initialized, so userspace can't interpret
the layer 4 data properly.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoariadne: Fix build.
David S. Miller [Tue, 26 Jan 2010 13:17:00 +0000 (05:17 -0800)]
ariadne: Fix build.

References removed HAVE_MULTICAST.

Reporeted-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: conntrack: Add member of user to nf_ct_frag6_queue structure
Shan Wei [Tue, 26 Jan 2010 02:40:38 +0000 (02:40 +0000)]
ipv6: conntrack: Add member of user to nf_ct_frag6_queue structure

The commit 0b5ccb2(title:ipv6: reassembly: use seperate reassembly queues for
conntrack and local delivery) has broken the saddr&&daddr member of
nf_ct_frag6_queue when creating new queue.  And then hash value
generated by nf_hashfn() was not equal with that generated by fq_find().
So, a new received fragment can't be inserted to right queue.

The patch fixes the bug with adding member of user to nf_ct_frag6_queue structure.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovirtio_net: Make delayed refill more reliable
Herbert Xu [Mon, 25 Jan 2010 23:51:01 +0000 (15:51 -0800)]
virtio_net: Make delayed refill more reliable

I have seen RX stalls on a machine that experienced a suspected
OOM.  After the stall, the RX buffer is empty on the guest side
and there are exactly 16 entries available on the host side.  As
the number of entries is less than that required by a maximal
skb, the host cannot proceed.

The guest did not have a refill job scheduled.

My diagnosis is that an OOM had occured, with the delayed refill
job scheduled.  The job was able to allocate at least one skb, but
not enough to overcome the minimum required by the host to proceed.

As the refill job would only reschedule itself if it failed completely
to allocate any skbs, this would lead to an RX stall.

The following patch removes this stall possibility by always
rescheduling the refill job until the ring is totally refilled.

Testing has shown that the RX stall no longer occurs whereas
previously it would occur within a day.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Use fixed-size buffers for MCDI NVRAM requests
Ben Hutchings [Mon, 25 Jan 2010 23:49:59 +0000 (15:49 -0800)]
sfc: Use fixed-size buffers for MCDI NVRAM requests

The low-level MCDI code always uses 32-bit MMIO operations, and
callers must pad input and output buffers to multiples of 4 bytes.
The MCDI NVRAM functions are not doing this.  Also, their buffers are
declared as variable-length arrays with no explicit maximum length.

Switch to a fixed buffer size based on the chunk size used by the
MTD driver (which is a multiple of 4).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Add workspace for GMAC bug workaround to MCDI MAC_STATS buffer
Guido Barzini [Mon, 25 Jan 2010 23:49:19 +0000 (15:49 -0800)]
sfc: Add workspace for GMAC bug workaround to MCDI MAC_STATS buffer

Due to a hardware bug in the SFC9000 family, the firmware must
transfer raw GMAC statistics to host memory before aggregating them
into the cooked (speed-independent) MAC statistics.  Extend the stats
buffer to support this.

The length of the buffer is explicit in the MAC_STATS command, so this
change is backward-compatible on both sides.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp_probe: avoid modulus operation and wrap fix
Stephen Hemminger [Mon, 25 Jan 2010 23:47:50 +0000 (15:47 -0800)]
tcp_probe: avoid modulus operation and wrap fix

By rounding up the buffer size to power of 2, several expensive
modulus operations can be avoided.  This patch also solves a bug where
the gap need when ring gets full was not being accounted for.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Only free resources if they were allocated
Breno Leitao [Mon, 25 Jan 2010 23:46:58 +0000 (15:46 -0800)]
qlge: Only free resources if they were allocated

Currently qlge tries to release regions even if they were not allocated.
This causes messages like the following in the kernel log

Trying to free nonexistent resource <00000000006af400-00000000006af4ff>
Trying to free nonexistent resource <00003c04ff9f4000-00003c04ff9f7fff>
Trying to free nonexistent resource <00003c04ffc00000-00003c04ffcfffff>

This patch fixes the goto logic in order to not release the resources
if they were not allocated.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: fill jiffies/vif on filtered frames
Johannes Berg [Mon, 25 Jan 2010 18:07:39 +0000 (19:07 +0100)]
mac80211: fill jiffies/vif on filtered frames

Filtered frames not only need their control information
cleared to avoid wrong checks, but also need to have
jiffies and vif assigned so they can be processed or
expired.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: use cordic to generate samples
Rafał Miłecki [Mon, 25 Jan 2010 18:00:01 +0000 (19:00 +0100)]
b43: N-PHY: use cordic to generate samples

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: update cordic code to match current specs
Rafał Miłecki [Mon, 25 Jan 2010 18:00:00 +0000 (19:00 +0100)]
b43: update cordic code to match current specs

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: make cordic common (LP-PHY and N-PHY need it)
Rafał Miłecki [Mon, 25 Jan 2010 17:59:59 +0000 (18:59 +0100)]
b43: make cordic common (LP-PHY and N-PHY need it)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: fix one bit off in parsing RF Ctrl Override arguments
Rafał Miłecki [Mon, 25 Jan 2010 17:59:58 +0000 (18:59 +0100)]
b43: N-PHY: fix one bit off in parsing RF Ctrl Override arguments

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: track work started through callbacks
Johannes Berg [Mon, 25 Jan 2010 12:36:36 +0000 (13:36 +0100)]
mac80211: track work started through callbacks

Currently, the remain_on_channel work callback needs
to track in its own data structure whether the work
was just started or not. By reordering some code this
becomes unnecessary, the generic wk->started variable
can still be 'false' on the first invocation and only
be 'true' on actual timeout invocations, so that the
extra variable can be removed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix sw crypto
Johannes Berg [Mon, 25 Jan 2010 10:36:16 +0000 (11:36 +0100)]
mac80211: fix sw crypto

What a stupid mistake. In

    commit 813d76694043d00b59475baa1fbfaf54a2eb7fad
    Author: Johannes Berg <johannes@sipsolutions.net>
    Date:   Sun Jan 17 01:47:58 2010 +0100

        mac80211: move control.hw_key assignment

I inserted code testing the wrong flags field,
which means that the test is almost always true
(it's really testing for the peer's WMM support)
and thus the later parts of the stack assume hw
crypto will be done even if that's not true.

Obviously, that broke software crypto. Maxim
said so specifically, and Jochen probably uses
some cipher that iwl3945 doesn't support in
hardware, which might also explain that Maxim
reports that even hw crypto is broken.

Fix this to test the right flags field.

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Reported-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix WARN_ON in the new work code
Felix Fietkau [Sun, 24 Jan 2010 19:44:35 +0000 (20:44 +0100)]
mac80211: fix WARN_ON in the new work code

ieee80211_work_rx_mgmt currently enqueues various management frames,
including deauth and disassoc frames, however the function
ieee80211_work_rx_queued_mgmt does not handle these, as they should
only occur if the AP is buggy. It does emit a WARN_ON when this happens
though, and several users have reported such instances.
Fix the WARN_ON by not queueing such frames in the first place.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix update_tkip_key() documentation about the context
Kalle Valo [Sun, 24 Jan 2010 12:55:12 +0000 (14:55 +0200)]
mac80211: fix update_tkip_key() documentation about the context

Johannes noticed that I had incorrectly documented the context of
update_tkip_key() driver operation. It must be atomic because all
RX code is run inside rcu critical section.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Workaround circular locking in hw-tkip key update callback
Michael Buesch [Sun, 24 Jan 2010 12:13:32 +0000 (13:13 +0100)]
b43: Workaround circular locking in hw-tkip key update callback

The TKIP key update callback is called from the RX path, where the driver
mutex is already locked. This results in a circular locking bug.
Avoid this by removing the lock.

Johannes noted that there is a separate bug: The callback still breaks on SDIO
hardware, because SDIO hardware access needs to sleep, but we are not allowed
to sleep in the callback due to mac80211's RCU locking.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: kecsa@kutfo.hit.bme.hu
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: improve max rate retry handling
Felix Fietkau [Sun, 24 Jan 2010 02:26:11 +0000 (03:26 +0100)]
ath9k: improve max rate retry handling

ath9k currently forces hw->max_rate_tries to 4 to work around rate
control inefficiencies. This has some negative side effects, such as
rate_control_send_low also using a maximum of 4 tries, which could
negatively affect reliability of unicast management frames.
This patch pushes the retry limit to the rate control instead, and
allows it to use more tries on the last stage to prevent unnecessary
packet loss.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix throughput degradation in aggregation mode
Daniel Halperin [Fri, 22 Jan 2010 22:22:58 +0000 (14:22 -0800)]
iwlwifi: fix throughput degradation in aggregation mode

The following commit

commit e4da8c37af626001ff704fb29ea14eb58f5f7208
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Wed Dec 23 13:15:43 2009 +0100

   mac80211: make off-channel work generic

triggered a bug in iwlwifi where HT parameters would not be correctly set in
some mac80211 pathways. The aggregation (and possibly other) station flags were
not being set, which limited the size of aggregation blocks and reduced
throughput at high rates.

>From Johannes:
"""
Due to Wey-Yi's patch to use the set-channel command when the channel changes
while associated, we don't get a full new RXON. Therefore, we don't re-set the
rxon-station either. However, under some circumstances that apparently have
gotten more likely mac80211 will first set up the BSS info, then add the
station and then switch to an HT channel type.

Therefore, the check for "priv->current_ht_config.is_ht" in
iwl_rxon_add_station() will hit false and not fill in the HT information.

However, that check can just be removed, which is the easiest fix for all this,
because the HT capa struct is always there, just could possibly have the
ht_supported member set to false.
"""

A sample good link in my 3x3 network improves by approximately 25% TCP
throughput. This fixes Bug 2144
(http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2144).

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: cleanup spectrum measurement command support
Reinette Chatre [Fri, 22 Jan 2010 22:22:57 +0000 (14:22 -0800)]
iwlwifi: cleanup spectrum measurement command support

In iwlagn the support for spectrum measurement command has been
disabled since v2.6.29 without any requests for it. In addition to this
when this command is indeed enabled it has been found to trigger firmware
SYSASSERT on at least 4965 and 5100 hardware (see
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1952 ). Since then
this code has been bitrotting and cannot just be enabled without porting.

Remove support for spectrum measurement command from iwlagn. It can be
added back if there is a future need and the firmware problem it triggers
has been fixed. Support for the spectrim measurement notification remains
as it has been enabled all the time.

In addition to this remove the 3945 spectrum measurement command Kconfig
option and make this command always supported. The code added by this
enabling is minimal and only run when user triggers a spectrum measurement
request via sysfs.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: check endianness annotations by default
Johannes Berg [Fri, 22 Jan 2010 22:22:56 +0000 (14:22 -0800)]
iwlwifi: check endianness annotations by default

sparse won't check endianness annotations by
default, but iwlwifi is and should be clean
so we can make sparse check them on it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix sparse warning
Johannes Berg [Fri, 22 Jan 2010 22:22:55 +0000 (14:22 -0800)]
iwlwifi: fix sparse warning

sparse correctly warns about symbol not
being static, make static to shut it up.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: clean up debugfs code
Johannes Berg [Fri, 22 Jan 2010 22:22:54 +0000 (14:22 -0800)]
iwlwifi: clean up debugfs code

The debugfs code can be made a whole lot more
efficient by using debugfs_remove_recursive(),
the large chunk of variables can completely go
away and by moving two variables we no longer
need to allocate an extra chunk of memory.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>