]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
8 months agowifi: mac80211: refactor BW limitation check for CSA parsing
Michael-CY Lee [Wed, 9 Oct 2024 12:18:12 +0000 (20:18 +0800)] 
wifi: mac80211: refactor BW limitation check for CSA parsing

Refactor the BW limitation check to a more general format when
parsing CSA. Also, the original BW check did not account for BW
less than 160 MHz.

Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
Link: https://patch.msgid.link/20241009121812.2419-1-michael-cy.lee@mediatek.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: filter on monitor interfaces based on configured channel
Felix Fietkau [Wed, 9 Oct 2024 08:25:52 +0000 (10:25 +0200)] 
wifi: mac80211: filter on monitor interfaces based on configured channel

When a monitor interface has an assigned channel (only happens with the
NO_VIRTUAL_MONITOR feature), only pass packets received on that channel.
This is useful for monitoring on multiple channels at the same time using
multiple monitor interfaces.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/1bbe55107ba0f2e62ea90f305faeb7ba9247ef29.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: refactor ieee80211_rx_monitor
Felix Fietkau [Wed, 9 Oct 2024 08:25:51 +0000 (10:25 +0200)] 
wifi: mac80211: refactor ieee80211_rx_monitor

Rework the monitor mode interface iteration to get rid of the last_monitor
condition. Preparation for further filtering received monitor packets.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/d57d82f109643894325beb9db6da8f001fc533eb.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: add support for the monitor SKIP_TX flag
Felix Fietkau [Wed, 9 Oct 2024 08:25:50 +0000 (10:25 +0200)] 
wifi: mac80211: add support for the monitor SKIP_TX flag

Do not pass locally sent packets to monitor interfaces with this flag set.
Skip processing tx packets on the status call entirely if no monitor
interfaces without this flag are present.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/c327bb57ef8dadaa6a0e8e4dc2f5f99ae8123e6c.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: cfg80211: add monitor SKIP_TX flag
Felix Fietkau [Wed, 9 Oct 2024 08:25:49 +0000 (10:25 +0200)] 
wifi: cfg80211: add monitor SKIP_TX flag

This can be used to indicate that the user is not interested in receiving
locally sent packets on the monitor interface.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/f0c20f832eadd36c71fba9a2a16ba57d78389b6c.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: add flag to opt out of virtual monitor support
Felix Fietkau [Wed, 9 Oct 2024 08:25:48 +0000 (10:25 +0200)] 
wifi: mac80211: add flag to opt out of virtual monitor support

This is useful for multi-radio devices that are capable of monitoring on
multiple channels simultanenously. When this flag is set, each monitor
interface is passed to the driver individually and can have a configured
channel.
The vif mac address for non-active monitor interfaces is cleared, in order
to allow the driver to tell them apart from active ones.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/3c55505ee0cf0a5f141fbcb30d1e8be8d9f40373.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: cfg80211: pass net_device to .set_monitor_channel
Felix Fietkau [Wed, 9 Oct 2024 08:25:47 +0000 (10:25 +0200)] 
wifi: cfg80211: pass net_device to .set_monitor_channel

Preparation for allowing multiple monitor interfaces with different channels
on a multi-radio wiphy.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/35fa652dbfebf93343f8b9a08fdef0467a2a02dc.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: remove status->ampdu_delimiter_crc
Felix Fietkau [Wed, 9 Oct 2024 08:25:46 +0000 (10:25 +0200)] 
wifi: mac80211: remove status->ampdu_delimiter_crc

This was never used by any driver, so remove it to free up some space.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/e6fee6eed49b105261830db1c74f13841fb9616c.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: cfg80211: report per wiphy radio antenna mask
Felix Fietkau [Wed, 9 Oct 2024 08:25:45 +0000 (10:25 +0200)] 
wifi: cfg80211: report per wiphy radio antenna mask

With multi-radio devices, each radio typically gets a fixed set of antennas.
In order to be able to disable specific antennas for some radios, user space
needs to know which antenna mask bits are assigned to which radio.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/e0a26afa2c88eaa188ec96ec6d17ecac4e827641.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: use vif radio mask to limit creating chanctx
Felix Fietkau [Wed, 9 Oct 2024 08:25:44 +0000 (10:25 +0200)] 
wifi: mac80211: use vif radio mask to limit creating chanctx

Reject frequencies not supported by any radio that the vif is allowed to use.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/95ea1f6fc5bd1614a0c7952b6c67726e3fd635fb.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: use vif radio mask to limit ibss scan frequencies
Felix Fietkau [Wed, 9 Oct 2024 08:25:43 +0000 (10:25 +0200)] 
wifi: mac80211: use vif radio mask to limit ibss scan frequencies

Reject frequencies not supported by any radio that the vif is allowed to
use.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/9d5c0b6b00a7ecef6a0ac6de765c0af00c8bb0e1.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: cfg80211: add option for vif allowed radios
Felix Fietkau [Wed, 9 Oct 2024 08:25:42 +0000 (10:25 +0200)] 
wifi: cfg80211: add option for vif allowed radios

This allows users to prevent a vif from affecting radios other than the
configured ones. This can be useful in cases where e.g. an AP is running
on one radio, and triggering a scan on another radio should not disturb it.

Changing the allowed radios list for a vif is supported, but only while
it is down.

While it is possible to achieve the same by always explicitly specifying
a frequency list for scan requests and ensuring that the wrong channel/band
is never accidentally set on an unrelated interface, this change makes
multi-radio wiphy setups a lot easier to deal with for CLI users.

By itself, this patch only enforces the radio mask for scanning requests
and remain-on-channel. Follow-up changes build on this to limit configured
frequencies.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://patch.msgid.link/eefcb218780f71a1549875d149f1196486762756.1728462320.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: allow IWL_FW_CHECK() with just a string
Johannes Berg [Tue, 8 Oct 2024 04:25:28 +0000 (07:25 +0300)] 
wifi: iwlwifi: allow IWL_FW_CHECK() with just a string

We require a message, but the macros shouldn't require a
formatted message, a constant one can be fine. Change the
macros to support that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.96e8554cb7a2.I0e06d8fd49f86bd4e9e216fc2265c43d7e78a095@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: remove redundant check
Miri Korenblit [Tue, 8 Oct 2024 04:25:27 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: remove redundant check

iwl_mvm_sta_from_mac80211 can't return NULL.
Remove the check.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.5d6bab61c75e.I2cfa1669d4534bce9e9cfdace45f797005b71b9b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: fw: add an error table status getter
Yedidya Benshimol [Tue, 8 Oct 2024 04:25:26 +0000 (07:25 +0300)] 
wifi: iwlwifi: fw: add an error table status getter

Add a function for getting the error status and error
code for given error table.
Remove a static function of same purpose from mvm/d3.c

Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.610a38614ce6.Iab5f795bc30ce5d08550cff1772fe051527bcb95@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: do not warn about a flush with an empty TX queue
Benjamin Berg [Tue, 8 Oct 2024 04:25:25 +0000 (07:25 +0300)] 
wifi: iwlwifi: do not warn about a flush with an empty TX queue

When resuming it can happen that the TX queue is flushed even though it
is entirely empty. This is completely fine and should not be causing an
error level log message.

Return early from reclaim in that case.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.7c152d0820be.I3ae39a9a470f47bfe4405f2e5c30327e157eb55f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: remove IWL_MVM_HW_CSUM_DISABLE
Miri Korenblit [Tue, 8 Oct 2024 04:25:24 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: remove IWL_MVM_HW_CSUM_DISABLE

This is always set to 0.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.e1b6ab87c969.Ic623ab87cb2a22285cdbed99325fdfcfe439c7d4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: remove unneeded check
Miri Korenblit [Tue, 8 Oct 2024 04:25:23 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: remove unneeded check

When checking if extra LTF should be disabled, we don't need to check the
the HW revision.
sband_eht_cap will be NULL if eht_capa::has_eht is false,
and that will be the case for the HWs that don't support EHT.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.78b0adbb7b50.I630a64f06ca86baecde6a2a238733b7df3cf70e4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: Remove redundant rcu_read_lock() in reorder buffer
Daniel Gabay [Tue, 8 Oct 2024 04:25:22 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: Remove redundant rcu_read_lock() in reorder buffer

iwl_mvm_reorder() is already called within a rcu-read section.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.8f229e1b08b7.I31a371f635d84db300ad16ce6170cc07a8b154fb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: Remove unused last_amsdu from reorder buffer
Daniel Gabay [Tue, 8 Oct 2024 04:25:21 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: Remove unused last_amsdu from reorder buffer

The last_amsdu field is not used and appears to be a leftover
from a previous implementation, remove it.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.13ba0eeae0fd.I94985512596e5996f5ab199451ce851c59a5a72a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: bump FW API to 94 for BZ/SC devices
Miri Korenblit [Tue, 8 Oct 2024 04:25:20 +0000 (07:25 +0300)] 
wifi: iwlwifi: bump FW API to 94 for BZ/SC devices

Start supporting API version 94 for those devices.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.7ddabbd42131.Ib8bd35521a317c14b3a2a2e5983cf5bca5e8718b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: fw: api: update link context API version
Johannes Berg [Tue, 8 Oct 2024 04:25:19 +0000 (07:25 +0300)] 
wifi: iwlwifi: fw: api: update link context API version

The flags_mask field is becoming reserved, and a new bandwidth
request is being added for RX OMI purposes. Support the new API
version as preparation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.437c6573df3c.I03612cb6cf47b12038c1db11b95a554cdea714e9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: log information about HW restart completion
Benjamin Berg [Tue, 8 Oct 2024 04:25:18 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: log information about HW restart completion

It can happen that more errors occur after a firmware assertion. In that
case, having another log message after the restart has completed makes
it easier to see which errors where still part of the restart flow.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.d205dd88fb9d.Ic43a1b399f59d2ab1018ff2f9e6e3a0324692660@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: prepare the tx_power handling to be per-link
Emmanuel Grumbach [Tue, 8 Oct 2024 04:25:17 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: prepare the tx_power handling to be per-link

We still need the firmware to align

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.317f44628eb9.I3f6a735181c6c20e805b61e4f9d2056b7f90d7ea@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: exit EMLSR earlier if bss_param_ch_cnt is updated
Emmanuel Grumbach [Tue, 8 Oct 2024 04:25:16 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: exit EMLSR earlier if bss_param_ch_cnt is updated

If we lose beacons and bss_param_ch_cnt gets updated on the other link,
we need to exit EMLSR earlier.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.9c5ad120b937.Ibdde0b3770d0821e802009d4684b617220dd6e1a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: iwlwifi: mvm: Add support for prep_add_interface() callback
Ilan Peer [Tue, 8 Oct 2024 04:25:15 +0000 (07:25 +0300)] 
wifi: iwlwifi: mvm: Add support for prep_add_interface() callback

Implement the prep_add_interface() callback, so that in case
EMLSR is active and an AP or a P2P interface is do to be added,
EMLSR would be blocked.

Add a delayed work, so that in case that the interface was not
eventually added, EMLSR would be unblocked after 5 seconds.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.3baf282d0a01.Ife0a929455cb13a95ab197ca765d8db777ff9d89@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: expose ieee80211_chan_width_to_rx_bw() to drivers
Johannes Berg [Mon, 7 Oct 2024 12:00:58 +0000 (15:00 +0300)] 
wifi: mac80211: expose ieee80211_chan_width_to_rx_bw() to drivers

Drivers might need to also do this calculation, no point in
them duplicating the code. Since it's so simple, just make
it an inline.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.af003cb4a088.I8b5d29504b726caae24af6013c65b3daebe842a2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: chan: calculate min_def also for client mode
Johannes Berg [Mon, 7 Oct 2024 12:00:57 +0000 (15:00 +0300)] 
wifi: mac80211: chan: calculate min_def also for client mode

In order to deal with (temporary) bandwidth reductions to/from
the AP such as the upcoming RX OMI changes, modify the min_def
calculation to also not take the chanreq width into account in
client mode. This normally changes nothing as the AP bandwidth
will be the same as the channel request's width. In the RX OMI
changes, however, the code will reduce the bandwidth for only
the AP STA, since the OMI is only to that, and TDLS STAs are
unaffected. Using the min_def for this case simplifies RX OMI
a lot.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.95a39c4f6f45.I2e7517fb1a7221dc6f60b0c752e4882042b4265d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: add an option to fake ieee80211_connection_loss
Miri Korenblit [Mon, 7 Oct 2024 12:00:56 +0000 (15:00 +0300)] 
wifi: mac80211: add an option to fake ieee80211_connection_loss

This allows faking this function in KUnit tests.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.3b42e7547c65.I3bcbd51bec9ccfc7c08739450ec778722549c007@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: parse A-MSDU len from EHT capabilities
Miri Korenblit [Mon, 7 Oct 2024 12:00:55 +0000 (15:00 +0300)] 
wifi: mac80211: parse A-MSDU len from EHT capabilities

On 2.4 GHz there's no VHT, so EHT defines its own bits for
the maximum MPDU length. Parse and store them in the link_sta.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.e05da59c419a.I0b1c047639160d9a96f48ab013c18ea33f5473b0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: call rate_control_rate_update() for link STA
Johannes Berg [Mon, 7 Oct 2024 12:00:54 +0000 (15:00 +0300)] 
wifi: mac80211: call rate_control_rate_update() for link STA

In order to update the right link information, call the update
rate_control_rate_update() with the right link_sta, and then
pass that through to the driver's sta_rc_update() method. The
software rate control still doesn't support it, but that'll be
skipped by not having a rate control ref.

Since it now operates on a link sta, rename the driver method.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.5851b6b5fd41.Ibdf50d96afa4b761dd9b9dfd54a1147e77a75329@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: allow rate_control_rate_init() for links
Johannes Berg [Mon, 7 Oct 2024 12:00:53 +0000 (15:00 +0300)] 
wifi: mac80211: allow rate_control_rate_init() for links

Andrei previously fixed an issue in the client where the NSS
for links other than the primary/assoc/deflink isn't set. The
same issue appears to exist on the AP side, because there's
only a call to rate_control_rate_init() for the deflink, and
not any other links.

Rework the code a bit to do rate_control_rate_init() for links,
even if it really doesn't work with software rate control yet,
it does other things as well.

Also add rate_control_rate_init_all_links() to actually do it
properly when moving to ASSOC state in cfg80211.

Change the explicit call to ieee80211_sta_init_nss() to instead
be rate_control_rate_init() now in the client code, but also
add a call to rate_control_rate_init() when a link is added in
AP mode and the STA is already associated.

This should fix the NSS initialization issue, and perhaps pave
the way for actual software rate scaling a bit, in case anyone
cares in the future, but that of course needs a lot more than
just the init call.

We still need to fix the rate control _update_ as well, and the
sta_rc_update() driver method especially, but that will be in a
different patch.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.c693274a908f.I0376da02e9f5a30eaa1b5d0d01371ff09506d453@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: update the right link for tx power
Emmanuel Grumbach [Mon, 7 Oct 2024 12:00:52 +0000 (15:00 +0300)] 
wifi: mac80211: update the right link for tx power

Stop looking at deflink and start using the actual link.
Initialize the power settings upon link init.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.2685dab8e1ab.I1d82cbdb2dda020aee4a225bd9a134f7d82dd810@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: __ieee80211_recalc_txpower receives a link
Emmanuel Grumbach [Mon, 7 Oct 2024 12:00:51 +0000 (15:00 +0300)] 
wifi: mac80211: __ieee80211_recalc_txpower receives a link

Handle the tx power per-link. Don't change the behavior for now. Just
change the signature of the function.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.3c9cd0731f5b.I6ebfd9d5084f3602b55c55e2669881fd92471c2f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: ieee80211_recalc_txpower receives a link
Emmanuel Grumbach [Mon, 7 Oct 2024 12:00:50 +0000 (15:00 +0300)] 
wifi: mac80211: ieee80211_recalc_txpower receives a link

Handle the tx power per-link. Don't change the behavior for now. Just
change the signature of the function.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.705bbf953d0a.I8a429dede07bab5801f4c730a6abff7ce23b22d3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: remove unneeded parameters
Emmanuel Grumbach [Mon, 7 Oct 2024 12:00:49 +0000 (15:00 +0300)] 
wifi: mac80211: remove unneeded parameters

ieee80211_find_80211h_pwr_constr and ieee80211_find_cisco_dtpc don't
need the pointer to struct ieee80211_sub_if_data *sdata. Remove it and
it'll be one step closer to handle the power constraints per-link.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.3ea505cd74e7.Id416127544afd80e4fe7b275b612aef511fc64ed@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: make bss_param_ch_cnt available for the low level driver
Emmanuel Grumbach [Mon, 7 Oct 2024 12:00:48 +0000 (15:00 +0300)] 
wifi: mac80211: make bss_param_ch_cnt available for the low level driver

Drivers may need to track this. Make it available for them, and maintain
the value when beacons are received.
When link X receives a beacon, iterate the RNR elements and update all
the links with their respective data.
Track the link id that updated the data so that each link can know
whether the update came from its own beacon or from another link.
In case, the update came from the link's own beacon, always update the
updater link id.
The purpose is to let the low level driver know if a link is losing its
beacons. If link X is losing its beacons, it can still track the
bss_param_ch_cnt and know where the update came from.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.e2d8d1a722ad.I04b883daba2cd48e5730659eb62ca1614c899cbb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: rename IEEE80211_CHANCTX_CHANGE_MIN_WIDTH
Miri Korenblit [Mon, 7 Oct 2024 12:00:47 +0000 (15:00 +0300)] 
wifi: mac80211: rename IEEE80211_CHANCTX_CHANGE_MIN_WIDTH

The name is misleading, this actually indicates that
ieee80211_chanctx_conf::min_def was updated.
Rename it to IEEE80211_CHANCTX_CHANGE_MIN_DEF.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.726b5f12ae0c.I3bd9e594c9d2735183ec049a4c7224bd0a9599c9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: cfg80211: disallow SMPS in AP mode
Johannes Berg [Mon, 7 Oct 2024 12:00:46 +0000 (15:00 +0300)] 
wifi: cfg80211: disallow SMPS in AP mode

In practice, userspace hasn't been able to set this for many
years, and mac80211 has already rejected it (which is now no
longer needed), so reject SMPS mode (other than "OFF" to be
a bit more compatible) in AP mode. Also remove the parameter
from the AP settings struct.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.fe1fc46484cf.I8676fb52b818a4bedeb9c25b901e1396277ffc0b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mac80211: Add support to indicate that a new interface is to be added
Ilan Peer [Mon, 7 Oct 2024 12:00:45 +0000 (15:00 +0300)] 
wifi: mac80211: Add support to indicate that a new interface is to be added

Add support to indicate to the driver that an interface is about to be
added so that the driver could prepare its resources early if it needs
so.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.e0e8563e1c30.Ifccc96a46a347eb15752caefc9f4eff31f75ed47@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agoMerge tag 'rtw-next-2024-10-10' of https://github.com/pkshih/rtw
Kalle Valo [Thu, 17 Oct 2024 17:21:22 +0000 (20:21 +0300)] 
Merge tag 'rtw-next-2024-10-10' of https://github.com/pkshih/rtw

rtw-next patches for v6.13

No big change at this point. Regular development and fixes are listed:

rtl8xxxu:
 - correct beaconing for the case of STA + AP

rtw88:
 - consolidate parser of RX descriptor as preparation to support coming
   chips

rtw89:
 - update BT-coexistence to improve user experience for RTL8852BE and
   RTL8852BE-VT
 - correct RTL8922AE RF calibration timeout time and print out firmware
   log
 - set proper PCI EQ value for RTL8852CE and RTL8922AE
 - adjust to support MLO continuously

8 months agowifi: cw1200: Remove unused cw1200_queue_requeue_all()
Dr. David Alan Gilbert [Sat, 12 Oct 2024 20:38:52 +0000 (21:38 +0100)] 
wifi: cw1200: Remove unused cw1200_queue_requeue_all()

cw1200_queue_requeue_all() has been unused since it was added in 2013 by commit
a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241012203852.229151-1-linux@treblig.org
8 months agowifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan()
Alper Nebi Yasak [Mon, 7 Oct 2024 22:20:54 +0000 (01:20 +0300)] 
wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan()

Replace one-element array with a flexible-array member in `struct
mwifiex_ie_types_wildcard_ssid_params` to fix the following warning
on a MT8173 Chromebook (mt8173-elm-hana):

[  356.775250] ------------[ cut here ]------------
[  356.784543] memcpy: detected field-spanning write (size 6) of single field "wildcard_ssid_tlv->ssid" at drivers/net/wireless/marvell/mwifiex/scan.c:904 (size 1)
[  356.813403] WARNING: CPU: 3 PID: 742 at drivers/net/wireless/marvell/mwifiex/scan.c:904 mwifiex_scan_networks+0x4fc/0xf28 [mwifiex]

The "(size 6)" above is exactly the length of the SSID of the network
this device was connected to. The source of the warning looks like:

    ssid_len = user_scan_in->ssid_list[i].ssid_len;
    [...]
    memcpy(wildcard_ssid_tlv->ssid,
           user_scan_in->ssid_list[i].ssid, ssid_len);

There is a #define WILDCARD_SSID_TLV_MAX_SIZE that uses sizeof() on this
struct, but it already didn't account for the size of the one-element
array, so it doesn't need to be changed.

Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Acked-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241007222301.24154-1-alpernebiyasak@gmail.com
8 months agowifi: brcmfmac: of: use devm_clk_get_optional_enabled_with_rate()
Bartosz Golaszewski [Mon, 7 Oct 2024 13:16:39 +0000 (15:16 +0200)] 
wifi: brcmfmac: of: use devm_clk_get_optional_enabled_with_rate()

Fold the separate clk_set_rate() call into the clock getter.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241007131639.98358-1-brgl@bgdev.pl
8 months agowifi: brcmsmac: Remove unused brcms_debugfs_get_devdir()
Dr. David Alan Gilbert [Fri, 4 Oct 2024 00:42:59 +0000 (01:42 +0100)] 
wifi: brcmsmac: Remove unused brcms_debugfs_get_devdir()

brcms_debugfs_get_devdir() has been unused since it was added by commit
8e21df23894e ("brcmsmac: hardware info in debugfs")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004004259.470853-1-linux@treblig.org
8 months agowifi: brcmfmac: Remove unused brcmf_cfg80211_get_iftype()
Dr. David Alan Gilbert [Fri, 4 Oct 2024 00:42:52 +0000 (01:42 +0100)] 
wifi: brcmfmac: Remove unused brcmf_cfg80211_get_iftype()

brcmf_cfg80211_get_iftype() has been unused since 2013's commit
5cd51c2bad56 ("brcmfmac: Find correct MAC descriptor in case of TDLS.")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004004252.470836-1-linux@treblig.org
8 months agowifi: wilc1000: Set MAC after operation mode
Marek Vasut [Thu, 3 Oct 2024 13:24:17 +0000 (15:24 +0200)] 
wifi: wilc1000: Set MAC after operation mode

It seems it is necessary to set WILC MAC address after operation mode,
otherwise the MAC address of the WILC MAC is reset back to what is in
nvmem. This causes a failure to associate with AP after the WILC MAC
address was overridden by userspace.

Test case:
"
ap$ cat << EOF > hostap.conf
interface=wlan0
ssid=ssid
hw_mode=g
channel=6
wpa=2
wpa_passphrase=pass
wpa_key_mgmt=WPA-PSK
EOF
ap$ hostapd -d hostap.conf
ap$ ifconfig wlan0 10.0.0.1
"

"
sta$ ifconfig wlan0 hw ether 00:11:22:33:44:55
sta$ wpa_supplicant -i wlan0 -c <(wpa_passphrase ssid pass)
sta$ ifconfig wlan0 10.0.0.2
sta$ ping 10.0.0.1 # fails without this patch
"

AP still indicates SA with original MAC address from nvmem without this patch:
"
nl80211: RX frame da=ff:ff:ff:ff:ff:ff sa=60:01:23:45:67:89 bssid=ff:ff:ff:ff:ff:ff ...
                                          ^^^^^^^^^^^^^^^^^
"

Fixes: 83d9b54ee5d4 ("wifi: wilc1000: read MAC address from fuse at probe")
Tested-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241003132504.52233-1-marex@denx.de
8 months agowifi: mwifiex: cleanup struct mwifiex_private
Dmitry Antipov [Fri, 27 Sep 2024 08:43:17 +0000 (11:43 +0300)] 
wifi: mwifiex: cleanup struct mwifiex_private

Remove set but otherwise unused 'adhoc_is_link_sensed' and
'assoc_resp_ht_param' members of 'struct mwifiex_private' and
simplify related code in 'mwifiex_ret_802_11_associate()'.
Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240927084317.96687-2-dmantipov@yandex.ru
8 months agowifi: mwifiex: cleanup struct mwifiex_auto_tdls_peer
Dmitry Antipov [Fri, 27 Sep 2024 08:43:16 +0000 (11:43 +0300)] 
wifi: mwifiex: cleanup struct mwifiex_auto_tdls_peer

Remove set but otherwise unused 'do_setup' member of
'struct mwifiex_auto_tdls_peer'. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240927084317.96687-1-dmantipov@yandex.ru
8 months agowifi: wilc1000: Add WILC3000 support
Ajay Singh [Fri, 4 Oct 2024 11:44:16 +0000 (13:44 +0200)] 
wifi: wilc1000: Add WILC3000 support

Add support for the WILC3000 chip. The chip is similar to WILC1000,
except that the register layout is slightly different and it does
not support WPA3/SAE.

Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Tested-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Tested-on: WILC1000SD 07 SDIO WILC_WIFI_FW_REL_16_1_2
Tested-on: WILC1000SD 07 SPI WILC_WIFI_FW_REL_16_1_2
Tested-on: WILC3000 A SDIO WILC_WIFI_FW_REL_16_1_1
Tested-on: WILC3000 A SPI WILC_WIFI_FW_REL_16_1_1
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-7-marex@denx.de
8 months agowifi: wilc1000: Register wiphy after reading out chipid
Marek Vasut [Fri, 4 Oct 2024 11:44:15 +0000 (13:44 +0200)] 
wifi: wilc1000: Register wiphy after reading out chipid

Register wiphy after reading out chipid, so the chipid can be
used to determine chip features and not advertise WPA3/SAE
support to userspace on WILC3000. Note that wilc_netdev_cleanup()
will deregister the wiphy in fail path.

Tested-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Tested-on: WILC1000SD 07 SDIO WILC_WIFI_FW_REL_16_1_2
Tested-on: WILC3000 A SDIO WILC_WIFI_FW_REL_16_1_1
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-6-marex@denx.de
8 months agowifi: wilc1000: Fold wilc_create_wiphy() into cfg80211.c
Marek Vasut [Fri, 4 Oct 2024 11:44:14 +0000 (13:44 +0200)] 
wifi: wilc1000: Fold wilc_create_wiphy() into cfg80211.c

The wilc_create_wiphy() is not used outside of cfg80211.c .
Make the function static and remove its entry from cfg80211.h

Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-5-marex@denx.de
8 months agowifi: wilc1000: Fill in missing error handling
Marek Vasut [Fri, 4 Oct 2024 11:44:13 +0000 (13:44 +0200)] 
wifi: wilc1000: Fill in missing error handling

Add error handling to chip_wakeup() and propagate the errors throughout
the entire driver. Add error handling to acquire_bus()/release_bus() and
host_sleep_notify()/host_wakeup_notify() functions as a result as well.
Fill the error handling to all call sites.

Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-4-marex@denx.de
8 months agowifi: wilc1000: Fold chip_allow_sleep()/chip_wakeup() into wlan.c
Marek Vasut [Fri, 4 Oct 2024 11:44:12 +0000 (13:44 +0200)] 
wifi: wilc1000: Fold chip_allow_sleep()/chip_wakeup() into wlan.c

Neither chip_allow_sleep()/chip_wakeup() is used outside of wlan.c .
Make both functions static and remove both the exported symbol and
entries from wlan.h .

Make chip_allow_sleep() return error code in preparation for the
follow up patches.

Move acquire_bus() and release_bus() to avoid forward declaration
of chip_allow_sleep()/chip_wakeup().

Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-3-marex@denx.de
8 months agowifi: wilc1000: Clean up usage of wilc_get_chipid()
Marek Vasut [Fri, 4 Oct 2024 11:44:11 +0000 (13:44 +0200)] 
wifi: wilc1000: Clean up usage of wilc_get_chipid()

Reduce the use of wilc_get_chipid(), use cached chip ID wherever
possible. Remove duplicated partial chip ID read implementations
from the driver. Update wilc_get_chipid() to always read the chip
ID out of the hardware and update the cached chip ID, and make it
return a proper return value instead of a chipid. Call wilc_get_chipid()
early to make the cached chip ID available to various sites using
is_wilc1000() to access the cached chip ID.

Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-2-marex@denx.de
8 months agodt-bindings: wireless: wilc1000: Document WILC3000 compatible string
Marek Vasut [Fri, 4 Oct 2024 11:44:10 +0000 (13:44 +0200)] 
dt-bindings: wireless: wilc1000: Document WILC3000 compatible string

Document compatible string for the WILC3000 chip. The chip is similar
to WILC1000, except that the register layout is slightly different and
it does not support WPA3/SAE.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-1-marex@denx.de
8 months agowifi: wilc1000: Keep slot powered on during suspend/resume
Marek Vasut [Thu, 26 Sep 2024 19:50:55 +0000 (21:50 +0200)] 
wifi: wilc1000: Keep slot powered on during suspend/resume

The WILC3000 can suspend and enter low power state. According to local
measurements, the WILC3000 consumes the same amount of power if the slot
is powered up and WILC3000 is suspended, and if the WILC3000 is powered
off. Use the former option, keep the WILC3000 powered up as that allows
for things like WoWlan to work.

Note that this is tested on WILC3000 only, not on WILC1000 .

Signed-off-by: Marek Vasut <marex@denx.de>
Tested-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240926195113.2823392-1-marex@denx.de
8 months agowifi: rt2x00: convert comma to semicolon
Yan Zhen [Fri, 20 Sep 2024 02:59:17 +0000 (10:59 +0800)] 
wifi: rt2x00: convert comma to semicolon

To ensure code clarity and prevent potential errors, it's advisable
to employ the ';' as a statement separator, except when ',' are
intentionally used for specific purposes.

Signed-off-by: Yan Zhen <yanzhen@vivo.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240920025917.1959932-1-yanzhen@vivo.com
8 months agowifi: mwifiex: add missing locking for cfg80211 calls
Sascha Hauer [Wed, 18 Sep 2024 11:10:26 +0000 (13:10 +0200)] 
wifi: mwifiex: add missing locking for cfg80211 calls

cfg80211_rx_assoc_resp() and cfg80211_rx_mlme_mgmt() need to be called
with the wiphy locked, so lock it before calling these functions.

Fixes: 36995892c271 ("wifi: mwifiex: add host mlme for client mode")
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240918-mwifiex-cleanup-1-v2-1-2d0597187d3c@pengutronix.de
8 months agowifi: ipw: select CRYPTO_LIB_ARC4
Johannes Berg [Fri, 11 Oct 2024 09:58:20 +0000 (11:58 +0200)] 
wifi: ipw: select CRYPTO_LIB_ARC4

With the WEP/TKIP code having moved to libipw, it now
needs to select CRYPTO_LIB_ARC4 to have the dependency,
and I forgot to move that.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410111727.FxATs8Yj-lkp@intel.com/
Fixes: 02f220b52670 ("wifi: ipw2x00/lib80211: move remaining lib80211 into libipw")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241011115820.070c468b271d.Iac76e81b5cd9a5b949b8c154381128e8131d581d@changeid
8 months agowifi: rtw89: wow: do not configure CPU IO to receive packets for old firmware
Chin-Yen Lee [Fri, 4 Oct 2024 06:54:08 +0000 (14:54 +0800)] 
wifi: rtw89: wow: do not configure CPU IO to receive packets for old firmware

The older firmware of 8852A and 8852B can't receive packets via
CPU IO function and will lead to WoWLAN fail if calling it.
So use firmware feature to distinguish.

Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241004065408.10261-1-pkshih@realtek.com
8 months agowifi: rtw89: coex: Add function to reorder Wi-Fi firmware report index
Ching-Te Ku [Thu, 3 Oct 2024 10:51:40 +0000 (18:51 +0800)] 
wifi: rtw89: coex: Add function to reorder Wi-Fi firmware report index

To parsing firmware report correctly, driver need to re-order the report
index to match with different chips and different Wi-Fi firmware version.
Use wrong index to parse the report will lead the coexistence run into
wrong mechanism.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241003105140.10867-5-pkshih@realtek.com
8 months agowifi: rtw89: coex: Solved BT PAN profile idle decrease Wi-Fi throughput
Ching-Te Ku [Thu, 3 Oct 2024 10:51:39 +0000 (18:51 +0800)] 
wifi: rtw89: coex: Solved BT PAN profile idle decrease Wi-Fi throughput

Some Bluetooth device will make up connection as PAN link, though the
connection is idle, it will still report the PAN link is active. The
coexistence mechanism will enable TDMA to protect the PAN, it makes
Wi-Fi throughput degrade at least 50%. But the link is idle, don't
need so much bandwidth. Add TDMA case to let Wi-Fi can do traffic 80%
bandwidth.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241003105140.10867-4-pkshih@realtek.com
8 months agowifi: rtw89: coex: Reorder Bluetooth info related logic
Ching-Te Ku [Thu, 3 Oct 2024 10:51:38 +0000 (18:51 +0800)] 
wifi: rtw89: coex: Reorder Bluetooth info related logic

Reorder Bluetooth firmware related event index, it should be the same
with Wi-Fi firmware definition. To fix coexistence can not recognize
Bluetooth PAN(Personal area network) profile correctly, modified the
related logic.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241003105140.10867-3-pkshih@realtek.com
8 months agowifi: rtw89: coex: Update priority setting for Wi-Fi is scanning
Ching-Te Ku [Thu, 3 Oct 2024 10:51:37 +0000 (18:51 +0800)] 
wifi: rtw89: coex: Update priority setting for Wi-Fi is scanning

Update coexistence priority setting for Wi-Fi scanning channel, the new
setting will allow Wi-Fi do RX while Bluetooth audio is not busy. Forced
to set new TDMA policy while RF calibration request come, to make sure
the calibration can do well, and switch to normal setting while the
calibration is done. Remove the code that no longer use.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241003105140.10867-2-pkshih@realtek.com
8 months agoMerge net-next/main to resolve conflicts
Johannes Berg [Wed, 9 Oct 2024 06:59:14 +0000 (08:59 +0200)] 
Merge net-next/main to resolve conflicts

The wireless-next tree was based on something older, and there
are now conflicts between -rc2 and work here. Merge net-next,
which has enough of -rc2 for the conflicts to happen, resolving
them in the process.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agoRevert "wifi: cfg80211: unexport wireless_nlevent_flush()"
Johannes Berg [Wed, 9 Oct 2024 06:33:05 +0000 (08:33 +0200)] 
Revert "wifi: cfg80211: unexport wireless_nlevent_flush()"

Revert this, I neglected to take into account the fact that
cfg80211 itself can be a module, but wext is always builtin.

Fixes: aee809aaa2d1 ("wifi: cfg80211: unexport wireless_nlevent_flush()")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agonet: phy: microchip_t1: SQI support for LAN887x
Tarun Alle [Mon, 7 Oct 2024 06:39:43 +0000 (12:09 +0530)] 
net: phy: microchip_t1: SQI support for LAN887x

Add support for measuring Signal Quality Index for LAN887x T1 PHY.
Signal Quality Index (SQI) is measure of Link Channel Quality from
0 to 7, with 7 as the best. By default, a link loss event shall
indicate an SQI of 0.

Signed-off-by: Tarun Alle <Tarun.Alle@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241007063943.3233-1-tarun.alle@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agoMerge branch 'net-phy-marvell-88q2xxx-enable-auto-negotiation-for-mv88q2110'
Jakub Kicinski [Wed, 9 Oct 2024 01:18:21 +0000 (18:18 -0700)] 
Merge branch 'net-phy-marvell-88q2xxx-enable-auto-negotiation-for-mv88q2110'

Niklas Söderlund says:

====================
net: phy: marvell-88q2xxx: Enable auto negotiation for mv88q2110

This series enables auto negotiation for the mv88q2110 device.
Previously this feature have been disabled for mv88q2110, while enabled
for other devices supported by this driver.

The initial driver implementation states this is due to the
configuration sequence provided by the vendor did not work. By comparing
the initialization sequence of other devices this driver supports and
the out-of-tree PHY driver for mv88q2110 found in the Renesas BSP [1]
I was able to figure out a working configuration.

As I have no access to the datasheets of either of these devices it
would be super if someone who has could sanity check the initialization
sequence.

With this series I'm able to auto negotiate both 1000Mbps and 100Mbps
links without issue.

    # ethtool eth0
    Settings for eth0:
            Supported ports: [  ]
            Supported link modes:   100baseT1/Full
                                    1000baseT1/Full
            Supported pause frame use: Symmetric Receive-only
            Supports auto-negotiation: Yes
            Supported FEC modes: Not reported
            Advertised link modes:  100baseT1/Full
                                    1000baseT1/Full
            Advertised pause frame use: No
            Advertised auto-negotiation: Yes
            Advertised FEC modes: Not reported
            Link partner advertised link modes:  100baseT1/Full
                                                 1000baseT1/Full
            Link partner advertised pause frame use: No
            Link partner advertised auto-negotiation: Yes
            Link partner advertised FEC modes: Not reported
            Speed: 1000Mb/s
            Duplex: Full
            Auto-negotiation: on
            master-slave cfg: preferred master
            master-slave status: slave
            Port: Twisted Pair
            PHYAD: 0
            Transceiver: external
            MDI-X: Unknown
            Link detected: yes
            SQI: 15/15

And the performance is good too. Without this change I was not able to
manually configure a 1000Mbps link, only 100Mbps ones. So this gives a
huge performance boost for my use-case.

    [  5] local 10.1.0.2 port 5201 connected to 10.1.0.1 port 38346
    [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
    [  5]   0.00-1.00   sec  96.8 MBytes   812 Mbits/sec    0    469 KBytes
    [  5]   1.00-2.00   sec  94.3 MBytes   791 Mbits/sec    0    469 KBytes
    [  5]   2.00-3.00   sec  96.1 MBytes   806 Mbits/sec    0    469 KBytes
    [  5]   3.00-4.00   sec  98.3 MBytes   825 Mbits/sec    0    469 KBytes
    [  5]   4.00-5.00   sec  98.4 MBytes   825 Mbits/sec    0    469 KBytes
    [  5]   5.00-6.00   sec  98.4 MBytes   826 Mbits/sec    0    469 KBytes
    [  5]   6.00-7.00   sec  98.9 MBytes   830 Mbits/sec    0    469 KBytes
    [  5]   7.00-8.00   sec  91.7 MBytes   769 Mbits/sec    0    469 KBytes
    [  5]   8.00-9.00   sec  99.4 MBytes   834 Mbits/sec    0    747 KBytes
    [  5]   9.00-10.00  sec   101 MBytes   851 Mbits/sec    0    747 KBytes

Patch 1/3 and 2/3 are preparation patches that align and move functions
around as the mv88q2110 code paths can now reuses much of what is done
for mv88q2220. While patch 3/3 adds the new initialization sequence and
removes the auto negotiation limit for mv88q2110.

1.  https://github.com/renesas-rcar/linux-bsp/commit/2a1f07d0e722a18188cfe62842b61f2fbc0ba812
====================

Link: https://patch.msgid.link/20241005112412.544360-1-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agonet: phy: marvell-88q2xxx: Enable auto negotiation for mv88q2110
Niklas Söderlund [Sat, 5 Oct 2024 11:24:12 +0000 (13:24 +0200)] 
net: phy: marvell-88q2xxx: Enable auto negotiation for mv88q2110

The initial marvell-88q2xxx driver only supported the Marvell 88Q2110
PHY without auto negotiation support. The reason documented states that
the provided initialization sequence did not to work. Now a method to
enable auto negotiation have been found by comparing the initialization
of other supported devices and an out-of-tree PHY driver.

Perform the minimal needed initialization of the PHY to get auto
negotiation working and remove the limitation that disables the auto
negotiation feature for the mv88q2110 device.

With this change a 1000Mbps full duplex link is able to be negotiated
between two mv88q2110 and the link works perfectly. The other side also
reflects the manually configure settings of the master device.

    # ethtool eth0
    Settings for eth0:
            Supported ports: [  ]
            Supported link modes:   100baseT1/Full
                                    1000baseT1/Full
            Supported pause frame use: Symmetric Receive-only
            Supports auto-negotiation: Yes
            Supported FEC modes: Not reported
            Advertised link modes:  100baseT1/Full
                                    1000baseT1/Full
            Advertised pause frame use: No
            Advertised auto-negotiation: Yes
            Advertised FEC modes: Not reported
            Link partner advertised link modes:  100baseT1/Full
                                                 1000baseT1/Full
            Link partner advertised pause frame use: No
            Link partner advertised auto-negotiation: Yes
            Link partner advertised FEC modes: Not reported
            Speed: 1000Mb/s
            Duplex: Full
            Auto-negotiation: on
            master-slave cfg: preferred master
            master-slave status: slave
            Port: Twisted Pair
            PHYAD: 0
            Transceiver: external
            MDI-X: Unknown
            Link detected: yes
            SQI: 15/15

Before this change I was not able to manually configure 1000Mbps link,
only a 100Mpps link so this change providers an improvement in
performance for this device.

    [  5] local 10.1.0.2 port 5201 connected to 10.1.0.1 port 38346
    [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
    [  5]   0.00-1.00   sec  96.8 MBytes   812 Mbits/sec    0    469 KBytes
    [  5]   1.00-2.00   sec  94.3 MBytes   791 Mbits/sec    0    469 KBytes
    [  5]   2.00-3.00   sec  96.1 MBytes   806 Mbits/sec    0    469 KBytes
    [  5]   3.00-4.00   sec  98.3 MBytes   825 Mbits/sec    0    469 KBytes
    [  5]   4.00-5.00   sec  98.4 MBytes   825 Mbits/sec    0    469 KBytes
    [  5]   5.00-6.00   sec  98.4 MBytes   826 Mbits/sec    0    469 KBytes
    [  5]   6.00-7.00   sec  98.9 MBytes   830 Mbits/sec    0    469 KBytes
    [  5]   7.00-8.00   sec  91.7 MBytes   769 Mbits/sec    0    469 KBytes
    [  5]   8.00-9.00   sec  99.4 MBytes   834 Mbits/sec    0    747 KBytes
    [  5]   9.00-10.00  sec   101 MBytes   851 Mbits/sec    0    747 KBytes

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Stefan Eichenberger <eichest@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241005112412.544360-4-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agonet: phy: marvell-88q2xxx: Make register writer function generic
Niklas Söderlund [Sat, 5 Oct 2024 11:24:11 +0000 (13:24 +0200)] 
net: phy: marvell-88q2xxx: Make register writer function generic

In preparation to adding auto negotiation support to mv88q2110 move and
rename the helper function used to write an array of register values to
the PHY.

Just as for mv88q2220 devices this helper will be needed to for the
initial configuration of the mv88q2110 to support auto negotiation.

The function is moved verbatim, there is no change in behavior.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Dimitri Fedrau <dima.fedrau@gmail.com>
Tested-by: Stefan Eichenberger <eichest@gmail.com>
Link: https://patch.msgid.link/20241005112412.544360-3-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agonet: phy: marvell-88q2xxx: Align soft reset for mv88q2110 and mv88q2220
Niklas Söderlund [Sat, 5 Oct 2024 11:24:10 +0000 (13:24 +0200)] 
net: phy: marvell-88q2xxx: Align soft reset for mv88q2110 and mv88q2220

The soft reset implementations for mv88q2110 and mv88q2220 differ as the
later need to consider that auto negation is supported on mv88q2220
devices. In preparation of enabling auto negotiation on mv88q2110 merge
the two rest functions into a device generic one.

The mv88q2220 behavior is kept as is but extended to wait for the reset
bit to be clears before continuing, as was done previously on mv88q2220.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Dimitri Fedrau <dima.fedrau@gmail.com>
Tested-by: Stefan Eichenberger <eichest@gmail.com>
Link: https://patch.msgid.link/20241005112412.544360-2-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agofsl/fman: Fix a typo
Andrew Kreimer [Sun, 6 Oct 2024 13:08:29 +0000 (16:08 +0300)] 
fsl/fman: Fix a typo

Fix a typo in comments: bellow -> below.

Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241006130829.13967-1-algonell@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agonet: phy: aquantia: allow forcing order of MDI pairs
Daniel Golle [Fri, 4 Oct 2024 16:18:16 +0000 (17:18 +0100)] 
net: phy: aquantia: allow forcing order of MDI pairs

Despite supporting Auto MDI-X, it looks like Aquantia only supports
swapping pair (1,2) with pair (3,6) like it used to be for MDI-X on
100MBit/s networks.

When all 4 pairs are in use (for 1000MBit/s or faster) the link does not
come up with pair order is not configured correctly, either using
MDI_CFG pin or using the "PMA Receive Reserved Vendor Provisioning 1"
register.

Normally, the order of MDI pairs being either ABCD or DCBA is configured
by pulling the MDI_CFG pin.

However, some hardware designs require overriding the value configured
by that bootstrap pin. The PHY allows doing that by setting a bit in
"PMA Receive Reserved Vendor Provisioning 1" register which allows
ignoring the state of the MDI_CFG pin and another bit configuring
whether the order of MDI pairs should be normal (ABCD) or reverse
(DCBA). Pair polarity is not affected and remains identical in both
settings.

Introduce property "marvell,mdi-cfg-order" which allows forcing either
normal or reverse order of the MDI pairs from DT.

If the property isn't present, the behavior is unchanged and MDI pair
order configuration is untouched (ie. either the result of MDI_CFG pin
pull-up/pull-down, or pair order override already configured by the
bootloader before Linux is started).

Forcing normal pair order is required on the Adtran SDG-8733A Wi-Fi 7
residential gateway.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/9ed760ff87d5fc456f31e407ead548bbb754497d.1728058550.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agodt-bindings: net: marvell,aquantia: add property to override MDI_CFG
Daniel Golle [Fri, 4 Oct 2024 16:18:05 +0000 (17:18 +0100)] 
dt-bindings: net: marvell,aquantia: add property to override MDI_CFG

Usually the MDI pair order reversal configuration is defined by
bootstrap pin MDI_CFG. Some designs, however, require overriding the MDI
pair order and force either normal or reverse order.

Add property 'marvell,mdi-cfg-order' to allow forcing either normal or
reverse order of the MDI pairs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/7ccf25d6d7859f1ce9983c81a2051cfdfb0e0a99.1728058550.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agoMerge branch 'selftests-mlxsw-stabilize-red-tests'
Jakub Kicinski [Tue, 8 Oct 2024 22:37:26 +0000 (15:37 -0700)] 
Merge branch 'selftests-mlxsw-stabilize-red-tests'

Petr Machata says:

====================
selftests: mlxsw: Stabilize RED tests

Tweak the mlxsw-specific RED selftests to increase stability on
Spectrum-3 and Spectrum-4 machines.
====================

Link: https://patch.msgid.link/cover.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agoselftests: mlxsw: sch_red_core: Lower TBF rate
Petr Machata [Mon, 7 Oct 2024 16:26:09 +0000 (18:26 +0200)] 
selftests: mlxsw: sch_red_core: Lower TBF rate

The RED test uses a pair of TBF shapers. The first to get predictably-sized
stream of traffic, and second to get a 100% saturated chokepoint. To this
chokepoint it injects individual packets. Because the chokepoint is
saturated, these additional packets go straight to the backlog. This allows
the test to check RED behavior across various queue sizes.

The shapers are rated at 1Gbps, for historical reasons (before mlxsw
supported TBF offload, the test used port speed to create the chokepoints).
Machines with a low-power CPU may have trouble consistently generating
1Gbps of traffic, and the test then spuriously fails.

Instead, drop the rate to 200Mbps (Spectrum has a guaranteed shaper rate
granularity of 200Mbps, so anything lower is not guaranteed to work well).
Because that means fewer packets will be mirrored in the ECN-mark test,
adjust the passing condition accordingly.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/c6712f9c5de75ae0bc2ab3d8ea7d92aaaf93af95.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agoselftests: mlxsw: sch_red_core: Send more packets for drop tests
Petr Machata [Mon, 7 Oct 2024 16:26:08 +0000 (18:26 +0200)] 
selftests: mlxsw: sch_red_core: Send more packets for drop tests

This test works by injecting into a port with a maxed-out queue a couple
packets and checks if a corresponding number of packets were dropped. This
has worked well on Spectrum<4, but on Spectrum-4 it has been noisy. This
is in line with the observation that on Spectrum-4, queue size tends to
fluctuate more. A handful of packets could then still be accepted to the
queue even though it was nominally full just recently.

In order to accommodate this behavior, send many more packets. The buffer
can fit N extra packets, but not N% packets. This therefore allows us to
set wider absolute margins, while actually narrowing them relatively.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/abc869b9f6003d400d6293ddd5edb2f4517f44d5.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agoselftests: mlxsw: sch_red_core: Sleep before querying queue depth
Petr Machata [Mon, 7 Oct 2024 16:26:07 +0000 (18:26 +0200)] 
selftests: mlxsw: sch_red_core: Sleep before querying queue depth

The qdisc stats are taken from the port's periodic HW stats, which are
updated once a second. We try to accommodate the latency by using busywait
in build_backlog().

The issue in that seems to be that when do_mark_test() builds the backlog,
it makes the decision whether to send more packets based on the first
instance of the queue depth stat exceeding the current value, when in fact
more traffic is on the way and the queue depth would increase further. This
leads to failures in TC 1 of mark-mirror test, where we see the following
failure:

TEST: TC 0: marked packets mirror'd                                 [ OK ]
TEST: TC 1: marked packets mirror'd                                 [FAIL]
        Spurious packets (1680 -> 2290) observed without buffer pressure

Fix by waiting for the full second before reading the queue depth for the
first time, to make sure it reflects all in-flight traffic.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Link: https://patch.msgid.link/321dcf8b3e9a1f0766429c8cf3e3f1746f1bc375.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agoselftests: mlxsw: sch_red_core: Increase backlog size tolerance
Petr Machata [Mon, 7 Oct 2024 16:26:06 +0000 (18:26 +0200)] 
selftests: mlxsw: sch_red_core: Increase backlog size tolerance

Backlog fluctuates on Spectrum-4 much more than on <4. In practice we can
sample queue depth values going from about -12% to about +7% of the
configured RED limit. The test which checks the queue size has a limit of
+-10%, and as a result often fails. We attempted to fix the issue by
busywaiting for several seconds hoping to get within the bounds, but that
still proved to be too noisy (or the wait time would be impractically
long). Unfortunately we have to bump the value tolerance from 10% to 15%,
which in this patch do.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Link: https://patch.msgid.link/f54950df2a8fcba46c3ddc1053376352fa2e592b.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agoselftests: mlxsw: sch_red_ets: Increase required backlog
Petr Machata [Mon, 7 Oct 2024 16:26:05 +0000 (18:26 +0200)] 
selftests: mlxsw: sch_red_ets: Increase required backlog

Backlog fluctuates on Spectrum-4 much more than on <4. Increasing the
desired backlog seems to help, as the constant fluctuations do not overlap
into the territory where packets are marked.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Link: https://patch.msgid.link/0821fb3aa8bb6a6c0d3000baab04995517c9a0cc.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agonet: phy: smsc: use devm_clk_get_optional_enabled_with_rate()
Bartosz Golaszewski [Mon, 7 Oct 2024 13:41:00 +0000 (15:41 +0200)] 
net: phy: smsc: use devm_clk_get_optional_enabled_with_rate()

Fold the separate call to clk_set_rate() into the clock getter.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241007134100.107921-1-brgl@bgdev.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agochelsio/chtls: Remove unused chtls_set_tcb_tflag
Dr. David Alan Gilbert [Mon, 7 Oct 2024 00:46:52 +0000 (01:46 +0100)] 
chelsio/chtls: Remove unused chtls_set_tcb_tflag

chtls_set_tcb_tflag() has been unused since 2021's commit
827d329105bf ("chtls: Remove invalid set_tcb call")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241007004652.150065-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agocaif: Remove unused cfsrvl_getphyid
Dr. David Alan Gilbert [Mon, 7 Oct 2024 00:44:56 +0000 (01:44 +0100)] 
caif: Remove unused cfsrvl_getphyid

cfsrvl_getphyid() has been unused since 2011's commit
f36214408470 ("caif: Use RCU and lists in cfcnfg.c for managing caif link layers")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241007004456.149899-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agonet-timestamp: namespacify the sysctl_tstamp_allow_data
Jason Xing [Sat, 5 Oct 2024 22:26:09 +0000 (07:26 +0900)] 
net-timestamp: namespacify the sysctl_tstamp_allow_data

Let it be tuned in per netns by admins.

Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20241005222609.94980-1-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agonet: dsa: mv88e6xxx: Add FID map cache
Aryan Srivastava [Sun, 6 Oct 2024 21:29:05 +0000 (10:29 +1300)] 
net: dsa: mv88e6xxx: Add FID map cache

Add a cached FID bitmap. This mitigates the need to walk all VTU entries
to find the next free FID.

When flushing the VTU (during init), zero the FID bitmap. Use and
manipulate this bitmap from now on, instead of reading HW for the FID
map.

The repeated VTU walks are costly and can take ~40 mins if ~4000 vlans
are added. Caching the FID map reduces this time to <2 mins.

Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241006212905.3142976-1-aryan.srivastava@alliedtelesis.co.nz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
8 months agowireless: wext: shorten struct iw_ioctl_description
Johannes Berg [Mon, 7 Oct 2024 20:00:03 +0000 (22:00 +0200)] 
wireless: wext: shorten struct iw_ioctl_description

There's no need for "future" extensions in an internal
struct, and we don't need a u32 for flags, use just a
u8. Also remove the unused IW_DESCR_FLAG_WAIT flag.

Link: https://patch.msgid.link/20241007220003.309bd52fa763.I9a1229fa7f2be53d4f50e63671ed441d0968bb41@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: wext: merge adjacent CONFIG_COMPAT ifdef blocks
Johannes Berg [Mon, 7 Oct 2024 19:50:25 +0000 (21:50 +0200)] 
wifi: wext: merge adjacent CONFIG_COMPAT ifdef blocks

Simplify this, and also add a comment at the #endif.

Link: https://patch.msgid.link/20241007215025.5ecdad1e02ed.I54efa895efc496e06ba41e1c39c9df9e23b0171f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: cfg80211: unexport wireless_nlevent_flush()
Johannes Berg [Mon, 7 Oct 2024 19:47:16 +0000 (21:47 +0200)] 
wifi: cfg80211: unexport wireless_nlevent_flush()

This no longer needs to be exported, so don't export it.

Link: https://patch.msgid.link/20241007214715.3dd736dc3ac0.I1388536e99c37f28a007dd753c473ad21513d9a9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: remove iw_public_data from struct net_device
Johannes Berg [Mon, 7 Oct 2024 19:35:25 +0000 (21:35 +0200)] 
wifi: remove iw_public_data from struct net_device

Given the previous patches, we no longer need the
struct iw_public_data etc., it's only used by the
old Intel drivers (and ps3_gelic creates it but
then doesn't use it). Remove all of that, including
the pointer in struct net_device.

Link: https://patch.msgid.link/20241007213525.8b2d52b60531.I6a27aaf30bded9a0977f07f47fba2bd31a3b3330@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: cfg80211: stop exporting wext symbols
Johannes Berg [Mon, 7 Oct 2024 19:14:30 +0000 (21:14 +0200)] 
wifi: cfg80211: stop exporting wext symbols

CFG80211_WEXT_EXPORT is no longer needed, if we only make
ipw2200 return the static name for SIOCGIWNAME itself.

Link: https://patch.msgid.link/20241007211431.8d4a7242ce92.I66ceb885ddfa52c368feeea1ea884bf988c525f2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: wext/libipw: move spy implementation to libipw
Johannes Berg [Mon, 7 Oct 2024 19:02:53 +0000 (21:02 +0200)] 
wifi: wext/libipw: move spy implementation to libipw

There's no driver left using this other than ipw2200,
so move the data bookkeeping and code into libipw.

Link: https://patch.msgid.link/20241007210254.037d864cda7d.Ib2197cb056ff05746d3521a5fba637062acb7314@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agostaging: don't recommend using lib80211
Johannes Berg [Mon, 7 Oct 2024 18:26:56 +0000 (20:26 +0200)] 
staging: don't recommend using lib80211

No longer document drivers should switch to lib80211,
they really should never have done that. While at it,
also remove the recommendation to use cfg80211, if it
switches to mac80211 then it implicitly uses cfg80211
but doesn't need to do anything about that, normally.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20241007202707.87481ddcfc00.I2cfb9940807e9c5017a052efcd3d1f2b6dc15fb1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: ipw2x00/lib80211: move remaining lib80211 into libipw
Johannes Berg [Mon, 7 Oct 2024 18:26:55 +0000 (20:26 +0200)] 
wifi: ipw2x00/lib80211: move remaining lib80211 into libipw

There's already much code in libipw that used to be shared
with more drivers, but now with the prior cleanups, those old
Intel ipw2x00 drivers are also the only ones using whatever is
now left of lib80211. Move lib80211 entirely into libipw.

Link: https://patch.msgid.link/20241007202707.915ef7b9e7c7.Ib9876d2fe3c90f11d6df458b16d0b7d4bf551a8d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agostaging: rtl8192e: delete the driver
Johannes Berg [Mon, 7 Oct 2024 18:26:54 +0000 (20:26 +0200)] 
staging: rtl8192e: delete the driver

This driver is using lib80211 and any driver that plans to ever
leave staging should never have done that, so remove the driver
to enable cleaning up lib80211 into libipw inside the old Intel
drivers.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20241007202707.d0e59cdd2cdc.I8e4d74a6e1d09eefe1f5e2e208735ba2ccef1d4f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: libertas: don't select/include lib80211
Johannes Berg [Mon, 7 Oct 2024 18:26:53 +0000 (20:26 +0200)] 
wifi: libertas: don't select/include lib80211

This isn't used in this driver, and should't be, so
remove the include as well as the select.

Link: https://patch.msgid.link/20241007202706.f8a6dd67f650.I74bc1f334c02043a238303d3e71c955d0d9b01b0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: mwifiex: don't include lib80211.h
Johannes Berg [Mon, 7 Oct 2024 18:26:52 +0000 (20:26 +0200)] 
wifi: mwifiex: don't include lib80211.h

This really should never have been used, it's ancient code,
but then the driver needs its own define for NUM_WEP_KEYS.

Link: https://patch.msgid.link/20241007202706.74be9cca3eb8.I47b2e8e2d09c0a0be1f8346478d3d908b4021abd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: qtnfmac: don't include lib80211.h
Johannes Berg [Mon, 7 Oct 2024 18:26:51 +0000 (20:26 +0200)] 
wifi: qtnfmac: don't include lib80211.h

This driver doesn't use it, and really can't, so don't
include lib80211.h.

Link: https://patch.msgid.link/20241007202706.d92615cbf659.I2dc8ea3df0760121dc202616bdf3942caf51b232@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agowifi: nl80211: remove redundant null pointer check in coalescing
Dmitry Kandybka [Thu, 3 Oct 2024 09:59:12 +0000 (12:59 +0300)] 
wifi: nl80211: remove redundant null pointer check in coalescing

In 'cfg80211_free_coalesce', '&coalesce->rules[i]' is a pointer
to VLA member of 'struct cfg80211_coalesce' and should never be NULL,
so redundant check may be dropped.

I think this is correct, but I haven't tested it seriously.
Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com>
Link: https://patch.msgid.link/20241003095912.218465-1-d.kandybka@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 months agomac80211: Reorganize kerneldoc parameter names
Julia Lawall [Mon, 30 Sep 2024 11:21:13 +0000 (13:21 +0200)] 
mac80211: Reorganize kerneldoc parameter names

Reorganize kerneldoc parameter names to match the parameter
order in the function header.

Problems identified using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://patch.msgid.link/20240930112121.95324-28-Julia.Lawall@inria.fr
Signed-off-by: Johannes Berg <johannes.berg@intel.com>