Rafał Miłecki [Sun, 14 Aug 2011 18:16:37 +0000 (20:16 +0200)]
b43: fix DMA on some bugged hardware
Some hardware with 64-bit DMA uses lower address word for setting
routing (translation) bit. Add workaround for such boards.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 14 Aug 2011 17:39:40 +0000 (19:39 +0200)]
ssb: fix DMA translation for some specific boards
Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 13 Aug 2011 16:13:49 +0000 (10:13 -0600)]
ath9k: remove a bogus WARN_ON
On embedded hardware it's normal to not have a PCI device for the PCI
bridge that the wifi card is attached to. pdev->bus->self will be
NULL in that case. In that case, simply return without emitting an
useless kernel stack trace.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:18 +0000 (10:28 +0530)]
ath9k: Dump modal noisefloor calibration history
Debugfs file location:
<debugfs_mnt>/ieee80211/phy#/ath9k/dump_nfcal
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:17 +0000 (10:28 +0530)]
ath9k: Fix invalid noisefloor reading due to channel update
While switching b/w HT20/40, the current channel's nf values
are updated into history buffer. Since the current channel's
channel type, channel flag got updated before reading
nf value from hw. This channel type mismatch is causing invalid
readings when hw is on ht20 but getnf tries to read on extn chains.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:16 +0000 (10:28 +0530)]
ath9k: Fix noisefloor history update for extn chains
Before doing hw reset the current channel's noisefloor readings
are updated into history buffer. The extension chain's readings
are considered only if the current channel was configured in HT40.
While moving from HT40 to HT20, the extn chain's readings are
skipped though the current channel is in ht40. This patch updates
extn chain reading based on channel flag.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:15 +0000 (10:28 +0530)]
ath9k: Move ath9k_init_crypto to common
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:14 +0000 (10:28 +0530)]
ath9k: Remove SC_OP_ENABLE_APM
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:13 +0000 (10:28 +0530)]
ath9k_hw: Remove unnecessary chainmask configuration
The chainmasks were already configured at process_ini
before doing init calibration.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:12 +0000 (10:28 +0530)]
ath9k: qinfo never be NULL in setuptxqueue
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:11 +0000 (10:28 +0530)]
ath9k: Remove unused argument tsf from ath9k_hw_rxprocdesc
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:10 +0000 (10:28 +0530)]
ath9k: Re-enable RXOEL interrupt after processing rx buffers
Once RXEOL was disabled, it never be enabled again. This patch
re-enables rxeol at the end of rx tasklet.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:09 +0000 (10:28 +0530)]
ath9k: Fix rx overrun interrupt storm
Whenever RXEOL is received, both RXORN and RXEOL got cleared
to avoid rx overrun interrupt storm. This was handled only for
edma chips. The same scenario was also observered with AR9280,
doing frequent channel type switch b/w HT20/40 with bidi traffic
that is causing failure to stop rx dma. This patch clears
the RXEOL & RXORN interrupts for all chips.
ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020
DMADBG_7=0x000062c0
ath: Could not stop RX, we could be confusing the DMA engine when we
start RX up
------------[ cut here ]------------
WARNING: at drivers/net/wireless/ath/ath9k/recv.c:532
ath_stoprecv+0x110/0x120 [ath9k]()
Call Trace:
[<
ffffffff8104a55a>] warn_slowpath_common+0x7a/0xb0
[<
ffffffff8104a5a5>] warn_slowpath_null+0x15/0x20
[<
ffffffffa0560380>] ath_stoprecv+0x110/0x120 [ath9k]
[<
ffffffffa055e6fa>] ath_reset+0x6a/0x200 [ath9k]
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 13 Aug 2011 04:58:08 +0000 (10:28 +0530)]
ath9k_hw: Fix exceed transmission burst-time of 5GHz
The WAR which adds extra delimiters when using RTS/CTS
with aggregation and non-enterprise AR9003 chips.
This extra padding is done after doing all the 4ms limit
checks and hence the total aggregate sizes are exceeding
the allowed duration. This patch limits the aggregate
sizes appropriately after including these extra delimiters.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 9 Aug 2011 23:45:11 +0000 (16:45 -0700)]
{nl,cfg,mac}80211: let userspace make meshif mesh gate
Allow userspace to set NL80211_MESHCONF_GATE_ANNOUNCEMENTS attribute,
which will advertise this mesh node as being a mesh gate.
NL80211_HWMP_ROOTMODE must be set or this will do nothing.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 9 Aug 2011 23:45:10 +0000 (16:45 -0700)]
{nl,cfg,mac}80211: let userspace set RANN interval
Allow userspace to set Root Announcement Interval for our mesh
interface. Also, RANN interval is now in proper units of TUs.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 9 Aug 2011 23:45:09 +0000 (16:45 -0700)]
{nl,mac}80211: add missing root mode meshconf entries
This fix allows userspace to mark a meshif as a root node.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 9 Aug 2011 23:45:08 +0000 (16:45 -0700)]
mac80211: mesh gate implementation
In this implementation, a mesh gate is a root node with a certain bit
set in its RANN flags. The mpath to this root node is marked as a path
to a gate, and added to our list of known gates for this if_mesh. Once a
path discovery process fails, we forward the unresolved frames to a
known gate. Thanks to Luis Rodriguez for refactoring and bug fix help.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 9 Aug 2011 23:45:07 +0000 (16:45 -0700)]
mac80211: fix mesh path flushing
Previously, mpaths were never flushed since the mpath is not active once
we call this function.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 9 Aug 2011 23:45:06 +0000 (16:45 -0700)]
mac80211: mesh locking fixes
mesh_queue_preq is invoked invoked from both user (work queue) and
softirq (timer) context, so the _bh version of spinlock needs to be
used. Also, the mpath->state_lock should be softirq safe as well.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 9 Aug 2011 23:45:05 +0000 (16:45 -0700)]
mac80211: fix mpath timer NULL function
If we have an mpath whose timer has not been initialized, don't try to
delete it.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 9 Aug 2011 23:45:04 +0000 (16:45 -0700)]
mac80211: improve mpath debugging
make hwmp_dbg print the relevant sdata->name by default and improve
formatting. Also add mpath_dbg macro for debugging of mesh path
operations.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 23 Aug 2011 17:09:30 +0000 (19:09 +0200)]
b43: HT-PHY: allow writing longer tables with a single call
Sometimes we need to write table which is 2-10 elements long. It's
easier to create such a function instead of defining array every time.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 13 Aug 2011 15:54:04 +0000 (17:54 +0200)]
b43: HT-PHY: init: add missing small-tables writes
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stefan Assmann [Sat, 13 Aug 2011 10:12:36 +0000 (12:12 +0200)]
rtlwifi: add module parameter to set global debug level
No need to recompile the module anymore to set the debug level.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 12 Aug 2011 23:41:12 +0000 (01:41 +0200)]
b43: HT-PHY: init: add some AFE (Analog Frontend) operation
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 12 Aug 2011 23:41:11 +0000 (01:41 +0200)]
b43: HT-PHY: init: add missing PHY mask/set ops
MMIO hacks were used to trick ndis&wl. For example following:
phy_read(0x0280) -> 0xffff
phy_write(0x0280) <- 0xff3e
***
phy_read(0x0280) -> 0x0000
phy_write(0x0280) <- 0x003e
was translated to mask 0xff00 and set 0x3e.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 12 Aug 2011 13:27:34 +0000 (15:27 +0200)]
b43: HT-PHY: init: init BPHY and upload 0x1a table
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 12 Aug 2011 11:13:46 +0000 (13:13 +0200)]
b43: HT-PHY: init: copy tables and reset CCA
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 12 Aug 2011 11:13:45 +0000 (13:13 +0200)]
b43: HT-PHY: init: implement few simple PHY writes
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 12 Aug 2011 11:13:44 +0000 (13:13 +0200)]
b43: HT-PHY: init: zero EXTG registers
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nishant Sarmukadam [Fri, 12 Aug 2011 06:50:21 +0000 (12:20 +0530)]
mwl8k: Traffic to clients gets affected when one client leaves a cyrpto bss
When a client disassociates from a crypto enabled bss, data traffic to
other clients connected to the bss is stalled. This was due to a boolean
variable used to keep track if HW crypto is enabled i.e. if set key has
been called to add a key. This flag was being reset every time delete
key was called e.g when a station leaves the bss. Once the flag is
reset, rx status flags were not being set for connected clients which
disrupts traffic to these clients. Fix this issue by not resetting the
flag since we do not need to reset this flag during the life time of the
bss.
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Fri, 12 Aug 2011 02:35:15 +0000 (19:35 -0700)]
mac80211: update mesh path selection frame format
Make mesh path selection frames Mesh Action category, remove outdated
Mesh Path Selection category and defines, use updated reason codes, add
mesh_action_is_path_sel for readability, and update/correct path
selection IEs.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Fri, 12 Aug 2011 02:35:14 +0000 (19:35 -0700)]
ieee80211: add mesh action codes
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Sat, 13 Aug 2011 03:01:00 +0000 (20:01 -0700)]
mac80211: update mesh peering frame format
This patch updates the mesh peering frames to the format specified in
the recently ratified 802.11s standard. Several changes took place to
make this happen:
- Change RX path to handle new self-protected frames
- Add new Peering management IE
- Remove old Peer Link IE
- Remove old plink_action field in ieee80211_mgmt header
These changes by themselves would either break peering, or work by
coincidence, so squash them all into this patch.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Fri, 12 Aug 2011 02:35:12 +0000 (19:35 -0700)]
mac80211: update mesh peering frame codes
Have the mesh peering frames use the self-protected action and reason codes
specified in 802.11s and defined in ieee80211.h. Remove the local enums.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Fri, 12 Aug 2011 02:35:11 +0000 (19:35 -0700)]
ieee80211: introduce Self Protected Action codes
802.11s introduces a new action frame category, add action codes as well
as an entry in ieee80211_mgmt.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Fri, 12 Aug 2011 02:35:10 +0000 (19:35 -0700)]
mac80211: fix mesh beacon format
Correct ordering of IEs in the mesh beacon while removing unneeded IEs
from mesh peering frames. Set privacy bit in capability info if security
is enabled. Add utility functions to aid in construction
of IEs and reduce code duplication.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 11 Aug 2011 22:03:26 +0000 (00:03 +0200)]
b43: make forcing clock common (HT-PHY also uses that)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 11 Aug 2011 22:03:25 +0000 (00:03 +0200)]
b43: include HT-PHY in some common code
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 11 Aug 2011 21:46:44 +0000 (23:46 +0200)]
bcma: implement BCM4331 workaround for external PA lines
We need to disable ext. PA lines for reading SPROM. It's disabled by
default, but this patch allows using bcma after loading wl, which leaves
workaround enabled.
Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 11 Aug 2011 15:16:27 +0000 (17:16 +0200)]
b43: support new RX header, noticed to be used in 598.314+ fw
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 11 Aug 2011 13:07:16 +0000 (15:07 +0200)]
b43: support new TX header, noticed to be used by 598.314+ fw
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 11 Aug 2011 13:07:15 +0000 (15:07 +0200)]
b43: use enum for firmware header format
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 11 Aug 2011 13:07:14 +0000 (15:07 +0200)]
b43: rename TX header formats
Replace "old" and "new" with number of the first firmware known to use
the given format.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 11 Aug 2011 14:17:42 +0000 (16:17 +0200)]
mac80211: Tear down BA session on BAR tx failure
As described at [1] some STAs (i.e. Intel 5100 Windows) can end up
correctly BlockAcking incoming frames without delivering them to user
space if a AMPDU subframe got lost and we don't flush the receipients
reorder buffer with a BlockAckReq. This in turn results in stuck
connections.
According to 802.11n-2009 it is not necessary to send a BAR to flush
the recepients RX reorder buffer but we still do that to be polite.
However, assume the following frame exchange:
AP -> STA, AMPDU (failed)
AP -> STA, BAR (failed)
The client in question then ends up in the same situation and won't
deliver frames to userspace anymore since we weren't able to flush
its reorder buffer.
This is not a hypothetical situation but I was able to observe this
exact behavior during a stress test between a rt2800pci AP and a Intel
5100 Windows client.
In order to work around this issue just tear down the BA session as
soon as a BAR failed to be TX'ed.
[1] http://comments.gmane.org/gmane.linux.kernel.wireless.general/66867
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 11 Aug 2011 14:17:41 +0000 (16:17 +0200)]
wireless: Introduce defines for BAR TID_INFO & MULTI_TID fields
While at it also fix the indention of the other IEEE80211_BAR_CTRL_ defines.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Wed, 10 Aug 2011 19:50:30 +0000 (13:50 -0600)]
b43: reload phy and bss settings after core restarts
b43_op_config and b43_op_bss_info_changed apply many settings by directly
writing to hardware registers. These settings are lost as soon as the core
is restarted and the initvals are reloaded. This was discovered because
restarting hostapd led to the beacon interval getting set to ~33s (see
https://dev.openwrt.org/ticket/8033 for more information).
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 5 Aug 2011 11:10:34 +0000 (13:10 +0200)]
ath9k: do btcoex ASPM disabling at initialization time
Disable ASPM in pci ->probe on upstream (device) and downstream
(PCIe port) component. According to e1000e driver authors this is
required. I did not find that requirement in PCIe spec, but it seems
to be logical for me.
This need to be fixed for CONFIG_PCIEASPM, that will be done later ...
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 5 Aug 2011 11:10:33 +0000 (13:10 +0200)]
ath9k: merge common ->config_pci_powersave() checks
Move common checks into wrapper function. Since ASPM can be only enabled
on PCIe devices ->is_pciexpress check is unneeded.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 5 Aug 2011 11:10:32 +0000 (13:10 +0200)]
ath9k: remove ->config_pci_powersave() redundant argument
We always call ->config_pci_powersave() with both restore and power_off
arguments equal to 0 or both equal to 1, so merge them into one
argument.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Aug 2011 18:45:44 +0000 (21:45 +0300)]
staging: remove ath6kl
ath6kl is now in drivers/net/wireless/ath so the staging driver
is not supported anymore and should be removed.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Thu, 11 Aug 2011 01:53:57 +0000 (18:53 -0700)]
mwifiex: use cfg80211 dynamic scan table and cfg80211_get_bss API
Instead of maintaining static scan table in driver, scan list is sent
to cfg80211 stack (after parsing each scan command response).
In assoc handler (for infra and ibss network) requested BSS information
is retrieved using cfg80211_get_bss() API.
With the changes above some redundant code are removed.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Wed, 10 Aug 2011 21:23:35 +0000 (15:23 -0600)]
ath9k: avoid sending a-mpdu packets to sleeping stations
If the driver gets a tx status report for an A-MPDU sent to a station that
just went to sleep, that leaves a race condition where this tx status can
trigger another A-MPDU transmission.
To fix this, check if the station is sleeping before queueing the tid.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Wed, 10 Aug 2011 20:55:56 +0000 (23:55 +0300)]
nl80211/cfg80211: Add extra IE configuration to AP mode setup
The NL80211_CMD_NEW_BEACON command is, in practice, requesting AP mode
operations to be started. Add new attributes to provide extra IEs
(e.g., WPS IE, P2P IE) for drivers that build Beacon, Probe Response,
and (Re)Association Response frames internally (likely in firmware).
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Wed, 10 Aug 2011 20:54:35 +0000 (23:54 +0300)]
nl80211/cfg80211: Add crypto settings into NEW_BEACON
This removes need from drivers to parse the beacon tail/head data
to figure out what crypto settings are to be used in AP mode in case
the Beacon and Probe Response frames are fully constructed in the
driver/firmware.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Wed, 10 Aug 2011 20:53:31 +0000 (23:53 +0300)]
nl80211/cfg80211: Allow SSID to be specified in new beacon command
This makes it easier for drivers that generate Beacon and Probe Response
frames internally (in firmware most likely) in AP mode.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Wed, 10 Aug 2011 01:02:26 +0000 (18:02 -0700)]
cfg80211/mac80211: move information element parsing logic to cfg80211
Moving the parsing logic for retrieving the information elements
stored in management frames, e.g. beacons or probe responses,
and making it available to other cfg80211 drivers.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marek Lindner [Wed, 3 Aug 2011 14:35:16 +0000 (16:35 +0200)]
ath9k: remove eeprom txgain override for minor version < 19
ath9k_hw_4k_get_eeprom() overrides the eeprom value for txgain if the
minor version is not 19 or above with a value of 0.
ar9002_hw_init_mode_gain_regs() relies on this information to
determine whether this is a high power wifi card or not. The override
caused the driver to always use the 'normal' power tables even for
high power devices if their minor version was not high enough. Thus
leading to reduced power output.
This isn't needed for the AR9285; the check originated with the
AR9280 setup code which requires the EEPROM version check.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Adrian Chadd <adrian@freebsd.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Thu, 11 Aug 2011 08:46:22 +0000 (11:46 +0300)]
nl80211/cfg80211: Make addition of new sinfo fields safer
Add a comment pointing out the use of enum station_info_flags for
all new struct station_info fields. In addition, memset the sinfo
buffer to zero before use on all paths in the current tree to avoid
leaving uninitialized pointers in the data.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 11 Aug 2011 01:00:33 +0000 (19:00 -0600)]
cfg80211: fix a crash in nl80211_send_station
mac80211 leaves sinfo->assoc_req_ies uninitialized, causing a random
pointer memory access in nl80211_send_station.
Instead of checking if the pointer is null, use sinfo->filled, like
the rest of the fields.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Wed, 10 Aug 2011 10:54:57 +0000 (16:24 +0530)]
ath9k: remove obselete comments
the comments are obselete as the virtual wiphy support was removed from
the driver
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Tue, 9 Aug 2011 16:03:43 +0000 (21:33 +0530)]
ath9k: optimize rate control statistics
for the ease of debugging, we display only the rate control statistics
for currently operating mode and bandwidth
Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Cc: "Balasubramanian, senthilkumar" <senthilb@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Mon, 8 Aug 2011 23:30:50 +0000 (16:30 -0700)]
mac80211: fix erroneous clearing of MESH_PATH_SN_VALID flag
When a PREQ or PREP is received from an intermediate node, it contains
useful information for path selection but it doesn't include the
originator's sequence number. Therefore, when updating the mesh path
to that intermediate node, we should not set the MESH_PATH_SN_VALID
flag. BUT, if the flag is set, it should not be unset as we might have
received a valid sequence number for that intermediate node in the past.
This issue was reported, fixed and tested by Ya Bo (游波) and Pedro
Larbig (ASPj).
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Mon, 8 Aug 2011 15:48:49 +0000 (21:18 +0530)]
ath9k_htc: minor clean-up
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Mon, 8 Aug 2011 13:50:22 +0000 (16:50 +0300)]
mac80211: clear sta.drv_priv on reconfiguration
drivers might assume sta.drv_priv is clear while
the sta is added, so clear it on reconfinguration.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Mon, 8 Aug 2011 09:11:52 +0000 (12:11 +0300)]
cfg80211/nl80211: Send AssocReq IEs to user space in AP mode
When user space SME/MLME (e.g., hostapd) is not used in AP mode, the
IEs from the (Re)Association Request frame that was processed in
firmware need to be made available for user space (e.g., RSN IE for
hostapd). Allow this to be done with cfg80211_new_sta().
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Mon, 8 Aug 2011 09:10:30 +0000 (12:10 +0300)]
nl80211: Indicate driver-based offchannel TX on mgmt_tx_cancel_wait
Drivers that support frame transmission with mgmt_tx() may not support
driver-based offchannel TX. Use mgmt_tx_cancel_wait instead of mgmt_tx
when figuring out whether to indicate support for this with
NL80211_ATTR_OFFCHANNEL_TX_OK.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Sat, 6 Aug 2011 20:07:00 +0000 (23:07 +0300)]
mac80211_hwsim: Fix RX status reporting for HT
RX_FLAG_HT must be included when reporting MCS rates. Without
this, mac80211 ended up dropping any frame sent at MCS index 12
or higher and that resulted in oddly random looking errors in
mac80211_hwsim tests.
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 10 Aug 2011 17:51:19 +0000 (13:51 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/kvalo/ath6kl
Kalle Valo [Wed, 10 Aug 2011 06:49:12 +0000 (09:49 +0300)]
ath6kl: fix function name conflicts with ath9k
Stephen reported that compilation fails if both ath6kl and ath9k are
compiled in:
drivers/net/wireless/ath/ath6kl/built-in.o: In function `htc_start':
(.opd+0x600): multiple definition of `htc_start'
drivers/net/wireless/ath/ath9k/built-in.o:(.opd+0x3e40): first defined here
drivers/net/wireless/ath/ath6kl/built-in.o: In function `.htc_stop':
(.text+0x7b40): multiple definition of `.htc_stop'
drivers/net/wireless/ath/ath9k/built-in.o:(.text+0x67b34): first defined he=
re
drivers/net/wireless/ath/ath6kl/built-in.o: In function `.htc_start':
(.text+0x7d18): multiple definition of `.htc_start'
drivers/net/wireless/ath/ath9k/built-in.o:(.text+0x67ba0): first defined he=
re
drivers/net/wireless/ath/ath6kl/built-in.o: In function `htc_stop':
(.opd+0x5e8): multiple definition of `htc_stop'
drivers/net/wireless/ath/ath9k/built-in.o:(.opd+0x3e28): first defined here
To fix this add ath6kl prefix to all public functions in htc.c.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
John W. Linville [Tue, 9 Aug 2011 20:02:26 +0000 (16:02 -0400)]
Merge branch 'ath6kl-next' of /linux/kernel/git/kvalo/ath6kl
Larry Finger [Sat, 30 Jul 2011 16:30:27 +0000 (11:30 -0500)]
b43: Remove EXPERIMENTAL designation from LP PHY selection
Since kernel 3.0, the problems with controlling b43 devices that have
low-power (LP) PHYs have been fixed and the EXPERIMENTAL designation
can be fixed.
This patch also fixes a typo as the device supports 802.11b communications.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Sat, 6 Aug 2011 14:23:44 +0000 (07:23 -0700)]
libertas: remove some dead code in if_spi_prog_helper_firmware()
We always hit the goto and skip the printk(). The original code does
the right thing even though it looks messy.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Sat, 6 Aug 2011 11:13:48 +0000 (13:13 +0200)]
rt2x00: Fix PCI interrupt processing race on SMP systems
When toggle_irq is called for PCI devices to disable device interrupts
it used tasklet_disable to wait for a possibly running tasklet to finish.
However, on SMP systems the tasklet might still be scheduled on another CPU.
Instead, use tasklet_kill to ensure that all scheduled tasklets are finished
before returning from toggle_irq.
Furthermore, it was possible that a tasklet reenabled its interrupt even
though interrupts have been disabled already. Fix this by checking the
DEVICE_STATE_ENABLED_RADIO flag before reenabling single interrupts
during tasklet processing.
While at it also enable/kill the TBTT and PRETBTT tasklets in the
toggle_irq callback and only use tasklet_kill in stop_queue to wait
for a currently scheduled beacon update before returning.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sat, 6 Aug 2011 10:55:19 +0000 (05:55 -0500)]
rtlwifi: Remove raw read/write routines from header
Now that the driver no longer uses the raw r/w routines, remove their definitions.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sat, 6 Aug 2011 10:55:18 +0000 (05:55 -0500)]
rtlwifi: Eliminate raw reads and writes from PCIe portion
The PCIe driver used raw reads and writes on the PCIe hardware.
As all of these are only affecting the configuration space, all of
then can be converted to pci_{read,write}_config_XX calls.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 5 Aug 2011 13:29:41 +0000 (18:59 +0530)]
ath9k: Use atomic reference count for interrupt ops
Let us enable/disable interrupts based on reference count.
By doing this we can ensure that interrupts are never be
enabled in the middle of tasklet processing. Instead of
addressing corner cases like "ath9k: avoid enabling interrupts
while processing rx", this approach handles it in generic manner.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 5 Aug 2011 13:29:42 +0000 (18:59 +0530)]
ath9k_hw: Fix incorrect spur_freq_sd for AR9003
Spur frequency was incorrectly computed with 10Mhz offset
which could cause the filter would not notch out the spur
and also this could improve rx sensitivity in HT40.
Cc: Madhan Jaganathan <madhanj@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 5 Aug 2011 13:29:40 +0000 (18:59 +0530)]
ath9k: do not enable interrupt on set interrupt mask
At preset set_interrupt also enables interrupt after changing
mask. This is not necessary in all cases and also sometime it
breaks the assumption that interrupt was disabled. So let us
enable the interrupt explicity if it was disabled earlier.
This could also avoid unnecessary register ops and also helps
the follow up patch to have global ref count for interrupts ops.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alex Hacker [Wed, 3 Aug 2011 11:41:54 +0000 (17:41 +0600)]
ath9k_hw: use register name in place of magic value
Signed-off-by: Alex Hacker <hacker@epn.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Wed, 3 Aug 2011 01:42:23 +0000 (18:42 -0700)]
mwifiex: print driver version information
Add code to display driver version information in dmesg after
loading the driver successfully.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Mon, 1 Aug 2011 15:43:27 +0000 (16:43 +0100)]
libertas: implement if_sdio runtime power management
The SDIO card is now fully powered down when the network interface is
brought down.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Mon, 1 Aug 2011 15:43:13 +0000 (16:43 +0100)]
libertas: disable functionality when interface is down
Modify the driver so that it does not function when the interface is
down, in preparation for runtime power management.
No commands can be run while the interface is down, so the ndo_dev_stop
routine now directly does all necessary work (including asking the device
to disconnect from the network and disabling multicast functionality)
directly.
power_save and power_restore hooks are added meaning that card drivers
can take steps to turn the device off when the interface is down.
The MAC address can now only be changed when all interfaces are down;
the new address will be programmed when an interface gets brought up.
This matches mac80211 behaviour.
Also, some small cleanups/simplifications were made in the surrounding
device handling logic.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Mon, 1 Aug 2011 09:32:53 +0000 (11:32 +0200)]
mac80211: Don't use EAPOL frames for rate sampling
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Mon, 1 Aug 2011 09:32:52 +0000 (11:32 +0200)]
mac80211: Fill in skb->protocol information for injected frames
Some drivers (ath9k for example) are using skb->protocol to treat EAPOL
frames somehow special (disallow aggregation for example).
When running in AP mode hostapd injects the EAPOL frames through a
monitor interface and thus skb->protocol isn't set at all. Hence, if the
injected frame is a data frame and carries a rfc1042 headaer update the
skb->protocol field accordingly.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Fri, 29 Jul 2011 21:51:25 +0000 (14:51 -0700)]
cfg80211: Update REG_DBG_PRINT macro and uses
Several uses were missing terminating newlines.
Typo fix and macro neatening.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:20 +0000 (17:38 +0530)]
ath9k_hw: Update AR9003 high_power tx gain table
The high_power tx gain table is changed to match the low_ob_db tx gain
table for both 5G and 2G.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:19 +0000 (17:38 +0530)]
ath9k_hw: Update the radio parameters related to high_power
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:16 +0000 (17:38 +0530)]
ath9k_hw: Optimize rx descriptor processing for AR9003
No need to process RxDone and ds_info status again in case
valid rx status is given.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:14 +0000 (17:38 +0530)]
ath9k: Remove virtual wiphy specific frame type
This patch cleanups virtual wiphy specific frametype structure
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:13 +0000 (17:38 +0530)]
ath9k: Dump modal eeprom header
Debugfs file location:
<debugfs_mnt>/ieee80211/phy#/ath9k/modal_eeprom
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:12 +0000 (17:38 +0530)]
ath9k: Dump base eeprom header
Debugfs file location:
<debugfs_mnt>/ieee80211/phy#/ath9k/base_eeprom
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:11 +0000 (17:38 +0530)]
ath9k_hw: Add dump_eeprom support for eeprom_def
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:10 +0000 (17:38 +0530)]
ath9k_hw: Add dump_eeprom support for AR9287
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:09 +0000 (17:38 +0530)]
ath9k_hw: Add dump_eeprom support for eeprom_4k
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 29 Jul 2011 12:08:08 +0000 (17:38 +0530)]
ath9k_hw: Add dump_eeprom support for AR9003
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Fri, 29 Jul 2011 02:50:44 +0000 (22:50 -0400)]
lib80211: remove exports for functions not called by other modules
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Sat, 23 Jul 2011 11:57:34 +0000 (13:57 +0200)]
b43: add core rev 17 used on bcma SoC.
This ieee80211 core was found on a Netgear wndr3400.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 23 Jul 2011 09:10:12 +0000 (11:10 +0200)]
bcma: use boardflags define from ssb code
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>