]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
14 years agowl1271: Support firmware TX packet aggregation
Ido Yariv [Thu, 30 Sep 2010 11:28:28 +0000 (13:28 +0200)]
wl1271: Support firmware TX packet aggregation

Instead of sending one packet at a time to the firmware, try to
send all available packets at once.
This optimization decreases the number of transactions, which saves
CPU cycles and increases network throughput.

Signed-off-by: Ido Yariv <ido@wizery.com>
Tested-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Support firmware RX packet aggregation
Ido Yariv [Thu, 30 Sep 2010 11:28:27 +0000 (13:28 +0200)]
wl1271: Support firmware RX packet aggregation

Instead of retrieving one packet at a time from the firmware, try to
retrieve all available packets at once.
This optimization decreases the number of transactions, which saves
CPU cycles and increases network throughput.

Signed-off-by: Ido Yariv <ido@wizery.com>
Tested-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Handle large SPI transfers
Ido Yariv [Thu, 30 Sep 2010 11:28:26 +0000 (13:28 +0200)]
wl1271: Handle large SPI transfers

The HW supports up to 4095 bytes transfers via SPI. The SPI read & write
operations do not handle larger transfers, causing the HW to stall in such
cases.

Fix this by fragmenting large transfers into smaller chunks, and
transferring each one separately.

Signed-off-by: Ido Yariv <ido@wizery.com>
Tested-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl12xx: fix non-wl12xx build scenarios
Ohad Ben-Cohen [Tue, 28 Sep 2010 18:20:28 +0000 (20:20 +0200)]
wl12xx: fix non-wl12xx build scenarios

Support building wl1271-equipped boards without building the
wl1271 driver itself, e.g.:

CONFIG_MACH_OMAP_ZOOM3=y
CONFIG_WL12XX is not set

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agoMAINTAINERS: Update git url for the wl1271 driver
Luciano Coelho [Tue, 28 Sep 2010 06:54:27 +0000 (09:54 +0300)]
MAINTAINERS: Update git url for the wl1271 driver

We are integrating wl1271 commits via a new git tree now and wl1271
development should be made on top of the new tree.

Update the repository url accordingly.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Add support for hardware GEM cipher
Juuso Oikarinen [Mon, 27 Sep 2010 10:42:07 +0000 (12:42 +0200)]
wl1271: Add support for hardware GEM cipher

This patch adds support for the hardware GEM cipher suite.

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>
14 years agowl1271: Increase connection reliability
Juuso Oikarinen [Fri, 24 Sep 2010 01:10:11 +0000 (03:10 +0200)]
wl1271: Increase connection reliability

This patch improves connection reliability by choosing the lowest basic
rate for null-func frames (which increases their range, as the firmware does
not do rate fall-back for null-func frames.) Also, increase the PSM entry
retry-counter.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Optimize scan duration
Juuso Oikarinen [Tue, 21 Sep 2010 06:14:31 +0000 (08:14 +0200)]
wl1271: Optimize scan duration

Currently then dwell times for each channel in scans is set to an overly
long value, and excessive number of probe-requests are transmitted on each
channel (for active scans.)

Based on testing, comparable results can be received with smaller dwell-time,
and, with fever probe-requests - in fact, reducing the number of probe-requests
to 2 seems to increase the number of found results.

Configure more optimal values for per channel dwell times. Comparison for the
different scan configurations (in my current office environment):

dwell-time 60000   3x probe-req == ~60 results
           40000   3x probe-req == ~50 results
           30000   3x probe-req == ~40 results

dwell-time 60000   2x probe-req == ~70 results
           40000   2x probe-req == ~60 results
           30000   2x probe-req == ~58 results

The above are results for a cumulative 3 scan run. For individual scans, the
number of results drop slightly more.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Add handling for failing hardware scan command
Juuso Oikarinen [Tue, 21 Sep 2010 04:23:32 +0000 (06:23 +0200)]
wl1271: Add handling for failing hardware scan command

Currently, the driver does not handle a failing hardware command to scan in
any way - effectively, the scan machine will jam until the driver is shut down,
and future scan requests will just return -EBUSY to user space, resulting in
a type of busy-loop. The same problem occurs if the firmware fails to deliver
the scan completion event - add timeout for this.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Add hardware recovery mechanism
Juuso Oikarinen [Tue, 21 Sep 2010 04:23:31 +0000 (06:23 +0200)]
wl1271: Add hardware recovery mechanism

There is some probability of hardware failures, which currently go largely
undetected. Attempt to recover from these failures by shutting down the
hardware, and requesting mac80211 to reconfigure it.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Separate interface removal to another function
Juuso Oikarinen [Tue, 21 Sep 2010 04:23:30 +0000 (06:23 +0200)]
wl1271: Separate interface removal to another function

Do this so the interface removal can be triggered from an upcoming hardware
failure recovery mechanism.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Fix work cancelling when shutting down the driver
Juuso Oikarinen [Tue, 21 Sep 2010 04:23:29 +0000 (06:23 +0200)]
wl1271: Fix work cancelling when shutting down the driver

The work cancelling has had several hazards, ranging from potentially
executing work after the driver is in OFF state, to executing work after
the driver and relevant memory structures are already removed.

Fix these.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Move scan complete invocation into work function
Juuso Oikarinen [Tue, 24 Aug 2010 03:28:03 +0000 (06:28 +0300)]
wl1271: Move scan complete invocation into work function

The current scan implementation can jam, if the scan request ends up
containing no work. This can especially happen if there is a scan request
with only 11a band channels for HW that does not support 11a.

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>
14 years agowl1271: Fix AC/TID default configuration
Juuso Oikarinen [Wed, 1 Sep 2010 09:31:12 +0000 (11:31 +0200)]
wl1271: Fix AC/TID default configuration

The WMM queue default configuration was incorrect, and caused uapsd mode
problems (among possible others.)

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>
14 years agowl1271: Fix tid-configuration of TX frames
Juuso Oikarinen [Wed, 1 Sep 2010 09:31:11 +0000 (11:31 +0200)]
wl1271: Fix tid-configuration of TX frames

Incorrect TID was configured for TX frames. This resulted in incorrect
queues to be used for classes in transmission.

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>
14 years agowl1271: Enable 11a support always, prevent scanning for unsupporting chips
Juuso Oikarinen [Tue, 24 Aug 2010 03:28:03 +0000 (06:28 +0300)]
wl1271: Enable 11a support always, prevent scanning for unsupporting chips

This patch always enables 11a band towards the mac80211, but prevents scanning
(and hence the usage of) 11a band channels if the chipset does not support it.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Reduce rate used for last PSM entry attempt
Juuso Oikarinen [Tue, 24 Aug 2010 03:28:03 +0000 (06:28 +0300)]
wl1271: Reduce rate used for last PSM entry attempt

This patch reduces the rate of the null-func used to enter PSM on the last
retry as precaution.

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>
14 years agowl1271: Enable/disable 11a support based on INI configuration
Juuso Oikarinen [Thu, 19 Aug 2010 02:41:15 +0000 (04:41 +0200)]
wl1271: Enable/disable 11a support based on INI configuration

Instead of hardcoding 11a support, enable/disable driver support based on
the dual-mode-select parameter in the nvs-file general paramters.

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>
14 years agowl1271: Remove function cmd_read_memory
Juuso Oikarinen [Tue, 17 Aug 2010 02:09:34 +0000 (04:09 +0200)]
wl1271: Remove function cmd_read_memory

The function is not used anywhere.

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>
14 years agowl1271: Release interrupt *after* releasing the driver context
Juuso Oikarinen [Fri, 13 Aug 2010 02:46:48 +0000 (04:46 +0200)]
wl1271: Release interrupt *after* releasing the driver context

The current order causes driver releasing to fail in various ways, and causes
possible instability.

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>
14 years agowl1271: Remove acx_fw_version function
Juuso Oikarinen [Tue, 17 Aug 2010 01:50:04 +0000 (03:50 +0200)]
wl1271: Remove acx_fw_version function

It's not used anywhere.

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>
14 years agowl1271: Move setting of wake-up conditions to ps.c from cmd.c
Juuso Oikarinen [Tue, 10 Aug 2010 04:38:36 +0000 (06:38 +0200)]
wl1271: Move setting of wake-up conditions to ps.c from cmd.c

This removes a fixme. Also, it removes a redundant setting of the wake-up
conditions when exiting power save mode, which should improve performance.

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>
14 years agowl1271: Remove outdated FIXME's
Juuso Oikarinen [Tue, 10 Aug 2010 04:38:35 +0000 (06:38 +0200)]
wl1271: Remove outdated FIXME's

Remove outdated FIXME's from the 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>
14 years agowl1271: Change supported channel order for a more optimal scan
Juuso Oikarinen [Tue, 10 Aug 2010 06:22:02 +0000 (08:22 +0200)]
wl1271: Change supported channel order for a more optimal scan

The mac80211 inserts channels into a scan request in the same order the driver
registers them. Use this fact to optimize scan by ordering the channels so
that adjacent channels don't get scanned consecutively.

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>
14 years agowl1271: fix forced passive scan
Luciano Coelho [Wed, 4 Aug 2010 01:36:32 +0000 (04:36 +0300)]
wl1271: fix forced passive scan

When we get no SSIDs in the scan request, we should force a passive scan in
all channels.  This patch adds code to force the passive scan flag to be set
in that case.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
14 years agowl1271: remove useless 11a check when scanning
Luciano Coelho [Wed, 4 Aug 2010 00:46:22 +0000 (03:46 +0300)]
wl1271: remove useless 11a check when scanning

This code was a leftover of the previous scanning mechanism.  The if is
totally unnecessary, since both branches do the same thing.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
14 years agowl1271: Fix scan race condition
Juuso Oikarinen [Thu, 29 Jul 2010 01:54:45 +0000 (04:54 +0300)]
wl1271: Fix scan race condition

In the scan state machine, the wl1271_mutex is unlocked first then relocked,
and then the scan state variables are modified.

This makes it possible for ieee80211_scan_complete to be called twice in some
scenarios, as the scan completion event from the firmware may be processed
while the mutex is unlocked.

To fix the issue, move the ieee80211_scan_complete call last in the function.
This is generally safer, but there still may be issues is functions calling
the scan state machine rely on states checked before the unlocking of the
global mutex.

(forward ported from 2.6.32 -- this is not strictly needed anymore, because
the mutex doesn't need to be unlocked anymore, but I'm applying this change
anyway, so that the call to ieee80211_scan_complete is in the same place)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Add trigger to net_device oper_state to change BT coex priority
Juuso Oikarinen [Tue, 27 Jul 2010 00:30:09 +0000 (03:30 +0300)]
wl1271: Add trigger to net_device oper_state to change BT coex priority

Add a trigger to net_device changes to monitor for oper_state changes in order
to be able to inform the firmware when association is fully complete (including
the EAP negotiation.)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: Implement CMD_SET_STA_STATE to indicate connection completion to FW
Juuso Oikarinen [Thu, 27 May 2010 09:53:01 +0000 (12:53 +0300)]
wl1271: Implement CMD_SET_STA_STATE to indicate connection completion to FW

Implement the command function to send CMD_SET_STA_STATE to the firmware. This
is used to indicate that association (and the related EAP negotiation) are
complete.

This is used to tune WLAN-BT coexistense priority towards BT, improving BT
A2DP and SCO performance.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: remove deprecated ACX definition
Luciano Coelho [Thu, 8 Jul 2010 03:27:38 +0000 (06:27 +0300)]
wl1271: remove deprecated ACX definition

As of Rev. 6.1.0.0.335, the ACX_SET_SMART_REFLEX_DEBUG command is
deprecated.  This patch removes it from the wl1271 driver (it wasn't used
anyway).

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com>
14 years agoath9k_htc: Fix TKIP disconnect failure with HTC drivers
Rajkumar Manoharan [Fri, 24 Sep 2010 12:28:50 +0000 (17:58 +0530)]
ath9k_htc: Fix TKIP disconnect failure with HTC drivers

The following commit removed splitmic. But forgot to add
ATH_CRYPT_CAP_MIC_COMBINED flag for HTC drivers which causes
TKIP to fail.

Author: Bruno Randolf <br1@einfach.org>
Date:   Wed Sep 8 16:04:54 2010 +0900

    ath/ath9k: Replace common->splitmic with a flag

    Replace common->splitmic with ATH_CRYPT_CAP_MIC_COMBINED flag.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: move packet flags into packet
Johannes Berg [Fri, 24 Sep 2010 10:38:25 +0000 (12:38 +0200)]
mac80211: move packet flags into packet

commit 8c0c709eea5cbab97fb464cd68b06f24acc58ee1
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Wed Nov 25 17:46:15 2009 +0100

    mac80211: move cmntr flag out of rx flags

moved the CMNTR flag into the skb RX flags for
some aggregation cleanups, but this was wrong
since the optimisation this flag tried to make
requires that it is kept across the processing
of multiple interfaces -- which isn't true for
flags in the skb. The patch not only broke the
optimisation, it also introduced a bug: under
some (common!) circumstances the flag will be
set on an already freed skb!

However, investigating this in more detail, I
found that most of the flags that we set should
be per packet, _except_ for this one, due to
a-MPDU processing. Additionally, the flags used
for processing (currently just this one) need
to be reset before processing a new packet.

Since we haven't actually seen bugs reported as
a result of the wrong flags handling (which is
not too surprising -- the only real bug case I
can come up with is an a-MSDU contained in an
a-MPDU), I'll make a different fix for rc.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix release_reorder_timeout in scan
Johannes Berg [Fri, 24 Sep 2010 09:21:08 +0000 (11:21 +0200)]
mac80211: fix release_reorder_timeout in scan

Even if the reorder timeout timer fires while
scanning, the frames weren't received during
scanning and therefore shouldn't be dropped.
To implement this, changes to the passive scan
RX handler simplify understanding it, because
it currently checks HW_SCANNING independently
of a packet's in-scan receive status (which
doesn't make a big difference, since scan_rx()
will only pick up probe responses and beacons,
which can't be aggregated.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: clean up rx handling wrt. found_sta
Johannes Berg [Fri, 24 Sep 2010 09:21:07 +0000 (11:21 +0200)]
mac80211: clean up rx handling wrt. found_sta

If a station was found, then we'll have exited
the function already, so it is not necessary to
have a variable keeping track of it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: consolidate packet processing
Johannes Berg [Fri, 24 Sep 2010 09:21:06 +0000 (11:21 +0200)]
mac80211: consolidate packet processing

There are now four instances of vaguely the same
code that does packet preparation, checking for
MMIC errors and reporting them, and then invoking
packet processing. Consolidate all of these.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove prepare_for_handlers sdata argument
Johannes Berg [Fri, 24 Sep 2010 09:21:05 +0000 (11:21 +0200)]
mac80211: remove prepare_for_handlers sdata argument

The first argument to prepare_for_handlers is always
the sdata that can just be stored in rx data directly
(and even already is, in two of four code paths.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRevert "mac80211: fix use-after-free"
John W. Linville [Fri, 24 Sep 2010 19:52:49 +0000 (15:52 -0400)]
Revert "mac80211: fix use-after-free"

This reverts commit cd87a2d3a33d75a646f1aa1aa2ee5bf712d6f963.

Author reports it conflicts with proper fixes, applied hereafter.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: Fix exit from nl80211_set_power_save
Teemu Paasikivi [Fri, 24 Sep 2010 04:23:55 +0000 (07:23 +0300)]
nl80211: Fix exit from nl80211_set_power_save

If interface does not existk, when nl80211_set_power_save is called, (eg.
module has been unloaded) it has been causing kernel panic. Added new
goto target to avoid crash if get_rdev_dev_by_info_ifindex does not
return dev and rdev pointers.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Support receiving data frames on multiple vifs.
Ben Greear [Thu, 23 Sep 2010 17:22:24 +0000 (10:22 -0700)]
mac80211: Support receiving data frames on multiple vifs.

When using multiple STA interfaces on the same radio, some
data packets need to be received on all interfaces
(broadcast, for instance).

Make the STA loop look similar to the mgt-data loop.

Also, add logic to check RX_FLAG_MMIC_ERROR for last
interface in mgt-data loop.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211/ath9k: Support AMPDU with multiple VIFs.
Ben Greear [Thu, 23 Sep 2010 16:44:36 +0000 (09:44 -0700)]
mac80211/ath9k: Support AMPDU with multiple VIFs.

The old ieee80211_find_sta_by_hw method didn't properly
find VIFS when there was more than one per AP.  This caused
AMPDU logic in ath9k to get the wrong VIF when trying to
account for transmitted SKBs.

This patch changes ieee80211_find_sta_by_hw to take a
localaddr argument to distinguish between VIFs with the
same AP but different local addresses.  The method name
is changed to ieee80211_find_sta_by_ifaddr.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Support multiple VIFS per AP in debugfs.
Ben Greear [Thu, 23 Sep 2010 03:29:01 +0000 (20:29 -0700)]
mac80211: Support multiple VIFS per AP in debugfs.

Create 'stations' sub-directory under each netdev:[vif-name]
directory to hold all stations for that network device.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: simplify revision checks for AR9287
Felix Fietkau [Wed, 22 Sep 2010 10:34:54 +0000 (12:34 +0200)]
ath9k_hw: simplify revision checks for AR9287

Since AR9287 v1.0 was never sold (and the initvals removed), its revision
checks can be simplified similar to AR9280

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: simplify revision checks for AR9285
Felix Fietkau [Wed, 22 Sep 2010 10:34:53 +0000 (12:34 +0200)]
ath9k_hw: simplify revision checks for AR9285

Since AR9285 v1.0 and v1.1 were never sold (and the initvals removed),
its revision checks can be simplified similar to AR9280

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: simplify revision checks for AR9280
Felix Fietkau [Wed, 22 Sep 2010 10:34:52 +0000 (12:34 +0200)]
ath9k_hw: simplify revision checks for AR9280

Since AR9280 v1.0 was never sold (and the initvals removed), v1.0 specific
revision checks can be removed and the 'v2.0 or later' check can be
simplified to a check for AR9280 or later.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix overflow in wl1271_boot_upload_nvs
Ido Yariv [Wed, 22 Sep 2010 07:53:13 +0000 (09:53 +0200)]
wl1271: Fix overflow in wl1271_boot_upload_nvs

Due to miscalculation of nvs_len, excessive data was sent to the
firmware.
Fix this by first setting nvs_ptr to point to the first NVS table,
and computing the total size of all NVS tables accordingly.

Signed-off-by: Ido Yariv <ido@wizery.com>
Tested-By: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Add bssid mask and rxfilter to debugfs.
Ben Greear [Wed, 22 Sep 2010 00:03:57 +0000 (17:03 -0700)]
ath5k: Add bssid mask and rxfilter to debugfs.

Helps with debugging virtual interfaces.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Fix beacon distribution in IBSS mode
Rajkumar Manoharan [Tue, 21 Sep 2010 07:28:09 +0000 (12:58 +0530)]
ath9k_htc: Fix beacon distribution in IBSS mode

This patch ensures fair beacon distribution in IBSS mode
by configuring proper CWmin based on slot time.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix tx struck state with paprd
Vasanthakumar Thiagarajan [Tue, 21 Sep 2010 05:54:46 +0000 (22:54 -0700)]
ath9k: Fix tx struck state with paprd

Paprd needs to be done only on active chains(not for all the chains
that hw can support). The paprd training frames which are sent
for inactive chains would be hanging on the hw queue without
getting transmitted and would make the connection so unstable.
This issue happens only with the hw which supports paprd cal(ar9003).

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: clear txflags for ps-filtered frames
Christian Lamparter [Tue, 21 Sep 2010 19:36:18 +0000 (21:36 +0200)]
mac80211: clear txflags for ps-filtered frames

This patch fixes stale mac80211_tx_control_flags for
filtered / retried frames.

Because ieee80211_handle_filtered_frame feeds skbs back
into the tx path, they have to be stripped of some tx
flags so they won't confuse the stack, driver or device.

Cc: <stable@kernel.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoairo: remove "basic_rate" module option
Dan Carpenter [Sat, 11 Sep 2010 23:48:33 +0000 (01:48 +0200)]
airo: remove "basic_rate" module option

The "basic_rate" module option is not implemented correctly.  If the
rate was set to zero it was supposed to set it to "basic_rate | 0x80".
Unfortunately the check to see if what zero was wrong and it checked
"!ai->config.rates" (which is always false) instead of
"!ai->config.rates[i]".

This option was just used for development and it wasn't documented
anywhere.  Instead of fixing it, we can just remove it.

Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Add DS Parameter Set into Probe Request on 2.4 GHz
Jouni Malinen [Sat, 28 Aug 2010 16:37:51 +0000 (19:37 +0300)]
mac80211: Add DS Parameter Set into Probe Request on 2.4 GHz

IEEE Std 802.11k-2008 added DS Parameter Set information element into
Probe Request frames as an optional information on 2.4 GHz band (and
mandatory, if radio measurements are enabled). This allows APs to
filter out Probe Request frames that may be received from neighboring
overlapping channels and by doing so, reduce the number of unnecessary
frames in the air. Make mac80211 add this IE into Probe Request frames
whenever the channel is known (i.e., whenever hwscan is not used).

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Filter ProbeReq SuppRates based on TX rate mask
Jouni Malinen [Sat, 28 Aug 2010 16:36:10 +0000 (19:36 +0300)]
mac80211: Filter ProbeReq SuppRates based on TX rate mask

If the TX rate set has been masked, the removed rates can also be
removed from the Supported Rates and Extended Supported Rates IEs in
Probe Request frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 24 Sep 2010 19:52:34 +0000 (15:52 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/ath/ath5k/base.c
net/mac80211/main.c

14 years agomac80211: fix use-after-free
Johannes Berg [Fri, 24 Sep 2010 09:20:47 +0000 (11:20 +0200)]
mac80211: fix use-after-free

commit 8c0c709eea5cbab97fb464cd68b06f24acc58ee1
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Wed Nov 25 17:46:15 2009 +0100

    mac80211: move cmntr flag out of rx flags

moved the CMTR flag into the skb's status, and
in doing so introduced a use-after-free -- when
the skb has been handed to cooked monitors the
status setting will touch now invalid memory.

Additionally, moving it there has effectively
discarded the optimisation -- since the bit is
only ever set on freed SKBs, and those were a
copy, it could never be checked.

For the current release, fixing this properly
is a bit too involved, so let's just remove the
problematic code and leave userspace with one
copy of each frame for each virtual interface.

Cc: stable@kernel.org [2.6.33+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: make the driver specific rate control module optional
Felix Fietkau [Mon, 20 Sep 2010 11:45:40 +0000 (13:45 +0200)]
ath9k: make the driver specific rate control module optional

ath9k can use minstrel_ht instead, so it makes sense to save some space here.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move ath_tx_aggr_check() to the rate control module
Felix Fietkau [Mon, 20 Sep 2010 11:45:39 +0000 (13:45 +0200)]
ath9k: move ath_tx_aggr_check() to the rate control module

It is not used anywhere else and can be made static

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: clean up / fix aggregation session flush
Felix Fietkau [Mon, 20 Sep 2010 11:45:38 +0000 (13:45 +0200)]
ath9k: clean up / fix aggregation session flush

The tid aggregation cleanup is a bit fragile, as it discards failed
subframes in some places, and retransmits them in others. This could
block the cleanup of an existing aggregation session, if a retransmission
for a tid is issued, yet the tid is never scheduled again because of
the cleanup state.

Fix this by getting rid of as many subframes as possible, as early
as possible, and immediately transmitting pending subframes as regular
HT frames instead of waiting for the cleanup to complete.

Drop all pending subframes while keeping track of the Block ACK window
during aggregate tx completion to prevent sending out stale subframes,
which could confuse the receiver side.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix an aggregation start related race condition
Felix Fietkau [Mon, 20 Sep 2010 17:35:28 +0000 (19:35 +0200)]
ath9k: fix an aggregation start related race condition

A new aggregation session start can be issued by mac80211, even when the
cleanup of the previous session has not completed yet. Since the data structure
for the session is not recreated, this could corrupt the block ack window
and lock up the aggregation session. Fix this by delaying the new session
until the old one has been cleaned up.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: clean up block ack window handling
Felix Fietkau [Mon, 20 Sep 2010 11:45:36 +0000 (13:45 +0200)]
ath9k: clean up block ack window handling

There's no reason to keep pointers to pending tx buffers around, if they're
only used to keep track of which frames are still pending. Use a bitfield
instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: bugfix: use bitwise-AND instead of logical-AND
Eliad Peller [Sun, 19 Sep 2010 16:55:09 +0000 (18:55 +0200)]
wl1271: bugfix: use bitwise-AND instead of logical-AND

typo - while looking for specific bits we should do a bitwise-AND instead of logical-AND.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: avoid redundant memcpy of rx_status
Eliad Peller [Sun, 19 Sep 2010 16:55:08 +0000 (18:55 +0200)]
wl1271: avoid redundant memcpy of rx_status

copy the rx_status directly to skb->cb (control buffer) instead of copying
it to a local struct and then copying it again (for each rx packet)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: fix hang in AP mode when HT STA does PSM
Christian Lamparter [Fri, 17 Sep 2010 22:15:13 +0000 (00:15 +0200)]
carl9170: fix hang in AP mode when HT STA does PSM

This is a obvious bug, skb_queue_walk does not
work if the iterator gets removed from the queue.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: reinit phy after HT settings have changed
Christian Lamparter [Fri, 17 Sep 2010 21:09:19 +0000 (23:09 +0200)]
carl9170: reinit phy after HT settings have changed

The driver has a set of different initvals for 20 MHz
vs dynamic HT2040 operation. Because we can't change
some of the registers "in-flight", the driver needs to
perform a warm reset.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: fix state downgrade during reset
Christian Lamparter [Fri, 17 Sep 2010 20:58:40 +0000 (22:58 +0200)]
carl9170: fix state downgrade during reset

Don't mark the device as completely dead just yet.
If all goes to plan and carl9170_reboot succeeds
then we can skip the expensive userspace-driven
reinitialization anyway.

And if it doesn't and carl9170_reboot fails,
then carl9170_usb_cancel_urbs will do the
necessary steps.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: abort tasklet during usb reset
Christian Lamparter [Fri, 17 Sep 2010 20:47:28 +0000 (22:47 +0200)]
carl9170: abort tasklet during usb reset

This patch prevents the tasklet code from
interfering while the firmware is down for
an unscheduled maintenance.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: don't load bogus nf of chain 1
Christian Lamparter [Fri, 17 Sep 2010 20:42:37 +0000 (22:42 +0200)]
carl9170: don't load bogus nf of chain 1

According to Atheros, chain 1 is not connected.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: fix noise dBm conversion
Christian Lamparter [Fri, 17 Sep 2010 20:22:50 +0000 (22:22 +0200)]
carl9170: fix noise dBm conversion

Ever since carl9170 gained support to read the noisefloor,
the reported noisefloor level was pretty poor.

Initially I assumed that something was wrong in the PHY
setup and it would be impossible to fix without any
guidances. But this was not the case. In fact the nf
readings were correct and the thing that was broken
was the "simple" sign extension code!

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: use rx chainmask from eeprom
Christian Lamparter [Fri, 17 Sep 2010 20:07:59 +0000 (22:07 +0200)]
carl9170: use rx chainmask from eeprom

The eeprom provides a mask for all present rx chains.
Why not use it instead of the generic initval default?

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Add tx queue configuration function
Bruno Randolf [Fri, 17 Sep 2010 02:37:18 +0000 (11:37 +0900)]
ath5k: Add tx queue configuration function

Add the mac80211 callback function to configure the tx queue properties like
cw_min, cw_max and aifs.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Simplify cw_min/max and AIFS configuration
Bruno Randolf [Fri, 17 Sep 2010 02:37:12 +0000 (11:37 +0900)]
ath5k: Simplify cw_min/max and AIFS configuration

Get rid of overly complicated cw_min/max and AIFS configuration:

* Validate values in ath5k_hw_set_tx_queueprops(), so we can use them directly
  without further checks or computation in ath5k_hw_reset_tx_queue().

* Simplifiy by using AR5K_TUNE_AIFS|CWMIN|CWMAX variables directly since we
  don't support XR or B channels. That way we can also remove
  AR5K_TXQ_USEDEFAULT and the confusing logic around it.

* Update data types: AIFS is u8, CW's are u16.

* Remove now unneeded variables in ath5k_hw.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Keep last descriptor in queue
Bruno Randolf [Fri, 17 Sep 2010 02:37:07 +0000 (11:37 +0900)]
ath5k: Keep last descriptor in queue

If we return a TX descriptor to the pool of available descriptors, while a
queues TXDP still points to it we could potentially run into all sorts of
troube.

It has been suggested that there is hardware which can set the descriptors
done bit before it reads ds_link and moves on to the next descriptor. While the
documentation says this is not true for newer chipsets (the descriptor contents
are copied to some internal memory), we don't know about older hardware.

To be safe, we always keep the last descriptor in the queue, and avoid dangling
TXDP pointers. Unfortunately this does not fully resolve the problem - queues
still get stuck!

This is similar to what ath9k does.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Count how many times a queue got stuck
Bruno Randolf [Fri, 17 Sep 2010 02:37:02 +0000 (11:37 +0900)]
ath5k: Count how many times a queue got stuck

Add a counter to show how many times a queue got stuck in the debugfs queue
file.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Add watchdog for stuck TX queues
Bruno Randolf [Fri, 17 Sep 2010 02:36:56 +0000 (11:36 +0900)]
ath5k: Add watchdog for stuck TX queues

Since we do not know any better solution to the problem that TX queues can get
stuck, this adds a timer-based watchdog, which will check for stuck queues and
reset the hardware if necessary.

Ported from ath9k commit 164ace38536849966ffa377b1b1132993a5a375d.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Move tx frame completion into separate function
Bruno Randolf [Fri, 17 Sep 2010 02:36:51 +0000 (11:36 +0900)]
ath5k: Move tx frame completion into separate function

Clearer separation between queue handling and what we do with completed frames.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Fix TX queues stopping
Bruno Randolf [Fri, 17 Sep 2010 02:36:46 +0000 (11:36 +0900)]
ath5k: Fix TX queues stopping

It does not make sense to stop queues for NF calibration. This will not stop
transmissions from the card, if there are queued packets.

If we run out of TX buffers we need to stop all queues, not only one.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Fix queue debug file
Bruno Randolf [Fri, 17 Sep 2010 02:36:40 +0000 (11:36 +0900)]
ath5k: Fix queue debug file

Take txq lock in debug file and fix reporting of used buffers.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Use four hardware queues
Bruno Randolf [Fri, 17 Sep 2010 02:36:35 +0000 (11:36 +0900)]
ath5k: Use four hardware queues

Prepare ath5k for WME by using four hardware queues.

The way we set up our queues matches the mac80211 queue priority 1:1, so we
don't have to do any mapping for queue numbers.

Every queue uses 50 of the total 200 available transmit buffers, so the DMA
memory usage does not increase with this patch, but it might be good to
fine-tune the number of buffers per queue later (depending on the CPU speed and
load, and the speed of the medium access, it might not be big enough).

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: reorder base.c to remove fwd decls
Bob Copeland [Fri, 17 Sep 2010 03:45:07 +0000 (12:45 +0900)]
ath5k: reorder base.c to remove fwd decls

This change reorganizes the main ath5k file in order to re-group
related functions and remove most of the forward declarations
(from 61 down to 3).  This is, unfortunately, a lot of churn, but
there should be no functional changes.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath/ath5k/ath9k: Fix crypto capabilities merge issue
Bruno Randolf [Fri, 17 Sep 2010 02:36:25 +0000 (11:36 +0900)]
ath/ath5k/ath9k: Fix crypto capabilities merge issue

Fixing up a merge issue / concurrent development:

Remove unneeded ath_crypt_caps flags, as per "ath9k_hw: remove useless hw
capability flags" (364734fafbba0c3133e482db78149b9a823ae7a5), but set the
AESCCM flag for ath9k. common ath code still needs a flag for this because
there is ath5k hardware which can't do AES in hardware.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: update AR9170 phy initvals
Christian Lamparter [Thu, 16 Sep 2010 20:55:20 +0000 (22:55 +0200)]
carl9170: update AR9170 phy initvals

This patch is loosely based on an ath9k patch called:
"ath9k_hw: sync initvals for ar9001 and ar9002 with Atheros"

It includes the following changes/fixes:
- AGC setting improvements
- timing changes for improved performance

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoomap: zoom: add mmc3/wl1271 device support
Ohad Ben-Cohen [Wed, 15 Sep 2010 23:32:30 +0000 (01:32 +0200)]
omap: zoom: add mmc3/wl1271 device support

Add MMC3 support on ZOOM, which has the wl1271 device hardwired to.

The wl1271 is a 4-wire, 1.8V, embedded SDIO WLAN device with an
external IRQ line, and power-controlled by a GPIO-based fixed regulator.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoomap: zoom: add fixed regulator device for wlan
Ohad Ben-Cohen [Wed, 15 Sep 2010 23:32:09 +0000 (01:32 +0200)]
omap: zoom: add fixed regulator device for wlan

Add a fixed regulator vmmc device to enable power control
of the wl1271 wlan device.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: make ref_clock configurable by board
Ohad Ben-Cohen [Wed, 15 Sep 2010 23:31:51 +0000 (01:31 +0200)]
wl1271: make ref_clock configurable by board

The wl1271 device is using a reference clock that may change
between board to board.

Make the ref_clock parameter configurable by board settings
instead of having a hard coded value in the sources.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: take irq info from private board data
Ohad Ben-Cohen [Wed, 15 Sep 2010 23:31:35 +0000 (01:31 +0200)]
wl1271: take irq info from private board data

Remove the hard coded irq information, and instead take
the irq information from the board's platform data.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl12xx: add platform data passing support
Ohad Ben-Cohen [Wed, 15 Sep 2010 23:31:12 +0000 (01:31 +0200)]
wl12xx: add platform data passing support

Add a simple mechanism to pass platform data to the
SDIO instances of wl12xx.

This way there is no confusion over who owns the 'embedded data',
typechecking is preserved, and no possibility for the wrong driver to
pick up the data.

Originally proposed by Russell King.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: propagate set_power's return value
Ohad Ben-Cohen [Wed, 15 Sep 2010 23:22:04 +0000 (01:22 +0200)]
wl1271: propagate set_power's return value

Make it possible for the set power method to indicate a
success/failure return value. This is needed to support
more complex power on/off operations such as SDIO
power manipulations.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl12xx: make wl12xx.h common to both spi and sdio
Ohad Ben-Cohen [Thu, 16 Sep 2010 11:16:02 +0000 (13:16 +0200)]
wl12xx: make wl12xx.h common to both spi and sdio

Move wl12xx.h outside of the spi-specific location,
so it can be shared with both spi and sdio solutions.

Update all users of spi/wl12xx.h accordingly

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowext: fix potential private ioctl memory content leak
Johannes Berg [Thu, 16 Sep 2010 22:38:25 +0000 (00:38 +0200)]
wext: fix potential private ioctl memory content leak

When a driver doesn't fill the entire buffer, old
heap contents may remain, and if it also doesn't
update the length properly, this old heap content
will be copied back to userspace.

It is very unlikely that this happens in any of
the drivers using private ioctls since it would
show up as junk being reported by iwpriv, but it
seems better to be safe here, so use kzalloc.

Reported-by: Jeff Mahoney <jeffm@suse.com>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: initialize both tx/rx prio boost parameters
Wey-Yi Guy [Mon, 13 Sep 2010 15:08:18 +0000 (08:08 -0700)]
iwlagn: initialize both tx/rx prio boost parameters

For config bt command, initialize both tx_prio_boost and
rx_prio_boost to "0".

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: minor coex API changes
Wey-Yi Guy [Mon, 13 Sep 2010 14:51:03 +0000 (07:51 -0700)]
iwlagn: minor coex API changes

Adding two new parameters in config bt API. these two parameters
use the 3 reserved bytes, so there is no structure size changes.

Make sure set both parameters to "zero" in order to preserve
previous behavior.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: correct naming for failure reply tx status
Wey-Yi Guy [Tue, 7 Sep 2010 19:42:20 +0000 (12:42 -0700)]
iwlagn: correct naming for failure reply tx status

For failure tx status 0x90 and 0x91, give the correct name to reflect
the errors.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: corrections to debug output of ucode statistics
Jay Sternberg [Wed, 8 Sep 2010 16:42:35 +0000 (09:42 -0700)]
iwlwifi: corrections to debug output of ucode statistics

remove duplicate header and clean up format so it is defined once
making changes consolicated ensuring consistancy of output.
no function change to date displayed.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: adding aggregated frame failure status to debugfs
Wey-Yi Guy [Sun, 5 Sep 2010 17:49:45 +0000 (10:49 -0700)]
iwlagn: adding aggregated frame failure status to debugfs

Addition to standard tx frame failure report, adding aggregated
frame failure report to debugfs

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: keep track of aggregated tx frames failure counter
Wey-Yi Guy [Sun, 5 Sep 2010 17:49:44 +0000 (10:49 -0700)]
iwlagn: keep track of aggregated tx frames failure counter

When uCode completed the aggregated frames transmission attempt,
it will send tx command response with aggregated frame status.

Keep track of the failure counter which help indicate any transmission
error condition.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: log aggregation tx command status
Wey-Yi Guy [Sun, 5 Sep 2010 17:49:43 +0000 (10:49 -0700)]
iwlagn: log aggregation tx command status

For aggregated frames with block ack, different status flag
will be used as part of tx command response.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: keep track of failure tx status
Wey-Yi Guy [Sun, 5 Sep 2010 17:49:42 +0000 (10:49 -0700)]
iwlagn: keep track of failure tx status

Tx command response sent to host by uCode after completed
the transmission attempt. The status parameter indicates
whether the transmission was successful, or else why if failed.

Here we keep the counters to help understand the different failure
cases.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: keep track fail tx reason counter
Wey-Yi Guy [Sun, 5 Sep 2010 17:49:41 +0000 (10:49 -0700)]
iwlagn: keep track fail tx reason counter

If uCode fail to transmit frame, it will send reply tx back
to driver with failure status; keep the counters of each failure
cases for debugging.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: add bt_status_read for 5150
Wey-Yi Guy [Sun, 5 Sep 2010 17:49:38 +0000 (10:49 -0700)]
iwlagn: add bt_status_read for 5150

Include bt_status_read function pointer for 5150 device

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: do not perferm force reset while doing scan
Wey-Yi Guy [Wed, 8 Sep 2010 15:30:20 +0000 (08:30 -0700)]
iwlwifi: do not perferm force reset while doing scan

When uCode error condition detected, driver try to perform either
rf reset or firmware reload in order bring device back to
working condition.

If rf reset is required and scan is in process, there is no need
to issue rf reset since scan already reset the rf.

If firmware reload is required and scan is in process, skip the
reload request. There is a possibility firmware reload during
scan cause problem.

[  485.804046] WARNING: at net/mac80211/main.c:310 ieee80211_restart_hw+0x28/0x62()
[  485.804049] Hardware name: Latitude E6400
[  485.804052] ieee80211_restart_hw called with hardware scan in progress
[  485.804054] Modules linked in: iwlagn iwlcore bnep sco rfcomm l2cap crc16 bluetooth [last unloaded: iwlcore]
[  485.804069] Pid: 812, comm: kworker/u:3 Tainted: G        W   2.6.36-rc3-wl+ #74
[  485.804072] Call Trace:
[  485.804079]  [<c103019a>] warn_slowpath_common+0x60/0x75
[  485.804084]  [<c1030213>] warn_slowpath_fmt+0x26/0x2a
[  485.804089]  [<c145da67>] ieee80211_restart_hw+0x28/0x62
[  485.804102]  [<f8b35dc6>] iwl_bg_restart+0x113/0x150 [iwlagn]
[  485.804108]  [<c10415d5>] process_one_work+0x181/0x25c
[  485.804119]  [<f8b35cb3>] ? iwl_bg_restart+0x0/0x150 [iwlagn]
[  485.804124]  [<c104190a>] worker_thread+0xf9/0x1f2
[  485.804128]  [<c1041811>] ? worker_thread+0x0/0x1f2
[  485.804133]  [<c10451b0>] kthread+0x64/0x69
[  485.804137]  [<c104514c>] ? kthread+0x0/0x69
[  485.804141]  [<c1002df6>] kernel_thread_helper+0x6/0x10
[  485.804145] ---[ end trace 3d4ebdc02d524bbb ]---
[  485.804148] WG> 1
[  485.804153] Pid: 812, comm: kworker/u:3 Tainted: G        W   2.6.36-rc3-wl+ #74
[  485.804156] Call Trace:
[  485.804161]  [<c145da9b>] ? ieee80211_restart_hw+0x5c/0x62
[  485.804172]  [<f8b35dcb>] iwl_bg_restart+0x118/0x150 [iwlagn]
[  485.804177]  [<c10415d5>] process_one_work+0x181/0x25c
[  485.804188]  [<f8b35cb3>] ? iwl_bg_restart+0x0/0x150 [iwlagn]
[  485.804192]  [<c104190a>] worker_thread+0xf9/0x1f2
[  485.804197]  [<c1041811>] ? worker_thread+0x0/0x1f2
[  485.804201]  [<c10451b0>] kthread+0x64/0x69
[  485.804205]  [<c104514c>] ? kthread+0x0/0x69
[  485.804209]  [<c1002df6>] kernel_thread_helper+0x6/0x10

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoath9k: fix regression which disabled ps on ath9k
Luis R. Rodriguez [Thu, 16 Sep 2010 19:12:36 +0000 (15:12 -0400)]
ath9k: fix regression which disabled ps on ath9k

The patch titled "ath9k: Add new file init.c" shuffled some code
around but in dong so for some reason also removed the revision
check for disablign power save. Add this revision check again
so we can get power save re-enabled again by default on cards
newer than AR5416 and AR5418.

$ git describe --contains 556242049cc3992d0ee625e9f15c4b00ea4baac8
v2.6.34-rc1~233^2~49^2~343

This patch has fixes for stable kernels [2.6.34+].

Cc: stable@kernel.org
Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>