]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
14 years agoath9k: Wakeup the chip in an appropriate place in ath_paprd_calibrate()
Vasanthakumar Thiagarajan [Thu, 24 Jun 2010 11:09:27 +0000 (04:09 -0700)]
ath9k: Wakeup the chip in an appropriate place in ath_paprd_calibrate()

Move ath9k_ps_wakeup() down just before accessing hw registers.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove unused paprd_txok
Vasanthakumar Thiagarajan [Thu, 24 Jun 2010 09:42:46 +0000 (02:42 -0700)]
ath9k: Remove unused paprd_txok

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix bug in paprd
Vasanthakumar Thiagarajan [Thu, 24 Jun 2010 09:42:44 +0000 (02:42 -0700)]
ath9k: Fix bug in paprd

It is possbile that the transmission of paprd test frame
might not get completed in 100ms if tx is stuck. Freeing
this skb upon timeout in ath_paprd_calibrate() will result
in accessing already freed memory when the associated pending
buffer is drained in txq. This patch fixes this issue.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2500usb: fallback to SW encryption for TKIP+AES
Ondrej Zary [Wed, 23 Jun 2010 10:57:15 +0000 (12:57 +0200)]
rt2500usb: fallback to SW encryption for TKIP+AES

HW crypto in rt2500usb does not seem to support keys with different ciphers,
which breaks TKIP+AES mode. Fall back to software encryption to fix it.

This should fix long-standing problems with rt2500usb and WPA, such as:
http://rt2x00.serialmonkey.com/phpBB/viewtopic.php?f=4&t=4834
https://bugzilla.redhat.com/show_bug.cgi?id=484888

Also tested that it does not break WEP, TKIP-only and AES-only modes.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: Add option to adjust transmit power
Juuso Oikarinen [Wed, 23 Jun 2010 09:12:38 +0000 (12:12 +0300)]
nl80211: Add option to adjust transmit power

This patch adds transmit power setting type and transmit power level attributes
to NL80211_CMD_SET_WIPHY in order to facilitate adjusting of the transmit power
level of the device.

The added attributes allow selection of automatic, limited or fixed transmit
power level, with the level definable in signed mBm format.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211/mac80211: Update set_tx_power to use mBm instead of dBm units
Juuso Oikarinen [Wed, 23 Jun 2010 09:12:37 +0000 (12:12 +0300)]
cfg80211/mac80211: Update set_tx_power to use mBm instead of dBm units

In preparation for a TX power setting interface in the nl80211, change the
.set_tx_power function to use mBm units instead of dBm for greater accuracy and
smaller power levels.

Also, already in advance move the tx_power_setting enumeration to nl80211.

This change affects the .tx_set_power function prototype. As a result, the
corresponding changes are needed to modules using it. These are mac80211,
iwmc3200wifi and rndis_wlan.

Cc: Samuel Ortiz <samuel.ortiz@intel.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoat76c50x-usb: Extract bssid from authentication frame
Sebastian Smolorz [Tue, 22 Jun 2010 14:55:17 +0000 (16:55 +0200)]
at76c50x-usb: Extract bssid from authentication frame

The driver at76c50x-usb is unable to authenticate with an AP since
kernel 2.6.31 for the following reason: The join command of the firmware
needs to be sent with the right bssid before any transmission can start.
Before kernel 2.6.31 mac80211 informed its drivers about the changing
bssid early enough for at76c50x-usb but during the development of 2.6.31
mac80211's behaviour changed. Now a new bssid is set after the
association.

This patch changes the tx routine of the driver at76c50x-usb in such a
way that a new bssid is extracted from an authentication frame and the
join command with that bssid is processed.

Signed-off-by: Sebastian Smolorz <sesmo@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoat76c50x-usb: Move function at76_join() several lines up
Sebastian Smolorz [Tue, 22 Jun 2010 14:53:37 +0000 (16:53 +0200)]
at76c50x-usb: Move function at76_join() several lines up

This patch does a simple code move of at76_join() so that
at76_mac80211_tx() follows at76_join() in the driver's source file.

This is a preparatory patch for the following patch where we need
to call at76_join() from at76_mac80211_tx() in order to
authenticate successfully with a bssid.

Signed-off-by: Sebastian Smolorz <sesmo@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: avoid scheduling while atomic in mesh_rx_plink_frame
John W. Linville [Mon, 21 Jun 2010 21:14:07 +0000 (17:14 -0400)]
mac80211: avoid scheduling while atomic in mesh_rx_plink_frame

While mesh_rx_plink_frame holds sta->lock...

mesh_rx_plink_frame ->
mesh_plink_inc_estab_count ->
ieee80211_bss_info_change_notify

...but ieee80211_bss_info_change_notify is allowed to sleep.  A driver
taking advantage of that allowance can cause a scheduling while
atomic bug.  Similar paths exist for mesh_plink_dec_estab_count,
so work around those as well.

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

Also, correct a minor kerneldoc comment error (mismatched function names).

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: stable@kernel.org
14 years agominstrel_ht: move minstrel_mcs_groups declaration to header file
John W. Linville [Thu, 24 Jun 2010 17:03:14 +0000 (13:03 -0400)]
minstrel_ht: move minstrel_mcs_groups declaration to header file

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
14 years agowireless: mark reg_mutex as static
John W. Linville [Thu, 24 Jun 2010 15:26:31 +0000 (11:26 -0400)]
wireless: mark reg_mutex as static

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agominstrel_ht: make *idx unsigned in minstrel_downgrade_rate
John W. Linville [Thu, 24 Jun 2010 15:18:38 +0000 (11:18 -0400)]
minstrel_ht: make *idx unsigned in minstrel_downgrade_rate

net/mac80211/rc80211_minstrel_ht.c:440:46: warning: incorrect type in argument 2 (different signedness)
net/mac80211/rc80211_minstrel_ht.c:440:46:    expected int *idx
net/mac80211/rc80211_minstrel_ht.c:440:46:    got unsigned int *<noident>
net/mac80211/rc80211_minstrel_ht.c:446:46: warning: incorrect type in argument 2 (different signedness)
net/mac80211/rc80211_minstrel_ht.c:446:46:    expected int *idx
net/mac80211/rc80211_minstrel_ht.c:446:46:    got unsigned int *<noident>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
14 years agomac80211: don't shadow mgmt variable in ieee80211_rx_h_action
John W. Linville [Thu, 24 Jun 2010 15:13:56 +0000 (11:13 -0400)]
mac80211: don't shadow mgmt variable in ieee80211_rx_h_action

net/mac80211/rx.c:2059:39: warning: symbol 'mgmt' shadows an earlier one
net/mac80211/rx.c:1916:31: originally declared here

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8180: mark rtl8180_beacon_work static
John W. Linville [Thu, 24 Jun 2010 15:08:37 +0000 (11:08 -0400)]
rtl8180: mark rtl8180_beacon_work static

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: declare MODULE_FIRMWARE for ath9k_htc
John W. Linville [Wed, 23 Jun 2010 18:20:45 +0000 (14:20 -0400)]
ath9k: declare MODULE_FIRMWARE for ath9k_htc

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: mark lbs_ret_802_11d_domain_info static
John W. Linville [Wed, 23 Jun 2010 14:33:45 +0000 (10:33 -0400)]
libertas: mark lbs_ret_802_11d_domain_info static

Probably little risk of namespace polution, but good practice... :-)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Add a module parameter to disable led blinking.
Vivek Natarajan [Tue, 22 Jun 2010 06:22:37 +0000 (11:52 +0530)]
ath9k: Add a module parameter to disable led blinking.

Some vendors require the LED to be ON always irrespective of any
radio activity. Introducing a module parameter to disable blinking,
so that one can choose between always on or led blink during
activity.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: add an extra delay when reseting AR_RTC_RESET
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:51 +0000 (18:38 -0400)]
ath9k_hw: add an extra delay when reseting AR_RTC_RESET

Without this we could start trying to work with the device without
it being fully functional yet and loose some packets upon resume.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: dynamically choose the SERDES array for low power
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:50 +0000 (18:38 -0400)]
ath9k_hw: dynamically choose the SERDES array for low power

The array we use will vary depending on whether or not we are
to go to lower power or not. The default values (iniPcieSerdes)
are a copy or what go into the registers through the INI files.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: add pcieSerDesWrite to disable SERDES ASPM tweaks
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:49 +0000 (18:38 -0400)]
ath9k_hw: add pcieSerDesWrite to disable SERDES ASPM tweaks

This can be useful during testing of new ASPM tweaks which often
have to be done through the PCI Serializer-Deserializer (SERDES).

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: move LowPower array writes to ar9003_hw_configpcipowersave()
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:48 +0000 (18:38 -0400)]
ath9k_hw: move LowPower array writes to ar9003_hw_configpcipowersave()

The LowPower array writes disables the PLL when ASPM is enabled.
The host driver makes quite a few calls to ath9k_hw_configpcipowersave()
and these same calls also need to ensure the PLL is off when they issue
it.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: fix ASPM setting for AR9003
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:47 +0000 (18:38 -0400)]
ath9k_hw: fix ASPM setting for AR9003

The AR_WA register should not be read when in sleep state so
add a variable we can stash its value into for when we need
to set it. Additionally the AR_WA_D3_TO_L1_DISABLE_REAL
(bit 16) needs to be removed.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoLibertas: Added 11d support using cfg80211
Kiran Divekar [Sat, 5 Jun 2010 06:20:42 +0000 (23:20 -0700)]
Libertas: Added 11d support using cfg80211

Added 11d support for libertas driver using cfg80211. This is based on Holger
Shurig's initial work to add cfg80211 support libertas.
(https://patchwork.kernel.org/patch/64286/)

Please let us know, if there are any improvements comments.

Code is added to send 11d enable command to firmware while
initialisation and pass 11d specific information to firmware
when notifier handler is called by cfg80211.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoLibertas: fix WARN_ON issues in cfg80211 support
Kiran Divekar [Sat, 5 Jun 2010 06:20:37 +0000 (23:20 -0700)]
Libertas: fix WARN_ON issues in cfg80211 support

In following scenarios WARN_ON() in cfg80211 code was triggered.
a) Driver unload or card removal.
b) Disconnect from infra network
c) Adhoc start/join
d) Adhoc stop
Added following fixes to avoid WARN_ON() in cfg80211 code.
a) Ensured that cfg80211_disconnected() function defined in cfg80211
code will be called only in infra mode.
b) Solved timing issue by moving cfg80211_disconnected() call inside
lbs_cfg_disconnect().
c) Updated "wdev->ssid" in driver code after Adhoc join/start
d) Removed unnecessory cfg80211_disconnected() call in lbs_remove_card.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoLibertas: cfg80211 support
Kiran Divekar [Mon, 14 Jun 2010 16:31:26 +0000 (22:01 +0530)]
Libertas: cfg80211 support

Holger Schurig's patch (https://patchwork.kernel.org/patch/64286/)
is rebased to latest wireless-testing tree.

(Includes patches from me originally posted as "libertas: fix build
error due to undefined symbol" and "libertas: unmangle capability
value". -- JWL)

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Tested-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Add interface for driver to temporarily disable dynamic ps
Juuso Oikarinen [Mon, 21 Jun 2010 05:59:39 +0000 (08:59 +0300)]
mac80211: Add interface for driver to temporarily disable dynamic ps

This mechanism introduced in this patch applies (at least) for hardware
designs using a single shared antenna for both WLAN and BT. In these designs,
the antenna must be toggled between WLAN and BT.

In those hardware, managing WLAN co-existence with Bluetooth requires WLAN
full power save whenever there is Bluetooth activity in order for WLAN to be
able to periodically relinquish the antenna to be used for BT. This is because
BT can only access the shared antenna when WLAN is idle or asleep.

Some hardware, for instance the wl1271, are able to indicate to the host
whenever there is BT traffic. In essence, the hardware will send an indication
to the host whenever there is, for example, SCO traffic or A2DP traffic, and
will send another indication when the traffic is over.

The hardware gets information of Bluetooth traffic via hardware co-existence
control lines - these lines are used to negotiate the shared antenna
ownership. The hardware will give the antenna to BT whenever WLAN is sleeping.

This patch adds the interface to mac80211 to facilitate temporarily disabling
of dynamic power save as per request of the WLAN driver. This interface will
immediately force WLAN to full powersave, hence allowing BT coexistence as
described above.

In these kind of shared antenna desings, when WLAN powersave is fully disabled,
Bluetooth will not work simultaneously with WLAN at all. This patch does not
address that problem. This interface will not change PSM state, so if PSM is
disabled it will remain so. Solving this problem requires knowledge about BT
state, and is best done in user-space.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix compile warning in scan.c.
Gertjan van Wingerde [Sun, 20 Jun 2010 18:28:07 +0000 (20:28 +0200)]
mac80211: Fix compile warning in scan.c.

Fix the following compile warning:

CC [M]  net/mac80211/scan.o
net/mac80211/scan.c: In function 'ieee80211_request_internal_scan':
net/mac80211/scan.c:749:23: warning: comparison between 'enum nl80211_band' and 'enum ieee80211_band'

caused by the local variable band not being of the proper 'ieee80211_band' type.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Clarify logged message after fatal DMA error and switch to PIO mode
Larry Finger [Sat, 19 Jun 2010 13:29:08 +0000 (08:29 -0500)]
b43: Clarify logged message after fatal DMA error and switch to PIO mode

The message following fatal DMA errors fails to indicate properly that the
driver has switched to PIO mode.

Signed-off-by: Larry Finger <Larry.Finger@wfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove non-exist reference
Wey-Yi Guy [Tue, 15 Jun 2010 00:13:14 +0000 (17:13 -0700)]
iwlwifi: remove non-exist reference

Remove the reference to non-exist function in iwlcore

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: code cleanup to remove un-necessary "goto"
Wey-Yi Guy [Tue, 15 Jun 2010 00:09:56 +0000 (17:09 -0700)]
iwlwifi: code cleanup to remove un-necessary "goto"

Break out of loop and log the error message when encounter error; this is
better approach than using "goto".

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move calibration from iwlcore to iwlagn
Wey-Yi Guy [Tue, 15 Jun 2010 00:09:55 +0000 (17:09 -0700)]
iwlwifi: move calibration from iwlcore to iwlagn

All the calibrations are "agn" only functions, move from iwlcore to
iwlagn.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move _agn statistics related structure
Wey-Yi Guy [Tue, 15 Jun 2010 00:09:54 +0000 (17:09 -0700)]
iwlwifi: move _agn statistics related structure

agn and 3945 has different statistics_notif data structure; since 3945
has it statistics_notif data structure inside the _3945 portion of
iwl_priv, it make sense to move the agn statistics_notif into _agn
portion.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move agn specific rx related code to iwl-agn-rx.c
Wey-Yi Guy [Tue, 15 Jun 2010 00:09:53 +0000 (17:09 -0700)]
iwlwifi: move agn specific rx related code to iwl-agn-rx.c

To avoid having unnecessary functions in iwlcore.ko, those that
are not shared by agn and 3945, move agn specific rx related code
to iwl-agn-rx.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: display ucode SW Error in hex
Jay Sternberg [Mon, 14 Jun 2010 21:40:40 +0000 (14:40 -0700)]
iwlwifi: display ucode SW Error in hex

errors are defined in hex but displayed as decimal.  displaying as hex
debugging easier and eliminated having to manually convert.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: return ucode errors from station management
Johannes Berg [Mon, 14 Jun 2010 15:32:38 +0000 (08:32 -0700)]
iwlwifi: return ucode errors from station management

When station management calls to ucode return
an error we could previously do nothing, but
now that almost all calls are synchronous we
can actually let the error bubble up. Use EIO
as the error as it best indicates a problem
with the device.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: use sync commands for keys
Johannes Berg [Mon, 14 Jun 2010 15:32:24 +0000 (08:32 -0700)]
iwlwifi: use sync commands for keys

Key management can use sync commands
instead of asynchronous ones to have
better error checking.

Also add checks that the commands all
should have the mutex held.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlagn: use mutex for aggregation
Johannes Berg [Wed, 16 Jun 2010 10:30:27 +0000 (03:30 -0700)]
iwlagn: use mutex for aggregation

Now that the ampdu_action callback can sleep,
we can use the mutex to properly protect the
aggregation data, and return useful errors if
they should happen.

Also, add some sleep and mutex debugging so
we won't call any of the functions that now
require being able to sleep and/or the mutex
to be held in an invalid context.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agomac80211: fix sw scan bracketing
Johannes Berg [Fri, 18 Jun 2010 10:32:20 +0000 (12:32 +0200)]
mac80211: fix sw scan bracketing

Currently, detection in hwsim and ath9k can
detect that two sw scans are in flight at the
same time, which isn't really true. It is
caused by a race condition, because the scan
complete callback is called too late, after
the lock has been dropped, so that a new scan
can be started before it is called.

It is also called too early semantically, as
it is currently called _after_ the return to
the operating channel -- it should be before
so that drivers know this is the operating
channel again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211_hwsim: fix fake_hw_scan
Johannes Berg [Fri, 18 Jun 2010 10:31:56 +0000 (12:31 +0200)]
mac80211_hwsim: fix fake_hw_scan

Since mac80211 will not set the max_scan parameters
if hw scan is enabled, hwsim needs to do it so that
cfg80211 won't reject the scan.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: move regulatory_init to .init.text
Uwe Kleine-König [Fri, 18 Jun 2010 07:38:55 +0000 (09:38 +0200)]
wireless: move regulatory_init to .init.text

regulatory_init is only called by cfg80211_init which is in .init.text,
too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: move cfg80211_exit to .exit.text
Uwe Kleine-König [Fri, 18 Jun 2010 07:38:54 +0000 (09:38 +0200)]
cfg80211: move cfg80211_exit to .exit.text

cfg80211_exit is only used as module_exit function, so it can go to
.exit.text saving a few bytes when CONFIG_CFG80211=y.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Update supported product list
Sujith [Thu, 17 Jun 2010 04:59:01 +0000 (10:29 +0530)]
ath9k_htc: Update supported product list

This patch adds USB IDs for some more supported
devices.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless:hostap_ap.c Fix warning: variable 'fc' set but not used
Justin P. Mattock [Wed, 16 Jun 2010 05:33:51 +0000 (22:33 -0700)]
wireless:hostap_ap.c Fix warning: variable 'fc' set but not used

The below patch fixes a warning message when compiling with gcc 4.6.0
  CC [M]  drivers/net/wireless/hostap/hostap_ap.o
drivers/net/wireless/hostap/hostap_ap.c: In function 'hostap_ap_tx_cb_assoc':
drivers/net/wireless/hostap/hostap_ap.c:691:6: warning: variable 'fc' set but not used

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless:hostap_main.c warning: variable 'iface' set but not used
Justin P. Mattock [Wed, 16 Jun 2010 05:33:50 +0000 (22:33 -0700)]
wireless:hostap_main.c warning: variable 'iface' set but not used

The patch below fixes a warning message Im seeing with gcc 4.6.0
 CC [M]  drivers/net/wireless/hostap/hostap_main.o
drivers/net/wireless/hostap/hostap_main.c: In function 'hostap_set_multicast_list_queue':
drivers/net/wireless/hostap/hostap_main.c:744:27: warning: variable 'iface' set but not used

Signed-off-by: Justin P. Mattock <justinmattock@gmail.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, 17 Jun 2010 20:21:14 +0000 (16:21 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

Conflicts:
net/mac80211/mlme.c

14 years agomac80211: fix warn, enum may be used uninitialized
Christoph Fritz [Wed, 16 Jun 2010 14:37:34 +0000 (16:37 +0200)]
mac80211: fix warn, enum may be used uninitialized

regression introduced by b8d92c9c141ee3dc9b3537b1f0ffb4a54ea8d9b2

In function â€˜ieee80211_work_rx_queued_mgmt’:
warning: â€˜rma’ may be used uninitialized in this function

this re-adds default value WORK_ACT_NONE back to rma

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: report PHY error frames only for chips which need it
Bruno Randolf [Wed, 16 Jun 2010 10:12:39 +0000 (19:12 +0900)]
ath5k: report PHY error frames only for chips which need it

Only report PHY error frames for ANI on chipsets which do not have PHY error
counters in hardware.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: review RX descriptor functions
Bruno Randolf [Wed, 16 Jun 2010 10:12:34 +0000 (19:12 +0900)]
ath5k: review RX descriptor functions

Reviewed RX descriptor functions against the HAL sources. Some minor changes:

  - check size before making changes to the descriptor

  - whitespace

  - add comments about 5210 timestamps. this needs to be adressed later!

  - FIFO overrun error only available on 5210

  - rs_phyerr should not be OR'ed

  - clear the whole ath5k_rx_status structure before using, instead of
    zeroing specific fields.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: take descriptor differences between 5210 and 5211 into account
Bruno Randolf [Wed, 16 Jun 2010 10:12:28 +0000 (19:12 +0900)]
ath5k: take descriptor differences between 5210 and 5211 into account

There are some differences between 5210 and 5211 descriptors which we did not
take into account before.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: update 5210/5211 frame types
Bruno Randolf [Wed, 16 Jun 2010 10:12:22 +0000 (19:12 +0900)]
ath5k: update 5210/5211 frame types

Update 5210 frame types to match the HAL. We have to apply the same bitshift to
the constants as we use later.

Add 5211 specific frame types.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: review and add comments for descriptors
Bruno Randolf [Wed, 16 Jun 2010 10:12:17 +0000 (19:12 +0900)]
ath5k: review and add comments for descriptors

I carefully reviewed desh.h against the HAL sources. Added comments and made
differences between 5210, 5211 and 5212 more clear by adding _521x to the
defines which are specific to that chipset. Renamed some defines. No functional
changes.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove pointless rx error overlay struct
Bruno Randolf [Wed, 16 Jun 2010 10:12:12 +0000 (19:12 +0900)]
ath5k: remove pointless rx error overlay struct

ath5k_hw_rx_error was only used once, where we could easily just use
ath5k_hw_rx_status as well, so remove it.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: cosmetic changes in ath5k_hw_proc_5212_rx_status()
Bruno Randolf [Wed, 16 Jun 2010 10:12:07 +0000 (19:12 +0900)]
ath5k: cosmetic changes in ath5k_hw_proc_5212_rx_status()

Just whitespace and indentation.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: use direct function calls for descriptors when possible
Bruno Randolf [Wed, 16 Jun 2010 10:12:01 +0000 (19:12 +0900)]
ath5k: use direct function calls for descriptors when possible

Use direct function calls for ath5k_hw_setup_rx_desc() and
ath5k_hw_setup_mrr_tx_desc() instead of a function pointer which always pointed
to the same function in the case of ath5k_hw_setup_rx_desc() and which is
easily unified in the case of ath5k_hw_setup_mrr_tx_desc().

Also simplify the initialization function for the remaining function pointers.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: move checks and stats into new function
Bruno Randolf [Wed, 16 Jun 2010 10:11:56 +0000 (19:11 +0900)]
ath5k: move checks and stats into new function

Create a new function ath5k_receive_frame_ok() which checks for errors, updates
error statistics and tells us if we want to further "receive" this frame or
not. This way we can avoid a goto and have a cleaner separation between buffer
handling and other things.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: split descriptor handling and frame receive
Bruno Randolf [Wed, 16 Jun 2010 10:11:51 +0000 (19:11 +0900)]
ath5k: split descriptor handling and frame receive

Move frame reception into it's own function to have a clearer separation
between buffer and descriptor handling and things that are done when we
actually receive a frame.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: unify rx descriptor error handling
Bruno Randolf [Wed, 16 Jun 2010 10:11:46 +0000 (19:11 +0900)]
ath5k: unify rx descriptor error handling

There is no reason for a special handling (return) here, just break like we do
with the checks before.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: reset more pointers after we free skbs
Bruno Randolf [Wed, 16 Jun 2010 10:11:41 +0000 (19:11 +0900)]
ath5k: reset more pointers after we free skbs

After we free skbs for receive or transmit descriptors, make sure we have no
pointers to the now invalid memory address.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: print more errors when decriptor setup fails
Bruno Randolf [Wed, 16 Jun 2010 10:11:35 +0000 (19:11 +0900)]
ath5k: print more errors when decriptor setup fails

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix rx descriptor debugging
Bruno Randolf [Wed, 16 Jun 2010 10:11:30 +0000 (19:11 +0900)]
ath5k: fix rx descriptor debugging

In the debug ouptut rx_status_0 was printed twice instead of rx_status_1. Also
make the debug message more clear.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix some comment typos
Bruno Randolf [Wed, 16 Jun 2010 10:11:25 +0000 (19:11 +0900)]
ath5k: fix some comment typos

Fix comment about dma sizes, brackets were missing. Replace 'insure' with
'ensure'.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: rename ath5k_txbuf_free() to ath5k_txbuf_free_skb()
Bruno Randolf [Wed, 16 Jun 2010 10:11:17 +0000 (19:11 +0900)]
ath5k: rename ath5k_txbuf_free() to ath5k_txbuf_free_skb()

Rename ath5k_txbuf_free() to ath5k_txbuf_free_skb() since this is what it does:
it frees the skb and not the buf. Same for ath5k_rxbuf_free().

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: more debug prints for resets
Bruno Randolf [Wed, 16 Jun 2010 10:11:12 +0000 (19:11 +0900)]
ath5k: more debug prints for resets

Add a debug print for every case of reset.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2200: Enable LED by default
ubuntu@tjworld.net [Mon, 23 Mar 2009 20:29:28 +0000 (20:29 +0000)]
ipw2200: Enable LED by default

BugLink: http://bugs.launchpad.net/bugs/21367
Enable LED by default and update the MODULE_PARM_DESC.  The original
reason for defaulting to disabled was documented in 2005 and noted, "The
LED code has been reported to hang some systems when running ifconfig
and is therefore disabled by default."  This no longer appears
applicable and users have been requesting this be enabled for several
years.

Signed-off-by: TJ <ubuntu@tjworld.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54usb: Comment out duplicate Medion MD40900 device id
Leann Ogasawara [Tue, 15 Jun 2010 21:01:51 +0000 (14:01 -0700)]
p54usb: Comment out duplicate Medion MD40900 device id

The Medion MD40900 device id [0x0cde, 0x0006] is defined twice.
Comment out the duplicate.

Originally-by: Ben Collins <ben.collins@ubuntu.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agozd1211rw: change ZD_REGDOMAIN_JAPAN_* naming
John W. Linville [Wed, 16 Jun 2010 18:41:36 +0000 (14:41 -0400)]
zd1211rw: change ZD_REGDOMAIN_JAPAN_* naming

ZD_REGDOMAIN_JAPAN_ADD and ZD_REGDOMAIN_JAPAN_GW_US54GXS seem a little
verbose to me...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agozd1211rw: add 0x49 -> JP regulatory domain map
Kouhei Sutou [Wed, 16 Jun 2010 12:53:59 +0000 (21:53 +0900)]
zd1211rw: add 0x49 -> JP regulatory domain map

0x49 is used by PLANEX GW-US54GXS (2019:5303).

Signed-off-by: Kouhei Sutou <kou@clear-code.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Fix ampdu_action callback
Sujith [Tue, 15 Jun 2010 04:54:37 +0000 (10:24 +0530)]
ath9k_htc: Fix ampdu_action callback

Now that ampdu_action() can sleep, remove all
the driver hacks and just issue WMI commands
to the target.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: avoid setting cwmin/cwmax to 0 for IBSS for AR9003
Luis R. Rodriguez [Tue, 15 Jun 2010 00:17:36 +0000 (20:17 -0400)]
ath9k_hw: avoid setting cwmin/cwmax to 0 for IBSS for AR9003

IBSS requires the cwmin and cwmax to be respected when
we reset the txqueues on AR9003 otherwise the distribution
of beacons will be balanced towards the AR9003 card first
preventing equal contention for air time for other peers
on the IBSS.

Without this IBSS will work but only the AR9003 card will be
be issuing beacons on the IBSS.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Synchronize WCID initialization with legacy driver
Ivo van Doorn [Mon, 14 Jun 2010 20:14:19 +0000 (22:14 +0200)]
rt2x00: Synchronize WCID initialization with legacy driver

Legacy rt2870 driver handles WCID differently then we expected,
the BSSID and Cipher value are 3 bit values, while the 4th bit
should be set elsewhere in an extended field.

After this, rt2800usb reports frames have been decrypted
successfully, indicating that the Hardware decryption now is
working correctly.

Signed-off-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 agort2x00: Enable HW crypto by default
Ivo van Doorn [Mon, 14 Jun 2010 20:13:56 +0000 (22:13 +0200)]
rt2x00: Enable HW crypto by default

Hardware cryptography seems to be working
on a 11G network with WPA/WPA2 cryptography
enabled. WEP still needs to be tested...

Signed-of-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 agort2x00: Limit TX done looping to number of TX ring entries
Ivo van Doorn [Mon, 14 Jun 2010 20:13:37 +0000 (22:13 +0200)]
rt2x00: Limit TX done looping to number of TX ring entries

Similar to rt2800pci, remove the check for duplicate
register reading, and instead limit the for-loop to
the maximum number of TX entries inside a queue.

Signed-off-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 agort2x00: Update author rt2800lib
Ivo van Doorn [Mon, 14 Jun 2010 20:13:15 +0000 (22:13 +0200)]
rt2x00: Update author rt2800lib

rt2800lib has been under development of the rt2x00 project,
so add it to the author string for the module information.

Signed-off-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 agort2x00: Enable fallback rates for rt61pci and rt73usb
Ivo van Doorn [Mon, 14 Jun 2010 20:12:54 +0000 (22:12 +0200)]
rt2x00: Enable fallback rates for rt61pci and rt73usb

Explicitly enable the usage of fallback rates for
the transmission of frames with rt61pci and rt73usb hardware.

Note that for txdone reporting, only rt61pci is capable of
reporting the fallback rates, for USB it is not possible
to determine the number of retries. However the device will
use the fallback rates, so it might still help in the performance.

Signed-off-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 agort2x00: Fix tx status reporting when falling back to the lowest rate
Helmut Schaa [Mon, 14 Jun 2010 20:12:26 +0000 (22:12 +0200)]
rt2x00: Fix tx status reporting when falling back to the lowest rate

In some corner cases the reported tx rates/retries didn't match the really
used ones.

The hardware lowers the tx rate on each consecutive retry by 1 (but won't
fall back from MCS to legacy rates) _until_ it reaches the lowest one.

In case the frame wasn't sent succesful the number of retries is 7 and if
a rate index <7 was used the previous code reported negative rate indexes
which were then ignored by the rate control algorithm and mac80211.

Instead, report the remaining number of retries to have happened with
the lowest rate (index 0). This should give the rate control algorithm
slightly more accurate information about the used tx rates/retries.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: provide mac80211 a suitable max_rates value
Helmut Schaa [Mon, 14 Jun 2010 20:12:01 +0000 (22:12 +0200)]
rt2x00: provide mac80211 a suitable max_rates value

Set up max_rates and max_rate_tries with suitable values even if we do not
support the whole functionality.

As rt2800 has a global fallback table we cannot specify more then one tx rate
per frame but since the hw will try several different rates (based on the
fallback table) we should still initialize max_rates to the maximum number of
rates we are going to try. Otherwise mac80211 will truncate our reported tx
rates and the rc algortihm will end up with incorrect data choosing unsuitable
rates for tx.

This improves throughput on rt2800 devices considerable.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix typo in rt2800_config_txpower
Helmut Schaa [Mon, 14 Jun 2010 20:11:32 +0000 (22:11 +0200)]
rt2x00: Fix typo in rt2800_config_txpower

Fix typo in rt2800_config_txpower.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix TX_STA_FIFO handling
Helmut Schaa [Mon, 14 Jun 2010 20:11:09 +0000 (22:11 +0200)]
rt2x00: Fix TX_STA_FIFO handling

Currently rt2800pci will read TX_STA_FIFO until the previously read value
matches the current value. However, it is obvious that TX_STA_FIFO only
contains values that can easily be the same for multiple consecutive frames
(especially when communicating with only one other STA). Hence, we often
ended up with reading only the first entry and ignoring the rest.

One result was that when the TX_STA_FIFO contained multiple entires, only
the first one was read and properly handled while the others remained in the
tx queue.

Thus, drop this check but introduce a maximum number of reads. All legacy
drivers use the size of the tx ring as limit but state that the TX_STA_FIFO
has only 16 entries. So, let's just stick with the tx ring size for now.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Add comment about BBP1_TX_POWER
Helmut Schaa [Mon, 14 Jun 2010 20:10:42 +0000 (22:10 +0200)]
rt2x00: Add comment about BBP1_TX_POWER

Add a comment about the meaning of BBP1_TX_POWER stating all possible values.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix IEEE80211_TX_CTL_MORE_FRAMES handling
Helmut Schaa [Mon, 14 Jun 2010 20:10:09 +0000 (22:10 +0200)]
rt2x00: Fix IEEE80211_TX_CTL_MORE_FRAMES handling

IEEE80211_TX_CTL_MORE_FRAMES indicates that more frames are queued for tx
but has nothing to do with fragmentation. Hence, don't set ENTRY_TXD_MORE_FRAG
but only ENTRY_TXD_BURST to not kick the tx queues immediately.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: only set TXDONE_FALLBACK in rt2800pci if the frame was retried
Helmut Schaa [Mon, 14 Jun 2010 20:09:41 +0000 (22:09 +0200)]
rt2x00: only set TXDONE_FALLBACK in rt2800pci if the frame was retried

TXDONE_FALLBACK expresses that fallback rates were used for retries. Hence,
it only makes sense to set the flag if retries > 0.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: don't use TXDONE_FALLBACK as success indicator
Helmut Schaa [Mon, 14 Jun 2010 20:09:09 +0000 (22:09 +0200)]
rt2x00: don't use TXDONE_FALLBACK as success indicator

TXDONE_FALLBACK doesn't express if the frame was sent successful or not. It
only tells us that the hw used fallback rates for retries. Hence, don't use
TXDONE_FALLBACK as success indicator.

Before this patch we reported success to the rate control algorithm which
was wrong in a number of cases and might have lead to improper tx rate
selections.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: clarify meaning of txdone flags
Helmut Schaa [Mon, 14 Jun 2010 20:08:30 +0000 (22:08 +0200)]
rt2x00: clarify meaning of txdone flags

Update the documentation of the available txdone flags to better express
how they should be used.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Use a separate CCMP PN receive counter for management frames
Jouni Malinen [Fri, 11 Jun 2010 17:27:33 +0000 (10:27 -0700)]
mac80211: Use a separate CCMP PN receive counter for management frames

When management frame protection (IEEE 802.11w) is used, we must use a
separate counter for tracking received CCMP packet number for the
management frames. The previously used NUM_RX_DATA_QUEUESth queue was
shared with data frames when QoS was not used and that can cause
problems in detecting replays incorrectly for robust management frames.
Add a new counter just for robust management frames to avoid this issue.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Protect Deauthentication frame when using MFP
Jouni Malinen [Mon, 14 Jun 2010 18:55:56 +0000 (11:55 -0700)]
mac80211: Protect Deauthentication frame when using MFP

When management frame protection (IEEE 802.11w) is used,
Deauthentication frame needs to be protected when the pairwise key is
configured. mac80211 was removing the station entry (and its keys)
before actually sending out the Deauthentication frame. Fix this by
reordering the code to send the frame before the station entry gets
removed. This matches an earlier change that handled the Disassociation
frame processing, but missed Deauthentication frames.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix ps-qos network latency handling
Juuso Oikarinen [Wed, 9 Jun 2010 06:51:52 +0000 (09:51 +0300)]
mac80211: Fix ps-qos network latency handling

The ps-qos latency handling is broken. It uses predetermined latency values
to select specific dynamic PS timeouts. With common AP configurations, these
values overlap with beacon interval and are therefore essentially useless
(for network latencies less than the beacon interval, PSM is disabled.)

This patch remedies the problem by replacing the predetermined network latency
values with one high value (1900ms) which is used to go trigger full psm. For
backwards compatibility, the value 2000ms is still mapped to a dynamic ps
timeout of 100ms.

Currently also the mac80211 internal value for storing user space configured
dynamic PSM values is incorrectly in the driver visible ieee80211_conf struct.
Move it to the ieee80211_local struct.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agohostap: Protect against initialization interrupt
Tim Gardner [Tue, 8 Jun 2010 17:33:02 +0000 (11:33 -0600)]
hostap: Protect against initialization interrupt

Use an irq spinlock to hold off the IRQ handler until
enough early card init is complete such that the handler
can run without faulting.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: cancel scan watchdog in iwl_bg_abort_scan
John W. Linville [Mon, 14 Jun 2010 18:30:25 +0000 (14:30 -0400)]
iwlwifi: cancel scan watchdog in iwl_bg_abort_scan

Avoids this:

WARNING: at net/mac80211/scan.c:312 ieee80211_scan_completed+0x5f/0x1f1
[mac80211]()
Hardware name: Latitude E5400
Modules linked in: aes_x86_64 aes_generic fuse ipt_MASQUERADE iptable_nat
nf_nat rfcomm sco bridge stp llc bnep l2cap sunrpc cpufreq_ondemand
acpi_cpufreq freq_table xt_physdev ip6t_REJECT nf_conntrack_ipv6
ip6table_filter ip6_tables ipv6 kvm_intel kvm uinput arc4 ecb
snd_hda_codec_intelhdmi snd_hda_codec_idt snd_hda_intel iwlagn snd_hda_codec
snd_hwdep snd_seq snd_seq_device iwlcore snd_pcm dell_wmi sdhci_pci sdhci
iTCO_wdt tg3 dell_laptop mmc_core i2c_i801 wmi mac80211 snd_timer
iTCO_vendor_support btusb joydev dcdbas cfg80211 bluetooth snd soundcore
microcode rfkill snd_page_alloc firewire_ohci firewire_core crc_itu_t
yenta_socket rsrc_nonstatic i915 drm_kms_helper drm i2c_algo_bit i2c_core video
output [last unloaded: scsi_wait_scan]
Pid: 979, comm: iwlagn Tainted: G        W  2.6.33.3-85.fc13.x86_64 #1
Call Trace:
[<ffffffff8104b558>] warn_slowpath_common+0x77/0x8f
[<ffffffff8104b57f>] warn_slowpath_null+0xf/0x11
[<ffffffffa01bb7d9>] ieee80211_scan_completed+0x5f/0x1f1 [mac80211]
[<ffffffffa02a23f0>] iwl_bg_scan_completed+0xbb/0x17a [iwlcore]
[<ffffffff81060d3d>] worker_thread+0x1a4/0x232
[<ffffffffa02a2335>] ? iwl_bg_scan_completed+0x0/0x17a [iwlcore]
[<ffffffff81064817>] ? autoremove_wake_function+0x0/0x34
[<ffffffff81060b99>] ? worker_thread+0x0/0x232
[<ffffffff810643c7>] kthread+0x7a/0x82
[<ffffffff8100a924>] kernel_thread_helper+0x4/0x10
[<ffffffff8106434d>] ? kthread+0x0/0x82
[<ffffffff8100a920>] ? kernel_thread_helper+0x0/0x10

Reported here:

https://bugzilla.redhat.com/show_bug.cgi?id=590436

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Mihai Harpau <mishu@piatafinanciara.ro>
Cc: stable@kernel.org
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agomac80211: Fix circular locking dependency in ARP filter handling
Juuso Oikarinen [Wed, 9 Jun 2010 10:43:26 +0000 (13:43 +0300)]
mac80211: Fix circular locking dependency in ARP filter handling

There is a circular locking dependency when configuring the
hardware ARP filters on association, occurring when flushing the mac80211
workqueue. This is what happens:

[   92.026800] =======================================================
[   92.030507] [ INFO: possible circular locking dependency detected ]
[   92.030507] 2.6.34-04781-g2b2c009 #85
[   92.030507] -------------------------------------------------------
[   92.030507] modprobe/5225 is trying to acquire lock:
[   92.030507]  ((wiphy_name(local->hw.wiphy))){+.+.+.}, at: [<ffffffff8105b5c0>] flush_workq
ueue+0x0/0xb0
[   92.030507]
[   92.030507] but task is already holding lock:
[   92.030507]  (rtnl_mutex){+.+.+.}, at: [<ffffffff812b9ce2>] rtnl_lock+0x12/0x20
[   92.030507]
[   92.030507] which lock already depends on the new lock.
[   92.030507]
[   92.030507]
[   92.030507] the existing dependency chain (in reverse order) is:
[   92.030507]
[   92.030507] -> #2 (rtnl_mutex){+.+.+.}:
[   92.030507]        [<ffffffff810761fb>] lock_acquire+0xdb/0x110
[   92.030507]        [<ffffffff81341754>] mutex_lock_nested+0x44/0x300
[   92.030507]        [<ffffffff812b9ce2>] rtnl_lock+0x12/0x20
[   92.030507]        [<ffffffffa022d47c>] ieee80211_assoc_done+0x6c/0xe0 [mac80211]
[   92.030507]        [<ffffffffa022f2ad>] ieee80211_work_work+0x31d/0x1280 [mac80211]

[   92.030507] -> #1 ((&local->work_work)){+.+.+.}:
[   92.030507]        [<ffffffff810761fb>] lock_acquire+0xdb/0x110
[   92.030507]        [<ffffffff8105a51a>] worker_thread+0x22a/0x370
[   92.030507]        [<ffffffff8105ecc6>] kthread+0x96/0xb0
[   92.030507]        [<ffffffff81003a94>] kernel_thread_helper+0x4/0x10
[   92.030507]
[   92.030507] -> #0 ((wiphy_name(local->hw.wiphy))){+.+.+.}:
[   92.030507]        [<ffffffff81075fdc>] __lock_acquire+0x1c0c/0x1d50
[   92.030507]        [<ffffffff810761fb>] lock_acquire+0xdb/0x110
[   92.030507]        [<ffffffff8105b60e>] flush_workqueue+0x4e/0xb0
[   92.030507]        [<ffffffffa023ff7b>] ieee80211_stop_device+0x2b/0xb0 [mac80211]
[   92.030507]        [<ffffffffa0231635>] ieee80211_stop+0x3e5/0x680 [mac80211]

The locking in this case is quite complex. Fix the problem by rewriting the
way the hardware ARP filter list is handled - i.e. make a copy of the address
list to the bss_conf struct, and provide that list to the hardware driver
when needed.

The current patch will enable filtering also in promiscuous mode. This may need
to be changed in the future.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove BSS from cfg80211 list when leaving IBSS
Teemu Paasikivi [Mon, 14 Jun 2010 09:55:33 +0000 (12:55 +0300)]
mac80211: remove BSS from cfg80211 list when leaving IBSS

Remove BSS from cfg80211 BSS list if we are only member in IBSS when
leaving it.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Set changed basic rates flag
Teemu Paasikivi [Mon, 14 Jun 2010 09:55:32 +0000 (12:55 +0300)]
mac80211: Set changed basic rates flag

Add changed basic rates flag to bss_changed while joinig ibss network.

This patch is split from the patch containing support for setting basic
rates when creating ibss network. Original patch was posted by Johannes
Berg on the linux-wireless posting list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Set basic rates while joining ibss network
Teemu Paasikivi [Mon, 14 Jun 2010 09:55:31 +0000 (12:55 +0300)]
mac80211: Set basic rates while joining ibss network

This patch adds support to nl80211 and mac80211 to set basic rates when
joining/creating ibss network.

Original patch was posted by Johannes Berg on the linux-wireless posting list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove ATH9K_CAP_DS
Felix Fietkau [Sat, 12 Jun 2010 15:22:34 +0000 (17:22 +0200)]
ath9k_hw: remove ATH9K_CAP_DS

This capability check is no longer used, so it can be removed along with
the now-obsolete ath9k_hw_getcapability function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k/ath9k_htc: remove redundand checks for dual-stream tx support
Felix Fietkau [Sat, 12 Jun 2010 15:22:33 +0000 (17:22 +0200)]
ath9k/ath9k_htc: remove redundand checks for dual-stream tx support

mac80211 already masks the HT sta capabilities based on hardware support

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove ATH9K_CAP_MCAST_KEYSRCH
Felix Fietkau [Sat, 12 Jun 2010 15:22:32 +0000 (17:22 +0200)]
ath9k_hw: remove ATH9K_CAP_MCAST_KEYSRCH

The driver always sets this to enabled, but this can be simplified with
a small change to ah->sta_id1_defaults instead.
This change also removes the now-obsolete ath9k_hw_setcapability function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove ATH9K_CAP_TKIP_SPLIT
Felix Fietkau [Sat, 12 Jun 2010 15:22:31 +0000 (17:22 +0200)]
ath9k_hw: remove ATH9K_CAP_TKIP_SPLIT

This is only used as a workaround for an issue in one specific hw revision.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove ATH9K_CAP_TKIP_MIC
Felix Fietkau [Sat, 12 Jun 2010 15:22:30 +0000 (17:22 +0200)]
ath9k_hw: remove ATH9K_CAP_TKIP_MIC

TKIP MIC support is always enabled anyway.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove ATH9K_CAP_TXPOW
Felix Fietkau [Sat, 12 Jun 2010 15:22:29 +0000 (17:22 +0200)]
ath9k_hw: remove ATH9K_CAP_TXPOW

replace calls that read this capability with accesses to ath9k_hw's
regulatory data.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove ATH9K_CAP_CIPHER
Felix Fietkau [Sat, 12 Jun 2010 15:22:28 +0000 (17:22 +0200)]
ath9k_hw: remove ATH9K_CAP_CIPHER

All of the ciphers that are tested for are always supported

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: enable AR9003 PCI IDs
Luis R. Rodriguez [Sat, 12 Jun 2010 04:34:02 +0000 (00:34 -0400)]
ath9k: enable AR9003 PCI IDs

All AR9003 features are now complete so enable AR9003
support.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>