cascardo/linux.git
9 years agoMerge branch 'iwlwifi-fixes' into iwlwifi-next
Emmanuel Grumbach [Tue, 22 Jul 2014 16:26:41 +0000 (19:26 +0300)]
Merge branch 'iwlwifi-fixes' into iwlwifi-next

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Conflicts:
drivers/net/wireless/iwlwifi/mvm/mac80211.c

9 years agoiwlwifi: mvm: reset beacon filtering and BT Coex data upon FW restart
Emmanuel Grumbach [Sun, 13 Jul 2014 06:12:11 +0000 (09:12 +0300)]
iwlwifi: mvm: reset beacon filtering and BT Coex data upon FW restart

When the firmware asserts, we restart the device and reset
the relevant data we hold in the driver. BT Coex data was
not reset and because of that, the driver wouldn't
reconfigure the firmware properly after firmware restart.
Same for beacon filtering. Fix that.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: update smart fifo / beacon filtering upon association
Eran Harary [Tue, 15 Jul 2014 11:04:23 +0000 (14:04 +0300)]
iwlwifi: mvm: update smart fifo / beacon filtering upon association

When we associate, we may have heard the beacon before the
association. In that case, BSS_CHANGED_BEACON_INFO will be
set along with BSS_CHANGED_ASSOC in changes in
bss_info_change.

In this case, we didn't update the smart fifo nor beacon
filtering leaving those two feature disabled.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: dump CSRs to fw-error-dump
Emmanuel Grumbach [Tue, 8 Jul 2014 16:44:25 +0000 (19:44 +0300)]
iwlwifi: dump CSRs to fw-error-dump

Add the Control Status Registers to the firmware error dump
infrastructure.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: dump periphery registers to fw-error-dump
Emmanuel Grumbach [Thu, 26 Jun 2014 08:27:51 +0000 (11:27 +0300)]
iwlwifi: dump periphery registers to fw-error-dump

Use the fw-error-dump infrastructure to dump the periphery
registers. Only certain ranges are readable, so dump only
these.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: split fw-error-dump between transport and mvm
Emmanuel Grumbach [Tue, 8 Jul 2014 16:45:17 +0000 (19:45 +0300)]
iwlwifi: split fw-error-dump between transport and mvm

The mvm op_mode won't allocate the buffer for the transport
any more. The transport allocates its own buffer and mvm
is in charge of splicing the buffers in the debugfs hook.

This makes the repartition easier to handle.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: fix inconsistency about power_save module parameter
Emmanuel Grumbach [Mon, 21 Jul 2014 08:44:12 +0000 (11:44 +0300)]
iwlwifi: fix inconsistency about power_save module parameter

modinfo and kerneldoc disagreed on the meaning of this field.

Reported-by: Andrea Oliveri <oliveriandrea@gmail.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: minor change in debug print
Eran Harary [Tue, 1 Jul 2014 14:33:29 +0000 (17:33 +0300)]
iwlwifi: mvm: minor change in debug print

Add OTP to the string: "can't parse empty OTP/NVM section"
NVM usually refers to nvm_file while the problem can be in
the OTP.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: wait for handlers when stopping scans
Eliad Peller [Sun, 22 Jun 2014 15:15:59 +0000 (18:15 +0300)]
iwlwifi: mvm: wait for handlers when stopping scans

The recent unified scan api change introduced issues
when stopping ongoing scans, since both regular and
sched scan now use same stopped notification.

When issuing a new scan right after a running one,
we get the "old" notification and handle it wrongly
as notification for the current scan.

Fix it by introducing a new function that make sure
we consume the pending notifications before issuing
a new scan.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: ArikX Nemtsov <arik@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - don't change AP SMPS mode
Emmanuel Grumbach [Mon, 7 Jul 2014 11:38:39 +0000 (14:38 +0300)]
iwlwifi: mvm: BT Coex - don't change AP SMPS mode

Leave it to default instead - regardless of the BT activity.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - fix the ACK / CTS kill mask
Emmanuel Grumbach [Sun, 6 Jul 2014 06:34:38 +0000 (09:34 +0300)]
iwlwifi: mvm: BT Coex - fix the ACK / CTS kill mask

According to new requirements, the ACK / CTS kill mask is
not related to reduced TX power anymore. This allows to
remove the code that tracked reduced TX power enablement
across different interfaces.
The ACK / CTS kill mask is now fetch from a table. It
depends on the Activity grading (activity from BT) and on
the Look Up Table (LUT) type.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add Aux ROC request/response flow
Ariej Marjieh [Wed, 16 Jul 2014 18:11:12 +0000 (21:11 +0300)]
iwlwifi: mvm: add Aux ROC request/response flow

The Remain On Channel framework added to the firmare is
a bit like time events. It allows the driver to request
the firmware to be on a certain channel for a certain time.
Unlike the time events, the ROC infrastructure doesn't need
a MAC context in the firmware - it uses a generic context
called "auxiliary framework".

This is useful for any offchannel activity that is not bound
to a specific MAC.
The flow is synchronized much like with time events:
1) The driver receives an action frame from the wpa_supplicant
   via nl80211 that requests to be sent offchannel.
2) The driver sends an Aux ROC command (0x53) to the firmware.
3) The firmware responds with the unique id of the time event.
4) When time event starts, the driver puts the frame in the
   Aux queue.

Special care needs to be taken when the time events ends:
the queue needs to be cleaned-up.

Signed-off-by: Ariej Marjieh <ariej.marjieh@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Define AUX ROC Command
Ariej Marjieh [Mon, 7 Jul 2014 06:04:58 +0000 (09:04 +0300)]
iwlwifi: mvm: Define AUX ROC Command

Add new AUX ROC command that is intended for HS2.0 purposes.
It is used to send ANQP requests on a specific channel.

This command requests the firmware to trigger a time event
and remain on a certain channel for a given duration.
Triggering the time event is done by using the Aux
Framework in the firmware, and makes use of the Aux station
(similarly to scan).

Signed-off-by: Ariej Marjieh <ariej.marjieh@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Enabling Aux Queue
Ariej Marjieh [Mon, 7 Jul 2014 09:09:40 +0000 (12:09 +0300)]
iwlwifi: mvm: Enabling Aux Queue

Enabling the Aux queue and mapping it to FIFO 5.
Defining the Aux queue for the Aux station.

Signed-off-by: Ariej Marjieh <ariej.marjieh@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add some missing iwl_mvm_ref_sync() calls
Eliad Peller [Tue, 1 Jul 2014 15:38:38 +0000 (18:38 +0300)]
iwlwifi: mvm: add some missing iwl_mvm_ref_sync() calls

Add iwl_mvm_ref_sync() calls (with new ref types) to
flows that might access the device directly.

These calls make sure the device is out of d0i3,
and the bus is available for direct access.

Since some of these functions are reentrant, convert
the refs_bitmap to a ref counter, so multiple refs
of the same type could be taken concurrently.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix wrong offset while reading from NVM
Eytan Lifshitz [Wed, 2 Jul 2014 17:52:02 +0000 (20:52 +0300)]
iwlwifi: mvm: fix wrong offset while reading from NVM

As part of thermal throttling, some data is being read from NVM.
The offset is in words, but was addressed as in octets. fixed.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: pass beacons from foreign APs
Eliad Peller [Wed, 16 Jul 2014 10:24:36 +0000 (13:24 +0300)]
iwlwifi: mvm: pass beacons from foreign APs

In AP mode, configure the fw to pass beacons from
foreign APs, in order to be able to set the ht
protection IE properly.

Add the same filters in case of GO (which didn't have
any configured filter_flags, probably by mistake)

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: use C99 initializers for add_sta
Emmanuel Grumbach [Sun, 13 Jul 2014 05:58:04 +0000 (08:58 +0300)]
iwlwifi: mvm: use C99 initializers for add_sta

Instead of code the fixed values, use a C99 initializer.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: fix Kconfig issues
Emmanuel Grumbach [Mon, 7 Jul 2014 06:25:42 +0000 (09:25 +0300)]
iwlwifi: fix Kconfig issues

Randy fixes a few issues in iwlwifi's Kconfig. Because of
this, 'Debugging options' was not indented under iwlwifi
using menuconfig.

I added a few other fixes on the way, like the link to the
website and added 7265 in the supported NICs.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
[ Commit message + other fixes ]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: add max RX aggregation size
Oren Givon [Mon, 16 Jun 2014 07:54:52 +0000 (10:54 +0300)]
iwlwifi: add max RX aggregation size

Allow to configure the maximal Rx AMPDU size per device.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - fix TLC with old API
Emmanuel Grumbach [Tue, 8 Jul 2014 05:44:31 +0000 (08:44 +0300)]
iwlwifi: mvm: BT Coex - fix TLC with old API

A copy paste issue broke the rate control when a firmware
with the old API is used.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: minor fix in comment
Emmanuel Grumbach [Thu, 5 Jun 2014 08:32:41 +0000 (11:32 +0300)]
iwlwifi: mvm: minor fix in comment

The comment was not accurate, we are talking about the frames
*for* the station and not from the station.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove 8000 HW family setting of adc sampling on nic config
Liad Kaufman [Thu, 8 May 2014 13:30:24 +0000 (16:30 +0300)]
iwlwifi: mvm: remove 8000 HW family setting of adc sampling on nic config

This patch removes the setting of the ADC sampling bits in
the mvm nic configuration. This setting is not required by
the firmware, and furthermore - it interferes with the DBGC
when it is running in DRAM mode on PCIe.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: teardown TDLS peers when initiating DCM
Arik Nemtsov [Tue, 10 Jun 2014 16:56:27 +0000 (19:56 +0300)]
iwlwifi: mvm: teardown TDLS peers when initiating DCM

The FW currently doesn't optimally support TDLS in DCM mode. Teardown
all TDLS peers when we have more than a single phy context.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: disable PSM on vifs with associated TDLS peers
Arik Nemtsov [Thu, 15 May 2014 15:59:32 +0000 (18:59 +0300)]
iwlwifi: disable PSM on vifs with associated TDLS peers

The FW does not support PSM on a vif with associated TDLS peers. Disable
PSM when the first peer joins and re-enable it when the last leaves.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: protect TDLS discovery session
Arik Nemtsov [Tue, 20 May 2014 15:16:42 +0000 (18:16 +0300)]
iwlwifi: mvm: protect TDLS discovery session

Use the new mac80211 callback to protect a TDLS discovery session so we
can hear the discovery-response packet.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-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: disallow new TDLS stations when appropriate
Arik Nemtsov [Thu, 15 May 2014 08:44:40 +0000 (11:44 +0300)]
iwlwifi: mvm: disallow new TDLS stations when appropriate

HW/FW constraints dictate that TDLS should only be used when a single
phy ctx is active. We also support at most 4 TDLS peers. We don't
support TDLS on a P2P vif.

Unify and move a phy-ctx counting implementation from the power-mgmt code
in order to simplify implementation.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Use CS tx block bit for AP/GO
Andrei Otcheretianski [Sun, 25 May 2014 14:24:22 +0000 (17:24 +0300)]
iwlwifi: mvm: Use CS tx block bit for AP/GO

An AP/GO may perform the channel switch slightly before its stations.
This scenario may result in packet loss, since the transmission may start
before the client is actually on a new channel. In order to prevent
potential packet loss disable tx to all the stations when the channel
switch flow starts. Clear the disable_tx bit when a station is seen on a
target channel, or after IWL_MVM_CS_UNBLOCK_TX_TIMEOUT beacons on a new
channel. In addition call ieee80211_sta_block_awake in order to inform
mac80211 that the frames for this station should be buffered.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Reflect GO channel switch in NoA
Andrei Otcheretianski [Sun, 4 May 2014 08:48:12 +0000 (11:48 +0300)]
iwlwifi: mvm: Reflect GO channel switch in NoA

According to the spec, GO/AP should perform the channel switch just
before "beacon 0". However, since the exact timing isn't defined,
it may result in a sudden GO disappearance from the channel.
Prevent potential packet loss when performing the CS by scheduling
NoA time event and executing the channel switch flow when a notification
from fw is received.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Protect mvm->csa_vif with RCU
Andrei Otcheretianski [Thu, 5 Jun 2014 13:40:36 +0000 (16:40 +0300)]
iwlwifi: mvm: Protect mvm->csa_vif with RCU

Currently mvm->csa_vif is protected with mvm mutex. The RCU protection
is required for "iwlwifi: mvm: Reflect GO channel switch in NoA" patch.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Use beacon_get_template instead of beacon_get
Andrei Otcheretianski [Thu, 10 Apr 2014 18:46:16 +0000 (21:46 +0300)]
iwlwifi: mvm: Use beacon_get_template instead of beacon_get

Call ieee80211_beacon_get_template instead of ieee80211_beacon_get and sync the
CSA counters with mac80211 after each beacon transmission.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.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>
9 years agoiwlwifi: mvm: CSA unbind-bind flow support for client
Luciano Coelho [Wed, 5 Mar 2014 13:41:48 +0000 (15:41 +0200)]
iwlwifi: mvm: CSA unbind-bind flow support for client

Implement support for unbind-bind flow for the client roles.  This
includes telling the firmware that we are not associated, removing
time-events, removing quotas and updating power management during the
actual switch, and redoing everything in the new channel.

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>
9 years agoiwlwifi: mvm: add switch_vif_chanctx operation
Luciano Coelho [Tue, 20 May 2014 20:31:05 +0000 (23:31 +0300)]
iwlwifi: mvm: add switch_vif_chanctx operation

Implement the switch_vif_chanctx operation with support for a
single-vif and SWAP mode.  The REASSIGN mode and multi-vifs are not
supported yet.

This operation needs to implement 4 steps, namely unassign, remove,
add and assign the chanctx.  In order to do this, split out these
operations into locked and non-locked parts, thus allowing us to call
them while locked.

Additionally, in order to allow us to restart the hardware when
something fails, add a boolean to the iwl_mvm_nic_restart() function
that tells whether the restart was triggered by a FW error or
something else.

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>
9 years agoiwlwifi: mvm: remove update type argument from quota update
Johannes Berg [Fri, 6 Jun 2014 13:18:45 +0000 (15:18 +0200)]
iwlwifi: mvm: remove update type argument from quota update

It turns out that adding the update type argument was pointless as
quota update is never called from the add_interface() callback.
Therefore, IWL_MVM_QUOTA_UPDATE_TYPE_NEW isn't actually needed and
then only a "disabled_vif" argument is needed for the upcoming CSA
work.

Remove the whole enum iwl_mvm_quota_update_type and pass the right
arguments (always NULL for disabled vif right now) to the function
in all current call sites.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't pass update type to quota iterator
Johannes Berg [Fri, 23 May 2014 14:17:13 +0000 (16:17 +0200)]
iwlwifi: mvm: don't pass update type to quota iterator

Simplify the quota iterator by not passing the update type,
it only needs to know whether or not to skip an interface.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: validate that we don't send zero quota
Johannes Berg [Fri, 23 May 2014 14:13:57 +0000 (16:13 +0200)]
iwlwifi: mvm: validate that we don't send zero quota

The firmware currently deals with zero quota for a given
binding, but it seems odd to send that down. Make sure
that we don't do that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't send zero quota to the firmware
Johannes Berg [Fri, 23 May 2014 14:15:11 +0000 (16:15 +0200)]
iwlwifi: mvm: don't send zero quota to the firmware

There are some cases where we can currently send zero quota
for a valid binding, e.g. if we update while an interface is
bound to a channel context but not yet acting as an AP.

Avoid this by reordering the checks.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: let iwl_mvm_update_quotas disregard a disabled vif
Luciano Coelho [Tue, 13 May 2014 19:28:35 +0000 (22:28 +0300)]
iwlwifi: mvm: let iwl_mvm_update_quotas disregard a disabled vif

In some cases (e.g. when we're doing a channel switch), we may need to
disable the quota of a vif temporarily.  In order to do so, add an
argument to the iwl_mvm_update_quotas() function to tell if the passed
vif is a new one or if it should be disregarded.

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>
9 years agoiwlwifi: 8000: drop a print when the address is invalid
Eran Harary [Sun, 29 Jun 2014 08:53:06 +0000 (11:53 +0300)]
iwlwifi: 8000: drop a print when the address is invalid

when driver takes the MAC address from the HW section and
it isn't valid - print an error.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix endianity in scan command
David Spinadel [Wed, 25 Jun 2014 10:17:53 +0000 (13:17 +0300)]
iwlwifi: mvm: fix endianity in scan command

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: init lmac scan command
David Spinadel [Thu, 12 Jun 2014 16:29:40 +0000 (19:29 +0300)]
iwlwifi: mvm: init lmac scan command

Initialize LMAC scan command.
Fix EBS flag to be dependant on TLV flg and fix other bugs.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add unified LMAC scan API
David Spinadel [Sun, 4 May 2014 09:51:10 +0000 (12:51 +0300)]
iwlwifi: mvm: add unified LMAC scan API

Add new scan API that uses the same command 0x51 for both regular and
sched scan.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: don't save debugfs files
Eliad Peller [Sun, 15 Jun 2014 09:02:20 +0000 (12:02 +0300)]
iwlwifi: mvm: rs: don't save debugfs files

These file are removed recursively anyway, so there's no
point saving them just to redundantly remove them later.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: don't clear persistent fields
Eliad Peller [Wed, 11 Jun 2014 12:51:33 +0000 (15:51 +0300)]
iwlwifi: mvm: rs: don't clear persistent fields

iwl_mvm_rs_rate_init() is called multiple times to re-init
the rate scaling statistics (e.g. after some idle time).

It clears all the lq_sta sta, including some fields that
shouldn't be cleared (e.g. debugfs pointers). Fix it
by adding a new 'persistent' sub-struct, and
avoid clearing it on (re-)init.

Move the initialization of the persistent fields to
rs_alloc_sta instead.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: warn about empty OTP
Eran Harary [Tue, 1 Jul 2014 14:31:38 +0000 (17:31 +0300)]
iwlwifi: mvm: warn about empty OTP

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - relax constraints when TTC / RRC is active
Emmanuel Grumbach [Mon, 30 Jun 2014 07:26:02 +0000 (10:26 +0300)]
iwlwifi: mvm: BT Coex - relax constraints when TTC / RRC is active

When TxTxCo-Running is active, we can relax the constraints
on the rate control.
When RxRxCo-Running is active, we can relax the constrains
on SMPS.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - fix debugfs with old API
Emmanuel Grumbach [Wed, 2 Jul 2014 14:33:52 +0000 (17:33 +0300)]
iwlwifi: mvm: BT Coex - fix debugfs with old API

Fix the debugfs hook to make it able to display the data
with the old firmware API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - add High Band retention
Emmanuel Grumbach [Wed, 11 Jun 2014 12:37:25 +0000 (15:37 +0300)]
iwlwifi: mvm: BT Coex - add High Band retention

Tell the firmware if TTC should be enabled when switching
to High Band.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - convert reduced Tx power to new API
Emmanuel Grumbach [Thu, 22 May 2014 09:48:27 +0000 (12:48 +0300)]
iwlwifi: mvm: BT Coex - convert reduced Tx power to new API

No need to send the big BT_COEX_CMD command, we have now
a much thiner command that updates only what is needed.
Adapt the code to that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - convert the co-running update to new API
Emmanuel Grumbach [Wed, 2 Apr 2014 09:23:09 +0000 (12:23 +0300)]
iwlwifi: mvm: BT Coex - convert the co-running update to new API

No need to send the big BT_COEX_CMD command, we have now
a much thiner command that updates only what is needed.
Adapt the code to that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - convert the sw boost update to new API
Emmanuel Grumbach [Wed, 2 Apr 2014 09:23:09 +0000 (12:23 +0300)]
iwlwifi: mvm: BT Coex - convert the sw boost update to new API

No need to send the big BT_COEX_CMD command, we have now
a much thiner command that updates only what is needed.
Adapt the code to that, and open the patch to the updates.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - new API
Emmanuel Grumbach [Wed, 2 Apr 2014 06:55:16 +0000 (09:55 +0300)]
iwlwifi: mvm: BT Coex - new API

Start the new BT Coex implementation.
Don't react to notifications for now - only the initial
configuration is implemented. The rest will happen in next
patches.
Since coex.c now uses the new the new structures in all
functions, we need to adapt the code to compile, even if it
doesn't run yet.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - prepare towards new API
Emmanuel Grumbach [Wed, 2 Apr 2014 06:31:36 +0000 (09:31 +0300)]
iwlwifi: mvm: BT Coex - prepare towards new API

A new API is coming. This new API is not backward
compatible. So we need to keep the old commands to be able
to work with the former API.
Move all the current code into a new file: coex_legacy.
If a firmware with the new API is detected, we currently
just bail out since the implementation of the new API will
come in future patches.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix merge damage
Emmanuel Grumbach [Sun, 6 Jul 2014 09:51:22 +0000 (12:51 +0300)]
iwlwifi: mvm: fix merge damage

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove unused flags from TX command
Emmanuel Grumbach [Wed, 2 Jul 2014 09:00:51 +0000 (12:00 +0300)]
iwlwifi: mvm: remove unused flags from TX command

These flags are not used by the firmware anyway.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: rename iwl_fw_error_fw_mon to iwl_fw_error_dump_fw_mon
Emmanuel Grumbach [Thu, 26 Jun 2014 06:54:23 +0000 (09:54 +0300)]
iwlwifi: rename iwl_fw_error_fw_mon to iwl_fw_error_dump_fw_mon

This is matches the convention of the other structures.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: read the mac address in family 8000
Eran Harary [Wed, 11 Jun 2014 08:37:09 +0000 (11:37 +0300)]
iwlwifi: mvm: read the mac address in family 8000

In family 8000 products the MAC address in the OTP could be in either:
- WFPM address
- PCIE address
In sdio product we should read it from the WFPM, in pcie product we
should read it from the PCIe location.
This is relevant only from otp version 0xE08 and above.
While at it, fix the bytes order in version 0xE08.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: wait for d0i3 exit in add interface flow
Gregory Greenman [Wed, 25 Jun 2014 12:08:50 +0000 (14:08 +0200)]
iwlwifi: mvm: wait for d0i3 exit in add interface flow

This patch makes sure there're no target accesses in the add
interface flow before d0i3 exit completes.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: update layout of firmware error dump
Emmanuel Grumbach [Wed, 25 Jun 2014 13:21:43 +0000 (16:21 +0300)]
iwlwifi: mvm: update layout of firmware error dump

The memory was not zeroed - fix that. Also update the
iwl_fw_error_dump_info structure.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: kill iwl_mvm_fw_error_rxf_dump
Emmanuel Grumbach [Wed, 25 Jun 2014 11:08:58 +0000 (14:08 +0300)]
iwlwifi: mvm: kill iwl_mvm_fw_error_rxf_dump

Its content can move to the caller.
While at it, move iwl_mvm_fw_error_rxf_dump to caller.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't collect logs in the interrupt thread
Emmanuel Grumbach [Wed, 25 Jun 2014 10:46:10 +0000 (13:46 +0300)]
iwlwifi: mvm: don't collect logs in the interrupt thread

Instead of reading all the data in the context of the
interrupt thread, collect the data in the restart flow
before the actual restart takes place so that the device
still has all the information.
Remove iwl_mvm_fw_error_sram_dump and move its content to
iwl_mvm_fw_error_dump.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: remove wrong comment about alignment in iwl-fw-error-dump.h
Emmanuel Grumbach [Tue, 24 Jun 2014 11:34:28 +0000 (14:34 +0300)]
iwlwifi: remove wrong comment about alignment in iwl-fw-error-dump.h

The chunks of data do not need to be multipliers of 4 nor
4-bytes aligned.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: fix naming mistake for the fw_monitor module parameter
Emmanuel Grumbach [Thu, 26 Jun 2014 06:13:26 +0000 (09:13 +0300)]
iwlwifi: fix naming mistake for the fw_monitor module parameter

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoMerge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Emmanuel Grumbach [Sun, 6 Jul 2014 08:15:30 +0000 (11:15 +0300)]
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next

9 years agoMerge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next
Emmanuel Grumbach [Sun, 6 Jul 2014 08:15:23 +0000 (11:15 +0300)]
Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next

9 years agoiwlwifi: mvm: disable CTS to Self
Emmanuel Grumbach [Thu, 3 Jul 2014 17:46:35 +0000 (20:46 +0300)]
iwlwifi: mvm: disable CTS to Self

Firmware folks seem say that this flag can make trouble.
Drop it. The advantage of CTS to self is that it slightly
reduces the cost of the protection, but make the protection
less reliable.

Cc: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: dvm: don't enable CTS to self
Emmanuel Grumbach [Wed, 25 Jun 2014 06:12:30 +0000 (09:12 +0300)]
iwlwifi: dvm: don't enable CTS to self

We should always prefer to use full RTS protection. Using
CTS to self gives a meaningless improvement, but this flow
is much harder for the firmware which is likely to have
issues with it.

CC: <stable@vger.kernel.org>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agob43: add more bcma cores
Rafał Miłecki [Tue, 1 Jul 2014 14:33:57 +0000 (16:33 +0200)]
b43: add more bcma cores

This adds some cores with 0x2057 radio which will be supported soon as
well as core 40 that I missed in the earlier firmware patch.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: N-PHY: complete generic support for 0x2057 radio
Rafał Miłecki [Tue, 1 Jul 2014 14:19:08 +0000 (16:19 +0200)]
b43: N-PHY: complete generic support for 0x2057 radio

It doesn't include any device (radio revision) specific code yet, so it
isn't really usable. As the commit says, it's just some generic code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: N-PHY: fixes for radio 0x2057
Rafał Miłecki [Tue, 1 Jul 2014 14:19:07 +0000 (16:19 +0200)]
b43: N-PHY: fixes for radio 0x2057

Enable initialization and update calibration code to fix:
b43-phy0 ERROR: Radio 0x2057 rcal timeout
b43-phy0 debug: Radio 0x2057 rccal timeout
b43-phy0 debug: Radio 0x2057 rccal timeout
b43-phy0 ERROR: Radio 0x2057 rcal timeout

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl818x_pci: fix pci probe returns success when it fails
Andrea Merello [Mon, 30 Jun 2014 16:19:40 +0000 (18:19 +0200)]
rtl818x_pci: fix pci probe returns success when it fails

There are several exit path from the PCI probe function.
Some of them, that are taken in case of errors, forget to set the "err"
variable, that is returned by the probe function.
This can lead to the kernel thinking the probe function succeeds while it
didn't, and this in turn causes extra calls to the "remove" function.

This patch fix this problem by ensuring "err" variable is assigned to a proper
non-zero value in each exit path.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl818x_pci: handle broken PIO mapping
Andrea Merello [Mon, 30 Jun 2014 16:19:27 +0000 (18:19 +0200)]
rtl818x_pci: handle broken PIO mapping

All boards supported by this driver could work using PIO or MMIO for accessing
registers.
This driver tries to access HW by using MMIO, and, if this fails for somewhat
reason, the driver tries to fall back to PIO mode.

MMIO-mode is straightforward on all boards.
PIO-mode is straightforward on rtl8180 only.

On rtl8185 and rtl8187se boards not all registers are directly available in PIO
mode (they are paged).

On rtl8185 there are two pages and it is known how to switch page.
PIO mode works, except for only one access to a register out of default page,
recently added by me in the initialization code with patch:
rtl818x_pci: Fix rtl8185 excessive IFS after CTS-to-self
This can be easily fixed to work in both cases (MMIO and PIO).

On rtl8187se, for a number of reasons, there is much more work to do to fix PIO
access.
PIO access is currently broken on rtl8187se, and it never worked.

This patch fixes the said register write for rtl8185 and makes the driver to
fail cleanly if PIO mode is attempted with rtl8187se boards.

While doing this, I converted also a couple of printk(KERN_ERR) to dev_err(), in
order to make checkpatch happy.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl8180: disable buggy rate fallback mechanism
Andrea Merello [Mon, 30 Jun 2014 16:19:10 +0000 (18:19 +0200)]
rtl8180: disable buggy rate fallback mechanism

Currently the driver configures mac80211 to provide two rates for each TX frame:
One initial rate and one alternate fallback rate, each one with its retry count.

HW does not support fully this: rtl8180 doesn't have support for rate scaling at
all, and rtl8185/rtl8187SE supports it in a way that does not fit with mac80211:
The HW does automatically fall back to the next lower rate, and only a lower
limit can be specified, so the HW may TX also on rates in between the two rates
specified by mac80211.  Furthermore only the total TX retry count can be
specified for each packet, while the number of TX attempts before scaling rate
can be configured only globally (not per each packet).

Currently the driver sets the HW auto rate fallback mechanism to quickly scale
rate after a couple of retries, and it uses the alternate rate requested by
mac80211 as fallback limit rate (and it does this even wrongly).

The HW indeed will behave differently than what mac80211 mandates, that is
probably undesirable, and the reported TX retry count may not refer to what
mac80211 thinks, and this could fool mac80211.

This patch makes the driver to declare to mac80211 to support only one rate
configuration for each packet, and it does disable the HW auto rate fallback
mechanism, relying only on SW and letting mac80211 to do all by itself.

This should ensure correct operation and fairness respect to mac80211.
Indeed here tests with iperf do not show significant performance differences.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl8180: fix incorrect TX retry.
Andrea Merello [Mon, 30 Jun 2014 16:18:55 +0000 (18:18 +0200)]
rtl8180: fix incorrect TX retry.

HW is programmed with wrong retry count value for TX:

Mac80211 passes to driver the number of times the TX should be attempted.
The HW, instead, wants the number of time the TX should be retried if it fails
the first time (assuming we have to TX it at least one time).

This patch correct this.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl818x_pci: add comment pointing to the rtl8187se reference code
Andrea Merello [Mon, 30 Jun 2014 16:18:36 +0000 (18:18 +0200)]
rtl818x_pci: add comment pointing to the rtl8187se reference code

Rtl8187se support has been added to the rtl818x_pci driver by extracting a lot
of information from a rtl8187se Linux staging driver included in the kernel at
the time rtl8187se support was added.
The rtl818x_pci main file has a comment that advertises this.

Recently this staging driver has been removed from the kernel, but I still feel
it can be useful as "reference" code (in case of bugs, or to implement
improvements in rtl818x_pci driver).

This one-line patch adds a comment in rtl818x_pci driver to point people
searching for that "reference code" to the last kernel version still containing
it (3.14).

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl818x_pci: Fix rtl8185 excessive IFS after CTS-to-self
Andrea Merello [Mon, 30 Jun 2014 16:18:25 +0000 (18:18 +0200)]
rtl818x_pci: Fix rtl8185 excessive IFS after CTS-to-self

Measuring time between _end_ of CTS-to-self and _end_ of datapacket (with a
prism54 board and mac80211 hacked to let the MAC timestamp stay untouched in the
radiotap header) resulted in about 300uS, while the datapacket itself should be
by far shorter (less than 100uS) and IFS should be SIFS (10uS).
This measure was confirmed whith a scope: about 250uS IFS has been seen between
the two packets.

This situation causes the CTS-to-self protection mechanism to work incorrectly
due to the NAV expiring during, or even before beginning, the packet
transmission, and it also causes the performances to be anyway reduced due to
time waste.

This problem has been seen at every packet TXed with CTS-to-self enabled on
rtl8185 board.
rtl8187se seems not affected (and rtl8180, being a 802.11b card, does not have
CTS-to-self mechaninsm).

This patch fixes this by adding a magic register write, making the board wait
for correct SIFS after CTS-to-self packet.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl818x_pci: Fix BSSID register written incorrectly
Andrea Merello [Mon, 30 Jun 2014 16:17:48 +0000 (18:17 +0200)]
rtl818x_pci: Fix BSSID register written incorrectly

BSSID register was written with six byte-writes.
It seems that, similarly to what happens with MAC registers, they needs to be
written with one 16-bit and one 32-bit writes, otherwise the write does not work.

The byte write didn't work only on my rtl8185, while it worked on rtl8180 and
rtl8187se, BTW since there are probably a number of different ASIC revisions out
of there, I let the change to affect all cards.
It shouldn't hurt anyway.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: treat LCNXN-PHY as extra N-PHY devices
Rafał Miłecki [Sun, 29 Jun 2014 19:46:45 +0000 (21:46 +0200)]
b43: treat LCNXN-PHY as extra N-PHY devices

LCNXN is simply a continuation of N, e.g. code handling LCNXN revs 0 and
1 is mostly the same as for N-PHY revs 7+.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agodrivers/net/wireless/ipw2x00/libipw_module.c: remove unnecessary null test before...
Fabian Frederick [Sat, 28 Jun 2014 12:18:52 +0000 (14:18 +0200)]
drivers/net/wireless/ipw2x00/libipw_module.c: remove unnecessary null test before kfree

Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agorsi: fix memory leaks and error handling in rsi_91x_usb
Alexey Khoroshilov [Thu, 26 Jun 2014 22:51:25 +0000 (02:51 +0400)]
rsi: fix memory leaks and error handling in rsi_91x_usb

The patch fixes a couple of issues:
- absence of deallocation of rsi_dev->rx_usb_urb[0] in the driver;
- potential NULL pointer dereference because of lack of checks for memory
  allocation success in rsi_init_usb_interface().

By the way, it makes rsi_probe() returning error code instead of 1
and fixes comments regarding returning values.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agorsi: GFP_ATOMIC is not needed in rsi_init_usb_interface()
Alexey Khoroshilov [Thu, 26 Jun 2014 22:51:24 +0000 (02:51 +0400)]
rsi: GFP_ATOMIC is not needed in rsi_init_usb_interface()

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Calculate sleep duration
Rajkumar Manoharan [Thu, 26 Jun 2014 11:24:42 +0000 (16:54 +0530)]
ath9k: Calculate sleep duration

Right now sleep duration is configured as beacon interval. It should be
the multiple of beacon interval by listen period which helps to
reduce station power consumption.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Increase max listen interval
Rajkumar Manoharan [Thu, 26 Jun 2014 11:24:41 +0000 (16:54 +0530)]
ath9k: Increase max listen interval

Earlier the listen interval is used to decide switching between
operating and off-channels during bgscan and to improve throughput,
the listen interval is reduced to 1. After optimiztion in scan
state machine, listen period is not used for decision making and
hence reverting it back to original value.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Cache beacon config after association
Rajkumar Manoharan [Thu, 26 Jun 2014 11:24:40 +0000 (16:54 +0530)]
ath9k: Cache beacon config after association

The beacon configurations are not cached properly after the station
associates with AP. Not handling BEACON_INFO, is failing to update
dtim period and also it is causing below warning message.

WARNING: CPU: 1 PID: 0 at drivers/net/wireless/ath/ath9k/recv.c:548
ath_rx_tasklet+0xc89/0xca0 [ath9k]()
 Call Trace:
  [<c14669c9>] dump_stack+0x48/0x69
  [<c104f1a2>] warn_slowpath_common+0x82/0xa0
  [<fd38c2f9>] ? ath_rx_tasklet+0xc89/0xca0 [ath9k]
  [<fd38c2f9>] ? ath_rx_tasklet+0xc89/0xca0 [ath9k]

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath5k: capture CCK and OFDM restarts
Mathy Vanhoef [Fri, 13 Jun 2014 23:14:56 +0000 (01:14 +0200)]
ath5k: capture CCK and OFDM restarts

Treat frames that underwent a CCK or OFDM restart as frames with an invalid CRC.

Signed-off-by: Mathy Vanhoef <vanhoefm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath5k: support for FIF_FCSFAIL filter
Mathy Vanhoef [Fri, 13 Jun 2014 21:40:22 +0000 (23:40 +0200)]
ath5k: support for FIF_FCSFAIL filter

When the FIF_FCSFAIL filter flag is set, pass frames with CRC errors.

Signed-off-by: Mathy Vanhoef <vanhoefm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agowireless: mwifiex: Use the proper interfaces
Thomas Gleixner [Thu, 12 Jun 2014 07:31:34 +0000 (08:31 +0100)]
wireless: mwifiex: Use the proper interfaces

Why is converting time formats so desired if there are proper
interfaces for this?

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Bing Zhao <bzhao@marvell.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoRevert "mwifiex: Use the proper interfaces"
Bing Zhao [Sat, 21 Jun 2014 00:07:42 +0000 (17:07 -0700)]
Revert "mwifiex: Use the proper interfaces"

This reverts commit a82fc3b4a2bceb7c6587249cb690342eb5065979.

Thomas corrected me on that I misunderstood Johannes' comment
for net_timedelta() and the ktime_get_real() usage inside
__net_timestamp().

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: b43_phyops_a can be static
Fengguang Wu [Wed, 25 Jun 2014 19:46:51 +0000 (15:46 -0400)]
b43: b43_phyops_a can be static

CC: "Rafał Miłecki" <zajec5@gmail.com>
CC: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agorsi: Fixed warnings reported by static code analyzers.
Jahnavi Meher [Wed, 25 Jun 2014 10:18:15 +0000 (15:48 +0530)]
rsi: Fixed warnings reported by static code analyzers.

Fixed a warning related to incorrect return type and removed an
unnecessary semi colon.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agorsi: Fixed errors and warnings reported by static code analyzers.
Jahnavi Meher [Wed, 25 Jun 2014 10:17:45 +0000 (15:47 +0530)]
rsi: Fixed errors and warnings reported by static code analyzers.

Fixed a potential buffer overflow in 'rsi_rates' and a sparse warning
related to difference in endianness in rsi_91x_mgmt.c.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agop54: use request_firmware_direct() for optional EEPROM override
Luis R. Rodriguez [Tue, 24 Jun 2014 22:39:43 +0000 (15:39 -0700)]
p54: use request_firmware_direct() for optional EEPROM override

The p54 driver uses request_firmware() twice, once for actual
firmware and then another time for an optional user overide on
EEPROM, 3826.eeprom. The custom EEPROM  is optional but if not
present we'll introduce an extra lag of 60 seconds with udev
present. Annotate we don't want udev nonsense here to avoid
the lag in case its not present.

This was found with the following SmPL patch.

@ firmware_not_critical @
expression cf;
expression config_file;
expression dev;
int ret;
identifier l;
statement S;
@@

- ret = request_firmware(&cf, config_file, dev);
+ ret = request_firmware_direct(&cf, config_file, dev);
if (ret < 0) {
... when != goto l;
    when != return ret;
    when any
} else {
...
release_firmware(cf);
...
}

Cc: Takashi Iwai <tiwai@suse.de>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: linux-wireless@vger.kernel.org
Cc: cocci@systeme.lip6.fr
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Acked-By: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k_hw: Fix pll2_divfrac for AR953x
Rajkumar Manoharan [Tue, 24 Jun 2014 16:57:40 +0000 (22:27 +0530)]
ath9k_hw: Fix pll2_divfrac for AR953x

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k_hw: fix tx gain table index for AR953x
Rajkumar Manoharan [Tue, 24 Jun 2014 16:57:39 +0000 (22:27 +0530)]
ath9k_hw: fix tx gain table index for AR953x

Fix tx gain table index on fast channel change for AR953x.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k_hw: fix XPABIASLEVEL settings for AR9531
Rajkumar Manoharan [Tue, 24 Jun 2014 16:57:38 +0000 (22:27 +0530)]
ath9k_hw: fix XPABIASLEVEL settings for AR9531

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k_hw: Add QCA953x 2.0 initvals
Rajkumar Manoharan [Tue, 24 Jun 2014 16:57:37 +0000 (22:27 +0530)]
ath9k_hw: Add QCA953x 2.0 initvals

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k_hw: update CCK loop coefficients for AR953x 1.0
Rajkumar Manoharan [Tue, 24 Jun 2014 16:57:36 +0000 (22:27 +0530)]
ath9k_hw: update CCK loop coefficients for AR953x 1.0

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: update list and code making a selection of firmware files
Rafał Miłecki [Tue, 24 Jun 2014 08:50:41 +0000 (10:50 +0200)]
b43: update list and code making a selection of firmware files

Clean ucode selection, fix choice of firmware for LCN, drop some goto-s,
add new devices.
Tested on 14e4:4312, 14e4:4315, 14e4:4328, 14e4:432b, 14e4:4353.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi/rtl8723be: Replace magic number by macro
Rickard Strandqvist [Mon, 23 Jun 2014 22:07:13 +0000 (00:07 +0200)]
rtlwifi/rtl8723be: Replace magic number by macro

For consistency with other drivers, replace a magic number by a macro.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi/rtl8723ae: Replace magic number by macro
Rickard Strandqvist [Mon, 23 Jun 2014 22:05:24 +0000 (00:05 +0200)]
rtlwifi/rtl8723ae: Replace magic number by macro

For consistency with other drivers, replace a magic number by a macro.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>