safe/jmp/linux-2.6
14 years agoath9k_htc: Fix RX URB reference count
Sujith [Tue, 6 Apr 2010 09:58:13 +0000 (15:28 +0530)]
ath9k_htc: Fix RX URB reference count

RX URBs are automatically freed when the reference
count drops to zero - this currently doesn't happen when
usb_kill_anchored_urbs() is called during unload.

Fix this by dropping the reference count by one during
initial submission.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Protect RX stream variables
Sujith [Tue, 6 Apr 2010 09:58:11 +0000 (15:28 +0530)]
ath9k_htc: Protect RX stream variables

Use a spin lock to prevent concurrent access
to variables dealing with RX stream mode handling.
Currently, no protection is implemented - which
causes problems in RX.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Enable powersaving by default again on rt2500usb.
Gertjan van Wingerde [Tue, 30 Mar 2010 21:50:24 +0000 (23:50 +0200)]
rt2x00: Enable powersaving by default again on rt2500usb.

Now that the powersave issues on rt2500usb have been tackled, powersave
can be enabled by default again.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Moved mesh action codes to a more visible location
Javier Cardona [Mon, 29 Mar 2010 18:00:21 +0000 (11:00 -0700)]
mac80211: Moved mesh action codes to a more visible location

Grouped mesh action codes together with the other action codes in
ieee80211.h.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless/ath: remove trailing space in messages
Frans Pop [Wed, 24 Mar 2010 18:46:30 +0000 (19:46 +0100)]
wireless/ath: remove trailing space in messages

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 8 Apr 2010 17:34:54 +0000 (13:34 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6 into merge

Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-tx.c

14 years agomac80211: fix paged RX crypto
Johannes Berg [Wed, 7 Apr 2010 09:26:56 +0000 (11:26 +0200)]
mac80211: fix paged RX crypto

WEP crypto was broken, but upon finding the problem
it is evident that other things were broken by the
paged RX patch as well.

To fix it, for now move the linearising in front.
This means that we linearise all frames, which is
not at all what we want, but at least it fixes the
problem for now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix some RX aggregation locking
Johannes Berg [Tue, 6 Apr 2010 09:18:48 +0000 (11:18 +0200)]
mac80211: fix some RX aggregation locking

A few places in mac80211 do not currently acquire
the sta lock for RX aggregation, but they should.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: clean up/fix aggregation code
Johannes Berg [Tue, 6 Apr 2010 09:18:47 +0000 (11:18 +0200)]
mac80211: clean up/fix aggregation code

The aggregation code has a number of quirks, like
inventing an unneeded WLAN_BACK_TIMER value and
leaking memory under certain circumstances during
station destruction. Fix these issues by using
the regular aggregation session teardown code and
blocking new aggregation sessions, all before the
station is really destructed.

As a side effect, this gets rid of the long code
block to destroy aggregation safely.

Additionally, rename tid_state_rx which can only
have the values IDLE and OPERATIONAL to
tid_active_rx to make it easier to understand
that there is no bitwise stuff going on on the
RX side -- the TX side remains because it needs
to keep track of the driver and peer states.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: rename WLAN_STA_SUSPEND to WLAN_STA_BLOCK_BA
Johannes Berg [Tue, 6 Apr 2010 09:18:46 +0000 (11:18 +0200)]
mac80211: rename WLAN_STA_SUSPEND to WLAN_STA_BLOCK_BA

I want to use it during station destruction as well
so rename it to WLAN_STA_BLOCK_BA which is also the
only use of it now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove ieee80211_sta_stop_rx_ba_session
Johannes Berg [Tue, 6 Apr 2010 09:18:45 +0000 (11:18 +0200)]
mac80211: remove ieee80211_sta_stop_rx_ba_session

All callers of ieee80211_sta_stop_rx_ba_session can
just call __ieee80211_stop_rx_ba_session instead
because they already have the station struct, so do
that and remove ieee80211_sta_stop_rx_ba_session.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove irq disabling for sta lock
Johannes Berg [Tue, 6 Apr 2010 09:18:44 +0000 (11:18 +0200)]
mac80211: remove irq disabling for sta lock

All other places except one in the TX path, which
has BHs disabled, and it also cannot be locked from
interrupts so disabling IRQs is not necessary.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix station destruction problem
Johannes Berg [Tue, 6 Apr 2010 09:18:43 +0000 (11:18 +0200)]
mac80211: fix station destruction problem

When a station w/o a key is destroyed, or when
a driver submits work for a station and thereby
references it again, it seems like potentially
we could reference the station structure while
it is being destroyed.

Wait for an RCU grace period to elapse before
finishing destroying the station after we have
removed the station from the driver and from
the hash table etc., even in the case where no
key is associated with the station.

Also, there's no point in deleting the plink
timer here since it'll be properly deleted just
a bit later.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Configure the beacon timers once the scan is completed.
Vivek Natarajan [Mon, 5 Apr 2010 09:18:06 +0000 (14:48 +0530)]
ath9k_htc: Configure the beacon timers once the scan is completed.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Add support for power save.
Vivek Natarajan [Mon, 5 Apr 2010 09:18:05 +0000 (14:48 +0530)]
ath9k_htc: Add support for power save.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Add support for newer AR9285 chipsets.
Vivek Natarajan [Mon, 5 Apr 2010 09:18:04 +0000 (14:48 +0530)]
ath9k: Add support for newer AR9285 chipsets.

This patch adds support for a modified newer version of AR9285
chipsets.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: Add local-state-change-only auth/deauth/disassoc
Jouni Malinen [Sun, 4 Apr 2010 06:37:19 +0000 (09:37 +0300)]
cfg80211: Add local-state-change-only auth/deauth/disassoc

cfg80211 is quite strict on allowing authentication and association
commands only in certain states. In order to meet these requirements,
user space applications may need to clear authentication or
association state in some cases. Currently, this can be done with
deauth/disassoc command, but that ends up sending out Deauthentication
or Disassociation frame unnecessarily. Add a new nl80211 attribute to
allow this sending of the frame be skipped, but with all other
deauth/disassoc operations being completed.

Similar state change is also needed for IEEE 802.11r FT protocol in
the FT-over-DS case which does not use Authentication frame exchange
in a transition to another BSS. For this to work with cfg80211, an
authentication entry needs to be created for the target BSS without
sending out an Authentication frame. The nl80211 authentication
command can be used for this purpose, too, with the new attribute to
indicate that the command is only for changing local state. This
enables wpa_supplicant to complete FT-over-DS transition successfully.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: use DRIVER_NAME macro in wl1251_spi_driver
Kalle Valo [Fri, 2 Apr 2010 12:31:46 +0000 (15:31 +0300)]
wl1251: use DRIVER_NAME macro in wl1251_spi_driver

Better use the macro for consistency, the content is the same anyway.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Adaptive Noise Immunity (ANI) Implementation
Bruno Randolf [Fri, 2 Apr 2010 09:44:08 +0000 (18:44 +0900)]
ath5k: Adaptive Noise Immunity (ANI) Implementation

This is an Adaptive Noise Imunity (ANI) implementation for ath5k. I have looked
at both ath9k and HAL sources (they are nearly the same), and even though i
have implemented some things differently, the basic algorithm is practically
the same, for now. I hope that this can serve as a clean start to improve the
algorithm later.

This also adds a possibility to manually control ANI settings, right now only
thru a debugfs file:
  * set lowest sensitivity (=highest noise immunity):
echo sens-low > /sys/kernel/debug/ath5k/phy0/ani
  * set highest sensitivity (=lowest noise immunity):
echo sens-high > /sys/kernel/debug/ath5k/phy0/ani
  * automatically control immunity (default):
echo ani-on > /sys/kernel/debug/ath5k/phy0/ani
  * to see the parameters in use and watch them change:
cat /sys/kernel/debug/ath5k/phy0/ani

Manually setting sensitivity will turn the automatic control off. You can also
control each of the five immunity parameters (noise immunity, spur immunity,
firstep, ofdm weak signal detection, cck weak signal detection) manually thru
the debugfs file.

This is tested on AR5414 and nearly doubles the thruput in a noisy 2GHz band.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: fix copy&paste typo
Rafał Miłecki [Thu, 1 Apr 2010 21:11:10 +0000 (23:11 +0200)]
b43: N-PHY: fix copy&paste typo

Reported-by: Myhailo Danylenko <isbear@ukrpost.net>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix tx queue flushing
Juuso Oikarinen [Thu, 1 Apr 2010 08:38:24 +0000 (11:38 +0300)]
wl1271: Fix tx queue flushing

This patch modifies tx-queue flushing to correspond with tx-path - i.e.
also frames for which no ack was requested are forwarded to the mac80211
for disposal.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix debug prints for beacon-loss and psm-entry-fail scenarios
Juuso Oikarinen [Thu, 1 Apr 2010 08:38:23 +0000 (11:38 +0300)]
wl1271: Fix debug prints for beacon-loss and psm-entry-fail scenarios

Remove ERROR print from psm-entry-fail scenario, instead use an INFO print.
Also, add INFO print to the beacon-loss scenario.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Configure a higher listen interval to AP upon association
Juuso Oikarinen [Thu, 1 Apr 2010 08:38:22 +0000 (11:38 +0300)]
wl1271: Configure a higher listen interval to AP upon association

Increase the fixed listen-interval max value configured to the mac80211 on
driver init. This value will allow a larger value to be configured to the
AP, which means the AP will buffer our frames longer.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Configure rates for templates
Juuso Oikarinen [Thu, 1 Apr 2010 08:38:21 +0000 (11:38 +0300)]
wl1271: Configure rates for templates

Configure meaningful rates to be used with the templates. For control frames,
use the determined basic rates (currently the lowest rate for the band) and
for data-frames (null-funcs) let the firmware use the current rate policy to
determine the rate.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Use minimum rate for each band for control messages
Juuso Oikarinen [Thu, 1 Apr 2010 08:38:20 +0000 (11:38 +0300)]
wl1271: Use minimum rate for each band for control messages

Currently the mac80211 is not telling a hardware rate controlled driver a
rate to use for association frames etc. So to be safe, use the lowest rate
of each band for communication.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix keep-alive related command error
Juuso Oikarinen [Thu, 1 Apr 2010 08:38:19 +0000 (11:38 +0300)]
wl1271: Fix keep-alive related command error

The firmware does not like the host configuring the keep-alive after it has
been once configured after a join-operation. Instead, it will complain about
invalid parameters, which do not break functionality, but do not look nice
in the syslog either.

This patch prevents the complaints by only configuring the keep-alive once
for an association, after the first time join is performed with the correct
bssid.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: added missing command header in wl1271_cmd_disconnect
Luciano Coelho [Thu, 1 Apr 2010 08:38:18 +0000 (11:38 +0300)]
wl1271: added missing command header in wl1271_cmd_disconnect

The command header was missing in the wl1271_cmd_disconnect structure.  It
was working fine by sheer luck, because the parameters are not critical and
because our wl1271_cmd_send() function was overwriting the rx_config_options
with the actual header.

This patch adds the header to the command structure.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: fix sdio driver name in wl1271_sdio_driver
Luciano Coelho [Thu, 1 Apr 2010 08:38:17 +0000 (11:38 +0300)]
wl1271: fix sdio driver name in wl1271_sdio_driver

Our SPI driver is called "wl1271_spi" in the driver information structure.
Let's use the same for SDIO so that things are aligned.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Add TL-WN422G v2 product ID
Sujith [Thu, 1 Apr 2010 04:58:24 +0000 (10:28 +0530)]
ath9k_htc: Add TL-WN422G v2 product ID

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: Don't check devid for ath9k_htc
Sujith [Thu, 1 Apr 2010 04:58:23 +0000 (10:28 +0530)]
ath9k_hw: Don't check devid for ath9k_htc

For USB devices, this check is invalid.
Remove the check so that new product IDs can be added.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath: Add a bus type field
Sujith [Thu, 1 Apr 2010 04:58:20 +0000 (10:28 +0530)]
ath: Add a bus type field

This can be used to store the bus types ( AHB/PCI/USB ).

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix compile error without debug enabled
Felix Fietkau [Wed, 31 Mar 2010 22:41:36 +0000 (15:41 -0700)]
ath9k: fix compile error without debug enabled

commits 8e6f5aa250d6013ec0d66f9f45f376678d3fc4ab and
db1a052b73f7c97f9e8b21f3f19a92313ed2acb1 accidentally introduced
compile errors that happens when ath9k debug is not enabled.
This patch fixes the declaration of the inline stubs to resolve this.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: remove ah->mask_reg, it's never used properly
Pavel Roskin [Wed, 31 Mar 2010 22:05:37 +0000 (18:05 -0400)]
ath9k: remove ah->mask_reg, it's never used properly

ah->mask_reg was used to hold different data throughout the driver.
ath9k_hw_init_interrupt_masks() used it to save the value written to
AR_IMR.  ath9k_hw_set_interrupts() used it to hold the interrupt mask as
defined in enum ath9k_int.  Those masks differ in many bits.

Use ah->imask instead of ah->mask_reg in ath9k_hw_set_interrupts() and
ath9k_hw_updatetxtriglevel().  That's what the code was meant to do.
ah->imask is initialized in ath9k_start(), so we don't need to
initialize it from ah->mask_reg.

Once it's done, ah->mask_reg becomes write-only, so it's replaced with a
local variable in ath9k_hw_init_interrupt_masks().

Signed-off-by: Pavel Roskin <proski@gnu.org>
Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move imask from sc to ah
Pavel Roskin [Wed, 31 Mar 2010 22:05:31 +0000 (18:05 -0400)]
ath9k: move imask from sc to ah

Add ah variable in the functions that didn't have it and used sc->imask.
Replace sc->sc_ah with ah in those functions.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: rename symbols in enum ath9k_internal_frame_type to avoid confusion
Pavel Roskin [Wed, 31 Mar 2010 22:05:25 +0000 (18:05 -0400)]
ath9k: rename symbols in enum ath9k_internal_frame_type to avoid confusion

Symbols starting with "ATH9K_INT" are also used for interrupt mask.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath: fix coding style/readability in ath/ar9170
Luis de Bethencourt [Wed, 31 Mar 2010 14:07:48 +0000 (15:07 +0100)]
ath: fix coding style/readability in ath/ar9170

This is a patch to files in ath/ar9170 that fixes a set of warnings
found by checkpatch.pl tool. A line over 80 characters, a few empty
spaces before tab and a few empty characters before a new line.

Signed-off-by: Luis de Bethencourt <luisbg@ubuntu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Add wakeup interrupt handler to rt2800pci.
Gertjan van Wingerde [Tue, 30 Mar 2010 21:50:26 +0000 (23:50 +0200)]
rt2x00: Add wakeup interrupt handler to rt2800pci.

This is needed to wake up the device automatically for receiving beacons,
and is required for proper powersave handling.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Add wakeup interrupt handler to rt61pci.
Gertjan van Wingerde [Tue, 30 Mar 2010 21:50:25 +0000 (23:50 +0200)]
rt2x00: Add wakeup interrupt handler to rt61pci.

This is needed to wake up the device automatically for receiving beacons,
and is required for proper powersave handling.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Disable auto wakeup before waking up device.
Gertjan van Wingerde [Tue, 30 Mar 2010 21:50:23 +0000 (23:50 +0200)]
rt2x00: Disable auto wakeup before waking up device.

In all drivers ensure that auto wakeup is disabled before waking up the device.
This is needed to prevent connection stability issues and problems in waking up
the device.

Based upon a patch from Ondrej Zary <linux@rainbow-software.org>

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas/sdio: 8686: set ECSI bit for 1-bit transfers
Daniel Mack [Tue, 6 Apr 2010 08:52:44 +0000 (10:52 +0200)]
libertas/sdio: 8686: set ECSI bit for 1-bit transfers

When operating in 1-bit mode, SDAT1 is used as dedicated interrupt line.
However, the 8686 will only drive this line when the ECSI bit is set in
the CCCR_IF register.

Thanks to Alagu Sankar for pointing me in the right direction.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alagu Sankar <alagusankar@embwise.com>
Cc: Volker Ernst <volker.ernst@txtr.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: Bing Zhao <bzhao@marvell.com>
Cc: libertas-dev@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath: fix code readability in regd.c
Luis de Bethencourt [Tue, 30 Mar 2010 15:44:33 +0000 (16:44 +0100)]
ath: fix code readability in regd.c

This is a patch to the ath/regd.c file that fixes two code
readability issues. A space between to separate two defines
and the indentation inside the ath_redg_is_eeprom_valid
function.

Signed-off-by: Luis de Bethencourt <luisbg@ubuntu.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoNet: wireless: ath: fix macros coding style issue in hw.c
Luis de Bethencourt [Mon, 29 Mar 2010 20:34:39 +0000 (21:34 +0100)]
Net: wireless: ath: fix macros coding style issue in hw.c

This is a patch to the ath/hw.c file that fixes up a warning about
macros found by the checkpatch.pl tool, that said that complex values
should be enclosed in parenthesis.

Signed-off-by: Luis de Bethencourt <luisbg@ubuntu.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix robust management frame handling (MFP)
Jouni Malinen [Mon, 29 Mar 2010 05:29:52 +0000 (22:29 -0700)]
mac80211: Fix robust management frame handling (MFP)

Commit e34e09401ee9888dd662b2fca5d607794a56daf2 incorrectly removed
use of ieee80211_has_protected() from the management frame case and in
practice, made this validation drop all Action frames when MFP is
enabled. This should have only been done for frames with Protected
field set to zero.

Signed-off-by: Jouni Malinen <j@w1.fi>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Tue, 6 Apr 2010 20:37:10 +0000 (16:37 -0400)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6

14 years agoath9k: fix double calls to ath_radio_enable
Felix Fietkau [Tue, 6 Apr 2010 19:05:01 +0000 (12:05 -0700)]
ath9k: fix double calls to ath_radio_enable

With the enable_radio being uninitialized, ath_radio_enable() might be
called twice, which can leave some hardware in an undefined state.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: annotate station rcu dereferences
Johannes Berg [Tue, 6 Apr 2010 09:18:42 +0000 (11:18 +0200)]
mac80211: annotate station rcu dereferences

The new RCU lockdep support warns about these
in some contexts -- make it aware of the locks
used to protect all this. Different locks are
used in different contexts which unfortunately
means we can't get perfect checking.

Also remove rcu_dereference() from two places
that don't actually dereference the pointers.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Handle mesh action frames in ieee80211_rx_h_action
Javier Cardona [Mon, 29 Mar 2010 18:00:20 +0000 (11:00 -0700)]
mac80211: Handle mesh action frames in ieee80211_rx_h_action

This fixes the problem introduced in commit
8404080568613d93ad7cf0a16dfb68 which broke mesh peer link establishment.

changes:
v2  Added missing break (Johannes)
v3  Broke original patch into two (Johannes)

Signed-off-by: Javier Cardona <javier@cozybit.com>
Cc: stable@kernel.org
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: remove MCU requests for SoC platforms
Luis Correia [Sat, 3 Apr 2010 11:49:53 +0000 (12:49 +0100)]
rt2x00: remove MCU requests for SoC platforms

The ralink SoC platforms do not have an MCU.

Signed-off-by: Luis Correia <luis.f.correia@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
14 years agoiwlwifi: remove trailing space in messages
Frans Pop [Wed, 24 Mar 2010 21:19:58 +0000 (14:19 -0700)]
iwlwifi: remove trailing space in messages

Includes minor improvements in debugging messages in iwl-4965.c,
function iwl4965_is_temp_calib_needed().

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: code cleanup for generic defines
Wey-Yi Guy [Tue, 23 Mar 2010 18:37:59 +0000 (11:37 -0700)]
iwlwifi: code cleanup for generic defines

Some defines used by all agn devices, but the definitions were in
iwl-4965-hw.h, move those to iwl-agn-hw.h which is the better place for
those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: deprecate "iwl4965" alias support
Wey-Yi Guy [Tue, 23 Mar 2010 17:17:03 +0000 (10:17 -0700)]
iwlwifi: deprecate "iwl4965" alias support

Internal alias support has been present in module-init-tools for some
time, the MODULE_ALIAS("iwl4965") boilerplate aliases can be removed.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: clear rxq->queue in queue reset
Zhu Yi [Tue, 23 Mar 2010 02:33:41 +0000 (19:33 -0700)]
iwlwifi: clear rxq->queue in queue reset

In iwl_rx_queue_reset(), we didn't clear the rxq->queue[]. This might
cause the same rxb appears on multiple places in rxq->queue. Although
this won't cause any problem because of the read and write pointers
protection in rxq, we'd better clear it to avoid misleading.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove irrelevant comments
Wey-Yi Guy [Mon, 22 Mar 2010 21:42:03 +0000 (14:42 -0700)]
iwlwifi: remove irrelevant comments

Removing irrelevant comments from iwl-agn.c

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: merge module parameters into single place
Wey-Yi Guy [Mon, 22 Mar 2010 16:17:39 +0000 (09:17 -0700)]
iwlwifi: merge module parameters into single place

Module parameters used to be defined in both iwl-5000.c and iwl-4965.c,
after the code re-structure, merge into iwl-agn.c for easy to read and
maintenance.

Number of module parameters are deprecated after this merge. These are also
scheduled for removal by 2.6.40.

The current supported parameters are:

 parm: debug50:50XX debug output mask (deprecated) (uint)
 parm: debug:debug output mask (uint)
 parm: swcrypto50:using crypto in software (default 0 [hardware])
(deprecated) (bool)
 parm: swcrypto:using crypto in software (default 0 [hardware]) (int)
 parm: queues_num50:number of hw queues in 50xx series (deprecated)
(int)
 parm: queues_num:number of hw queues. (int)
 parm: 11n_disable50:disable 50XX 11n functionality (deprecated) (int)
 parm: 11n_disable:disable 11n functionality (int)
 parm: amsdu_size_8K50:enable 8K amsdu size in 50XX series (deprecated)
(int)
 parm: amsdu_size_8K:enable 8K amsdu size (int)
 parm: fw_restart50:restart firmware in case of error (deprecated) (int)
 parm: fw_restart:restart firmware in case of error (int)
 parm: disable_hw_scan:disable hardware scanning (default 0) (int)

Remove "antenna" module parameter, it is not being used in "agn" driver.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: avoid Tx queue memory allocation in interface down
Zhu Yi [Tue, 23 Mar 2010 07:45:03 +0000 (00:45 -0700)]
iwlwifi: avoid Tx queue memory allocation in interface down

We used to free all the Tx queues memory when interface is brought
down and reallocate them again in interface up. This requires
order-4 allocation for txq->cmd[]. In situations like s2ram, this
usually leads to allocation failure in the memory subsystem. The
patch fixed this problem by allocating the Tx queues memory only at
the first time. Later iwl_down/iwl_up only initialize but don't
free and reallocate them. The memory is freed at the device removal
time. BTW, we have already done this for the Rx queue.

This fixed bug https://bugzilla.kernel.org/show_bug.cgi?id=15551

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: use consistent table for tx data collect
Shanyu Zhao [Fri, 19 Mar 2010 20:34:45 +0000 (13:34 -0700)]
iwlwifi: use consistent table for tx data collect

When collecting tx data for non-aggregation packets in rate scaling, if
the tx data matches "other table", it still uses current table to update
the stats and calculate average throughput in function rs_collect_tx_data().
This can mess up the rate scaling data structure and cause a kernel panic
in a BUG_ON statement in rs_rate_scale_perform().

To fix this bug, we pass table pointer instead of window pointer (pointed
to by table pointer) to function rs_collect_tx_data() so that the table
being used is consistent.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Henry Zhang <hongx.c.zhang@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: fix DMA allocation warnings
Zhu Yi [Mon, 22 Mar 2010 09:28:41 +0000 (02:28 -0700)]
iwlwifi: fix DMA allocation warnings

Below warning is triggered sometimes at module removal time when
CONFIG_DMA_API_DEBUG is enabled. This should be caused by we didn't
unmap pending commands (enqueued, but no complete notification
received) for the Tx command queue.

[ 1583.107469] ------------[ cut here ]------------
[ 1583.107539] WARNING: at lib/dma-debug.c:688
dma_debug_device_change+0x13c/0x180()
[ 1583.107617] Hardware name: ...
[ 1583.107664] pci 0000:04:00.0: DMA-API: device driver has pending DMA
allocations while released from device [count=1]
[ 1583.107713] Modules linked in: ...
[ 1583.111661] Pid: 16970, comm: modprobe Tainted: G        W
2.6.34-rc1-wl #33
[ 1583.111727] Call Trace:
[ 1583.111779]  [<c02a281c>] ? dma_debug_device_change+0x13c/0x180
[ 1583.111833]  [<c02a281c>] ? dma_debug_device_change+0x13c/0x180
[ 1583.111908]  [<c0138e11>] warn_slowpath_common+0x71/0xd0
[ 1583.111963]  [<c02a281c>] ? dma_debug_device_change+0x13c/0x180
[ 1583.112016]  [<c0138ebb>] warn_slowpath_fmt+0x2b/0x30
[ 1583.112086]  [<c02a281c>] dma_debug_device_change+0x13c/0x180
[ 1583.112142]  [<c03e6c33>] notifier_call_chain+0x53/0x90
[ 1583.112198]  [<c03e1ebe>] ? down_read+0x6e/0x90
[ 1583.112271]  [<c015b229>] __blocking_notifier_call_chain+0x49/0x70
[ 1583.112326]  [<c015b26f>] blocking_notifier_call_chain+0x1f/0x30
[ 1583.112380]  [<c031931c>] __device_release_driver+0x8c/0xa0
[ 1583.112451]  [<c03193bf>] driver_detach+0x8f/0xa0
[ 1583.112538]  [<c0318382>] bus_remove_driver+0x82/0x100
[ 1583.112595]  [<c0319ad9>] driver_unregister+0x49/0x80
[ 1583.112671]  [<c024feb2>] ? sysfs_remove_file+0x12/0x20
[ 1583.112727]  [<c02aa292>] pci_unregister_driver+0x32/0x80
[ 1583.112791]  [<fc13a3c1>] iwl_exit+0x12/0x19 [iwlagn]
[ 1583.112848]  [<c017940a>] sys_delete_module+0x15a/0x210
[ 1583.112870]  [<c015a5db>] ? up_read+0x1b/0x30
[ 1583.112893]  [<c029600c>] ? trace_hardirqs_off_thunk+0xc/0x10
[ 1583.112924]  [<c0295ffc>] ? trace_hardirqs_on_thunk+0xc/0x10
[ 1583.112947]  [<c03e6a1f>] ? do_page_fault+0x1ff/0x3c0
[ 1583.112978]  [<c03e36f6>] ? restore_all_notrace+0x0/0x18
[ 1583.113002]  [<c016aa70>] ? trace_hardirqs_on_caller+0x20/0x190
[ 1583.113025]  [<c0102d58>] sysenter_do_call+0x12/0x38
[ 1583.113054] ---[ end trace fc23e059cc4c2ced ]---

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agomac80211: Fix drop_unencrypted for MFP with hwaccel
Jouni Malinen [Mon, 29 Mar 2010 05:31:15 +0000 (22:31 -0700)]
mac80211: Fix drop_unencrypted for MFP with hwaccel

Commit bef5d1c70d132145c0fc75b3586a19841a9a82e4 split
ieee80211_drop_unencrypted() into separate functions that are used for
Data and Management frames. However, it did not handle the
RX_FLAG_DECRYPTED correctly for Management frames:
ieee80211_drop_unencrypted() can only return 0 for Management frames,
so there is no point in calling it here. Instead, just check the
status->flag directly.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless/ipw2x00: remove trailing space in messages
Frans Pop [Wed, 24 Mar 2010 18:46:31 +0000 (19:46 +0100)]
wireless/ipw2x00: remove trailing space in messages

Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoar9170usb: fix panic triggered by undersized rxstream buffer
Christian Lamparter [Tue, 23 Mar 2010 20:51:14 +0000 (21:51 +0100)]
ar9170usb: fix panic triggered by undersized rxstream buffer

While ar9170's USB transport packet size is currently set to 8KiB,
the PHY is capable of receiving AMPDUs with up to 64KiB.
Such a large frame will be split over several rx URBs and
exceed the previously allocated space for rx stream reconstruction.

This patch increases the buffer size to 64KiB which is
in fact the phy & rx stream designed size limit.

Cc: stable@kernel.org
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=15591
Reported-by: Christian Mehlis <mehlis@inf.fu-berlin.de>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoinclude/net/iw_handler.h: Use SIOCIWFIRST not SIOCSIWCOMMIT in comment
Joe Perches [Fri, 19 Mar 2010 01:29:34 +0000 (18:29 -0700)]
include/net/iw_handler.h: Use SIOCIWFIRST not SIOCSIWCOMMIT in comment

to match use in IW_IOCTL_IDX macro

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: reenable station del for mesh
Marco Porsch [Tue, 30 Mar 2010 08:00:16 +0000 (10:00 +0200)]
nl80211: reenable station del for mesh

iw dev <devname> station del <MAC address> is quiet useful in mesh mode and should be possible.

Signed-off-by: Marco Porsch <marco.porsch@siemens.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Do not indicate RX_FLAG_DECRYPTED for unprotected frames
Jouni Malinen [Tue, 30 Mar 2010 06:37:36 +0000 (23:37 -0700)]
ath9k: Do not indicate RX_FLAG_DECRYPTED for unprotected frames

mac80211 skips drop_unencrypted checks if the driver/firmware has
already taken care of this. In case of ath9k, we must not indicate
that the frame was decrypted if no decryption was actually done.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix dropping of unprotected robust multicast frames
Jouni Malinen [Tue, 30 Mar 2010 06:36:15 +0000 (23:36 -0700)]
mac80211: Fix dropping of unprotected robust multicast frames

When selecting the RX key for group-addressed robust management
frames, we do not actually select any BIP key if the frame is
unprotected (since we cannot find the key index from MMIE). This
results in the drop_unencrypted check in failing to drop the frame. It
is enough to verify that we have a STA entry for the transmitter and
that MFP is enabled for that STA; we do not need to check rx->key
here. This fixes BIP processing for unprotected, group-addressed,
robust management frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix BIP to be used only with group-addressed frames
Jouni Malinen [Tue, 30 Mar 2010 06:35:23 +0000 (23:35 -0700)]
mac80211: Fix BIP to be used only with group-addressed frames

BIP (part of IEEE 802.11w) is only supposed to be used with
group-addressed frames. We ended up picking it as a default mechanism
for every management whenever we did not have a STA entry for the
destination (e.g., for Probe Response to a STA that is not
associated). While the extra MMIE in the end of management frames
should not break frames completed in most cases, there is no point in
doing this. Fix key selection to pick the default management key only
if the frame is sent to multicast/broadcast address and the frame is a
robust management frame.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Send deauth/disassoc prior to dropping STA entry
Jouni Malinen [Tue, 30 Mar 2010 06:29:31 +0000 (23:29 -0700)]
mac80211: Send deauth/disassoc prior to dropping STA entry

When management frame protection (IEEE 802.11w) is used, the
deauthentication and disassociation frames must be protected whenever
the encryption keys are configured. We were removing the STA entry and
with it, the keys, just before actually sending out these frames which
meant that the frames went out unprotected. The AP will drop them in
such a case. Fix this by reordering the operations a bit so that
sta_info_destroy_addr() gets called only after
ieee80211_send_deauth_disassoc().

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Track Beacon signal strength and implement cqm events
Jouni Malinen [Tue, 30 Mar 2010 06:28:30 +0000 (23:28 -0700)]
mac80211: Track Beacon signal strength and implement cqm events

Calculate a running average of the signal strength reported for Beacon
frames and indicate cqm events if the average value moves below or
above the configured threshold value (and filter out repetitive events
with by using the configured hysteresis).

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Fix TKIP encryption
Sujith [Tue, 30 Mar 2010 03:18:27 +0000 (08:48 +0530)]
ath9k_htc: Fix TKIP encryption

Set IEEE80211_HW_RX_INCLUDES_FCS to indicate that
the FCS is present in RX frames. Also, remove a redundant
assignment of skb length and include the FCS_LEN
when checking padding.

Fixing this issue makes TKIP work.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: allocate tx and rx status information on stack
Felix Fietkau [Tue, 30 Mar 2010 03:14:23 +0000 (20:14 -0700)]
ath9k: allocate tx and rx status information on stack

ath_tx_status and ath_rx_status data are only necessary for a short
time, until they have been processed and converted into mac80211 data
structures.
Because of that, it makes no sense to keep them tied to the DMA
descriptor, that only wastes precious memory.
This patch allocates the data on stack in the functions that call the
conversion functions from ath9k_hw.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: split out access to rx status information
Felix Fietkau [Tue, 30 Mar 2010 03:09:27 +0000 (20:09 -0700)]
ath9k: split out access to rx status information

This patch passes in a pointer to the ath_rx_status data structure for
functions that need it, instead of letting them grab it directly from
the ath_desc struct. This is useful for making it possible to allocate
the intermediate rx status data separately.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: split out access to tx status information
Felix Fietkau [Tue, 30 Mar 2010 03:07:11 +0000 (20:07 -0700)]
ath9k: split out access to tx status information

This patch passes in a pointer to the ath_tx_status data structure for
functions that need it, instead of letting them grab it directly from
the ath_desc struct. This is useful for making it possible to allocate
the intermediate tx status data separately.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2200: restart adapter only when abort_scan doesn't work
Zhu Yi [Tue, 30 Mar 2010 01:36:16 +0000 (09:36 +0800)]
ipw2200: restart adapter only when abort_scan doesn't work

When a scan watchdog is fired, try to send abort scan command
first before restarting the adapter. This avoids reconnection for
some users when scan hang is detected.

This fixed bug https://bugzilla.kernel.org/show_bug.cgi?id=15419

Reported-by: Maurizio Avogadro <mavoga@gmail.com>
Tested-by: Maurizio Avogadro <mavoga@gmail.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Initialize HW opmode
Sujith [Mon, 29 Mar 2010 10:37:20 +0000 (16:07 +0530)]
ath9k_htc: Initialize HW opmode

Not setting the opmode properly during initialization
results in the firmware sending up a bunch of packets
before add_interface() has been called, for the first
interface.

This patch fixes the issue by setting the initial mode
to 'managed'.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Handle TX queue overflow
Sujith [Mon, 29 Mar 2010 10:37:17 +0000 (16:07 +0530)]
ath9k_htc: Handle TX queue overflow

Stop/restart TX queues when the internal SKB
queue is full. This helps handle TX better
under heavy load.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Simplify RX URB management
Sujith [Mon, 29 Mar 2010 10:37:15 +0000 (16:07 +0530)]
ath9k_htc: Simplify RX URB management

This patch introduces the usage of URB anchors,
thus reducing a large amount of code dealing with
URB maintenance within the driver. The RX callback now
takes care of freeing the SKB associated with each URB.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Fix watchdog pattern parsing
Sujith [Mon, 29 Mar 2010 10:37:14 +0000 (16:07 +0530)]
ath9k_htc: Fix watchdog pattern parsing

Skip beyond the watchdog pattern properly.
This fixes occasional failure of the driver to load.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Fix bug in aggregation initiation
Sujith [Mon, 29 Mar 2010 10:37:11 +0000 (16:07 +0530)]
ath9k_htc: Fix bug in aggregation initiation

Accessing the sta pointer in TX completion without
approprate RCU protection is wrong. Fix this.

Also, RCU protection is needed when the station's
aggregation state is updated. Handle this properly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_common: Move RX filter code to ath9k_htc
Sujith [Mon, 29 Mar 2010 10:37:09 +0000 (16:07 +0530)]
ath9k_common: Move RX filter code to ath9k_htc

The calculation of RX filter is fairly different
between ath9k and ath9k_htc, trying to make this
common between the two drivers would result in code churn.

While at it, remove the handling of PSPOLL filter,
it can be added when(if) AP support is added to ath9k_htc.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: enable QoS explicitly in AP mode
Stanislaw Gruszka [Mon, 29 Mar 2010 10:18:36 +0000 (12:18 +0200)]
mac80211: enable QoS explicitly in AP mode

Enable QoS explicitly, when user space AP program will setup a QoS
queues. Currently this is not needed as iwlwifi not work in AP mode
and no other driver implement enable/disable QoS.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: manage QoS by mac stack
Stanislaw Gruszka [Mon, 29 Mar 2010 10:18:35 +0000 (12:18 +0200)]
iwlwifi: manage QoS by mac stack

We activate/deactivate QoS and setup default queue parameters in iwlwifi
driver. Mac stack do the same, so we do not need repeat that work here.
Stack also will tell when disable QoS, this will fix driver when working
with older APs, that do not have QoS implemented.

Patch make "force = true" in iwl_active_qos() assuming we always want
to do with QoS what mac stack wish.

Patch also remove unused qos_cap bits, do not initialize qos_active = 0,
as we have it initialized to zero by kzalloc.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: explicitly disable/enable QoS
Stanislaw Gruszka [Mon, 29 Mar 2010 10:18:34 +0000 (12:18 +0200)]
mac80211: explicitly disable/enable QoS

Add interface to disable/enable QoS (aka WMM or WME). Currently drivers
enable it explicitly when ->conf_tx method is called, and newer disable.
Disabling is needed for some APs, which do not support QoS, such
we should send QoS frames to them.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove skb_linearize for rx frames
Zhu Yi [Mon, 29 Mar 2010 08:42:26 +0000 (16:42 +0800)]
iwlwifi: remove skb_linearize for rx frames

Remove skb_linearize() in the iwlwifi drivers since
mac80211 supports paged rx SKBs now.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: support paged rx SKBs
Zhu Yi [Mon, 29 Mar 2010 09:35:07 +0000 (17:35 +0800)]
mac80211: support paged rx SKBs

Mac80211 drivers can now pass paged SKBs to mac80211 via
ieee80211_rx{_irqsafe}. The implementation currently use
skb_linearize() in a few places i.e. management frame
handling, software decryption, defragmentation and A-MSDU
process. We will optimize them one by one later.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Cc: Kalle Valo <kalle.valo@iki.fi>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: fix value written on 2055 radio setup
Rafał Miłecki [Sun, 28 Mar 2010 22:53:16 +0000 (00:53 +0200)]
b43: N-PHY: fix value written on 2055 radio setup

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: prepare for rev3+ channel tables
Rafał Miłecki [Sun, 28 Mar 2010 22:53:15 +0000 (00:53 +0200)]
b43: N-PHY: prepare for rev3+ channel tables

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: find table entry earlier for setting chanspec
Rafał Miłecki [Sun, 28 Mar 2010 22:53:14 +0000 (00:53 +0200)]
b43: N-PHY: find table entry earlier for setting chanspec

We do not want to partially change chanspec just to find out there is not
entry in table for given channel.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: use b43_phy_n_sfo_cfg rather than duplicating same fields
Rafał Miłecki [Sun, 28 Mar 2010 22:53:13 +0000 (00:53 +0200)]
b43: N-PHY: use b43_phy_n_sfo_cfg rather than duplicating same fields

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: some dummy PHY rev 3 calls
Rafał Miłecki [Sun, 28 Mar 2010 22:53:12 +0000 (00:53 +0200)]
b43: N-PHY: some dummy PHY rev 3 calls

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: rt2x00: rt2800usb: new ids
Xose Vazquez Perez [Sun, 28 Mar 2010 18:02:41 +0000 (20:02 +0200)]
wireless: rt2x00: rt2800usb: new ids

Taken from latest ralink linux driver(RT3070_LinuxSTA_V2.3.0.1_20100208)
All of them are RT3070 devices.

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.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>
14 years agowireless: rt2x00: rt2800pci: new id
Xose Vazquez Perez [Sun, 28 Mar 2010 15:48:05 +0000 (17:48 +0200)]
wireless: rt2x00: rt2800pci: new id

Taken from latest ralink linux driver, it's a RT3593 PCI/PCIe.

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.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>
14 years agowireless: rt2x00: rt2800usb: delete id
Xose Vazquez Perez [Sun, 28 Mar 2010 14:57:32 +0000 (16:57 +0200)]
wireless: rt2x00: rt2800usb: delete id

It was removed in the windows inf file by ralink.
And it isn't on ralink linux drivers.

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.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>
14 years agowireless: rt2x00: rt2800usb: identify ids-chips
Xose Vazquez Perez [Sun, 28 Mar 2010 13:52:43 +0000 (15:52 +0200)]
wireless: rt2x00: rt2800usb: identify ids-chips

Taken from ralink linux drivers:
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0B05,0x1784)}, /* Asus 3072 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x13D3,0x3305)}, /* AzureWave 3070*/
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x07D1,0x3C16)}, /* D-Link 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x203D,0x14A9)}, /* Encore 3070*/
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x1740,0x9707)}, /* EnGenius 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x1740,0x9708)}, /* EnGenius 3071 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x1740,0x9709)}, /* EnGenius 3072 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x04BB,0x0947)}, /* I-O DATA 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x04BB,0x0948)}, /* I-O DATA 3072 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x3822)}, /* MSI 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x3821)}, /* Ralink 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x3870)}, /* MSI 3070*/
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x3871)}, /* MSI 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x821A)}, /* Ralink 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x822A)}, /* MSI 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x870A)}, /* MSI 3070*/
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x871A)}, /* MSI 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DB0,0x899A)}, /* MSI 3070*/
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x20B8,0x8888)}, /* PARA INDUSTRIAL 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DF6,0x0048)}, /* Sitecom 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x0DF6,0x0047)}, /* Sitecom 3071 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x083A,0xA701)}, /* SMC 3070 */
RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c:        {USB_DEVICE(0x083A,0xA702)}, /* SMC 3072 */

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.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>
14 years agowl1271: Fix msleep() delay while waiting for completion
Saravanan Dhanabal [Fri, 26 Mar 2010 10:53:33 +0000 (12:53 +0200)]
wl1271: Fix msleep() delay while waiting for completion

After last transmission, the device goes to sleep earlier
than the configured dynamic power save timeout. If timeout
is set to 400ms, device enters into sleep mode at around
330ms since from last TX.

This patch removes the msleep(1), which causes the delay
after ELP wakeup. Replaced with udelay(10), the variation
is around 7-10ms.

Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Enable hardware keep alive messages
Juuso Oikarinen [Fri, 26 Mar 2010 10:53:32 +0000 (12:53 +0200)]
wl1271: Enable hardware keep alive messages

This patch will enable the hardware keep-alive mode, configure the required
template, configure keep-alive parameters, and re-order JOIN's and ACX_AID
in such a way that the keep-alive is activated.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Add keep-alive frame template support
Juuso Oikarinen [Fri, 26 Mar 2010 10:53:31 +0000 (12:53 +0200)]
wl1271: Add keep-alive frame template support

Add support for keep-alive templates, which are indexed.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Configure HW connection monitor
Juuso Oikarinen [Fri, 26 Mar 2010 10:53:30 +0000 (12:53 +0200)]
wl1271: Configure HW connection monitor

This patch configures the mac80211 to not perform connection monitoring
(periodic probe-requests) and instead rely on the hardware to do it.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Disconnect if PSM entry fails
Juuso Oikarinen [Fri, 26 Mar 2010 10:53:29 +0000 (12:53 +0200)]
wl1271: Disconnect if PSM entry fails

If PSM entry fails despite of retries, assume that the AP has been lost,
and indicate connection loss to the mac80211. This is much safer than
remaining in active mode.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Configure probe-request template when associated
Juuso Oikarinen [Fri, 26 Mar 2010 10:53:28 +0000 (12:53 +0200)]
wl1271: Configure probe-request template when associated

Configure a probe-request template to the wl1271 when associated - the
wl1271 will use this to attempt to recover a connection when beacon loss
is detected.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix memory leak in firmware crash scenario
Juuso Oikarinen [Fri, 26 Mar 2010 10:53:27 +0000 (12:53 +0200)]
wl1271: Fix memory leak in firmware crash scenario

The driver tx-queue flush operation leaks broadcast-frames. This leak occurs
if the driver is shut down while there are frames in TX buffers (such as in
a firmware crash scenario.) Fix the leak.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Removed checking of PSM from handling BSS_LOST_EVENT
Teemu Paasikivi [Fri, 26 Mar 2010 10:53:26 +0000 (12:53 +0200)]
wl1271: Removed checking of PSM from handling BSS_LOST_EVENT

Change the driver to call ieee80211_beacon_loss function always when
BSS_LOST_EVENT is received. Reason for the change is that entering PSM
might fail before driver receives BSS_LOST_EVENT. In such case the
driver would disable PSM and the stack would not be notified about beacon
loss and connection loss detection would be delayed by tens of seconds.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>