platform/kernel/linux-rpi.git
9 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwif...
John W. Linville [Fri, 26 Sep 2014 17:33:58 +0000 (13:33 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

9 years agoiwlwifi: mvm: Refactor and fix max probe len computation
Andrei Otcheretianski [Tue, 9 Sep 2014 07:58:49 +0000 (10:58 +0300)]
iwlwifi: mvm: Refactor and fix max probe len computation

Move iwl_mvm_max_scan_ie_len function to scan.c and fix the
implementation to conform with the LMAC scan API.
Since the correct implementation would leave us with unacceptably
tiny probes, add a workaround which returns a larger value.
In current implementation it's possible that unified_scan_lmac and
unified_sched_scan_lmac would return -ENOBUFS.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: disable BT Co-running by default
Emmanuel Grumbach [Sun, 21 Sep 2014 09:45:34 +0000 (12:45 +0300)]
iwlwifi: mvm: disable BT Co-running by default

The tables still contain dummy values.

Cc: <stable@vger.kernel.org> [3.15+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: fix logic in case of multiple TIDs
Eyal Shapira [Sun, 14 Sep 2014 12:58:53 +0000 (15:58 +0300)]
iwlwifi: mvm: rs: fix logic in case of multiple TIDs

In case of traffic on multiple TIDs where one is aggregated
and the other is not RS would toggle between considering
traffic vs. the station as aggregated and not aggregated.
Instead consider the sta state as aggregated as long as
there's at least one TID aggregated.
This limitation is because the rates table is kept per
station and not per TID.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: report all BA notifs to RS
Eyal Shapira [Sun, 14 Sep 2014 12:28:09 +0000 (15:28 +0300)]
iwlwifi: mvm: report all BA notifs to RS

Currently BA notifications which don't reclaim any frames
would not cause the RS to be called as no skbs are passed
to mac80211. This is not optimal as RS can benefit from the
statistics of sent vs. acked of such a BA. This can improve the
reaction time of the RS algorithm. Also, an upcoming change in
the firmware would cause BA timeout to be reported as a BA notif
with 0 acked so this change is required for that as well.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: 8000: fix fw name to account for revision
Liad Kaufman [Thu, 18 Sep 2014 14:22:58 +0000 (17:22 +0300)]
iwlwifi: 8000: fix fw name to account for revision

The 8000 HW series also includes the revision in the FW
name.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: fix HW_REV saving for 8000 series
Liad Kaufman [Wed, 17 Sep 2014 10:28:50 +0000 (13:28 +0300)]
iwlwifi: pcie: fix HW_REV saving for 8000 series

Align the trans->hw_rev variable format with previous series
format.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: Add missing PCI IDs for the 7260 series
Oren Givon [Wed, 17 Sep 2014 07:31:56 +0000 (10:31 +0300)]
iwlwifi: Add missing PCI IDs for the 7260 series

Add 4 missing PCI IDs for the 7260 series.

Cc: <stable@vger.kernel.org> [3.10+]
Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: limit aggregation size in low latency to 6
Eyal Shapira [Sun, 14 Sep 2014 13:40:38 +0000 (16:40 +0300)]
iwlwifi: mvm: limit aggregation size in low latency to 6

This is a tradeoff between enabling better throughput for
bursty traffic and low latency. The number 6 was found to be
a good tradeoff for the Miracast use case which is the
major use case for low latency.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: refactor to allow direct rs updating
Eyal Shapira [Sun, 14 Sep 2014 12:23:23 +0000 (15:23 +0300)]
iwlwifi: mvm: rs: refactor to allow direct rs updating

Enable RS to get updated directly via iwl_mvm_rs_tx_status
which will be called by the driver and not via mac80211
rate control. This is required for a following patch to
report on BAs which do not cause the BA window to progress.
Also this is a first step in decoupling rs from the
mac80211 rate control.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: choose an initial tx rate based on rssi conditions
Eyal Shapira [Tue, 12 Aug 2014 21:31:13 +0000 (00:31 +0300)]
iwlwifi: mvm: choose an initial tx rate based on rssi conditions

Improve the initial tx rate and antenna selection to be based on
the rssi of the last rx. This avoids starting at the lowest legacy
rate always and requiring more tx traffic to "climb" up the rates.
Since this option might cause trouble in certain setups, allow to
disable it by default.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoath9k: enable ext channel pulse detection
Lorenzo Bianconi [Tue, 16 Sep 2014 14:43:42 +0000 (16:43 +0200)]
ath9k: enable ext channel pulse detection

Enable pulse detection on extension channel if 40MHz channel width has been set

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix build error
Sujith Manoharan [Tue, 16 Sep 2014 01:49:27 +0000 (07:19 +0530)]
ath9k: Fix build error

This happens when CONFIG_ATH9K_CHANNEL_CONTEXT is
not enabled.

../drivers/net/wireless/ath/ath9k/recv.c: In function ‘ath_rx_ps_beacon’:
../drivers/net/wireless/ath/ath9k/recv.c:553:27: error: ‘struct ath_softc’ has no member named ‘offchannel’
    if (sc->cur_chan == &sc->offchannel.chan)
                           ^
../scripts/Makefile.build:257: recipe for target 'drivers/net/wireless/ath/ath9k/recv.o' failed
make[10]: *** [drivers/net/wireless/ath/ath9k/recv.o] Error 1
../scripts/Makefile.build:404: recipe for target 'drivers/net/wireless/ath/ath9k' failed
make[9]: *** [drivers/net/wireless/ath/ath9k] Error 2

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: initialize ath_node linked list
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:16 +0000 (02:13 +0200)]
ath9k: initialize ath_node linked list

Initialize neighbor linked list used by dynack to compute ACK timeout
as the maximum STA ACK timeout

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: enable dynack using set_coverage_class codepath
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:15 +0000 (02:13 +0200)]
ath9k: enable dynack using set_coverage_class codepath

Enable ACK timeout estimation algorithm if set_coverage_class routine has been
called with negative coverage_class parameter. Dynack is automatically disabled
setting valid value for coverage class

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: add debugfs support for dynack
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:14 +0000 (02:13 +0200)]
ath9k: add debugfs support for dynack

Add ack_to entry to debugfs in order to dump current ACK timeout value

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: enable control frame reception
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:13 +0000 (02:13 +0200)]
ath9k: enable control frame reception

Set control frame bit in rx filter if dynack processing has been activated
in order to enable ACK frame reception

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: add sampling methods for (tx|rx) timestamp
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:12 +0000 (02:13 +0200)]
ath9k: add sampling methods for (tx|rx) timestamp

Add sampling methods for ACK RX timestamp in ath_rx_tasklet() and for TX frame
timestamp in ath_tx_complete_aggr() and in ath_tx_process_buffer(). These
samples will be used in dynack processing for ACK timeout estimation

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: do not overwrite ACK timeout estimation
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:11 +0000 (02:13 +0200)]
ath9k: do not overwrite ACK timeout estimation

Do not overwrite ACK timeout estimation in ath9k_hw_init_global_settings() if
dynack processing has been enabled

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: add config for (en|dis)abling ACK timeout estimation
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:10 +0000 (02:13 +0200)]
ath9k: add config for (en|dis)abling ACK timeout estimation

Add ACK timeout estimation algorithm to ath9k Makefile and Kconfig

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: add dynamic ACK timeout estimation
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:09 +0000 (02:13 +0200)]
ath9k: add dynamic ACK timeout estimation

Add dynamic ACK timeout estimation algorithm based on ACK frame RX timestamp,
TX frame timestamp and frame duration.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Tested-by: Philippe Duchein <wireless-dev@duchein.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: add duration field to ath_tx_status
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:08 +0000 (02:13 +0200)]
ath9k: add duration field to ath_tx_status

Add duration field to ath_tx_status in order to report frame duration for each
entry in multi-retry chain. These fields will be used in ACK timeout estimation
algorithm (dynack)

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: export methods related to ACK timeout estimation
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:07 +0000 (02:13 +0200)]
ath9k: export methods related to ACK timeout estimation

Remove static keyword and export ath9k_hw_setslottime(),
ath9k_hw_set_ack_timeout() and ath9k_hw_set_cts_timeout() in hw.h.
These methods will be used in ACK timeout estimation algorithm (dynack)

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoiwlwifi: mvm: Allow schedule scan while connected
Alexander Bondar [Wed, 30 Jul 2014 14:40:28 +0000 (17:40 +0300)]
iwlwifi: mvm: Allow schedule scan while connected

In the past when schedule scan was started while connected on one of
interfaces FW crashes were observed. In the newest FW this issue is
solved, so remove limitaion after examining corresponding TLV flag.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add debugfs entry to read the current temperature
Luciano Coelho [Thu, 4 Sep 2014 12:58:47 +0000 (15:58 +0300)]
iwlwifi: mvm: add debugfs entry to read the current temperature

When read, this new debugfs entry requests the current temperature
from the firmware and outputs it.

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: prepare for scheduler config command
Avri Altman [Wed, 30 Jul 2014 08:41:01 +0000 (11:41 +0300)]
iwlwifi: mvm: prepare for scheduler config command

The scheduler is a HW sub-block that directs the work of the Flow
Handler by issuing requests for frame transfers, specifying source
and destination. Its primary function is to allocate flows into the
TX FIFOs based upon a pre-determined mapping.

The driver has some responsibilities to the scheduler, namely
initialising and maintaining the hardware registers. This is
currently done by directly accessing them, which can cause races
with the firmware also accessing the registers.

To address this problem, change the driver to no longer directly
access the registers but go through the firmware for this if the
firmware has support for DQA and thus the new command.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Set RRM_ENABLED bit in scan commands
Andrei Otcheretianski [Wed, 9 Jul 2014 15:59:14 +0000 (18:59 +0300)]
iwlwifi: mvm: Set RRM_ENABLED bit in scan commands

Set RRM_ENABLED (bit 6) flag in scan commands. When this flag is set
the fw will add WFA vendor-specific TPC report and DS parameter set
IEs into probe requests.
This bit is set for SCAN_OFFLOAD_REQUEST_CMD(0x51).

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Assaf Krauss <assaf.krauss@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Announce Quiet Period support
Assaf Krauss [Thu, 13 Mar 2014 06:12:15 +0000 (08:12 +0200)]
iwlwifi: mvm: Announce Quiet Period support

Add a ucode capability flag for support of Quiet Period (part of RRM).
If this flag is set, advertise device support.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Update TX power in TPC reports
Andrei Otcheretianski [Tue, 1 Jul 2014 09:54:25 +0000 (12:54 +0300)]
iwlwifi: mvm: Update TX power in TPC reports

Introduce new tx command flag (TX_CMD_FLG_WRITE_TX_POWER) which requests the
fw to update the tx power value at some constant offset.
Set this flag when transmitting either TPC report or Link measurement report
action frames.
In addition, introduce new tlv which indicates whether the fw supports power
insertion (IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT) and publish the
corresponding nl80211 feature.

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: support cloned tx skbs
Ido Yariv [Wed, 23 Jul 2014 13:31:14 +0000 (09:31 -0400)]
iwlwifi: mvm: support cloned tx skbs

Since tx skbs are not modified by the driver, let mac80211 know the
driver can handle cloned skbs.

Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoath9k: Fix primary station configuration
Sujith Manoharan [Mon, 15 Sep 2014 05:55:54 +0000 (11:25 +0530)]
ath9k: Fix primary station configuration

Assign 'primary_sta' to the active primary station
interface after iterating over the list of interfaces.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Remove useless opmode check
Sujith Manoharan [Mon, 15 Sep 2014 05:55:53 +0000 (11:25 +0530)]
ath9k: Remove useless opmode check

The opmode is verified to be NL80211_IFTYPE_STATION
before calling ath9k_set_assoc_state().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Set offchannel state properly
Sujith Manoharan [Mon, 15 Sep 2014 05:55:52 +0000 (11:25 +0530)]
ath9k: Set offchannel state properly

When switching offchannel, BSS related information
in the HW has to be reset to default values. Add a routine
to do this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Check beaconing mode properly
Sujith Manoharan [Mon, 15 Sep 2014 05:55:51 +0000 (11:25 +0530)]
ath9k: Check beaconing mode properly

In MCC mode, the TSF of a context needs to be
adjusted only if it is GO/AP.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Remove unnecessary tbtt assignment
Sujith Manoharan [Mon, 15 Sep 2014 05:55:50 +0000 (11:25 +0530)]
ath9k: Remove unnecessary tbtt assignment

The next_tbtt variable in the scheduler is needed only
for GO/AP mode operation and is always read from the
NEXT_TBTT_TIMER in the HW. There is no need to store
the timestamp for received beacons.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: add support for setting the beacon listen interval
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:12 +0000 (23:09 +0200)]
b43: add support for setting the beacon listen interval

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: update some transmit header constants
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:11 +0000 (23:09 +0200)]
b43: update some transmit header constants

Some constants were missing and are added now.
The rate mode was renamed, at least the ucode in brcsmac uses 2 for HT
rates (iee80211n) and the more recent ucodes are using 3 for VHT
(ieee80211ac).

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: add missing rate
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:10 +0000 (23:09 +0200)]
b43: add missing rate

The OFDM reate 9MB was not set here

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: tell ucode the phy type and version
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:09 +0000 (23:09 +0200)]
b43: tell ucode the phy type and version

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: tell the ucode the mac capabilities
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:08 +0000 (23:09 +0200)]
b43: tell the ucode the mac capabilities

This is based on code form brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agofixup! wil6210: fix usage of print_hex_dump_debug
Vladimir Kondratiev [Sun, 14 Sep 2014 08:14:10 +0000 (11:14 +0300)]
fixup! wil6210: fix usage of print_hex_dump_debug

Use empty inline functions instead of empty #define. Fix for "unused variable"
as reported below:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
head:   167bf96dd87d2a8360cb9e9783006876dac4f579
commit: 871d8c4bbb0f23c29a21b63b1801071766f69b51 [45/62] wil6210: fix usage of print_hex_dump_debug
config: i386-allyesconfig
reproduce:
  git checkout 871d8c4bbb0f23c29a21b63b1801071766f69b51
  make ARCH=i386  allyesconfig
  make ARCH=i386

All warnings:

   drivers/net/wireless/ath/wil6210/wmi.c: In function 'wmi_evt_rx_mgmt':

>> drivers/net/wireless/ath/wil6210/wmi.c:341:10: warning: unused variable 'ie_len' [-Wunused-variable]
      size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
             ^

>> drivers/net/wireless/ath/wil6210/wmi.c:340:13: warning: unused variable 'ie_buf' [-Wunused-variable]
      const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
                ^

vim +/ie_len +341 drivers/net/wireless/ath/wil6210/wmi.c

2be7d22f Vladimir Kondratiev 2012-12-20  334
2be7d22f Vladimir Kondratiev 2012-12-20  335    if (ieee80211_is_beacon(fc) || ieee80211_is_probe_resp(fc)) {
2be7d22f Vladimir Kondratiev 2012-12-20  336            struct cfg80211_bss *bss;
8eea944a Vladimir Kondratiev 2014-06-16  337            u64 tsf = le64_to_cpu(rx_mgmt_frame->u.beacon.timestamp);
8eea944a Vladimir Kondratiev 2014-06-16  338            u16 cap = le16_to_cpu(rx_mgmt_frame->u.beacon.capab_info);
8eea944a Vladimir Kondratiev 2014-06-16  339            u16 bi = le16_to_cpu(rx_mgmt_frame->u.beacon.beacon_int);
8eea944a Vladimir Kondratiev 2014-06-16  340            const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
8eea944a Vladimir Kondratiev 2014-06-16  341            size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
8eea944a Vladimir Kondratiev 2014-06-16  342                                             u.beacon.variable);
8eea944a Vladimir Kondratiev 2014-06-16  343            wil_dbg_wmi(wil, "Capability info : 0x%04x\n", cap);
8eea944a Vladimir Kondratiev 2014-06-16  344            wil_dbg_wmi(wil, "TSF : 0x%016llx\n", tsf);

:::::: The code at line 341 was first introduced by commit
:::::: 8eea944af0efcdba09dac1ad220c9bfa68293279 wil6210: print more info about BSS found

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobrcm80211: use container_of to resolve dma_info from dma_pub
Fabian Frederick [Sat, 13 Sep 2014 20:38:29 +0000 (22:38 +0200)]
brcm80211: use container_of to resolve dma_info from dma_pub

Use container_of instead of casting first structure member.

Compiled but untested.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobrcm80211: use container_of to resolve brcms_phy from brcms_phy_pub
Fabian Frederick [Sat, 13 Sep 2014 20:38:28 +0000 (22:38 +0200)]
brcm80211: use container_of to resolve brcms_phy from brcms_phy_pub

Use container_of instead of casting first structure member.

Compiled but untested.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: btcoexist: Change local debugging macros CL_*** into the standard varieties
Larry Finger [Fri, 12 Sep 2014 20:50:58 +0000 (15:50 -0500)]
rtlwifi: btcoexist: Change local debugging macros CL_*** into the standard varieties

Macros CL_SNPRINTF and CL_PRINTF are always used in that order. The first
formats info into a buffer, and the second dumps it with printk. As the
debug system in rtlwifi has a macro that does this with a single call,
it seems reasonable to use it instead. An additional benefit is that the
debug level can be set when loading the driver used by the wifi device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: Implement PHY PLL reset
Rafał Miłecki [Fri, 12 Sep 2014 16:37:26 +0000 (18:37 +0200)]
b43: Implement PHY PLL reset

We should reset PLL after changing MAC frequency.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: modify TX/RX window sizes for AP interface
Avinash Patil [Fri, 12 Sep 2014 14:39:00 +0000 (20:09 +0530)]
mwifiex: modify TX/RX window sizes for AP interface

This patch sets uAP BA window sizes to 64.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: add rx workqueue support
Avinash Patil [Fri, 12 Sep 2014 14:38:59 +0000 (20:08 +0530)]
mwifiex: add rx workqueue support

This patch adds RX work queue support to mwifiex.
Packets received are queued to internal queue which are then
processed by scheduling a work item for RX process.

RX work is enabled only on SMP systems.

Reviewed-by: James Cameron <quozl@laptop.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: remove low priority scan handling
Amitkumar Karwar [Fri, 12 Sep 2014 14:38:58 +0000 (20:08 +0530)]
mwifiex: remove low priority scan handling

We have a logic in driver to delay or abort low priority scan
to serve Tx traffic effectively. With scan channel
gap support added, firmware now allows driver to send Tx data while
scan operation is in progress. Hence low priority scan handling
in driver is not required now. This patch removes related code.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: remove redundant variable report_scan_result
Amitkumar Karwar [Fri, 12 Sep 2014 14:38:57 +0000 (20:08 +0530)]
mwifiex: remove redundant variable report_scan_result

This variable is never used, get rid of it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: process TX even when scan is ongoing
Avinash Patil [Fri, 12 Sep 2014 14:38:56 +0000 (20:08 +0530)]
mwifiex: process TX even when scan is ongoing

With channel scan gap, FW comes back to connected channel after each
single channel scan. So we can safely transfer data to FW during scan.
FW would send this data once on connected channel.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: remove restriction of single channel scan when connected
Avinash Patil [Fri, 12 Sep 2014 14:38:55 +0000 (20:08 +0530)]
mwifiex: remove restriction of single channel scan when connected

With scan channel gap in place, FW comes back to connected channel
after each scan; so we dont need to restrict FW to scan
single channel while connected.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: bring in scan channel gap feature
Avinash Patil [Fri, 12 Sep 2014 14:38:54 +0000 (20:08 +0530)]
mwifiex: bring in scan channel gap feature

With scan channel gap when any station/AP is active, FW comes back
to connected channel for any pending data transfter after scanning each
channel.
We set scan channel gap TLV to FW in scan command when any of the
interface is active. This enables scan channel gap in FW.
Also when scan channel gap is enabled, we would scan maximum channels
allowed by FW.

Scan channel gap is supported only on FW with V15 FW API.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: set passive scan type for scan requests with no ssid
Avinash Patil [Fri, 12 Sep 2014 14:38:53 +0000 (20:08 +0530)]
mwifiex: set passive scan type for scan requests with no ssid

It was observed that station would sent probe request even when
scan type has been set as passive during iw scan.
This was happening because driver sets passive scan type only
when channel has IEEE80211_CHAN_NO_IR flag set.
Along with this, add condition to check if no ssids are specified in
scan request so as to mark such scan request passive.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: minor cleanup in multiport aggregation
Amitkumar Karwar [Fri, 12 Sep 2014 14:38:52 +0000 (20:08 +0530)]
mwifiex: minor cleanup in multiport aggregation

'mp_data_port_mask' and 'mp_end_port' gives correct information
even for the chipsets supporting SDIO new mode (32 ports).
We will get rid of this chip specific handling.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: fix a bug in Tx multiport aggregation
Amitkumar Karwar [Fri, 12 Sep 2014 14:38:51 +0000 (20:08 +0530)]
mwifiex: fix a bug in Tx multiport aggregation

When aggregation port limit is reached, we stop aggregation and
the data is sent to firmware. It is observed that one less packet
than the port limit is aggregated in this case. ex. 15 instead of
16.
The reason is we have redundant port limit checks before current
packet is added to aggregation buffer.

The issue is fixed by removing these checks. We already have
necessary check in precopy current buffer handling.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: fix 5G association failure after leaving 2.4G IBSS
Xinming Hu [Fri, 12 Sep 2014 14:38:50 +0000 (20:08 +0530)]
mwifiex: fix 5G association failure after leaving 2.4G IBSS

When assocaiting to an AP , mwifiex set supported data rates
based on target AP's capability. For 5G AP(11a mode), a/n/ac mode
would possibly be set.
However, for some chips which dont support 11AC mode current config_bands
will be used instead.

For example, if we join an IBSS in 11b mode ,adapter->config_bands
will be set to 1(11b mode). Then we leave IBSS ,and try to connect
5G a/n mode AP. At this time , only 11b mode data rates will be
supported in assoc request , which result in assoc failure with
reason code 18: Association denied due to requesting station not
supporting all rates.

This patch fix such a cornel case, by adding additional check for
current chip's 11ac capability.

Reported-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: support for event done interrupt
Avinash Patil [Fri, 12 Sep 2014 14:38:49 +0000 (20:08 +0530)]
mwifiex: support for event done interrupt

This patch adds support for writing CPU event interrupt done back
to device.
Patch also increases interrupt buffer ring size from 4 to 8.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: rework internal scan for association
Avinash Patil [Fri, 12 Sep 2014 14:38:48 +0000 (20:08 +0530)]
mwifiex: rework internal scan for association

There was an issue with internal scan during association wherein
we would complete internal scan on first scan command response.
This would cause association failure if AP is not found in first scan
response e.g. APs from A band.
This patch fixes this issue by completing internal scan only when all
scan commands from scan pending queue and command pending queue are
sent to FW and response to last scan command is received.

Tested-by: Xinmin Hu <huxm@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: avoid processing RX packets with invalid length
Avinash Patil [Fri, 12 Sep 2014 14:38:47 +0000 (20:08 +0530)]
mwifiex: avoid processing RX packets with invalid length

If rx_len received in interface header from FW is more than
RX buffer size, skb_put for such length results into skb_panic.
Avoid this by not processing such packets. We just print a warning
for such packets and free skb.

Reviewed-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: fix probable memory corruption while processing TDLS frame
Avinash Patil [Fri, 12 Sep 2014 14:38:46 +0000 (20:08 +0530)]
mwifiex: fix probable memory corruption while processing TDLS frame

Size of RSN IE buffer in driver is 254 while maximum size of received buffer
to be copied to RSN IE buffer can be 255. Add boundary check to copy maximum
of 254 bytes into RSN IE buffer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: set fw api info for backword compatibility
Avinash Patil [Fri, 12 Sep 2014 14:38:45 +0000 (20:08 +0530)]
mwifiex: set fw api info for backword compatibility

If we dont set FW API info here, for older FW releases where FW API
is not available in GET_HW_SPEC, API version would remain 0.
This may cause issues with 11ac if older FW is used with newer driver.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: HT-PHY: Update values for frequency calibration
Rafał Miłecki [Fri, 12 Sep 2014 08:24:11 +0000 (10:24 +0200)]
b43: HT-PHY: Update values for frequency calibration

Previous values were extracted from MMIO dump of some old 5.x driver,
new ones should improve calibration. This also adds values for 5 GHz.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agob43: HT-PHY: Implement band switching
Rafał Miłecki [Fri, 12 Sep 2014 08:24:10 +0000 (10:24 +0200)]
b43: HT-PHY: Implement band switching

It works pretty much the same way as in N-PHY.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix beacon processing in offchannel
Sujith Manoharan [Fri, 12 Sep 2014 06:40:48 +0000 (12:10 +0530)]
ath9k: Fix beacon processing in offchannel

When interfaces of different types are present
in a context and an offchannel request is received
on a STA interface, we end up trying to process
beacons received when we are offchannel. This hits
the below warning since offchannel will not have proper
beacon parameters.

Fix this by not processing beacons received when we
are offchannel.

------------[ cut here ]------------
WARNING: CPU: 1 PID: 0 at ../drivers/net/wireless/ath/ath9k/recv.c:552 ath_rx_tasklet+0xf8f/0x1020 [ath9k]()
CPU: 1 PID: 0 Comm: swapper/1 Tainted: G           O   3.17.0-rc4-wl-debug #16
Hardware name: LENOVO 28427ZQ/INVALID, BIOS 6JET58WW (1.16 ) 09/17/2009
 0000000000000000 15916787056abba3 ffff88013b603d08 ffffffff8156af94
 ffff88013b603d50 ffff88013b603d40 ffffffff81070dbd ffff8800a84bb300
 ffff8800b05db358 ffff8800a84cc578 ffff8800a84bb300 ffff8800b05daa40
Call Trace:
 <IRQ>  [<ffffffff8156af94>] dump_stack+0x4d/0x6f
 [<ffffffff81070dbd>] warn_slowpath_common+0x7d/0xa0
 [<ffffffff81070e3c>] warn_slowpath_fmt+0x5c/0x80
 [<ffffffff81572143>] ? _raw_spin_lock_irqsave+0x83/0xa0
 [<ffffffffa09d04a6>] ? ath_rx_tasklet+0x9f6/0x1020 [ath9k]
 [<ffffffffa09d0a3f>] ath_rx_tasklet+0xf8f/0x1020 [ath9k]
 [<ffffffffa09cd4f4>] ath9k_tasklet+0xf4/0x310 [ath9k]
 [<ffffffff81075a97>] tasklet_action+0xe7/0xf0
 [<ffffffff8107508a>] __do_softirq+0x12a/0x340
 [<ffffffff8107544e>] irq_exit+0x9e/0xc0
 [<ffffffff81575e56>] do_IRQ+0x56/0xe0
 [<ffffffff81573c72>] common_interrupt+0x72/0x72
 <EOI>  [<ffffffff81421037>] ? cpuidle_enter_state+0x67/0x1a0
 [<ffffffff81421257>] cpuidle_enter+0x17/0x20
 [<ffffffff810b3ebe>] cpu_startup_entry+0x3ce/0x420
 [<ffffffff81048563>] start_secondary+0x233/0x2c0
---[ end trace f15c3e33ba78d840 ]---
------------[ cut here ]------------

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: btcoexist: avoid format string in printk
Larry Finger [Fri, 12 Sep 2014 00:02:10 +0000 (19:02 -0500)]
rtlwifi: btcoexist: avoid format string in printk

Recent changes to this driver inadvertently reverted the change made by Kees
Cook in commit 6437f51ec3.

Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: fix radar parameters initialization
Lorenzo Bianconi [Thu, 11 Sep 2014 21:50:54 +0000 (23:50 +0200)]
ath9k: fix radar parameters initialization

Move ath9k_hw_set_radar_params() in ath9k_hw_reset() in order to avoid
AR_PHY_RADAR registers are overwritten after hw reset

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agohostap: proc: substitute loops by %*phN
Andy Shevchenko [Fri, 5 Sep 2014 14:30:16 +0000 (17:30 +0300)]
hostap: proc: substitute loops by %*phN

For dumping small buffers we may use %*phN specifier instead of custom
approach..

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Mon, 15 Sep 2014 18:55:45 +0000 (14:55 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

9 years agoMerge tag 'mac80211-next-for-john-2014-09-12' of git://git.kernel.org/pub/scm/linux...
John W. Linville [Mon, 15 Sep 2014 18:51:23 +0000 (14:51 -0400)]
Merge tag 'mac80211-next-for-john-2014-09-12' of git://git./linux/kernel/git/jberg/mac80211-next

Johannes Berg <johannes@sipsolutions.net> says:

"This time, I have some rate minstrel improvements, support for a very
small feature from CCX that Steinar reverse-engineered, dynamic ACK
timeout support, a number of changes for TDLS, early support for radio
resource measurement and many fixes. Also, I'm changing a number of
places to clear key memory when it's freed and Intel claims copyright
for code they developed."

Conflicts:
net/mac80211/iface.c

Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 15 Sep 2014 18:37:07 +0000 (14:37 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

9 years agoiwlwifi: mvm: align CSA GO NOA time event naming with the firmware
Luciano Coelho [Tue, 26 Aug 2014 13:14:10 +0000 (16:14 +0300)]
iwlwifi: mvm: align CSA GO NOA time event naming with the firmware

The time event used for CSA GO will also be used by CSA client.
Rename the symbols to something more generic and aligned with the
firmware code.

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: move IWL_MVM_UAPSD_QUEUES to constants.h
Eliad Peller [Wed, 6 Aug 2014 07:52:27 +0000 (10:52 +0300)]
iwlwifi: mvm: move IWL_MVM_UAPSD_QUEUES to constants.h

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: fix PSM disable during TDLS
Arik Nemtsov [Wed, 3 Sep 2014 09:09:45 +0000 (12:09 +0300)]
iwlwifi: mvm: fix PSM disable during TDLS

Simplify the code and check for TDLS stations just before sending the
MAC_POWER_TABLE command. The previous version of the code still allowed
PM in some multi-interface scenarios even with TDLS connected.

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: Fix skip over dtim configuration in d0i3
Avri Altman [Wed, 27 Aug 2014 16:58:56 +0000 (19:58 +0300)]
iwlwifi: mvm: Fix skip over dtim configuration in d0i3

There was some confusion concerning the units of the beacon interval.
The driver assumed that it was in msec where it was in TU - so fix that.
Skip over dtim was capped by 300TU where it should be by 306TU.
It should also be subjected to several conditions:
Not a DFS channel, dtim period < 10, and the multicast wake-lock
is off.  Concerning multicast lock - there is an implementation gap
in the supplicant, so just leave a TODO.

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>
9 years agoiwlwifi: mvm: move TDLS code to separate file
Arik Nemtsov [Sun, 7 Sep 2014 16:18:31 +0000 (19:18 +0300)]
iwlwifi: mvm: move TDLS code to separate file

The upcoming TDLS channel-switch functionality is big enough to warrant
a separate file. Move existing related functions to the new file.

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: update QoS parameters when they change
Johannes Berg [Tue, 9 Sep 2014 13:49:19 +0000 (15:49 +0200)]
iwlwifi: mvm: update QoS parameters when they change

The QoS parameters can change during the lifetime of the BSS,
and more importantly hostapd only sets up the correct ones
after having started the AP/GO. Resend the MAC context when
the parameters change, with the updated parameters.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: reduce active dwell time
David Spinadel [Wed, 10 Sep 2014 13:40:41 +0000 (16:40 +0300)]
iwlwifi: mvm: reduce active dwell time

Reduce basic active dwell time from 30 ms on 2.4 GHz and 20 on 5.2 to
20 on 2.4 and 10 on 5.2.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix quota update avoidance
Johannes Berg [Thu, 11 Sep 2014 12:12:06 +0000 (14:12 +0200)]
iwlwifi: mvm: fix quota update avoidance

When not updating the quota, the new command shouldn't be stored
as otherwise slowly drifting quota would never update the firmware.
Fix this by storing the command only when it was also sent.

Since the error message also only makes sense when attempting to
send the command, just short-circuit the function when there's no
need to send the command.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: allow to collect debug data when restart is disabled
Emmanuel Grumbach [Thu, 11 Sep 2014 13:19:43 +0000 (16:19 +0300)]
iwlwifi: mvm: allow to collect debug data when restart is disabled

In some testing configuration, the firmware restart flow is
not enabled. Allow to collect logs even in this case.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: use the firmware to get the temperature during CT kill
Luciano Coelho [Thu, 4 Sep 2014 09:29:15 +0000 (12:29 +0300)]
iwlwifi: mvm: use the firmware to get the temperature during CT kill

Reading the temperature directly from the hardware, without the help
of the firmware, is a complex process and is not entirely the same for
different hardware.  Also, some NICs don't easily allow access to the
sensors when the firmware is not running, which would add even more
complexity to the code.

To reduce the code complexity and to avoid code duplication between
the firmware and the driver, boot the firmware briefly to read the
current temperature while in CT kill mode.

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: update d0i3 debugfs
Johannes Berg [Fri, 12 Sep 2014 08:28:01 +0000 (10:28 +0200)]
iwlwifi: mvm: update d0i3 debugfs

A lot of the newer d0i3 ref additions weren't added to the
debugfs file, fix that and add a comment to remember to do
it in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove unused static inline function
Avri Altman [Tue, 26 Aug 2014 04:09:52 +0000 (07:09 +0300)]
iwlwifi: mvm: remove unused static inline function

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>
9 years agoiwlwifi/iwl-drv.c: fix typo defualt -> default
Toralf Förster [Tue, 9 Sep 2014 18:08:53 +0000 (20:08 +0200)]
iwlwifi/iwl-drv.c: fix typo defualt -> default

trivial, but this is user visible b/c it is in the help text

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't update quota in firmware too often
Johannes Berg [Mon, 8 Sep 2014 14:42:54 +0000 (16:42 +0200)]
iwlwifi: mvm: don't update quota in firmware too often

When updating quota in the firmware, it has to reset quite a bit
of internal state, which apparently can have an adverse impact on
its operation.

Avoid that by only updating the quota command when there are any
signification changes, i.e. added/removed bindings or changes in
quota that are bigger than 8 TU within a binding.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: define the non shared antenna per hardware
Emmanuel Grumbach [Wed, 10 Sep 2014 08:00:16 +0000 (11:00 +0300)]
iwlwifi: define the non shared antenna per hardware

The sharing model will differ in new hardware. Define the
non shared antenna based on the device so that different
devices can have different names for the non shared antenna.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: clear command data on freeing
Johannes Berg [Tue, 9 Sep 2014 19:16:06 +0000 (21:16 +0200)]
iwlwifi: pcie: clear command data on freeing

When freeing the structures used for command data, clear their
memory as they may have contained key material at some point.
Also clear the duplicated buffer when freeing it to be safe;
currently key material is never put there but that may change.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: make hw rev checking more readable
Liad Kaufman [Sun, 7 Sep 2014 08:41:05 +0000 (11:41 +0300)]
iwlwifi: make hw rev checking more readable

Rather than ANDing with a mask - use existing macros, which
are more readable.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: trans: don't configure the set_active in SCD for dvm
Emmanuel Grumbach [Wed, 10 Sep 2014 08:16:41 +0000 (11:16 +0300)]
iwlwifi: trans: don't configure the set_active in SCD for dvm

This configuration is not needed for dvm, and it actually
broke it.

Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: disable aggregation queues in station DB in FW
Johannes Berg [Tue, 5 Aug 2014 13:24:44 +0000 (15:24 +0200)]
iwlwifi: mvm: disable aggregation queues in station DB in FW

When disabling aggregation, disable the queues in the station
DB in the firmware, otherwise we leave the tfd_queue_mask in
a wrong state after an aggregation session has been torn down.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: don't zero tx stats after idle
Eyal Shapira [Fri, 15 Aug 2014 22:30:30 +0000 (01:30 +0300)]
iwlwifi: mvm: rs: don't zero tx stats after idle

Move the tx stats to the persistent area of lq_sta to
avoid them being zeroed out every time rs reinitializes
which happens after tx idle for 5 secs for example.
The automatic zeroing out made them difficult to use.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add MVM_FW_MCAST_FILTER_PASS_ALL option
Max Stepanov [Mon, 4 Aug 2014 10:55:01 +0000 (13:55 +0300)]
iwlwifi: mvm: add MVM_FW_MCAST_FILTER_PASS_ALL option

Add MVM_FW_MCAST_FILTER_PASS_ALL option to iwl-dbg-cfg.ini configuration file
to enable/disable FW multicast filtering.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fail temp test enabling if the ucode is not loaded
Luciano Coelho [Wed, 20 Aug 2014 07:21:07 +0000 (10:21 +0300)]
iwlwifi: mvm: fail temp test enabling if the ucode is not loaded

If the ucode is not loaded, don't allow the temperature test to be
started, but allow it to be changed or stopped if already running.

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: reset ucode_loaded flag when mac80211 stop is called
Luciano Coelho [Wed, 20 Aug 2014 08:49:11 +0000 (11:49 +0300)]
iwlwifi: mvm: reset ucode_loaded flag when mac80211 stop is called

We rely on the value of the mvm->ucode_loaded flag to decide whether
or not we can perform certain operations (e.g. access to some debugfs
entries), so we need to reset it when the mac80211 stop operation is
called and the hardware is shutdown.

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: rs: remove max_rate_idx
Eyal Shapira [Sat, 30 Aug 2014 23:33:33 +0000 (02:33 +0300)]
iwlwifi: mvm: rs: remove max_rate_idx

max_rate_idx constraint is deprecated and it's handling is
faulty as well as it is relevant only for legacy rates but
was considered in HT/VHT. In most cases there was no side effect
as max_rate_idx was set to -1 but in certain cases like P2P
it got set to an actual rate idx which would limit the maximum
rate in HT/VHT by mistake.
max_rate_idx should be replaced by the masks fields but for
now remove it.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: enable LDPC in 8000 chip family
Eyal Shapira [Wed, 27 Aug 2014 23:33:05 +0000 (02:33 +0300)]
iwlwifi: enable LDPC in 8000 chip family

This chip family supports LDPC so enable it.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: allow preventing dummy notifications
Eran Harary [Sun, 27 Jul 2014 05:03:06 +0000 (08:03 +0300)]
iwlwifi: mvm: allow preventing dummy notifications

The firwmare now allows the driver to disable dummy
notifications. These notifications sent by the firmware
are an overhead for slow buses. They are still useful for
fast buses.
Add a hardware switch to prevent these notifications only
on devices that work on slow buses.

Signed-off-by: Eran <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: add and edit 8000 series PCI IDs
Oren Givon [Thu, 4 Sep 2014 07:16:49 +0000 (09:16 +0200)]
iwlwifi: add and edit 8000 series PCI IDs

Edit some 8000 series PCI IDs and add configuration to
Dual Band Wireless N 8260 devices.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add LDPC support
Eyal Shapira [Sat, 9 Aug 2014 07:57:59 +0000 (10:57 +0300)]
iwlwifi: mvm: add LDPC support

Use LDPC for Tx and publish support for Rx in case the chip
supports LDPC. Enable it for the 7265 family.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoMerge remote-tracking branch 'iwlwifi-fixes/master' into NEXT
Emmanuel Grumbach [Sun, 14 Sep 2014 09:54:42 +0000 (12:54 +0300)]
Merge remote-tracking branch 'iwlwifi-fixes/master' into NEXT

9 years agoBluetooth: Fix re-setting RPA as expired when deferring update
Johan Hedberg [Fri, 12 Sep 2014 16:31:52 +0000 (09:31 -0700)]
Bluetooth: Fix re-setting RPA as expired when deferring update

The hci_update_random_address will clear the RPA_EXPIRED flag and
proceed with setting a new one if the flag was set. However, the
set_random_addr() function that is called may choose to defer the update
to a later moment. In such a case the flag would incorrectly remain
unset unless set_random_addr() re-sets it. This patch fixes the issue.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>