pandora-kernel.git
12 years agolibertas_usb: program OLPC EC wakeup mask for wake-on-WLAN
Daniel Drake [Wed, 27 Jul 2011 16:19:00 +0000 (17:19 +0100)]
libertas_usb: program OLPC EC wakeup mask for wake-on-WLAN

OLPC power management code has recently gone upstream. This piece
completes the puzzle for libertas_usb, which now programs the OLPC EC
for wlan wakeups when they have been requested.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: do not limit initial tx power to 20 dbm
Felix Fietkau [Wed, 27 Jul 2011 13:01:05 +0000 (15:01 +0200)]
ath9k_hw: do not limit initial tx power to 20 dbm

When testing for tx power, bypass the default limits.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix calculated runtime tx power limit
Felix Fietkau [Wed, 27 Jul 2011 13:01:04 +0000 (15:01 +0200)]
ath9k_hw: fix calculated runtime tx power limit

Use the previously calculated maximum of all rates instead of just the one
from the lowest rate of the selected PHY mode.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove the tx power index offset
Felix Fietkau [Wed, 27 Jul 2011 13:01:03 +0000 (15:01 +0200)]
ath9k_hw: remove the tx power index offset

It is always 0

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: remove last references to "softc"
Pavel Roskin [Wed, 27 Jul 2011 02:27:05 +0000 (22:27 -0400)]
ath5k: remove last references to "softc"

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: clean up base.h and its use
Pavel Roskin [Wed, 27 Jul 2011 02:26:59 +0000 (22:26 -0400)]
ath5k: clean up base.h and its use

Remove unnecessary includes from base.h.  Add includes to other files as
necessary.  Don't include base.h unless needed.

Move declarations for functions in base.c from ath5k.h to base.h.

Use a better named define to protect base.h against double inclusion.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: fix spelling of Grenada
Pavel Roskin [Wed, 27 Jul 2011 02:26:52 +0000 (22:26 -0400)]
ath: fix spelling of Grenada

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoorinoco_cs: be more careful when matching cards with ID 0x0156:0x0002
Pavel Roskin [Tue, 26 Jul 2011 22:52:48 +0000 (18:52 -0400)]
orinoco_cs: be more careful when matching cards with ID 0x0156:0x0002

Without CONFIG_HERMES_PRISM, only match cards that have "Version 01.01"
as the third product ID.  Those have Agere firmware.

With CONFIG_HERMES_PRISM, match all 0x0156:0x0002 cards.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agohostap_cs: support cards with "Version 01.02" as third product ID
Pavel Roskin [Tue, 26 Jul 2011 22:52:41 +0000 (18:52 -0400)]
hostap_cs: support cards with "Version 01.02" as third product ID

Cards with numeric ID 0x0156:0x0002 and third ID "Version 01.02" can be
assumed to have Intersil firmware.  Cards with Agere firmware use
"Version 01.01".

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agopcmcia: add PCMCIA_DEVICE_MANF_CARD_PROD_ID3
Pavel Roskin [Tue, 26 Jul 2011 22:52:35 +0000 (18:52 -0400)]
pcmcia: add PCMCIA_DEVICE_MANF_CARD_PROD_ID3

This is needed to match wireless cards with Intersil firmware that have
ID 0x0156:0x0002 and the third ID "Version 01.02".  Such cards are
currently matched by orinoco_cs, which doesn't support WPA.  They should
be matched by hostap_cs.

The first and the second product ID vary widely, so there are few users
with some particular IDs.  Of those, very few can submit a patch for
hostap_cs or write a useful bugreport.  It's still important to support
their hardware properly.

With PCMCIA_DEVICE_MANF_CARD_PROD_ID3, it should be possible to cover
the remaining Intersil based designs that kept the numeric ID and the
"version" of the reference design.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43legacy: report core number
Pavel Roskin [Tue, 26 Jul 2011 15:36:48 +0000 (11:36 -0400)]
b43legacy: report core number

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Don't use a buf_size=0 in ADDBA requests
Helmut Schaa [Fri, 5 Aug 2011 09:46:19 +0000 (11:46 +0200)]
mac80211: Don't use a buf_size=0 in ADDBA requests

According to 802.11-2007, 7.3.1.14 it is compliant to use a buf_size of
0 in ADDBA requests. But some devices (AVM Fritz Stick N) arn't able to
handle that correctly and will reply with an ADDBA reponse with a
buf_size of 0 which in turn will disallow BA sessions for these
devices.

To work around this problem, initialize hw.max_tx_aggregation_subframes
to the maximum AMPDU buffer size 0x40.

Using 0 as default for the bufsize was introduced in commit
5dd36bc933e8be84f8369ac64505a2938f9ce036 (mac80211: allow advertising
correct maximum aggregate size).

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Stop TX BA session if buf_size is zero
Helmut Schaa [Tue, 26 Jul 2011 10:18:27 +0000 (12:18 +0200)]
mac80211: Stop TX BA session if buf_size is zero

If we receive an ADDBA response with status code 0 and a buf_size of 0
we should stop the TX BA session as otherwise we'll end up queuing
frames in ieee80211_tx_prep_agg forever instead of sending them out as
non AMPDUs.

This fixes a problem with AVM Fritz Stick N wireless devices where
frames to this device are not transmitted anymore by mac80211.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43legacy: remove 64-bit DMA support
Pavel Roskin [Mon, 25 Jul 2011 21:40:22 +0000 (17:40 -0400)]
b43legacy: remove 64-bit DMA support

Devices supported by b43legacy don't support 64-bit DMA.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: support v2 of enhanced sensitivity table
Wey-Yi Guy [Sat, 23 Jul 2011 17:24:50 +0000 (10:24 -0700)]
iwlagn: support v2 of enhanced sensitivity table

Add support for v2 of enhanced sensitivity table for 2000 series products

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: change default sensitivity value for 5000 and 6000 series
Wey-Yi Guy [Sat, 23 Jul 2011 17:24:49 +0000 (10:24 -0700)]
iwlagn: change default sensitivity value for 5000 and 6000 series

Update the default sensitivity value for both 5000 and 6000 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove offchannel_tx API
Johannes Berg [Sat, 23 Jul 2011 17:24:48 +0000 (10:24 -0700)]
mac80211: remove offchannel_tx API

For iwlwifi, I decided not to use this API since
it just increased the complexity for little gain.
Since nobody else intends to use it, let's kill
it again. If anybody later needs to have it, we
can always revive it then.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: support new P2P implementation
Johannes Berg [Sat, 23 Jul 2011 17:24:47 +0000 (10:24 -0700)]
iwlagn: support new P2P implementation

The previous P2P implementation turned out to
not work well and new uCode capabilities were
added to support P2P. Modify the driver to
take advantage of those, and also discover P2P
support automatically based on a uCode flag
instead of having a Kconfig symbol for P2P.

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>
12 years agoiwlagn: move context init after firmware loading
Johannes Berg [Sat, 23 Jul 2011 17:24:46 +0000 (10:24 -0700)]
iwlagn: move context init after firmware loading

The availability of contexts depends on the
firmware capabilities. Currently only the
presence of the second context depends on it,
but soon P2P support will also be different.
Move the context initialisation code to the
firmware-dependent setup before registering
with mac80211 to make it easier to handle.

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>
12 years agoiwlagn: bump firmware API for some devices
Johannes Berg [Sat, 23 Jul 2011 17:24:45 +0000 (10:24 -0700)]
iwlagn: bump firmware API for some devices

We're working on improvements for the firmware
for some devices, and need to bump the API for
those since they won't be backward compatible
completely (the earlier patch reserving queue
10 for P2P).

Bump the API version to 6 for those devices
but don't warn users of version 5 yet.

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>
12 years agoiwlagn: separate firmware version warning
Johannes Berg [Sat, 23 Jul 2011 17:24:44 +0000 (10:24 -0700)]
iwlagn: separate firmware version warning

We sometimes need to support new firmware API for
a while before we can publish them since testing
them fully takes a long time. We could keep all
the new code private, but that causes plenty of
problems and sometimes we can give a pre-release
version of firmware to people who need to test.
However, when we just bump the API version, the
driver will warn everybody that their firmware is
outdated, when in fact it isn't. (Currently our
case for this doesn't really change the API but
bumping the API version is necessary because the
firmware isn't fully backward compatible)

In order to handle this in the future, add a new
"api_ok" version; only below this will the driver
warn that the uCode is too old.

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>
12 years agoiwlagn: Remove ht40 support from 5.2GHz for _bgn devices
Wey-Yi Guy [Sat, 23 Jul 2011 17:24:42 +0000 (10:24 -0700)]
iwlagn: Remove ht40 support from 5.2GHz for _bgn devices

For _bgn device, remove ht40 support for 5.2GHz, it is probably ok since
the "band" is not support but just feel strange.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: default smps mode for 1000 series device
Wey-Yi Guy [Sat, 23 Jul 2011 17:24:41 +0000 (10:24 -0700)]
iwlagn: default smps mode for 1000 series device

1000 series are 1x2 devices, the old default using static smps which only
use single antenna for rx, set the default to dynamic smps.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: reserve queue 10 for TX during scan dwell
Johannes Berg [Sat, 23 Jul 2011 17:24:40 +0000 (10:24 -0700)]
iwlagn: reserve queue 10 for TX during scan dwell

New uCode images will use queue 10 for TX
during scan (for P2P offchannel operation
scan). We'll bump the API version of those,
but before we need to reserve queue 10 and
stop using it for aggregation.

To simplify the code, always reserve it,
we could continue using it on older uCode
images but that'd be rather complicated.
Also, we'll set it up to map to the right
FIFO as needed later, but as we don't use
the queue now that doesn't hurt.

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>
12 years agoath5k: eliminate CHANNEL_* macros, use AR5K_MODE_* in channel->hw_value
Pavel Roskin [Sat, 23 Jul 2011 13:29:09 +0000 (09:29 -0400)]
ath5k: eliminate CHANNEL_* macros, use AR5K_MODE_* in channel->hw_value

When checking for the band, use channel->band.

Change ath5k_hw_nic_wakeup() and ath5k_channel_ok() to take
ieee80211_channel.  Change ath5k_hw_radio_revision() to take
ieee80211_band.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: remove most references to XR
Pavel Roskin [Sat, 23 Jul 2011 13:29:03 +0000 (09:29 -0400)]
ath5k: remove most references to XR

XR is a proprietary feature of the chipset.  It's not supported and
should not be supported.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: remove unused and write-only structures and fields
Pavel Roskin [Sat, 23 Jul 2011 13:28:56 +0000 (09:28 -0400)]
ath5k: remove unused and write-only structures and fields

struct ath5k_avg_val is unused.

In struct ath5k_hw, lladdr, ah_radar and ah_mac_revision are write-only,
rxbufsize is unused, ah_phy is write-only and referenced by unused
macros.

In struct ath5k_vif, lladdr is write-only.

Remove AR5K_TUNE_RADAR_ALERT, which has no effect.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove all references to subsysid, it's never used
Pavel Roskin [Sat, 23 Jul 2011 07:55:39 +0000 (03:55 -0400)]
ath9k: remove all references to subsysid, it's never used

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcm47xx: fix irq assignment for new SoCs.
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:15 +0000 (01:20 +0200)]
bcm47xx: fix irq assignment for new SoCs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcm47xx: add support for bcma bus
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:14 +0000 (01:20 +0200)]
bcm47xx: add support for bcma bus

This patch add support for the bcma bus. Broadcom uses only Mips 74K
CPUs on the new SoC and on the old ons using ssb bus there are no Mips
74K CPUs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcm47xx: make it possible to build bcm47xx without ssb.
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:13 +0000 (01:20 +0200)]
bcm47xx: make it possible to build bcm47xx without ssb.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcm47xx: prepare to support different buses
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:12 +0000 (01:20 +0200)]
bcm47xx: prepare to support different buses

Prepare bcm47xx to support different System buses. Before adding
support for bcma it should be possible to build bcm47xx without the
need of ssb. With this patch bcm47xx does not directly contain a
ssb_bus, but a union contain all the supported system buses. As a SoC
just uses one system bus a union is a good choice.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: get CPU clock
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:11 +0000 (01:20 +0200)]
bcma: get CPU clock

Add method to return the clock of the CPU. This is needed by the arch
code to calculate the mips_hpt_frequency.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add serial console support
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:10 +0000 (01:20 +0200)]
bcma: add serial console support

This adds support for serial console to bcma, when operating on an SoC.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add mips driver
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:09 +0000 (01:20 +0200)]
bcma: add mips driver

This adds a mips driver to bcma. This is only found on embedded
devices. For now the driver just initializes the irqs used on this
system.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add SOC bus
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:08 +0000 (01:20 +0200)]
bcma: add SOC bus

This patch adds support for using bcma on a Broadcom SoC as the system
bus. An SoC like the bcm4716 could register this bus and use it to
searches for the bcma cores and register the devices on this bus.

BCMA_HOSTTYPE_NONE was intended for SoCs at first but BCMA_HOSTTYPE_SOC
is a better name.

Acked-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add functions to scan cores needed on SoCs
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:07 +0000 (01:20 +0200)]
bcma: add functions to scan cores needed on SoCs

The chip common and mips core have to be setup early in the boot
process to get the cpu clock.
bcma_bus_early_register() gets pointers to some space to store the core
data and searches for the chip common and mips core and initializes
chip common. After that was done and the kernel is out of early boot we
just have to run bcma_bus_register() and it will search for the other
cores, initialize and register them.
The cores are getting the same numbers as before.

Acked-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: move initializing of struct bcma_bus to own function.
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:06 +0000 (01:20 +0200)]
bcma: move initializing of struct bcma_bus to own function.

This makes it possible to use this code in some other method.

Acked-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: move parsing of EEPROM into own function.
Hauke Mehrtens [Fri, 22 Jul 2011 23:20:05 +0000 (01:20 +0200)]
bcma: move parsing of EEPROM into own function.

Move the parsing of the EEPROM data in scan function for one core into
an own function. Now we are able to use it in some other scan function
as well.

Acked-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: use pci_dev->subsystem_device
Sergei Shtylyov [Fri, 22 Jul 2011 15:58:23 +0000 (19:58 +0400)]
ath9k: use pci_dev->subsystem_device

The driver reads PCI subsystem ID from the PCI configuration register while it's
already stored by the PCI subsystem in the 'subsystem_device' field of 'struct
pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove redundant variable scan_table_idx
Bing Zhao [Fri, 22 Jul 2011 03:25:58 +0000 (20:25 -0700)]
mwifiex: remove redundant variable scan_table_idx

mwifiex_get_bss_info() routine updates variable 'info->scan_table_idx'
but it is never used.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas_usb: use USB interface as parent device
Daniel Drake [Thu, 21 Jul 2011 19:43:44 +0000 (20:43 +0100)]
libertas_usb: use USB interface as parent device

Currently, "udevadm info -a -p /sys/class/net/wlan0" doesn't mention
the usb8xxx or libertas driver anywhere. This makes writing udev rules
a bit uncomfortable.

Using the USB interface as the parent device corrects the hierarchy.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: link mesh device to wiphy
Daniel Drake [Thu, 21 Jul 2011 19:43:17 +0000 (20:43 +0100)]
libertas: link mesh device to wiphy

The mesh device is now exposed as an interface of the wiphy.
This exposes the mesh device to the cfg80211 interface, allowing
mesh channel selection to be reimplemented, and available to
NetworkManager as it was before.

Some header tweaking was needed in order to implement lbs_mesh_activated().

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: remove unused wext handler exports
Johannes Berg [Fri, 15 Jul 2011 11:01:38 +0000 (13:01 +0200)]
cfg80211: remove unused wext handler exports

A lot of code is dedicated to giving drivers the
ability to use cfg80211's wext handlers without
completely converting. However, only orinoco is
currently using this, and it is only partially
using it.

We reduce the size of both the source and binary
by removing those that nobody needs. If a driver
shows up that needs it during conversion, we can
add back those that are needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove wireless.h inclusion and fix resulting bugs
Bing Zhao [Thu, 14 Jul 2011 01:38:34 +0000 (18:38 -0700)]
mwifiex: remove wireless.h inclusion and fix resulting bugs

replace IW_MAX_AP & IW_CUSTOM_MAX with local definitions
and remove usage of struct iw_statistics.

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove linux/wireless.h inclusion
Johannes Berg [Wed, 13 Jul 2011 08:39:19 +0000 (10:39 +0200)]
mac80211: remove linux/wireless.h inclusion

linux/wireless.h is for wireless extensions only, so
mac80211 shouldn't include it since it uses cfg80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: add wext include
Johannes Berg [Wed, 13 Jul 2011 08:39:18 +0000 (10:39 +0200)]
mwifiex: add wext include

In trying to remove the wext includes from mac80211
and cfg80211 I found that mwifiex currently uses
them. This is wrong, it shouldn't, but to not break
it completely include wext there.

Please remove this and fix all the resulting bugs.

Cc: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowl1251: remove wext dependencies
Johannes Berg [Wed, 13 Jul 2011 08:39:17 +0000 (10:39 +0200)]
wl1251: remove wext dependencies

This driver uses IW_ESSID_MAX_SIZE when it should
be using IEEE80211_MAX_SSID_LEN instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowl12xx: remove wext dependencies
Johannes Berg [Wed, 13 Jul 2011 08:39:16 +0000 (10:39 +0200)]
wl12xx: remove wext dependencies

This driver uses IW_ESSID_MAX_SIZE when it should
be using IEEE80211_MAX_SSID_LEN instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: remove wireless extensions inclusions
Johannes Berg [Wed, 13 Jul 2011 08:39:15 +0000 (10:39 +0200)]
rndis_wlan: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43legacy: remove wireless extensions inclusions
Johannes Berg [Wed, 13 Jul 2011 08:39:14 +0000 (10:39 +0200)]
b43legacy: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: remove wireless extensions inclusions
Johannes Berg [Wed, 13 Jul 2011 08:39:13 +0000 (10:39 +0200)]
b43: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: remove wireless extensions inclusions
Johannes Berg [Wed, 13 Jul 2011 08:39:12 +0000 (10:39 +0200)]
ath5k: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove wireless extensions inclusions
Johannes Berg [Wed, 13 Jul 2011 08:39:11 +0000 (10:39 +0200)]
iwlegacy: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove wireless extensions inclusions
Johannes Berg [Wed, 13 Jul 2011 08:39:10 +0000 (10:39 +0200)]
iwlagn: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: split wext compatibility to separate header
Johannes Berg [Wed, 13 Jul 2011 08:39:09 +0000 (10:39 +0200)]
cfg80211: split wext compatibility to separate header

A lot of drivers erroneously use wext constants
and don't notice since cfg80211.h includes them.
Make this more split up so drivers needing wext
compatibility from cfg80211 need to explicitly
include that from cfg80211-wext.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for...
John W. Linville [Wed, 3 Aug 2011 13:18:21 +0000 (09:18 -0400)]
Merge git://git./linux/kernel/git/linville/wireless-next into for-davem

12 years agoiwlagn: 5000 do not support idle mode
Wey-Yi Guy [Tue, 2 Aug 2011 16:08:37 +0000 (09:08 -0700)]
iwlagn: 5000 do not support idle mode

5000 series has issue supporting power save idle mode:

commit 9dc2153315650eae220898668b6aa56a25c130be

iwlwifi: always support idle mode for agn devices

For agn devices, always support idle mode which help power
consumption in idle unassociated state.

the above changes cause 5000 become not stable when power management is "on"

http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2312

Cc: stable@kernel.org #2.6.39, #3.0.0
Reported-by: Devin J Pohly <djpohly+iwl@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: fix usage of NULL queue
Stanislaw Gruszka [Tue, 2 Aug 2011 11:29:02 +0000 (13:29 +0200)]
rt2x00: fix usage of NULL queue

We may call rt2x00queue_pause_queue(queue) with queue == NULL. Bug
was introduced by commit 62fe778412b36791b7897cfa139342906fbbf07b
"rt2x00: Fix stuck queue in tx failure case" .

Cc: stable@kernel.org # 3.0+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Fix compilation without CONFIG_RT2X00_LIB_CRYPTO
Helmut Schaa [Tue, 2 Aug 2011 09:43:14 +0000 (11:43 +0200)]
rt2x00: Fix compilation without CONFIG_RT2X00_LIB_CRYPTO

This was introduced by commit
77b5621bac4a56b83b9081f48d4e7d1accdde400 (rt2x00: Don't use queue entry
as parameter when creating TX descriptor.)

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: sysfs couldn't find the priv pointer
Emmanuel Grumbach [Mon, 1 Aug 2011 19:46:57 +0000 (12:46 -0700)]
iwlagn: sysfs couldn't find the priv pointer

This bug has been introduced by:
d593411084a56124aa9d80aafa15db8463b2d8f7
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Mon Jul 11 10:48:51 2011 +0300

    iwlagn: simplify the bus architecture

Revert part of the buggy patch: dev_get_drvdata will now return
iwl_priv as it did before the patch.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Tested-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: rt2800: fix zeroing skb structure
Stanislaw Gruszka [Sat, 30 Jul 2011 11:32:56 +0000 (13:32 +0200)]
rt2x00: rt2800: fix zeroing skb structure

We should clear skb->data not skb itself. Bug was introduced by:
commit 0b8004aa12d13ec750d102ba4082a95f0107c649 "rt2x00: Properly
reserve room for descriptors in skbs".

Cc: stable@kernel.org # 2.6.36+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Fix kernel oops on ARM SOC
Larry Finger [Fri, 29 Jul 2011 15:53:12 +0000 (10:53 -0500)]
rtlwifi: Fix kernel oops on ARM SOC

This driver uses information from the self member of the pci_bus struct to
get information regarding the bridge to which the PCIe device is attached.
Unfortunately, this member is not established on all architectures, which
leads to a kernel oops.

Skipping the entire block that uses the self member to determine the bridge
vendor will only affect RTL8192DE devices as that driver sets the ASPM support
flag differently when the bridge vendor is Intel. If the self member is
available, there is no functional change.

This patch fixes Bugzilla No. 40212.

Reported-by: Hubert Liao <liao.hubertt@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org> [back to 2.6.38]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: skip ->config_pci_powersave() if PCIe port has ASPM disabled
Stanislaw Gruszka [Fri, 29 Jul 2011 13:59:08 +0000 (15:59 +0200)]
ath9k: skip ->config_pci_powersave() if PCIe port has ASPM disabled

We receive many bug reports about system hang during suspend/resume
when ath9k driver is in use. Adrian Chadd remarked that this problem
happens on systems that have ASPM disabled.

To do not hit the bug, skip doing ->config_pci_powersave magic if PCIe
downstream port device, which ath9k device is connected to, has ASPM
disabled.

Bug was introduced by:

commit 53bc7aa08b48e5cd745f986731cc7dc24eef2a9f
Author: Vivek Natarajan <vnatarajan@atheros.com>
Date:   Mon Apr 5 14:48:04 2010 +0530

    ath9k: Add support for newer AR9285 chipsets.

Patch should address:
https://bugzilla.kernel.org/show_bug.cgi?id=37462
https://bugzilla.kernel.org/show_bug.cgi?id=37082
https://bugzilla.redhat.com/show_bug.cgi?id=697157

however I did not receive confirmation about that, except from Camilo
Mesias, whose system stops hang regularly with this patch (but still
hangs from time to time, but this is probably some other bug).

Tested-by: Camilo Mesias <camilo@mesias.co.uk>
Cc: stable@kernel.org # 2.6.35+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: off by one in nl80211_trigger_scan()
Dan Carpenter [Fri, 29 Jul 2011 08:52:18 +0000 (11:52 +0300)]
cfg80211: off by one in nl80211_trigger_scan()

The test is off by one so we'd read past the end of the
wiphy->bands[] array on the next line.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: set tx power after rxon_assoc
Stanislaw Gruszka [Wed, 27 Jul 2011 13:37:43 +0000 (15:37 +0200)]
iwlegacy: set tx power after rxon_assoc

If settings of tx power was deferred during scan or changing channel we
have to setup them during commit rxon. Fix problem on 3945 (4965 already
has this fix).

Optimize code to apply tx settings only when tx power was actually
changed.

Cc: stable@kernel.org # 2.6.39+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: initialize tx chainmask before testing channel tx power values
Felix Fietkau [Wed, 27 Jul 2011 13:01:02 +0000 (15:01 +0200)]
ath9k: initialize tx chainmask before testing channel tx power values

With an uninitialized chainmask, the per-channel power will only contain
the power limits for a single chain instead of the combined tx power.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 28 Jul 2011 12:58:19 +0000 (05:58 -0700)]
Merge git://git./linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (32 commits)
  tg3: Remove 5719 jumbo frames and TSO blocks
  tg3: Break larger frags into 4k chunks for 5719
  tg3: Add tx BD budgeting code
  tg3: Consolidate code that calls tg3_tx_set_bd()
  tg3: Add partial fragment unmapping code
  tg3: Generalize tg3_skb_error_unmap()
  tg3: Remove short DMA check for 1st fragment
  tg3: Simplify tx bd assignments
  tg3: Reintroduce tg3_tx_ring_info
  ASIX: Use only 11 bits of header for data size
  ASIX: Simplify condition in rx_fixup()
  Fix cdc-phonet build
  bonding: reduce noise during init
  bonding: fix string comparison errors
  net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
  net: add IFF_SKB_TX_SHARED flag to priv_flags
  net: sock_sendmsg_nosec() is static
  forcedeth: fix vlans
  gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e
  gro: Only reset frag0 when skb can be pulled
  ...

12 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Thu, 28 Jul 2011 12:50:27 +0000 (05:50 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md: (75 commits)
  md/raid10: handle further errors during fix_read_error better.
  md/raid10: Handle read errors during recovery better.
  md/raid10: simplify read error handling during recovery.
  md/raid10: record bad blocks due to write errors during resync/recovery.
  md/raid10:  attempt to fix read errors during resync/check
  md/raid10:  Handle write errors by updating badblock log.
  md/raid10: clear bad-block record when write succeeds.
  md/raid10: avoid writing to known bad blocks on known bad drives.
  md/raid10 record bad blocks as needed during recovery.
  md/raid10: avoid reading known bad blocks during resync/recovery.
  md/raid10 - avoid reading from known bad blocks - part 3
  md/raid10: avoid reading from known bad blocks - part 2
  md/raid10: avoid reading from known bad blocks - part 1
  md/raid10: Split handle_read_error out from raid10d.
  md/raid10: simplify/reindent some loops.
  md/raid5: Clear bad blocks on successful write.
  md/raid5.  Don't write to known bad block on doubtful devices.
  md/raid5: write errors should be recorded as bad blocks if possible.
  md/raid5: use bad-block log to improve handling of uncorrectable read errors.
  md/raid5: avoid reading from known bad blocks.
  ...

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Thu, 28 Jul 2011 12:49:31 +0000 (05:49 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: oss: rename local change_bits to avoid powerpc bitsops.h definition
  ALSA: hda - Fix duplicated DAC assignments for Realtek
  ALSA: asihpi - off by one in asihpi_hpi_ioctl()
  ALSA: hda - Fix Oops with Realtek quirks with NULL adc_nids
  ALSA: asihpi - bug fix pa use before init.
  ALSA: hda - Add support for vref-out based mute LED control on IDT codecs

12 years agotg3: Remove 5719 jumbo frames and TSO blocks
Matt Carlson [Wed, 27 Jul 2011 14:20:54 +0000 (14:20 +0000)]
tg3: Remove 5719 jumbo frames and TSO blocks

The A0 revision of this chip is the only device that requires these
features to be disabled.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Break larger frags into 4k chunks for 5719
Matt Carlson [Wed, 27 Jul 2011 14:20:53 +0000 (14:20 +0000)]
tg3: Break larger frags into 4k chunks for 5719

The 5719 has bug where RDMAs larger than 4k can cause problems.  This
patch works around the problem by dividing larger DMA requests into
something the hardware can handle.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Add tx BD budgeting code
Matt Carlson [Wed, 27 Jul 2011 14:20:52 +0000 (14:20 +0000)]
tg3: Add tx BD budgeting code

As the driver breaks large skb fragments into smaller submissions to the
hardware, there is a new danger that BDs might get exhausted before all
fragments have been mapped.  This patch adds code to make sure tx BDs
aren't oversubscribed and flag the condition if it happens.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Consolidate code that calls tg3_tx_set_bd()
Matt Carlson [Wed, 27 Jul 2011 14:20:51 +0000 (14:20 +0000)]
tg3: Consolidate code that calls tg3_tx_set_bd()

This patch consolidates all code that populates tx BDs into a single
routine.  Setting tx BDs needs to be more carefully controlled to see if
workarounds need to be applied.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Add partial fragment unmapping code
Matt Carlson [Wed, 27 Jul 2011 14:20:50 +0000 (14:20 +0000)]
tg3: Add partial fragment unmapping code

The following patches are going to break skb fragments into smaller
sizes.  This patch attempts to make the change easier to digest by only
addressing the skb teardown portion.

The patch modifies the driver to skip over any BDs that have a flag set
that indicates the BD isn't the beginning of an skb fragment.  Such BDs
were a result of segmentation and do not need a pci_unmap_page() call.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Generalize tg3_skb_error_unmap()
Matt Carlson [Wed, 27 Jul 2011 14:20:49 +0000 (14:20 +0000)]
tg3: Generalize tg3_skb_error_unmap()

In the following patches, unmapping skb fragments will get just as
complicated as mapping them.  This patch generalizes
tg3_skb_error_unmap() and makes it the one-stop-shop for skb unmapping.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Remove short DMA check for 1st fragment
Matt Carlson [Wed, 27 Jul 2011 14:20:48 +0000 (14:20 +0000)]
tg3: Remove short DMA check for 1st fragment

The first fragment of an skb should always be greater than 8 bytes.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Simplify tx bd assignments
Matt Carlson [Wed, 27 Jul 2011 14:20:47 +0000 (14:20 +0000)]
tg3: Simplify tx bd assignments

In the following patches, the process the driver will use to assign skb
fragments to transmit BDs will get more complicated.  To prepare for
that new code, this patch seeks to simplify how transmit BDs are
populated.  It does this by separating the code that assigns the BD
members from the logic that controls how the fields are set.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Reintroduce tg3_tx_ring_info
Matt Carlson [Wed, 27 Jul 2011 14:20:46 +0000 (14:20 +0000)]
tg3: Reintroduce tg3_tx_ring_info

The following patches will require the use of an additional flag in the
ring_info structure.  The use of this flag is tx path specific, so this
patch defines a specialized ring_info structure.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoASIX: Use only 11 bits of header for data size
Marek Vasut [Tue, 26 Jul 2011 16:44:47 +0000 (16:44 +0000)]
ASIX: Use only 11 bits of header for data size

The AX88772B uses only 11 bits of the header for the actual size. The other bits
are used for something else. This causes dmesg full of messages:

asix_rx_fixup() Bad Header Length

This patch trims the check to only 11 bits. I believe on older chips, the
remaining 5 top bits are unused.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoASIX: Simplify condition in rx_fixup()
Marek Vasut [Tue, 26 Jul 2011 16:44:46 +0000 (16:44 +0000)]
ASIX: Simplify condition in rx_fixup()

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoFix cdc-phonet build
Chris Clayton [Tue, 26 Jul 2011 12:20:22 +0000 (12:20 +0000)]
Fix cdc-phonet build

Try to send to correct address this time!

----------  Forwarded Message  ----------

Subject: [PATCH] Fix cdc-phonet build
Date: Saturday 23 Jul 2011
From: Chris Clayton <chris2553@googlemail.com>
To: linux-net@vger.kernel.org

cdc-phonet does not presently build on linux-3.0 because there is no entry for it in
drivers/net/Makefile. This patch adds that entry.

Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobonding: reduce noise during init
Andy Gospodarek [Wed, 27 Jul 2011 10:09:26 +0000 (10:09 +0000)]
bonding: reduce noise during init

On Tue, Jul 26, 2011 at 05:40:27PM -0700, Joe Perches wrote:
> On Tue, 2011-07-26 at 17:37 -0700, Jay Vosburgh wrote:
> > Joe Perches <joe@perches.com> wrote:
> > >I'd prefer you don't separate the format string
> > >into multiple pieces.
> > Why not?  To me, it looks easier to read split into sections
> > that don't wrap lines.
>
> Harder to grep for a dmesg and the
> defect rate of these split formats is
> typically higher than single strings
> because of bad spacing between string
> segments.
>

I noticed that you took some time back in late 2009 to 'consolidate' the
split format-strings present in the bonding driver at the time and I've
decided I'm fine to leave them the way they are.  The main point of my
patch was to change the output and I would like to get that included.
Here is my updated patch...

Subject: [PATCH net-next-2.6 v2] bonding: reduce noise during init

Many are using sysfs to configure bonding rather than module options, so
there is no need for bonding to throw this warning in normal cases.

Keep the message around when debugging is enabled as it might be useful
for someone desperate enough to enable debugging, but eliminate it
otherwise.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobonding: fix string comparison errors
Andy Gospodarek [Tue, 26 Jul 2011 11:12:27 +0000 (11:12 +0000)]
bonding: fix string comparison errors

When a bond contains a device where one name is the subset of another
(eth1 and eth10, for example), one cannot properly set the primary
device or the currently active device.

This was reported and based on work by Takuma Umeya.  I also verified
the problem and tested that this fix resolves it.

V2: A few did not like the the current code or my changes, so I
refactored bonding_store_primary and bonding_store_active_slave to be a
bit cleaner, dropped the use of strnicmp since we did not really need
the comparison to be case insensitive, and formatted the input string
from sysfs so a comparison to IFNAMSIZ could be used.

I also discovered an error in bonding_store_active_slave that would
modify bond->primary_slave rather than bond->curr_active_slave before
forcing the bonding driver to choose a new active slave.

V3: Actually sending the proper patch....

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Reported-by: Takuma Umeya <tumeya@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
Neil Horman [Tue, 26 Jul 2011 06:05:38 +0000 (06:05 +0000)]
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared

After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs.  There are a handful of drivers that violate this assumption of
course, and need to be fixed up.  This patch identifies those drivers, and marks
them as not being able to support the safe transmission of skbs by clearning the
IFF_TX_SKB_SHARING flag in priv_flags

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Karsten Keil <isdn@linux-pingi.de>
CC: "David S. Miller" <davem@davemloft.net>
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: Patrick McHardy <kaber@trash.net>
CC: Krzysztof Halasa <khc@pm.waw.pl>
CC: "John W. Linville" <linville@tuxdriver.com>
CC: Greg Kroah-Hartman <gregkh@suse.de>
CC: Marcel Holtmann <marcel@holtmann.org>
CC: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: add IFF_SKB_TX_SHARED flag to priv_flags
Neil Horman [Tue, 26 Jul 2011 06:05:37 +0000 (06:05 +0000)]
net: add IFF_SKB_TX_SHARED flag to priv_flags

Pktgen attempts to transmit shared skbs to net devices, which can't be used by
some drivers as they keep state information in skbs.  This patch adds a flag
marking drivers as being able to handle shared skbs in their tx path.  Drivers
are defaulted to being unable to do so, but calling ether_setup enables this
flag, as 90% of the drivers calling ether_setup touch real hardware and can
handle shared skbs.  A subsequent patch will audit drivers to ensure that the
flag is set properly

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Jiri Pirko <jpirko@redhat.com>
CC: Robert Olsson <robert.olsson@its.uu.se>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Alexey Dobriyan <adobriyan@gmail.com>
CC: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: sock_sendmsg_nosec() is static
Eric Dumazet [Tue, 26 Jul 2011 02:39:41 +0000 (02:39 +0000)]
net: sock_sendmsg_nosec() is static

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoforcedeth: fix vlans
Jiri Pirko [Tue, 26 Jul 2011 10:19:28 +0000 (10:19 +0000)]
forcedeth: fix vlans

For some reason, when rxaccel is disabled, NV_RX3_VLAN_TAG_PRESENT is
still set and some pseudorandom vids appear. So check for
NETIF_F_HW_VLAN_RX as well. Also set correctly hw_features and set vlan
mode on probe.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agogianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e
Sebastian Pöhn [Tue, 26 Jul 2011 00:03:13 +0000 (00:03 +0000)]
gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e

commit 87c288c6e9aa31720b72e2bc2d665e24e1653c3e "gianfar: do vlan cleanup" has two issues:
# permutation of rx and tx flags
# enabling vlan tag insertion by default (this leads to unusable connections on some configurations)

If VLAN insertion is requested (via ethtool) it will be set at an other point ...

Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Thu, 28 Jul 2011 05:18:47 +0000 (22:18 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Thu, 28 Jul 2011 02:26:38 +0000 (19:26 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (54 commits)
  tpm_nsc: Fix bug when loading multiple TPM drivers
  tpm: Move tpm_tis_reenable_interrupts out of CONFIG_PNP block
  tpm: Fix compilation warning when CONFIG_PNP is not defined
  TOMOYO: Update kernel-doc.
  tpm: Fix a typo
  tpm_tis: Probing function for Intel iTPM bug
  tpm_tis: Fix the probing for interrupts
  tpm_tis: Delay ACPI S3 suspend while the TPM is busy
  tpm_tis: Re-enable interrupts upon (S3) resume
  tpm: Fix display of data in pubek sysfs entry
  tpm_tis: Add timeouts sysfs entry
  tpm: Adjust interface timeouts if they are too small
  tpm: Use interface timeouts returned from the TPM
  tpm_tis: Introduce durations sysfs entry
  tpm: Adjust the durations if they are too small
  tpm: Use durations returned from TPM
  TOMOYO: Enable conditional ACL.
  TOMOYO: Allow using argv[]/envp[] of execve() as conditions.
  TOMOYO: Allow using executable's realpath and symlink's target as conditions.
  TOMOYO: Allow using owner/group etc. of file objects as conditions.
  ...

Fix up trivial conflict in security/tomoyo/realpath.c

12 years agomd/raid10: handle further errors during fix_read_error better.
NeilBrown [Thu, 28 Jul 2011 01:39:25 +0000 (11:39 +1000)]
md/raid10: handle further errors during fix_read_error better.

If we find more read/write errors we should record a bad block before
failing the device.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid10: Handle read errors during recovery better.
NeilBrown [Thu, 28 Jul 2011 01:39:25 +0000 (11:39 +1000)]
md/raid10: Handle read errors during recovery better.

Currently when we get a read error during recovery, we simply abort
the recovery.

Instead, repeat the read in page-sized blocks.
On successful reads, write to the target.
On read errors, record a bad block on the destination,
and only if that fails do we abort the recovery.

As we now retry reads we need to know where we read from.  This was in
bi_sector but that can be changed during a read attempt.
So store the correct from_addr and to_addr in the r10_bio for later
access.

Signed-off-by: NeilBrown<neilb@suse.de>
12 years agomd/raid10: simplify read error handling during recovery.
NeilBrown [Thu, 28 Jul 2011 01:39:25 +0000 (11:39 +1000)]
md/raid10: simplify read error handling during recovery.

If a read error is detected during recovery the code currently
fails the read device.
This isn't really necessary.  recovery_request_write will signal
a write error to end_sync_write and it will record a write
error on the destination device which will record a bad block
there or kick it from the array.

So just remove this call to do md_error.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid10: record bad blocks due to write errors during resync/recovery.
NeilBrown [Thu, 28 Jul 2011 01:39:25 +0000 (11:39 +1000)]
md/raid10: record bad blocks due to write errors during resync/recovery.

If we get a write error during resync/recovery don't fail the device
but instead record a bad block.  If that fails we can then fail the
device.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid10: attempt to fix read errors during resync/check
NeilBrown [Thu, 28 Jul 2011 01:39:25 +0000 (11:39 +1000)]
md/raid10:  attempt to fix read errors during resync/check

We already attempt to fix read errors found during normal IO
and a 'repair' process.
It is best to try to repair them at any time they are found,
so move a test so that during sync and check a read error will
be corrected by over-writing with good data.

If both (all) devices have known bad blocks in the sync section we
won't try to fix even though the bad blocks might not overlap.  That
should be considered later.

Also if we hit a read error during recovery we don't try to fix it.
It would only be possible to fix if there were at least three copies
of data, which is not very common with RAID10.  But it should still
be considered later.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid10: Handle write errors by updating badblock log.
NeilBrown [Thu, 28 Jul 2011 01:39:24 +0000 (11:39 +1000)]
md/raid10:  Handle write errors by updating badblock log.

When we get a write error (in the data area, not in metadata),
update the badblock log rather than failing the whole device.

As the write may well be many blocks, we trying writing each
block individually and only log the ones which fail.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid10: clear bad-block record when write succeeds.
NeilBrown [Thu, 28 Jul 2011 01:39:24 +0000 (11:39 +1000)]
md/raid10: clear bad-block record when write succeeds.

If we succeed in writing to a block that was recorded as
being bad, we clear the bad-block record.

This requires some delayed handling as the bad-block-list update has
to happen in process-context.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid10: avoid writing to known bad blocks on known bad drives.
NeilBrown [Thu, 28 Jul 2011 01:39:24 +0000 (11:39 +1000)]
md/raid10: avoid writing to known bad blocks on known bad drives.

Writing to known bad blocks on drives that have seen a write error
is asking for trouble.  So try to avoid these blocks.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid10 record bad blocks as needed during recovery.
NeilBrown [Thu, 28 Jul 2011 01:39:24 +0000 (11:39 +1000)]
md/raid10 record bad blocks as needed during recovery.

When recovering one or more devices, if all the good devices have
bad blocks we should record a bad block on the device being rebuilt.

If this fails, we need to abort the recovery.

To ensure we don't think that we aborted later than we actually did,
we need to move the check for MD_RECOVERY_INTR earlier in md_do_sync,
in particular before mddev->curr_resync is updated.

Signed-off-by: NeilBrown <neilb@suse.de>