GitHub/LineageOS/android_kernel_motorola_exynos9610.git
9 years agortlwifi: add support to send beacon frame.
Taehee Yoo [Wed, 21 Jan 2015 07:58:19 +0000 (16:58 +0900)]
rtlwifi: add support to send beacon frame.

In AP mode, beacon frame is necessary to keep connection.
this patch adds a sending beacon frame routine in initialization routine.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: set netif carrier off in ndo_open
Johannes Berg [Mon, 19 Jan 2015 10:24:36 +0000 (15:54 +0530)]
mwifiex: set netif carrier off in ndo_open

This patch adds fix to set carrier state off during ndo_open.
Carrier should be set to ON when device is ready to send data.
In case of station/adhoc interface device is able to transfer
data after successful association/join operation.
For AP this would be after bss_active event.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: use standard bus scanning during early register
Rafał Miłecki [Mon, 19 Jan 2015 07:30:30 +0000 (08:30 +0100)]
bcma: use standard bus scanning during early register

Starting with kernel 3.19-rc1 early registration of bcma on MIPS is done
a bit later, with memory allocator available. This allows us to simplify
code by using standard bus scanning method.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoatmel: Remove open-coded and wrong strcasecmp
Rasmus Villemoes [Wed, 21 Jan 2015 11:52:07 +0000 (12:52 +0100)]
atmel: Remove open-coded and wrong strcasecmp

The kernel's string library does in fact have strcasecmp, at least
since ded220bd8f08 ("[STRING]: Move strcasecmp/strncasecmp to
lib/string.c"). Moreover, this open-coded version is in fact wrong: If
the strings only differ in their last character, a and b have already
been incremented to point to the terminating NUL bytes, so they would
wrongly be treated as equal.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agop54pci: add handling of signal case
Nicholas Mc Guire [Tue, 20 Jan 2015 05:26:17 +0000 (06:26 +0100)]
p54pci: add handling of signal case

if(!wait_for_completion_interruptible_timeout(...))
only handles the timeout case - this patch adds handling the
signal case the same as timeout.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agop54: add handling of the signal case
Nicholas Mc Guire [Tue, 20 Jan 2015 05:25:43 +0000 (06:25 +0100)]
p54: add handling of the signal case

if(!wait_for_completion_interruptible_timeout(...))
only handles the timeout case - this patch adds handling the
signal case the same as timeout.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath5k: document a fall-through case in ath5k_hw_set_opmode
John Linville [Mon, 19 Jan 2015 19:09:15 +0000 (14:09 -0500)]
ath5k: document a fall-through case in ath5k_hw_set_opmode

Coverity: CID 114932

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k_htc: remove dead code in error path of ath9k_htc_txcompletion_cb
John Linville [Mon, 19 Jan 2015 19:02:21 +0000 (14:02 -0500)]
ath9k_htc: remove dead code in error path of ath9k_htc_txcompletion_cb

This clause is conditioned on htc_hdr != NULL, but it will only be NULL
when that check is reached.

Coverity: CID 114318

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: Use put_unaligned_le32
Vaishali Thakkar [Fri, 16 Jan 2015 16:06:14 +0000 (21:36 +0530)]
brcmfmac: Use put_unaligned_le32

This patch introduces the use of function put_unaligned_le32.

This is done using Coccinelle and semantic patch used is as follows:

@a@
typedef u32, __le32, uint32_t;
{u32,__le32,uint32_t} e32;
identifier tmp;
expression ptr;
expression y,e;
type T;
type T;
@@

- tmp = cpu_to_le32(y);

<+... when != tmp
(
- memcpy(ptr, (T)&tmp, \(4\|sizeof(u32)\|sizeof(__le32)\|sizeof(uint32_t)\|sizeof(e32)\));
+ put_unaligned_le32(y,ptr);
|
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le32(y,ptr);
)
...+>
? tmp = e

@@ type T; identifier a.tmp; @@

- T tmp;
...when != tmp

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: clean bus initialization code
Rafał Miłecki [Fri, 16 Jan 2015 19:59:39 +0000 (20:59 +0100)]
bcma: clean bus initialization code

This moves main bus init code to the main.c and renames old function to
make its purpose clear.
Thanks to this change we'll also be able to separate scanning from
registration (and support PCIe Gen 2 devices) in the future.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agob43: stop leds during suspend
Sabrina Dubroca [Mon, 19 Jan 2015 14:34:32 +0000 (15:34 +0100)]
b43: stop leds during suspend

Call b43_leds_stop during suspend to avoid this WARN:

WARNING: CPU: 1 PID: 0 at net/mac80211/util.c:755 ieee80211_can_queue_work.isra.11+0x35/0x50 [mac80211]()
queueing ieee80211 work while going to suspend

 [...]

Call Trace:
 [<c165fb2a>] dump_stack+0x48/0x69
 [<c1052f7b>] warn_slowpath_common+0x8b/0xc0
 [<f9c30225>] ? ieee80211_can_queue_work.isra.11+0x35/0x50 [mac80211]
 [<f9c30225>] ? ieee80211_can_queue_work.isra.11+0x35/0x50 [mac80211]
 [<c1052fe3>] warn_slowpath_fmt+0x33/0x40
 [<f9c30225>] ieee80211_can_queue_work.isra.11+0x35/0x50 [mac80211]
 [<f9c30260>] ieee80211_queue_work+0x20/0x40 [mac80211]
 [<f9f25d78>] b43_led_brightness_set+0x28/0x30 [b43]
 [<c14f3835>] led_timer_function+0xd5/0xe0
 [<c10cb534>] call_timer_fn+0xa4/0x4a0

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowlcore: unlock on error in wl1271_op_suspend()
Dan Carpenter [Thu, 15 Jan 2015 11:43:40 +0000 (14:43 +0300)]
wlcore: unlock on error in wl1271_op_suspend()

We recently introduced a new error path which needs an unlock.

Fixes: 6d5a748d4836 ('wlcore: add ability to reduce FW interrupts during suspend')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi/rtl8192de: remove redundant else if check
Colin Ian King [Tue, 13 Jan 2015 14:07:34 +0000 (14:07 +0000)]
rtlwifi/rtl8192de: remove redundant else if check

The else if check condition checks for the opposite of the
if check, hence the else if check is redundant and can be
replaced with a simple else:

if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
..
} else if (rtlpriv->rtlhal.macphymode != SINGLEMAC_SINGLEPHY) {
..
}

replaced with:

if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
..
} else {
..
}

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k_htc: Add a module parameter to disable blink
Hong Xu [Sun, 11 Jan 2015 19:45:53 +0000 (11:45 -0800)]
ath9k_htc: Add a module parameter to disable blink

Add an option "blink" to enable or disable the LED blink. The default
value is set to 1 so that existing users would not experience any
unexpected changes.

Signed-off-by: Hong Xu <hong@topbug.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowcn36xx: initiate TX BA sessions
Bob Copeland [Fri, 9 Jan 2015 19:15:52 +0000 (14:15 -0500)]
wcn36xx: initiate TX BA sessions

Currently, wcn36xx only asks for a TX BA session if it has
already established one for RX.  Thus, two wcn36xx devices cannot
do a-mpdu between themselves since they both wait for the other
to go first.  Fix this by starting a BA session after a few QoS
data frames have been sent to a STA.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowcn36xx: move set_tx_pdu inside set_tx_data/mgmt
Bob Copeland [Fri, 9 Jan 2015 19:15:51 +0000 (14:15 -0500)]
wcn36xx: move set_tx_pdu inside set_tx_data/mgmt

The pdu is part of the buffer descriptor, so it makes
sense that one function would fill both.  Also, passing
the whole skb instead of just the header pointer to the
set_tx_data function paves the way for using its fields
for ampdu setup inside set_tx_data().

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowcn36xx: initialize dxe lock
Bob Copeland [Fri, 9 Jan 2015 19:15:50 +0000 (14:15 -0500)]
wcn36xx: initialize dxe lock

The dxe lock is missing its initialization, so add it.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowcn36xx: initialize skb_lock
Bob Copeland [Fri, 9 Jan 2015 19:15:49 +0000 (14:15 -0500)]
wcn36xx: initialize skb_lock

ctl->skb_lock is never initialized, a fact caught by lockdep.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowcn36xx: don't process 'valid' descriptors
Bob Copeland [Fri, 9 Jan 2015 19:15:48 +0000 (14:15 -0500)]
wcn36xx: don't process 'valid' descriptors

The DMA engine will reset the valid bit after a descriptor is
complete; any with the valid bit still set may still be in
use by the hardware, so check that before freeing the descriptor.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowcn36xx: let device generate qos seq numbers
Bob Copeland [Fri, 9 Jan 2015 19:15:47 +0000 (14:15 -0500)]
wcn36xx: let device generate qos seq numbers

wcn36xx currently sends an incorrect sequence number into the BA session
setup firmware command: it should be saving or updating the ssn in the
TX_START ampdu_action callback instead of waiting until TX_OPERATIONAL.
However, we can sidestep the issue by letting the hardware generate the
sequence numbers for QoS frames, as is done in prima, so do that.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowcn36xx: use !! when assigning int as a boolean
Bob Copeland [Fri, 9 Jan 2015 19:15:46 +0000 (14:15 -0500)]
wcn36xx: use !! when assigning int as a boolean

bd->tx_comp is a single bit in a bitfield, so assigning
"info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS" only happens
to work because TX_STATUS is defined to BIT(0); if it were
any other bit this assignment would fail.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowcn36xx: initialize device defaults on start
Bob Copeland [Fri, 9 Jan 2015 19:15:45 +0000 (14:15 -0500)]
wcn36xx: initialize device defaults on start

Set up default configuration for the device when we call start.
The defaults come from dumps from the prima driver for the same
hardware.

This fixes transmit A-MPDU; previously only one MPDU would be
sent per A-MPDU due to missing MAX_MPDUS_IN_AMPDU setting.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowlcore: fix copy-paste bug: assign from src struct not dest
Giel van Schijndel [Wed, 7 Jan 2015 19:38:37 +0000 (20:38 +0100)]
wlcore: fix copy-paste bug: assign from src struct not dest

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Reported-at: http://www.viva64.com/en/b/0299/
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: do not emit messages while holding spinlock
Avinash Patil [Wed, 7 Jan 2015 12:40:25 +0000 (18:10 +0530)]
mwifiex: do not emit messages while holding spinlock

Avoid printing dev_{warn/dbg} messages while holding spinlock.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: check driver status in connect and scan handlers
Amitkumar Karwar [Wed, 7 Jan 2015 11:57:39 +0000 (03:57 -0800)]
mwifiex: check driver status in connect and scan handlers

Ignore scan and connection requests from cfg80211 when driver
unload is in process or previous command has timed out due to
a firmware bug. This patch fixes corner case system crash
issues.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix no-ack frame status
Sujith Manoharan [Fri, 19 Dec 2014 01:03:55 +0000 (06:33 +0530)]
ath9k: Fix no-ack frame status

Check if the frame has been completed without any
error and use IEEE80211_TX_STAT_NOACK_TRANSMITTED to
indicate successful transmission of no-ack frames.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoMerge tag 'iwlwifi-next-for-kalle-2015-01-22' of https://git.kernel.org/pub/scm/linux...
Kalle Valo [Fri, 23 Jan 2015 15:51:54 +0000 (17:51 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2015-01-22' of https://git./linux/kernel/git/iwlwifi/iwlwifi-next

* more work for new devices (4165 / 8260)
* cleanups / improvemnts in rate control
* fixes for TDLS
* major statistics work from Johannes - more to come
* improvements for the fw error dump infrastructure
* usual amount of small fixes here and there (scan, D0i3 etc...)

9 years agoiwlwifi: mvm: fix rx chains configuration in phy ctxt cmd
Liad Kaufman [Thu, 22 Jan 2015 17:01:35 +0000 (19:01 +0200)]
iwlwifi: mvm: fix rx chains configuration in phy ctxt cmd

In the PHY_CTXT command sent to the FW the TX chains were
indeed configured by the values of both FW TLVs and of NVM,
but the RX chains were left out and configured only by FW
TLV.

This causes problems in 4165 HW, where there are 1x1
antennas, and the wrong configuration denies the driver
from connecting to the AP.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: support secured boot flow for family 8000 B step
Eran Harary [Tue, 20 Jan 2015 13:37:34 +0000 (15:37 +0200)]
iwlwifi: pcie: support secured boot flow for family 8000 B step

The driver loads the 2 CPU sections, then it needs to let
the firmware know to start the authentication of the
sections. This is done by writing the relevants bits to
FH_UCODE_LOAD_STATUS.

For CPU1, the driver sets the lower 16 bits. For both CPUs,
the driver sets all the 32 bits.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: remove stats argument from functions
Johannes Berg [Wed, 21 Jan 2015 17:05:04 +0000 (18:05 +0100)]
iwlwifi: mvm: rs: remove stats argument from functions

The stats argument is always only passed as &mvm->drv_rx_stats, so
there's no point in passing it when the mvm pointer is passed.
Remove the argument entirely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: use a new API for enabling STBC
Eyal Shapira [Thu, 15 Jan 2015 18:22:34 +0000 (20:22 +0200)]
iwlwifi: mvm: use a new API for enabling STBC

The new API tells the FW that it's allowed to use STBC
but the FW will decide on its own whether to use STBC
or SISO (and in the future Beamformer).
Keep support for the old API which sets STBC explicitly
in the rates in the LQ table while we still support old
FW revisions.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: refactor ht/vht init
Eyal Shapira [Fri, 16 Jan 2015 09:01:51 +0000 (11:01 +0200)]
iwlwifi: mvm: rs: refactor ht/vht init

Prepare to add some more code there so refactor to
separate functions.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: really disable TDLS queues
Emmanuel Grumbach [Tue, 20 Jan 2015 15:07:10 +0000 (17:07 +0200)]
iwlwifi: mvm: really disable TDLS queues

for_each_set_bit expect the size in number of bits and not
in bytes.

Fixes: a0f6bf2a5b01 ("iwlwifi: mvm: use private TFD queues for TDLS stations")
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Do not consider invalid HW queues in queue mask
Ilan Peer [Sun, 18 Jan 2015 03:35:00 +0000 (22:35 -0500)]
iwlwifi: mvm: Do not consider invalid HW queues in queue mask

The iwl_mvm_mac_get_queues_mask() added vif->hw_queue[ac] to the
queue mask although it might be set to IEEE80211_INVAL_HW_QUEUE.
Fix it.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - set all the co-running values to 0
Emmanuel Grumbach [Thu, 22 Jan 2015 13:14:38 +0000 (15:14 +0200)]
iwlwifi: mvm: BT Coex - set all the co-running values to 0

With this value, we de-facto disable the feature. Since it
is not working yet, disable it completely.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support family 8000 C step
Eran Harary [Mon, 12 Jan 2015 08:43:58 +0000 (10:43 +0200)]
iwlwifi: mvm: support family 8000 C step

C step functionality in the driver is exactly the same as
B step besides the ucode name that present as iwlwifi-8000C-xx.ucode
instead of iwlwifi-8000B-xx.ucode

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: init ref_lock
Johannes Berg [Mon, 19 Jan 2015 20:09:09 +0000 (21:09 +0100)]
iwlwifi: pcie: init ref_lock

The ref_lock that was recently added is missing initialization
which makes lockdep unhappy and is generally a bad idea.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: document switch case fall-through in iwl_mvm_send_sta_key
John W. Linville [Mon, 12 Jan 2015 21:18:11 +0000 (16:18 -0500)]
iwlwifi: mvm: document switch case fall-through in iwl_mvm_send_sta_key

Add a comment indicating that the WLAN_CIPHER_SUITE_WEP104 case falls
through to the WLAN_CIPHER_SUITE_WEP40 case in iwl_mvm_send_sta_key.
This will document that the lack of a break is intentional.

Coverity: CID 1260023

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: use STBC regardless of power save mode
Eyal Shapira [Mon, 12 Jan 2015 09:53:06 +0000 (11:53 +0200)]
iwlwifi: mvm: rs: use STBC regardless of power save mode

Tx STBC was used only when in CAM mode or if powersave is disabled.
Effectively this meant we never used STBC as these modes aren't
used on most platforms by default. Change that.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoRevert "iwlwifi: mvm: drop non VO frames when flushing"
Emmanuel Grumbach [Tue, 20 Jan 2015 07:25:19 +0000 (09:25 +0200)]
Revert "iwlwifi: mvm: drop non VO frames when flushing"

This is now implemented by mac80211 (commit below).
mac80211 will flush/drop the frames on the queues before
suspending / disconnecting.
It will then send the deauth and wait until the queues are
empty.

commit 3b24f4c65386dc0f2efb41027bc6e410ea2c0049
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Wed Jan 7 15:42:39 2015 +0200

    mac80211: let flush() drop packets when possible

This reverts commit 4e6c48e0984e28d064ee8fbc292aee7b7920c507.

9 years agoiwlwifi: mvm: add support for new LTR command
Emmanuel Grumbach [Tue, 13 Jan 2015 08:16:30 +0000 (10:16 +0200)]
iwlwifi: mvm: add support for new LTR command

This new command will give finer granularity to configure
the platform.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - fine tune the MPLUT register
Emmanuel Grumbach [Tue, 13 Jan 2015 11:56:26 +0000 (13:56 +0200)]
iwlwifi: mvm: BT Coex - fine tune the MPLUT register

This allow to better preserve the BT performance while
WiFi is running.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoMerge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next
Emmanuel Grumbach [Tue, 20 Jan 2015 07:23:27 +0000 (09:23 +0200)]
Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Conflicts:
drivers/net/wireless/iwlwifi/iwl-fw-file.h
drivers/net/wireless/iwlwifi/mvm/scan.c

9 years agoiwlwifi: mvm: move U-APSD decision to authentication
Johannes Berg [Thu, 13 Nov 2014 19:53:45 +0000 (20:53 +0100)]
iwlwifi: mvm: move U-APSD decision to authentication

In order to change the usage of U-APSD on the fly later,
move the enabling condition into a new function that is
called when authenticated.

This allows the module parameter to become writable, it
won't take effect immediately but at least on the next
association the new value will be used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoMerge tag 'tags/mac80211-next-for-davem-2015-01-19' into iwlwifi-next
Emmanuel Grumbach [Tue, 20 Jan 2015 07:11:39 +0000 (09:11 +0200)]
Merge tag 'tags/mac80211-next-for-davem-2015-01-19' into iwlwifi-next

Some further updates for net-next:
 * fix network-manager which was broken by the previous changes
 * fix delete-station events, which were broken by me making the
   genlmsg_end() mistake
 * fix a timer left running during suspend in some race conditions
   that would cause an annoying (but harmless) warning
 * (less important, but in the tree already) remove 80+80 MHz rate
   reporting since the spec doesn't distinguish it from 160 MHz;
   as the bitrate they're both 160 MHz bandwidth

9 years agoiwlwifi: mvm: ignore temperature updates in the RX statistics notification
Luciano Coelho [Wed, 14 Jan 2015 19:39:34 +0000 (21:39 +0200)]
iwlwifi: mvm: ignore temperature updates in the RX statistics notification

If the firmware sends spontaneous DTS notfications with the
temperature (indicated in a TLV), we can ignore the temperature we get
in the RX statistics notifications.  This prevents potentially
handling the same temperature change twice.  It also ignores
notifications with temperature equal to 0 that happens from time to
time.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: cleanup unuseful and overflowing traces
Eyal Shapira [Thu, 15 Jan 2015 16:34:14 +0000 (18:34 +0200)]
iwlwifi: mvm: rs: cleanup unuseful and overflowing traces

These aren't useful and overflowing so drop them
and also fix a minor typo.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: generate statistics debugfs code
Johannes Berg [Thu, 15 Jan 2015 11:59:26 +0000 (12:59 +0100)]
iwlwifi: mvm: generate statistics debugfs code

There's no need to duplicate the structure field name in the string,
just generate the string in the macro that's there anyway. To keep
the debugfs output the same, rename one (otherwise unused) field.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: move statistics API to new header file
Johannes Berg [Wed, 14 Jan 2015 14:54:18 +0000 (15:54 +0100)]
iwlwifi: mvm: move statistics API to new header file

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: sync statistics firmware API
Johannes Berg [Wed, 14 Jan 2015 14:16:03 +0000 (15:16 +0100)]
iwlwifi: mvm: sync statistics firmware API

The firmware API structs are split differently, synchronize
the struct splits with the current firmware definitions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: correctly set the NMI register
Emmanuel Grumbach [Wed, 7 Jan 2015 14:44:06 +0000 (16:44 +0200)]
iwlwifi: correctly set the NMI register

When we want to trigger an NMI in the device, we need to set
bit 7 and not bit 0. However, older firmwares don't register
to the interrupt issued by bit 7. Use bit 7 first so that
the correct interrupt will be issued hoping that the firmware
will react. To be on the safe side, set bit 0 in case the
firmware didn't register to the proper interrupt.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add rxf and txf to dump data
Liad Kaufman [Mon, 15 Dec 2014 15:54:16 +0000 (17:54 +0200)]
iwlwifi: mvm: add rxf and txf to dump data

When the FW is in error status - try to read the RXF and
TXF (all of them) and add them to the dump data.

This shouldn't happen in non-error statuses, as we don't
want to stop the RXF/TXF while they are running.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add support for dumping a secondary SRAM
Ido Yariv [Wed, 10 Dec 2014 17:39:27 +0000 (12:39 -0500)]
iwlwifi: mvm: add support for dumping a secondary SRAM

Some HW modules have two SRAMs. In such cases add the secondary SRAM to
the list of dumped segments.

Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add debugfs file for misbehaving U-APSD AP
Johannes Berg [Fri, 9 Jan 2015 13:15:32 +0000 (14:15 +0100)]
iwlwifi: mvm: add debugfs file for misbehaving U-APSD AP

As this functionality relies on getting a firmware notification
it is difficult to test. Allow accessing the data for it from
debugfs to be able to trigger all kinds of scenarios to test.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: let the firmware configure the scheduler
Emmanuel Grumbach [Mon, 5 Jan 2015 14:52:55 +0000 (16:52 +0200)]
iwlwifi: mvm: let the firmware configure the scheduler

A new host command can be used to configure the scheduler
instead of accessing the scheduler's registers from the
driver. This is easier and less error prone since accessing
the hardware at certain moments can lead to races with the
firmware.
Prefer to use the host command whenever it is available.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: scan dwell time corrections
David Spinadel [Mon, 29 Dec 2014 13:43:48 +0000 (15:43 +0200)]
iwlwifi: mvm: scan dwell time corrections

Use only basic dwell time (10 ms for active scan and 110 for passive),
regardless of the number of the probes and the band, if it is
supported by the FW. The FW will add 3 ms for each probe sent and 10
ms for low band channels.
Add a TLV flag to indicate such support in FW.

This fix is needed to fix few bugs regarding scans that take too much time.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: remove unused TLV capability flags
Emmanuel Grumbach [Tue, 6 Jan 2015 07:48:54 +0000 (09:48 +0200)]
iwlwifi: remove unused TLV capability flags

The driver doesn't support the firmwares that don't have
these capabilities. The code that actually used these
flags has been removed already, but the flags were left
for an unclear reason. Remove them.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add print of he nvm version
Eran Harary [Mon, 29 Dec 2014 11:02:13 +0000 (13:02 +0200)]
iwlwifi: mvm: add print of he nvm version

Print the nvm version in the log for debugging purposes.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: set max_out_time equal to frag_passive_dwell in fragmented scan
Haim Dreyfuss [Thu, 18 Dec 2014 10:34:01 +0000 (12:34 +0200)]
iwlwifi: mvm: set max_out_time equal to frag_passive_dwell in fragmented scan

Fragmented scan should be applied for all channels, passive and active.
When scanning on passive channels the firmware uses frag_passive_dwell
to define the maximum continuous scan time before returning to the
operating channel. On active channels max_out_time is the parameter
used by the firmware to define the maximum time allowed out of the
operating channel. Since active channels' scan should also be fragmented
set max_out_time equal to frag_passive_dwell.
In addition:
- Set max_out_time and suspend_time if the firmware doesn't support
  fragmented scan to avoid unexpected behavior.
- Adjust max_out_time for second level of scan precedence.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: allow to disable MIMO for P2P only
Emmanuel Grumbach [Mon, 5 Jan 2015 07:48:54 +0000 (09:48 +0200)]
iwlwifi: mvm: rs: allow to disable MIMO for P2P only

This is to work around interoperability bugs with devices
that don't hanle MIMO properly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: allow to collect debug data from non-sleepable context
Emmanuel Grumbach [Mon, 29 Dec 2014 07:42:37 +0000 (09:42 +0200)]
iwlwifi: mvm: allow to collect debug data from non-sleepable context

iwl_mvm_fw_dbg_collect allows to collect debug data from
the firmware. Most of the firmware interaction is done in
non-sleepable context. It makes little sense to force the
caller of iwl_mvm_fw_dbg_collect to sleep.
Defer the actual collection to a worker so that this
function will be able to be called from any context.

Reviewed-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: make sure state isn't in d0i3 when stopping fw monitor
Liad Kaufman [Sun, 4 Jan 2015 09:03:13 +0000 (11:03 +0200)]
iwlwifi: mvm: make sure state isn't in d0i3 when stopping fw monitor

In case platform is in d0i3 - make sure it is awake when
writing the registers to stop the monitor when collecting FW
debug data. Plus, remove unneeded mutex locking currently
done.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Add debugfs entry to enable scan offload notification
Alexander Bondar [Tue, 9 Dec 2014 17:15:49 +0000 (19:15 +0200)]
iwlwifi: mvm: Add debugfs entry to enable scan offload notification

This option enables scan offload iteration complete notification from
firmware which includes the last iteration's status and the scanned
channels from the current iteration.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: add new config and PCI IDs for 4165 series
Oren Givon [Tue, 23 Dec 2014 08:39:48 +0000 (10:39 +0200)]
iwlwifi: add new config and PCI IDs for 4165 series

Add a new config for 4165 series over PCI and insert support
for two new 4165 series PCI IDs.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: make sure state isn't in d0i3 when collecting fw dbg
Liad Kaufman [Thu, 1 Jan 2015 15:42:46 +0000 (17:42 +0200)]
iwlwifi: mvm: make sure state isn't in d0i3 when collecting fw dbg

This makes sure that we're not trying to read/write any of
the FW debug data collected during d0i3.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: repeat initial legacy rates in LQ table
Eyal Shapira [Sun, 28 Dec 2014 20:12:38 +0000 (22:12 +0200)]
iwlwifi: mvm: rs: repeat initial legacy rates in LQ table

Repeating the legacy rates avoids degrading quickly to
lower rates due to collisions which is common when doing
TCP Tx traffic in legacy.
This slightly improves TCP Tx throughput while working
in legacy in different scenarios.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't indicate no BA if STA was in powersave
Eyal Shapira [Wed, 31 Dec 2014 13:22:38 +0000 (15:22 +0200)]
iwlwifi: mvm: don't indicate no BA if STA was in powersave

If Tx failed because the STA was in powersave there's no point
in sending a BAR so avoid indicating AMPDU_NO_BACK to mac80211.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoMerge commit 'c1e140bf79d817d4a7aa9932eb98b0359c87af33' from mac80211-next
Kalle Valo [Thu, 22 Jan 2015 12:49:44 +0000 (14:49 +0200)]
Merge commit 'c1e140bf79d817d4a7aa9932eb98b0359c87af33' from mac80211-next

Patch "ath9k: Fix no-ack frame status" needs these mac80211 patches:

commit 5cf16616e152dd5c274a65954c77f64892d025a8
Author: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Date:   Wed Dec 10 21:26:11 2014 +0530

    mac80211: Fix accounting of multicast frames

commit 6b127c71fbdd3daacfd8b9f80b8e6ebfb70a889e
Author: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Date:   Wed Dec 10 21:26:10 2014 +0530

    mac80211: Move IEEE80211_TX_CTL_PS_RESPONSE

Conflicts:
drivers/net/wireless/ath/wil6210/cfg80211.c
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c

9 years agoMAINTAINERS: remove ath5k mailing list
Jiri Slaby [Sat, 10 Jan 2015 11:02:40 +0000 (12:02 +0100)]
MAINTAINERS: remove ath5k mailing list

The list is in the process of closing.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: linux-wireless@vger.kernel.org
Cc: "Michael Renzmann" <mrenzmann@madwifi-project.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoiwlwifi: mvm: validate tid and sta_id in ba_notif
Eyal Shapira [Fri, 16 Jan 2015 09:09:30 +0000 (11:09 +0200)]
iwlwifi: mvm: validate tid and sta_id in ba_notif

These are coming from the FW and are used to access arrays.
Bad values can cause an out of bounds access so discard
such ba_notifs and warn.

CC: <stable@vger.kernel.org> [3.10+]
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agomac80211: delete the assoc/auth timer upon suspend
Emmanuel Grumbach [Mon, 19 Jan 2015 14:53:06 +0000 (16:53 +0200)]
mac80211: delete the assoc/auth timer upon suspend

While suspending, we destroy the authentication /
association that might be taking place. While doing so, we
forgot to delete the timer which can be firing after
local->suspended is already set, producing the warning below.

Fix that by deleting the timer.

[66722.825487] WARNING: CPU: 2 PID: 5612 at net/mac80211/util.c:755 ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]()
[66722.825487] queueing ieee80211 work while going to suspend
[66722.825529] CPU: 2 PID: 5612 Comm: kworker/u16:69 Tainted: G        W  O  3.16.1+ #24
[66722.825537] Workqueue: events_unbound async_run_entry_fn
[66722.825545] Call Trace:
[66722.825552]  <IRQ>  [<ffffffff817edbb2>] dump_stack+0x4d/0x66
[66722.825556]  [<ffffffff81075cad>] warn_slowpath_common+0x7d/0xa0
[66722.825572]  [<ffffffffa06b5b90>] ? ieee80211_sta_bcn_mon_timer+0x50/0x50 [mac80211]
[66722.825573]  [<ffffffff81075d1c>] warn_slowpath_fmt+0x4c/0x50
[66722.825586]  [<ffffffffa06977a2>] ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]
[66722.825598]  [<ffffffffa06977d5>] ieee80211_queue_work+0x25/0x50 [mac80211]
[66722.825611]  [<ffffffffa06b5bac>] ieee80211_sta_timer+0x1c/0x20 [mac80211]
[66722.825614]  [<ffffffff8108655a>] call_timer_fn+0x8a/0x300

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoRevert "wireless: Support of IFLA_INFO_KIND rtnl attribute"
Johannes Berg [Mon, 19 Jan 2015 17:49:50 +0000 (18:49 +0100)]
Revert "wireless: Support of IFLA_INFO_KIND rtnl attribute"

This reverts commit ba1debdfed974f25aa598c283567878657b292ee.

Oliver reported that it breaks network-manager, for some reason with
this patch NM decides that the device isn't wireless but "generic"
(ethernet), sees no carrier (as expected with wifi) and fails to do
anything else with it.

Revert this to unbreak userspace.

Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiwlwifi: mvm: abort scheduled scan upon RFKILL
Emmanuel Grumbach [Sun, 18 Jan 2015 19:39:30 +0000 (21:39 +0200)]
iwlwifi: mvm: abort scheduled scan upon RFKILL

When we have an active scheduled scan, and the RFKILL
interrupt kicks in, the stack will cancel the scheduled
scan as part of the down flow. But cancelling scheduled
scan usually implies sending a command to the firwmare
which has been killed as part of the RFKILL interrupt
handling.
Because of that, we returned an error to mac80211 when
it asked to stop the scheduled scan and didn't notify the
end of the scheduled scan. Besides a fat warning, this led
to a situation in which cfg80211 would refuse any new scan
request.

To disentangle this, fake that the scheduled scan has been
stopped without sending the command to the firwmare, return
0 after having properly let cfg80211 know that the scan
has been cancelled.

This is basically the same as:
commit 9b520d84957d63348e87c0f2cbd21d86e1e8f2f2
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Tue Nov 4 15:54:11 2014 +0200

    iwlwifi: mvm: abort scan upon RFKILL

    This code existed but not for all the different FW APIs
    we support.
    Fix this.

but for the scheduled scan case.

Link: http://permalink.gmane.org/gmane.linux.kernel.wireless.general/133232
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agocfg80211: fix checking nl80211_send_station() return value
Johannes Berg [Fri, 16 Jan 2015 20:05:02 +0000 (21:05 +0100)]
cfg80211: fix checking nl80211_send_station() return value

The return value from nl80211_send_station() is the length of the
skb, or a negative error, so abort sending the message only when
the return value was negative.

This fixes the ibss_rsn wpa_supplicant test case.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: remove doubled semicolon
Johannes Berg [Fri, 16 Jan 2015 12:27:56 +0000 (13:27 +0100)]
mac80211: remove doubled semicolon

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: change bandwidth reporting to explicit field
Johannes Berg [Thu, 15 Jan 2015 15:14:02 +0000 (16:14 +0100)]
cfg80211: change bandwidth reporting to explicit field

For some reason, we made the bandwidth separate flags, which
is rather confusing - a single rate cannot have different
bandwidths at the same time.

Change this to no longer be flags but use a separate field
for the bandwidth ('bw') instead.

While at it, add support for 5 and 10 MHz rates - these are
reported as regular legacy rates with their real bitrate,
but tagged as 5/10 now to make it easier to distinguish them.

In the nl80211 API, the flags are preserved, but the code
now can also clearly only set a single one of the flags.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: remove 80+80 MHz rate reporting
Johannes Berg [Thu, 15 Jan 2015 15:05:21 +0000 (16:05 +0100)]
cfg80211: remove 80+80 MHz rate reporting

These rates are treated the same as 160 MHz in the spec, so
it makes no sense to distinguish them. As no driver uses them
yet, this is also not a problem, just remove them.

In the userspace API the field remains reserved to preserve
API and ABI.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: remove 80+80 MHz rate reporting
Johannes Berg [Thu, 15 Jan 2015 15:02:46 +0000 (16:02 +0100)]
mac80211: remove 80+80 MHz rate reporting

These rates are treated the same as 160 MHz in the spec,
so it makes no sense to distinguish them. As no driver
uses them yet, this is also not a problem, just remove
them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agob43legacy: Remove unused b43legacy_radio_set_tx_iq()
Rickard Strandqvist [Tue, 6 Jan 2015 17:59:35 +0000 (18:59 +0100)]
b43legacy: Remove unused b43legacy_radio_set_tx_iq()

Remove the function b43legacy_radio_set_tx_iq() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Rafa? Mi?ecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco/hermes: select CFG80211_WEXT
Johannes Berg [Tue, 6 Jan 2015 12:46:57 +0000 (13:46 +0100)]
orinoco/hermes: select CFG80211_WEXT

It makes no sense to require the user to find and enable
CFG80211_WEXT before the driver can be selected, make the
driver select the needed Kconfig symbol itself.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Update PCI IDs for AR9565
Sujith Manoharan [Mon, 5 Jan 2015 05:44:25 +0000 (11:14 +0530)]
ath9k: Update PCI IDs for AR9565

This patch adds several new PCI IDs for AR9565.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: enable per-packet TPC on AR9002 based chips
Lorenzo Bianconi [Tue, 30 Dec 2014 22:10:20 +0000 (23:10 +0100)]
ath9k: enable per-packet TPC on AR9002 based chips

Enable per-packet TPC on AR9002 based chips by default

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: add TPC to TX path for AR9002 based chips
Lorenzo Bianconi [Tue, 30 Dec 2014 22:10:19 +0000 (23:10 +0100)]
ath9k: add TPC to TX path for AR9002 based chips

Add TPC capability to TX descriptor path for AR9002 based chips. Scale
per-packet TX power according to eeprom power bias, power adjustments for
HT40 mode and open loop CCK rates. Cap per-packet TX power according to
TX power per-rate tables

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: add power per-rate tables for AR9002 chips
Lorenzo Bianconi [Tue, 30 Dec 2014 22:10:18 +0000 (23:10 +0100)]
ath9k: add power per-rate tables for AR9002 chips

Add TX power per-rate tables for MIMO/legacy modes for AR9002 based chips
in order to cap the maximum TX power value per-rate in the TX descriptor path.
Add TX power adjustments for HT40 mode, open loop CCK rates and eeprom power
bias for AR9280 and later chips

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoadm8211: fix error return code
Julia Lawall [Mon, 29 Dec 2014 17:04:41 +0000 (18:04 +0100)]
adm8211: fix error return code

Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: fix three coding style issues, more than 80 characters per line
Oscar Forner Martinez [Sat, 27 Dec 2014 19:24:28 +0000 (19:24 +0000)]
bcma: fix three coding style issues, more than 80 characters per line

Three lines with more than 80 characters per line have been split in several lines.

Signed-off-by: Oscar Forner Martinez <oscar.forner.martinez@gmail.com>
Acked-by: Rafa? Mi?ecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
Arend van Spriel [Sat, 27 Dec 2014 13:13:00 +0000 (14:13 +0100)]
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries

Use the helper to get rid of the file operations per debugfs file. The
device driver data contains struct ieee80211_hw pointer and the
struct ath9k_softc pointer is assigned to ieee80211_hw::priv so it can
be accessed in the seq_file read operation.

Cc: ath9k-devel@lists.ath9k.org
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: relax spinlocks in rx reorder
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:24 +0000 (09:47 +0200)]
wil6210: relax spinlocks in rx reorder

In the Rx reorder mechanism, nothing is done in the interrupt
context, so there is no need to use 'irq' flavors of spinlock.
Rx done in NAPI context (tasklet), other manipulations - in the
thread context.

Having interrupts enabled makes it better for the OS in general.
Besides, if enslaved under bonding, bridge or team driver, Rx
won't work with interrupts disabled.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: workaround for BACK establishment race
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:23 +0000 (09:47 +0200)]
wil6210: workaround for BACK establishment race

When establishing BACK, WMI may be handled earlier then Rx, in this case
late Rx will be mis-handled.

Detect early Rx and pass it to the stack, bypass reordering

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: Tx/Rx descriptors documentation
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:22 +0000 (09:47 +0200)]
wil6210: Tx/Rx descriptors documentation

Sync documentation for the Tx/Rx descriptors with the
firmware/hardware documentation.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: fix reordering for MCAST
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:21 +0000 (09:47 +0200)]
wil6210: fix reordering for MCAST

In the reordering block, Ethernet DA was checked for MCAST, this is wrong.
Check instead MCAST indication from 802.11 MAC header. Hardware saves
this into Rx descriptor.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: RX high threshold interrupt configuration
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:20 +0000 (09:47 +0200)]
wil6210: RX high threshold interrupt configuration

Rx high threshold interrupt is reported by the hardware in case
when number of not utilized by the HW descriptors in the Rx ring
becomes low.
Introduce module parameter for RX high threshold.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: add advanced interrupt moderation
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:19 +0000 (09:47 +0200)]
wil6210: add advanced interrupt moderation

Add advanced interrupt moderation support available since "Sparrow B0".
Legacy interrupt moderation used only one counter to moderate tx, rx,
and misc interrupts.
Advanced interrupt moderation bypasses misc, and handles separately tx
and rx interrupts. In addition it has two timers for each interrupt type.
Max burst duration timer which defines how long to postpone interrupt after
first event (receive event for rx and tx complete event for tx), and
interframe timeout which defines how to determine the end of the burst and
issue interrupt even if the first timer still pending.
Capabilities flags in wil_priv is set on initialization according to
HW. The rest of the code checks for advanced interrupt capability bit
in capabilities flags field.
Debugfs is split accordingly: "legacy" interrupt moderation remains
unchanged, new debugs files added for advanced interrupt moderation
support.
Module params are aligned to support advanced interrupt moderation
(tx & rx). When not available (for legacy interrupt moderation) will
use only rx configuration; Tx configuration will be ignored in this
case.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: use HW capabilities mask in reset
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:18 +0000 (09:47 +0200)]
wil6210: use HW capabilities mask in reset

Use the proper reset follow based on HW capabilities
detection instead of chip ID.
Remove old hw ID mechanism which was used only for reset flow.
Remove support for Marlon A0.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: detect HW capabilities
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:17 +0000 (09:47 +0200)]
wil6210: detect HW capabilities

Read relevant information (HW ID for now) once on init
and set capabilities accordingly.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: rework debugfs for BACK
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:16 +0000 (09:47 +0200)]
wil6210: rework debugfs for BACK

Enable more flexible control over block ack:
- allow addba for any Tx vring
- allow to specify block ack timeout
- allow to delba for Tx or Rx side of any agreement; with reason

Renamed "addba" entry to "back"; it prints short help when read;
write:
 - "add <ringid> <agg_size> <timeout>" to trigger ADDBA
If missing, <timeout> defaults to 0
 - "del_tx <ringid> <reason>" to trigger DELBA for Tx side
 - "del_rx <CID> <TID> <reason>" to trigger DELBA for Rx side
If missing, <reason> set to "STA_LEAVING" (36)

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: fix Tx VRING for STA mode
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:15 +0000 (09:47 +0200)]
wil6210: fix Tx VRING for STA mode

In STA mode, all Tx should be directed to the same VRING towards the AP.
Thus, look up for the 1-st eligible VRING and use it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: use bitmap API for "status"
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:14 +0000 (09:47 +0200)]
wil6210: use bitmap API for "status"

wil->status used as bitmap; use DECLARE_BITMAP for it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: Increase number of associated stations
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:13 +0000 (09:47 +0200)]
wil6210: Increase number of associated stations

Change default to support maximum number of associated
stations to an AP

Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: consider SNAP header in MTU calculations
Vladimir Kondratiev [Tue, 23 Dec 2014 07:47:12 +0000 (09:47 +0200)]
wil6210: consider SNAP header in MTU calculations

When encapsulating 802.3 frames into the 802.11 ones,
8-byte SNAP header added to save ethtype. SNAP is part of
the frame body, thus should be counted in MSDU. So,
MTU = MSDU - SNAP

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>