platform/kernel/linux-arm64.git
10 years agomwifiex: add support for sleep cookie in PCIe
Avinash Patil [Wed, 19 Mar 2014 05:19:17 +0000 (22:19 -0700)]
mwifiex: add support for sleep cookie in PCIe

This patch adds support to read sleep cookie for command
response before accessing buffer.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: handle extended scan event for AP interface
Avinash Patil [Wed, 19 Mar 2014 05:19:16 +0000 (22:19 -0700)]
mwifiex: handle extended scan event for AP interface

Stations associated to mwifiex AP would not be able to ping AP
after scan was issued on AP interface. This happened because
there was no handling of extended scan event in AP. This patch
adds this handling and fixes ping failure issue.

Signed-off-by: Avinash Patil <patila@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>
10 years agorsi: Add pr_fmt,__printf, fix format & arg mismatch
Joe Perches [Wed, 19 Mar 2014 00:59:47 +0000 (17:59 -0700)]
rsi: Add pr_fmt,__printf, fix format & arg mismatch

Emit a prefix for the rsi_dbg messages.

Fix the format and argument mismatch and add
__printf(2, 3) to try to avoid more.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortl818x: remove unused conf_erp callback from RF ops struct
Andrea Merello [Mon, 17 Mar 2014 18:52:42 +0000 (19:52 +0100)]
rtl818x: remove unused conf_erp callback from RF ops struct

The ERP configuration is now done outside RF code in both rtl8180
and rtl8187 drivers.

The conf_erp callback in common RF ops struct is now useless.
Remove it.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Wed, 19 Mar 2014 19:14:07 +0000 (15:14 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoiwlwifi: mvm: add missing include
Emmanuel Grumbach [Wed, 19 Mar 2014 06:25:05 +0000 (08:25 +0200)]
iwlwifi: mvm: add missing include

This fixes the build for powerpc:

After merging the final tree, today's linux-next build (powerpc allyesconfig)
failed like this:

drivers/net/wireless/iwlwifi/mvm/debugfs.c: In function 'iwl_dbgfs_fw_error_dump_release':
drivers/net/wireless/iwlwifi/mvm/debugfs.c:161:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
  vfree(file->private_data);
  ^

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Tue, 18 Mar 2014 20:55:28 +0000 (16:55 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

10 years agorsi: make rsi_dbg a regular function
John W. Linville [Tue, 18 Mar 2014 20:35:45 +0000 (16:35 -0400)]
rsi: make rsi_dbg a regular function

This is to address reports of this:

In file included from drivers/net/wireless/rsi/rsi_mgmt.h:22:0,
                 from drivers/net/wireless/rsi/rsi_91x_core.c:17:
drivers/net/wireless/rsi/rsi_91x_core.c: In function 'rsi_dbg':
drivers/net/wireless/rsi/rsi_main.h:44:20: error: function 'rsi_dbg' can never be inlined because it uses variable argument lists
 static inline void rsi_dbg(u32 zone, const char *fmt, ...)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlwifi: mvm: disable uAPSD due to bugs in the firmware
Emmanuel Grumbach [Tue, 18 Mar 2014 14:32:45 +0000 (16:32 +0200)]
iwlwifi: mvm: disable uAPSD due to bugs in the firmware

The current firmware advertises support for uAPSD, but
critical bugs force us to disable the feature.
When a fixed firmware will be available, we will be able to
re-enable uAPSD.

Cc: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: ignore unchanged low-latency flag
Johannes Berg [Tue, 18 Mar 2014 09:21:02 +0000 (10:21 +0100)]
iwlwifi: mvm: ignore unchanged low-latency flag

If the low-latency update is called but there's no change then
ignore the update instead of triggering all the required work.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: remove spurious blank line
Johannes Berg [Tue, 18 Mar 2014 13:13:06 +0000 (14:13 +0100)]
iwlwifi: mvm: remove spurious blank line

Remove a spurious blank line in the quota code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: fix theoretical NULL ptr dereference
Emmanuel Grumbach [Tue, 18 Mar 2014 12:53:18 +0000 (14:53 +0200)]
iwlwifi: mvm: fix theoretical NULL ptr dereference

mvmsta could have been NULL / ERR.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: configure low latency dependent scan parameters
Alexander Bondar [Wed, 12 Mar 2014 18:30:51 +0000 (20:30 +0200)]
iwlwifi: mvm: configure low latency dependent scan parameters

In case of system low latency configure passive scan to be fragmented.
Set the following scan parameters for both immediate and scheduled scan:
 - passive scan fragment duration = 20ms
 - out-of-channel time = 70ms
 - suspend time = 105ms
Restructure channel's active/passive dwell time configuration to better
suit the above change.

The idea is that under low latency traffic passive scan is fragmented,
i.e. that dwell on a particular channel will be fragmented. Each
fragment dwell time is 20ms and fragments period is 105ms. Skipping to
next channel will be delayed by the same period (105ms). So suspend_time
parameter describing both fragments and channels skipping periods is set
to 105ms. This value is chosen so that overall passive scan duration
will not be too long. Max_out_time in this case is set to 70ms, so for
active scanning operating channel will be left for 70ms while for
passive still for 20ms (fragment dwell).

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: restructure scan parameters calculation
Alexander Bondar [Wed, 12 Mar 2014 15:31:19 +0000 (17:31 +0200)]
iwlwifi: mvm: restructure scan parameters calculation

Some scan parameters should be dependent on traffic conditions.
Centralize conditions verification in one function and obtain
scan max out-of-channel and suspend time in that new function.
Rely on bound interfaces indication instead of association state
to calculate scan parameters. If no bound interfaces use default
values for out-of-channel and suspend time parameters.

Additionally, get rid of NL80211_SCAN_FLAG_LOW_PRIORITY checks
since no use case for this exists so far.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
[reword commit log a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: remove using max_duration in firmware API
Johannes Berg [Mon, 17 Mar 2014 08:34:29 +0000 (09:34 +0100)]
iwlwifi: mvm: remove using max_duration in firmware API

The firmware decided to not implement this API in this way,
so for now remove setting the field completely. This will
allow the firmware to change how to use this field later.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - add debugfs hook to set BT Tx priority
Emmanuel Grumbach [Sun, 16 Mar 2014 19:55:43 +0000 (21:55 +0200)]
iwlwifi: mvm: BT Coex - add debugfs hook to set BT Tx priority

In order to debug the firmware, we need to be able to set
the BT priority of WiFi packets. This priority is set based
on the type of the packet (control frames, EAPOL etc...).
For debugging purposes, allow to override this priority by
a debugfs controlled value.
Enable this feature that needs this priority to be able to
test it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: send udev event upon firmware error to dump logs
Emmanuel Grumbach [Tue, 18 Mar 2014 19:15:06 +0000 (21:15 +0200)]
iwlwifi: mvm: send udev event upon firmware error to dump logs

When the firmware asserts, the driver will dump the firmware
state to an internal buffer. This buffer is kept aside until
it is dumped through debugfs. Once an external application
fetched the data, the buffer is freed and a new buffer can
be allocated in case another assert occurs.

A udev event is sent to trigger an external application.

A simple rule like:
DRIVER=="iwlwifi", ACTION=="change", RUN+="/sbin/dump_sram.sh"

can fetch the data from debugfs.

Here is my dump_sram.sh:

phyname=$(basename ${DEVPATH})
date=$(date +%F_%H_%M)
filename=/var/log/iwl-sram-${phyname}-${date}.bin
cat /sys/kernel/debug/ieee80211/${phyname}/iwlwifi/iwlmvm/fw_error_dump > ${filename}

The current SRAM size is 80KB so, currently:
$ ls -lh iwl-sram-phy0-2014-03-16_13_14.bin
-rw-r--r-- 1 emmanuel emmanuel 81K Mar 16 13:15 iwl-sram-phy0-2014-03-16_13_14.bin

and after compression:
$ ls -lh iwl-sram-phy0-2014-03-16_13_14.bin.xz
-rw-r--r-- 1 emmanuel emmanuel 13K Mar 16 13:15 iwl-sram-phy0-2014-03-16_13_14.bin.xz

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agorsi: Add RS9113 wireless driver
Fariya Fatima [Sat, 15 Mar 2014 22:17:02 +0000 (03:47 +0530)]
rsi: Add RS9113 wireless driver

This patch adds the Redpine Signals' 91x wireless driver.

Signed-off-by: Fariya Fatima <fariyaf@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix race between disconnect and Tx NAPI
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:25 +0000 (15:34 +0200)]
wil6210: fix race between disconnect and Tx NAPI

When disconnecting some CID, corresponded Tx vring get released. During vring
release, all descriptors get freed. It is possible that Tx NAPI working on the same
vring simultaneously. If it happens, descriptor may be double freed.

To protect from the race above, make sure NAPI won't process the same vring.
Introduce 'enabled' flag in the struct vring_tx_data. Proceed with Tx NAPI only if
'enabled' flag set. Prior to Tx vring release, clear this flag and make sure NAPI
get synchronized.

NAPI enablement status protected by wil->mutex, add protection where it was
missing and check for it.

During reset, disconnect all peers first, then proceed with the Rx vring. It allows for
the disconnect flow to observe proper 'wil->status' and correctly notify cfg80211 about
connection status change

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: add memory barriers for the reset flow
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:24 +0000 (15:34 +0200)]
wil6210: add memory barriers for the reset flow

make sure reset flow executed in order

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: target reset flow update
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:23 +0000 (15:34 +0200)]
wil6210: target reset flow update

Use 'real' indication for hardware state.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: use GRO
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:22 +0000 (15:34 +0200)]
wil6210: use GRO

GRO is easy to enable when already using NAPI framework,
and it improves CPU utilisation. Enable it by default.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: serialize fw_recovery and start_ap
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:21 +0000 (15:34 +0200)]
wil6210: serialize fw_recovery and start_ap

These methods can change device state, serialize with others
similar ones like up/down

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix secondary connect
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:20 +0000 (15:34 +0200)]
wil6210: fix secondary connect

when STA receiving connect() when already connected,
it should return error

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fw error recovery
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:19 +0000 (15:34 +0200)]
wil6210: fw error recovery

upon fw error interrupt - in STA mode, disconnect/cancel scan and
then reset FW/HW
added module param - no_fw_recovery which is false by default

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Fix kernel oops in reset flow
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:18 +0000 (15:34 +0200)]
wil6210: Fix kernel oops in reset flow

wil_reset() removes vring's
At the same time NAPI may be active performing Rx/Tx completion.
If this happens, Rx/Tx polling functions going to access already removed vrings

Make sure NAPI is idle and won't be started prior to vring removal.
For this, track NAPI enabled state

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix memory leak in the AP flow
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:17 +0000 (15:34 +0200)]
wil6210: fix memory leak in the AP flow

When switching between STA and AP modes, memory allocated for Rx vring leaks
This is because start_ap() allocates Rx vring but stop_ap() do not free it.
Logically, Rx vring is not valid (HW can't use it anymore), so free it in reset()
Also, check double init for Rx vring and bail out with -EINVAL

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: reduce printing
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:16 +0000 (15:34 +0200)]
wil6210: reduce printing

Convert 2 often printed messages to dynamic ones

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: reset on power good
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:15 +0000 (15:34 +0200)]
wil6210: reset on power good

Configure hardware to perform full reset on "power good". This mean,
reset HW on system boot. This improves card stability.
By default this is off.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: sort HW registers definitions
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:14 +0000 (15:34 +0200)]
wil6210: sort HW registers definitions

Put all registers in order for easier navigation;
fix naming to reflect hardware cluster

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix for HW bug in interrupt setup logic
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:13 +0000 (15:34 +0200)]
wil6210: fix for HW bug in interrupt setup logic

Hardware bug triggered by the MSI init while INTx asserted for some reason.
De-assert INTx prior to MSI set-up

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: report reset time
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:12 +0000 (15:34 +0200)]
wil6210: report reset time

Useful to detect hardware problems

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: reduce dmesg pollution after FW crash
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:11 +0000 (15:34 +0200)]
wil6210: reduce dmesg pollution after FW crash

When FW crashes, dmesg get polluted with the "FW not ready"
error message. Print it only once per FW lifecycle

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: update target reset to support new HW
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:10 +0000 (15:34 +0200)]
wil6210: update target reset to support new HW

Support for new chip revision. Revision read from the
internal register, PCIE config's "revision id" register
do not indicate HW version properly

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: generalize tx desc mapping
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:09 +0000 (15:34 +0200)]
wil6210: generalize tx desc mapping

Introduce enum to describe mapping type; allow 'none' in addition to
'single' and 'page'; this is preparation for GSO

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: add scatter-gather support
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:08 +0000 (15:34 +0200)]
wil6210: add scatter-gather support

When setting fragmented skb for Tx, assign skb to the last descriptor
and set number of fragments in the 1-st one
On Tx complete, HW sets "DU" bit in Tx descriptor only for the last
descriptor; so search for it using number of fragments field.
Middle descriptors may have "DU" bit not set by the hardware.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: enable scan while connected
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:07 +0000 (15:34 +0200)]
wil6210: enable scan while connected

New firmware do support scan while connected. Enable it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Block data till "data port open" reported
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:06 +0000 (15:34 +0200)]
wil6210: Block data till "data port open" reported

When connection established, as reported by WMI_CONNECT_EVENTID,
4-way handshaking required for the secure connection is not done
yet. It is indicated by another WMI event. Wait for it and only then
allow data traffic. In case of non-secure connection, FW reports
"data port open" immediately after connection.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Helpers to deal with 'cidxtid' fields
Vladimir Kondratiev [Mon, 17 Mar 2014 13:34:05 +0000 (15:34 +0200)]
wil6210: Helpers to deal with 'cidxtid' fields

Encode/decode helpers

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix temperature compensation
Sujith Manoharan [Mon, 17 Mar 2014 09:32:48 +0000 (15:02 +0530)]
ath9k: Fix temperature compensation

The registers for temperature compensation need to
be programmed only for active chains. Use the TX chainmask
to make sure that this is done properly for QCA953x.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Disable AR_INTR_SYNC_HOST1_FATAL for QCA953x
Sujith Manoharan [Mon, 17 Mar 2014 09:32:47 +0000 (15:02 +0530)]
ath9k: Disable AR_INTR_SYNC_HOST1_FATAL for QCA953x

Along with AR9340 and AR955x, this is also needed for
the QCA953x SoC.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add QCA953x WMAC platform support
Sujith Manoharan [Mon, 17 Mar 2014 09:32:46 +0000 (15:02 +0530)]
ath9k: Add QCA953x WMAC platform support

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortl8180: move eeprom read stuff in a separate function
Andrea Merello [Sat, 15 Mar 2014 17:29:38 +0000 (18:29 +0100)]
rtl8180: move eeprom read stuff in a separate function

Eeprom read operations are mixed in the probe function.
Make the code more readable and clean by extracting this code and
moving it in a dedicated function.

The variable eeprom_cck_table_adr, now useless, is here because
it will be needed for rtl8187se support, that I hope to add soon.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortl8180: make *IFS and CW tunable by mac80211, and set them in the proper place
Andrea Merello [Sat, 15 Mar 2014 17:29:37 +0000 (18:29 +0100)]
rtl8180: make *IFS and CW tunable by mac80211, and set them in the proper place

SLOT, SIFS, DIFS, EIFS, CW and ACK-timeout registers are set in an
RF-code callback and their values are fixed.

This patch moves this off the rf-code, and introduce two new functions
that calculate these values depending by slot time and CW values
requested by mac80211.

This seems to improve performances on my setup.

Currently the ack and slot time values could be stored in a local
variable, but this patch stores it in the driver "priv" structure
because it will be useful for rtl8187se support that will be added
(hopefully) soon.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortl8180: support for BSS_CHANGED_BASIC_RATES
Andrea Merello [Sat, 15 Mar 2014 17:29:36 +0000 (18:29 +0100)]
rtl8180: support for BSS_CHANGED_BASIC_RATES

Basic rates setting is done with hardcoded register write with
fixed settings.

This patch introduces a new function that makes it possible to
configure basic rates and it add a check for mac80211
BSS_CHANGED_BASIC_RATES flag in order to eventually invoke that
function when needed.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortl8180: remove too-early-added rtl8187se enum value
Andrea Merello [Sat, 15 Mar 2014 17:29:35 +0000 (18:29 +0100)]
rtl8180: remove too-early-added rtl8187se enum value

While changing board-type variable to enum, I have added enum
value for rtl8187se by mistake.
This will causes gcc warnings with unhandled switch/cases.

Remove it temporarily until I will push also rtl8187se changes.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: remove mode field from brcmf_cfg80211_vif structure
Arend van Spriel [Sat, 15 Mar 2014 16:18:21 +0000 (17:18 +0100)]
brcmfmac: remove mode field from brcmf_cfg80211_vif structure

The nl80211 iftype was converted to a mode value and stored in
brcmf_cfg80211_vif structure. The value was used only within
brcmfmac driver to decide execution of conditional code. Better
use wireless_dev::iftype for that as the wdev is contained in
the brcmf_cfg80211_vif structure.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: assure active clock request upon entering SLEEP state
Arend van Spriel [Sat, 15 Mar 2014 16:18:20 +0000 (17:18 +0100)]
brcmfmac: assure active clock request upon entering SLEEP state

When the SDIO driver goes in low power state it must assure that
a clock request in ChipCLKCSR is set. Otherwise waking up the
device can fail. The register is read and if necessary the ALP
clock will be requested.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Improve scanning settings for connect.
Hante Meuleman [Sat, 15 Mar 2014 16:18:19 +0000 (17:18 +0100)]
brcmfmac: Improve scanning settings for connect.

When connecting without specifying the channel it can take quite
some time to connect. This is because not all parameters for the
scan operation are set to optimized values. This patch changes
these parameters resulting in a much faster connect in certain
situations.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Protect tx seq number for data and control
Hante Meuleman [Sat, 15 Mar 2014 16:18:18 +0000 (17:18 +0100)]
brcmfmac: Protect tx seq number for data and control

SDIO tx uses a sequence number which is common for data
and control. This requires that access to this sequence number
is protected. A mutex was used to achieve this, but it also
required the reordering of code for tx control.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: add BCM4354 SDIO interface support
Franky Lin [Sat, 15 Mar 2014 16:18:17 +0000 (17:18 +0100)]
brcmfmac: add BCM4354 SDIO interface support

BCM4354 is an a/b/g/n/ac 2x2 WiFi chip. This patch adds support for it through
SDIO interface.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge tag 'nfc-next-3.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Mon, 17 Mar 2014 17:16:50 +0000 (13:16 -0400)]
Merge tag 'nfc-next-3.15-1' of git://git./linux/kernel/git/sameo/nfc-next

Samuel Ortiz <sameo@linux.intel.com> says:

"NFC: 3.15: First pull request

This is the NFC pull request for 3.15. With this one we have:

- Support for ISO 15693 a.k.a. NFC vicinity a.k.a. Type 5 tags. ISO
  15693 are long range (1 - 2 meters) vicinity tags/cards. The kernel
  now supports those through the NFC netlink and digital APIs.

- Support for TI's trf7970a chipset. This chipset relies on the NFC
  digital layer and the driver currently supports type 2, 4A and 5 tags.

- Support for NXP's pn544 secure firmare download. The pn544 C3 chipsets
  relies on a different firmware download protocal than the C2 one. We
  now support both and use the right one depending on the version we
  detect at runtime.

- Support for 4A tags from the NFC digital layer.

- A bunch of cleanups and minor fixes from Axel Lin and Thierry Escande."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: move DEFAULT_SWBA_RESPONSE check to ath9k_htc_beacon_init
Oleksij Rempel [Sat, 1 Mar 2014 20:16:06 +0000 (21:16 +0100)]
ath9k_htc: move DEFAULT_SWBA_RESPONSE check to ath9k_htc_beacon_init

... to remove some more dups.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_beacon_config_ap
Oleksij Rempel [Sat, 1 Mar 2014 20:16:05 +0000 (21:16 +0100)]
ath9k_htc: use ath9k_cmn_beacon_config_ap

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: remove unused ath9k_get_next_tbtt
Oleksij Rempel [Sat, 1 Mar 2014 20:16:04 +0000 (21:16 +0100)]
ath9k: remove unused ath9k_get_next_tbtt

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move ath9k_beacon_config_ap common
Oleksij Rempel [Sat, 1 Mar 2014 20:16:03 +0000 (21:16 +0100)]
ath9k: move ath9k_beacon_config_ap common

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_beacon_config_adhoc
Oleksij Rempel [Sat, 1 Mar 2014 20:16:02 +0000 (21:16 +0100)]
ath9k_htc: use ath9k_cmn_beacon_config_adhoc

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_adhoc
Oleksij Rempel [Sat, 1 Mar 2014 20:16:01 +0000 (21:16 +0100)]
ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_adhoc

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_ap
Oleksij Rempel [Sat, 1 Mar 2014 20:16:00 +0000 (21:16 +0100)]
ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_ap

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: add ath9k_htc_beacon_init (but not use it)
Oleksij Rempel [Sat, 1 Mar 2014 20:15:59 +0000 (21:15 +0100)]
ath9k_htc: add ath9k_htc_beacon_init (but not use it)

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move ath9k_beacon_config_adhoc to common
Oleksij Rempel [Sat, 1 Mar 2014 20:15:58 +0000 (21:15 +0100)]
ath9k: move ath9k_beacon_config_adhoc to common

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_beacon_config_sta
Oleksij Rempel [Sat, 1 Mar 2014 20:15:57 +0000 (21:15 +0100)]
ath9k_htc: use ath9k_cmn_beacon_config_sta

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move ath9k_beacon_config_sta to common-beacon
Oleksij Rempel [Sat, 1 Mar 2014 20:15:56 +0000 (21:15 +0100)]
ath9k: move ath9k_beacon_config_sta to common-beacon

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k-common: add nexttbtt and intval to ath_beacon_config
Oleksij Rempel [Sat, 1 Mar 2014 20:15:55 +0000 (21:15 +0100)]
ath9k-common: add nexttbtt and intval to ath_beacon_config

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k|ath9k_htc: move IEEE80211_MS_TO_TU to common
Oleksij Rempel [Sat, 1 Mar 2014 20:15:54 +0000 (21:15 +0100)]
ath9k|ath9k_htc: move IEEE80211_MS_TO_TU to common

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: remove unused beacon_qi
Oleksij Rempel [Sat, 1 Mar 2014 20:15:53 +0000 (21:15 +0100)]
ath9k: remove unused beacon_qi

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: sync beacon slot code with ath9k
Oleksij Rempel [Sat, 1 Mar 2014 20:15:52 +0000 (21:15 +0100)]
ath9k_htc: sync beacon slot code with ath9k

we will need it for common-beacon

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: remove unused bc_tstamp
Oleksij Rempel [Sat, 1 Mar 2014 20:15:51 +0000 (21:15 +0100)]
ath9k: remove unused bc_tstamp

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: add ATH_OP_PRIM_STA_VIF
Oleksij Rempel [Sat, 1 Mar 2014 20:15:50 +0000 (21:15 +0100)]
ath9k_htc: add ATH_OP_PRIM_STA_VIF

we will need it to make common-beacon code work.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use common->op_flags
Oleksij Rempel [Sat, 1 Mar 2014 20:15:49 +0000 (21:15 +0100)]
ath9k_htc: use common->op_flags

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move sc_flags to ath_common
Oleksij Rempel [Thu, 27 Feb 2014 10:40:46 +0000 (11:40 +0100)]
ath9k: move sc_flags to ath_common

we will need it for ath9k_htc, may be other drivers too

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath_beacon_conf.enable_beacon
Oleksij Rempel [Sat, 1 Mar 2014 20:15:47 +0000 (21:15 +0100)]
ath9k_htc: use ath_beacon_conf.enable_beacon

to reduce difference between ath9k and ath9k_htc

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: move beaconq to struct htc_beacon
Oleksij Rempel [Sat, 1 Mar 2014 20:15:46 +0000 (21:15 +0100)]
ath9k_htc: move beaconq to struct htc_beacon

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use common ath_beacon_config
Oleksij Rempel [Sat, 1 Mar 2014 20:15:45 +0000 (21:15 +0100)]
ath9k_htc: use common ath_beacon_config

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move struct ath_beacon_config to common
Oleksij Rempel [Sat, 1 Mar 2014 20:15:44 +0000 (21:15 +0100)]
ath9k: move struct ath_beacon_config to common

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlwifi: mvm: configure protocol offloading on D0i3
Eliad Peller [Sun, 3 Nov 2013 17:48:50 +0000 (19:48 +0200)]
iwlwifi: mvm: configure protocol offloading on D0i3

Enable protocol offloading (arp and NS) on D0i3.

The offloading allows the fw answer NS and arp requests
without waking up the host.

Since protocol offloading is saved between D0i3
entries, we have to explicitly disable it in
case we don't want it.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: reconfigure qos seq on D0i3 exit
Arik Nemtsov [Thu, 13 Mar 2014 10:21:50 +0000 (12:21 +0200)]
iwlwifi: mvm: reconfigure qos seq on D0i3 exit

In order to restore the qos seq number on d0i3 exit,
we need to read it from the wowlan status.

However, in order to make sure we use correct seq num
for tx frames, we need to defer any outgoing frames,
and re-enqueue them only after the seq num is configured
correctly.

Sync new Tx aggregations with D0i3 so that the correct
seq num is used for them. Wait synchronously for D0i3
exit before starting a new Tx agg.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: configure seq_num to D0i3
Eliad Peller [Thu, 21 Nov 2013 17:19:52 +0000 (19:19 +0200)]
iwlwifi: mvm: configure seq_num to D0i3

Configure the QoS counters when entering D0i3.

The fw might use them later when performing protocol
offloading (we'll update the the counters back on
d0i3 exit in a following patch).

Non-QoS counter is handled internally in the fw, so
no need to configure it.

Also, add support for a new version of WOWLAN_CONFIG_CMD

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: Change beacon filter enablement condition
Alexander Bondar [Mon, 10 Mar 2014 20:02:26 +0000 (22:02 +0200)]
iwlwifi: mvm: Change beacon filter enablement condition

Enable beacon filter only if at least one beacon from candidate
AP is received before or after association. Check this condition before
enabling BF upon secured association completion. Add BF enablement to
mac80211 event that indicates beacon is received after association.
Too early beacon filtering enablement can lead to disconnection due to
missing AP's beacon after association.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: don't fail completely if led mode is not supported
Emmanuel Grumbach [Wed, 12 Mar 2014 07:36:41 +0000 (09:36 +0200)]
iwlwifi: mvm: don't fail completely if led mode is not supported

Blink led mode is not supported by iwlmvm. This doesn't mean
that we should prevent any operation if it is selected by
the user.
Instead of failing without any notice to the user, fallback
to the default mode (RF mode) if the blink mode
is selected and print an error to inform the user.

Reported-by: Steven Haigh <netwiz@crc.id.au>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: add rs_rate_scale_clear_tbl_windows helper function
Eliad Peller [Mon, 10 Mar 2014 14:33:43 +0000 (16:33 +0200)]
iwlwifi: add rs_rate_scale_clear_tbl_windows helper function

instead of duplicating the same loop multiple times,
use a new function for it.

this will be later used also for clearing other
windows in the table.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: rs: split rs_collect_tx_data
Eliad Peller [Mon, 10 Mar 2014 14:07:04 +0000 (16:07 +0200)]
iwlwifi: rs: split rs_collect_tx_data

Make _rs_collect_tx_data get window as param, in order
to be able to set various windows.

This will be used later for saving tpc statistics
as well.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: don't enable protection for all AMPDUs
Eyal Shapira [Thu, 13 Mar 2014 11:53:00 +0000 (13:53 +0200)]
iwlwifi: mvm: don't enable protection for all AMPDUs

Currently RTS protection was done whenever trasnmitting an AMPDU.
This limits throughput in cases where there's no need for protection.
Disable this too inclusive protection for now.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: fix search cycle rules
Eyal Shapira [Sun, 16 Mar 2014 03:23:21 +0000 (05:23 +0200)]
iwlwifi: mvm: rs: fix search cycle rules

We should explore all possible columns when searching to be
as resilient as possible to changing conditions. This fixes
for example a scenario where even after a sudden creation of
rssi difference between the 2 antennas we would keep doing MIMO
at a low rate instead of switching to SISO at a higher rate using
the better antenna which was the optimal configuration.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: fix merge damage
Emmanuel Grumbach [Sun, 16 Mar 2014 06:51:47 +0000 (08:51 +0200)]
iwlwifi: mvm: fix merge damage

Scheduled scan was disabled because it was broken. Now it is
fixed and got disabled by mistake by a merge.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoNFC: llcp: Use list_for_each_entry in nfc_llcp_find_local()
Axel Lin [Wed, 26 Feb 2014 02:26:45 +0000 (10:26 +0800)]
NFC: llcp: Use list_for_each_entry in nfc_llcp_find_local()

nfc_llcp_find_local() does not modify any list entry while iterating the list.
So use list_for_each_entry instead of list_for_each_entry_safe.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: Move checking valid gb_len value to nfc_llcp_set_remote_gb
Axel Lin [Tue, 25 Feb 2014 01:18:10 +0000 (09:18 +0800)]
NFC: Move checking valid gb_len value to nfc_llcp_set_remote_gb

This checking is common for all caller, so move the checking to one place.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: Remove redundant test for dev->n_targets in nfc_find_target
Axel Lin [Mon, 24 Feb 2014 13:04:30 +0000 (21:04 +0800)]
NFC: Remove redundant test for dev->n_targets in nfc_find_target

Without this test, it returns NULL if dev->n_targets is 0 anyway.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agobrcmfmac: Make probe function __init
Jean Delvare [Thu, 13 Mar 2014 22:21:08 +0000 (23:21 +0100)]
brcmfmac: Make probe function __init

One of the benefits of platform_driver_probe() is that you can make
the probe function __init.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Convert uses of __constant_<foo> to <foo>
Joe Perches [Wed, 12 Mar 2014 17:22:38 +0000 (10:22 -0700)]
ath9k: Convert uses of __constant_<foo> to <foo>

The use of __constant_<foo> has been unnecessary for quite awhile now.

Make these uses consistent with the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath5k: add missing dma_map_error call
John Greene [Tue, 11 Mar 2014 18:08:34 +0000 (14:08 -0400)]
ath5k: add missing dma_map_error call

Trivial patch to address this trace. Now calls dma_mapping_error and
return -ENOSPC if a problem found.

WARNING: at lib/dma-debug.c:933 check_unmap+0x47b/0x960()
Hardware name: Aspire 5515
ath5k 0000:02:00.0: DMA-API: device driver failed to check map
error[device address=0x00000000874fcd42] [size=45 bytes] [mapped as
single]
Modules linked in: bnep bluetooth ebtable_filter ebtables
ip6table_filter ip6_tables be2iscsi iscsi_boot_sysfs bnx2i cnic uio
cxgb4i cxgb4 cxgb3i cxgb3 mdio libcxgbi ib_iser rdma_cm ib_addr iw_cm
ib_cm ib_sa ib_mad ib_core iscsi_tcp libiscsi_tcp libiscsi
scsi_transport_iscsi arc4 snd_hda_codec_realtek snd_hda_intel
snd_hda_codec snd_hwdep snd_seq snd_seq_device ath5k ath snd_pcm
sparse_keymap snd_page_alloc mac80211 snd_timer sp5100_tco snd edac_core
k8temp soundcore edac_mce_amd i2c_piix4 cfg80211 rfkill shpchp vhost_net
tun macvtap macvlan kvm_amd kvm uinput dm_crypt ata_generic pata_acpi
radeon i2c_algo_bit pata_atiixp drm_kms_helper ttm drm r8169 mii
i2c_core wmi video sunrpc
Pid: 820, comm: firewalld Not tainted 3.9.0-0.rc3.git1.4.fc19.x86_64 #1
Call Trace:
 <IRQ>  [<ffffffff81068df0>] warn_slowpath_common+0x70/0xa0
 [<ffffffff81068e6c>] warn_slowpath_fmt+0x4c/0x50
 [<ffffffff8137ebeb>] check_unmap+0x47b/0x960
 [<ffffffff81021cf5>] ? native_sched_clock+0x15/0x80
 [<ffffffff81021d69>] ? sched_clock+0x9/0x10
 [<ffffffff8137f12f>] debug_dma_unmap_page+0x5f/0x70
 [<ffffffffa048fa07>] ath5k_tasklet_tx+0x157/0x3f0 [ath5k]
 [<ffffffff810acc0d>] ? sched_clock_local+0x1d/0x80
 [<ffffffff81072aa6>] ? tasklet_action+0x56/0x210
 [<ffffffff81072ae7>] tasklet_action+0x97/0x210
 [<ffffffff8107343f>] __do_softirq+0xff/0x400
 [<ffffffff81073905>] irq_exit+0xb5/0xc0
 [<ffffffff81728916>] do_IRQ+0x56/0xc0
 [<ffffffff8171dc32>] common_interrupt+0x72/0x72
 <EOI>  [<ffffffff811f1f81>] ? dput+0x111/0x310
 [<ffffffff811f1ea7>] ? dput+0x37/0x310
 [<ffffffff811e75e8>] link_path_walk+0x528/0x910
 [<ffffffff811ea624>] path_openat+0x94/0x530
 [<ffffffff811eb148>] do_filp_open+0x38/0x80
 [<ffffffff811e1dda>] open_exec+0x4a/0x130
 [<ffffffff81238be3>] load_elf_binary+0x7f3/0x18e0
 [<ffffffff81021d69>] ? sched_clock+0x9/0x10
 [<ffffffff810acc0d>] ? sched_clock_local+0x1d/0x80
 [<ffffffff810acd98>] ? sched_clock_cpu+0xa8/0x100
 [<ffffffff810d515d>] ? trace_hardirqs_off+0xd/0x10
 [<ffffffff810acedf>] ? local_clock+0x5f/0x70
 [<ffffffff810d5dbf>] ? lock_release_holdtime.part.28+0xf/0x190
 [<ffffffff812383f0>] ? elf_core_dump+0x1980/0x1980
 [<ffffffff811e1151>] search_binary_handler+0x1a1/0x4f0
 [<ffffffff811e1017>] ? search_binary_handler+0x67/0x4f0
 [<ffffffff811e28fc>] do_execve_common.isra.26+0x64c/0x710
 [<ffffffff811e23c2>] ? do_execve_common.isra.26+0x112/0x710
 [<ffffffff811e2cc6>] sys_execve+0x36/0x50
 [<ffffffff81727249>] stub_execve+0x69/0xa0

Signed-off-by: John Greene <jogreene@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: set ANI firstep as absolute values instead of relative
Felix Fietkau [Tue, 11 Mar 2014 15:10:34 +0000 (16:10 +0100)]
ath9k_hw: set ANI firstep as absolute values instead of relative

On older chips, the INI value differ in similar ways as cycpwr_thr1, so
convert it to absolute values as well.

Since the ANI algorithm is different here compared to the old
implementation (fewer steps, controlled at a different point in time),
it makes sense to use values similar to what would be applied for newer
chips, just without relying on INI defaults.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: set ANI cycpwr_thr1 as absolute values instead of relative
Felix Fietkau [Tue, 11 Mar 2014 15:10:33 +0000 (16:10 +0100)]
ath9k_hw: set ANI cycpwr_thr1 as absolute values instead of relative

The table was copied from the ANI implementation of AR9300. It assumes
that the INI values contain a baseline value that is usable as reference
from which to increase/decrease based on the noise immunity value.

On older chips, the differences are bigger and especially AR5008/AR9001
are configured to much more sensitive values than what is useful.

Improve ANI behavior by reverting to the absolute values used in the
previous implementation (expressed as a simple formula instead of the
old table).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: remove ANI function restrictions for AP mode
Felix Fietkau [Mon, 10 Mar 2014 18:56:33 +0000 (19:56 +0100)]
ath9k_hw: remove ANI function restrictions for AP mode

The primary purpose of this piece of code was to selectively disable
OFDM weak signal detection. The checks for this are elsewhere, and an
earlier commit relaxed the restrictions for older chips, which are more
sensitive to interference.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: Kconfig: add missing dependency for airo_cs
Arnd Bergmann [Mon, 10 Mar 2014 14:05:25 +0000 (15:05 +0100)]
wireless: Kconfig: add missing dependency for airo_cs

commit 4c59ff221e070 "wireless: Kconfig: add missing dependency" added a number
of 'depends on CFG80211' statements, but missed the AIRO_CS driver that
also causes the airo.c file to be built. This adds the (hopefully) last
such missing statement

Cc: "Zhao, Gang" <gamerh2o@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmsmac: update comment to reflect the code
Emil Goode [Sun, 9 Mar 2014 20:06:52 +0000 (21:06 +0100)]
brcmsmac: update comment to reflect the code

The brcms_attach function is defined as static but the comment is
saying that it should not be static or gcc will issue a warning.
I believe we can remove the comment as I don't se a problem with
this function being defined as static.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmsmac: fix deadlock on missing firmware
Emil Goode [Sun, 9 Mar 2014 20:06:51 +0000 (21:06 +0100)]
brcmsmac: fix deadlock on missing firmware

When brcm80211 firmware is not installed networking hangs.
A deadlock happens because we call ieee80211_unregister_hw()
from the .start callback of struct ieee80211_ops. When .start
is called we are under rtnl lock and ieee80211_unregister_hw()
tries to take it again.

Function call stack:

dev_change_flags()
__dev_change_flags()
__dev_open()
ASSERT_RTNL() <-- Assert rtnl lock
ops->ndo_open()

.ndo_open = ieee80211_open,

ieee80211_open()
ieee80211_do_open()
drv_start()
local->ops->start()

.start = brcms_ops_start,

brcms_ops_start()
brcms_remove()
ieee80211_unregister_hw()
rtnl_lock() <-- Here we deadlock

Introduced by:
commit 25b5632fb35ca61b8ae3eee235edcdc2883f7a5e
("brcmsmac: request firmware in .start() callback")

This patch fixes the bug by removing the call to brcms_remove()
and moves the brcms_request_fw() call to the top of the .start
callback to not initiate anything unless firmware is installed.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: clean up and enhance ANI debugfs file
Felix Fietkau [Sun, 9 Mar 2014 10:27:49 +0000 (11:27 +0100)]
ath9k: clean up and enhance ANI debugfs file

Unify scnprintf calls and include the current OFDM/CCK immunity level.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: fix ready time of the multicast buffer queue
Felix Fietkau [Sun, 9 Mar 2014 10:02:54 +0000 (11:02 +0100)]
ath9k: fix ready time of the multicast buffer queue

qi->tqi_readyTime is written directly to registers that expect
microseconds as unit instead of TU.
When setting the CABQ ready time, cur_conf->beacon_interval is in TU, so
convert it to microseconds before passing it to ath9k_hw.

This should hopefully fix some Tx DMA issues with buffered multicast
frames in AP mode.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortl8180: prepare to handle more than two chip types
Andrea Merello [Sat, 8 Mar 2014 17:36:37 +0000 (18:36 +0100)]
rtl8180: prepare to handle more than two chip types

Currently a "r8185" integer variable is used as a boolean flag to
indicate whether the card is a rtl8185 or not.
Since now the driver supports only rtl8185 and rtl8180 cards, if
"r8185" variable is zero then the card is implicitly assumed to
be a rtl8180.

Now I'm preparing to add support for a third card type (rtl8187se).

This patch changes the "r8185" flag with an enum variable to
explicitly indicate which card type we have.

I'm submitting this this patch now, even if I still have to submit
other patches that not pertain with rtl8187se support, because
IMHO it's not worth rebasing them on the current code, using r8185
flag, and then changing them back again nearly immediately.
BTW if someone feels I really should do this, please tell me..

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>