]> Git Repo - linux.git/log
linux.git
14 months agowifi: iwlwifi: cleanup uefi variables loading
Miri Korenblit [Sun, 28 Jan 2024 06:54:00 +0000 (08:54 +0200)]
wifi: iwlwifi: cleanup uefi variables loading

Extract the logic that is common to all variables loading
to a function.

Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Link: https://msgid.link/20240128084842.454f32c4bcfe.I4835fe657475ac28ef6aef4d292fac63c6ce9a34@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: implement GLAI ACPI table loading
Miri Korenblit [Sun, 28 Jan 2024 06:53:59 +0000 (08:53 +0200)]
wifi: iwlwifi: implement GLAI ACPI table loading

All the regulatory tables from BIOS are going to be loaded
(preferably) from the UEFI instead of the ACPI.
There is a security issue with the fact that anyone can
add these UEFI variables.
The solution for that is to have a lock for all WIFI GUID UEFI
variables, and only if the UEFI variables are locked then we can
read it.
The status of the lock (unlocked, locked, test mode) is indicated
in a ACPI table: Guid Lock ACPI Indicator.
Load this table so the driver knows whether to read from UEFI or
not

Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Link: https://msgid.link/20240128084842.53994809fbdd.I1bd10aafc387bc04f375e386861ee2bcb82f0a61@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: mvm: initialize rates in FW earlier
Johannes Berg [Sun, 28 Jan 2024 06:53:58 +0000 (08:53 +0200)]
wifi: iwlwifi: mvm: initialize rates in FW earlier

When connecting to an AP, we currently initialize the rate
control only after associating. Since we now use firmware
to assign rates to auth/assoc frames rather than using the
data in the station and the firmware doesn't know, they're
transmitted using low mandatory rates. However, if the AP
advertised only higher supported rates we want to use them
to be nicer (it still must receive mandatory rates though),
so send the information to the firmware earlier to have it
know about it and be able to use it.

Fixes: 499d02790495 ("wifi: iwlwifi: Use FW rate for non-data frames")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.ed7ab1c859c2.I4b4d4fc3905c8d8470fc0fee4648f25c950c9bb7@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: mvm: disconnect station vifs if recovery failed
Emmanuel Grumbach [Sun, 28 Jan 2024 06:53:56 +0000 (08:53 +0200)]
wifi: iwlwifi: mvm: disconnect station vifs if recovery failed

This will allow to reconnect immediately instead of leaving the
connection in a limbo state.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.e90531cd3a36.Iebdc9483983c0d8497f9dcf9d79ec37332a5fdcc@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: acpi: fix WPFC reading
Johannes Berg [Sun, 28 Jan 2024 06:53:55 +0000 (08:53 +0200)]
wifi: iwlwifi: acpi: fix WPFC reading

The code reading the WPFC table needs to take into account
the domain type (first element in the package), shouldn't
leak the memory if it fails, and has a bad comment. Fix all
these issues.

Fixes: c4c954547755 ("wifi: iwlwifi: implement WPFC ACPI table loading")
Reported-by: Miri Korenblit <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman Gregory <[email protected]>
Link: https://msgid.link/20240128084842.2afeb476b62d.I200568dc42a277e21c12be99d5aaa39b009d45da@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: fw: dbg: ensure correct config name sizes
Johannes Berg [Sun, 28 Jan 2024 06:53:54 +0000 (08:53 +0200)]
wifi: iwlwifi: fw: dbg: ensure correct config name sizes

This hard-codes the size, but it's not obvious why that's
correct. Use sizeof() and cross-check the two structs.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.58fcdea2ace7.I49cb1d7bdbea12085aada0c96ef42fcbcb3d2b38@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: dbg-tlv: ensure NUL termination
Johannes Berg [Sun, 28 Jan 2024 06:53:53 +0000 (08:53 +0200)]
wifi: iwlwifi: dbg-tlv: ensure NUL termination

The iwl_fw_ini_debug_info_tlv is used as a string, so we must
ensure the string is terminated correctly before using it.

Fixes: a9248de42464 ("iwlwifi: dbg_ini: add TLV allocation new API support")
Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.be15e858ee89.Ibff93429cf999eafc7b26f3eef4c055dc84984a0@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: dbg-tlv: use struct_size() for allocation
Johannes Berg [Sun, 28 Jan 2024 06:53:52 +0000 (08:53 +0200)]
wifi: iwlwifi: dbg-tlv: use struct_size() for allocation

This is effectively the same since we don't even have a
multiplication, but better captures what happens with
the length.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.f301641eb916.I66b7b48a526377d682eecef874373bf3a01076c8@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: dbg-tlv: avoid extra allocation/copy
Johannes Berg [Sun, 28 Jan 2024 06:53:51 +0000 (08:53 +0200)]
wifi: iwlwifi: dbg-tlv: avoid extra allocation/copy

In iwl_dbg_tlv_alloc_trigger() the code makes a copy just
to modify it and pass it to another function to make a copy
again. Change the API to return the copy so the adjustment
can be done without another copy.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.075c8b9f7030.Id5a61e1a87a9c6932727fb4e2c9b54ed6070362a@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: fix some kernel-doc issues
Johannes Berg [Sun, 28 Jan 2024 06:53:50 +0000 (08:53 +0200)]
wifi: iwlwifi: fix some kernel-doc issues

Add return descriptions, move description contents after
(parameter) sections and fix short descriptions.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.02ac00f67239.I4ad17097badfcbb82ccdb8c126f61a6f3170798e@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: mvm: d3: disconnect on GTK rekey failure
Johannes Berg [Sun, 28 Jan 2024 06:53:49 +0000 (08:53 +0200)]
wifi: iwlwifi: mvm: d3: disconnect on GTK rekey failure

If there was a rekey failure during D3 when firmware is
handling the GTK rekeying, and it decided that we should
wake up, then there was an issue in the connection and
we don't necessarily have the right keys, so we should
disconnect.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Emmanuel Grumbach <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.944af193d479.I5ef9f1f0e048d44d7158615d071b793d69eceb75@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: mvm: report beacon protection failures
Johannes Berg [Sun, 28 Jan 2024 06:53:48 +0000 (08:53 +0200)]
wifi: iwlwifi: mvm: report beacon protection failures

Andrei reports that we just silently drop beacons after we
report the key counters, but never report to userspace, so
wpa_supplicant cannot send the WNM action frame. Fix that.

Fixes: b1fdc2505abc ("iwlwifi: mvm: advertise BIGTK client support if available")
Reported-by: Andrei Otcheretianski <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240128084842.7d855442cdce.Iba90b26f893dc8c49bfb8be65373cd0a138af12c@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: mvm: Add support for removing responder TKs
Ilan Peer [Wed, 31 Jan 2024 21:08:16 +0000 (23:08 +0200)]
wifi: iwlwifi: mvm: Add support for removing responder TKs

When removing a PASN station, the TK must be removed before
the station is removed as otherwise the FW would assert.

To handle this, store the key configuration, and use it to remove
the key when the station is removed.

Signed-off-by: Ilan Peer <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240131230734.3e6364730c04.Ia76dc4a9d399f1f68ac6b157d844b63f74d5159f@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: disable eSR when BT is active
Miri Korenblit [Wed, 31 Jan 2024 20:56:32 +0000 (22:56 +0200)]
wifi: iwlwifi: disable eSR when BT is active

eSR should be disabled when BT Coex is active and:
- LB link is the primary link.
- LB link is the secondary link and the predicted BT penalty
  (the wifi loss rate caused by BT interference) is higher
  than a given threshold.
If one of the conditions above is no longer true then re-enable eSR.

In order to implement this, add support for version 5 of
BT_PROFILE_NOTIFICATION, in which the bt penalty is provided
by FW.

Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Link: https://msgid.link/20240131225342.b922b6485af8.I7d808ce535a7372aca9cb85c045755e6788a4904@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: accept broadcast probe responses on 6 GHz
Johannes Berg [Mon, 29 Jan 2024 19:09:07 +0000 (20:09 +0100)]
wifi: mac80211: accept broadcast probe responses on 6 GHz

On the 6 GHz band, probe responses are sent as broadcast to
optimise medium usage. However, without OCE configuration
we weren't accepting them, which is wrong, even if wpa_s is
by default enabling OCE. Accept them without the OCE config
as well.

Link: https://msgid.link/20240129200907.5a89c2821897.I92e9dfa0f9b350bc7f37dd4bb38031d156d78d8a@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: adding missing drv_mgd_complete_tx() call
Johannes Berg [Wed, 31 Jan 2024 15:48:23 +0000 (16:48 +0100)]
wifi: mac80211: adding missing drv_mgd_complete_tx() call

There's a call to drv_mgd_prepare_tx() and so there should
be one to drv_mgd_complete_tx(), but on this path it's not.
Add it.

Link: https://msgid.link/20240131164824.2f0922a514e1.I5aac89b93bcead88c374187d70cad0599d29d2c8@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: fix waiting for beacons logic
Johannes Berg [Wed, 31 Jan 2024 15:48:56 +0000 (16:48 +0100)]
wifi: mac80211: fix waiting for beacons logic

This should be waiting if we don't have a beacon yet,
but somehow I managed to invert the logic. Fix that.

Fixes: 74e1309acedc ("wifi: mac80211: mlme: look up beacon elems only if needed")
Link: https://msgid.link/20240131164856.922701229546.I239b379e7cee04608e73c016b737a5245e5b23dd@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: fix unsolicited broadcast probe config
Johannes Berg [Mon, 29 Jan 2024 18:57:30 +0000 (19:57 +0100)]
wifi: mac80211: fix unsolicited broadcast probe config

There's a bug in ieee80211_set_unsol_bcast_probe_resp(), it tries
to return BSS_CHANGED_UNSOL_BCAST_PROBE_RESP (which has the value
1<<31) in an int, which makes it negative and considered an error.
Fix this by passing the changed flags to set separately.

Fixes: 3b1c256eb4ae ("wifi: mac80211: fixes in FILS discovery updates")
Reviewed-by: Jeff Johnson <[email protected]>
Link: https://msgid.link/20240129195729.965b0740bf80.I6bc6f5236863f686c17d689be541b1dd2633c417@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: initialize SMPS mode correctly
Johannes Berg [Mon, 29 Jan 2024 18:54:05 +0000 (19:54 +0100)]
wifi: mac80211: initialize SMPS mode correctly

The SMPS mode is currently re-initialized too late, since
ieee80211_prep_channel() can be called again after we've
already done ieee80211_setup_assoc_link(), in case there's
some override of the channel configuration. Fix this.

Link: https://msgid.link/20240129195405.d6d74508be18.I0a7303b1ce4d8e5436011951ab624372a445c069@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: fix driver debugfs for vif type change
Johannes Berg [Mon, 29 Jan 2024 14:54:02 +0000 (15:54 +0100)]
wifi: mac80211: fix driver debugfs for vif type change

If a driver implements the change_interface() method, we switch
interface type without taking the interface down, but still will
recreate the debugfs for it since it's a new type. As such, we
should use the ieee80211_debugfs_recreate_netdev() function here
to also recreate the driver's files, if it is indeed from a type
change while up.

Link: https://msgid.link/20240129155402.7311a36ffeeb.I18df02bbeb685d4250911de5ffbaf090f60c3803@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: set station RX-NSS on reconfig
Johannes Berg [Mon, 29 Jan 2024 14:53:55 +0000 (15:53 +0100)]
wifi: mac80211: set station RX-NSS on reconfig

When a station is added/reconfigured by userspace, e.g. a TDLS
peer or a SoftAP client STA, rx_nss is currently not always set,
so that it might be left zero. Set it up properly.

Link: https://msgid.link/20240129155354.98f148a3d654.I193a02155f557ea54dc9d0232da66cf96734119a@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: fix RCU use in TDLS fast-xmit
Johannes Berg [Mon, 29 Jan 2024 14:53:48 +0000 (15:53 +0100)]
wifi: mac80211: fix RCU use in TDLS fast-xmit

This looks up the link under RCU protection, but isn't
guaranteed to actually have protection. Fix that.

Fixes: 8cc07265b691 ("wifi: mac80211: handle TDLS data frames with MLO")
Link: https://msgid.link/20240129155348.8a9c0b1e1d89.I553f96ce953bb41b0b877d592056164dec20d01c@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: improve CSA/ECSA connection refusal
Johannes Berg [Mon, 29 Jan 2024 12:14:14 +0000 (13:14 +0100)]
wifi: mac80211: improve CSA/ECSA connection refusal

As mentioned in the previous commit, we pretty quickly found
that some APs have ECSA elements stuck in their probe response,
so using that to not attempt to connect while CSA is happening
we never connect to such an AP.

Improve this situation by checking more carefully and ignoring
the ECSA if cfg80211 has previously detected the ECSA element
being stuck in the probe response.

Additionally, allow connecting to an AP that's switching to a
channel it's already using, unless it's using quiet mode. In
this case, we may just have to adjust bandwidth later. If it's
actually switching channels, it's better not to try to connect
in the middle of that.

Reported-by: coldolt <[email protected]>
Closes: https://lore.kernel.org/linux-wireless/CAJvGw+DQhBk_mHXeu6RTOds5iramMW2FbMB01VbKRA4YbHHDTA@mail.gmail.com/
Fixes: c09c4f31998b ("wifi: mac80211: don't connect to an AP while it's in a CSA process")
Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://msgid.link/20240129131413.cc2d0a26226e.I682c016af76e35b6c47007db50e8554c5a426910@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: cfg80211: detect stuck ECSA element in probe resp
Johannes Berg [Mon, 29 Jan 2024 12:14:13 +0000 (13:14 +0100)]
wifi: cfg80211: detect stuck ECSA element in probe resp

We recently added some validation that we don't try to
connect to an AP that is currently in a channel switch
process, since that might want the channel to be quiet
or we might not be able to connect in time to hear the
switching in a beacon. This was in commit c09c4f31998b
("wifi: mac80211: don't connect to an AP while it's in
a CSA process").

However, we promptly got a report that this caused new
connection failures, and it turns out that the AP that
we now cannot connect to is permanently advertising an
extended channel switch announcement, even with quiet.
The AP in question was an Asus RT-AC53, with firmware
3.0.0.4.380_10760-g21a5898.

As a first step, attempt to detect that we're dealing
with such a situation, so mac80211 can use this later.

Reported-by: coldolt <[email protected]>
Closes: https://lore.kernel.org/linux-wireless/CAJvGw+DQhBk_mHXeu6RTOds5iramMW2FbMB01VbKRA4YbHHDTA@mail.gmail.com/
Fixes: c09c4f31998b ("wifi: mac80211: don't connect to an AP while it's in a CSA process")
Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://msgid.link/20240129131413.246972c8775e.Ibf834d7f52f9951a353b6872383da710a7358338@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: rtl8xxxu: fix error messages
Dan Carpenter [Wed, 31 Jan 2024 07:10:07 +0000 (10:10 +0300)]
wifi: rtl8xxxu: fix error messages

The first parameter of WARN_ONCE() is a condition so this code will end
up printing the function name instead of the proper message.

Fixes: 3ff7a05996f9 ("wifi: rtl8xxxu: support setting bssid register for multiple interfaces")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: 8922a: add more fields to beacon H2C command to support multi-links
Po-Hao Huang [Fri, 26 Jan 2024 06:33:56 +0000 (14:33 +0800)]
wifi: rtw89: 8922a: add more fields to beacon H2C command to support multi-links

To support multi-links beacon, it needs more fields. But currently we still
only support legacy AP mode. Only update struct to fit expected size of
firmware.

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: update ps_state register for chips with different generation
Chin-Yen Lee [Fri, 26 Jan 2024 06:33:55 +0000 (14:33 +0800)]
wifi: rtw89: update ps_state register for chips with different generation

The ps_state register is used for driver to check if the WiFi chip leave
power save mode successfully. The register is changed for new generation,
so update it.

Signed-off-by: Chin-Yen Lee <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: add new H2C for PS mode in 802.11be chip
Chin-Yen Lee [Fri, 26 Jan 2024 06:33:54 +0000 (14:33 +0800)]
wifi: rtw89: add new H2C for PS mode in 802.11be chip

Because 802.11be chip support MLO mode, driver needs to send new H2C to
pass more connected channel information to firmware, to ensure PS mode
work fine.

Signed-off-by: Chin-Yen Lee <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: 8922a: add ieee80211_ops::hw_scan
Po-Hao Huang [Fri, 26 Jan 2024 06:33:53 +0000 (14:33 +0800)]
wifi: rtw89: 8922a: add ieee80211_ops::hw_scan

This adds support for hardware scan after FW version 0.34.35. Currently
we only support scanning on single hardware band and support of dual band
scan will be added in the future. Adjust the current flow to make driver
compatible with different generation ICs.

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: prepare scan leaf functions for wifi 7 ICs
Po-Hao Huang [Fri, 26 Jan 2024 06:33:52 +0000 (14:33 +0800)]
wifi: rtw89: prepare scan leaf functions for wifi 7 ICs

The channel field slightly differs between WiFi 6 and WiFi 7.
So we prepare some required functions in advance, this doesn't change
existing wifi 6 ICs behavior. This H2C prepares the channel list
to be scanned for. With layout as the following:

+--------+--------------------+-------------------+-----------------------+
| header | number of channels | channel info size | channel_info * number |
+--------+--------------------+-------------------+-----------------------+

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: debug: add FW log component for scan
Po-Hao Huang [Fri, 26 Jan 2024 06:33:51 +0000 (14:33 +0800)]
wifi: rtw89: debug: add FW log component for scan

This allows scan related logs when FW log debug mode is on.

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: update scan C2H messages for wifi 7 IC
Po-Hao Huang [Fri, 26 Jan 2024 06:33:50 +0000 (14:33 +0800)]
wifi: rtw89: update scan C2H messages for wifi 7 IC

Add definition and parsing for wifi 7 extended fields. These fields
include hardware index which is current reporting, timestamp and self
defined sequences for debug purposes.

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: 8922a: set chip_ops FEM and GPIO to NULL
Ping-Ke Shih [Wed, 24 Jan 2024 03:38:13 +0000 (11:38 +0800)]
wifi: rtw89: 8922a: set chip_ops FEM and GPIO to NULL

The chip_ops::fem_setup is to get if a hardware module type contains PA
and LNA that will affect how RF calibrations do. The chip_ops::rfe_gpio
is to set GPIO PIN MUX according to hardware module type too. 8922A
doesn't have these special module types yet, so leave them as NULL.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: 8922a: add chip_ops to get thermal value
Ping-Ke Shih [Wed, 24 Jan 2024 03:38:02 +0000 (11:38 +0800)]
wifi: rtw89: 8922a: add chip_ops to get thermal value

Get thermal value as a clue to do RF calibration if the delta is larger
than a threshold, but 8922A doesn't need this, so we only read out the
value when debugging to reduce IO.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: 8922a: add RF read/write v2
Ping-Ke Shih [Wed, 24 Jan 2024 03:36:35 +0000 (11:36 +0800)]
wifi: rtw89: 8922a: add RF read/write v2

Implement indirect interface v2 to read/write RF registers via PHY
registers for 8922A.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: 8922a: add chip_ops::cfg_txrx_path
Ping-Ke Shih [Wed, 24 Jan 2024 03:36:34 +0000 (11:36 +0800)]
wifi: rtw89: 8922a: add chip_ops::cfg_txrx_path

This function is to set TX/RX path. Especially for 1SS rate, it can select
to TX on one or two antenna. Before this operation, stop hardware to
prevent transmitting/receiving unexpected packets. After that, restore
settings and reset hardware to prevent it stays on abnormal state.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: 8922a: implement {stop,resume}_sch_tx and cfg_ppdu
Ping-Ke Shih [Wed, 24 Jan 2024 03:36:33 +0000 (11:36 +0800)]
wifi: rtw89: 8922a: implement {stop,resume}_sch_tx and cfg_ppdu

To set TX/RX path or set channel, we need these helpers to stop TX and
restore settings. The sch_tx stands for scheduler TX channel, and the
cfg_ppdu is to stop reporting PPDU status, so we should stop them during
setting.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: 8922a: hook handlers of TX/RX descriptors to chip_ops
Ping-Ke Shih [Wed, 24 Jan 2024 03:36:32 +0000 (11:36 +0800)]
wifi: rtw89: 8922a: hook handlers of TX/RX descriptors to chip_ops

Hook implemented handlers to chip_ops, and fill packet frequency and signal
strength to RX status from RX PPDU status packet.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: pci: enlarge RX DMA buffer to consider size of RX descriptor
Ping-Ke Shih [Sun, 21 Jan 2024 07:18:26 +0000 (15:18 +0800)]
wifi: rtw89: pci: enlarge RX DMA buffer to consider size of RX descriptor

Hardware puts RX descriptor and packet in RX DMA buffer, so it could be
over one buffer size if packet size is 11454, and then it will be split
into two segments. WiFi 7 chips use larger size of RX descriptor, so
enlarge DMA buffer size according to RX descriptor to have better
performance and simple flow.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: pci: validate RX tag for RXQ and RPQ
Ping-Ke Shih [Sun, 21 Jan 2024 07:18:25 +0000 (15:18 +0800)]
wifi: rtw89: pci: validate RX tag for RXQ and RPQ

PCI RX ring is a kind of read/write index ring, and DMA and ring index are
asynchronous, so suddenly driver gets newer index ahead before DMA. To
resolve this rare situation, we use a RX tag as helpers to make sure DMA
is done.

The RX tag is a 13-bit value, and range is from 1 ~ 0x1FFF, but 0 isn't
used so should be skipped.

Only enable this validation to coming WiFi 7 chips, because existing
chips use different design and don't really meet this situation.

Add missed rx_ring_eq_is_full for 8851BE by the way.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: pci: interrupt v2 refine IMR for SER
Zong-Zhe Yang [Sun, 21 Jan 2024 07:18:24 +0000 (15:18 +0800)]
wifi: rtw89: pci: interrupt v2 refine IMR for SER

During SER (system error recovery), expect to deal with
only ISR related to halt. So, refine IMR configuration.

Signed-off-by: Zong-Zhe Yang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: rtw89: pci: update SER timer unit and timeout time
Ping-Ke Shih [Sun, 21 Jan 2024 07:18:23 +0000 (15:18 +0800)]
wifi: rtw89: pci: update SER timer unit and timeout time

Be higher resolution of SER timer unit from 32ms to 16ms to detect
abnormal situation more accurately, and set hardware watchdog timer to 4ms.

Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: iwlwifi: remove extra kernel-doc
Johannes Berg [Sun, 28 Jan 2024 08:23:09 +0000 (10:23 +0200)]
wifi: iwlwifi: remove extra kernel-doc

This no longer exists, remove the kernel-doc.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/20240128102209.d2192d79bc09.Id9551728d618248dd471382a5283503a8976237a@changeid
14 months agowifi: brcmfmac: fix copyright year mentioned in platform_data header
Arend van Spriel [Sun, 28 Jan 2024 09:30:57 +0000 (10:30 +0100)]
wifi: brcmfmac: fix copyright year mentioned in platform_data header

The driver found its inception a little after the year 201. According
git blame output it was added in 2016 so lets go with that.

Fixes: 4d7928959832 ("brcmfmac: switch to new platform data")
Reported-by: Dmitry Antipov <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: brcmfmac: add linefeed at end of file
Arend van Spriel [Sun, 28 Jan 2024 09:30:56 +0000 (10:30 +0100)]
wifi: brcmfmac: add linefeed at end of file

The following sparse warning was reported:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c:432:49:
  warning: no newline at end of file

Fixes: 31343230abb1 ("wifi: brcmfmac: export firmware interface functions")
Reported-by: Jakub Kicinski <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agoMerge tag 'ath-next-20240130' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath
Kalle Valo [Wed, 31 Jan 2024 16:45:31 +0000 (18:45 +0200)]
Merge tag 'ath-next-20240130' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath

ath.git patches for v6.9

We have new features for both ath11k and ath12k. ath12k is now under
heavy refactoring in preparation for MLO support.

Major changes:

ath12k

* refactoring in preparation for Multi-Link Operation (MLO) support

* 1024 Block Ack window size support

* provide firmware wmi logs via a trace event

ath11k

* 36 bit DMA mask support

* support 6 GHz station power modes: Low Power Indoor (LPI), Standard
  Power) SP and Very Low Power (VLP)

14 months agowifi: fill in MODULE_DESCRIPTION()s for mt76 drivers
Breno Leitao [Tue, 30 Jan 2024 10:42:43 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for mt76 drivers

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the MediaTek mt76 drivers.

Here is a sorted list of descriptions. It might make the reviewing
process easier.

MODULE_DESCRIPTION("MediaTek MT7603E and MT76x8 wireless driver");
MODULE_DESCRIPTION("MediaTek MT7615E and MT7663E wireless driver");
MODULE_DESCRIPTION("MediaTek MT7615E MMIO helpers");
MODULE_DESCRIPTION("MediaTek MT7663 SDIO/USB helpers");
MODULE_DESCRIPTION("MediaTek MT7663S (SDIO) wireless driver");
MODULE_DESCRIPTION("MediaTek MT7663U (USB) wireless driver");
MODULE_DESCRIPTION("MediaTek MT76x02 helpers");
MODULE_DESCRIPTION("MediaTek MT76x02 MCU helpers");
MODULE_DESCRIPTION("MediaTek MT76x0E (PCIe) wireless driver");
MODULE_DESCRIPTION("MediaTek MT76x0U (USB) wireless driver");
MODULE_DESCRIPTION("MediaTek MT76x2 EEPROM helpers");
MODULE_DESCRIPTION("MediaTek MT76x2E (PCIe) wireless driver");
MODULE_DESCRIPTION("MediaTek MT76x2U (USB) wireless driver");
MODULE_DESCRIPTION("MediaTek MT76x connac layer helpers");
MODULE_DESCRIPTION("MediaTek MT76x EEPROM helpers");
MODULE_DESCRIPTION("MediaTek MT76x helpers");
MODULE_DESCRIPTION("MediaTek MT76x SDIO helpers");
MODULE_DESCRIPTION("MediaTek MT76x USB helpers");
MODULE_DESCRIPTION("MediaTek MT7915E MMIO helpers");
MODULE_DESCRIPTION("MediaTek MT7921 core driver");
MODULE_DESCRIPTION("MediaTek MT7921E (PCIe) wireless driver");
MODULE_DESCRIPTION("MediaTek MT7921S (SDIO) wireless driver");
MODULE_DESCRIPTION("MediaTek MT7921U (USB) wireless driver");
MODULE_DESCRIPTION("MediaTek MT7925 core driver");
MODULE_DESCRIPTION("MediaTek MT7925E (PCIe) wireless driver");
MODULE_DESCRIPTION("MediaTek MT7925U (USB) wireless driver");
MODULE_DESCRIPTION("MediaTek MT792x core driver");
MODULE_DESCRIPTION("MediaTek MT792x USB helpers");
MODULE_DESCRIPTION("MediaTek MT7996 MMIO helpers");

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: fill in MODULE_DESCRIPTION()s for wilc1000
Breno Leitao [Tue, 30 Jan 2024 10:42:42 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for wilc1000

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the Atmel WILC1000 SPI driver.

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: fill in MODULE_DESCRIPTION()s for wl18xx
Breno Leitao [Tue, 30 Jan 2024 10:42:41 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for wl18xx

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the TI WiLink 8 wireless driver.

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: fill in MODULE_DESCRIPTION()s for p54spi
Breno Leitao [Tue, 30 Jan 2024 10:42:40 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for p54spi

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the Prism54 SPI wireless driver.

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: fill in MODULE_DESCRIPTION()s for wcn36xx
Breno Leitao [Tue, 30 Jan 2024 10:42:39 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for wcn36xx

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the Qualcomm Atheros WCN3660/3680 wireless driver.

Signed-off-by: Breno Leitao <[email protected]>
Reviewed-by: Jeff Johnson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: fill in MODULE_DESCRIPTION()s for ar5523
Breno Leitao [Tue, 30 Jan 2024 10:42:38 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for ar5523

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the Atheros AR5523 wireless driver.

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: fill in MODULE_DESCRIPTION()s for Broadcom WLAN
Breno Leitao [Tue, 30 Jan 2024 10:42:37 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for Broadcom WLAN

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the Broadcom FullMac WLAN drivers.

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: fill in MODULE_DESCRIPTION()s for wl1251 and wl12xx
Breno Leitao [Tue, 30 Jan 2024 10:42:36 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for wl1251 and wl12xx

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the TI wireless drivers wl12xx and wl1251.

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: fill in MODULE_DESCRIPTION()s for wlcore
Breno Leitao [Tue, 30 Jan 2024 10:42:35 +0000 (02:42 -0800)]
wifi: fill in MODULE_DESCRIPTION()s for wlcore

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the TI WLAN wlcore drivers.

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agoMAINTAINERS: wifi: brcm80211: cleanup entry
Arend van Spriel [Fri, 26 Jan 2024 10:57:24 +0000 (11:57 +0100)]
MAINTAINERS: wifi: brcm80211: cleanup entry

There has been some discussion about what is expected from
a maintainer and so a cleanup seems to be in order. A dedicated
mailing list has been created to discuss brcm80211 specific
development issues. Keeping the status as Supported although
help in maintaining this driver is welcomed.

Cc: [email protected]
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
14 months agowifi: mac80211: Drop WBRF debugging statements
Mario Limonciello [Wed, 17 Jan 2024 03:05:25 +0000 (21:05 -0600)]
wifi: mac80211: Drop WBRF debugging statements

Due to the way that debugging is used in the mac80211 subsystem
this message ends up being noisier than it needs to be.

As the statement is only useful at a first stage of triage for
BIOS bugs, just drop it.

Cc: Jun Ma <[email protected]>
Suggested-by: Kalle Valo <[email protected]>
Signed-off-by: Mario Limonciello <[email protected]>
Tested-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: mvm: skip adding debugfs symlink for reconfig
Benjamin Berg [Tue, 23 Jan 2024 18:08:19 +0000 (20:08 +0200)]
wifi: iwlwifi: mvm: skip adding debugfs symlink for reconfig

The function to add an interface may be called without a previous
removal if the HW is being reconfigured. As such, only add the symlink
if the hardware is not being reconfigured due to a HW_RESTART.

Fixes: c36235acb34f ("wifi: iwlwifi: mvm: rework debugfs handling")
Signed-off-by: Benjamin Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.314395eacda4.I5823e962c3c3674b942383733debd10b3fe903e2@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: cfg80211: fix wiphy delayed work queueing
Johannes Berg [Thu, 25 Jan 2024 08:51:09 +0000 (09:51 +0100)]
wifi: cfg80211: fix wiphy delayed work queueing

When a wiphy work is queued with timer, and then again
without a delay, it's started immediately but *also*
started again after the timer expires. This can lead,
for example, to warnings in mac80211's offchannel code
as reported by Jouni. Running the same work twice isn't
expected, of course. Fix this by deleting the timer at
this point, when queuing immediately due to delay=0.

Cc: [email protected]
Reported-by: Jouni Malinen <[email protected]>
Fixes: a3ee4dc84c4e ("wifi: cfg80211: add a work abstraction with special semantics")
Link: https://msgid.link/20240125095108.2feb0eaaa446.I4617f3210ed0e7f252290d5970dac6a876aa595b@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: fix double-free bug
Johannes Berg [Tue, 23 Jan 2024 18:08:11 +0000 (20:08 +0200)]
wifi: iwlwifi: fix double-free bug

The storage for the TLV PC register data wasn't done like all
the other storage in the drv->fw area, which is cleared at the
end of deallocation. Therefore, the freeing must also be done
differently, explicitly NULL'ing it out after the free, since
otherwise there's a nasty double-free bug here if a file fails
to load after this has been parsed, and we get another free
later (e.g. because no other file exists.) Fix that by adding
the missing NULL assignment.

Cc: [email protected]
Fixes: 5e31b3df86ec ("wifi: iwlwifi: dbg: print pc register data once fw dump occurred")
Reported-by: Guy Kaplan <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.675f3c24ec0d.I6ab4015cd78d82dd95471f840629972ef0331de3@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agokunit: add wireless unit tests
Johannes Berg [Fri, 26 Jan 2024 08:34:17 +0000 (10:34 +0200)]
kunit: add wireless unit tests

Add cfg80211, mac80211 and iwlwifi to the all_tests config
so that the unit tests (enabled by KUNIT_ALL_TESTS) will be
run by default.

Signed-off-by: Johannes Berg <[email protected]>
14 months agoRevert "nl80211/cfg80211: Specify band specific min RSSI thresholds with sched scan"
Jeff Johnson [Thu, 25 Jan 2024 22:55:47 +0000 (14:55 -0800)]
Revert "nl80211/cfg80211: Specify band specific min RSSI thresholds with sched scan"

This *mostly* reverts commit 1e1b11b6a111 ("nl80211/cfg80211: Specify
band specific min RSSI thresholds with sched scan").

During the review of a new patch [1] it was observed that the
functionality being modified was not actually being used by any
in-tree driver. Further research determined that the functionality was
originally introduced to support a new Android interface, but that
interface was subsequently abandoned. Since the functionality has
apparently never been used, remove it. However, to mantain the
sanctity of the UABI, keep the nl80211.h assignments, but clearly mark
them as obsolete.

Cc: Lin Ma <[email protected]>
Cc: Vamsi Krishna <[email protected]>
Link: https://lore.kernel.org/linux-wireless/[email protected]/
Signed-off-by: Jeff Johnson <[email protected]>
Link: https://msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: add support for a wiphy_work rx handler
Miri Korenblit [Tue, 23 Jan 2024 18:08:23 +0000 (20:08 +0200)]
wifi: iwlwifi: add support for a wiphy_work rx handler

The wiphy_work infra ensures that the entire worker will run
with the wiphy mutex. It is useful to have RX handlers
running as a wiphy_work, when we don't want the handler to
run in parallel with mac80211 work (to avoid races).

For example - BT notification can disable eSR starting from the next
patch.
In ieee80211_set_active_links we first check that eSR is
allowed, (drv_can_activate_links) and then activate it.
If the BT notif was received after drv_can_activate_links
(which returned true), and before the activation - eSR will be
activated when it shouldn't.
If BT notif is handled with the wiphy mutex, it can't run in
parallel to ieee80211_set_active_links, which also holds that
mutex.

Add the necessary infrastructure here, for use in the next commit.

Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Link: https://msgid.link/20240123200528.ce83d16cdec8.I35ef53fa23f58b9ec17924099238b61deafcecd7@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: implement can_activate_links callback
Miri Korenblit [Tue, 23 Jan 2024 18:08:22 +0000 (20:08 +0200)]
wifi: iwlwifi: implement can_activate_links callback

This callback checks if a given bitmap of active_links
will be supported by the driver or not.

Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Link: https://msgid.link/20240123200528.a26fd48bfe3d.I03ae6b4c7fd24e8701660a68cec9403dc3469a0e@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: bump FW API to 87 for AX/BZ/SC devices
Gregory Greenman [Tue, 23 Jan 2024 18:08:21 +0000 (20:08 +0200)]
wifi: iwlwifi: bump FW API to 87 for AX/BZ/SC devices

Start supporting API version 87 for new devices.

Signed-off-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.14cc41da34c4.Ic867f979504c60c21c8182e9adccec9ffbadfe5b@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: mvm: introduce PHY_CONTEXT_CMD_API_VER_5
Emmanuel Grumbach [Tue, 23 Jan 2024 18:08:20 +0000 (20:08 +0200)]
wifi: iwlwifi: mvm: introduce PHY_CONTEXT_CMD_API_VER_5

This command version adds two news fields:
sbb_bandwidth and sbb_ctrl_channel_loc
They will be populated later.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.82ab4140fff9.Icfba4819fe0b7ac8219ab671c632e25f5fbbaf6f@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: skip affinity setting on non-SMP
Benjamin Berg [Tue, 23 Jan 2024 18:08:18 +0000 (20:08 +0200)]
wifi: iwlwifi: skip affinity setting on non-SMP

Without SMP the function is just a stub that returns an error code. Add
a compile time check for CONFIG_SMP in the interest of not logging an
error if setting affinity is not possible anyway.

Signed-off-by: Benjamin Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.ed9094390731.Ic4e5e019c01fd4231b99cf4919af5d19d6353869@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: nvm-parse: advertise common packet padding
Johannes Berg [Tue, 23 Jan 2024 18:08:17 +0000 (20:08 +0200)]
wifi: iwlwifi: nvm-parse: advertise common packet padding

We should - at least for now - advertise common nominal packet
padding of 16µs instead of the more specific PPE thresholds.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.4312e176dfdc.Ide75980ff57257a31e86e6ac5948a8f97aaab577@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: change link id in time event to s8
Miri Korenblit [Tue, 23 Jan 2024 18:08:16 +0000 (20:08 +0200)]
wifi: iwlwifi: change link id in time event to s8

Link ID in time event data is -1 when the time event is cleared.
Change the type of the link ID in the time event data structure
and in the affected function from unsigned to signed.

Fixes: 135065837310 ("wifi: iwlwifi: support link_id in SESSION_PROTECTION cmd")
Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Link: https://msgid.link/20240123200528.50d4941f946c.Iea990b118c69bc3e1eb61c1d134c9d470b3a17ac@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: remove retry loops in start
Johannes Berg [Tue, 23 Jan 2024 18:08:15 +0000 (20:08 +0200)]
wifi: iwlwifi: remove retry loops in start

There's either the pldr_sync case, in which case we didn't want
or do the retry loops anyway, or things will just continue to
fail. Remove the retry loop that was added in a previous attempt
to address the issue that was later (though still a bit broken)
addressed by the pldr_sync case.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.f80a88a18799.I48f21eda090f4cc675f40e99eef69a986d21b500@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: mvm: limit EHT 320 MHz MCS for STEP URM
Johannes Berg [Tue, 23 Jan 2024 18:08:14 +0000 (20:08 +0200)]
wifi: iwlwifi: mvm: limit EHT 320 MHz MCS for STEP URM

If the STEP (the interface between MAC and PHY) is in URM
(a lower speed mode) then we cannot use 320 MHz MCS > 9.
Therefore, limit the MCS in our capabilities in this case.
Note that this also limits the TX/rate scaling since that
takes both TX and RX capabilities into account.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.02bae683b7fc.Id5efbb71d45da02c8c4e211d20396637ddd44da8@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: disable 160 MHz based on subsystem device ID
Mukesh Sisodiya [Fri, 26 Jan 2024 07:00:30 +0000 (09:00 +0200)]
wifi: iwlwifi: disable 160 MHz based on subsystem device ID

The driver should not send 160 MHz BW support for 5 GHz
band in HE if PCI subsystem device ID  indicates no 160 MHz support.

Signed-off-by: Mukesh Sisodiya <[email protected]>
Reviewed-by: Mordechay Goodstein <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240126085924.77c248ce6986.I558e8d0cf19dc862b1c4124df78a4cb690095bb2@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: make TB reallocation a debug message
Johannes Berg [Tue, 23 Jan 2024 18:08:12 +0000 (20:08 +0200)]
wifi: iwlwifi: make TB reallocation a debug message

There's no need to print this, it's a known issue and
the workaround works just fine. Make the reallocation
message just a debug message.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.329d5f2ee7f7.I0bfc6dde17fe2c738129f3aba746c6cba57589f9@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: Add support for new 802.11be device
Mukesh Sisodiya [Tue, 23 Jan 2024 18:08:10 +0000 (20:08 +0200)]
wifi: iwlwifi: Add support for new 802.11be device

Add support for the new 802.11be device with limites capabilities:
- 320 MHz isn't supported
- MCSs 12 and 13 are not supported

Signed-off-by: Mukesh Sisodiya <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.8529bd2acedf.I25dccb7bbeb21b8df2123fad51dde7fcf137a508@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: iwlwifi: add kunit test for devinfo ordering
Johannes Berg [Tue, 23 Jan 2024 18:08:09 +0000 (20:08 +0200)]
wifi: iwlwifi: add kunit test for devinfo ordering

We used to have a test built into the code for this internally,
but now we can put that into kunit and let everyone run it, to
verify the devinfo table ordering if it's changed.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Benjamin Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.a4a8af7c091f.I0fb09083317b331168b99b8db39656a126a5cc4d@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: apply duration for SW scan
Michael-CY Lee [Tue, 23 Jan 2024 05:47:52 +0000 (13:47 +0800)]
wifi: mac80211: apply duration for SW scan

This patch makes duration in scan request be applicable when using
SW scan, but only accepts durations greater than the default value for
the following reasons:
1. Most APs have a beacoon interval of 100ms.
2. Sending and receiving probe require some delay.
3. Setting channel to HW also requires some delays

Signed-off-by: Michael-CY Lee <[email protected]>
Link: https://msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: use deflink and fix typo in link ID check
Benjamin Berg [Thu, 11 Jan 2024 16:17:46 +0000 (18:17 +0200)]
wifi: mac80211: use deflink and fix typo in link ID check

This does not change anything effectively, but it is closer to what the
code is trying to achieve here. i.e. select the link data if it is an
MLD and fall back to using the deflink otherwise.

Fixes: 0f99f0878350 ("wifi: mac80211: Print local link address during authentication")
Signed-off-by: Benjamin Berg <[email protected]>
Reviewed-by: Ilan Peer <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240111181514.4c4b1c40eb3c.I2771621dee328c618536596b7e56232df42a79c8@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: don't set bss_conf in parsing
Johannes Berg [Thu, 11 Jan 2024 16:17:45 +0000 (18:17 +0200)]
wifi: mac80211: don't set bss_conf in parsing

When parsing 6 GHz operation, don't set the bss_conf
values. We only commit to that later in association,
so move the code there. Also clear it later.

While at it, handle IEEE80211_6GHZ_CTRL_REG_VLP_AP.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240111181514.c2da4bc515e8.I219ca40e15c0fbaff0e7c3e83ca4b92ecbc1f8ae@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: disallow drivers with HT wider than HE
Johannes Berg [Thu, 11 Jan 2024 16:17:43 +0000 (18:17 +0200)]
wifi: mac80211: disallow drivers with HT wider than HE

To simplify the code in the next patch, disallow drivers
supporting 40 MHz in HT but not HE, since we'd otherwise
have to track local maximum bandwidth per mode there.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240111181514.da15fe3214d2.I4df51ad2f4c844615c168bf9bdb498925b3c77d4@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: simplify HE capability access
Johannes Berg [Thu, 11 Jan 2024 16:17:42 +0000 (18:17 +0200)]
wifi: mac80211: simplify HE capability access

For verifying the required HE capabilities are supported
locally, we access the HE capability element of the AP.
Simplify that access, we've already parsed and validated
it when parsing elements.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240111181514.2ef62b43caeb.I8baa604dd3f3399e08b86c99395a2c6a1185d35d@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: remove extra element parsing
Johannes Berg [Thu, 11 Jan 2024 16:17:41 +0000 (18:17 +0200)]
wifi: mac80211: remove extra element parsing

We already parse all the BSS elements into elems, there's
really no need to separately find EHT/ML again. Remove the
extra code.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240111181514.c4a55da9f778.I112b1ef00904c4183ac7644800f8daa8a4449875@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: simplify ieee80211_config_bw() prototype
Johannes Berg [Thu, 11 Jan 2024 16:17:40 +0000 (18:17 +0200)]
wifi: mac80211: simplify ieee80211_config_bw() prototype

The only user of this function passes a lot of pointers
directly from the parsed elements, so it's simpler to
just pass the entire elements parsing struct. This also
shows that the ht_cap is actually unused.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240111181514.f0653cd5e7dd.I8bd5ee848074029a9f0495c95e4339546ad8fe15@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211_hwsim: advertise 15 simultaneous links
Johannes Berg [Thu, 11 Jan 2024 16:17:39 +0000 (18:17 +0200)]
wifi: mac80211_hwsim: advertise 15 simultaneous links

Advertise MLD capabilities and operations in AP mode that
say that up to 15 links are supported simultaneously.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Ilan Peer <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240111181514.52a1d48b67e6.Ie459df742944d24d6401683d54d2f3ac44834803@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: cfg80211: validate MLO connections better
Johannes Berg [Tue, 2 Jan 2024 19:35:44 +0000 (21:35 +0200)]
wifi: cfg80211: validate MLO connections better

When going into an MLO connection, validate that the link IDs
match what userspace indicated, and that the AP MLD addresses
and capabilities are all matching between the links.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.ff83c034cb9a.I9962db0bfa8c73b37b8d5b59a3fad7f02f2129ae@changeid
[roll in extra fix from Miri to actually check the return value]
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: take EML/MLD capa from assoc response
Johannes Berg [Tue, 2 Jan 2024 19:35:43 +0000 (21:35 +0200)]
wifi: mac80211: take EML/MLD capa from assoc response

The association response is more likely to be correct
than a random scan result, which really also should be
correct, but we generally prefer to take data from the
association response, so do that here as well.

Also reset the data so it doesn't hang around from an
old connection to a non-MLO connection, drivers would
hopefully not look at it, but less surprise this way.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.1d10f1d1dbab.I545e955675e2269a52496a22ae7822d95b40235e@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211_hwsim: advertise AP-side EMLSR/EMLMR capa
Johannes Berg [Tue, 2 Jan 2024 19:35:41 +0000 (21:35 +0200)]
wifi: mac80211_hwsim: advertise AP-side EMLSR/EMLMR capa

Advertise EMLSR and EMLMR capability on the AP side to be
a better compliant AP MLD.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Ilan Peer <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.dc8786efa787.Ic460c13a91d770c208ac16d0b3e94941bab9b8eb@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: add support for SPP A-MSDUs
Johannes Berg [Tue, 2 Jan 2024 19:35:40 +0000 (21:35 +0200)]
wifi: mac80211: add support for SPP A-MSDUs

If software crypto is used, simply add support for SPP A-MSDUs
(and use it whenever enabled as required by the cfg80211 API).

If hardware crypto is used, leave it up to the driver to set
the NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT flag and then check
sta->spp_amsdu or the IEEE80211_KEY_FLAG_SPP_AMSDU key flag.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Daniel Gabay <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.b8ada4514e2b.I1ac25d5f158165b5a88062a5a5e4c4fbeecf9a5d@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: cfg80211: add support for SPP A-MSDUs
Johannes Berg [Tue, 2 Jan 2024 19:35:39 +0000 (21:35 +0200)]
wifi: cfg80211: add support for SPP A-MSDUs

Add SPP (signaling and payload protected) AMSDU support.

Since userspace has to build the RSNX element, add an extended
feature flag to indicate that this is supported.

In order to avoid downgrade/mismatch attacks, add a flag to the assoc
command on the station side, so that we can be sure that the value of
the flag comes from the same RSNX element that will be validated by
the supplicant against the 4-way-handshake. If we just pulled the
data out of a beacon/probe response, we could theoretically look an
RSNX element from a different frame, with a different value for this
flag, than the supplicant is using to validate in the
4-way-handshake.

Note that this patch is only geared towards software crypto
implementations or hardware ones that can perfectly implement SPP
A-MSDUs, i.e. are able to switch the AAD construction on the fly for
each TX/RX frame.

For more limited hardware implementations, more capability
advertisement  would be required, e.g. if the hardware has no way
to switch this on the fly but has only a global configuration that
must apply to all stations.

The driver could of course *reject* mismatches, but the supplicant
must know so it can do things like not negotiating SPP A-MSDUs on
a T-DLS link when connected to an AP that doesn't support it, or
similar.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Daniel Gabay <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.fadac8df7030.I9240aebcba1be49636a73c647ed0af862713fc6f@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211_hwsim: Declare support for negotiated TTLM
Ilan Peer [Tue, 2 Jan 2024 19:35:38 +0000 (21:35 +0200)]
wifi: mac80211_hwsim: Declare support for negotiated TTLM

Advertise support for negotiated TTLM in AP mode for testing
purposes. In addition, declare support for some extended
capabilities that are globally advertised by mac80211.

Signed-off-by: Ilan Peer <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.3f54382f8449.I42b2f7c52f7574448cc8da3ad3db45075e4e0baa@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: add support for negotiated TTLM request
Ayala Beker [Tue, 2 Jan 2024 19:35:37 +0000 (21:35 +0200)]
wifi: mac80211: add support for negotiated TTLM request

Update neg_ttlm and active_links according to the new mapping,
and send a negotiated TID-to-link map request with the new mapping.

Signed-off-by: Ayala Beker <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.eeb385d771df.I2a5441c14421de884dbd93d1624ce7bb2c944833@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211_hwsim: handle BSS_CHANGED_MLD_TTLM
Ayala Beker [Tue, 2 Jan 2024 19:35:36 +0000 (21:35 +0200)]
wifi: mac80211_hwsim: handle BSS_CHANGED_MLD_TTLM

Same as in BSS_CHANGED_VALID_LINKS, set the active
links to all the usable links.

Signed-off-by: Ayala Beker <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.3c28da3534e9.I76846c5dd693f930d4828e411c734639708b5a1a@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211_hwsim: handle TID to link mapping neg request
Ayala Beker [Tue, 2 Jan 2024 19:35:35 +0000 (21:35 +0200)]
wifi: mac80211_hwsim: handle TID to link mapping neg request

Accept the request if all TIDs are mapped to the same link set,
otherwise reject it.

Signed-off-by: Ayala Beker <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.dfa8e132d0cd.I5fbec1fef933980819ea39c1227f37d307ab1145@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: mac80211: process and save negotiated TID to Link mapping request
Ayala Beker [Tue, 2 Jan 2024 19:35:34 +0000 (21:35 +0200)]
wifi: mac80211: process and save negotiated TID to Link mapping request

An MLD may send TID-to-Link mapping request frame to negotiate
TID to link mapping with a peer MLD.
Support handling negotiated TID-to-Link mapping request frame
by parsing the frame, asking the driver whether it supports the
received mapping or not, and sending a TID-to-Link mapping response
to the AP MLD.
Theoretically, links that became inactive due to the received TID-to-Link
mapping request, can be selected to be activated but this would require
tearing down the negotiated TID-to-Link mapping, which is still not
supported.

Signed-off-by: Ayala Beker <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.0bc1a24fcc9d.Ie72e47dc6f8c77d4a2f0947b775ef6367fe0edac@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: ieee80211: add definitions for negotiated TID to Link map
Ayala Beker [Tue, 2 Jan 2024 19:35:33 +0000 (21:35 +0200)]
wifi: ieee80211: add definitions for negotiated TID to Link map

Add the relevant definitions and structures for TID to Link mapping
negotiation request/response/teardown according to P802.11be_D4.0.

Signed-off-by: Ayala Beker <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.9ef2b866c8c7.Ieaf7dadea9961e0edc55d19c99f0f9fbae591de6@changeid
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: cfg80211: add RNR with reporting AP information
Benjamin Berg [Tue, 2 Jan 2024 19:35:32 +0000 (21:35 +0200)]
wifi: cfg80211: add RNR with reporting AP information

If the reporting AP is part of the same MLD, then an entry in the RNR is
required in order to discover it again from the BSS generated from the
per-STA profile in the Multi-Link Probe Response.

We need this because we do not have a direct concept of an MLD AP and
just do the lookup from one to the other on the fly if needed. As such,
we need to ensure that this lookup will work both ways.

Fixes: 2481b5da9c6b ("wifi: cfg80211: handle BSS data contained in ML probe responses")
Signed-off-by: Benjamin Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240102213313.4cb3dbb1d84f.I7c74edec83c5d7598cdd578929fd0876d67aef7f@changeid
[roll in off-by-one fix and test updates from Benjamin]
Signed-off-by: Johannes Berg <[email protected]>
14 months agowifi: wireless: avoid strlen() in cfg80211_michael_mic_failure()
Dmitry Antipov [Wed, 10 Jan 2024 05:42:06 +0000 (08:42 +0300)]
wifi: wireless: avoid strlen() in cfg80211_michael_mic_failure()

In 'cfg80211_michael_mic_failure()', avoid extra call to 'strlen()'
by using the value returned by 'sprintf()'. Compile tested only.

Signed-off-by: Dmitry Antipov <[email protected]>
Link: https://msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
14 months agoMAINTAINERS: remove myself as iwlwifi driver maintainer
Gregory Greenman [Tue, 2 Jan 2024 12:20:19 +0000 (14:20 +0200)]
MAINTAINERS: remove myself as iwlwifi driver maintainer

As I'm resigning from Intel, it's time to remove myself as a maintainer
of iwlwifi. Good luck to Miri!

Signed-off-by: Gregory Greenman <[email protected]>
Link: https://msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
14 months agotsnep: Add link down PHY loopback support
Gerhard Engleder [Tue, 23 Jan 2024 20:01:51 +0000 (21:01 +0100)]
tsnep: Add link down PHY loopback support

PHY loopback turns off link state change signalling. Therefore, the
loopback only works if the link is already up before the PHY loopback is
activated.

Ensure that PHY loopback works even if the link is not already up during
activation by calling netif_carrier_on() explicitly.

Signed-off-by: Gerhard Engleder <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
14 months agogve: Modify rx_buf_alloc_fail counter centrally and closer to failure
Ankit Garg [Wed, 24 Jan 2024 20:54:35 +0000 (20:54 +0000)]
gve: Modify rx_buf_alloc_fail counter centrally and closer to failure

Previously, each caller of gve_rx_alloc_buffer had to increase counter
 and as a result one caller was not tracking those failure. Increasing
 counters at a common location now so callers don't have to duplicate
 code or miss counter management.

Signed-off-by: Ankit Garg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
14 months agoMerge branch 'selftests-updates-to-fcnal-test-for-autoamted-environment'
Jakub Kicinski [Fri, 26 Jan 2024 01:14:24 +0000 (17:14 -0800)]
Merge branch 'selftests-updates-to-fcnal-test-for-autoamted-environment'

David Ahern says:

====================
selftests: Updates to fcnal-test for autoamted environment

The first patch updates the PATH for fcnal-test.sh to find the nettest
binary when invoked at the top-level directory via
   make -C tools/testing/selftests TARGETS=net run_tests

Second patch fixes a bug setting the ping_group; it has a compound value
and that value is not traversing the various helper functions in tact.
Fix by creating a helper specific to setting it.

Third patch adds more output when a test fails - e.g., to catch a change
in the return code of some test.

With these 3 patches, the entire suite completes successfully when
run on Ubuntu 23.10 with 6.5 kernel - 914 tests pass, 0 fail.
====================

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
This page took 0.113326 seconds and 4 git commands to generate.