Christophe JAILLET
8ba438ef3c
wifi: iwlwifi: mvm: Fix a memory corruption issue
...
A few lines above, space is kzalloc()'ed for:
sizeof(struct iwl_nvm_data) +
sizeof(struct ieee80211_channel) +
sizeof(struct ieee80211_rate)
'mvm->nvm_data' is a 'struct iwl_nvm_data', so it is fine.
At the end of this structure, there is the 'channels' flex array.
Each element is of type 'struct ieee80211_channel'.
So only 1 element is allocated in this array.
When doing:
mvm->nvm_data->bands[0].channels = mvm->nvm_data->channels;
We point at the first element of the 'channels' flex array.
So this is fine.
However, when doing:
mvm->nvm_data->bands[0].bitrates =
(void *)((u8 *)mvm->nvm_data->channels + 1);
because of the "(u8 *)" cast, we add only 1 to the address of the beginning
of the flex array.
It is likely that we want point at the 'struct ieee80211_rate' allocated
just after.
Remove the spurious casting so that the pointer arithmetic works as
expected.
Fixes: 8ca151b568 ("iwlwifi: add the MVM driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Acked-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/23f0ec986ef1529055f4f93dcb3940a6cf8d9a94.1690143750.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-09-11 16:11:44 +02:00
Benjamin Berg
c0a2f81944
wifi: iwlwifi: mvm: send LARI configuration earlier
...
Sending the LARI configuration may trigger calibration, which can have
undesired side effects. Move the command to be send earlier (before the
phy contexts are registered) to avoid unintended side effects.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230620125813.80742497eb3f.I3e599a796290082e6d331ea495a5591d55de4726@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-21 14:02:15 +02:00
Johannes Berg
c4c9545477
wifi: iwlwifi: implement WPFC ACPI table loading
...
We skipped this in the past, but now we will need it for some
platforms. Implement loading the PHY filter configuration IDs
from the WPFC ACPI table. Note that the firmware must also be
aware of the right filter configuration IDs (they're just the
IDs of a filter configuration, not the actual configuration).
Remove the useless hardcoded zeroes while at it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230614123447.035026ea3169.I3a1fc1fe644fefa0d818ee1926c5fc331d68e8a3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-19 12:05:26 +02:00
Johannes Berg
c4fbf6537a
wifi: iwlwifi: mvm: use iwl_mvm_is_vendor_in_approved_list()
...
We have this helper now instead of open-coding the check for
the dmi_tas_approved_list, so use it even here. It was added
for debugfs use, but it's better to be consistent.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230614123446.f3741f5cdef4.I5e0bf522189dc595ee38d05e93994211d32ec0f4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-19 12:05:25 +02:00
Emmanuel Grumbach
1724fc781f
wifi: iwlwifi: mvm: allow ADD_STA not to be advertised by the firwmare
...
Newest firmware don't advertise the version of ADD_STA because it has
been replaced by another command. There are old firmware images
that also don't advertise it. Replace all the checks with a new
inline, and in that check for either MLD API or the ADD_STA
command version.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.4b9305510223.I7cc143d87186f8441e9b8435cc550b76734c7eef@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:20 +02:00
Johannes Berg
10f5ae2194
Merge wireless into wireless-next
...
There are a number of upcoming things in both the stack and
drivers that would otherwise conflict, so merge wireless to
wireless-next to be able to avoid those conflicts.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-07 19:49:36 +02:00
Alon Giladi
331828106e
wifi: iwlwifi: Add support for fragmented pnvm images
...
Add support for fragmented pnvm images, depending on the FW capability.
Signed-off-by: Alon Giladi <alon.giladi@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230606103519.c49bfaf435a9.I0278312e7c3355b224cd870d4f8cf6578d12f03e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 13:44:00 +02:00
Johannes Berg
ead65aa2d5
wifi: iwlwifi: mvm: send time sync only if needed
...
If there's no peer configured then there's no point in sending
the command down to the firmware with an invalid peer address.
Fixes: cf85123a21 ("wifi: iwlwifi: mvm: support enabling and disabling HW timestamping")
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230531194630.0fb9f81f1852.Idcc41b67d1fbb421e5ed9bac2177b948b7b4d1c9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 13:40:47 +02:00
Alon Giladi
06471b67d4
wifi: iwlwifi: Add vendors to TAS approved list
...
Allows vendors to use the time average sar feature.
Signed-off-by: Alon Giladi <alon.giladi@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230531194629.845c205e4def.Iab5c849617ed7e13304e4dfc7def668659439946@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 13:38:41 +02:00
Yedidya Benshimol
d464550bb2
wifi: iwlwifi: mvm: use link ID in missed beacon notification
...
This new version of missed beacon notification uses link_id
instead of mac_id. Also add an option to use link id for
retrieving vif.
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230524203151.17fe1cc632f1.Id1fabb532e2174712fe17d4ad86a2c8c64ae84da@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 13:01:31 +02:00
Alon Giladi
d0246a0e49
wifi: iwlwifi: mvm: fix OEM's name in the tas approved list
...
Fix a spelling mistake.
Fixes: 2856f623ce ("iwlwifi: mvm: Add list of OEMs allowed to use TAS")
Signed-off-by: Alon Giladi <alon.giladi@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230514120631.4090de6d1878.If9391ef6da78f1b2cc5eb6cb8f6965816bb7a7f5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-05-16 10:27:05 -07:00
Gregory Greenman
9e26f098a2
wifi: iwlwifi: mvm: rfi: disable RFI feature
...
This feature depends on a platform bugfix. Until we have a
mechanism that can verify a platform has the required bugfix,
disable RFI.
Fixes: ef3ed33dfc ("wifi: iwlwifi: bump FW API to 77 for AX devices")
Reported-by: Jeff Chua <jeff.chua.linux@gmail.com >
Link: https://lore.kernel.org/linux-wireless/CAAJw_ZvZdFpw9W2Hisc9c2BAFbYAnQuaFFaFG6N7qPUP2fOL_w@mail.gmail.com/
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-05-16 10:16:51 -07:00
Avraham Stern
85eb75c34e
wifi: iwlwifi: mvm: avoid iterating over an un-initialized list
...
The initiator smooth list is initialized only in iwl_mvm_up(), but is
cleared in iwl_mvm_mac_stop. This may result in iterating over the
list before it was initialized in case iwl_mvm_up() failed early.
Fix it by moving the list initialization to an earlier stage.
Fixes: b68bd2e314 ("iwlwifi: mvm: Add FTM initiator RTT smoothing logic")
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.b50b1fe9a576.Ie348ffae110612d2e252ac120a3ba0aea063b1b6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:24 +02:00
Mukesh Sisodiya
5e31b3df86
wifi: iwlwifi: dbg: print pc register data once fw dump occurred
...
Add debug print for different FW program counter details of
different CPU. Program counter pc details will be read from
TLV during init.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230413213309.862790d336a9.I34e2ea05a79e8b2552f7f221bacf3af0166cb9c0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-14 13:14:49 +02:00
Mukesh Sisodiya
d2ccc5c152
wifi: iwlwifi: Update init sequence if tx diversity supported
...
PHY configuration command need to be sent to FW if the tx diversity
with SISO is supported.
This need to be sent to get the init notification from FW.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230413102635.c2121c8694a7.Ibee3dd8765ef4b7504660fa228a7c7eff78920af@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-13 16:30:00 +02:00
Mukesh Sisodiya
e305a408c5
wifi: iwlwifi: mvm: move function sequence
...
Need to move a function definition and actual changes
will be done in following commit.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230413102635.00a6c203712f.I7c099e5c1954f1daa5a5039b98149b6f081e46ae@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-13 16:30:00 +02:00
Johannes Berg
b8a85a1d42
wifi: iwlwifi: mvm: rxmq: report link ID to mac80211
...
Add a fw_id_to_link_sta array in mvm to track the link
STA for each firmware station ID, and then use that to
report the link a frame was received on (since we know
the station ID from firmware).
Notably, this fixes beacon tracking for the correct link
since mac80211 now queues and processes those on the one
link identified by the link ID only.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.c7dd3ec18077.I12ef9eb4a5b8b5c2b9d6bcaa1fda73b59eba39d8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:40 +02:00
Gregory Greenman
d6f6b0d804
wifi: iwlwifi: mvm: add fw link id allocation
...
Driver uses link_id as an index in the array. FW currently can
support only 2 concurrently active links per vif with the ids in the
range 0-3. Add a mapping of dirver link ids to fw link id and track the
number of active link ids.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230328104949.a53e5df49c33.I02b25648d2d5ca370c0697bf19d0d34724eae8a1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:07:55 +02:00
Abhishek Naik
9457077df4
wifi: iwlwifi: mvm: Add debugfs to get TAS status
...
Add debugfs file in mvm to retrieve TAS status per LMAC,
TAS block list, current mcc, OEM name and OEM allowed list.
Signed-off-by: Abhishek Naik <abhishek.naik@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230320122330.8efc8c41efae.I94e1a6efb9c33e2cdbcf4bf3ed2384005397dee9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-22 13:19:29 +01:00
Avraham Stern
cf85123a21
wifi: iwlwifi: mvm: support enabling and disabling HW timestamping
...
Instead of enabling HW timestamping by default every time a station
is connected, disable it by default and enable it only upon request
for a specific station. HW timestamping can be enabled for only one
peer at a time.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230320122330.62b98fbf545b.I450c1017ada7900a71a63d879bb542a08e3166c8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-22 13:16:37 +01:00
Krishnanand Prabhu
1595ecce1c
wifi: iwlwifi: mvm: add support for PTP HW clock (PHC)
...
Add support to enable/disable PHC clock. The PHC clock includes support
for fetching the cross timestamp i.e. a non-atomic snapshot of the current
time from the hardware (WiFi device) clock and system clock (wall-clock)
simultaneously.
Signed-off-by: Krishnanand Prabhu <krishnanand.prabhu@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230320122330.ae1d64f513b9.Ib3b6ad61c9fa2fc5908f1e0d6f59f4af6eec1a77@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-22 13:16:35 +01:00
Solomon Tan
473bc26435
wifi: iwlwifi: Add required space before open '('
...
This patch addresses the error from checkpatch.pl that a space is
required before an open parenthesis.
Signed-off-by: Solomon Tan <solomonbstoner@protonmail.ch >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230314194113.a21ba1967d94.Iaa52fc6517ea9efb3efc7b1b98f4df2a288de1c3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-15 13:25:14 +01:00
Mukesh Sisodiya
834f920ef3
wifi: iwlwifi: yoyo: Add driver defined dump file name
...
Add driver defined dump file name extension for beacon loss
and FW Assert case.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230314194113.2a2ee92995e9.I38fff588e32276796cd757309fc811241f827c7a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-15 13:25:12 +01:00
Alon Giladi
3ecf34118d
wifi: iwlwifi: mvm: allow Microsoft to use TAS
...
Add Microsoft to the list of OEMs which allowed to use TAS.
Signed-off-by: Alon Giladi <alon.giladi@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230305124407.662967fec1cc.Icb30cddc049cb5402fd5ab2ce7f95033e478b1b9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-07 20:15:17 +01:00
Mukesh Sisodiya
b2f20cf289
wifi: iwlwifi: dump: Update check for UMAC valid FW address
...
The error dump base address check for UMAC
need an update based on current hardware.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20221205102808.e4b7fc650144.I46103baf400bb4ae69d82738e402a3903b17c030@changeid
2022-12-07 17:36:43 +02:00
Gregory Greenman
f31f7cd987
wifi: iwlwifi: mei: fix parameter passing to iwl_mei_alive_notif()
...
Pass true explicitly to iwl_mei_alive_notif() when we can be
sure that Alive notification was received. The issue was discovered
by Smatch.
Reported-by: Dan Carpenter <error27@gmail.com >
Link: https://lore.kernel.org/all/Y3uYUEFnMiBY2ABQ@kili/
Link: https://lore.kernel.org/r/20221123225313.83c2251055c1.Ia028357e7ab36dfc2abf85106a5926ee7893a408@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
2022-11-28 17:54:09 +02:00
Avraham Stern
274d9aa973
wifi: iwlwifi: mvm: return error value in case PLDR sync failed
...
In case PLDR sync is required but iwlmei failed to get a response
from CSME, the device cannot be brought up, so return an error
value.
Reported-by: Dan Carpenter <error27@gmail.com >
Link: https://lore.kernel.org/all/Y3uYUEFnMiBY2ABQ@kili/
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Link: https://lore.kernel.org/r/20221123225313.08b345123f83.I13bfacc2f6da7de8ada90127fe7108d1bb73af92@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
2022-11-28 17:54:03 +02:00
Avraham Stern
b8133439bd
wifi: iwlwifi: mvm: trigger PCI re-enumeration in case of PLDR sync
...
When doing the PLDR flow, the fw goes through a re-read and needs
PCI re-enumeration in order to recover. In this case, skip the mac
start retry and fw dumps as all the fw and registers are invalid
until the PCI re-enumeration.
In addition, print the register that shows the re-read counter
when loading the fw.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Link: https://lore.kernel.org/r/20221123225313.9ae77968961e.Ie06e886cef4b5921b65dacb7724db1276bed38cb@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
2022-11-28 17:53:58 +02:00
Daniel Gabay
56731878c6
wifi: iwlwifi: mvm: print OTP info after alive
...
These are register values which are needed for debug regardless of alive
fail/success.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Link: https://lore.kernel.org/r/20221123225313.a5ae3679491b.Ic618934df084a9b269e56d892665523c79e40eee@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
2022-11-28 17:53:41 +02:00
Avraham Stern
733eb54f62
wifi: iwlwifi: mei: implement PLDR flow
...
If the FW needs to do OTP re-read, the driver must notify CSME before
loading the FW so CSME will not try to access the NIC during the
re-read. Once the alive notification is received, CSME is notified
that NIC access is allowed again.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20221102165239.49eb8c6d455f.I7f0a5debb2d3d662a4151199bbec24613f324c13@changeid
2022-11-10 13:27:00 +02:00
Avraham Stern
5aa7ce31bd
wifi: iwlwifi: mei: make sure ownership confirmed message is sent
...
It is possible that CSME will try to take ownership while the driver
is stopping. In this case, if the CSME takes ownership message arrives
after the driver started unregistering, the iwl_mei_cache->ops is
already invalid, so the host will not answer with the ownership
confirmed message.
Similarly, if the take ownership message arrived after the mac was
stopped or when iwl_mvm_up() failed, setting rfkill will not trigger
sending the confirm message. As a result, CSME will not take
ownership, which will result in a disconnection.
Fix it by sending the ownership confirmed message immediately in such
cases.
Fixes: 2da4366f9e ("iwlwifi: mei: add the driver to allow cooperation with CSME")
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20221030191011.b2a4c009e3e6.I7f931b7ee8b168e8ac88b11f23bff98b7ed3cb19@changeid
2022-11-10 13:26:00 +02:00
Mordechay Goodstein
184f10db5f
iwlwifi: mvm: add OTP info in case of init failure
...
This helps to understand HW issues that can happen while
initializing the nic.
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20220517120045.48464938b27a.I9b381f0da5e0636ad6a5f6c13f98edb9031b50fb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2022-05-18 12:54:08 +02:00
Miri Korenblit
b20bdd9cc9
iwlwifi: mvm: Don't fail if PPAG isn't supported
...
When we're copying the PPAG table into the cmd structure we're failing
if the table doesn't exist in ACPI or is invalid, or if the FW doesn't
support PPAG setting etc.
This is wrong because those are valid scenarios. Fix this by not
failing in those cases.
Fixes: e8e10a37c5 ("iwlwifi: acpi: move ppag code from mvm to fw/acpi")
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Acked-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/iwlwifi.20220322173828.fa47f369b717.I6a9c65149c2c3c11337f3a802dff22f514a3a436@changeid
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2022-03-22 16:18:27 -07:00
Jakub Kicinski
0b3660695e
Merge tag 'wireless-next-2022-03-11' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
...
Johannes Berg says:
====================
brcmfmac
* add BCM43454/6 support
rtw89
* add support for 160 MHz channels and 6 GHz band
* hardware scan support
iwlwifi
* support UHB TAS enablement via BIOS
* remove a bunch of W=1 warnings
* add support for channel switch offload
* support 32 Rx AMPDU sessions in newer devices
* add support for a couple of new devices
* add support for band disablement via BIOS
mt76
* mt7915 thermal management improvements
* SAR support for more mt76 drivers
* mt7986 wmac support on mt7915
ath11k
* debugfs interface to configure firmware debug log level
* debugfs interface to test Target Wake Time (TWT)
* provide 802.11ax High Efficiency (HE) data via radiotap
ath9k
* use hw_random API instead of directly dumping into random.c
wcn36xx
* fix wcn3660 to work on 5 GHz band
ath6kl
* add device ID for WLU5150-D81
cfg80211/mac80211
* initial EHT (from 802.11be) support
(EHT rates, 320 MHz, larger block-ack)
* support disconnect on HW restart
* tag 'wireless-next-2022-03-11' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (247 commits)
mac80211: Add support to trigger sta disconnect on hardware restart
mac80211: fix potential double free on mesh join
mac80211: correct legacy rates check in ieee80211_calc_rx_airtime
nl80211: fix typo of NL80211_IF_TYPE_OCB in documentation
mac80211: Use GFP_KERNEL instead of GFP_ATOMIC when possible
mac80211: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
rtw89: 8852c: process logic efuse map
rtw89: 8852c: process efuse of phycap
rtw89: support DAV efuse reading operation
rtw89: 8852c: add chip::dle_mem
rtw89: add page_regs to handle v1 chips
rtw89: add chip_info::{h2c,c2h}_reg to support more chips
rtw89: add hci_func_en_addr to support variant generation
rtw89: add power_{on/off}_func
rtw89: read chip version depends on chip ID
rtw89: pci: use a struct to describe all registers address related to DMA channel
rtw89: pci: add V1 of PCI channel address
rtw89: pci: add struct rtw89_pci_info
rtw89: 8852c: add 8852c empty files
MAINTAINERS: add devicetree bindings entry for mt76
...
====================
Link: https://lore.kernel.org/r/20220311124029.213470-1-johannes@sipsolutions.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2022-03-11 13:00:17 -08:00
Matt Chen
e8e10a37c5
iwlwifi: acpi: move ppag code from mvm to fw/acpi
...
Move the ppag code to fw/acpi to keep consistency
with the other ACPI handling we do.
Signed-off-by: Matt Chen <matt.chen@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20220304131517.7f250088b443.I61e64c2758ad178da729ce00428287cc94430eed@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-03-10 09:23:29 +02:00
Mukesh Sisodiya
5053a45110
iwlwifi: yoyo: disable IMR DRAM region if IMR is disabled
...
Disable IMR region if it is enabled in the TLVs,
but disabled at runtime by the FW.
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.20220304131517.2a696656a161.I99705472a8838121ffaca72977015dc2069549b9@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-03-10 09:23:27 +02:00
Ayala Barazani
b0aa02b3de
iwlwifi: mvm: add a flag to reduce power command.
...
Add a flags bitfield in REDUCED_TX_POWER_CMD, and
send it as is to FW.
Signed-off-by: Ayala Barazani <ayala.barazani@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20220304131517.55c2f014f5ee.Iceb632f620de959800f979e212f0dc20240f9d38@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-03-10 09:23:26 +02:00
Dan Carpenter
583d18336a
iwlwifi: mvm: Fix an error code in iwl_mvm_up()
...
Return -ENODEV instead of success on this error path.
Fixes: dd36a507c8 ("iwlwifi: mvm: look for the first supported channel when add/remove phy ctxt")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/20210816183930.GA2068@kili
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:56 +02:00
Mordechay Goodstein
f2f17ca08d
iwlwifi: mvm: add additional info for boot info failures
...
This info helps for additional info in case we have issues
with HPM state at boot time.
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20220205112029.e3530bf30f1f.Ib354675937352f6e4a992f1d5d49f2f38acfe2e5@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:54 +02:00
Ayala Barazani
8f323d0685
iwlwifi: mvm: Disable WiFi bands selectively with BIOS
...
The BIOS can contain data about sets of disabled channels.
Pass the bitmap to the firmware if present.
Signed-off-by: Ayala Barazani <ayala.barazani@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20220205112029.9e6d9209293d.If5b22a9afe5f9dac9c7c45e68e494ffce4df8910@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:54 +02:00
Mordechay Goodstein
a7de31d572
iwlwifi: mvm: add additional info for boot info failures
...
This info helps for additional info in case we have issues
with OTP at boot time.
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20220205112029.7971a6d70653.Icb3ee1e5d52e5437531dadeda63e32719b44b645@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:54 +02:00
Johannes Berg
86371b735f
iwlwifi: remove unused macros
...
Found with W=2, remove unused macros in C files. In one case
move the macro under the corresponding ifdef.
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.20220204122220.068c6052689b.Idbb7a87c2fd93619c1765c7f4ed15190c3fef2a7@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:53 +02:00
Mukesh Sisodiya
c0941ace9a
iwlwifi: yoyo: add IMR DRAM dump support
...
Support debug collection of the platform IMR memory region,
where data is copied by FW during d3 state
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.20220129105618.715f04ecc635.Ib89a6caa06c1324c1c0dd3f9f4cf7407f2857155@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:51 +02:00
Johannes Berg
3827cb59b3
iwlwifi: avoid void pointer arithmetic
...
Avoid void pointer arithmetic since it's technically
undefined and causes warnings in some places that use
our code.
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.20220128153014.e349104ecd94.Iadc937f475158b9437becdfefb361a97e7eaa934@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:50 +02:00
Johannes Berg
971cbe50e6
iwlwifi: make iwl_fw_lookup_cmd_ver() take a cmd_id
...
Instead of taking the group/command separately, make the function
take a combined command ID. In many cases, this allows us to pass
an existing command ID (e.g. cmd.id), or introduce a new variable
for it, so that we don't use the command ID twice.
This way, we can also use LONG_GROUP implicitly, so we don't need
to spell that out for many commands.
Apart from mvm.h, fw/img.{c,h} changes and some copyright and
indentation updates, this was done with spatch:
@@
identifier cmd;
expression fw, G, C, def;
@@
struct iwl_host_cmd cmd = {
.id = WIDE_ID(G, C),
...
};
...
-iwl_fw_lookup_cmd_ver(fw, G, C, def)
+iwl_fw_lookup_cmd_ver(fw, cmd.id, def)
@@
identifier cmd;
expression fw, C, def;
@@
struct iwl_host_cmd cmd = {
.id = C,
...
};
...
-iwl_fw_lookup_cmd_ver(fw, \(IWL_ALWAYS_LONG_GROUP\|LONG_GROUP\), C, def)
+iwl_fw_lookup_cmd_ver(fw, cmd.id, def)
@@
identifier func;
expression fw, G, C, mvm, flags, cmd, size, def;
type rettype;
@@
rettype func(...)
{
+u32 cmd_id = WIDE_ID(G, C);
...
-iwl_fw_lookup_cmd_ver(fw, G, C, def)
+iwl_fw_lookup_cmd_ver(fw, cmd_id, def)
...
-iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(G, C), flags, cmd, size)
+iwl_mvm_send_cmd_pdu(mvm, cmd_id, flags, cmd, size)
...
}
@@
identifier func;
expression fw, G, C, mvm, flags, cmd, size, def;
type rettype;
@@
rettype func(...)
{
+u32 cmd_id = C;
...
-iwl_fw_lookup_cmd_ver(fw, \(IWL_ALWAYS_LONG_GROUP\|LONG_GROUP\), C, def)
+iwl_fw_lookup_cmd_ver(fw, cmd_id, def)
...
-iwl_mvm_send_cmd_pdu(mvm, C, flags, cmd, size)
+iwl_mvm_send_cmd_pdu(mvm, cmd_id, flags, cmd, size)
...
}
@@
expression fw, C, def;
@@
-iwl_fw_lookup_cmd_ver(fw, \(IWL_ALWAYS_LONG_GROUP\|LONG_GROUP\), C, def)
+iwl_fw_lookup_cmd_ver(fw, C, def)
@@
expression fw, C, G, def;
@@
-iwl_fw_lookup_cmd_ver(fw, G, C, def)
+iwl_fw_lookup_cmd_ver(fw, WIDE_ID(G, C), def)
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.20220128153014.c4ac213cef5c.I6fd9a4fcbcf16ef3a3ae20a2b08ee54ebe06f96f@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:50 +02:00
Johannes Berg
c861133159
iwlwifi: mvm: fw: clean up hcmd struct creation
...
This is valid, but pretty uncommon in the driver, clean up
the code here a bit to use an initializer.
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.20220128153014.1717817392df.I75add2a50a69d28eaebfd67e5a0524bf43119a81@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:50 +02:00
Johannes Berg
f0c8642738
iwlwifi: prefer WIDE_ID() over iwl_cmd_id()
...
The order of arguments for iwl_cmd_id() is confusing, and the
version is always 0 and thus a useless argument. Prefer the
WIDE_ID() macro (which needs to be a macro due to use in switch
cases etc.) over the iwl_cmd_id() function.
Obviously done with spatch:
@@
expression G, C;
@@
-iwl_cmd_id(C, G, 0)
+WIDE_ID(G, C)
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.20220128153014.cc4f9d1a2e9b.Ieb023cd773ea22e819d1ef1c37ae857ecc1a839d@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:50 +02:00
Ayala Barazani
6da7ba3a5f
iwlwifi: mvm: allow enabling UHB TAS in the USA via ACPI setting
...
Read a new bit defined in ACPI WTAS that allows OEMs to specify whether
TAS is allowed in UHB (6-7GHz) in the USA. This can be used by OEMs
that got certified to use this feature.
Signed-off-by: Ayala Barazani <ayala.barazani@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20220128153014.1d2ae1e6bcdb.I177929ed01ed7bf4614ea0f6db2af9e52de13316@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:49 +02:00
Luca Coelho
5f06f6bf8d
iwlwifi: mvm: don't send SAR GEO command for 3160 devices
...
SAR GEO offsets are not supported on 3160 devices. The code was
refactored and caused us to start sending the command anyway, which
causes a FW assertion failure. Fix that only considering this feature
supported on FW API with major version is 17 if the device is not
3160.
Additionally, fix the caller of iwl_mvm_sar_geo_init() so that it
checks for the return value, which it was ignoring.
Reported-by: Len Brown <lenb@kernel.org >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Fixes: 78a19d5285 ("iwlwifi: mvm: Read the PPAG and SAR tables at INIT stage")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/iwlwifi.20220128144623.96f683a89b42.I14e2985bfd7ddd8a8d83eb1869b800c0e7f30db4@changeid
2022-02-03 10:26:02 +02:00
Johannes Berg
73ca8763eb
iwlwifi: mvm: remove card state notification code
...
This notification ID was actually used for something else we
never implemented, but luckily we only had some debug code
here. Just remove it.
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.20211219132536.a67b5b9db259.Ic55b306fcd2a3525b3993f4b7e00622dd95053ba@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-12-21 12:38:16 +02:00