Miri Korenblit
82cdbd11b6
iwlwifi: mvm: Support version 3 of tlc_update_notif.
...
As part of the new rate_n_flags, a new version of tlc_update_notif
was added in FW in order to support the new rate_n_flags.
Add support for the new version, and move the all API to use the
new rate_n_flags only (if FW supports the old one - convert it).
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.9fc0cb5d5898.I1f88e02317f79f1be7f792c01236d836045a44b3@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:49:00 +03:00
Miri Korenblit
9998f81e4b
iwlwifi: mvm: convert old rate & flags to the new format.
...
As part of the new rate & flags, convert an old format rate to
the new. This is needed if the driver supports the new format
but the FW supports the old one.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.1ea5263dafec.Iadffe7cb26554d4c23c9242eb2ec8326306202a9@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:49:00 +03:00
Miri Korenblit
179354a663
iwlwifi: mvm: add definitions for new rate & flags
...
As a part of preparing to the new rate & flags,
add new needed definitions.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.41563bea6610.I51a886fa75cca723c81877b386ba41b2a9db1122@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:49:00 +03:00
Miri Korenblit
48c6ebc13c
iwlwifi: mvm: update definitions due to new rate & flags
...
As a part of preparing to the new rate & flags version
Update the relevant definitions and use them.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.5862bf4f14c4.Ib476b5443faa085539b79d49a0aebd81a213b42f@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:49:00 +03:00
Johannes Berg
fad92a1d11
iwlwifi: parse debug exclude data from firmware file
...
Parse the memory dump exclusion TLVs from the firmware file
and save the data to be able to apply them later upon dump.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.ec280bcb32cb.Iac0da0e22d7c3c0e237867c9113a06ddd95c7a51@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:49:00 +03:00
Johannes Berg
fdb70083dd
iwlwifi: fw dump: add infrastructure for dump scrubbing
...
In firmware dumps, currently all kinds of key material may be
included, e.g. in host commands (if firmware crashes during the
processing of a key-related command) or in the TX FIFO(s) if
we have been using in-TX-command key material.
Additionally, some firmware versions will advertise sections
of their internal data to not dump, due to them containing some
sensitive data.
Add some infrastructure to allow scrubbing this data out, as
dependent on the opmode's idea of what will need to be done.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.360cc8fe55b1.Ie3bd3ece38043969f7e116e61a6ec1197a58d78b@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:59 +03:00
Johannes Berg
34c4eca167
iwlwifi: api: fix struct iwl_wowlan_status_v7 kernel-doc
...
This was mislabeled as struct iwl_wowlan_status, fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.f2ff92fcbe4d.Id2b8edd2160d9a703a7a2744e1139017cfd958c0@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:59 +03:00
Johannes Berg
98c8bd77e6
iwlwifi: fix fw/img.c license statement
...
We still had the entire license statement here, but with BSD,
so the SPDX tag was not matching the actual text. Fix that
and remove all the texts since they're no longer needed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.328c2b33081c.Ib3570e8f214538a878204cc2b0b612b5ed0571b3@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:59 +03:00
Johannes Berg
854fe828e5
iwlwifi: remove contact information
...
The list address is going away, and the postal address isn't
useful, remove all the contact information.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017113927.f73e3b6384cb.I967fd394995461277eafa149bb25cefd1673751e@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:59 +03:00
Johannes Berg
3d563f1290
iwlwifi: api: remove unused RX status bits
...
These bits are unused and don't actually exist in the firmware
API any longer. Remove them.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017113927.022a9f87fdbd.Iae7b8a0196b6e94f9dc525e92a541a28374b0cac@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:58 +03:00
Johannes Berg
e79b2fc938
iwlwifi: add some missing kernel-doc in struct iwl_fw
...
The phy integration string members were missed, add them.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017113927.8aa65feeda5f.Idf492c939f7f8856da09c5017c16b8b88438395d@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:58 +03:00
Miri Korenblit
57b7b345d2
iwlwifi: mvm: Remove antenna c references
...
Since antenna c is not in use and won't be relevant after the new rate &
flags, remove all it's references
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017113927.5e39106ec75b.I4281edc844f734bf9591396a5cc8009ad37ccda8@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:58 +03:00
Avraham Stern
8a2c151623
iwlwifi: mvm: add support for 160Mhz in ranging measurements
...
Add support for 160Mhz bandwidth in ranging measurements for
initiator and responder. Advertise 160Mhz in the supported
bandwidths for ranging.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017113927.32a13ac0f4d4.I883492648518cc5067a2f91b7ecf8bfa55f6876a@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:58 +03:00
Matti Gottlieb
595c230b95
iwlwifi: Start scratch debug register for Bz family
...
Start scratch debug register for Bz family.
This register is used for FW debug, and the driver
should start this register with a fixed value, during
init, and upon an error, should read it, and add it to
the dump.
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210826224715.609ad58a49f3.I05c351233601ecc51dddfa5df69ace292216eb95@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:40:58 +03:00
Matti Gottlieb
1f171f4f14
iwlwifi: Add support for getting rf id with blank otp
...
When having a blank OTP the only way to get the rf id
and the cdb info is from prph registers.
Currently there is some implementation for this, but it
is located in the wrong place in the code (should be before
trying to understand what HW is connected and not after),
and it has a partial implementation.
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210826224715.820c2ae18c2b.Iec9b2e2615ce65e6aff5ce896589227a7030f4cf@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:40:57 +03:00
Johannes Berg
e864a77f51
iwlwifi: pnvm: read EFI data only if long enough
...
If the data we get from EFI is not even long enough for
the package struct we expect then ignore it entirely.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Fixes: a1a6a4cf49 ("iwlwifi: pnvm: implement reading PNVM from UEFI")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/iwlwifi.20211016114029.33feba783518.I54a5cf33975d0330792b3d208b225d479e168f32@changeid
2021-10-20 12:31:24 +03:00
Johannes Berg
0f892441d8
iwlwifi: pnvm: don't kmemdup() more than we have
...
We shouldn't kmemdup() more data than we have, that might
cause the code to crash. Fix that by updating the length
before the kmemdup.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/iwlwifi.20211016114029.ab0e64c3fba9.Ic6a3295fc384750b51b4270bf0b7d94984a139f2@changeid
2021-10-20 12:31:24 +03:00
Kees Cook
fa7845cfd5
treewide: Replace open-coded flex arrays in unions
...
In support of enabling -Warray-bounds and -Wzero-length-bounds and
correctly handling run-time memcpy() bounds checking, replace all
open-coded flexible arrays (i.e. 0-element arrays) in unions with the
DECLARE_FLEX_ARRAY() helper macro.
This fixes warnings such as:
fs/hpfs/anode.c: In function 'hpfs_add_sector_to_btree':
fs/hpfs/anode.c:209:27: warning: array subscript 0 is outside the bounds of an interior zero-length array 'struct bplus_internal_node[0]' [-Wzero-length-bounds]
209 | anode->btree.u.internal[0].down = cpu_to_le32(a);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from fs/hpfs/hpfs_fn.h:26,
from fs/hpfs/anode.c:10:
fs/hpfs/hpfs.h:412:32: note: while referencing 'internal'
412 | struct bplus_internal_node internal[0]; /* (internal) 2-word entries giving
| ^~~~~~~~
drivers/net/can/usb/etas_es58x/es58x_fd.c: In function 'es58x_fd_tx_can_msg':
drivers/net/can/usb/etas_es58x/es58x_fd.c:360:35: warning: array subscript 65535 is outside the bounds of an interior zero-length array 'u8[0]' {aka 'unsigned char[]'} [-Wzero-length-bounds]
360 | tx_can_msg = (typeof(tx_can_msg))&es58x_fd_urb_cmd->raw_msg[msg_len];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/can/usb/etas_es58x/es58x_core.h:22,
from drivers/net/can/usb/etas_es58x/es58x_fd.c:17:
drivers/net/can/usb/etas_es58x/es58x_fd.h:231:6: note: while referencing 'raw_msg'
231 | u8 raw_msg[0];
| ^~~~~~~
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Ayush Sawal <ayush.sawal@chelsio.com >
Cc: Vinay Kumar Yadav <vinay.yadav@chelsio.com >
Cc: Rohit Maheshwari <rohitm@chelsio.com >
Cc: Herbert Xu <herbert@gondor.apana.org.au >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Kalle Valo <kvalo@codeaurora.org >
Cc: Jakub Kicinski <kuba@kernel.org >
Cc: Stanislaw Gruszka <stf_xl@wp.pl >
Cc: Luca Coelho <luciano.coelho@intel.com >
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com >
Cc: "Martin K. Petersen" <martin.petersen@oracle.com >
Cc: Alexei Starovoitov <ast@kernel.org >
Cc: Daniel Borkmann <daniel@iogearbox.net >
Cc: Andrii Nakryiko <andrii@kernel.org >
Cc: Martin KaFai Lau <kafai@fb.com >
Cc: Song Liu <songliubraving@fb.com >
Cc: Yonghong Song <yhs@fb.com >
Cc: John Fastabend <john.fastabend@gmail.com >
Cc: KP Singh <kpsingh@kernel.org >
Cc: Johannes Berg <johannes.berg@intel.com >
Cc: Mordechay Goodstein <mordechay.goodstein@intel.com >
Cc: Lee Jones <lee.jones@linaro.org >
Cc: Wolfgang Grandegger <wg@grandegger.com >
Cc: Marc Kleine-Budde <mkl@pengutronix.de >
Cc: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com >
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr >
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz >
Cc: linux-crypto@vger.kernel.org
Cc: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: linux-can@vger.kernel.org
Cc: bpf@vger.kernel.org
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de > # drivers/net/can/usb/etas_es58x/*
Signed-off-by: Kees Cook <keescook@chromium.org >
2021-10-18 12:28:53 -07:00
Randy Dunlap
e4457a45b4
iwlwifi: fix printk format warnings in uefi.c
...
The kernel test robot reports printk format warnings in uefi.c, so
correct them.
../drivers/net/wireless/intel/iwlwifi/fw/uefi.c: In function 'iwl_uefi_get_pnvm':
../drivers/net/wireless/intel/iwlwifi/fw/uefi.c:52:30: warning: format '%zd' expects argument of type 'signed size_t', but argument 7 has type 'long unsigned int' [-Wformat=]
52 | "PNVM UEFI variable not found %d (len %zd)\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53 | err, package_size);
| ~~~~~~~~~~~~
| |
| long unsigned int
../drivers/net/wireless/intel/iwlwifi/fw/uefi.c:59:29: warning: format '%zd' expects argument of type 'signed size_t', but argument 6 has type 'long unsigned int' [-Wformat=]
59 | IWL_DEBUG_FW(trans, "Read PNVM from UEFI with size %zd\n", package_size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
| |
| long unsigned int
Fixes: 84c3c9952a ("iwlwifi: move UEFI code to a separate file")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Reported-by: kernel test robot <lkp@intel.com >
Cc: Kalle Valo <kvalo@codeaurora.org >
Cc: Luca Coelho <luciano.coelho@intel.com >
Cc: linux-wireless@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Jakub Kicinski <kuba@kernel.org >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20210821020901.25901-1-rdunlap@infradead.org
2021-09-06 13:03:06 +03:00
Christophe JAILLET
45010c080e
iwlwifi: pnvm: Fix a memory leak in 'iwl_pnvm_get_from_fs()'
...
A firmware is requested but never released in this function. This leads to
a memory leak in the normal execution path.
Add the missing 'release_firmware()' call.
Also introduce a temp variable (new_len) in order to keep the value of
'pnvm->size' after the firmware has been released.
Fixes: cdda18fbbe ("iwlwifi: pnvm: move file loading code to a separate function")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Acked-by: Luca Coelho <luca@coelho.fi >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/1b5d80f54c1dbf85710fd285243932943b498fe7.1630614969.git.christophe.jaillet@wanadoo.fr
2021-09-05 09:11:10 +03:00
Gregory Greenman
fb3fac5faf
iwlwifi: mvm: introduce iwl_stored_beacon_notif_v3
...
The new version sends station id in the notification. It's still not
used, but need to adjust the code since the offset of the data was
changed.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210826224715.87bc9e45c40b.I770493dc4a293ed8bdf059518e94dccf5dd1b3a7@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:38:17 +03:00
Dror Moshe
b05c1d14a1
iwlwifi: move get pnvm file name to a separate function
...
Move code that generates the pnvm file name to a separate function,
so that it can be reused.
Signed-off-by: Dror Moshe <drorx.moshe@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210826224715.7d2dd18c75a2.I3652584755b9ab44909ddcd09ff4d80c6690a1ad@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:38:16 +03:00
Avraham Stern
bd34ff380e
iwlwifi: mvm: add support for responder config command version 9
...
This version adds the following configuration options:
1. Enable/disable setting the session id in the FTM frame
2. Set the BSS color for the responder
3. Set the minimum and maximum time between measurements for
non trigger based NDP ranging.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210826224715.0a10d43f3d7f.Ice4112c1910cf94babd1c2d492a3a3de9f7ee6cb@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:38:16 +03:00
Avraham Stern
830aa3e7d1
iwlwifi: mvm: add support for range request command version 13
...
This version adds the following configuration options:
1. Set the BSS color for NDP ranging
2. Set the minimum and maximum time between measurements for
non trigger based NDP ranging.
3. Terminate the session in case the responder requests LMR feedback.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210826224715.9dcd5210b7e5.I76f6977cde852de0f251344e279ad85076eef8d6@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:38:15 +03:00
Mukesh Sisodiya
89639e06d0
iwlwifi: yoyo: support for new DBGI_SRAM region
...
new region handling is added for dump collection.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210819183728.af9a24b82396.I53c5f82bd2d0f56fd699e3841c922082d99f1c90@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:37:07 +03:00
Johannes Berg
8a433cb64e
iwlwifi: fw: fix debug dump data declarations
...
The debug dump ranges aren't just an array of such ranges
since each range has a variable size. Therefore, the use
of a struct array is misleading at best.
Change it to be a u8 data[] instead of the struct array,
the code doesn't significantly change since it's actually
doing things correctly now.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210819183728.693c9891097d.Idcaab1fd659e8be2f56be647b2534befd61a4460@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:37:06 +03:00
Johannes Berg
394f419296
iwlwifi: api: remove datamember from struct
...
We don't use this, but we embed this struct elsewhere and
having structs with flexible arrays embedded isn't quite
right, with sparse (for example) complaining. Remove the
data[] member in this case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210819183728.72ca1232b27c.I6ec766691b89670e1683f9fc0fbd12648309a574@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:37:06 +03:00
Luca Coelho
40063f6028
iwlwifi: acpi: fill in SAR tables with defaults
...
If the tables we get in the iwl_sar_set_profile() is smaller than the
revision we support, we need to fill the values with 0. Make sure
that's the case.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210819183728.7fb9716db7ba.I75541846e0720f80695186ba39398133c8758280@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:37:05 +03:00
Luca Coelho
c5b42c674a
iwlwifi: acpi: fill in WGDS table with defaults
...
The tables we store are the larger of all the revisions, so we need to
fill in the values that we don't get from ACPI when using older
revisions.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210819183728.01b12461a30b.I08d1f9154f26eca25c44616efdb5223bcc1935f3@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:37:05 +03:00
Luca Coelho
664c011b76
iwlwifi: acpi: support reading and storing WGDS revision 2
...
Revisions 0 and 1 are identical, so we were already supporting that.
But revision 2 has a different size, so we have to try to read them
separately.
Add support for this new revision.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.78e441b16f9c.I2d79492f05624ddd02c533c673811a36eaf8a396@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:10 +03:00
Miri Korenblit
78a19d5285
iwlwifi: mvm: Read the PPAG and SAR tables at INIT stage
...
We used to read the PPAG, WRDS, EWRD, WGDS tables from ACPI
in the load stage only. This prevented vendor commands from
being executed before bringing the interface up. Move reading those tables
to INIT stage.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.ce3b60f0b426.I3643bf00e714aae930880cc7d6cf390b142eaccb@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:10 +03:00
Johannes Berg
e6344c0602
iwlwifi: fw: correctly limit to monitor dump
...
In commit 79f033f6f2 ("iwlwifi: dbg: don't limit dump decisions
to all or monitor") we changed the code to pass around a bitmap,
but in the monitor_only case, one place accidentally used the bit
number, not the bit mask, resulting in CSR and FW_INFO getting
dumped instead of monitor data. Fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.774fd8729a33.Ic985a787071d1c0b127ef0ba8367da896ee11f57@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:09 +03:00
Abhishek Naik
19426d5430
iwlwifi: skip first element in the WTAS ACPI table
...
By mistake we were considering the first element of the WTAS wifi
package as part of the data we want to rid, but that element is the wifi
package signature (always 0x07), so it should be skipped.
Change the code to read the data starting from element 1 instead.
Signed-off-by: Abhishek Naik <abhishek.naik@intel.com >
Fixes: 28dd7ccdc5 ("iwlwifi: acpi: read TAS table from ACPI and send it to the FW")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.ff8148197b15.I70636c04e37b2b57a5df3ce611511f62203d27a7@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:09 +03:00
Luca Coelho
5bf7a9eddd
iwlwifi: convert flat GEO profile table to a struct version
...
The GEO profiles have been stored in single-dimension arrays and the
access has been done via a single index. We will soon need to support
different revisions of this table, which will make the flat array even
harder to handle. To prepare for that, convert the single-dimension
array to a struct with substructures.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.56f3506411a2.I600ed3708d19f2263a5a8d143f6711d08499bbb0@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:09 +03:00
Luca Coelho
de95c9288a
iwlwifi: remove unused ACPI_WGDS_TABLE_SIZE definition
...
When we started supporting the new FW API for the geo profiles, we
stopped using this definition, but left it there. Remove it now.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.91dec6fad3e8.Ica42d5538d83b1407efe0c441c61aa8830e7496d@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:08 +03:00
Luca Coelho
51266c11ce
iwlwifi: support reading and storing EWRD revisions 1 and 2
...
As an extension to the WRDS support for revisions 1 and 2, do the same
for the EWRD tables. These tables have a very similar format to the
WRDS table, so most of the code is similar.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.2d5494de683c.Ia024b1368873d488906a639e29454cbbdc788d03@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:08 +03:00
Luca Coelho
2a8084147b
iwlwifi: acpi: support reading and storing WRDS revision 1 and 2
...
Change the SAR profile tables storage to revision 2 regardless of the
revision we read from ACPI. Revision 2 is a superset of revision 1,
which is in turn a superset of revision 0, so they can all be stored
inside revision 2.
Add support for reading and storing also revisions 1 and 2, whose only
difference is the number of chains and number of sub-bands. So most
of the code revolves around passing different chain and sub-band
sizes.
With this patch we still pass only revision 0 to the firmware, but
that will be changed in a separate patch.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.2edad09415c8.I36297aef90a9ec6a3ea1bf1a151a62f272826d59@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:08 +03:00
Luca Coelho
8ecf0477b9
iwlwifi: pass number of chains and sub-bands to iwl_sar_set_profile()
...
The number of chains and sub-bands read from the ACPI tables varies
depending on the revision. Pass these numbers to the
iwl_sar_set_profile() function in order to make using different
revisions easier.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805141826.905b54c398f8.I9bac8c3bc3b1b6bbe813de53746daee33e53fc86@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:36:07 +03:00
Luca Coelho
dac7171c81
iwlwifi: remove ACPI_SAR_NUM_TABLES definition
...
This definition was only used to pass the size of the tables in the FW
API to the iwl_sar_select_profile() function, but we should actually
pass the definition from the FW API file. We don't have the concept
of tables in the ACPI definition, so we can remove it.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805130823.00b5084be918.I18efb3c45bffacfa9a356c2c8d34e5ffbb3eb423@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:35:18 +03:00
Luca Coelho
81870d138d
iwlwifi: convert flat SAR profile table to a struct version
...
The SAR profiles have been stored in single-dimension arrays and the
access has been done via a single index. We will soon need to support
different revisions of this table, which will make the flat array even
harder to handle. To prepare for that, convert the single-dimension
array to a struct with substructures.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805130823.01530088097f.I903c236a574c7e4c0fc4db101fc39c0f5415ca43@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:35:18 +03:00
Luca Coelho
248e7e2a1d
iwlwifi: rename ACPI_SAR_NUM_CHAIN_LIMITS to ACPI_SAR_NUM_CHAINS
...
The "LIMITS" in the macro name don't have much meaning, so remove it
to make the macro shorter and better reflect that this is the number
of chains that we have limits for.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805130823.65591c9fa2af.Ie7e4ba94c903ef444cb07df61891394c11c7c864@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:35:17 +03:00
Johannes Berg
79e561f0f0
iwlwifi: mvm: d3: implement RSC command version 5
...
In later firmware we haven't needed the TSC anyway since
we have it already (and firmware image doesn't change),
but the new version adds the ability to send down replay
counters for more than one GTK. Implement that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210805130823.28cd065e8c4a.Ic8406a78ee46b07e0ca1b8199522ef08ec6eef53@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:35:17 +03:00
Johannes Berg
199d895f47
iwlwifi: mvm: support new station key API
...
The new version 3 of the station key API has gotten rid of the
strange hole in the sequence counter values, support that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210802215208.39a00ca1a1a6.Ifb4adeb4edd2b72232046dd2d59c0b3732f497c2@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:34:27 +03:00
Ilan Peer
35fc5feca7
iwlwifi: mvm: Fix umac scan request probe parameters
...
Both 'iwl_scan_probe_params_v3' and 'iwl_scan_probe_params_v4'
wrongly addressed the 'bssid_array' field which should supposed
to be any array of BSSIDs each of size ETH_ALEN and not the
opposite. Fix it.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210802215208.04146f24794f.I90726440ddff75013e9fecbe9fa1a05c69e3f17b@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:34:26 +03:00
Mukesh Sisodiya
e75bc5f3f1
iwlwifi: yoyo: cleanup internal buffer allocation in D3
...
With recent changes in the firmware SRAM debug during D3 is
enabled by default and need not be enabled by driver.
cleaning the code to align the same.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210802215208.8535203d0ef7.Ib1695ce5de921b0472d0b1052e729e071573b863@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:34:20 +03:00
Tom Rix
2b06127df0
iwlwifi: remove trailing semicolon in macro definition
...
The macro use will already have a semicolon.
Signed-off-by: Tom Rix <trix@redhat.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210802172232.3db450ebbb3c.Ic63f85b85a043256318da49d7b5a63f7dddf3986@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:33:24 +03:00
Ilan Peer
16cff731a3
iwlwifi: mvm: Add support for hidden network scan on 6GHz band
...
Add support for discovery of hidden networks on the 6GHz band,
by including the scan request direct SSIDs in the FW scan request
command:
- In case a short SSID matches one of the direct SSIDs in the scan
request command, add the matching SSID in the same offset in the
'direct_ssids' array.
- Otherwise, add the SSID in one of the available slots.
Additionally, as a preparation to handle hidden APs, refactor
iwl_mvm_umac_scan_cfg_channels_v6_6g() the function.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210802170640.ffb540a70212.Ia2bb9bc9435b833820bcc7dc30adcedb5a5a9869@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:32:22 +03:00
Luca Coelho
2a1d2fcf2b
iwlwifi: print PNVM complete notification status in hexadecimal
...
This value is not a simple incrementing integer, it contains some
flags as well, so reading it in hexadecimal is easier. Change the
print to do it in hex instead of decimal.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210802170640.5e35f930d0ed.I5f94575a835f060bdc8ed3477871256f8a2cbaaa@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:32:22 +03:00
Johannes Berg
b8221b0f75
iwlwifi: prepare for synchronous error dumps
...
In some cases it may be necessary to synchronously create
a firmware error report, add the necessary infrastructure
for this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210802170640.481b6642f0fc.I7c9c958408a285e3d19aceed2a5a3341cfc08382@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:32:21 +03:00
Shaul Triebitz
1269ba1ce3
iwlwifi: mvm: set BROADCAST_TWT_SUPPORTED in MAC policy
...
If broadcast TWT is supported in the BSS, tell the
firmware about it by setting the BROADCAST_TWT_SUPPORTED
in the MAC context command.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210802170640.736c3b1bc915.I10583bb6f808aa60954da26106bbc8c26620cbe8@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-08-26 23:32:18 +03:00