]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
13 years agowl1271: handle HW watchdog interrupt
Eliad Peller [Wed, 27 Oct 2010 12:09:57 +0000 (14:09 +0200)]
wl1271: handle HW watchdog interrupt

unmask the WL1271_ACX_INTR_WATCHDOG interrupt.
when getting it - enqueue a recovery work and bail out.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: refactor debugfs function generation code
Eliad Peller [Wed, 27 Oct 2010 12:58:30 +0000 (14:58 +0200)]
wl1271: refactor debugfs function generation code

refactor wl1271_debugfs by using a format&copy function, instead of
duplicating the code for each generated function.

this change reduces about 3Kb from wl1271.ko

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: set wl->vif only if add_interface succeeded.
Eliad Peller [Thu, 28 Oct 2010 19:46:43 +0000 (21:46 +0200)]
wl1271: set wl->vif only if add_interface succeeded.

set wl->vif to the newly created interface only after the firmware booted
successfully. on the way - make the function flow more clear.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Check interface state in op_* functions
Juuso Oikarinen [Tue, 26 Oct 2010 11:24:39 +0000 (13:24 +0200)]
wl1271: Check interface state in op_* functions

Check the state of the interface on op_* function so we don't try to access
the hardware in when its off.

The mac80211 may call these in some corner cases related, for instance, to
the hardware recovery procedure. These accesses cause a kernel crash on at
least some SDIO devices, because the bus is not properly claimed in that
scenario.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Fix scan failure detection
Juuso Oikarinen [Tue, 26 Oct 2010 11:24:38 +0000 (13:24 +0200)]
wl1271: Fix scan failure detection

In scan_complete_work, because the mutex is released before accessing the
scan->failed flag, it is possible for unfounded hardware recovery rounds
to be executed.

Fix this.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Fix RX path stall
Juuso Oikarinen [Mon, 25 Oct 2010 09:24:29 +0000 (11:24 +0200)]
wl1271: Fix RX path stall

The wl1271_rx function loops through packets in an aggregated buffer. Each
packet in the buffer is handled by a call to wl1271_rx_handle_data, which will
fail if skb memory allocation fails or production mode is enabled. These
failures currently prevent the rx counters to be incremented, thus causing the
rx loop to run forever.

Fix this by ignoring error codes reported wl1271_rx_handle_data function.
This essentially means that frames will be dropped in production mode, which
is the intetion, and frames will be dropped if memory allocation fails, which
is a decent way to recover from that situation.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowireless/wl1271: remove redundant if-statement v2
Nicolas Kaiser [Mon, 25 Oct 2010 13:30:03 +0000 (15:30 +0200)]
wireless/wl1271: remove redundant if-statement v2

wl1271_ps_elp_sleep() is void and cannot return a value.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: exit ELP mode when setting enabled rates in tx
Luciano Coelho [Wed, 20 Oct 2010 12:15:52 +0000 (15:15 +0300)]
wl1271: exit ELP mode when setting enabled rates in tx

This bug was being triggered by a call to acx_rate_policies in tx_work
without calling ps_elp_wakeup first.  If we have full PSM enabled, this
happens rather often, immediately after association.

Reported-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
13 years agowl1271: Fix warning about unsupported RX rate
Teemu Paasikivi [Thu, 14 Oct 2010 09:00:04 +0000 (11:00 +0200)]
wl1271: Fix warning about unsupported RX rate

While scanning, it is possible that beacon and probe response frames are
received on other band than configured to the driver. In rx status
handling this has caused "Unsupported RX rate from HW" warnings. This
patch changes the wl1271_rate_to_index function to take the band of the
received frame as a parameter instead of using value configuret to
wl->band.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: 11n Support, functionality and configuration ability
Shahar Levi [Wed, 13 Oct 2010 14:09:41 +0000 (16:09 +0200)]
wl1271: 11n Support, functionality and configuration ability

Add 11n ability in scan, connection and using MCS rates.
The configuration is temporary due to the code incomplete and
still in testing process. That plans to be remove in the future.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: 11n Support, ACX Commands
Shahar Levi [Wed, 13 Oct 2010 14:09:40 +0000 (16:09 +0200)]
wl1271: 11n Support, ACX Commands

Added ACX command to the FW for 11n support.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: 11n Support, Add Definitions
Shahar Levi [Wed, 13 Oct 2010 14:09:39 +0000 (16:09 +0200)]
wl1271: 11n Support, Add Definitions

Two acx commands: ht_capabilities & ht_information, 11n sta capabilities
macro.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Fix TX queue low watermark handling
Ido Yariv [Tue, 12 Oct 2010 12:49:12 +0000 (14:49 +0200)]
wl1271: Fix TX queue low watermark handling

The number of entries in the TX queue is compared to the low watermark
value each time TX completion interrupts are handled.
However, the fact that a TX completion arrived does not necessarily mean
there are any less skbs in the TX queue.

In addition, a TX completion interrupt does not necessarily mean that there
are any new available TX blocks. Thus, queuing TX work when the low
watermark is reached might not be needed.

Fix this by moving the low watermark handling to the TX work function,
and avoid queuing TX work in this case.

Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Allocate TX descriptors more efficiently
Ido Yariv [Tue, 12 Oct 2010 14:20:06 +0000 (16:20 +0200)]
wl1271: Allocate TX descriptors more efficiently

On each TX descriptor allocation, a free entry is found by traversing the TX
descriptors array.

Improve this by holding a bitmap of all TX descriptors, and using efficient
bit operations to search for free entries.

Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Fix TX starvation
Ido Yariv [Tue, 12 Oct 2010 12:49:10 +0000 (14:49 +0200)]
wl1271: Fix TX starvation

While wl1271_irq_work handles RX directly (by calling wl1271_rx), a different
work is scheduled for transmitting packets. The IRQ work might handle more than
one interrupt during a single call, including multiple TX completion
interrupts. This might starve TX, since no packets are transmitted until all
interrupts are handled.

Fix this by calling the TX work function directly, instead of deferring
it.

Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: TX aggregation optimization
Ido Yariv [Tue, 12 Oct 2010 12:49:09 +0000 (14:49 +0200)]
wl1271: TX aggregation optimization

In case the aggregation buffer is too small to hold all available packets,
the buffer is transferred to the FW and no more packets are aggregated.
Although there may be enough available TX blocks, no additional packets will
be handled by the current TX work.

Fix this by flushing the aggregation buffer when it's full, and continue
transferring packets as long as there are enough available TX blocks.

Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: ref_clock cosmetic changes
Gery Kahn [Tue, 5 Oct 2010 14:09:05 +0000 (16:09 +0200)]
wl1271: ref_clock cosmetic changes

Cosmetic cleanup for ref_clock code while configured by board.

Signed-off-by: Gery Kahn <geryk@ti.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agoiwlagn: use 6000g2b uCode for 130 series devices
Wey-Yi Guy [Sat, 23 Oct 2010 16:15:46 +0000 (09:15 -0700)]
iwlagn: use 6000g2b uCode for 130 series devices

For 130 series device, 6000g2b uCode will be used, no need to
have additional defines for 130 devices, so remove those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: add new devices to Kconfig
Wey-Yi Guy [Sat, 23 Oct 2010 16:15:45 +0000 (09:15 -0700)]
iwlwifi: add new devices to Kconfig

Adding description to Kconfig to indicate more devices
are being supported by iwlagn

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: turn dynamic smps on while BT is on
Wey-Yi Guy [Sat, 23 Oct 2010 16:15:44 +0000 (09:15 -0700)]
iwlagn: turn dynamic smps on while BT is on

While BT is on and doing iscan and/or pscan, BT is in listen
mode which will impact WiFi throughput, we need to
enable dynamic smps in order to improve the rx throughput.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: implement switching iftype while up
Johannes Berg [Sat, 23 Oct 2010 16:15:43 +0000 (09:15 -0700)]
iwlwifi: implement switching iftype while up

Implement switching the interface while an
interface is up in iwlwifi. Interfaces have
to stay on the context they were created on.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix IBSS beaconing
Johannes Berg [Sat, 23 Oct 2010 16:15:42 +0000 (09:15 -0700)]
iwlwifi: fix IBSS beaconing

My previous patch to clean up all RXON handling
inadvertently broke IBSS because it failed to
take into account that unlike in AP mode, IBSS
requires beacons to be sent only after setting
the RXON assoc.

Fix this, clean up the code a bit, improve the
error checking around this, and also react to
beacon changes in IBSS mode from mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: new RXON processing for modern devices
Johannes Berg [Sat, 23 Oct 2010 16:15:41 +0000 (09:15 -0700)]
iwlagn: new RXON processing for modern devices

In order to simplify the flow, and make new
enhancements easier, separate out the RXON
processing for modern AGN (5000 and newer)
from RXON processing for the older 3945 and
4965 devices. Avoid changing these old ones
to avoid regressions and move their code to
a new file (iwl-legacy.c). 4965 gets the
commit_rxon that used to be common for all
AGN devices, but with removed PAN support.

The new RXON processing is more central and
does more work in committing, so that it is
easier to follow.

To make it more evident what is split out
for legacy, split the necessary operations
for that into a new struct iwl_legacy_ops.
Those parts that still exist in the new AGN
code don't need to be parametrized.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: don't resend RXON timing
Johannes Berg [Sat, 23 Oct 2010 16:15:40 +0000 (09:15 -0700)]
iwlagn: don't resend RXON timing

Resending RXON timing here caused issues with
dual-mode under certain circumstances, so avoid
doing it here right now.

This effectively reverts b01efe434bd6ea807eb72b
and partially 2491fa42d9bdf26075765. The next
patch will make all this cleaner for just the
devices that need it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: make mac80211 ops a device config
Johannes Berg [Sat, 23 Oct 2010 16:15:39 +0000 (09:15 -0700)]
iwlwifi: make mac80211 ops a device config

In the future, 4965 and modern AGN devices will
need to have different mac80211 callbacks since
they have different capabilities. Prepare for
that by making the mac80211 operations a device
config.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: refactor debugfs function generation code
Eliad Peller [Wed, 27 Oct 2010 12:58:29 +0000 (14:58 +0200)]
mac80211: refactor debugfs function generation code

refactor mac80211 debugfs code by using a format&copy function, instead of
duplicating the code for each generated function.

this change reduces about 600B from mac80211.ko

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: content DMA start / stop through the PCU lock
Luis R. Rodriguez [Tue, 26 Oct 2010 22:27:25 +0000 (15:27 -0700)]
ath9k: content DMA start / stop through the PCU lock

This helps align resets / RX enable & disable / TX stop / start.
Locking around the PCU is important to ensure the hardware doesn't
get stale data when working with DMA'able data.

This is part of a series of patches which fix stopping
TX DMA completley when requested on the driver.
For more details about this issue refer to this thread:

http://marc.info/?l=linux-wireless&m=128629803703756&w=2

Tested-by: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: move the PCU lock to the sc structure
Luis R. Rodriguez [Tue, 26 Oct 2010 22:27:24 +0000 (15:27 -0700)]
ath9k: move the PCU lock to the sc structure

The PCU lock should be used to contend TX DMA as well,
this will be done next.

This is part of a series of patches which fix stopping
TX DMA completley when requested on the driver.
For more details about this issue refer to this thread:

http://marc.info/?l=linux-wireless&m=128629803703756&w=2

Tested-by: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: simplify hw reset locking
Luis R. Rodriguez [Tue, 26 Oct 2010 22:27:23 +0000 (15:27 -0700)]
ath9k: simplify hw reset locking

The new PCU lock is better placed so we can just contend
against that when trying to reset hardware.

This is part of a series of patches which fix stopping
TX DMA completley when requested on the driver.
For more details about this issue refer to this thread:

http://marc.info/?l=linux-wireless&m=128629803703756&w=2

Tested-by: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Properly assign boolean types
Mohammed Shafi Shajakhan [Tue, 26 Oct 2010 15:58:57 +0000 (21:28 +0530)]
ath9k: Properly assign boolean types

This takes care that boolean types are properly assigned

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Handle monitor mode properly for HTC devices
Rajkumar Manoharan [Tue, 26 Oct 2010 14:41:29 +0000 (20:11 +0530)]
ath9k_htc: Handle monitor mode properly for HTC devices

No need to inform about monitor interface changes to
firmware. Set the HW mode to monitor type based on mac80211
indication flag is sufficient.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: Convert to new PCI PM framework
John W. Linville [Mon, 25 Oct 2010 20:12:37 +0000 (16:12 -0400)]
iwlwifi: Convert to new PCI PM framework

Use the new PCI PM and let the PCI core code handle the PCI-specific
details of power transitions.

Based on similarly titled ath9k patch posted by Rafael J. Wysocki.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agort2x00pci: do not use GFP_DMA
John W. Linville [Mon, 25 Oct 2010 14:33:07 +0000 (10:33 -0400)]
rt2x00pci: do not use GFP_DMA

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
13 years agob43: remove extraneous code in free_ringmemory
John W. Linville [Mon, 25 Oct 2010 14:24:09 +0000 (10:24 -0400)]
b43: remove extraneous code in free_ringmemory

This code seems to have been cut-n-pasted from alloc_ringmemory?
Anyway, it is useless.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: fix typos
Hauke Mehrtens [Sat, 23 Oct 2010 17:51:32 +0000 (19:51 +0200)]
carl9170: fix typos

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: improve 2055 radio initialization
Rafał Miłecki [Fri, 22 Oct 2010 15:43:49 +0000 (17:43 +0200)]
b43: N-PHY: improve 2055 radio initialization

1) Upload 5 GHz values when needed.
2) Do not upload all values on first init. Follow wl.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: determine usage of radio regulatory workaround correctly
Rafał Miłecki [Fri, 22 Oct 2010 15:43:48 +0000 (17:43 +0200)]
b43: N-PHY: determine usage of radio regulatory workaround correctly

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: define known SPROM boardflags2 bits
Rafał Miłecki [Fri, 22 Oct 2010 15:43:47 +0000 (17:43 +0200)]
b43: define known SPROM boardflags2 bits

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: fix 2055 radio init
Rafał Miłecki [Fri, 22 Oct 2010 15:43:46 +0000 (17:43 +0200)]
b43: N-PHY: fix 2055 radio init

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: avoid commit rxon during scan in iwl_set_no_assoc
Stanislaw Gruszka [Fri, 22 Oct 2010 15:04:30 +0000 (17:04 +0200)]
iwlwifi: avoid commit rxon during scan in iwl_set_no_assoc

Currently we are canceling scan when changing BSSID. Behave the same
when changing association and beacon enablement, to avoid committing
rxon during scan in iwl_set_no_assoc().

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: defer update power mode while scan
Stanislaw Gruszka [Fri, 22 Oct 2010 15:04:29 +0000 (17:04 +0200)]
iwlwifi: defer update power mode while scan

Do not set power mode when scanning, and defer that when scan finish.
We still set power mode in force case i.e. when device is overheated.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: avoid commit rxon during scan in iwlagn_bt_traffic_change_work
Stanislaw Gruszka [Fri, 22 Oct 2010 15:04:28 +0000 (17:04 +0200)]
iwlwifi: avoid commit rxon during scan in iwlagn_bt_traffic_change_work

Avoid sending commands to firmware (including commit_rxon) when scan
is pending and we are calling iwlagn_bt_traffic_change_work simultaneously.

Also comment some innocent race conditions.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: avoid commit rxon during scan in iwlagn_configure_filter
Stanislaw Gruszka [Fri, 22 Oct 2010 15:04:27 +0000 (17:04 +0200)]
iwlwifi: avoid commit rxon during scan in iwlagn_configure_filter

Almost anywhere in the code we avoid committing rxon while performing
scan, and make rxon commit when scan complete. However in some places
in the code we do not follow that rule. This patch fix that problem in
iwlagn_configure_filter().

Since we do not commit directly in iwl3945_configure_filter, we can
also do the same for agn, so I just remove iwlcore_commit_rxon()
function and add a comment. Also change comment for iwl3945.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix set_tx_power vs scan
Stanislaw Gruszka [Fri, 22 Oct 2010 15:04:26 +0000 (17:04 +0200)]
iwlwifi: fix set_tx_power vs scan

According to comment in iwl_bg_scan_completed, setting tx power should
be deferred during pending scan, but we are not doing this.

This patch change code to really defer setting tx power after scan
complete. Additionally refactor iwl_set_tx_power code and call
lib->send_tx_power() directly from iwlagn_commit_rxon.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: send tx_power_cmd synchronously
Stanislaw Gruszka [Fri, 22 Oct 2010 15:04:25 +0000 (17:04 +0200)]
iwlwifi: send tx_power_cmd synchronously

On 5xxx and 6xxx change to send tx_power_cmd command synchronously,
to do not start other commands when setting tx power is pending.
We currently do the same for 4956 and 3945.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: warn when send tx power settings during scan
Stanislaw Gruszka [Mon, 25 Oct 2010 08:34:50 +0000 (10:34 +0200)]
iwlwifi: warn when send tx power settings during scan

Add WARN_ONCE when scanning is pending. Use STATUS_SCAN_HW bit since we
can have scan canceled or completed but STATUS_SCANNING bit still set.

v1 -> v2: replace EIO to EAGAIN

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: minstrel_ht - reduce the overhead of rate sampling
Felix Fietkau [Thu, 21 Oct 2010 00:47:25 +0000 (02:47 +0200)]
mac80211: minstrel_ht - reduce the overhead of rate sampling

- reduce the number of retransmission attempts for sample rates
- sample lower rates less often
- do not use RTS/CTS for sampling frames
- increase the time between sampling attempts

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix potential spurious tx error bit interpretation
Felix Fietkau [Thu, 21 Oct 2010 00:47:23 +0000 (02:47 +0200)]
ath9k_hw: fix potential spurious tx error bit interpretation

According to documentation, AR_ExcessiveRetries, AR_Filtered and
AR_FIFOUnderrun are only valid if AR_FrmXmitOK is clear.

Not checking this might result in suboptimal FIFO settings, unnecessary
retransmissions, or other connectivity issues.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add a debug warning when we cannot stop RX
Luis R. Rodriguez [Wed, 20 Oct 2010 23:07:08 +0000 (16:07 -0700)]
ath9k: add a debug warning when we cannot stop RX

We have seen several DMA races when we race against
stopping and starting the PCU. I suspect that when
we cannot stop the PCU we may hit some of these same
races so warn against them for now but only when
debugging (CONFIG_ATH_DEBUG) is enabled.

If you run into this warning and are a developer,
please fix the cause of the warning. The potential
here, although I cannot prove yet, is that the DMA
engine can be confused and start writing to a buffer
that was already DMA'd before and at least the kernel
assumes is not being accessed by hardware anymore.

Cc: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: add a ATH_DBG_WARN()
Luis R. Rodriguez [Thu, 21 Oct 2010 19:10:11 +0000 (12:10 -0700)]
ath: add a ATH_DBG_WARN()

To be used to throw out warnings only for developers.
This can be used by some corner cases that developers
already know can be hit but developers want to address
so to avoid spewing out a warning this can only be
enabled with CONFIG_ATH_DEBUG enabled.

Cc: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: prefix REG_DBG_PRINT() with cfg80211
Luis R. Rodriguez [Wed, 20 Oct 2010 17:18:59 +0000 (10:18 -0700)]
cfg80211: prefix REG_DBG_PRINT() with cfg80211

Everyone's doing it, its the cool thing.

Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: add debug print when processing a channel
Luis R. Rodriguez [Thu, 21 Oct 2010 13:47:04 +0000 (19:17 +0530)]
cfg80211: add debug print when processing a channel

In the worst case you are seeing really odd things you want
more information than what is provided right now, for those
that insist and want debug info through CONFIG_CFG80211_REG_DEBUG
provide a print of when we are processing a channel and with what
regulatory rule.

Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: add debug print when disabling a channel on a custom regd
Luis R. Rodriguez [Wed, 20 Oct 2010 17:18:57 +0000 (10:18 -0700)]
cfg80211: add debug print when disabling a channel on a custom regd

Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: add debug prints for when we ignore regulatory hints
Luis R. Rodriguez [Thu, 21 Oct 2010 13:47:03 +0000 (19:17 +0530)]
cfg80211: add debug prints for when we ignore regulatory hints

This can help with debugging issues. You will only see
these with CONFIG_CFG80211_REG_DEBUG enabled.

Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: fix disabling channels based on hints
Luis R. Rodriguez [Wed, 20 Oct 2010 17:18:55 +0000 (10:18 -0700)]
cfg80211: fix disabling channels based on hints

After a module loads you will have loaded the world roaming regulatory
domain or a custom regulatory domain. Further regulatory hints are
welcomed and should be respected unless the regulatory hint is coming
from a country IE as the IEEE spec allows for a country IE to be a subset
of what is allowed by the local regulatory agencies.

So disable all channels that do not fit a regulatory domain sent
from a unless the hint is from a country IE and the country IE had
no information about the band we are currently processing.

This fixes a few regulatory issues, for example for drivers that depend
on CRDA and had no 5 GHz freqencies allowed were not properly disabling
5 GHz at all, furthermore it also allows users to restrict devices
further as was intended.

If you recieve a country IE upon association we will also disable the
channels that are not allowed if the country IE had at least one
channel on the respective band we are procesing.

This was the original intention behind this design but it was
completely overlooked...

Cc: David Quan <david.quan@atheros.com>
Cc: Jouni Malinen <jouni.malinen@atheros.com>
cc: Easwar Krishnan <easwar.krishnan@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: fix allowing country IEs for WIPHY_FLAG_STRICT_REGULATORY
Luis R. Rodriguez [Wed, 20 Oct 2010 17:18:54 +0000 (10:18 -0700)]
cfg80211: fix allowing country IEs for WIPHY_FLAG_STRICT_REGULATORY

We should be enabling country IE hints for WIPHY_FLAG_STRICT_REGULATORY
even if we haven't yet recieved regulatory domain hint for the driver
if it needed one. Without this Country IEs are not passed on to drivers
that have set WIPHY_FLAG_STRICT_REGULATORY, today this is just all
Atheros chipset drivers: ath5k, ath9k, ar9170, carl9170.

This was part of the original design, however it was completely
overlooked...

Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: pass the reg hint initiator to helpers
Luis R. Rodriguez [Wed, 20 Oct 2010 17:18:53 +0000 (10:18 -0700)]
cfg80211: pass the reg hint initiator to helpers

This is required later.

Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
Cc: stable@kernel.org
signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorfkill: remove dead code
Stephen Hemminger [Wed, 20 Oct 2010 17:16:58 +0000 (10:16 -0700)]
rfkill: remove dead code

The following code is defined but never used.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: Clear RETRY_TIMEOUT in PCI Configuration for normal devices
Larry Finger [Wed, 20 Oct 2010 14:59:33 +0000 (09:59 -0500)]
ssb: Clear RETRY_TIMEOUT in PCI Configuration for normal devices

MMIO log traces obtained using the Broadcom wl hybrid driver show that
the RETRY_TIMEOUT register (0x41) in PCI configuration space is cleared
if non-zero. Similar code found in other drivers such as ipw2100 show
this operation is needed to keep PCI Tx retries from interfering with
C3 CPU state. There are no known cases where omission of this code has
caused a problem, but this patch is offered just in case such a situation
occurs.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: make ath5k_update_bssid_mask_and_opmode() static
Luis R. Rodriguez [Wed, 20 Oct 2010 13:59:38 +0000 (06:59 -0700)]
ath5k: make ath5k_update_bssid_mask_and_opmode() static

This fixes this sparse warning:

  CHECK   drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/base.c:569:6: warning: symbol
'ath5k_update_bssid_mask_and_opmode' was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: make ath_hw_set_keycache_entry() static
Luis R. Rodriguez [Wed, 20 Oct 2010 13:59:37 +0000 (06:59 -0700)]
ath: make ath_hw_set_keycache_entry() static

This fixes this sparse warning:

  CHECK   drivers/net/wireless/ath/key.c
drivers/net/wireless/ath/key.c:110:6: warning: symbol
'ath_hw_set_keycache_entry' was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: make ath_hw_keysetmac() static
Luis R. Rodriguez [Wed, 20 Oct 2010 13:59:36 +0000 (06:59 -0700)]
ath: make ath_hw_keysetmac() static

This fixes this sparse warning:

  CHECK   drivers/net/wireless/ath/key.c
drivers/net/wireless/ath/key.c:70:6: warning: symbol 'ath_hw_keysetmac' was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: initialize per-channel tx power limits instead of hardcoding them
Felix Fietkau [Wed, 20 Oct 2010 00:09:46 +0000 (02:09 +0200)]
ath9k: initialize per-channel tx power limits instead of hardcoding them

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: extend ath9k_hw_set_txpowerlimit to test channel txpower
Felix Fietkau [Wed, 20 Oct 2010 01:08:53 +0000 (03:08 +0200)]
ath9k_hw: extend ath9k_hw_set_txpowerlimit to test channel txpower

ath9k_hw_set_txpowerlimit gets an extra boolean parameter that - if set -
causes the rate txpower table and the regulatory limit to be calculated
and stored, without changing hardware registers.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: initialize regulatory->max_power_level in set_txpower for AR9003
Felix Fietkau [Wed, 20 Oct 2010 00:09:44 +0000 (02:09 +0200)]
ath9k_hw: initialize regulatory->max_power_level in set_txpower for AR9003

The same is done for the older chip families as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonet: sh_eth: Move off of deprecated I/O routines.
Paul Mundt [Mon, 1 Nov 2010 09:29:24 +0000 (09:29 +0000)]
net: sh_eth: Move off of deprecated I/O routines.

sh_eth is the last in-tree user of the ctrl_xxx I/O routines. This simply
converts them over to regular MMIO accesors.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: consolidate 8021q tagging
John Fastabend [Sat, 30 Oct 2010 14:22:42 +0000 (14:22 +0000)]
net: consolidate 8021q tagging

Now that VLAN packets are tagged in dev_hard_start_xmit()
at the bottom of the stack we no longer need to tag them
in the 8021Q module (Except in the !VLAN_FLAG_REORDER_HDR
case).

This allows the accel path and non accel paths to be consolidated.
Here the vlan_tci in the skb is always set and we allow the
stack to add the actual tag in dev_hard_start_xmit().

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: remove check for headroom in vlan_dev_create
John Fastabend [Sat, 30 Oct 2010 14:22:37 +0000 (14:22 +0000)]
net: remove check for headroom in vlan_dev_create

It is possible for the headroom to be smaller then the
hard_header_len for a short period of time after toggling
the vlan offload setting.

This is not a hard error and skb_cow_head is called in
__vlan_put_tag() to resolve this.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years ago8021q: set hard_header_len when VLAN offload features are toggled
John Fastabend [Sat, 30 Oct 2010 14:22:32 +0000 (14:22 +0000)]
8021q: set hard_header_len when VLAN offload features are toggled

Toggling the vlan tx|rx hw offloads needs to set the hard_header_len
as well otherwise we end up using LL_RESERVED_SPACE incorrectly.
This results in pskb_expand_head() being used unnecessarily.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agooffloading: Force software GSO for multiple vlan tags.
Jesse Gross [Fri, 29 Oct 2010 12:14:55 +0000 (12:14 +0000)]
offloading: Force software GSO for multiple vlan tags.

We currently use vlan_features to check for TSO support if there is
a vlan tag.  However, it's quite likely that the NIC is not able to
do TSO when there is an arbitrary number of tags.  Therefore if there
is more than one tag (in-band or out-of-band), fall back to software
emulation.

Signed-off-by: Jesse Gross <jesse@nicira.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agooffloading: Support multiple vlan tags in GSO.
Jesse Gross [Fri, 29 Oct 2010 12:14:54 +0000 (12:14 +0000)]
offloading: Support multiple vlan tags in GSO.

We assume that hardware TSO can't support multiple levels of vlan tags
but we allow it to be done.  Therefore, enable GSO to parse these tags
so we can fallback to software.

Signed-off-by: Jesse Gross <jesse@nicira.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agooffloading: Make scatter/gather more tolerant of vlans.
Jesse Gross [Fri, 29 Oct 2010 12:14:53 +0000 (12:14 +0000)]
offloading: Make scatter/gather more tolerant of vlans.

When checking if it is necessary to linearize a packet, we currently
use vlan_features if the packet contains either an in-band or out-
of-band vlan tag.  However, in-band tags aren't special in any way
for scatter/gather since they are part of the packet buffer and are
simply more data to DMA.  Therefore, only use vlan_features for out-
of-band tags, which could potentially have some interaction with
scatter/gather.

Signed-off-by: Jesse Gross <jesse@nicira.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: Advertise NETIF_F_TSO_ECN.
Casey Leedom [Thu, 11 Nov 2010 09:30:43 +0000 (09:30 +0000)]
cxgb4vf: Advertise NETIF_F_TSO_ECN.

Advertise NETIF_F_TSO_ECN.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: fix up "Section Mismatch" compiler warning.
Casey Leedom [Thu, 11 Nov 2010 09:30:42 +0000 (09:30 +0000)]
cxgb4vf: fix up "Section Mismatch" compiler warning.

Fix up "Section Mismatch" compiler warning and mark another routine as
__devinit.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: add ethtool statistics for GRO.
Casey Leedom [Thu, 11 Nov 2010 09:30:41 +0000 (09:30 +0000)]
cxgb4vf: add ethtool statistics for GRO.

Add ethtool statistics for GRO.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: minor comment/symbolic name cleanup.
Casey Leedom [Thu, 11 Nov 2010 09:30:40 +0000 (09:30 +0000)]
cxgb4vf: minor comment/symbolic name cleanup.

Minor cleanup of comments and symbolic constant names for clarity.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Fix build with multicast disabled.
David S. Miller [Mon, 15 Nov 2010 16:52:02 +0000 (08:52 -0800)]
ipv4: Fix build with multicast disabled.

net/ipv4/igmp.c: In function 'ip_mc_inc_group':
net/ipv4/igmp.c:1228: error: implicit declaration of function 'for_each_pmc_rtnl'
net/ipv4/igmp.c:1228: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_unmap':
net/ipv4/igmp.c:1333: error: expected ';' before 'igmp_group_dropped'
 ...

Move for_each_pmc_rcu and for_each_pmc_rtnl macro definitions
outside of multicast ifdef protection.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodccp ccid-2: Separate option parsing from CCID processing
Gerrit Renker [Sun, 14 Nov 2010 16:26:13 +0000 (17:26 +0100)]
dccp ccid-2: Separate option parsing from CCID processing

This patch replaces an almost identical replication of code: large parts
of dccp_parse_options() re-appeared as ccid2_ackvector() in ccid2.c.

Apart from the duplication, this caused two more problems:
 1. CCIDs should not need to be concerned with parsing header options;
 2. one can not assume that Ack Vectors appear as a contiguous area within an
    skb, it is legal to insert other options and/or padding in between. The
    current code would throw an error and stop reading in such a case.

Since Ack Vectors provide CCID-specific information, they are now processed
by the CCID directly, separating this functionality from the main DCCP code.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
13 years agodccp ccid-2: Remove old infrastructure
Gerrit Renker [Sun, 14 Nov 2010 16:26:02 +0000 (17:26 +0100)]
dccp ccid-2: Remove old infrastructure

This removes
 * functions for which updates have been provided in the preceding patches and
 * the @av_vec_len field - it is no longer necessary since the buffer length is
   now always computed dynamically.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
13 years agodccp ccid-2: Schedule Sync as out-of-band mechanism
Gerrit Renker [Sun, 14 Nov 2010 16:25:46 +0000 (17:25 +0100)]
dccp ccid-2: Schedule Sync as out-of-band mechanism

The problem with Ack Vectors is that
  i) their length is variable and can in principle grow quite large,
 ii) it is hard to predict exactly how large they will be.

Due to the second point it seems not a good idea to reduce the MPS; in
particular when on average there is enough room for the Ack Vector and an
increase in length is momentarily due to some burst loss, after which the
Ack Vector returns to its normal/average length.

The solution taken by this patch is to subtract a minimum-expected Ack Vector
length from the MPS, and to defer any larger Ack Vectors onto a separate
Sync - but only if indeed there is no space left on the skb.

This patch provides the infrastructure to schedule Sync-packets for transporting
(urgent) out-of-band data. Its signalling is quicker than scheduling an Ack, since
it does not need to wait for new application data.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
13 years agodccp ccid-2: Consolidate Ack-Vector processing within main DCCP module
Gerrit Renker [Sun, 14 Nov 2010 16:25:36 +0000 (17:25 +0100)]
dccp ccid-2: Consolidate Ack-Vector processing within main DCCP module

This aggregates Ack Vector processing (handling input and clearing old state)
into one function, for the following reasons and benefits:
 * all Ack Vector-specific processing is now in one place;
 * duplicated code is removed;
 * ensuring sanity: from an Ack Vector point of view, it is better to clear the
                    old state first before entering new state;
 * Ack Event handling happens mostly within the CCIDs, not the main DCCP module.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
13 years agodccp ccid-2: Update code for the Ack Vector input/registration routine
Gerrit Renker [Sun, 14 Nov 2010 16:25:23 +0000 (17:25 +0100)]
dccp ccid-2: Update code for the Ack Vector input/registration routine

This patch updates the code which registers new packets as received, using the
new circular buffer interface. It contributes a new algorithm which
 * supports both tail/head pointers and buffer wrap-around and
 * deals with overflow (head/tail move in lock-step).

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
13 years agodccp ccid-2: Algorithm to update buffer state
Gerrit Renker [Sun, 14 Nov 2010 16:25:11 +0000 (17:25 +0100)]
dccp ccid-2: Algorithm to update buffer state

This provides a routine to consistently update the buffer state when the
peer acknowledges receipt of Ack Vectors; updating state in the list of Ack
Vectors as well as in the circular buffer.

While based on RFC 4340, several additional (and necessary) precautions were
added to protect the consistency of the buffer state. These additions are
essential, since analysis and experience showed that the basic algorithm was
insufficient for this task (which lead to problems that were hard to debug).

The algorithm now
 * deals with HC-sender acknowledging to HC-receiver and vice versa,
 * keeps track of the last unacknowledged but received seqno in tail_ackno,
 * has special cases to reset the overflow condition when appropriate,
 * is protected against receiving older information (would mess up buffer state).

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Sun, 14 Nov 2010 19:57:05 +0000 (11:57 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 13 Nov 2010 01:17:55 +0000 (17:17 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits)
  can-bcm: fix minor heap overflow
  gianfar: Do not call device_set_wakeup_enable() under a spinlock
  ipv6: Warn users if maximum number of routes is reached.
  docs: Add neigh/gc_thresh3 and route/max_size documentation.
  axnet_cs: fix resume problem for some Ax88790 chip
  ipv6: addrconf: don't remove address state on ifdown if the address is being kept
  tcp: Don't change unlocked socket state in tcp_v4_err().
  x25: Prevent crashing when parsing bad X.25 facilities
  cxgb4vf: add call to Firmware to reset VF State.
  cxgb4vf: Fail open if link_start() fails.
  cxgb4vf: flesh out PCI Device ID Table ...
  cxgb4vf: fix some errors in Gather List to skb conversion
  cxgb4vf: fix bug in Generic Receive Offload
  cxgb4vf: don't implement trivial (and incorrect) ndo_select_queue()
  ixgbe: Look inside vlan when determining offload protocol.
  bnx2x: Look inside vlan when determining checksum proto.
  vlan: Add function to retrieve EtherType from vlan packets.
  virtio-net: init link state correctly
  ucc_geth: Fix deadlock
  ucc_geth: Do not bring the whole IF down when TX failure.
  ...

13 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Sat, 13 Nov 2010 01:17:09 +0000 (17:17 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  drivers/ata/pata_octeon_cf.c: delete double assignment
  pata_legacy: fix CONFIG_PATA_WINBOND_VLB_MODULE test
  libata: fix NULL sdev dereference race in atapi_qc_complete()

13 years agoMerge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 13 Nov 2010 01:14:20 +0000 (17:14 -0800)]
Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (38 commits)
  Revert "staging: tidspbridge: replace iommu custom for opensource implementation"
  Revert "staging: tidspbridge - move shared memory iommu maps to tiomap3430.c"
  Revert "staging: tidspbridge - rename bridge_brd_mem_map/unmap to a proper name"
  Revert "staging: tidspbridge - remove custom mmu code from tiomap3430.c"
  Revert "staging: tidspbridge - fix mmufault support"
  Revert "staging: tidspbridge - remove hw directory"
  Revert "staging: tidspbridge - move all iommu related code to a new file"
  Revert "staging: tidspbridge: remove dw_dmmu_base from cfg_hostres struct"
  Revert "staging: tidspbridge - remove reserved memory clean up"
  Revert "staging: tidspbridge - deprecate reserve/unreserve_memory funtions"
  Revert "staging: tidspbridge - remove dmm custom module"
  Revert "staging: tidspbridge - update Kconfig to select IOMMU module"
  staging: tidspbridge: hardcode SCM macros while fix is upstreamed
  Staging: keucr driver: fix uninitialized variable & proper memset length
  omap: dsp: remove shm from normal memory
  Staging: wlan-ng: Fix wrong #ifdef #endif sequence
  Staging: Update parameters for cfg80211 key management operation
  Staging: ath6kl: Fix pointer casts on 64-bit architectures
  Staging: batman-adv: suppress false warning when changing the mac address
  Staging: batman-adv: fix interface alternating and bonding reggression
  ...

13 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 13 Nov 2010 01:13:28 +0000 (17:13 -0800)]
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (28 commits)
  Revert "USB: xhci: Use GFP_ATOMIC under spin_lock"
  USB: ohci-jz4740: Fix spelling in MODULE_ALIAS
  UWB: Return UWB_RSV_ALLOC_NOT_FOUND rather than crashing on NULL dereference if kzalloc fails
  usb: core: fix information leak to userland
  usb: misc: iowarrior: fix information leak to userland
  usb: misc: sisusbvga: fix information leak to userland
  usb: subtle increased memory usage in u_serial
  USB: option: fix when the driver is loaded incorrectly for some Huawei devices.
  USB: xhci: Use GFP_ATOMIC under spin_lock
  usb: gadget: goku_udc: add registered flag bit, fixing build
  USB: ehci/mxc: compile fix
  USB: Fix FSL USB driver on non Open Firmware systems
  USB: the development of the usb tree is now in git
  usb: musb: fail unaligned DMA transfers on v1.8 and above
  USB: ftdi_sio: add device IDs for Milkymist One JTAG/serial
  usb.h: fix ioctl kernel-doc info
  usb: musb: gadget: kill duplicate code in musb_gadget_queue()
  usb: musb: Fix handling of spurious SESSREQ
  usb: musb: fix kernel oops when loading musb_hdrc module for the 2nd time
  USB: musb: blackfin: push clkin value to platform resources
  ...

13 years agoMerge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 13 Nov 2010 00:02:30 +0000 (16:02 -0800)]
Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6

* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  n_gsm: Fix length handling
  n_gsm: Copy n2 over when configuring via ioctl interface
  serial: bfin_5xx: grab port lock before making port termios changes
  serial: bfin_5xx: disable CON_PRINTBUFFER for consoles
  serial: bfin_5xx: remove redundant SSYNC to improve TX speed
  serial: bfin_5xx: always include DMA headers
  vcs: make proper usage of the poll flags
  amiserial: Remove unused variable icount
  8250: Fix tcsetattr to avoid ioctl(TIOCMIWAIT) hang
  tty_ldisc: Fix BUG() on hangup
  TTY: restore tty_ldisc_wait_idle
  SERIAL: blacklist si3052 chip
  drivers/serial/bfin_5xx.c: Fix line continuation defects
  tty: prevent DOS in the flush_to_ldisc
  8250: add support for Kouwell KW-L221N-2
  nozomi: Fix warning from the previous TIOCGCOUNT changes
  tty: fix warning in synclink driver
  tty: Fix formatting in tty.h
  tty: the development tree is now done in git

13 years agoMerge branch 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
Linus Torvalds [Sat, 13 Nov 2010 00:01:55 +0000 (16:01 -0800)]
Merge branch 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen

* 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen: do not release any memory under 1M in domain 0
  xen: events: do not unmask event channels on resume
  xen: correct size of level2_kernel_pgt

13 years agoMerge branch 'stable/xen-pcifront-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 12 Nov 2010 23:54:39 +0000 (15:54 -0800)]
Merge branch 'stable/xen-pcifront-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

* 'stable/xen-pcifront-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  MAINTAINERS: Mark XEN lists as moderated
  xen-pcifront: fix PCI reference leak
  xen-pcifront: Remove duplicate inclusion of headers.
  xen: fix memory leak in Xen PCI MSI/MSI-X allocator.
  MAINTAINERS: Update mailing list name for Xen pieces.

13 years agodrivers/ata/pata_octeon_cf.c: delete double assignment
Julia Lawall [Tue, 26 Oct 2010 10:25:43 +0000 (12:25 +0200)]
drivers/ata/pata_octeon_cf.c: delete double assignment

Delete successive assignments to the same location.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression i;
@@

*i = ...;
 i = ...;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
13 years agopata_legacy: fix CONFIG_PATA_WINBOND_VLB_MODULE test
Tejun Heo [Fri, 12 Nov 2010 11:01:41 +0000 (12:01 +0100)]
pata_legacy: fix CONFIG_PATA_WINBOND_VLB_MODULE test

pata_legacy is incorrectly testing PATA_WINBOND_VLB_MODULE instead of
CONFIG_PATA_WINBOND_VLB_MODULE.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
13 years agolibata: fix NULL sdev dereference race in atapi_qc_complete()
Tejun Heo [Mon, 1 Nov 2010 10:39:19 +0000 (11:39 +0100)]
libata: fix NULL sdev dereference race in atapi_qc_complete()

SCSI commands may be issued between __scsi_add_device() and dev->sdev
assignment, so it's unsafe for ata_qc_complete() to dereference
dev->sdev->locked without checking whether it's NULL or not.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
13 years agocan-bcm: fix minor heap overflow
Oliver Hartkopp [Wed, 10 Nov 2010 12:10:30 +0000 (12:10 +0000)]
can-bcm: fix minor heap overflow

On 64-bit platforms the ASCII representation of a pointer may be up to 17
bytes long. This patch increases the length of the buffer accordingly.

http://marc.info/?l=linux-netdev&m=128872251418192&w=2

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agogianfar: Do not call device_set_wakeup_enable() under a spinlock
Rafael J. Wysocki [Tue, 9 Nov 2010 11:54:19 +0000 (11:54 +0000)]
gianfar: Do not call device_set_wakeup_enable() under a spinlock

The gianfar driver calls device_set_wakeup_enable() under a spinlock,
which causes a problem to happen after the recent core power
management changes, because this function can sleep now.  Fix this
by moving the device_set_wakeup_enable() call out of the
spinlock-protected area.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Warn users if maximum number of routes is reached.
Ben Greear [Mon, 8 Nov 2010 12:33:48 +0000 (12:33 +0000)]
ipv6: Warn users if maximum number of routes is reached.

This gives users at least some clue as to what the problem
might be and how to go about fixing it.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodocs: Add neigh/gc_thresh3 and route/max_size documentation.
Ben Greear [Mon, 8 Nov 2010 09:13:48 +0000 (09:13 +0000)]
docs: Add neigh/gc_thresh3 and route/max_size documentation.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaxnet_cs: fix resume problem for some Ax88790 chip
Ken Kawasaki [Sat, 6 Nov 2010 05:11:24 +0000 (05:11 +0000)]
axnet_cs: fix resume problem for some Ax88790 chip

axnet_cs:
    Some Ax88790 chip need to reinitialize the CISREG_CCSR register
    after resume.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: addrconf: don't remove address state on ifdown if the address is being kept
Lorenzo Colitti [Wed, 27 Oct 2010 18:16:49 +0000 (18:16 +0000)]
ipv6: addrconf: don't remove address state on ifdown if the address is being kept

Currently, addrconf_ifdown does not delete statically configured IPv6
addresses when the interface is brought down. The intent is that when
the interface comes back up the address will be usable again. However,
this doesn't actually work, because the system stops listening on the
corresponding solicited-node multicast address, so the address cannot
respond to neighbor solicitations and thus receive traffic. Also, the
code notifies the rest of the system that the address is being deleted
(e.g, RTM_DELADDR), even though it is not. Fix it so that none of this
state is updated if the address is being kept on the interface.

Tested: Added a statically configured IPv6 address to an interface,
started ping, brought link down, brought link up again. When link came
up ping kept on going and "ip -6 maddr" showed that the host was still
subscribed to there

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>