Eric Dumazet [Fri, 5 Jun 2009 04:04:16 +0000 (04:04 +0000)]
net: skb_shared_info optimization
skb_dma_unmap() is quite expensive for small packets,
because we use two different cache lines from skb_shared_info.
One to access nr_frags, one to access dma_maps[0]
Instead of dma_maps being an array of MAX_SKB_FRAGS + 1 elements,
let dma_head alone in a new dma_head field, close to nr_frags,
to reduce cache lines misses.
Tested on my dev machine (bnx2 & tg3 adapters), nice speedup !
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 5 Jun 2009 04:03:35 +0000 (04:03 +0000)]
net: num_dma_maps is not used
Get rid of num_dma_maps in struct skb_shared_info, as it seems unused.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tobias Klauser [Thu, 4 Jun 2009 23:07:59 +0000 (23:07 +0000)]
s2io: Remove private boolean definitions
Remove the private definition of TRUE/FALSE and use the ones from
linux/stddef.h. Also remove the definition of BOOL which is not referenced
inside the driver anyway.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paulius Zaleckas [Thu, 4 Jun 2009 05:50:29 +0000 (05:50 +0000)]
hso: convert dev_alloc_skb() to netdev_alloc_skb()
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: David S. Miller <davem@davemloft.net>
Richard R\9aöjfors [Thu, 4 Jun 2009 03:35:55 +0000 (03:35 +0000)]
netdev: Added KS8842 driver
This is a driver for the Micrel KS8842 ethernet switch.
The supplied code is for driving the KS8842 through the Timberdale FPGA
on the Russellville board, a development board for Intel Atom CPU
in the automotive area.
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Thu, 4 Jun 2009 01:22:01 +0000 (01:22 +0000)]
net: Ensure partial checksum offset is inside the skb head
On Thu, Jun 04, 2009 at 09:06:00PM +1000, Herbert Xu wrote:
>
> tun: Optimise handling of bogus gso->hdr_len
>
> As all current versions of virtio_net generate a value for the
> header length that's too small, we should optimise this so that
> we don't copy it twice. This can be done by ensuring that it is
> at least as large as the place where we'll write the checksum.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
With this applied we can strengthen the partial checksum check:
In skb_partial_csum_set we check to see if the checksum offset
is within the packet. However, we really should check that it
is within the skb head as that's the only bit we can modify
without copying.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 8 Jun 2009 07:20:01 +0000 (00:20 -0700)]
tun: Optimise handling of bogus gso->hdr_len
As all current versions of virtio_net generate a value for the
header length that's too small, we should optimise this so that
we don't copy it twice. This can be done by ensuring that it is
at least as large as the place where we'll write the checksum.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Thu, 4 Jun 2009 00:59:18 +0000 (00:59 +0000)]
virtio_net: Set correct gso->hdr_len
Through a bug in the tun driver, I noticed that virtio_net is
producing bogus hdr_len values. In particular, it only includes
the IP header in the linear area, and excludes the entire TCP
header. This causes the TCP header to be copied twice for each
packet. (The bug omitted the second copy :)
This patch corrects this.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Riccardo Ghetta [Thu, 4 Jun 2009 09:05:20 +0000 (09:05 +0000)]
sis190: fix gigabit negotiation
Fixes an initialization error; the chip negotiates gigabit, but
the driver mistakenly handled it as 100Mb.
Changes based on both SiS own GPL driver and forcedeth.
Hopefully should fix
http://bugzilla.kernel.org/show_bug.cgi?id=9735
http://bugzilla.kernel.org/show_bug.cgi?id=11149
Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
Riccardo Ghetta [Thu, 4 Jun 2009 09:05:07 +0000 (09:05 +0000)]
sis190: add new phy found on asus F5Sr laptop
Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
Riccardo Ghetta [Thu, 4 Jun 2009 09:04:55 +0000 (09:04 +0000)]
sis190: better message on unknown PHY
Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
Riccardo Ghetta [Sun, 7 Jun 2009 19:47:58 +0000 (19:47 +0000)]
sis190: fix for x86_64 (bug 11509)
Corrected dma sync handling on small packets. Should fix
http://bugzilla.kernel.org/show_bug.cgi?id=11509
Note:
While this bug was reported only on x86_64, it could have affected
any architecture.
Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Sun, 7 Jun 2009 13:58:29 +0000 (13:58 +0000)]
qlge: Fix timeout on firmware mailbox commands.
Some firmware mailbox commands require the firmware to
communicate with the FCoE driver running on another
PCI function. This can potentially take several seconds.
This wait is done in process context only.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Sun, 7 Jun 2009 13:58:28 +0000 (13:58 +0000)]
qlge: Fix timeout on indexed register wait.
There are 8 banks of 'sub-registers' each of which are accessed
through address/data register pair. An example would be reading
flash or the xgmac. Accessing these require the driver to wait for
a ready bit before writing the address and then accessing the data.
This patch increases the timeout to 100us to prevent timeouts
that have been seen on some platforms.
These register are accessed in process context only.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Sun, 7 Jun 2009 13:58:27 +0000 (13:58 +0000)]
qlge: Fix bug in MTU setting process.
Since an FCoE function shares a port with this NIC function, the
jumbo settings must always be in place. This patch causes the
hardware to be set up for jumbo if it is not already done.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Sun, 7 Jun 2009 13:58:26 +0000 (13:58 +0000)]
qlge: Fix bug in firmware event handler.
Each firmware mailbox command can have a different number of
valid data elements. When waiting for a mailbox command to
complete it the process passes it's element count and
waits for the completion. It is possible that while waiting
an unrelated firmware async event (AE) can arrive. When this
happens, the handler will over write the element count
with the value for the newly arrived AE. This can cause
the mailbox command to not get all of it's data.
This patch restores original mailbox count at the end
of the handler.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Sun, 7 Jun 2009 13:58:25 +0000 (13:58 +0000)]
qlge: Fix firmware event handler loop.
Check status on every iteration of event handler loop and exit
if an error occurred. If an error occurred then recover process
will be queued so this loop should no continue.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Frysinger [Fri, 5 Jun 2009 14:37:20 +0000 (14:37 +0000)]
netdev: smsc911x: add missing __devexit_p() usage
The smsc911x_drv_remove() function is declared with __devexit, so the
assignment to the driver structure needs __devexit_p() wrappings to prevent
build failure when hotplug is disabled.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Frysinger [Fri, 5 Jun 2009 14:37:19 +0000 (14:37 +0000)]
netdev: smsc911x: allow building on Blackfin systems
The smsc911x driver works fine on Blackfin systems, so add it to the arch
list in the Kconfig.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:02:44 +0000 (16:02 +0000)]
ixgbe: Increase the driver version number
With all the last patchsets going in for 82599 feature enablement, the
driver version needs to be increased for better identification.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:02:24 +0000 (16:02 +0000)]
ixgbe: Add FW detection and warning for 82599 SFP+ adapters
82599 has a FW running that helps manage the internal SFI PHY. There are
also a number of pre-production samples of these SFI-based devices in the
field. This patch adds a check to look for the firmware running on all
SFP+ based adapters, and displays a warning to the system log if a
pre-production adapter is identified. The driver will continue loading
though, with no functional degradation.
Also remove an old function prototype from ixgbe_82599.c that isn't being
used.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Brandeburg [Thu, 4 Jun 2009 16:02:04 +0000 (16:02 +0000)]
ixgbe: Re-adjust ring layouts to have better cacheline efficiency
This patch rearranges the ixgbe_ring struct to make better use of
cacheline efficiency.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:01:43 +0000 (16:01 +0000)]
ixgbe: Enable Flow Director hashing in 82599
This patch enables Flow Director's ATR functionality to the main base
driver for 82599.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:01:25 +0000 (16:01 +0000)]
ixgbe: Add Flow Director init and modify functions for 82599
This patch adds the functions for ixgbe to initialize Flow Director. It
also has the function APIs to add Flow Director filters from the base
driver. This also includes ATR, Application Targeted Routing, which is a
feature set of Flow Director. This is the hash-based mechanism to
automatically identify flows and add filters based on the hash, and direct
the Rx of that flow back to that same CPU.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:01:06 +0000 (16:01 +0000)]
ixgbe: Add hardware defines for Flow Director for 82599
Flow Director is a Rx filter mechanism designed to match Rx flows back to
the same CPU that the flow's Tx occurred from. This patch adds the first
piece, the defines for the hardware registers, to enable this feature in
82599 hardware.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 16:00:47 +0000 (16:00 +0000)]
ixgbe: Add a second feature flags variable, move HW RSC capability there
This adds a second feature flag variable to use for future feature
expansion. Add HW RSC to this new feature flags variable.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 4 Jun 2009 16:00:27 +0000 (16:00 +0000)]
ixgbe: move tx processing into NAPI context
This patch moves the tx cleanup processing out of the MSI-X interrupt
processing and gives it it's own napi routine. This allows the driver to
process TX cleanup in a polling context instead of in an interrupt context
which prevents TX from starving RX.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 4 Jun 2009 16:00:09 +0000 (16:00 +0000)]
ixgbe: move v_idx into q_vector and use as index only
The v_idx value was being used as both a bitmask and an index. This change
makes it so that the q_vector contains the index and allows for much of the
code to be simplified since disabling a q_vector involves only clearing one
bit in the interrupt bitmask.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 4 Jun 2009 15:59:49 +0000 (15:59 +0000)]
ixgbe: use rx_buffer_info->dma instead of nr_frags to determine skb unmap
This patch changes the driver so that it uses rx_buffer_info->dma to
determine if it needs to unmap the page instead of sh_info->nr_frags. This
helps to prevent a cache line miss when receiving small packets as the
rx_buffer_info data should already be in the cache.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mallikarjuna R Chilakala [Thu, 4 Jun 2009 11:11:34 +0000 (11:11 +0000)]
ixgbe: ethtool support to change advertised link modes of 82599 adapters
Add ethtool support to change advertised link modes/autoneg settings of
82599 multispeed fiber adapters.
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mallikarjuna R Chilakala [Thu, 4 Jun 2009 11:11:13 +0000 (11:11 +0000)]
ixgbe: Fix 82599 adapter link flickering issues
Fix autoneg restart issues in flow control path which might create
endless link flickering due to known timing issues with 82599
adapters.
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakakla@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 11:10:53 +0000 (11:10 +0000)]
ixgbe: Harden the 82599 multispeed fiber autotry mechanism
82599 supports multispeed fiber optical modules (10Gbps/1Gbps). Some
scenarios can cause the autotry mechanism to not negotiate link properly.
What needs to happen is the driver must flap the Tx laser to induce an Rx
Loss of Signal on the link partner. This will restart the autotry
mechanism to get link into a known state. The software definable pin (SDP)
3 on the 0x10fb NIC is wired to cause a Tx LOS event, which triggers the
Rx LOS we require.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 11:10:35 +0000 (11:10 +0000)]
ixgbe: Add ethtool offline test support
This patch adds support for the ethtool internal test engine.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 11:10:17 +0000 (11:10 +0000)]
ixgbe: Change the 82599 PHY DSP restart logic
When reprogramming the 82599 analog PHY to either SFI optical or Direct
Attach Twinax, we need to restart the DSP in the PHY. The current method
can cause contention with our FW which is managing PHY state, and will
cause unexpected link flaps. This patch fixes the DSP restart by issuing
an AN_RESTART in the MAC, which will properly propagate the DSP restart to
the PHY. This ensures we don't collide with the FW.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 4 Jun 2009 11:09:58 +0000 (11:09 +0000)]
ixgbe: Enable ACPI WoL capabilities for 82599
The 82599 KX4 device defaults to legacy power management, or APME. This
puts the device into ACPI mode, which allows more robust WoL setups to
work properly.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Beregalov [Sun, 7 Jun 2009 12:01:00 +0000 (05:01 -0700)]
cfg80211: errno.h: define ERFKILL
Commit
1f87f7d3 (cfg80211: add rfkill support) added ERFKILL
to asm-generic/errno.h, but alpha, mips, parisc and sparc use
their own numbering scheme and do not include asm-generic/errno.h.
We need to add definition of ERFKILL for them.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 7 Jun 2009 11:24:21 +0000 (04:24 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6
Ayaz Abdulla [Sun, 7 Jun 2009 10:54:37 +0000 (03:54 -0700)]
removal of forcedeth device ids
This patch removes the forcedeth device ids from pci_ids.h
The forcedeth driver uses the device id constants directly in its source
file.
[ Need to keep PCI_DEVICE_ID_NVIDIA_NVENET_15 in order to keep
drivers/pci/quirks.c building -DaveM ]
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Wed, 3 Jun 2009 15:05:35 +0000 (15:05 +0000)]
forcedeth: addition of new mcp89 device id
This patch adds a new device id for mcp89 chipset.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Wed, 3 Jun 2009 15:05:17 +0000 (15:05 +0000)]
forcedeth: remove device id macros
This patch removes the device id macros and instead uses the constants
directly.
The areas in which logic expressions where using the macros now instead
use feature/workaround flags.
No new functionality has been introduced in this patch, only clean up of
flags and macros.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Thu, 4 Jun 2009 06:22:25 +0000 (08:22 +0200)]
wimax: depend on rfkill properly
My mistake, I should have added that when cleaning up
rfkill and changing wimax.
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Wed, 3 Jun 2009 20:24:48 +0000 (22:24 +0200)]
ar9170: remove deprecated code
This patch removes code (deprecated by "cfg80211: add rfkill support" )
main.c: In function 'ar9170_op_config':
main.c:1306: warning: '__IEEE80211_CONF_CHANGE_RADIO_ENABLED'
is deprecated (declared at include/net/mac80211.h:551)
and a useless device state.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Wed, 3 Jun 2009 18:44:12 +0000 (11:44 -0700)]
iwlwifi: fix comment describing disable_11n
Fixing a comment in the code describing this module parameter.
The description printed when user runs "modinfo" is correct.
Reported-by: Jiajia Zheng <jiajia.zheng@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Wed, 3 Jun 2009 18:44:11 +0000 (11:44 -0700)]
iwlwifi: add value and range define for link quality command
Instead of hardcoding the link quality parameters inside the functions,
adding #define in iwl-commands.h to shared by different functions.
Also include the valid range for number of link quality parameters.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohamed Abbas [Wed, 3 Jun 2009 18:44:10 +0000 (11:44 -0700)]
iwlagn: delay ict interrupt.
Wait until ucode is loaded and driver receive ALIVE_REPLY then switch
to ICT interrupt. This ensures we receive all interrupts indicating
successful ucode load.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Wed, 3 Jun 2009 18:44:09 +0000 (11:44 -0700)]
iwl3945/iwlwifi: fix led bug when SW rfkill
Patch fixes the bug at
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1903
when SW rfkill is invoked by 'iwconfig txpower off',
the existing connection disassociates and led off command is sent
to the device which returns error as rfkill is 'true'.
Patch fixes this by just avoiding sending the led off/on command when
disassociated. The main purpose of the led_disassociate callback
is to start or stop the blinking.
There are three states in led
1) Always on when radio is on
2) Always off when radio is off
3) blink when associated and if there is some traffic.
In this callback 'allow_blinking' needs to be set false
when associated, as LED will be always on.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Wed, 3 Jun 2009 18:44:08 +0000 (11:44 -0700)]
iwl3945: port allow skb allocation in tasklet patch
Port "iwlcore: Allow skb allocation from tasklet." to 3945
If RX queue becomes empty then we need to restock the queue from
tasklet to prevent ucode from starving. A caller to iwl_rx_allocate
will decide if allocated buffer should come from GFP_ATOMIC or
GFP_KERNEL.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Wed, 3 Jun 2009 18:44:07 +0000 (11:44 -0700)]
iwlwifi: unify station management
This patch unifies 3945 and AGN station management
It also removes useless struct iwl_station_mgmt ops
and cleanups a bit the interface
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Tested-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chaithrika U S [Thu, 4 Jun 2009 04:54:29 +0000 (21:54 -0700)]
TI DaVinci EMAC: Remove print_mac, DECLARE_MAC_BUF
Use printk format specifier for MAC address.
Remove DECALRE_MAC_BUF and print_mac() usage in the driver.
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Thu, 4 Jun 2009 04:45:55 +0000 (21:45 -0700)]
tun: Only wake up writers
When I added socket accounting to tun I inadvertently introduced
spurious wake-up events that kills qemu performance. The problem
occurs when qemu polls on the tun fd for read, and then transmits
packets. For each packet transmitted, we will wake up qemu even
if it only cares about read events.
Now this affects all sockets, but it is only a new problem for
tun. So this patch tries to fix it for tun first and we can then
look at the problem in general.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 4 Jun 2009 04:43:52 +0000 (21:43 -0700)]
Merge branch 'net-next' of git://git./linux/kernel/git/vxy/lksctp-dev
Rami Rosen [Thu, 4 Jun 2009 04:43:26 +0000 (21:43 -0700)]
ipv4: remove ip_mc_drop_socket() declaration from af_inet.c.
ip_mc_drop_socket() method is declared in linux/igmp.h, which
is included anyhow in af_inet.c. So there is no need for this declaration.
This patch removes it from af_inet.c.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Thu, 4 Jun 2009 04:20:51 +0000 (21:20 -0700)]
gso: Stop fraglists from escaping
As it stands skb fraglists can get past the check in dev_queue_xmit
if the skb is marked as GSO. In particular, if the packet doesn't
have the proper checksums for GSO, but can otherwise be handled by
the underlying device, we will not perform the fraglist check on it
at all.
If the underlying device cannot handle fraglists, then this will
break.
The fix is as simple as moving the fraglist check from the device
check into skb_gso_ok.
This has caused crashes with Xen when used together with GRO which
can generate GSO packets with fraglists.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Wed, 3 Jun 2009 06:19:15 +0000 (06:19 +0000)]
cxgb3: minor aq100x phy fixes
Use generic MDIO generic values.
Based on Ben Hutchings'review comments.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Wed, 3 Jun 2009 13:38:59 +0000 (13:38 +0000)]
cxgb3: Update FW to 7.4.0
Update FW to 7.4.
Bump up driver revision.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Wed, 3 Jun 2009 16:30:31 +0000 (18:30 +0200)]
cfg80211: fix Kconfig for users of cfg80211
* iwm doesn't depend on cfg80211 or wireless extensions
* rndis wlan selects cfg80211 - needs to depend
* mac80211 selects cfg80211 - needs to depend
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 3 Jun 2009 08:17:59 +0000 (10:17 +0200)]
rfkill: document /dev/rfkill
Add some blurb about /dev/rfkill to the documentation and
fix the "transmiter" spelling error.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 3 Jun 2009 07:55:29 +0000 (09:55 +0200)]
rfkill: always init poll delayed work
The rfkill core didn't initialise the poll delayed work
because it assumed that polling was always done by specifying
the poll function. cfg80211, however, would like to start
polling only later, which is a valid use case and easy to
support, so change rfkill to always initialise the poll
delayed work and thus allow starting polling by calling the
rfkill_resume_polling() function after registration.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Wed, 3 Jun 2009 03:03:06 +0000 (23:03 -0400)]
ath5k: disable beacon interrupt when interface is down
When we remove the active interface, there's no need to continue
sending beacons; doing so would cause a null pointer deref in
ieee80211_beacon_get(). Disable the interrupt in remove_interface
and add a WARN_ON(!vif) in case there are other instances lurking.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 2 Jun 2009 22:43:25 +0000 (15:43 -0700)]
mac80211: removed unused variable in ieee80211_tx()
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 2 Jun 2009 22:38:14 +0000 (18:38 -0400)]
mac80211: extend sta kdoc - explain when they are added
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 2 Jun 2009 20:31:10 +0000 (16:31 -0400)]
cfg80211: make ieee80211_get_mesh_hdrlen() static
Fixes spares warning:
net/wireless/util.c:261:5: warning:
symbol 'ieee80211_get_mesh_hdrlen' 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>
Luis R. Rodriguez [Tue, 2 Jun 2009 20:30:56 +0000 (16:30 -0400)]
ath: make regulatory parsing more verbose on debug
This should help when reviewing issues regarding regulatory
domain on ath5k/ath9k/ar9170.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Tue, 2 Jun 2009 13:58:55 +0000 (19:28 +0530)]
ath9k: Fix write callback of 'debug' which configures debug mask
Handle error condition on copy_from_user() properly and
make sure a NUL terminated char[] is sent to strict_strtoul()
for proper conversion.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 2 Jun 2009 11:01:42 +0000 (13:01 +0200)]
iwm: port to new cfg80211 rfkill
Which means removing all rfkill code since it only does
soft-kill which cfg80211 will now handle in exactly the
same way the driver did.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 2 Jun 2009 11:01:41 +0000 (13:01 +0200)]
cfg80211: add rfkill support
To be easier on drivers and users, have cfg80211 register an
rfkill structure that drivers can access. When soft-killed,
simply take down all interfaces; when hard-killed the driver
needs to notify us and we will take down the interfaces
after the fact. While rfkilled, interfaces cannot be set UP.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 2 Jun 2009 11:01:40 +0000 (13:01 +0200)]
rfkill: add function to query state
Sometimes it is necessary to know how the state is,
and it is easier to query rfkill than keep track of
it somewhere else, so add a function for that. This
could later be expanded to return hard/soft block,
but so far that isn't necessary.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 2 Jun 2009 11:01:39 +0000 (13:01 +0200)]
cfg80211: move txpower wext from mac80211
This patch introduces new cfg80211 API to set the TX power
via cfg80211, puts the wext code into cfg80211 and updates
mac80211 to use all that. The -ENETDOWN bits are a hack but
will go away soon.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 2 Jun 2009 11:01:38 +0000 (13:01 +0200)]
rfkill: create useful userspace interface
The new code added by this patch will make rfkill create
a misc character device /dev/rfkill that userspace can use
to control rfkill soft blocks and get status of devices as
well as events when the status changes.
Using it is very simple -- when you open it you can read
a number of times to get the initial state, and every
further read blocks (you can poll) on getting the next
event from the kernel. The same structure you read is
also used when writing to it to change the soft block of
a given device, all devices of a given type, or all
devices.
This also makes CONFIG_RFKILL_INPUT selectable again in
order to be able to test without it present since its
functionality can now be replaced by userspace entirely
and distros and users may not want the input part of
rfkill interfering with their userspace code. We will
also write a userspace daemon to handle all that and
consequently add the input code to the feature removal
schedule.
In order to have rfkilld support both kernels with and
without CONFIG_RFKILL_INPUT (or new kernels after its
eventual removal) we also add an ioctl (that only exists
if rfkill-input is present) to disable rfkill-input.
It is not very efficient, but at least gives the correct
behaviour in all cases.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 2 Jun 2009 11:01:37 +0000 (13:01 +0200)]
rfkill: rewrite
This patch completely rewrites the rfkill core to address
the following deficiencies:
* all rfkill drivers need to implement polling where necessary
rather than having one central implementation
* updating the rfkill state cannot be done from arbitrary
contexts, forcing drivers to use schedule_work and requiring
lots of code
* rfkill drivers need to keep track of soft/hard blocked
internally -- the core should do this
* the rfkill API has many unexpected quirks, for example being
asymmetric wrt. alloc/free and register/unregister
* rfkill can call back into a driver from within a function the
driver called -- this is prone to deadlocks and generally
should be avoided
* rfkill-input pointlessly is a separate module
* drivers need to #ifdef rfkill functions (unless they want to
depend on or select RFKILL) -- rfkill should provide inlines
that do nothing if it isn't compiled in
* the rfkill structure is not opaque -- drivers need to initialise
it correctly (lots of sanity checking code required) -- instead
force drivers to pass the right variables to rfkill_alloc()
* the documentation is hard to read because it always assumes the
reader is completely clueless and contains way TOO MANY CAPS
* the rfkill code needlessly uses a lot of locks and atomic
operations in locked sections
* fix LED trigger to actually change the LED when the radio state
changes -- this wasn't done before
Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Tue, 2 Jun 2009 04:05:04 +0000 (00:05 -0400)]
nl80211: use GFP_ATOMIC for michael mic failure message
nl80211_michael_mic_failure can be called in atomic context but
does a GFP_KERNEL allocation. Fixes the error below:
[ 126.793225] BUG: sleeping function called from invalid context at mm/slab.c:3055
[ 126.793234] in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper
[ 126.793241] 2 locks held by swapper/0:
[ 126.793246] #0: (&sc->rxbuflock){+.-.+.}, at: [<
f94e1b46>] ath5k_tasklet_rx+0x34/0x55e [ath5k]
[ 126.793294] #1: (rcu_read_lock){.+.+.+}, at: [<
f92872f3>] __ieee80211_rx+0x7e/0x563 [mac80211]
[ 126.793342] Pid: 0, comm: swapper Not tainted 2.6.30-rc7-wl #124
[ 126.793347] Call Trace:
[ 126.793361] [<
c014499d>] ? __debug_show_held_locks+0x1e/0x20
[ 126.793380] [<
c011e9a3>] __might_sleep+0x100/0x107
[ 126.793386] [<
c018ea99>] kmem_cache_alloc+0x35/0x170
[ 126.793393] [<
c02e8bb1>] ? __alloc_skb+0x2e/0x117
[ 126.793397] [<
c014517d>] ? mark_held_locks+0x43/0x5b
[ 126.793402] [<
c02e8bb1>] __alloc_skb+0x2e/0x117
[ 126.793419] [<
f851a836>] nl80211_michael_mic_failure+0x2a/0x1fa [cfg80211]
[ 126.793425] [<
c01453b8>] ? trace_hardirqs_on_caller+0xf6/0x130
[ 126.793430] [<
c01453fd>] ? trace_hardirqs_on+0xb/0xd
[ 126.793444] [<
f851b2b8>] cfg80211_michael_mic_failure+0x30/0x38 [cfg80211]
[ 126.793463] [<
f928bf69>] mac80211_ev_michael_mic_failure+0xfd/0x108 [mac80211]
[ 126.793480] [<
f9279fbd>] ieee80211_rx_h_michael_mic_verify+0xd4/0x117 [mac80211]
[ 126.793499] [<
f9285ef3>] ieee80211_invoke_rx_handlers+0xdde/0x1963 [mac80211]
[ 126.793505] [<
c0107152>] ? sched_clock+0x3f/0x64
[ 126.793511] [<
c0107152>] ? sched_clock+0x3f/0x64
[ 126.793516] [<
c01445d7>] ? trace_hardirqs_off+0xb/0xd
[ 126.793521] [<
c0107152>] ? sched_clock+0x3f/0x64
[ 126.793526] [<
c0146454>] ? __lock_acquire+0x62c/0x1271
[ 126.793545] [<
f9286fbb>] __ieee80211_rx_handle_packet+0x543/0x564 [mac80211]
[ 126.793564] [<
f9287757>] __ieee80211_rx+0x4e2/0x563 [mac80211]
[ 126.793577] [<
f94e1ff6>] ath5k_tasklet_rx+0x4e4/0x55e [ath5k]
[ 126.793583] [<
c0102b54>] ? restore_nocheck_notrace+0x0/0xe
[ 126.793589] [<
c0129aa2>] tasklet_action+0x92/0xe5
[ 126.793594] [<
c0129f22>] __do_softirq+0xb1/0x182
[ 126.793599] [<
c012a023>] do_softirq+0x30/0x48
[ 126.793603] [<
c012a19b>] irq_exit+0x3d/0x74
[ 126.793609] [<
c0358016>] do_IRQ+0x76/0x8c
[ 126.793613] [<
c010312e>] common_interrupt+0x2e/0x34
[ 126.793618] [<
c014007b>] ? timer_list_show+0x277/0x939
[ 126.793630] [<
f88eb321>] ? acpi_idle_enter_bm+0x266/0x291 [processor]
[ 126.793636] [<
c02d00f6>] cpuidle_idle_call+0x6a/0x9c
[ 126.793640] [<
c0101cc8>] cpu_idle+0x53/0x87
[ 126.793645] [<
c0344510>] rest_init+0x6c/0x6e
[ 126.793651] [<
c04dd74d>] start_kernel+0x286/0x28b
[ 126.793656] [<
c04dd037>] __init_begin+0x37/0x3c
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Tue, 2 Jun 2009 01:04:36 +0000 (18:04 -0700)]
libertas: improve function init/shutdown handling for SD8688
This patch is to incorporate Dan Williams' comments for commit:
"libertas: implement function init/shutdown commands for SD8688"
1. remove fn_init_required and fn_shutdown_required variables from
lbs_private structure. If required, __lbs_cmd() will be called
directly to send function init/shutdown command for SD8688 in
if_sdio_probe() or if_sdio_remove() callback.
2. add global variable "user_rmmod" to distinguish between the module
removal case and the card removal case. This flag will be checked in
if_sdio_remove() against SD8688 card to determine whether or not the
function shutdown command needs to be sent.
3. remove "card" from if_sdio_model structure as it cannot store
card pointers for multiple cards. Besides, it's no longer needed
to store the "card" pointer with changes #1 & #2 above.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 27 May 2009 08:12:51 +0000 (10:12 +0200)]
wireless/p54: prepare for FIRMWARE_NAME_MAX removal
We're going to remove the FIRMWARE_NAME_MAX definition in order to avoid any
firmware name length restriction.
This patch gets rid of the statically allocated p54usb firmware string, and
replaces them with const char pointers.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Tue, 2 Jun 2009 07:52:20 +0000 (15:52 +0800)]
iwmc3200wifi: shrink calibration lmac name
iwmc3200wifi: trim down calibration firmware name
The patch trims down iwmc3200wifi calibration firmware name from
iwmc3200wifi-lmac-calib-sdio.bin to iwmc3200wifi-calib-sdio.bin. We can
shorten the firmware name because all calibration is done by LMAC.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Mon, 1 Jun 2009 20:49:25 +0000 (22:49 +0200)]
ar9170: cancel led worker properly on exit
"[PATCH 3/4 v2] ar9170: fix LED power state handling" revealed
a bug which can cause a ugly crash.
The delayed worker is canceled before the LED class functions are
unregistered... So, if something manages to update the LEDs
while unregister routine is running the timer could fire _after_ the
module has been unloaded.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Thu, 28 May 2009 15:04:27 +0000 (17:04 +0200)]
ar9170usb: more minor fixes
This patch contains a few more mostly random fixes for the USB front-end.
1. handle irq command response, instead of printing it to the console.
2. remove fixed FIXME.
(real fix: "ar9170usb: reset device on resume". )
3. some more one-liner.
- get rid of a useless "return;"
- add a few branch prediction hints in hot-paths
etc.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 23 May 2009 18:31:21 +0000 (20:31 +0200)]
ar9170: fix lockdep warning on hibernate
This patch takes care of Johannes' deadlock report by moving the
mutex_lock right after cancel_work_sync in ar9170_op_stop.
Besides, the janitor does not need to hold the mutex anymore,
so this extra lines can be removed as well.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Mon, 25 May 2009 19:51:19 +0000 (21:51 +0200)]
ar9170: fix LED power state handling
This patch fixes a minor visual bug in the led code, which
left the LED in the wrong power state when it was toggled
in a _unexpected_ way (e.g: enabling the LED twice).
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 23 May 2009 18:28:38 +0000 (20:28 +0200)]
ar9170: kill duplicated HT feature flag
This patch removes a redundant flag.
.cap = IEEE80211_HT_CAP_MAX_AMSDU | \
> IEEE80211_HT_CAP_SM_PS | \ <
[...] \
> IEEE80211_HT_CAP_SM_PS, \ <
.ampdu_factor = 3, \
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 23 May 2009 18:28:21 +0000 (20:28 +0200)]
ar9170: use bitop macros for tx filter flags
This patch fixes a bug in configure_filter's (sub-)routines.
We never really cleared the flags once we updated the hardware state,
so we wasted our resources by applying already active settings.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Mon, 1 Jun 2009 19:42:01 +0000 (21:42 +0200)]
ar9170: introduce functions for MAC programming
This patch introduces 3 new function which are used to update
the MAC state, whenever needed... e.g: after a band switch.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Mon, 1 Jun 2009 19:41:50 +0000 (21:41 +0200)]
ar9170: 40mhz fixes
This patch replace a few constant magics which may affected
the device when operating in a 40MHz channel.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Mon, 1 Jun 2009 19:41:36 +0000 (21:41 +0200)]
ar9170: update hardware definitions
This patch only contains a few uncritical updates for the
hardware definition header.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Mon, 1 Jun 2009 19:41:31 +0000 (21:41 +0200)]
ar9170: fix beacon plcp settings
This patch fixes a simple copy & paste error that affected beacon
transmission in 802.11a mode.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 1 Jun 2009 12:29:52 +0000 (14:29 +0200)]
mac80211_hwsim: remove deprecated radio_enabled
This removes the use of the deprecated radio_enabled setting
and code associated with that.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Sun, 31 May 2009 22:24:34 +0000 (18:24 -0400)]
cfg80211: fix for duplicate userspace replies
This fixes an incorrect assumption (BUG_ON) made in
cfg80211 when handling country IE regulatory requests.
The assumption was that we won't try to call_crda()
twice for the same event and therefore we will not
recieve two replies through nl80211 for the regulatory
request. As it turns out it is true we don't call_crda()
twice for the same event, however, kobject_uevent_env()
*might* send the udev event twice and/or userspace can
simply process the udev event twice. We remove the BUG_ON()
and simply ignore the duplicate request.
For details refer to this thread:
http://marc.info/?l=linux-wireless&m=
124149987921337&w=2
Cc: stable@kernel.org
Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 29 May 2009 23:39:53 +0000 (01:39 +0200)]
net: introduce pre-up netdev notifier
NETDEV_UP is called after the device is set UP, but sometimes
it is useful to be able to veto the device UP. Introduce a
new NETDEV_PRE_UP notifier that can be used for exactly this.
The first use case will be cfg80211 denying interfaces to be
set UP if the device is known to be rfkill'ed.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 28 May 2009 21:36:05 +0000 (17:36 -0400)]
ar9170: add AVM FRITZ devices
This adds:
USB 0x057C:0x8401 AVM FRITZ!WLAN USB Stick N
USB 0x057C:0x8402 AVM FRITZ!WLAN USB Stick N 2.4
These devices require the 1-stage firmware, if not present we
don't continue.
Cc: Peter Grabienski <Peter.Grabienski@Atheros.com>
Cc: Stephen Chen <Stephen.Chen@Atheros.com>
Cc: Michael Fortin <Michael.Fortin@Atheros.com>
Cc: Johnny Cheng <Johnny.Cheng@Atheros.com>
Cc: Yuan-Gu Wei <Yuan-Gu.Wei@atheros.com>
Cc: Joerg Albert <jal2@gmx.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 28 May 2009 21:36:04 +0000 (17:36 -0400)]
ar9170: add support for 1-stage firmware
You can get the stage 1 firmware from here:
http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/ar9170.fw
md5sum:
34feec4ec0eae3bb92c7c1ea2dfb4530
sha1sum:
6e5250498b815c2940d97242de31e054ae44e079
Its license:
http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/LICENSE
This is a new firmware, tested with WNDA3100.
Cc: Peter Grabienski <Peter.Grabienski@Atheros.com>
Cc: Stephen Chen <Stephen.Chen@Atheros.com>
Cc: Michael Fortin <Michael.Fortin@Atheros.com>
Cc: Johnny Cheng <Johnny.Cheng@Atheros.com>
Cc: Yuan-Gu Wei <Yuan-Gu.Wei@atheros.com>
Cc: Joerg Albert <jal2@gmx.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Thu, 28 May 2009 16:25:28 +0000 (19:25 +0300)]
ath9k: Add sanity check for beacon_int in adhoc/mesh case
It looks like mac80211 can request the driver to start beaconing with
a beacon interval of zero in some cases (at least for mesh point). This
does not sound correct and something may need to be fixed in
mac80211. However, taken into account the unpleasantness of getting
stuck in an infinite busy loop with rtnl_lock held, let's add a quick
workaround in the driver to avoid the worst symptom while someone more
familiar with the mesh implementation can figure out what should be done
with mac80211 as far as beacon interval configuration is concerned.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Thu, 28 May 2009 14:27:37 +0000 (10:27 -0400)]
ath5k: remove conf->beacon_int usage
ieee80211_conf->beacon_int was deprecated and removed in a cleanup
patch, however it was accidentally added back to ath5k in the change
"ath5k: Allow user/driver to set txpower." Remove it once more,
fixing the following warning:
[13091.968902] WARNING: at drivers/net/wireless/ath/ath5k/base.c:2167 warn_slowpath_null+0x15/0x1a()
[13091.968906] Hardware name: MacBook1,1
[13091.968909] Modules linked in: usb_storage fuse i915 drm af_packet acpi_cpufreq binfmt_misc dm_mirror dm_region_hash dm_log dm_multipath dm_mod snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_seq_dummy hid_apple arc4 ecb snd_seq_oss snd_seq_midi_event usbhid snd_seq ath5k mac80211 appletouch snd_seq_device snd_pcm_oss snd_mixer_oss sky2 snd_pcm ath processor cfg80211 snd_timer sg ohci1394 snd uhci_hcd bitrev ieee1394 joydev ehci_hcd crc32 snd_page_alloc button ac thermal battery sr_mod applesmc cdrom evdev input_polldev unix [last unloaded: microcode]
[13091.968985] Pid: 2132, comm: phy0 Tainted: G W 2.6.30-rc5-wl #118
[13091.968988] Call Trace:
[13091.968994] [<
c0125884>] warn_slowpath_fmt+0x77/0xa6
[13091.969003] [<
c03557d8>] ? _spin_unlock+0x2c/0x41
[13091.969008] [<
c0355a56>] ? _spin_lock_irqsave+0x15/0x69
[13091.969012] [<
c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d
[13091.969019] [<
c01445bb>] ? trace_hardirqs_off+0xb/0xd
[13091.969024] [<
c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d
[13091.969029] [<
c01445bb>] ? trace_hardirqs_off+0xb/0xd
[13091.969034] [<
c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d
[13091.969039] [<
c01258c8>] warn_slowpath_null+0x15/0x1a
[13091.969054] [<
f965846d>] ath5k_beacon_update_timers+0x44/0x27f [ath5k]
[13091.969059] [<
c0126370>] ? vprintk+0x2dd/0x312
[13091.969063] [<
c0125e50>] ? release_console_sem+0x1a6/0x1d3
[13091.969076] [<
f96586c5>] ath5k_reset_tsf+0x1d/0x2c [ath5k]
[13091.969095] [<
f93f4426>] __ieee80211_sta_join_ibss+0x35/0x3aa [mac80211]
[13091.969102] [<
c0252793>] ? extract_entropy+0x47/0x8a
[13091.969121] [<
f93f4b21>] ieee80211_sta_find_ibss+0x2de/0x32f [mac80211]
[13091.969126] [<
c035422c>] ? mutex_lock_nested+0x28b/0x2a5
[13091.969145] [<
f93f4b8e>] ? ieee80211_ibss_notify_scan_completed+0x1c/0x6f [mac80211]
[13091.969164] [<
f93f4bc9>] ieee80211_ibss_notify_scan_completed+0x57/0x6f [mac80211]
[13091.969182] [<
f93f26da>] ieee80211_scan_completed+0x31a/0x33f [mac80211]
[13091.969201] [<
f93f27ca>] ieee80211_scan_work+0xcb/0x18b [mac80211]
[13091.969207] [<
c0133a6a>] worker_thread+0x1b1/0x28e
[13091.969212] [<
c0133a25>] ? worker_thread+0x16c/0x28e
[13091.969230] [<
f93f26ff>] ? ieee80211_scan_work+0x0/0x18b [mac80211]
[13091.969237] [<
c013736e>] ? autoremove_wake_function+0x0/0x38
[13091.969242] [<
c01338b9>] ? worker_thread+0x0/0x28e
[13091.969246] [<
c0137031>] kthread+0x4a/0x70
[13091.971460] [<
c0136fe7>] ? kthread+0x0/0x70
[13091.971467] [<
c0103527>] kernel_thread_helper+0x7/0x10
[13091.971470] ---[ end trace
8defaa5d15c50cef ]---
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 28 May 2009 02:56:05 +0000 (22:56 -0400)]
mac80211: handle -EALREADY on cfg80211 op assoc req
When the SME requests to associate to an open AP
ieee80211_sta_set_extra_ie() can be called with zero IE
length. When this happens or when the extra IE has already
been set -EALREADY is passed down and the supplicant will
complain that the operation is already in progress and it will
not let us associate. We correct this by treating -EALREADY
from ieee80211_sta_set_extra_ie() as a success just as we do
for wext.
Cc: Shan.Palanisamy@Atheros.com
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cliff Cai [Wed, 27 May 2009 18:03:09 +0000 (14:03 -0400)]
wireless: libertas: fix unaligned accesses
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Hansen [Wed, 27 May 2009 12:48:29 +0000 (12:48 +0000)]
ath9k: Add "debug" file to debugfs
This patch adds the debug file to the ath9k debugfs, which lets you modify
the debug_mask at runtime, without having to reload the ath9k module.
Signed-off-by: Jeff Hansen <x@jeffhansen.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Hansen [Wed, 27 May 2009 12:48:28 +0000 (12:48 +0000)]
ath9k: Combine legacy and 11n rc statistics
This patch combines the legacy and 11n rcstats into one, using the normal
rate table indices instead of two separate indices for each mode. Legacy
rates also get all of the PER and retry information, now, too.
Signed-off-by: Jeff Hansen <x@jeffhansen.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Hansen [Wed, 27 May 2009 12:48:27 +0000 (12:48 +0000)]
ath9k: Reset SC_OP_TSF_RESET flag after stuck beacon
I have a TrendNet 652-BRP running OpenWRT + ath9k very well. The only
problem is that the beacon gets stuck maybe once a day. After
Vasanthakumar Thiagarajan's "ath9k: cleanup beacon parameters
configuration" patch, ath9k would nearly re-configure the beacons after it
detected the stuck beacon, and did a reset. But it would fail the
SC_OP_TSF_RESET check in ath_beacon_config_ap. This patch gets the beacon
fully reconfigured after the reset.
Signed-off-by: Jeff Hansen <x@jeffhansen.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 27 May 2009 08:35:29 +0000 (10:35 +0200)]
cfg80211: disallow interfering with stations on non-AP (part 2)
On non-AP interfaces userspace has no business interfering with
the station management, this can confuse mac80211 (and other
drivers probably wouldn't support it anyway). Allow adding and
removing stations only on AP interfaces.
(Reconcile this w/ previous version of patch posted with same
subject... -- JWL)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 27 May 2009 07:41:06 +0000 (09:41 +0200)]
mac80211: fix transposed min/max CW values
I accidentally transposed these in the patch that "fixed" the defaults,
leading to extremely low throughput because of the huge min CW.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Randy Dunlap [Tue, 26 May 2009 19:17:52 +0000 (12:17 -0700)]
iwmc3200wifi: fix printk format
Fix printk format for size_t variable:
drivers/net/wireless/iwmc3200wifi/fw.c:75: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: ilw@linux.intel.com
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Tue, 26 May 2009 03:10:46 +0000 (11:10 +0800)]
iwmc3200wifi: fix fragmentation threshold setting
We were sending the fragmentation threshold value to the wrong table,
causing an LMAC assert when setting it from wext.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>