Johannes Berg
4540568136
wifi: mac80211: handle TPE element during CSA
...
Handle the transmit power envelope (TPE) element during
channel switch, applying it when the channel switch is
done.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506215543.486c33157d18.Idf971ad801b6961c177bdf42cc323fd1a4ca8165@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 11:28:56 +02:00
Johannes Berg
f81747a9ad
wifi: mac80211: handle wider bandwidth OFDMA during CSA
...
During channel switch, track the AP configuration in the
chanreq, so that wider bandwidth OFDMA is taken into
account correctly, since multiple channel contexts may
be needed due to sharing not being possible due to
wider bandwidth OFDMA.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506215543.b2c5a72dac1b.I69f65cb2e75d4a49a174b1aede68bf8ff0a3cab3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 11:28:54 +02:00
Johannes Berg
344d18cec2
wifi: mac80211: collect some CSA data into sub-structs
...
Collect the CSA data in ieee80211_link_data_managed and
ieee80211_link_data into a csa sub-struct to clean up a
bit and make adding new things more obvious.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506215543.29f954b1f576.I9a683a9647c33d4dd3011aade6677982428c1082@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 11:28:51 +02:00
Johannes Berg
7ef8f6821d
wifi: mac80211: mlme: handle cross-link CSA
...
If we see a channel switch announcement on one link for
another, handle that case and start the CSA. The driver
can react to this in whatever way it needs. The stack
will have the ability to track it via the RNR/MLE in the
reporting link's beacon if it sees it for inactive links
and adjust everything accordingly.
Note that currently the timings for the CSA aren't set,
the values are only used by the Intel drivers, and they
don't need this for newer devices that support MLO, so
I've left it out for now.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240415112355.4d34b6a31be7.Ie8453979f5805873a8411c99346bcc3810cd6476@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 11:28:49 +02:00
Johannes Berg
2d33ecf5d0
wifi: cfg80211: restrict operation during radar detection
...
Just like it's not currently possible to start radar
detection while already operating, it shouldn't be
possible to start operating while radar detection is
running. Fix that.
Also, improve the check whether operating (carrier
might not be up if e.g. attempting to join IBSS).
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506211158.ae8dca3d0d6c.I7c70a66a5fbdbc63a78fee8a34f31d1995491bc3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 11:28:48 +02:00
Johannes Berg
ce9e660ef3
wifi: mac80211: move radar detect work to sdata
...
At some point we thought perhaps this could be per link, but
really that didn't happen, and it's confusing. Radar detection
still uses the deflink to allocate the channel, but the work
need not be there. Move it back.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506211311.43bd82c6da04.Ib39bec3aa198d137385f081e7e1910dcbde3aa1b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 11:28:44 +02:00
Anjaneyulu
48443a4a1c
wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v11
...
Add support for enable/disable 11be for china and South Korea by
reading DSM function 12 from UEFI or ACPI and sending it to the FW.
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512152312.037613d03c87.I4e5ee63c0dbdd4bd6c48daee7b0c88462b702423@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:04 +02:00
Emmanuel Grumbach
6584b9d0aa
wifi: iwlwifi: move code from iwl-eeprom-parse to dvm
...
Move code that is DVM only to dvm.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512152312.9a1b6ef116e0.I217a513f544d5288a7760d265f51419e81abfd9d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:04 +02:00
Emmanuel Grumbach
b476564b90
wifi: iwlwifi: kill iwl-eeprom-read
...
This is used by dvm only, move to dvm.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512152312.72f4bf256c8d.I7433bda9b0fc9eece5210db2cb90c2f03973f5ec@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:04 +02:00
Miri Korenblit
46144103ac
wifi: iwlwifi: mvm: don't skip link selection
...
If we exit EMLSR due to a IWL_MVM_ESR_EXIT*, a MLO scan followed by a
link selection is scheduled with a delay of 30 seconds.
If during that 30 seconds EMLSR was blocked and unblocked
(IWL_MVM_ESR_BLOCKED*), we would still want to get the needed data from
the MLO scan and select link accordingly, and not return immediately to
EMLSR.
Fixes: 2f33561ea8 ("wifi: iwlwifi: mvm: trigger link selection after exiting EMLSR")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://msgid.link/20240512152312.caab27a8dd8f.I63f67e213d5e05416f71513a8d914917d59aa44f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:04 +02:00
Johannes Berg
3f3126515f
wifi: iwlwifi: mvm: add mvm-specific guard
...
Add and use an mvm-specific guard for the mvm mutex.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512152312.7391425b3af2.I1b109f56753dd3f35602dd2c5cf6e1e35aee313d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:03 +02:00
Johannes Berg
9d42be9b18
wifi: iwlwifi: simplify TX tracing
...
There's no need to calculate again whether data should
be included or be handled externally, just check if any
space for it was already reserved.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512152312.a3d3b4796460.I85bd3029baee24ebf0be04db7d6bf01834090869@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:03 +02:00
Johannes Berg
bdaae563e0
wifi: iwlwifi: tracing: fix condition to allocate buf1
...
There's no need to allocate buf1 if we're not going to
write anything to it, and the condition for writing is
(correctly) "hdr_len > 0 && !iwl_trace_data()". Also
allocate the event space only under the same condition.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512152312.a11e6490d053.Ie090beea70d2f271bb22c9b0e287dbd342fb2a96@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:03 +02:00
Emmanuel Grumbach
f79968eb41
wifi: iwlwifi: mvm: leave a print in the logs when we call fw_nmi()
...
When we crash the firmware, we need to know why we decided to do so.
Almost all the callsites of iwl_force_nmi() print something in the logs
that explain why the driver decided to crash the firmware.
Debugfs doesn't print anything and it is then hard to understand why the
firmware has crashed.
Add a simple print in the debugfs hook to ease the debug.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512075822.e2558de222dc.Idd81777c47264e6f557b086625895c1dc2f667f3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:03 +02:00
Miri Korenblit
9574c7592c
wifi: iwlwifi: mvm: disable dynamic EMLSR when AUTO_EML is false
...
When AUTO_EML is set to false, this change ignores the exit criteria,
for testing purposes. Currently, if AUTO_EML is disabled, the
driver will not select a link or enter EMLSR, but will still exit if one
of the criteria is not fulfilled.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://msgid.link/20240512072733.10a0b5da6ec2.I46fd578a3ef6cdbf14fdc4dfa97b4be008fe68e3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:03 +02:00
Benjamin Berg
157c8a4483
wifi: iwlwifi: mvm: use vif P2P type helper
...
Use ieee80211_vif_type_p2p instead of checking for IFTYPE_AP in
combination with vif->p2p.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.15a00a812c1b.I5ffee795d960c9beda46a934f5b4c70acde112f9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:03 +02:00
Johannes Berg
ed93faf017
wifi: iwlwifi: mvm: don't track used links separately
...
We track which link is using which FW link ID, so there
really isn't a need to separately track which link IDs
are in use. Remove that code and check the table when
looking for a new link ID to use.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.1a67d8af815f.Ie642c12dce3ab55c688abd9a25918569e83e558a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:53:03 +02:00
Emmanuel Grumbach
45eeee1f30
wifi: iwlwifi: always print the firmware version in hex
...
All our firmware versions should now be printed in hex.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.cae4c562b2c3.I5043383bd0e81f872c55046afd2c6560f482c8e0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:59 +02:00
Johannes Berg
6ccfc7c49b
wifi: iwlwifi: fw: avoid bad FW config on RXQ DMA failure
...
In practice, iwl_trans_get_rxq_dma_data() will not fail,
it only can do that if called with the wrong arguments.
But it does have an error value and doesn't initialize
the argument when it fails, so don't use the value then.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.faf3a1b87589.I77c950173cb914676fbd28483e5ef420bb9f1bc9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:47 +02:00
Mukesh Sisodiya
8d59995067
wifi: iwlwifi: fw: api: Add new timepoint for scan failure
...
Add new time point to get the details of scan failure
While on it added other missing enum to match with FW.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Reviewed-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.6781e76990c4.Iadfb3f6dd63a98fc35019772266b5ebddc5b5270@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:42 +02:00
Johannes Berg
9c93c0b44b
wifi: iwlwifi: mei: unify iwl_mei_set_power_limit() prototype
...
The two versions of iwl_mei_set_power_limit() are a bit different,
and while really the const isn't all that necessary on the inline,
it's still better to have it be the same.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.854427753c92.I557716085cb1f6a35d1f97640388fa421f42a56a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:38 +02:00
Johannes Berg
472a15d319
wifi: iwlwifi: mvm: mark bad no-data RX as having bad PLCP
...
Just like with any other frame, mac80211 will do sanity checks
on no-data RX (representing e.g. sounding PPDUs), and if e.g.
the NSS is wrong, it will warn. This isn't a good idea if we
already know the frame wasn't received well, e.g. has bad PLCP.
Unless the firmware reports "no error", set the bad PLCP flag
to skip checks in mac80211.
Also, since we're now extracting two different values from the
info field, use le32_get_bits() for both.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.e6adcb9a6ece.Ic14c2e8ed5e80d48af78b2f04e9f08beeb62d68e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:32 +02:00
Miri Korenblit
e213eb95a4
wifi: iwlwifi: bump FW API to 91 for BZ/SC devices
...
Start supporting API version 91 for new devices.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.27c00099e8b7.I99b4f24bba073414dd04a6e04a359c7fbba52990@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:30 +02:00
Miri Korenblit
bc4867aabf
wifi: iwlwifi: mvm: add a of print of a few commands
...
This is needed for debugging.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.65fc46e2ffbc.I19d4ef2cc06bfee7d9644a376d39399f0f6eaa15@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:27 +02:00
Miri Korenblit
ca88709d10
wifi: iwlwifi: mvm: Use the SMPS cfg of the correct link
...
The exiting code is checking the SMPS mode of deflink.
Use the SMPS mode of the link_sta function parameter.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.f3e2834e78f5.Ie24b431a6ad0dbf977afbbd4d2116bfe2426a0d5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:24 +02:00
Miri Korenblit
6a32ebd534
wifi: iwlwifi: mvm: don't always set antenna in beacon template cmd
...
This needs to be set only if the FW is not capable of selecting an
antenna on its own.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240512072733.73d790911268.I158dc1dbc9c2e199c69d8213e5496d2de72da28b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:15 +02:00
Chaya Rachel Ivgi
797af7ac20
wifi: iwlwifi: remove redundant reading from NVM file
...
The driver reads xtal_calib from NVM file, but actually never uses it.
This is only used in dvm driver.
Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com >
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.c4d1a4571049.I7d7b73dccb793e220f023e0d049b082b043ca95e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:11 +02:00
Shahar S Matityahu
37733bffda
wifi: iwlwifi: remove fw_running op
...
fw_running assumes that memory can be retrieved only after alive.
This assumption is no longer true as we support dump before alive.
To avoid invalid access to the NIC, check that STATUS_DEVICE_ENABLED
bit in trans status is set before dumping instead of the prior check.
Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com >
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com >
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.ca07138cedeb.I090e31d3eaeb4ba19f5f84aba997ccd36927e9ac@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:51:02 +02:00
Andrei Otcheretianski
d49c5be9f7
wifi: iwlwifi: mvm: Don't set NO_HT40+/- flags on 6 GHz band
...
These flags are not needed on 6 GHz channels, and anyway they were set
incorrectly.
This in turn resulted in alternating channel flags, preventing reg domain
rules to be merged together, so cfg80211 couldn't even send them to the
user space, as the regulatory domain was too large.
Fix it.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com >
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.b0d51b2229f8.I092e21cde43320ffc2eff17f5748ff9c87c87fcf@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:50:48 +02:00
Miri Korenblit
b79b56091d
wifi: iwlwifi: mvm: call ieee80211_sta_recalc_aggregates on A-MSDU size update
...
The driver needs to call this function when the A-MSDU size changes.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.632ee6612a79.Ice3a536a4cbfe60d0edfa231fcb79ee7ab9495dd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:50:36 +02:00
Miri Korenblit
bb3261943f
wifi: iwlwifi: mvm: set A-MSDU size on the correct link
...
The existing code sets the max A-MSDU size to the deflink, set it
on the given link instead.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.4de5c1a031ca.I063bc1508e5068b32e321b0f268bc51dba0c0747@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:50:21 +02:00
Miri Korenblit
7c789b91f5
wifi: iwlwifi: mvm: define link_sta in the relevant scope
...
The link_sta pointer is now only used inside this if, so define it inside
its scope.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.e0a1dd285d9a.Id5ff16fb98af0c5f533aed6b5ec3cc856401e488@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:50:15 +02:00
Avraham Stern
8a29b006dc
wifi: iwlwifi: mvm: debugfs: add entry for setting maximum TXOP time
...
Add an entry for setting the maximum TXOP time in microseconds.
The configured value can be read from the same entry.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.b8d17a9c1731.I57c33574a61edd68bd0ec1aa7009f31111fd7efe@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:50:09 +02:00
Avraham Stern
42884d2c2f
wifi: iwlwifi: mvm: allow UAPSD when in SCM
...
Allow UAPSD when P2P and BSS interfaces share the same channel.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.1ec19d432497.Id6de5337c878fa70e85bfcf6f4e0e34ce60756fb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:50:00 +02:00
Emmanuel Grumbach
7aea718037
wifi: iwlwifi: mvm: simplify the uAPSD coexistence limitation code
...
uAPSD can't be enabled on BSS or P2P Client if there is
another active interface (e.g. associated client). Allow
the code that apply those limitations to run on BSS as well.
Also forbid uAPSD if we have an IBSS or NAN interface in
the system.
Since we are now forbidding uAPSD in any concurrency
scenario, we don't need to check the number of PHY
contexts.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240510170500.4ac26534adf7.Ib892020177e86603b2be3a105f8717b9a15951d3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:49:53 +02:00
Johannes Berg
32fca7e382
wifi: iwlwifi: dvm: clean up rs_get_rate() logic
...
The logic here is rather convoluted - we cannot get here with
lq_sta being NULL as mac80211 will (no longer) call us like
that, and since I removed the rate_control_send_low() call in
this function there's no longer any point in setting priv_sta
to NULL either.
So the only thing that remains to check is if we have actually
initialized our lq_sta->drv pointer, and exit if we didn't in
which case we'll use the data mac80211 already set up for the
low rate usage.
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com >
Link: https://msgid.link/20240510170500.a4cdb41825eb.Id202bcc967c32829f70ab1412f8893b6eb7f78e2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:49:49 +02:00
Johannes Berg
5a009b42e0
wifi: mac80211: track changes in AP's TPE
...
If the TPE (transmit power envelope) is changed, detect and
report that to the driver.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506214536.103dda923f45.I990877e409ab8eade9ed7c172272e0cae57256cf@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:35:07 +02:00
Johannes Berg
39dc8b8ea3
wifi: mac80211: pass parsed TPE data to drivers
...
Instead of passing the full TPE elements, in all their glory
and mixed up data formats for HE backward compatibility, parse
them fully into the right values, and pass that to the drivers.
Also introduce proper validation already in mac80211, so that
drivers don't need to do it, and parse the EHT portions.
The code now passes the values in the right order according to
the channel used by an interface, which could also be a subset
of the data advertised by the AP, if we couldn't connect with
the full bandwidth (for whatever reason.)
Also add kunit tests for the more complicated bits of it.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Acked-by: Kalle Valo <kvalo@kernel.org >
Link: https://msgid.link/20240506214536.2aa839969b60.I265b28209e0b29772b2f125f7f83de44a4da877b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:35:04 +02:00
Johannes Berg
caa12b3dd4
wifi: ath11k: fix TPE power levels
...
The chanctx can be shared, but it seems like the TPE values for
this vif should only reflect the channel that the vif uses, which
is captured in bss_conf->chanreq.oper rather than the chanctx.
Use that when calculating defaults, a similar issue is where the
data from the AP is processed, but I'm moving that to mac80211.
Acked-by: Kalle Valo <kvalo@kernel.org >
Link: https://msgid.link/20240506214536.d99fcf5856b9.I359bb401ea74bf82dc981a86a7ca3fa44d169d2e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:35:02 +02:00
Johannes Berg
8592fd7ccc
wifi: ieee80211/ath11k: remove IEEE80211_MAX_NUM_PWR_LEVEL
...
The define IEEE80211_MAX_NUM_PWR_LEVEL doesn't make much
sense. Yes, that table has a maximum value of 8, and the
table will actually remain that way, but EHT introduced
a way to encode more levels for 320 MHz channels.
Remove IEEE80211_MAX_NUM_PWR_LEVEL and, for ath11k being
the only user, add ATH11K_NUM_PWR_LEVELS, where it makes
sense since it cannot support 320 MHz channels.
Acked-by: Kalle Valo <kvalo@kernel.org >
Link: https://msgid.link/20240506214536.9818e5471055.Icece7e47e963d6b68e0d97ba13c102b37fbaa689@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:34:59 +02:00
Mukesh Sisodiya
e3bae9b228
wifi: mac80211: update 6 GHz AP power type before association
...
6 GHz AP power type details are required to set proper tx power
used to send frames.
Update AP power type received in beacon while preparing
for connection instead of after association so the frames
before association can use the correct tx power.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Link: https://msgid.link/20240506214536.310434f55f76.I6aca291ee06265e3f63e0f9024ba19a850b53a33@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:34:54 +02:00
Johannes Berg
5c24e83f68
wifi: mac80211: remove extra link STA functions
...
There's no need to have a lockdep assert and then call
another function, just move everything into one place.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506211934.9759564a25f4.I88d43aa459d15c1d6230152e76b7757c2cdd6085@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:34:16 +02:00
Johannes Berg
7aa5c8b4f9
wifi: mac80211: remove outdated comments
...
These comments are no longer correct, it's a wiphy work now
so it will go away immediately when canceled.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506211422.68bc10efbd8a.If80f43f4c8b9db1f5266f70d93a805f8c7463fe2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:22:34 +02:00
Johannes Berg
eb745c7c85
wifi: cfg80211: add tracing for wiphy work
...
Add trace events to trace when wiphy works are queued (or
delayed ones scheduled), and other APIs are called. Also
add an event when the worker starts, before acquiring the
mutex, to be able to see potential delays due to locking.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Benjamin Berg <benjamin.berg@intel.com >
Link: https://msgid.link/20240506210002.bf1840a1d22d.I4abba048c1c4017345640219cf1384a0b2288dd3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:21:22 +02:00
Johannes Berg
2449db1f21
wifi: cfg80211: sort trace events again
...
They were meant to be split into ops and APIs, but some
ops were added in the wrong place. Fix that.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506210002.0b3a86a5d8d7.I5591c03223bdb95597e181de63a2eded424de34c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:21:20 +02:00
Johannes Berg
23daf1b4c9
wifi: nl80211: disallow setting special AP channel widths
...
Setting the AP channel width is meant for use with the normal
20/40/... MHz channel width progression, and switching around
in S1G or narrow channels isn't supported. Disallow that.
Reported-by: syzbot+bc0f5b92cc7091f45fb6@syzkaller.appspotmail.com
Link: https://msgid.link/20240515141600.d4a9590bfe32.I19a32d60097e81b527eafe6b0924f6c5fbb2dc45@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:21:17 +02:00
Johannes Berg
9d222c1283
wifi: ieee80211: document two FTM related functions
...
Add some documentation to ieee80211_is_timing_measurement()
and ieee80211_is_ftm().
Link: https://msgid.link/20240515093852.229aa69e972c.Ifae6762a698e79cd5a49a055fe4c32330e826200@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:19:45 +02:00
Johannes Berg
3c75e99c70
wifi: ieee80211: document function return values
...
These are all missing, as pointed out when running kernel-doc.
Add return value documentation and fix some small things while
at it.
Link: https://msgid.link/20240515093852.1cd5ad8f354d.Idc16e9767fa42de80b659c32efc58aea38c26996@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:19:43 +02:00
Johannes Berg
5485687129
wifi: ieee80211: remove ieee80211_next_tbtt_present()
...
This is actually completely equivalent to the other function
ieee80211_is_s1g_short_beacon(), but open-codes the logic.
Implement the necessary logic in ieee80211_is_s1g_short_beacon()
and remove ieee80211_next_tbtt_present().
Link: https://msgid.link/20240515093852.774ced74dea8.I152525b4cff6e6a25be6c48fe6a4b89f17bab8a9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:19:41 +02:00
Johannes Berg
1c26f09b20
wifi: radiotap: document ieee80211_get_radiotap_len() return value
...
Document the return value of ieee80211_get_radiotap_len() in
the proper kernel-doc format.
Link: https://msgid.link/20240515093852.143aadfdb094.I8795ec1e8cfd7106d58325fb514bae92625fb45c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-23 10:19:39 +02:00