safe/jmp/linux-2.6
14 years agort2800pci: fix crypto in TX frame
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:24 +0000 (18:32 +0100)]
rt2800pci: fix crypto in TX frame

Based on rt2800usb patch from Benoit PAPILLAULT
(commit 17616310836ad2cc45a64576ef0e1520b0dcc81b).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@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 agort2800usb: fix rt2800usb_rfcsr_read()
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:17 +0000 (18:32 +0100)]
rt2800usb: fix rt2800usb_rfcsr_read()

The driver should write the read request into RF_CSR_CFG register
and not BBP_CSR_CFG one in rt2800usb_rfcsr_read().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@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 agort2800pci: make Kconfig help entry more helpful
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:10 +0000 (18:32 +0100)]
rt2800pci: make Kconfig help entry more helpful

Document known issues with the driver to aid distribution makers,
users and developers in making informed decisions instead of wasting
their time needlessly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: make Kconfig help entry more helpful
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:31:58 +0000 (18:31 +0100)]
rt2800usb: make Kconfig help entry more helpful

Document known issues with the driver to aid distribution makers,
users and developers in making informed decisions instead of wasting
their time needlessly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: make ieee80211_find_sta per virtual interface
Johannes Berg [Wed, 4 Nov 2009 13:42:28 +0000 (14:42 +0100)]
mac80211: make ieee80211_find_sta per virtual interface

Since we have a TODO item to make all station
management dependent on virtual interfaces, I
figured I'd start with pushing such a change
to drivers before more drivers start using the
ieee80211_find_sta() API with a hw pointer and
cause us grief later on.

For now continue exporting the old API in form
of ieee80211_find_sta_by_hw(), but discourage
its use strongly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: remove dead variable
Johannes Berg [Sat, 31 Oct 2009 15:15:39 +0000 (16:15 +0100)]
cfg80211: remove dead variable

commit 211a4d12abf86fe0df4cd68fc6327cbb58f56f81
  Author: Johannes Berg <johannes@sipsolutions.net>
  Date:   Tue Oct 20 15:08:53 2009 +0900

      cfg80211: sme: deauthenticate on assoc failure

accidentally introduced a dead variable, I had
changed the code to not need it while creating
the patch and it looks like I forgot to remove
the variable (and nobody else noticed either).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: pci BAR mapping changes
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:43 +0000 (20:20 +0200)]
mwl8k: pci BAR mapping changes

Map BAR0 as well, as we need to write to it during init on some chips.

Also, if BAR0 is a 64bit BAR, the register BAR becomes BAR2, so try
mapping BAR2 if mapping BAR1 fails.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: shorten receive/transmit state variable names
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:40 +0000 (20:20 +0200)]
mwl8k: shorten receive/transmit state variable names

To conserve horizontal space.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: add support for enabling hardware sniffer mode
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:32 +0000 (20:20 +0200)]
mwl8k: add support for enabling hardware sniffer mode

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: report rate and other information for received frames
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:29 +0000 (20:20 +0200)]
mwl8k: report rate and other information for received frames

When receiving a frame, report the antenna info, long/short preamble
status, 20/40 MHz flag, long/short guard interval status, MCS/legacy
rate status, and MCS/legacy rate index to the stack.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: clarify WME transmit queue 0/1 swizzling
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:25 +0000 (20:20 +0200)]
mwl8k: clarify WME transmit queue 0/1 swizzling

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: use cond_resched() when loading firmware blocks
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:16 +0000 (20:20 +0200)]
mwl8k: use cond_resched() when loading firmware blocks

Since each firmware block takes on the order of several hundred usec
to upload to the hardware, using msleep in the inner loop would make
the firmware loading process take a lot more time than just doing
busy-waiting like we do now.  But if we keep the busy-waiting, we can
at least add a cond_resched() to the inner loop so that we give other
tasks a chance to run while the firmware is being loaded.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: clear hardware MAC address if no STA interface configured
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:04 +0000 (20:20 +0200)]
mwl8k: clear hardware MAC address if no STA interface configured

If there is no STA interface configured, clear the hardware MAC
address to prevent ACKing frames sent to our MAC address.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: enforce FIF_BCN_PRBRESP_PROMISC when no STA interfaces are active
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:53 +0000 (20:19 +0200)]
mwl8k: enforce FIF_BCN_PRBRESP_PROMISC when no STA interfaces are active

When FIF_BCN_PRBRESP_PROMISC is not set, we enable the hardware's BSS
filter so that we'll only see packets destined for our BSS.  But if no
STA interfaces have been configured, we would end up passing the BSSID
00:00:00:00:00:00 into the POST_SCAN command, which actually disables
the hardware's BSS filter, as it's not a valid BSSID.

Fix this by passing in 01:00:00:00:00:00 instead (the criterion is
that the OUI part of the BSSID must be nonzero), and add comments to
explain what PRE_SCAN and POST_SCAN do.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: implement FIF_ALLMULTI
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:50 +0000 (20:19 +0200)]
mwl8k: implement FIF_ALLMULTI

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: use the mac80211-provided workqueue instead of creating our own
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:45 +0000 (20:19 +0200)]
mwl8k: use the mac80211-provided workqueue instead of creating our own

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: fix multicast address filter programming
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:41 +0000 (20:19 +0200)]
mwl8k: fix multicast address filter programming

mwl8k's ->prepare_multicast() currently just enables reception of
all multicast packets, which is somewhat ineffective.

Fix this by either disabling all multicast RX, enabling multicast
RX according to the multicast address filter table, or enabling all
multicast RX, depending on whether ->prepare_multicast() was given
any multicast addresses and whether the hardware multicast address
filter table is large enough to fit all requested addresses.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: minor transmit quiescing rework
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:37 +0000 (20:19 +0200)]
mwl8k: minor transmit quiescing rework

Minor changes to the transmit quiescing logic:
- Clarify the locking rules for ->tx_wait: only the holder of fw_mutex
  can wait for the TX path to become idle, but tx_wait itself is read
  and cleared by the TX reclaim tasklet under tx_lock.
- Inline mwl8k_txq_busy() in its callers.
- There's no need to kick the transmitter again in
  mwl8k_tx_wait_empty(), since it will have been kicked when the
  packets currently in the TX ring were added to it.
- If the TX ring didn't drain in time, run mwl8k_scan_tx_ring() after
  reading priv->pending_pkts without dropping tx_lock in between.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: coding style cleanups
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:33 +0000 (20:19 +0200)]
mwl8k: coding style cleanups

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: fix GET_STAT firmware command packet layout
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:23 +0000 (20:19 +0200)]
mwl8k: fix GET_STAT firmware command packet layout

The GET_STAT command doesn't have an 'action' field like other
commands do, so remove it.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: depend on INET
John W. Linville [Mon, 2 Nov 2009 18:43:32 +0000 (13:43 -0500)]
wl1271: depend on INET

wl1271_main.c:(.text+0x271052): undefined reference to `unregister_inetaddr_notifier'
wl1271_main.c:(.text+0x2714d7): undefined reference to `register_inetaddr_notifier'

Driver is doing some filtering based on IP addresses...

Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Generalize command response reading
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:13 +0000 (20:22 +0200)]
wl1271: Generalize command response reading

Responses to firmware commands are read in by the command transmission
function, as part of command flow. Previously responses were read in
multiple places.

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: Correct endianness-handling of command status
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:12 +0000 (20:22 +0200)]
wl1271: Correct endianness-handling of command status

Correct the endianness-handling of the firmware command result status handling
code.

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 retry implementation for PSM entries
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:11 +0000 (20:22 +0200)]
wl1271: Add retry implementation for PSM entries

PSM entries can fail (transmitting the corresponding null-func may not
be heard by the AP.) Previously, this scenario was not detected, and
out-of-sync between STA and AP could occur.

Add retry implementation for the entries to recover from the situation.

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: Check result code of commands
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:10 +0000 (20:22 +0200)]
wl1271: Check result code of commands

Check the result code of all commands, and return an error code if the
firmware reports an error in execution. Previously this error would go
ignored in most cases.

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: Increase TX power value
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:09 +0000 (20:22 +0200)]
wl1271: Increase TX power value

Currently, to avoid distortions, the TX power level has been hardcoded
to a low value. The value is slightly too low for good functionality, so
we increase it from 7dB to 12dB.

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: Remove excess null-data template settings
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:08 +0000 (20:22 +0200)]
wl1271: Remove excess null-data template settings

The null-data template (nullfunc) is dependent on the BSSID of the
current AP only, so it needs to be updated only when the BSSID changes.

Removed excess setting of the template.

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 agocfg80211: validate scan channels
Johannes Berg [Mon, 2 Nov 2009 12:32:03 +0000 (13:32 +0100)]
cfg80211: validate scan channels

Currently it is possible to request a scan on only
disabled channels, which could be problematic for
some drivers. Reject such scans, and also ignore
disabled channels that are given. This resuls in
the scan begin/end event only including channels
that are actually used.

This makes the mac80211 check for disabled channels
superfluous. At the same time, remove the no-IBSS
check from mac80211 -- nothing says that we should
not find any networks on channels that cannot be
used for an IBSS, even when operating in IBSS mode.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211_hwsim: Send ACK frames on the hwsim0 interface
Jouni Malinen [Sun, 1 Nov 2009 09:31:45 +0000 (11:31 +0200)]
mac80211_hwsim: Send ACK frames on the hwsim0 interface

Report successful transmissions (receiver awake and on the same
channel) by generating ACK frames on the hwsim0 interface. This makes
it easier to figure out from packet capture logs whether frames were
delivered or not.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211_hwsim: Check idle state on TX
Jouni Malinen [Sun, 1 Nov 2009 09:30:48 +0000 (11:30 +0200)]
mac80211_hwsim: Check idle state on TX

Track the idle state for hwsim radios and reject TX if mac80211 is
trying to transmit something when the radio is supposed to be idle. In
addition, do not deliver frames if the receiving radio is in the idle
state.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: Fix WEXT compat siwauth wpa and group cipher
Jouni Malinen [Sun, 1 Nov 2009 09:18:49 +0000 (11:18 +0200)]
cfg80211: Fix WEXT compat siwauth wpa and group cipher

Neither of these commands should clear the current configuration value
if they return error. Furthermore, cfg80211_set_cipher_group() should
be able to handle IW_AUTH_CIPHER_NONE without reporting error.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54: disable channels with incomplete calibration data sets
Christian Lamparter [Sat, 31 Oct 2009 21:59:27 +0000 (22:59 +0100)]
p54: disable channels with incomplete calibration data sets

James Grossmann [1] reported that p54 spews out confusing
messages instead of preventing the mayhem from happening.

the reason is that "p54: generate channel list dynamically"
is not perfect. It didn't discard incomplete channel data
sets and therefore p54 advertised to support them as well.

[1]: http://marc.info/?l=linux-wireless&m=125699830215890

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: James Grossmann <cctsurf@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix scan abort sanity checks
Johannes Berg [Sat, 31 Oct 2009 06:44:08 +0000 (07:44 +0100)]
mac80211: fix scan abort sanity checks

Since sometimes mac80211 queues up a scan request
to only act on it later, it must be allowed to
(internally) cancel a not-yet-running scan, e.g.
when the interface is taken down. This condition
was missing since we always checked only the
local->scanning variable which isn't yet set in
that situation.

Reported-by: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: add wimax/wifi coexist support for 6x50 series
Wey-Yi Guy [Fri, 30 Oct 2009 21:36:18 +0000 (14:36 -0700)]
iwlwifi: add wimax/wifi coexist support for 6x50 series

For 6x50 series, it is wimax/wifi combo device, so driver need to enable
the wimax/wifi co-exist function and send the coexist event priority
table to uCode for operation.

The priority table will be used by uCode to determine what is the proper
action it should take when co-exist with WiMAX.
For example, when WiFi runs a scan, it must own radio exclusively, therefore
will disconnect WiMAX if WiMAX is connected.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: add SM PS support for 6x50 series
Wey-Yi Guy [Fri, 30 Oct 2009 21:36:17 +0000 (14:36 -0700)]
iwlwifi: add SM PS support for 6x50 series

Spatial Multiplexing Power Save was disabled to achieve better
throughput while in power save mode by activating all the rx chains all the time.
By doing so, the device power consumption is high.

Enable static/dynamic spatial multiplexing power save if device support
it, which can lower the power consumption without impact throughput.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: coex API data structure
Wey-Yi Guy [Fri, 30 Oct 2009 21:36:16 +0000 (14:36 -0700)]
iwlwifi: coex API data structure

Add data structure define for COEX_MEDIUM_NOTIFICATION and
COEX_EVENT_CMD host commands.

COEX_MEDIUM_NOTIFICATION is notification from uCode to host to indicate
medium changes. COEX_EVENT_CMD is from host to uCode for coex event
request.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: print warning when sending host command fails
Reinette Chatre [Fri, 30 Oct 2009 21:36:15 +0000 (14:36 -0700)]
iwlwifi: print warning when sending host command fails

More information than the "-EIO" return code will be useful here.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: move rate scale initialization to init function
Reinette Chatre [Fri, 30 Oct 2009 21:36:14 +0000 (14:36 -0700)]
iwlagn: move rate scale initialization to init function

This fits better in how the callbacks operate (alloc does allocation and
init does initialization). This also helps if we later want to do our own
initialization without relying on the mac80211 allocation.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwl3945: store station rate scale information in mac80211 station structure
Reinette Chatre [Fri, 30 Oct 2009 21:36:13 +0000 (14:36 -0700)]
iwl3945: store station rate scale information in mac80211 station structure

Currently the rate scale information is pointed to from the mac80211
station structure but since that is the only member we might as well make
it part of the structure. Also move the rate scaling initialization to the
init function, no need to do it when we allocate the structure. This fits
with how mac80211 deals with rate scaling information (it always calls init
after allocation) and makes it easier for us to later call initialization
directly.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: split adding broadcast station from others
Reinette Chatre [Fri, 30 Oct 2009 21:36:12 +0000 (14:36 -0700)]
iwlwifi: split adding broadcast station from others

In preparation for some station management changes we split the addition of
a broadcast station from the other stations. Later we will rely on mac80211
to direct all management (addition/removal) of all stations except the
broadcast station.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: move iwl_[un]init_drv to iwlagn
Reinette Chatre [Fri, 30 Oct 2009 21:36:11 +0000 (14:36 -0700)]
iwlwifi: move iwl_[un]init_drv to iwlagn

Since iwlagn is the only user of these functions, move it to this module.
This results in a bit more code moving than just these functions since the
functions only used by them are also moved and we need to export the
symbols previously available to them directly.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: unmap memory before use
Reinette Chatre [Fri, 30 Oct 2009 21:36:10 +0000 (14:36 -0700)]
iwlwifi: unmap memory before use

Handling responses to driver originated commands include passing the
original command buffer to the caller. At this time it is possible for a
callback to be invoked that is passed this command buffer and thus likely
to access it.

We need to make sure that the memory associated with that buffer is not DMA
mapped at the time.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: update write pointers for all tx queues after wakeup
Ben Cahill [Fri, 30 Oct 2009 21:36:09 +0000 (14:36 -0700)]
iwlagn: update write pointers for all tx queues after wakeup

Wakeup interrupt has been updating write pointers (indexes, actually) only
for tx queues 0-5.  This is adequate just for 3945, but inadequate for other
devices, all of which have more tx queues.  Now updating all tx/command queues,
so device can be aware of all new tx and host commands enqueued while
device was asleep.

This can potentially improve data traffic bandwidth and/or latency.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: Clarify FH_TX interrupt
Ben Cahill [Fri, 30 Oct 2009 21:36:08 +0000 (14:36 -0700)]
iwlagn: Clarify FH_TX interrupt

Add/clarify comments and debug messages for interrupt used only for uCode load

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: invoke L0S workaround for 6000/1000 series
Ben Cahill [Fri, 30 Oct 2009 21:36:07 +0000 (14:36 -0700)]
iwlagn: invoke L0S workaround for 6000/1000 series

Invoke workaround to avoid instability in L0->L0S->L1 transition on PCIe bus.
Workaround disables L0S state so device moves directly from L0->L1.
Workaround needed on all devices since and including 4965; add to 6000/1000.

Describe bug and workaround better in comments.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove power-wasting calls to apm_ops.init()
Ben Cahill [Fri, 30 Oct 2009 21:36:06 +0000 (14:36 -0700)]
iwlwifi: remove power-wasting calls to apm_ops.init()

To save power, don't run apm_ops.init() until needed at "up" time.

EEPROM (5000 and earlier devices) may be read without running apm_ops.init(),
but OTP reads (6000 and newer devices) require a powered-up chip.
Therefore, remove apm_ops.init() from the general path in XXXX_pci_probe(),
and call it only if device uses OTP.  Once done with OTP read, call
apm_ops.stop() to reset chip and save power until "up" time comes around.

NOTE:  This patch depends on removal of priv->lock from iwl_apm_stop();
lock does not get initialized until later in flow.  See patch
"remove unneeded locks from apm_stop()".

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove unneeded locks from apm_stop() and stop_master()
Ben Cahill [Fri, 30 Oct 2009 21:36:05 +0000 (14:36 -0700)]
iwlwifi: remove unneeded locks from apm_stop() and stop_master()

Since priv->reg_lock was added to keep multi-access register manipulation
atomic, priv->lock protection is no longer needed.  Remove this from
iwl_apm_stop_master() and iwl_apm_stop().

Add warning of timeout when polling for busmaster disablement confirmation,
and some comments.

NOTE:  This is needed to enable use of apm_ops.stop() within iwl_eeprom_init();
priv->lock does not get initialized until after this flow.  See patch
"remove power-wasting calls to apm_ops.init()"

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: provide firmware version
Reinette Chatre [Fri, 30 Oct 2009 21:36:04 +0000 (14:36 -0700)]
iwlwifi: provide firmware version

By setting the firmware version in wiphy it is possible to obtain this
information via ethtool. Some examples,

    # ethtool -i wlan1
    driver: iwlagn
    version: 2.6.32-rc5-wl-56840-g26d8540
    firmware-version: 228.57.2.23
    bus-info: 0000:03:00.0
    # ethtool -i wlan0
    driver: iwl3945
    version: 2.6.32-rc5-wl-56840-g26d8540
    firmware-version: 15.28.2.8
    bus-info: 0000:02:00.0

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: make CALL_TXH a statement
Johannes Berg [Thu, 29 Oct 2009 07:43:48 +0000 (08:43 +0100)]
mac80211: make CALL_TXH a statement

The multi-line code in this macro wasn't wrapped
in do {} while (0) so we cannot use it in an if()
branch safely in the future -- fix that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: remove internal buffers from GSPI driver
Andrey Yurovsky [Tue, 27 Oct 2009 23:51:40 +0000 (16:51 -0700)]
libertas: remove internal buffers from GSPI driver

This patch removes the internal command and data buffers that the GSPI driver
maintained and instead relies on the Libertas core to synchronize access
to the command and data ports as with the other interface drivers.  This
cleanup reduces the GSPI driver's memory footprint and should improve
performance by removing the need to copy to these internal buffers.
This also simplifies the bottom half of the interrupt handler.

This is an incremental cleanup: after removing the redundant buffers, we
can further improve the driver to use a threaded IRQ handler instead of
maintaining its own thread.  However I would like a few folks to test
the buffer removal first and make sure that I'm not introducing
regressions.

Tested on Blackfin BF527 with DMA disabled due to an issue with the SPI
host controller driver in the current bleeding-edge Blackfin kernel.  I
would appreciate it if someone with working DMA could test this patch
and provide feedback.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: George Shore <george.shore@imgtec.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43legacy: Fix DMA TX bounce buffer copying
Larry Finger [Fri, 30 Oct 2009 16:58:21 +0000 (11:58 -0500)]
b43legacy: Fix DMA TX bounce buffer copying

This patch is adapted from the submission by Michael Buesch <mb@bu3sch.de>
for a bounce-buffer copying problem with b43.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove bogus code
Johannes Berg [Fri, 30 Oct 2009 14:48:43 +0000 (15:48 +0100)]
mac80211: remove bogus code

It's not right to do something here when returning an
error, and hostapd should never have relied on it as
it only fixes up a small part of the problem anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove sent_ps_buffered
Johannes Berg [Fri, 30 Oct 2009 11:56:02 +0000 (12:56 +0100)]
mac80211: remove sent_ps_buffered

This variable is set once, and tested once.
However, the code path that can set it is
mutually exclusive with the code path that
tests it, so the test is always true. Thus
we also don't need to set it either and can
just remove the variable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: also drop qos-nullfunc frames silently
Johannes Berg [Fri, 30 Oct 2009 11:55:03 +0000 (12:55 +0100)]
mac80211: also drop qos-nullfunc frames silently

We drop nullfunc frames, but not qos-nullfunc frames,
even though those could be used for PS state control
as well.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: fix init loop timeout
Luciano Coelho [Thu, 29 Oct 2009 11:20:04 +0000 (13:20 +0200)]
wl1271: fix init loop timeout

The check after the loop which checks whether the initialization timed-out
was wrong.  If the initialization would succeed exactly in the 20000th time
(the value set for INIT_LOOP), the driver would bail out and claim that
initialization failed.

Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: unconditionally set IEEE80211_TX_CTL_SEND_AFTER_DTIM
Johannes Berg [Thu, 29 Oct 2009 11:19:21 +0000 (12:19 +0100)]
mac80211: unconditionally set IEEE80211_TX_CTL_SEND_AFTER_DTIM

When mac80211 is asked to buffer multicast frames
in AP mode, it will not set the flag indicating
that the frames should be sent after the DTIM
beacon for those frames buffered in software. Fix
this little inconsistency by always setting that
flag in the buffering code path.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: deprecate qual value
Johannes Berg [Thu, 29 Oct 2009 07:41:25 +0000 (08:41 +0100)]
mac80211: deprecate qual value

This value is unused by mac80211, because it was only
be used by wireless extensions, and turned out to not
be useful there because the quality value needs to be
comparable between scan results and the current value
which is impossible when the qual value is calculated
taking into account noise, for example.

Since it is unused anyway, this patch deprecates it
in the hope that drivers will remove their sometimes
quite expensive calculations of the value.

I'm open to actual uses of the value, but the best
way of using it seems to be what the Intel drivers do
which should probably be generalised if we have noise
values from the hardware.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: introduce ieee80211_beacon_get_tim()
Johannes Berg [Thu, 29 Oct 2009 07:30:35 +0000 (08:30 +0100)]
mac80211: introduce ieee80211_beacon_get_tim()

Compared to ieee80211_beacon_get(), the new function
ieee80211_beacon_get_tim() returns information on the
location and length of the TIM IE, which some drivers
need in order to generate the TIM on the device. The
old function, ieee80211_beacon_get(), becomes a small
static inline wrapper around the new one to not break
all drivers.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: airo_cs needs WEXT_SPY
Randy Dunlap [Wed, 28 Oct 2009 23:08:32 +0000 (16:08 -0700)]
wireless: airo_cs needs WEXT_SPY

airo_cs uses spy interfaces so it needs to select WEXT_SPY.

ERROR: "iw_handler_set_thrspy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "wireless_spy_update" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_get_spy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_get_thrspy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_set_spy" [drivers/net/wireless/airo.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: make align adjustment code support paged SKB
Zhu Yi [Wed, 28 Oct 2009 20:13:52 +0000 (13:13 -0700)]
mac80211: make align adjustment code support paged SKB

This fixed a BUG_ON in __skb_trim() when paged rx is used in
iwlwifi driver. Yes, the whole mac80211 stack doesn't support
paged SKB yet. But let's start the work slowly from small
code snippets.

Reported-and-tested-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: make ath9k_phy_modify_rx_buffer() static
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:46 +0000 (02:33 -0400)]
ath9k_hw: make ath9k_phy_modify_rx_buffer() static

To do this we reorder callers in order in which they are called.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: Fix and complete force bias for AR5416
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:45 +0000 (02:33 -0400)]
ath9k_hw: Fix and complete force bias for AR5416

Force bias is a fix for usage of AR5416 radios on the 2.4 GHz band
for orientation sensitivity. This was only partially implemented
with the ath9k_hw_decrease_chain_power() but first -- this was being
called for all chipsets which is not correct and second -- it was
missing the actual orientation code.

We now ensure to only enable force bias only for AR5416 and BUG_ON()
on other chipsets. Although ath9k_hw_decrease_chain_power() was enabled
for newer chipsets I suspect that it never ran unless the EEPROM had
ATH9K_ANT_FIXED_A or ATH9K_ANT_FIXED_B for antenna diversity.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove unused modesIndex param from ath9k_hw_write_regs()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:44 +0000 (02:33 -0400)]
ath9k_hw: remove unused modesIndex param from ath9k_hw_write_regs()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: make spur mitigation a callback
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:43 +0000 (02:33 -0400)]
ath9k_hw: make spur mitigation a callback

This only differs between single-chip solutions and non single-chip
solutions.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: order phy.c code and integrate spur mitigation
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:42 +0000 (02:33 -0400)]
ath9k_hw: order phy.c code and integrate spur mitigation

This reorders phy.c routines in the order in the order in which they are used
and also moves the spur mitigation helpers for each type of chip into phy.c
as they are RF related.

This patch has no functional changes.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: use a callback for frequency change
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:41 +0000 (02:33 -0400)]
ath9k_hw: use a callback for frequency change

This avoids a branch on every channel change.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: make both analog channel change routines return int
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:40 +0000 (02:33 -0400)]
ath9k_hw: make both analog channel change routines return int

This allows us to later define a callback for both.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: rename ath9k_hw_rf_free() to ath9k_hw_rf_free_ext_banks()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:39 +0000 (02:33 -0400)]
ath9k_hw: rename ath9k_hw_rf_free() to ath9k_hw_rf_free_ext_banks()

This clarifies this is only required for external radios.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: simplify ath9k_hw_rf_alloc_ext_banks()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:38 +0000 (02:33 -0400)]
ath9k_hw: simplify ath9k_hw_rf_alloc_ext_banks()

This is calling an allocation and checking for it, simplify
this process in a macro.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: simplify rf attach and rename to ath9k_hw_rf_alloc_ext_banks()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:37 +0000 (02:33 -0400)]
ath9k_hw: simplify rf attach and rename to ath9k_hw_rf_alloc_ext_banks()

ath9k_hw_rfattach() was just calling a helper and this helper was
doing nothing for single-chip devices, and for non single-chip devices
it is just allocating memory for banks to program the RF registers
at a later time. Simplify this by having the hw initialization call
the rf bank allocation directly for external radios.

Also, propagate an -ENOMEM properly now upon failure.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: bail out early on ath9k_hw_init_rf()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:36 +0000 (02:33 -0400)]
ath9k_hw: bail out early on ath9k_hw_init_rf()

We a huge branch for old hardware and nothing for newer
hardware. Instead of doing this just bail out early for
newer hardware.

This patch has no functional changes.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: start documenting 802.11n RF anlong front ends
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:35 +0000 (02:33 -0400)]
ath9k_hw: start documenting 802.11n RF anlong front ends

Document what we can about the RF analog front ends (radios)
of Atheros 802.11n devices. What should be clearer now is the
what we do for old pre AR5416 and AR5418 MAC based devices in
comparison to the modern sigle-chip 802.11n solutions.

All devices after AR9280 are single chip and require less
programming -- the RF registers no longer need to be initialized
as they all have the RF analog front end embedded together with
the MAC/BB; this includes the AR9271. Older devices such as the
ones with the AR5416 MACs (PCI) or AR5418 MACs (PCI-E) have an
external 2.4 GHz AR2133 radio or a dual band 2.4 GHz / 5 GHz
AR5133 radio. These external radios require additional programming
of the RF registers.

Clarify which parts are for what devices and which code is
shared. This patch has no functional changes.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: change the way we initialize the pll for ar9271
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:34 +0000 (02:33 -0400)]
ath9k_hw: change the way we initialize the pll for ar9271

We adjust the core clock for ar9271 to 117 MHz; this also
requires us to adjust the baud divider based on the targetted
baud rate.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: update register initialization/reset values for ar9271
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:33 +0000 (02:33 -0400)]
ath9k_hw: update register initialization/reset values for ar9271

This update the register initialization/reset values (aka initvals)
for ar9271 based on the last recommended values on 2009-06-04 by our
systems engineering team.

The changes account for:

  * Supporting ar9271 1.0 and ar9271 1.1 together, the difference
    is bb_spectral_scan_ena, for 1.0 we'll set this to 0x1.

  * Ensuring we get the correct noise floor values -115 ~ -118
    when we enable bb_enable_ant_div_lnadiv=0 and
    mc_tx_def_ant_sel=1. Previous to this we would get noise
    floor values in the range -50 ~ -80. To fix settings for
    the registers:

     - bb_ch1_xatten1_db
     - bb_ch1_xatten2_db
     - bb_ch1_xatten1_margin
     - bb_ch1_xatten2_margin
     - bb_ch1_gain_force
     - bb_ch1_xatten2_hyst_margin
     - bb_ch1_xatten1_hyst_margin
     - bb_ch1_max_oc_gain

  * 0x8120[2] mc_mic_new_location_enable is changed to 0x1. The MAC team
    suggest to set this value.

  * 0x9910[0] bb_spectral_scan_ena is changed to 0x0.
    For ar9271 1.1 we don't need to enable this bit.

Cc: Stephen Chen <Stephen.Chen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: modify the rf control register for ar9271 revision 1.0
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:32 +0000 (02:33 -0400)]
ath9k_hw: modify the rf control register for ar9271 revision 1.0

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoStaging: netwave: add TODO file
Greg Kroah-Hartman [Tue, 27 Oct 2009 16:18:26 +0000 (09:18 -0700)]
Staging: netwave: add TODO file

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoStaging: wavelan: add TODO file
Greg Kroah-Hartman [Tue, 27 Oct 2009 16:18:25 +0000 (09:18 -0700)]
Staging: wavelan: add TODO file

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoStaging: arlan: add TODO file
Greg Kroah-Hartman [Tue, 27 Oct 2009 16:18:24 +0000 (09:18 -0700)]
Staging: arlan: add TODO file

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoStaging: strip: add TODO file
Greg Kroah-Hartman [Tue, 27 Oct 2009 16:18:23 +0000 (09:18 -0700)]
Staging: strip: add TODO file

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: remove WLAN_80211 and WLAN_PRE80211 from Kconfig
John W. Linville [Wed, 28 Oct 2009 20:29:30 +0000 (16:29 -0400)]
wireless: remove WLAN_80211 and WLAN_PRE80211 from Kconfig

With the WLAN_PRE80211 drivers moved to drivers/staging, this
distinction becomes unnecessary.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonetwave: move driver to staging
John W. Linville [Wed, 28 Oct 2009 20:16:38 +0000 (16:16 -0400)]
netwave: move driver to staging

Move the netwave driver to drivers/staging.  This is another pre-802.11
driver that has seen virtually no non-API-fixup activity in years, and
for which no active hardware is likely to still exist.  This driver
represents unnecessary ongoing maintenance for no clear benefit.

This patch brought to you by the "hacking" session at the 2009 Kernel
Summit in Tokyo, Japan...

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowavelan: move driver to staging
John W. Linville [Wed, 28 Oct 2009 20:06:56 +0000 (16:06 -0400)]
wavelan: move driver to staging

Move the wavelan driver to drivers/staging.  This is another pre-802.11
driver that has seen virtually no non-API-fixup activity in years, and
for which no active hardware is likely to still exist.  This driver
represents unnecessary ongoing maintenance for no clear benefit.

This patch brought to you by the "hacking" session at the 2009 Kernel
Summit in Tokyo, Japan...

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoarlan: move driver to staging
John W. Linville [Tue, 20 Oct 2009 04:53:08 +0000 (13:53 +0900)]
arlan: move driver to staging

Move the arlan driver to drivers/staging.  This is another pre-802.11
driver that has seen virtually no non-API-fixup activity in years, and
for which no active hardware is likely to still exist.  This driver
represents unnecessary ongoing maintenance for no clear benefit.

This patch brought to you by the "hacking" session at the 2009 Kernel
Summit in Tokyo, Japan...

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agostrip: move driver to staging
John W. Linville [Tue, 20 Oct 2009 04:38:11 +0000 (13:38 +0900)]
strip: move driver to staging

Move the strip ("Starmode Radio IP") driver to drivers/staging.  For
several years this driver has only seen API "bombing-run" changes, and
few people ever had the hardware.  This driver represents unnecessary
ongoing maintenance for no clear benefit.

This patch brought to you by the "hacking" session at the 2009 Kernel
Summit in Tokyo, Japan...

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove RX_FLAG_RADIOTAP
Johannes Berg [Wed, 28 Oct 2009 09:03:35 +0000 (10:03 +0100)]
mac80211: remove RX_FLAG_RADIOTAP

While there may be a case for a driver adding its
own bits of radiotap information, none currently
does. Also, drivers would have to copy the code
to generate the radiotap bits that now mac80211
generates. If some driver in the future needs to
add some driver-specific information I'd expect
that to be in a radiotap vendor namespace and we
can add a different way of passing such data up
and having mac80211 include it.

Additionally, rename IEEE80211_CONF_RADIOTAP to
IEEE80211_CONF_MONITOR since it's still used by
b43(legacy) to obtain per-frame timestamps.

The purpose of this patch is to simplify the RX
code in mac80211 to make it easier to add paged
skb support.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix radiotap header generation
Johannes Berg [Wed, 28 Oct 2009 08:58:52 +0000 (09:58 +0100)]
mac80211: fix radiotap header generation

In

  commit 601ae7f25aea58f208a7f640f6174aac0652403a
  Author: Bruno Randolf <br1@einfach.org>
  Date:   Thu May 8 19:22:43 2008 +0200

      mac80211: make rx radiotap header more flexible

code was added that tried to align the radiotap header
position in memory based on the radiotap header length.
Quite obviously, that is completely useless.

Instead of trying to do that, use unaligned accesses
to generate the radiotap header. To properly do that,
we also need to mark struct ieee80211_radiotap_header
packed, but that is fine since it's already packed
(and it should be marked packed anyway since its a
wire format).

Cc: Bruno Randolf <br1@einfach.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: split hardware scan by band
Johannes Berg [Tue, 27 Oct 2009 19:59:55 +0000 (20:59 +0100)]
mac80211: split hardware scan by band

There's currently a very odd bug in mac80211 -- a
hardware scan that is done while the hardware is
really operating on 2.4 GHz will include CCK rates
in the probe request frame, even on 5 GHz (if the
driver uses the mac80211 IEs). Vice versa, if the
hardware is operating on 5 GHz the 2.4 GHz probe
requests will not include CCK rates even though
they should.

Fix this by splitting up cfg80211 scan requests by
band -- recalculating the IEs every time -- and
requesting only per-band scans from the driver.

Apparently this bug hasn't been a problem yet, but
it is imaginable that some older access points get
confused if confronted with such behaviour.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove outdated comment
Johannes Berg [Tue, 27 Oct 2009 19:56:21 +0000 (20:56 +0100)]
mac80211: remove outdated comment

This comment hasn't been a real TODO item for a long
time now since we fixed that quite a while ago.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211_hwsim: don't register CCK rates on 5ghz
Johannes Berg [Tue, 27 Oct 2009 19:53:58 +0000 (20:53 +0100)]
mac80211_hwsim: don't register CCK rates on 5ghz

This buglet confused me a lot just now ...

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove bogus register write on ath9k_hw_9271_pa_cal()
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:37 +0000 (12:59 -0400)]
ath9k_hw: remove bogus register write on ath9k_hw_9271_pa_cal()

An extra register was being written to for PA calibration
making the hardware unresponsive, remove it. Hardware
reset should now complete fine on ar9271.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: correct AR_PHY_SPECTRAL_SCAN register offset
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:36 +0000 (12:59 -0400)]
ath9k_hw: correct AR_PHY_SPECTRAL_SCAN register offset

We had 0x9912 but AR_PHY_SPECTRAL_SCAN is 0x9910. By using the
0x9912 we were making the hardware unresponsive. This allows us
to move forward with hardware reset on ar9271 on the ath9k_htc
driver.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: add AR9271 single chip name mapping
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:35 +0000 (12:59 -0400)]
ath9k_hw: add AR9271 single chip name mapping

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: distinguish single-chip solutions on initial probe print
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:34 +0000 (12:59 -0400)]
ath9k_hw: distinguish single-chip solutions on initial probe print

Devices with external radios have revisions which we can count on.
On single chip solutions these EEPROM values for these radio revision
also exist but are not meaningful as the radios are embedded onto the
same chip. Each single-chip device evolves together as one device.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: move mac name and rf name helpers to hw code
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:33 +0000 (12:59 -0400)]
ath9k_hw: move mac name and rf name helpers to hw code

These are shared between ath9k and the future ath9k_htc driver.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: enable power save
Kalle Valo [Tue, 27 Oct 2009 15:36:25 +0000 (17:36 +0200)]
wl1251: enable power save

wl1251 supports power save and it can be enabled now.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix dynamic power save for devices with nullfunc support in hw
Kalle Valo [Tue, 27 Oct 2009 15:36:17 +0000 (17:36 +0200)]
mac80211: fix dynamic power save for devices with nullfunc support in hw

In TX path it was assumed that dynamic power save works only if
IEEE80211_HW_PS_NULLFUNC_STACK is set. But is not the case, there are
devices which have nullfunc support in hardware but need mac80211
to handle dynamic power save timers, TI's wl1251 is one of them.

The fix is to not check for IEEE80211_HW_PS_NULLFUNC_STACK in
is_dynamic_ps_enabled(), instead check IEEE80211_HW_SUPPORTS_PS and
IEEE80211_HW_SUPPORTS_DYNAMIC_PS flags and act accordingly.

Tested with wl1251.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: refactor dynamic power save check
Kalle Valo [Tue, 27 Oct 2009 15:36:09 +0000 (17:36 +0200)]
mac80211: refactor dynamic power save check

Refactor dynamic power save checks to a function of it's own for better
readibility. No functional changes.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211/mac80211: use debugfs_remove_recursive
Johannes Berg [Tue, 27 Oct 2009 11:59:03 +0000 (12:59 +0100)]
cfg80211/mac80211: use debugfs_remove_recursive

We can save a lot of code and pointers in the structs
by using debugfs_remove_recursive().

First, change cfg80211 to use debugfs_remove_recursive()
so that drivers do not need to clean up any files they
added to the per-wiphy debugfs (if and only if they are
ok to be accessed until after wiphy_unregister!).

Then also make mac80211 use debugfs_remove_recursive()
where necessary -- it need not remove per-wiphy files
as cfg80211 now removes those, but netdev etc. files
still need to be handled but can now be removed without
needing struct dentry pointers to all of them.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: LP-PHY: Begin implementing calibration & software RFKILL support
Gábor Stefanik [Sun, 25 Oct 2009 15:26:36 +0000 (16:26 +0100)]
b43: LP-PHY: Begin implementing calibration & software RFKILL support

This implements the following calibration functions:
-Set TX IQCC
-Set TX Power by Index
-PR41573 workaround (incomplete, needs PHY reset)
-Calc RX IQ Comp
-PHY Cordic
-Run Samples
-Start/Stop TX Tone
-part of PAPD Cal TX Power
-RX I/Q Calibration
-The basic structure of the periodic calibration wrapper

Software RFKILL (required by calibration) is also implemented in
this round.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agovlan: cleanup multiple unregistrations
Patrick McHardy [Fri, 30 Oct 2009 06:43:00 +0000 (23:43 -0700)]
vlan: cleanup multiple unregistrations

The temporary copy of the VLAN group is not neccessary since the lower device
is already in the process of being unregistered, if it was neccessary the
memset of the global group would introduce a race condition.

With this removed, the changes to the original code are only a few lines, so
remove the new function and move the code back into vlan_device_event().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>