Johannes Berg [Wed, 4 Dec 2013 22:12:31 +0000 (23:12 +0100)]
mac80211: optimise synchronize_net() for sta_info_flush
There's no reason to have one synchronize_net() for each
removed station, refactor the code slightly to have just
a single synchronize_net() for all stations.
Note that this is currently useless as hostapd removes
stations one by one and this coalescing never happens.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 22:05:45 +0000 (23:05 +0100)]
mac80211: move synchronize_net() before sta key removal
There's no reason to do this inside the sta key removal
since the keys can only be reached through the sta (and
not by the driver at all) so once the sta can no longer
be reached, the keys are safe.
This will allow further optimisation opportunities with
multiple stations.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 21:46:11 +0000 (22:46 +0100)]
mac80211: don't delay station destruction
If we can assume that stations are never referenced by the
driver after sta_state returns (and this is true since the
previous iwlmvm patch and for all other drivers) then we
don't need to delay station destruction, and don't need to
play tricks with rcu_barrier() etc.
This should speed up some scenarios like hostapd shutdown.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 19:11:06 +0000 (20:11 +0100)]
mac80211: move 4-addr sta pointer clearing before synchronize_rcu()
The pointer should be cleared before synchronize_rcu() so that the
consequently dead station won't be found by any lookups in the TX
or RX paths.
Also check that the station is actually the one being removed, the
check is not needed because each 4-addr VLAN can only have a single
station and non-4-addr VLANs always have a NULL pointer there, but
the code is clearer this way (and we avoid the memory write.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 21:39:17 +0000 (22:39 +0100)]
iwlwifi: mvm: use pre-RCU-sync sta removal operation
iwlmvm relies on the current mac80211 behaviour of allowing
station pointers to be valid for an RCU grace period after
returning from the sta_state() callback. To optimise these
cases, this behaviour is going away, so make the driver use
the new sta_pre_rcu_remove() method to clear the pointer in
the fw_id_to_mac_id[] array.
Since this may happen while the station is still present in
the firmware, don't set the pointer to NULL but to -ENOENT
to mark this particular case. In client mode, the station
is kept even longer (until marking the MAC as unassociated)
so the drain flow must take this new behavior into account.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 21:39:17 +0000 (22:39 +0100)]
mac80211: add pre-RCU-sync sta removal driver operation
Currently, mac80211 allows drivers to keep RCU-protected station
references that are cleared when the station is removed from the
driver and consequently needs to synchronize twice, once before
removing the station from the driver (so it can guarantee that
the station is no longer used in TX towards the driver) and once
after the station is removed from the driver.
Add a new pre-RCU-synchronisation station removal operation to
the API to allow drivers to clear/invalidate their RCU-protected
station pointers before the RCU synchronisation.
This will allow removing the second synchronisation by changing
the driver API so that the driver may no longer assume a valid
RCU-protected pointer after sta_remove/sta_state returns.
The alternative to this would be to synchronize_rcu() in all the
drivers that currently rely on this behaviour (only iwlmvm) but
that would defeat the purpose.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 16 Dec 2013 10:23:45 +0000 (11:23 +0100)]
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Lorenzo Bianconi [Mon, 9 Dec 2013 22:37:49 +0000 (23:37 +0100)]
ath9k: initialize retry chain flags in tx99 code
Initialize first chain flags in ath9k_build_tx99_skb() according to
configured channel mode and channel width
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Mon, 9 Dec 2013 20:28:32 +0000 (22:28 +0200)]
MAINTAINERS: remove myself as maintainer of TI WiLink drivers
I don't have the time to maintain the TI WiLink WLAN drivers anymore.
Remove my name and mark them as Orphan.
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Sat, 7 Dec 2013 02:17:40 +0000 (02:17 +0000)]
ath5k: Reset Tx interrupt bits also on PISR
Some cards don't update the PISR properly when all SISR bits
for Tx interrupts are being cleared and as a result we get
interrupt storm. Since we handle all tx queues all together
(so we don't really use the SISR bits to do per-queue interrupt
handling), we can manualy update PISR by doing a write-to-clear
on its Tx interrupt bits.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 16:56:16 +0000 (08:56 -0800)]
nfc: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org
CC: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
CC: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
CC: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:14 +0000 (03:32 -0800)]
rfkill: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:13 +0000 (03:32 -0800)]
drivers/net/wireless: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org
CC: Simon Kelley <simon@thekelleys.org.uk>
CC: Christian Lamparter <chunkeey@googlemail.com>
CC: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:12 +0000 (03:32 -0800)]
prism54: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org
CC: "Luis R. Rodriguez" <mcgrof@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:11 +0000 (03:32 -0800)]
rt2x00: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org
CC: Ivo van Doorn <IvDoorn@gmail.com>
CC: Gertjan van Wingerde <gwingerde@gmail.com>
CC: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:10 +0000 (03:32 -0800)]
zd1211rw: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org
CC: Daniel Drake <dsd@gentoo.org>
CC: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 11 Dec 2013 15:54:41 +0000 (10:54 -0500)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next
John W. Linville [Wed, 11 Dec 2013 15:49:24 +0000 (10:49 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
Johan Hedberg [Tue, 10 Dec 2013 08:52:48 +0000 (10:52 +0200)]
Bluetooth: Fix handling of L2CAP Command Reject over LE
If we receive an L2CAP command reject message over LE we should take
appropriate action on the corresponding channel. This is particularly
important when trying to interact with a remote pre-4.1 system using LE
CoC signaling messages. If we don't react to the command reject the
corresponding socket would not be notified until a connection timeout
occurs.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:54 +0000 (16:28 +0530)]
ath9k: Apply tuning caps for AR9330 and AR9485
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:53 +0000 (16:28 +0530)]
ath9k: Fix internal regulator for AR955x
The internal regulator needs to be programmed
correctly for AR955x.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:52 +0000 (16:28 +0530)]
ath9k: Enable manual peak calibration for AR9331 v1.1
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:51 +0000 (16:28 +0530)]
ath9k: Remove AR9330 v1.0 macro as it's not supported
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:50 +0000 (16:28 +0530)]
ath9k: Fix regulatory compliance
Adjusting the CCA registers for maximum permissible
noise floor in ETSI/Japan domains has to be done for
all AR9003 family chips.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:49 +0000 (16:28 +0530)]
ath9k: Identify duplicate AR9565 v1.0 initvals
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:48 +0000 (16:28 +0530)]
ath9k: Identify duplicate AR9462 v2.0 initvals
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:47 +0000 (16:28 +0530)]
ath9k: Identify duplicate AR9485 initvals
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:46 +0000 (16:28 +0530)]
ath9k: Update high power gain table for AR9300
Now that the Buffalo-specific initvals have been
moved to a separate array, update the default high
power TX gain table for all AR9300 v2.2 devices.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:45 +0000 (16:28 +0530)]
ath9k: Use a separate TX gain table for WZR-HP-G450H
The Buffalo device WZR-HP-G450H uses the index 3 for TX gain,
which is set to the high_power table currently. Later variants
of the router use the same index, but instead refer to the
low_ob_db gain table. This is not handled in the driver since
there is no way to distinguish board revisions and the high_power
table is used (incorrectly) for the newer variants.
By default, devices based on AR9300 using the TX gain index 3 have
to use the high_power table. To make sure that WZR-HP-G450H is not
broken when the high_power table is updated, use a separate array
based on information obtained from the platform data.
The current situation where only the original variant of WZR-HP-G450H
works properly stays unchanged.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:44 +0000 (16:28 +0530)]
ath9k: Update AR9331 v1.2 initvals
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:43 +0000 (16:28 +0530)]
ath9k: Update AR9331 v1.1 initvals
* Update radio/baseband/gain tables.
* Mark ar9331_modes_high_power_tx_gain_1p1 as a duplicate
* ar9331_1p1_mac_postamble is not a duplicate.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:42 +0000 (16:28 +0530)]
ath9k: Remove AR955x INI duplicates
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:41 +0000 (16:28 +0530)]
ath9k: Update mac_postamble for AR9003 family
Enable the ALWAYS_KEYSEARCH bit in the initvals. Currently
this is done in the driver, but adding this to the initvals
makes it easier to be in sync with the INI files given
by the systems engineering team.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:40 +0000 (16:28 +0530)]
ath9k: Initialize baseband for DFS channels
Certain baseband registers require different values
to be programmed when operating in a DFS channel to
ensure that radar detection works correctly. This
is required for AR9300, AR9340 and AR9580.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 6 Dec 2013 10:58:39 +0000 (16:28 +0530)]
ath9k: Add initval arrays for DFS channels
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 6 Dec 2013 04:07:12 +0000 (22:07 -0600)]
rtlwifi: rtl8192c-common: Fix sparse warning
Sparse reports the following:
CHECK drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:570:34: warning: dubious: !x & y
There should be a parens around the expression.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chun-Yeow Yeoh [Fri, 6 Dec 2013 03:28:02 +0000 (11:28 +0800)]
wcn36xx: enable the beaconing in mesh mode
Enable the beaconing in wnc36xx by tweaking the tim offset and
force the use of AP-style beaconing. Otherwise, beaconing is not
working. The tim offset is set to 256. Otherwise, this will
overwrite mesh beacon submitted by mac80211.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chun-Yeow Yeoh [Wed, 4 Dec 2013 10:46:54 +0000 (18:46 +0800)]
ath9k: enable dfs for mesh mode
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ujjal Roy [Tue, 3 Dec 2013 07:17:59 +0000 (23:17 -0800)]
mwifiex: do not flood kmsg/dmesg with USB debug messages
When TX data URB reaches high water mark the message
"data: -ENOSR is returned" is printed.
This is not an error case, so change it to debug print.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Tue, 3 Dec 2013 07:17:57 +0000 (23:17 -0800)]
mwifiex: remove redundant goto exit_remove statement
The check for 'priv' pointer is redundant. 'priv' won't
be used later in this routine.
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>
Ujjal Roy [Tue, 3 Dec 2013 07:17:56 +0000 (23:17 -0800)]
mwifiex: update statistics for bridged packets on AP interface
The bridged packets are updated to statistics on both TX and RX
paths. Also fix a typo in the comment.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ujjal Roy [Tue, 3 Dec 2013 07:17:55 +0000 (23:17 -0800)]
mwifiex: correct TX byte count statistics
The skb is modified in sending the TX packet. Save the original
packet length to a variable so that we can get the correct
statistics update.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ujjal Roy [Tue, 3 Dec 2013 07:17:54 +0000 (23:17 -0800)]
mwifiex: correct RX byte count statistics
The skb is modified in processing the RX packet. Save the original
packet length to a variable so that we can get the correct
statistics update.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ujjal Roy [Tue, 3 Dec 2013 07:17:53 +0000 (23:17 -0800)]
mwifiex: fix rx_pending count imbalance
RX packets are handled in different paths. Not all paths have
decrement of rx_pending counter. This patch fixes the counter
imbalance.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Tue, 3 Dec 2013 07:17:52 +0000 (23:17 -0800)]
mwifiex: avoid using variable name eth_hdr
eth_hdr is defined in kernel. Use a different variable name in
our functions.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Tue, 3 Dec 2013 07:17:51 +0000 (23:17 -0800)]
mwifiex: fix an issue with Appletalk devices
SNAP/LLC header in the AARP packet is being stripped off while
preparing an EthernetII header.
Annex M, Table M.3 in 802.11 spec says that some header
(ex. AppleTalk AARP(2)) should pass through untouched.
This patch modifies the check to exclude/include EthernetII
header translation for special cases.
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>
Amitkumar Karwar [Tue, 3 Dec 2013 07:17:50 +0000 (23:17 -0800)]
mwifiex: remove rfc1042_eth_hdr variable
Use 'rfc1042_header' available in net/wireless/util.c
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>
Amitkumar Karwar [Tue, 3 Dec 2013 07:17:49 +0000 (23:17 -0800)]
mwifiex: declare snap_type as __be16 variable
Actually we are updating snap_type with h_proto (__be16 variable)
in ethernet frame header. Hence endianness conversion is not
required.
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>
Ujjal Roy [Tue, 3 Dec 2013 07:17:48 +0000 (23:17 -0800)]
mwifiex: use little-endian variables in firmware structures
The firmware expects the command structure members in little
endianness.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jingoo Han [Mon, 2 Dec 2013 23:00:27 +0000 (08:00 +0900)]
bcma: pci: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 9 Dec 2013 20:31:57 +0000 (15:31 -0500)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next
John W. Linville [Mon, 9 Dec 2013 20:30:27 +0000 (15:30 -0500)]
Merge tag 'for-linville-
20131203' of git://github.com/kvalo/ath
Conflicts:
drivers/net/wireless/ath/ath10k/htc.c
drivers/net/wireless/ath/ath10k/mac.c
Emmanuel Grumbach [Tue, 3 Dec 2013 09:50:30 +0000 (11:50 +0200)]
iwlwifi: mvm: rs: fix compilation without CONFIG_MAC80211_DEBUGFS
This fixes compilation issues with CONFIG_MAC80211_DEBUGFS
not enabled.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Thu, 28 Nov 2013 12:58:20 +0000 (14:58 +0200)]
iwlwifi: mvm: BT Coex - enable Sync to SCO
Sync to SCO is a feature that allows to synchronise the
wifi activity with the predictable BT activity in
SCO profile. This allows to reduce the collisions and
improve overall quality.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Sun, 24 Nov 2013 19:30:13 +0000 (21:30 +0200)]
iwlwifi: mvm: rs: overhaul search cycle state machine
Rewrite the search cycle state machine to use a more data
oriented approach where the different Tx columns (configs)
limitations and next columns to search are reprsented in
tables which are easy to change. This overhaul also includes
several major fixes:
1. Prevent going back to a specific Tx column in a search
cycle if it was already explored.
2. Avoid switching to a Tx column that doesn't have any chance
if it performs perfectly to beat the current throughput we're
getting.
These issues were degrading throughput as they were causing
switching to "bad" Tx columns.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Thu, 28 Nov 2013 10:35:42 +0000 (12:35 +0200)]
iwlwifi: mvm: rs: use the proper channel width define for legacy rate
Use the 20Mhz channel width define instead of just the number
zero for legacy rates. Note that the define has the same value
so this is just a minor cleanup.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Thu, 28 Nov 2013 10:27:03 +0000 (12:27 +0200)]
iwlwifi: mvm: rs: fix mapping from HT/VHT rates to legacy
The table rs_ht_to_legacy is used to get the next legacy rate
following the last HT or VHT rate in the LQ rates table.
The mapping wasn't correct as well as didn't include entries
for MCS8/9 which led to out of bounds access. This didn't
trigger a crash but led to legacy rate entries using 1Mbps
rate.
In 5Ghz this probably caused the Tx to fail completely given
that Tx attempt would have reached the legacy entries and 1Mbps
isn't valid.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Thu, 28 Nov 2013 00:25:24 +0000 (02:25 +0200)]
iwlwifi: mvm: rs: set dual_stream_ant_msk to ANT_AB always
Drop code which was relevant when there were chips with
3 antennas. Setting to ANT_AB should be ok with all mvm
supported chips.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Fri, 22 Nov 2013 23:30:44 +0000 (01:30 +0200)]
iwlwifi: mvm: rs: remove unused parameter to rs_get_supported_rates
No use of the ieee80211 header. Drop it.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Fri, 22 Nov 2013 23:06:36 +0000 (01:06 +0200)]
iwlwifi: mvm: rs: refactor to use rs_rate
Introduce rs_rate which represents a rate. Use this structure
instead of iwl_scale_tbl_info where we're dealing with a single
rate.
This avoids allocating the big iwl_scale_tbl_info structure
on the stack in several cases like converting to ucode rate
format or from ucode rate format.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Fri, 22 Nov 2013 12:27:20 +0000 (14:27 +0200)]
iwlwifi: mvm: rs: remove unused timestamp field
Remove this as it's unused.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Fri, 22 Nov 2013 07:41:38 +0000 (09:41 +0200)]
iwlwifi: mvm: rs: increase stay in column timeout
Remain in the same Tx modulation (i.e. column) for a longer
time before starting a search cycle for a better modulation.
This has been shown to give better results.
Also change the name of the timeout define to better match its
description.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Wed, 20 Nov 2013 23:18:47 +0000 (01:18 +0200)]
iwlwifi: mvm: rs: rename thresholds defines
Rename for clearer names.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Wed, 20 Nov 2013 23:12:11 +0000 (01:12 +0200)]
iwlwifi: mvm: rs: update expected TPT tables if aggregation changed
Expected TPT table was updated only when switching to a new
modulation. This is wrong as toggling aggregation changes
the expected TPT signficantly.
This leads to scenarios where turning aggregation on after
being in MIMO sends us back to SISO despite a perfect success
ratio.
This occurred because the TPT of the SISO mode was being
estimated based on aggregation while the MIMO one wasn't.
Also remove an error print which isn't an error anymore
since we might be updating the expected TPT table due
to aggregation changes.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Wed, 20 Nov 2013 00:08:12 +0000 (02:08 +0200)]
iwlwifi: mvm: rs: reduce min failures to end test window
This terminates a test window of a new rate quicker in case
we've hit a bad rate and should recover better.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Tue, 19 Nov 2013 23:45:38 +0000 (01:45 +0200)]
iwlwifi: mvm: rs: improve debug prints
Enable better tracking of different decisions made
by the rate scale algorithm.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Sat, 9 Nov 2013 21:31:38 +0000 (23:31 +0200)]
iwlwifi: mvm: don't configure mimo rates if nss is limited to 1
Remote peer can publish a different number of supported nss via the
operating mode notification IE or action frame. If it limits to 1
then we don't want mimo rates configured in the rate table.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Sat, 9 Nov 2013 21:25:06 +0000 (23:25 +0200)]
iwlwifi: mvm: don't enable VHT MCS9 in 20Mhz
MCS9 in NSS=1 or NSS=2 isn't valid for 20Mhz so don't enable
it in case we're dealing with a 20Mhz sta. Trying to configure an
MCS9 rate with 20Mhz in the LQ rate table would lead to a FW assert.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Wed, 13 Nov 2013 14:46:19 +0000 (16:46 +0200)]
iwlwifi: mvm: stop using MIMO in case BT doesn't allow it
Switch to using the new btcoex decision api regarding MIMO and stop
accessing the internal btcoex structs.
In case MIMO should be disabled it would detect this upon the next
Tx and force a search. The search will switch to SISO on a antenna A
which isn't used by BT.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Tue, 19 Nov 2013 19:36:25 +0000 (20:36 +0100)]
iwlwifi: mvm: quota command max_duration should be zero
For now, the firmware doesn't really use the field, but
it should be set to zero if there's no specific request.
Setting it to the max quota doesn't make sense.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Haim Dreyfuss [Sun, 3 Nov 2013 21:02:59 +0000 (23:02 +0200)]
iwlwifi: mvm: Implement low-priority scan
Advertise driver's support for low priority scan.
Notice that this overwrites current setting by mac80211 which depends
only on hw scan support.
This scan priority can be configured by user space application
and it affects scan continuity, low priority scan
will be more fragmented scan.
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Sun, 10 Nov 2013 10:59:46 +0000 (12:59 +0200)]
iwlwifi: mvm: fix scan offloading flag definition
Bit 0 in the scan offloading flags asks the filter
to pass all the results (instead of filtering them,
by default), rather than the other way around (like
it is defined and used today).
Fix the flag name appropriately, and fix its user.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Mon, 18 Nov 2013 15:00:03 +0000 (17:00 +0200)]
iwlwifi: mvm: dump NVM from debugfs
This allows to see the content of the NVM the driver reads.
Note that the output is in binary, and requires some
external user space tool to display the data properly.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Luciano Coelho [Tue, 19 Nov 2013 20:53:41 +0000 (22:53 +0200)]
iwlwifi: mvm: don't restart HW if suspending fails before D3 image is loaded
If we haven't loaded the D3 image yet and a failure in the suspend
process occurs, we shouldn't restart the HW, because we're still
running the D0 image.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Thu, 14 Nov 2013 17:20:04 +0000 (18:20 +0100)]
iwlwifi: mvm: add iwl_mvm_sta_from_mac80211
This is just a helper function to go from the mac80211
station struct to our internal one, to later allow us
to avoid temporary 'mvmsta' variables.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Thu, 7 Nov 2013 17:38:04 +0000 (19:38 +0200)]
iwlwifi: fix check for a single rx antenna
valid_rx_ant is a bitmask of available antennas and not the number
of Rx antennas. Use num_of_ant and remove duplicate definitions
in both dvm and mvm.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Michal Nazarewicz [Sun, 10 Nov 2013 19:06:37 +0000 (20:06 +0100)]
iwlwifi: pcie: remove minor dead code
inta is checked to be zero in a IRQ_NONE branch so afterwards it
cannot be zero as it is never modified.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
[reword the patch title and fix comment]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 23 Oct 2013 12:44:25 +0000 (15:44 +0300)]
iwlwifi: mvm: a few more SKUs for 7260 and 3160
These devices are not sold as discrete modules but are
rather soldered down to the board.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 13 Nov 2013 20:00:30 +0000 (22:00 +0200)]
iwlwifi: mvm: BT Coex - fine tune the aggregation size
Latest tests have shown that when BT is active and has
connections but the traffic is low, the WiFi aggregation can
be large up to 4000us without noticeable impact on BT.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Mon, 11 Nov 2013 17:56:21 +0000 (19:56 +0200)]
iwlwifi: mvm: add LQ flags definitions
Add more bit field definitions used in LQ flags.
Also rename the first bit to a shorter name.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Wed, 13 Nov 2013 08:10:21 +0000 (09:10 +0100)]
iwlwifi: mvm: refactor debugfs copy_from_user()
Abstract the copy_from_user() pattern into the macros defining
debugfs files, reducing the code and making adding new files
safer by avoiding having deal with copy_from_user() directly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Tue, 12 Nov 2013 16:16:38 +0000 (17:16 +0100)]
iwlwifi: mvm: don't use void pointers in debugfs
There's really no reason to use void *dbgfs_data
rather than a struct iwl_mvm *mvm, so do that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Tue, 12 Nov 2013 15:58:41 +0000 (16:58 +0100)]
iwlwifi: mvm: move interface-specific debugfs to a new file
The debugfs file is getting pretty large and mixed up between
code for the hardware and code for each interface (the two
aren't even clearly separated in the code). Make it easier to
handle by splitting the per-interface code into a separate
file called debugfs-vif.c.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Tue, 12 Nov 2013 15:48:03 +0000 (16:48 +0100)]
iwlwifi: mvm: small debugfs cleanups
Just clean up the code a bit, in particular
* make all the debugfs writes follow the same pattern
with respect to buf/buf_size variables
* get rid of useless comments
* check return values of all file creations
* drop unnecessary parentheses
* remove an unused struct definition
* fix some whitespace
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Avri Altman [Tue, 12 Nov 2013 17:16:03 +0000 (19:16 +0200)]
iwlwifi: mvm: fix ht protection flags
The HT protection flags have been a mess for a long time,
this patch fixes all this.
The proper source of information for this is the
protection in the HT operation mode IE which is
propagated to bss_conf by mac80211.
1) No need to set the HT protection flags when the link
doesn't support HT.
2) We need to set the TGG protection when ERP is active.
Signed-off-by: Avri Altman <avri.altman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Thu, 7 Nov 2013 12:13:30 +0000 (14:13 +0200)]
iwlwifi: mvm: allow keeping connections in d3_test
Keeping connection can be useful also when testing d3
using the debugfs file (d3_test).
Save the vif to keep connection on, and consider it
when iterating over the interfaces.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Sat, 9 Nov 2013 21:37:55 +0000 (23:37 +0200)]
iwlwifi: mvm: implement rate_update hook in rs
Re-initialize rs when we get a rate_update hook called which
happens when remote STA changes bandwidth or sends a VHT opmode
notification.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Thu, 7 Nov 2013 12:12:09 +0000 (14:12 +0200)]
iwlwifi: mvm: disconnect on disconnection wakeup event
When waking up from d3 due to disconnection event
(e.g. because of beacon loss), we should disconnect
immediately.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Thu, 7 Nov 2013 11:23:21 +0000 (13:23 +0200)]
iwlwifi: mvm: enable d3_test even if d3_test_pme_ptr is not available
Even if d3_test_pme_ptr is not available, d3_test can still
be useful, e.g. by manually triggering resume (with ctrl-c),
and reading the wakeup reasons.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Sat, 9 Nov 2013 20:48:56 +0000 (22:48 +0200)]
iwlwifi: mvm: refactor iwl_mvm_rs_rate_init
Refactor setting of VHT enabled rates in preparation of adding
some more logic there.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Fri, 8 Nov 2013 22:16:16 +0000 (00:16 +0200)]
iwlwifi: mvm: simplify iwl_mvm_send_lq_cmd
Remove the flags parameter which should be set to sync or async
according to whether this is called during sta init or not.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Sat, 9 Nov 2013 00:11:46 +0000 (02:11 +0200)]
iwlwifi: mvm: fix and improve printing of rate scale table
Info about VHT/HT rates wasn't printed properly when dumping
the rate scale table. Fix that and print more info. While at it
fix some other minor issues in the printing and prevent
overflowing the print buffer.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Thu, 31 Oct 2013 17:30:38 +0000 (18:30 +0100)]
iwlwifi: pcie: remove useless condition test
After wait_event_timeout(), the condition must still be
true if it returns >0, in fact almost the last thing in
it is checking the condition again. It's therefore not
useful to check yet again in our code, clean it up.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Alexander Bondar [Thu, 17 Oct 2013 12:26:50 +0000 (14:26 +0200)]
iwlwifi: mvm: Add debugfs entry to generate NMI to NIC
Writting to fw_nmi entry will set DEVICE_SET_NMI_REG (0x00a01c30)
generating NMI that halts NIC CPU.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Tue, 22 Oct 2013 08:27:55 +0000 (11:27 +0300)]
iwlwifi: remove TX_CMD id from transport layer
The transport layer doesn't need to know the TX_CMD id.
It can be set by the op_mode.
The transport layer still needs to know the layout of the
Tx command because of alignment issues and because of the
scratch pointer.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Marcel Holtmann [Sun, 8 Dec 2013 19:55:33 +0000 (11:55 -0800)]
Bluetooth: Use macros for connectionless slave broadcast features
Add the LMP feature constants for connectionless slave broadcast
and use them for capability testing.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Marcel Holtmann [Sat, 7 Dec 2013 17:06:24 +0000 (09:06 -0800)]
Bluetooth: Increase minor version of core module
With the addition of L2CAP Connection Oriented Channels for Bluetooth
Low Energy connections, it makes sense to increase the minor version
of the Bluetooth core module.
The module version is not used anywhere, but it gives a nice extra
hint for debugging purposes.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
John W. Linville [Fri, 6 Dec 2013 14:50:45 +0000 (09:50 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/brcm80211/Kconfig
net/mac80211/util.c
Johan Hedberg [Fri, 6 Dec 2013 05:08:53 +0000 (07:08 +0200)]
Bluetooth: Fix valid LE PSM check
The range of valid LE PSMs is 0x0001-0x00ff so the check should be for
"less than or equal to" instead of "less than".
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johan Hedberg [Fri, 6 Dec 2013 05:08:52 +0000 (07:08 +0200)]
Bluetooth: Use min_t for calculating chan->mps
Since there's a nice convenient helper for calculating the minimum of
two values, let's use that one.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>