Commit Graph

27336 Commits

Author SHA1 Message Date
Chung-Hsien Hsu
fdd0bd88ce brcmfmac: add CLM download support
The firmware for brcmfmac devices includes information regarding
regulatory constraints. For certain devices this information is kept
separately in a binary form that needs to be downloaded to the device.
This patch adds support to download this so-called CLM blob file. It
uses the same naming scheme as the other firmware files with extension
of .clm_blob.

The CLM blob file is optional. If the file does not exist, the download
process will be bypassed. It will not affect the driver loading.

Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-11 03:04:09 +02:00
Gustavo A. R. Silva
4775ae7afe rsi: rsi_91x_ps: remove redundant code in str_psstate
"INVALID_STATE" is already being returned in the default case and this
code cannot be reached.

Addresses-Coverity-ID: 1398384
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:36:10 +02:00
Arnd Bergmann
f87eba996b rt2x00: use monotonic timestamps for frame dump
rt2x00 uses the deprecated do_gettimeofday() function to get a timestamp
for its debugfs "dump" file interface.

The timestamp is using an unsigned 32-bit value, so we could make it
work until 2106 by using ktime_get_real_ts64(), but it seems better to
use monotonic times, as we normally want for timestamps.

Since this is an interface change, I'm incrementing the
DUMP_HEADER_VERSION number, so user space can figure out whether the
timestamps are monotonic or not. Most likely the tools won't care either
way.

Generally speaking, ABI version numbers and in particular changing them
is a bad idea. However since this is in debugfs, we don't put any
API stability rules on the interface according to
Documentation/filesystems/debugfs.txt, and we can take the easy way
out here; anyone using the frame dump feature can probably work out
the differences here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:33:05 +02:00
Stanislaw Gruszka
bfa62a52ca rt2x00usb: mark device removed when get ENOENT usb error
ENOENT usb error mean "specified interface or endpoint does not exist or
is not enabled". Mark device not present when we encounter this error
similar like we do with ENODEV error.

Otherwise we can have infinite loop in rt2x00usb_work_rxdone(), because
we remove and put again RX entries to the queue infinitely.

We can have similar situation when submit urb will fail all the time
with other error, so we need consider to limit number of entries
processed by rxdone work. But for now, since the patch fixes
reproducible soft lockup issue on single processor systems
and taken ENOENT error meaning, let apply this fix.

Patch adds additional ENOENT check not only in rx kick routine, but
also on other places where we check for ENODEV error.

Reported-by: Richard Genoud <richard.genoud@gmail.com>
Debugged-by: Richard Genoud <richard.genoud@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:32:07 +02:00
Igor Mitsyanko
c988967173 qtnfmac: pass all CONNECT cmd params to wireless card for processing
Specifically, following parameters are needed for wireless device
configuration but were not available to it before:
- HT/VHT capabilities and capabilities masks.
- full channel info (not just IEEE number)
- BSSID hint
- previous BSSID for reassoc request

Move Management Frame Protection setting from common encr info
structure into STA-specific .connect command parameters.

Make sure that all new qlink structure definitions are alignment-safe.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:58 +02:00
Igor Mitsyanko
a3945f4376 qtnfmac: include HTCAP and VHTCAP into config AP command
Include HT/VHT caps directly into command so that they won't have
to be searched for in IEs.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:58 +02:00
Igor Mitsyanko
17011da0b8 qtnfmac: configure and start AP interface with a single command
Current logic artificially divides "start AP" procedure into three
stages:
- generic interface configuration (security, channel etc)
- IE's processing
- enable AP mode on interface

This separation would not allow to do a proper device configuration as
first stage needs to use information from IEs that are processed on
a second stage. Which means first and second stages have to be meged.
In that case there is no point anymore to keep third stage either, so
merge all three into a single command.

This new command carries all the same info as contained in
"struct cfg80211_ap_settings".

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:57 +02:00
Igor Mitsyanko
4d1f0fabdc qtnfmac: convert "Append IEs" command to QTN_TLV_ID_IE_SET usage
Data contained within "Append IEs" command (QLINK_CMD_MGMT_SET_APPIE)
duplicates QTN_TLV_ID_IE_SET TLV. Convert the command to use that TLV
instead.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:57 +02:00
Igor Mitsyanko
5face518d4 qtnfmac: SCAN results: retreive frame type information from "IE set" TLV
"IE set" TLV carries the same information as
qlink_event_scan_result::frame_type. Convert the event to make use of
TLV and drop frame_type member.
While at it, make qlink_event_scan_result structure alignement-safe.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:56 +02:00
Igor Mitsyanko
18b7470f92 qtnfmac: extend "IE set" TLV to include frame type info
Specifying frame type for "IE set" TLV will allow to use several
TLVs in a single message.
Modify users accordingly.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:56 +02:00
Igor Mitsyanko
d1398b5b34 qtnfmac: get rid of PHYMODE capabilities flags
Supported WiFi operation modes are now identified per-band based on
HT/VHT capabilities of each band.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:55 +02:00
Igor Mitsyanko
d42df85f7d qtnfmac: initialize HT/VHT caps "can override" masks
Information on which HT/VHT capabilities can be overridden is reported
per-MAC by wireless device.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:55 +02:00
Igor Mitsyanko
e294cbfda0 qtnfmac: use per-band HT/VHT info from wireless device
HT/VHT capabilities must be reported per each band supported by a radio,
not for all bands on a radio. Furthermore, driver better not assume
any capabilities and just use whetever is reported by device itself.

To support this, convert "get channels" command into "get band info"
command. Difference is that it may also carry HT/VHT capabilities along
with channels information.

While at it, also add "num_bitrates" field to "get band info" command,
for future use.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:30:54 +02:00
Arend Van Spriel
bd99a3013b brcmfmac: move configuration of probe request IEs
The configuration of the IEs for probe requests was done in a P2P
related function, which is not very obvious. Moving it to
.scan callback function, ie. brcmf_cfg80211_scan().

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:28:51 +02:00
Arend Van Spriel
bbf35414cd brcmfmac: get rid of struct brcmf_cfg80211_info::active_scan field
The field struct brcmf_cfg80211_info::active_scan is set to true upon
initializing the driver instance, but it is never changed so simply
get rid of it.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:28:50 +02:00
Arend Van Spriel
588378f15c brcmfmac: get rid of brcmf_cfg80211_escan() function
The function brcmf_cfg80211_escan() is only called by brcmf_cfg80211_scan()
so there is no reason to split in two function especially since the latter
does not do an awful lot.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:28:49 +02:00
Arend Van Spriel
df2d8388bc brcmfmac: use msecs_to_jiffies() instead of calculation using HZ
Minor cleanup using provided macro to convert milliseconds interval
to jiffies in brcmf_cfg80211_escan().

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:28:49 +02:00
Arend Van Spriel
8c6efda22f brcmfmac: cleanup brcmf_cfg80211_escan() function
The function brcmf_cfg80211_escan() was always called with a non-null
request parameter and null pointer for this_ssid parameter. Clean up
the function removing the dead code path.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:28:48 +02:00
Franky Lin
6c219b0088 brcmfmac: disable packet filtering in promiscuous mode
Disable arp and nd offload to allow all packets sending to host.

Reported-by: Phil Elwell <phil@raspberrypi.org>
Tested-by: Phil Elwell <phil@raspberrypi.org>
Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:28:48 +02:00
Arend Van Spriel
2fd3877b5b brcmfmac: handle FWHALT mailbox indication
The firmware uses a mailbox to communicate to the host what is going
on. In the driver we validate the bit received. Various people seen
the following message:

 brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012

Bit 4 is cause of this message, but this actually indicates the firmware
has halted. Handle this bit by giving a more meaningful error message.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-10 04:28:47 +02:00
Colin Ian King
03e40f1e76 zd1201: remove unused variable framelen
Variable framelen is assigned but never read, hence it is redundant
and can be removed. Cleans up clang warning:

drivers/net/wireless/zydas/zd1201.c:234:3: warning: Value stored
to 'framelen' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:52:57 +02:00
Colin Ian King
9b741b2a31 orinoco_usb: remove redundant pointer dev
The pointer dev is assigned but never read, hence it is redundant
and can be removed. Cleans up clang warning:

drivers/net/wireless/intersil/orinoco/orinoco_usb.c:1468:2: warning:
Value stored to 'dev' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:52:22 +02:00
Colin Ian King
6c6e253113 iwlegacy: remove redundant pointer sta_priv
Pointer sta_priv is assigned but never read, hence it is redundant
and can be removed. Cleans up clang warning:

drivers/net/wireless/intel/iwlegacy/4965-rs.c:2163:2: warning: Value
stored to 'sta_priv' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:50:19 +02:00
Colin Ian King
f80ead1cd5 rtlwifi: remove redundant initialization to cfg_cmd
cfg_cmd is initialized to zero and this value is never read, instead
it is over-written in the start of a do-while loop. Remove the
redundant initialization. Cleans up clang warning:

drivers/net/wireless/realtek/rtlwifi/core.c:1750:22: warning: Value
stored to 'cfg_cmd' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:44:42 +02:00
Colin Ian King
82e730e521 rtlwifi: remove redundant pointer tid_data
tid_data is assigned but never read, hence it is redundant
and can be removed. Cleans up clang warning:

drivers/net/wireless/realtek/rtlwifi/base.c:1581:2: warning: Value
stored to 'tid_data' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:39:25 +02:00
Arnd Bergmann
ac978dc79a rtlwifi: drop unused ppsc->last_wakeup_time
The calculation of ppsc->last_wakeup_time is not y2038-safe, but
the variable is not used at all, so we can simply drop it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:33:06 +02:00
Arnd Bergmann
3c92d5517a rtlwifi: use ktime_get_real_seconds() for suspend time
do_gettimeofday() is deprecated and slower than necessary for the purpose
of reading the seconds. This changes rtl_op_suspend/resume to use
ktime_get_real_seconds() instead, which is simpler and avoids confusion
about whether it is y2038-safe or not.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:33:05 +02:00
Arnd Bergmann
3f2a162fab rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
We set rtlhal->last_suspend_sec to an uninitialized stack variable,
but unfortunately gcc never warned about this, I only found it
while working on another patch. I opened a gcc bug for this.

Presumably the value of rtlhal->last_suspend_sec is not all that
important, but it does get used, so we probably want the
patch backported to stable kernels.

Cc: stable@vger.kernel.org
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:33:04 +02:00
Ping-Ke Shih
c1b586402c rtlwifi: rtl_pci: Extend recognized interrupt parameters from two to four ISR
8822be checks H2CQ by int_d, so we extend to four ISR.
Also, irq_mask is extended to four.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:30:18 +02:00
Ping-Ke Shih
68929a8380 rtlwifi: rtl_pci: Add ID for 8822BE
When the driver for the RTL8822BE is added, it will need an ID for
further use.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:30:17 +02:00
Ping-Ke Shih
89d3e8abcf rtlwifi: rtl_pci: Add fill_tx_special_desc to issue H2C data, and process TXOK in interrupt.
With the RTL8822BE, an H2C tx queue is added to download FW and special
data. This change implements the support code in rtl_pci.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:30:17 +02:00
Ping-Ke Shih
57869e4ba7 rtlwifi: rtl_pci: Add support for 8822be TX/RX BD
The number of TX/RX BD desc for 8822BE is 512.
The TX/RX BD architecture of 8822BE is the same as 8192EE.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:30:16 +02:00
Larry Finger
5f647f4dfe rtlwifi: rtl_pci: Simplify some code be eliminating extraneous variables
In several places, the code assigns a variable inside an "if" or "case"
block, but uses it only once. The code is simplified by eliminating
the extraneous variable. With this change, one level of indenting is
saved.

This patch does not cause any functional changes in the binary code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:30:16 +02:00
Larry Finger
ae0122b679 rtlwifi: rtl_pci: Fix formatting problems in pci.c
Checkpatch.pl reports a number of formatting problems in this source
file. None of the changes cause any functional changes in the driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:30:15 +02:00
Larry Finger
6bc05d5d8e rtlwifi: rtl_pci: Fix formatting errors in pci.h
Checkpatch.pl reports a number of formatting problems in this header
file. None of the changes cause any functional changes in the driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08 14:30:15 +02:00
Kalle Valo
b13b3cdfd7 iwlwifi updates
* Some new PCI IDs;
 * A bunch of cleanups;
 * The timers update by Kees;
 * Add more register dump call-sites;
 * A fix for a locking issue in the TX flush code;
 * Actual implementation of the TX flush code for A000;
 * An optimization to drop RX frames during restart to avoid BA issues;
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEF3LNfgb2BPWm68smoUecoho8xfoFAln8PV0ACgkQoUecoho8
 xfqhuQ//R6fv1h0gixAtN8iAg7ktT2JJicXpybnH2p4VFolCDEk8tESY2L80EkOX
 eRog0tITLBfmH6K9DyhGtVZgHKQpzaVVl9pNQqqgg/lCa2dcPQHe2EYB5BhVJR7v
 3LqyKroad6KbonJCU4NgOPJnF7t9uyZgxGPwpkVO7JpE1b4sE0M3BXDQ1mirPfcz
 diFFPT4aYVSsp5WR6GiRXKEMtyb6c7cR1+2MxgNe640KvhSkJyQ8s9dj3HK5YTnz
 jGJkm25QGoSOxLEYzGF56/Dw0iPTnFye2ci/fsrI1ESkom2yyz61+DjOPSRb56qt
 HHfA7oHUFU/f4S9sxtzMVGz2QRXuRDqX+ihVmfvJtllXYvjjRfEbQ7ekraWl9M66
 IOjrbNrn8Zce6aAO4YT1idcn6E+pr+CSrFe7lem/RU1DJU1m/Bmj5vzdfqIIHNik
 B/2/cROJKpL3jxsj0zi17aJ5wLQAWbZNxI/Gl6uH/KzvTZ5cbl/3nQ6TTmjMXhrZ
 ZAv7itZITXzC91jOJmPHiHNQR4z2aFncrbQB5KY5BVqVO1peNUIQIGj6/riCc/+G
 zeIjeEyecz0ifPhS5iAtkZoMbNXGuIbliYztSlXdv8R6s6BILC0muT8oGOP/1kJA
 r6W4ehKIcvg9CB6jXPtWt/7HKdE0m2EOSQM7XCd6V9K5dCK1Mig=
 =CC8e
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-next-for-kalle-2017-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

iwlwifi updates

* Some new PCI IDs;
* A bunch of cleanups;
* The timers update by Kees;
* Add more register dump call-sites;
* A fix for a locking issue in the TX flush code;
* Actual implementation of the TX flush code for A000;
* An optimization to drop RX frames during restart to avoid BA issues;
2017-11-06 12:31:07 +02:00
David S. Miller
6e300769dc wireless-drivers-next patches for 4.15
Mostly fixes this time, but also few new features.
 
 Major changes:
 
 wil6210
 
 * remove ssid debugfs file
 
 rsi
 
 * add WOWLAN support for suspend, hibernate and shutdown states
 
 ath10k
 
 * add support for CCMP-256, GCMP and GCMP-256 ciphers on hardware
   where it's supported (QCA99x0 and QCA4019)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJZ/HSCAAoJEG4XJFUm622b2sQH+wXgE1swS9xp1AfV3hcVLGoJ
 YjLjR3/BAxsIqkYwhswarTDrD3jsOKrL4ywRk+0BAdR7f2BeOYhQXtZqgjvE8cbu
 WWv5LmSwuKM6tF3ujgjQ6yZvgyDHl2d7lZL59EWG05K/yjJuU8ByoUhLKM5IiqPh
 SWXj3ZtydgGZm2eZTPyan+MFz91jw/X23Jm/AaIAxayf+1J4n1lNpc4rRhUxh/oy
 kGLQ2vsVnegSiHJWTboDFPeRha+daBsbf1MQc0Bh7MzDoWcaqSNX5VgrbaRqp35u
 sb9pmPZS4FzvAdU3bJ9AIPa9ujjblEvDp1JIhrfBUqiuTdvXDZ7XtW8kVsJk1RY=
 =MvWY
 -----END PGP SIGNATURE-----

Merge tag 'wireless-drivers-next-for-davem-2017-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
wireless-drivers-next patches for 4.15

Mostly fixes this time, but also few new features.

Major changes:

wil6210

* remove ssid debugfs file

rsi

* add WOWLAN support for suspend, hibernate and shutdown states

ath10k

* add support for CCMP-256, GCMP and GCMP-256 ciphers on hardware
  where it's supported (QCA99x0 and QCA4019)
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-04 18:07:50 +09:00
David S. Miller
2a171788ba Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Files removed in 'net-next' had their license header updated
in 'net'.  We take the remove from 'net-next'.

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-04 09:26:51 +09:00
Ihab Zhaika
57b36f7fcb iwlwifi: add new cards for a000 series
add four new PCI ID'S for a000 series

Signed-off-by: Ihab Zhaika <ihab.zhaika@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:10 +02:00
Ihab Zhaika
7cddbef445 iwlwifi: add new cards for 8265 series
add two new PCI ID'S for 8265 series

Signed-off-by: Ihab Zhaika <ihab.zhaika@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:10 +02:00
Ihab Zhaika
d669fc2d42 iwlwifi: add new cards for 8260 series
add three new PCI ID'S for 8260 series

Signed-off-by: Ihab Zhaika <ihab.zhaika@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:09 +02:00
Shahar S Matityahu
364a1ab91d iwlwifi: drop RX frames during hardware restart
In case of a hardware restart the BA session data in HW is lost
so the reorder buffer simply passes the frames to mac80211 as is
as there is no NSSN set. Instead, we will drop these frames
before they reach the reorder buffer. mac80211 drops such frames anyway,
but we shouldn't rely on that. In addition it saves some
processing time

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:09 +02:00
Kees Cook
8cef5344b5 iwlwifi: mvm: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

The RCU lifetime on baid_data is unclear, so this adds a direct copy of the
rcu_ptr passed to the original callback. It may be possible to improve this
to just use baid_data->mvm->baid_map[baid_data->baid] instead.

Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Sara Sharon <sara.sharon@intel.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:09 +02:00
Luca Coelho
309c4848c0 iwlwifi: mvm: hold mutex when flushing in iwl_mvm_flush_no_vif()
The iwl_mvm_flush_tx_path() function sends a synchronous command to
the firmware.  When doing that, we must hold the mutex.  The
iwl_mvm_flush_no_vif() function was mistakenly not holding the mutex.
Fix it.

Fixes: 6110d9e5bd ("iwlwifi: mvm: Flush non STA TX queues")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:09 +02:00
Sara Sharon
06195639c6 iwlwifi: mvm: add missing implementation of flush for a000 devices
In the mac flush flow, we should flush all existing queues.
Since FW API for a000 devices is flush per RA-TID, simply
flush all stations with all tids.
From FW perspective, asking to flush a TID that doesn't have
a queue is valid, so we can just set all bits in the TID mask.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:09 +02:00
Sara Sharon
435d0827fe iwlwifi: mvm: refactor iwl_mvm_flush_no_vif
This function is very indented and hard to read.
Refactor it.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:09 +02:00
Sara Sharon
cb8550e15b iwlwifi: fix multi queue notification for a000 devices
Currently we return early from sync_rx_queues for a000 devices.
This may cause, in case of a non-empty reorder buffer, a warning
later on since the RX queue isn't getting the notification to
empty it.
A better approach would be to send the notification for the default
queue only.
Do this hard coded for now, until we will have the API to enable
multi queue for a000 devices.

Fixes: bc02946964 ("iwlwifi: mvm: disable RX queue notification for a000 devices")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:09 +02:00
Kirtika Ruchandani
fb12777ab5 iwlwifi: Add more call-sites for pcie reg dumper
Commit a6d24fad00 ("iwlwifi: pcie: dump registers when HW becomes
inaccessible") added a function to dump pcie config registers and
memory mapped registers on a failure. It is currently only accessible
within trans.c. Add it to struct iwl_trans_ops, so that failure cases
in other files can call it.  While there, add a call to this function
from iwl_pcie_load_firmware_chunk in pcie/tx.c, since this is a common
failure case seen on some platforms.

Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org>
[modified the commit message slightly]
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:08 +02:00
Emmanuel Grumbach
4ae827ffc1 iwlwifi: remove host assisted paging
This was used for internal devices that are now deprecated.
All the currently existing devices can do paging without
any help from the host.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:08 +02:00
Emmanuel Grumbach
fb7eba711d iwlwifi: remove dead code for internal devices only
We had a bunch of code that was relevant for internal
devices only. Those devices are now being depreceated.
Kill all the now unneeded code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-11-03 11:56:08 +02:00