OSDN Git Service
Johannes Berg [Mon, 11 Jul 2022 12:18:18 +0000 (14:18 +0200)]
wifi: nl80211: reject fragmented and non-inheritance elements
The underlying mac80211 code cannot deal with fragmented
elements for purposes of sorting the elements into the
association frame, so reject those inside the link. We
might want to reject them inside the assoc frame, but
they're used today for FILS, so cannot do that.
The non-inheritance element inside the links similarly
cannot be handled by mac80211, and outside the links it
makes no sense.
Reject both since using them could lead to an incorrect
implementation.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 11 Jul 2022 09:53:20 +0000 (11:53 +0200)]
wifi: nl80211: reject link specific elements on assoc link
When we associate, we'll include all the elements for the
link we're sending the association request on in the frame
and the specific ones for other links in the multi-link
element container. Prohibit adding link-specific elements
for the association link.
Fixes:
d648c23024bd ("wifi: nl80211: support MLO in auth/assoc")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 13 Jul 2022 08:24:23 +0000 (10:24 +0200)]
wifi: cfg80211: set country_elem to NULL
The link loop will always have a valid link so that
it's always set, but static checkers don't always
see that, so set it to NULL explicitly.
Fixes:
efbabc116500 ("cfg80211: Indicate MLO connection info in connect and roam callbacks")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Gregory Greenman [Sun, 3 Jul 2022 21:38:22 +0000 (00:38 +0300)]
wifi: mac80211: remove link_id parameter from link_info_changed()
Since struct ieee80211_bss_conf already contains link_id,
passing link_id is not necessary.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Gregory Greenman [Sun, 3 Jul 2022 15:04:15 +0000 (18:04 +0300)]
wifi: mac80211: replace link_id with link_conf in switch/(un)assign_vif_chanctx()
Since mac80211 already has a protected pointer to link_conf,
pass it to the driver to avoid additional RCU locking.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 11 Jul 2022 08:08:11 +0000 (10:08 +0200)]
wifi: nl80211: advertise MLO support
At least while we don't have any more specific interface
combinations support, add a simple flag for MLO support,
we can keep this later based on something other than the
wiphy flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Wed, 22 Jun 2022 13:15:56 +0000 (16:15 +0300)]
wifi: mac80211: Support multi link in ieee80211_recalc_min_chandef()
Recalculate min channel context for the given or all interface
links, depending on the caller. For a station state change, we
need to recalculate all of them since we don't know which link
(or multiple) it might be on.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Tue, 14 Jun 2022 07:16:26 +0000 (10:16 +0300)]
wifi: mac80211: don't check carrier in chanctx code
We check here that we don't enable TX (netif_carrier_ok())
before we actually start using some channel context, but to
our knowledge this check has never triggered, and with MLO
it's just wrong since links can be added and removed much
more dynamically than before.
Simply remove the checks, there's no really good way to do
anything that would replace them.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ilan Peer [Sun, 12 Jun 2022 13:49:45 +0000 (16:49 +0300)]
wifi: nl80211: allow link ID in set_wiphy with frequency
This simplifies hostapd implementation, since it didn't
switch to NL80211_CMD_SET_CHANNEL.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Thu, 30 Jun 2022 13:43:44 +0000 (16:43 +0300)]
wifi: mac80211: Allow EAPOL tx from specific link
Allow link source address on TX.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Thu, 30 Jun 2022 12:37:37 +0000 (15:37 +0300)]
wifi: mac80211: Allow EAPOL frames from link addresses
Allow transmitting EAPOL frames not only from the interface
address (which is the MLD address) but also any link addresses,
in order to support non-MLO stations on AP interfaces.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Thu, 30 Jun 2022 12:27:59 +0000 (15:27 +0300)]
wifi: cfg80211/mac80211: Support control port TX from specific link
In case of authentication with a legacy station, link addressed EAPOL
frames should be sent. Support it.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Sun, 26 Jun 2022 07:35:48 +0000 (10:35 +0300)]
wifi: nl80211: Support MLD parameters in nl80211_set_station()
Set the MLD parameters in NL80211_CMD_SET_STATION handling
to be able to change an MLD station.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 7 Jul 2022 16:19:27 +0000 (18:19 +0200)]
wifi: nl80211: check MLO support in authenticate
We should check that MLO connections are supported before
attempting to authenticate with MLO parameters, check that.
Fixes:
d648c23024bd ("wifi: nl80211: support MLO in auth/assoc")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 7 Jul 2022 13:28:14 +0000 (15:28 +0200)]
wifi: mac80211: add a helper to fragment an element
The way this works is that you add all the element data,
keeping a pointer to the length field of the element.
Then call this helper function, which will fragment the
element if there was more than 255 bytes in the element,
memmove()ing the data back if needed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 7 Jul 2022 13:11:54 +0000 (15:11 +0200)]
wifi: mac80211: skip rate statistics for MLD STAs
For now, skip rate statistics here to avoid warnings in
the called code, we'll need to adjust this to have all
the statistics for link stations.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 7 Jul 2022 13:03:51 +0000 (15:03 +0200)]
wifi: nl80211: set BSS to NULL if IS_ERR()
If the BSS lookup returned an error, set it to NULL so we
don't try to free it.
Fixes:
d648c23024bd ("wifi: nl80211: support MLO in auth/assoc")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 4 Jul 2022 13:02:33 +0000 (15:02 +0200)]
wifi: nl80211: add EML/MLD capabilities to per-iftype capabilities
We have the per-interface type capabilities, currently for
extended capabilities, add the EML/MLD capabilities there
to have this advertised by the driver.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 6 Jul 2022 13:31:55 +0000 (15:31 +0200)]
wifi: nl80211: better validate link ID for stations
If we add a station on an MLD, we need a link ID to see
where it lives (by default). Validate the link ID against
the valid_links.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 6 Jul 2022 12:03:07 +0000 (14:03 +0200)]
wifi: mac80211: fix link manipulation
When we add non-deflink pointers, we need to remove the
link[0] pointer to deflink in case link[0] is not valid
afterwards. Also, we need to add that back when there
are no more valid links. Reorg the code to fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 6 Jul 2022 08:09:57 +0000 (10:09 +0200)]
wifi: mac80211: tighten locking check
When we remove a link that doesn't have a channel context,
we don't really need the local->mtx locking. Tighten the
check here.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 6 Jul 2022 07:57:42 +0000 (09:57 +0200)]
wifi: cfg80211: clean up links appropriately
This was missing earlier, we need to remove links when
interfaces are being destroyed, and we also need to
stop (AP) operations when a link is being destroyed.
Address these issues to remove many warnings that will
otherwise appear in mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Jul 2022 14:22:29 +0000 (16:22 +0200)]
wifi: mac80211: consider EHT element size in assoc request
We need to consider the (maximum) size of the EHT element
we'll add for the association request, otherwise we may run
out of space.
Fixes:
820acc810fb6 ("mac80211: Add EHT capabilities to association/probe request")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Jul 2022 14:14:33 +0000 (16:14 +0200)]
wifi: mac80211: mlme: simplify adding ht/vht/he/eht elements
The functions currently take a link and check data
from it, but this needs to change for MLO. Simplify
the prototypes by passing only the needed arguments.
Remove the regulatory checks, the warnings shouldn't
trigger, and haven't as far as I know.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Jul 2022 13:38:57 +0000 (15:38 +0200)]
wifi: mac80211: refactor adding custom elements
Rework the sorting of custom elements into the association
request by moving the elements before HT/VHT/HE to each
their own function. While at it, fix the placement of the
ones that should be between VHT and HE.
This doesn't fix the placement of elements that should be
between HE and EHT yet, a similar change might be needed
in the future.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Jul 2022 12:08:25 +0000 (14:08 +0200)]
wifi: mac80211: refactor adding rates to assoc request
There's some awkward code that really only exists
because we want to optimize the allocation size,
but that's not really all that necessary.
Refactor the code that adds rates to the association
request frame to have a separate function, removing
the goto.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Jul 2022 12:01:59 +0000 (14:01 +0200)]
wifi: mac80211: use only channel width in ieee80211_parse_bitrates()
For MLO, we may not have a full chandef here later, so change
the API to pass only the width.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Jul 2022 12:01:29 +0000 (14:01 +0200)]
wifi: cfg80211: add ieee80211_chanwidth_rate_flags()
To simplify things when we don't have a full chandef,
add ieee80211_chanwidth_rate_flags().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Jul 2022 11:40:19 +0000 (13:40 +0200)]
wifi: mac80211: remove redundant condition
Here, ext_capa is checked and can only be non-NULL if
assoc_data->ie_len was set before, so the check here
is redundant.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 30 Jun 2022 12:20:54 +0000 (14:20 +0200)]
wifi: mac80211: don't set link address for station
We need to handle the link addresses for station differently,
they will be determined by the association code, stored, and
then applied when the links are actually created on success,
cfg80211 will fill in the right addresses per the data we're
sending back to it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 29 Jun 2022 11:29:05 +0000 (13:29 +0200)]
wifi: mac80211: fix multi-BSSID element parsing
When parsing a frame containing a multi-BSSID element, we
need to know both the transmitted and non-transmitted BSSID
so we can parse it correctly.
Unfortunately, in quite a number of cases, we got this wrong
and were passing the wrong BSSID or useless information:
* the mgmt->bssid from a frame is only the transmitted
BSSID if the frame is a beacon
* passing just one of the parameters as non-NULL isn't
useful and ignored
In those case where we need to parse for a specific BSS we
always have a BSS structure pointer, representing the BSS
we need, whether transmitted or not. Thus, pass that pointer
to the parsing function instead of the two BSSIDs.
Also fix two bugs:
* we need to re-parse all the elements for the other BSS
when iterating the non-transmitted BSSes in scan
* we need to parse for the correct BSS when setting up
the channel data in client code
Fixes:
78ac51f81532 ("mac80211: support multi-bssid")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 29 Jun 2022 10:01:41 +0000 (12:01 +0200)]
wifi: mac80211: move tdls_chan_switch_prohibited to link data
This value should be per link, since a TDLS connection is
only established on a given link.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 29 Jun 2022 09:52:49 +0000 (11:52 +0200)]
wifi: mac80211: don't re-parse elems in ieee80211_assoc_success()
We're already passing the elems pointer, and have parsed
them from the same frame with exactly the same parameters,
so don't need to do that again.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Gregory Greenman [Wed, 29 Jun 2022 09:22:24 +0000 (12:22 +0300)]
wifi: mac80211: replace link_id with link_conf in start/stop_ap()
When calling start/stop_ap(), mac80211 already has a protected
link_conf pointer. Pass it to the driver, so it shouldn't
handle RCU protection.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 28 Jun 2022 15:49:12 +0000 (17:49 +0200)]
wifi: mac80211: refactor elements parsing with parameter struct
Refactor the element parsing into a version that has
a parameter struct so we can add more parameters more
easily in the future.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 28 Jun 2022 15:17:05 +0000 (17:17 +0200)]
wifi: cfg80211: extend cfg80211_rx_assoc_resp() for MLO
Extend the cfg80211_rx_assoc_resp() to cover multiple
BSSes, the AP MLD address and local link addresses
for MLO.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 28 Jun 2022 14:25:37 +0000 (16:25 +0200)]
wifi: cfg80211: put cfg80211_rx_assoc_resp() arguments into a struct
For MLO we'll need a lot more arguments, including all the
BSS pointers and link addresses, so move the data to a struct
to be able to extend it more easily later.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 28 Jun 2022 09:25:38 +0000 (11:25 +0200)]
wifi: cfg80211: adjust assoc comeback for MLO
We only report the BSSID to userspace, so change the
argument from BSS struct pointer to AP address, which
we'll use to carry either the BSSID or AP MLD address.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 27 Jun 2022 20:23:42 +0000 (22:23 +0200)]
wifi: mac80211: mlme: unify assoc data event sending
There are a few cases where we send an event to cfg80211
manually, but ieee80211_destroy_assoc_data() also handles
the case of abandoning; some cases don't need an event
and success is handled yet differently.
Unify this by providing a single status argument to the
ieee80211_destroy_assoc_data() function and then handling
all the different cases of events (or no events) there.
This will help simplify the code when MLO support is
added.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 27 Jun 2022 20:09:50 +0000 (22:09 +0200)]
wifi: cfg80211: prepare association failure APIs for MLO
For MLO, we need the ability to report back multiple BSS
structures to release, as well as the AP MLD address (if
attempting to make an MLO connection).
Unify cfg80211_assoc_timeout() and cfg80211_abandon_assoc()
into a new cfg80211_assoc_failure() that gets a structure
parameter with the necessary data.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 27 Jun 2022 14:19:18 +0000 (16:19 +0200)]
wifi: cfg80211: remove BSS pointer from cfg80211_disassoc_request
The race described by the comment in mac80211 hasn't existed
since the locking rework to use the same lock and for MLO we
need to pass the AP MLD address, so just pass the BSSID or
AP MLD address instead of the BSS struct pointer, and adjust
all the code accordingly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 27 Jun 2022 12:17:28 +0000 (14:17 +0200)]
wifi: mac80211: mlme: use correct link_sta
For station capabilities, e.g. TWT, we need to use the correct
link station instead of deflink. Switch the code to do that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 27 Jun 2022 12:15:09 +0000 (14:15 +0200)]
wifi: mac80211: mlme: remove sta argument from ieee80211_config_bw
The argument is unused except for NULL checking, but we already
do that anyway, so it's not needed. Remove the argument.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 27 Jun 2022 12:10:18 +0000 (14:10 +0200)]
wifi: mac80211: mlme: use ieee80211_get_link_sband()
This requires a few more changes.
While at it, also add a warning to ieee80211_get_sband()
to avoid it being used when there are multiple links.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 27 Jun 2022 11:13:04 +0000 (13:13 +0200)]
wifi: mac80211: split IEEE80211_STA_DISABLE_WMM to link data
If we decide to stop tracking QoS/WMM parameters, then
this should be a per-link decision. Move the flag to
the link instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 14:18:56 +0000 (16:18 +0200)]
wifi: mac80211: mlme: first adjustments for MLO
Do the first adjustments in the client-side code to pass
the link pointer (instead of sdata) to most places etc.
This is just preparation, so the real MLO patches become
smaller.
Note that this isn't complete, notably there are still
quite a few references to sta->deflink and sta->sta.deflink.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 14:28:33 +0000 (16:28 +0200)]
wifi: mac80211: mlme: do IEEE80211_STA_RESET_SIGNAL_AVE per link
Remove the IEEE80211_STA_RESET_SIGNAL_AVE flag and use
a bool instead, but invert the polarity (now calling it
tracking_signal_avg) so we don't have to initialize it,
and put that into the link instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 14:08:39 +0000 (16:08 +0200)]
wifi: mac80211: mlme: track AP (MLD) address separately
To prepare a bit more for MLO in the client code,
track the AP's address (for now only the BSSID, but
will track the AP MLD's address later) separately
from the per-link BSSID.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 13:54:38 +0000 (15:54 +0200)]
wifi: mac80211: remove unused bssid variable
This variable is only written to, remove it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 13:40:11 +0000 (15:40 +0200)]
wifi: mac80211: change QoS settings API to take link into account
Take the link into account in the QoS settings (EDCA parameters)
APIs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 13:14:26 +0000 (15:14 +0200)]
wifi: mac80211: expect powersave handling in driver for MLO
In MLO, expect the driver fully handles powersave handling,
including tracking whether or not a beacon was received,
the DTIM period, etc.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 13:02:16 +0000 (15:02 +0200)]
wifi: mac80211: move ps setting to vif config
This really shouldn't be in a per-link config, we don't want
to let anyone control it that way (if anything, link powersave
could be forced through APIs to activate/deactivate a link),
and we don't support powersave in software with devices that
can do MLO.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 12:42:12 +0000 (14:42 +0200)]
wifi: mac80211: provide link ID in link_conf
It might be useful to drivers to be able to pass only the
link_conf pointer, rather than both the pointer and the
link_id; add the link_id to the link_conf to facility that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 08:57:41 +0000 (10:57 +0200)]
wifi: mac80211: set up/tear down client vif links properly
In station/client mode, the link data needs a bit more
initialization and destruction than just zero-init and
kfree() respectively, implement that.
This required some shuffling of the link data handling
in general, as we should set it up in setup and do the
teardown in teardown, otherwise we're asymmetric in
case of interface type changes.
Also stop using kfree_rcu(), we cannot guarantee that
nothing is scheduling things that live within the link
(e.g. the u.mgd.request_smps_work) until we're sure it
cannot be referenced anymore, therefore synchronize
instead. This isn't very efficient, but we can always
optimize it later.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 Jun 2022 09:15:52 +0000 (11:15 +0200)]
wifi: mac80211: move ieee80211_request_smps_mgd_work
This function can be static.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 27 Jun 2022 10:49:03 +0000 (12:49 +0200)]
wifi: nl80211: acquire wdev mutex for dump_survey
At least the quantenna driver calls wdev_chandef() here
which now requires the lock, so acquire it.
Fixes:
7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 23 Jun 2022 20:21:28 +0000 (22:21 +0200)]
wifi: mac80211: fix key lookup
With the split into keys[]/deflink.gtk[] arrays, WEP keys are
still installed into the keys[] array, but we didn't look them
up there. This meant they weren't deleted correctly.
Fix this by looking up the key there even if it's not pairwise
so we can be sure we don't have it.
Fixes:
bfd8403adddd ("wifi: mac80211: reorg some iface data structs for MLD")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 23 Jun 2022 10:04:55 +0000 (12:04 +0200)]
wifi: mac80211: separate out connection downgrade flags
Separate out the connection downgrade flags from the ifmgd->flags
and put them into the link information instead. While at it, make
them a separate sparse type so we don't get confused about where
they belong and have static checking on correct handling.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ilan Peer [Wed, 1 Jun 2022 14:43:34 +0000 (17:43 +0300)]
wifi: mac80211: Align with Draft P802.11be_D2.0
Align the mac80211 implementation with P802.11be_D2.0.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ilan Peer [Wed, 27 Apr 2022 15:02:10 +0000 (18:02 +0300)]
wifi: mac80211: Align with Draft P802.11be_D1.5
Align the mac80211 implementation with P802.11be_D1.5.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 23 Jun 2022 07:48:00 +0000 (09:48 +0200)]
wifi: mac80211: skip powersave recalc if driver SUPPORTS_DYNAMIC_PS
There are a few places that check ps_sdata and/or the dynamic
PS timeout, but they're erroneous in case SUPPORTS_DYNAMIC_PS
is set by the driver.
Skip the entire recalculation in this case so we cannot get
into those paths elsewhere, and so we simplify this for the
purpose of implementing MLO.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 22 Jun 2022 12:30:20 +0000 (14:30 +0200)]
wifi: mac80211: debug: omit link if non-MLO connection
If we don't really have multiple links, omit the link ID from
link debug prints, otherwise we change the format for all of
the existing drivers (most of which might never support MLO),
and also have extra noise in the logs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Wed, 22 Jun 2022 12:02:37 +0000 (15:02 +0300)]
wifi: mac80211_hwsim: Ack link addressed frames
Do address matching with link addresses as well.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 22 Jun 2022 09:02:00 +0000 (11:02 +0200)]
wifi: cfg80211: drop BSS elements from assoc trace for now
For multi-link operation, this cannot work as the req->bss pointer
will be NULL, and we'll need to do more work on this to really add
tracing for the MLO case here. Drop the BSS elements for now as
they're not the most useful thing, and it's hard to size things
correctly for the MLO case (without adding a lot of code that's
also executed when tracing isn't enabled.)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 22 Jun 2022 08:17:23 +0000 (10:17 +0200)]
wifi: cfg80211: make cfg80211_auth_request::key_idx signed
We might assign -1 to it in some cases when key is NULL,
which means the key_idx isn't used but can lead to a
warning from static checkers such as smatch.
Make the struct member signed simply to avoid that, we
only need a range of -1..3 anyway.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Shaul Triebitz [Tue, 21 Jun 2022 09:18:31 +0000 (12:18 +0300)]
wifi: nl80211: enable setting the link address at new station
Since for an MLD station the default link is added together
with the add station command, allow also setting the link
MAC address.
Otherwise, it is needed to use the modify link API only
for setting the link MAC address.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 17 Jun 2022 20:36:37 +0000 (22:36 +0200)]
wifi: mac80211: RCU-ify link/link_conf pointers
Since links can be added and removed dynamically, we need to
somehow protect the sdata->link[] and vif->link_conf[] array
pointers from disappearing when accessing them without locks.
RCU-ify the pointers to achieve this, which requires quite a
bit of rework.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 20 Jun 2022 13:29:28 +0000 (15:29 +0200)]
wifi: nl80211: hold wdev mutex for station APIs
Since this will need to refer - at least in part - to the link
stations of an MLD, hold the wdev mutex for driver convenience.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 20 Jun 2022 13:28:50 +0000 (15:28 +0200)]
wifi: nl80211: hold wdev mutex for channel switch APIs
Since we deal with links in an MLD here, hold the wdev
mutex now.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 20 Jun 2022 13:25:56 +0000 (15:25 +0200)]
wifi: nl80211: hold wdev mutex in add/mod/del link station
Since we deal with links, and that requires looking at wdev links,
we should hold the wdev mutex for driver convenience.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Shaul Triebitz [Tue, 14 Jun 2022 14:27:03 +0000 (17:27 +0300)]
wifi: mac80211: implement callbacks for <add/mod/del>_link_station
Implement callbacks for cfg80211 add_link_station, mod_link_station,
and del_link_station API.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Shaul Triebitz [Tue, 14 Jun 2022 10:49:16 +0000 (13:49 +0300)]
wifi: cfg80211/mac80211: separate link params from station params
Put the link_station_parameters structure in the station_parameters
structure (and remove the station_parameters fields already existing
in link_station_parameters).
Now, for an MLD station, the default link is added together with
the station.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Shaul Triebitz [Wed, 8 Jun 2022 09:01:12 +0000 (12:01 +0300)]
wifi: cfg80211: add API to add/modify/remove a link station
Add an API for adding/modifying/removing a link of a station.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Shaul Triebitz [Sun, 19 Jun 2022 12:08:02 +0000 (15:08 +0300)]
wifi: mac80211: add an ieee80211_get_link_sband
Similar to ieee80211_get_sband but get the sband of the link_conf.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Sun, 19 Jun 2022 11:38:03 +0000 (14:38 +0300)]
wifi: mac80211: Remove AP SMPS leftovers
AP SMPS was removed and not needed anymore. Remove the leftovers.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Tue, 14 Jun 2022 14:21:23 +0000 (17:21 +0300)]
wifi: cfg80211: Allow MLO TX with link source address
Management frames are transmitted from link address and not device
address. Allow that.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Tue, 14 Jun 2022 14:20:04 +0000 (17:20 +0300)]
wifi: mac80211: Consider MLO links in offchannel logic
Check all the MLO links to decide whether offchannel TX is needed.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 14 Jun 2022 11:08:42 +0000 (13:08 +0200)]
wifi: mac80211: rx: accept link-addressed frames
When checking whether or not to accept a frame in RX,
take into account the configured link addresses. Also
look up the link station correctly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 17 Jun 2022 13:16:36 +0000 (15:16 +0200)]
wifi: mac80211: consistently use sdata_dereference()
Instead of open-coding it, use sdata_dereference().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Tue, 14 Jun 2022 10:41:30 +0000 (13:41 +0300)]
wifi: mac80211_hwsim: Support link channel matching on rx
Accept frames from all the links' channels.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Aditya Kumar Singh [Fri, 1 Jul 2022 13:36:11 +0000 (19:06 +0530)]
wifi: mac80211: fix mesh airtime link metric estimating
ieee80211s_update_metric function uses sta_set_rate_info_tx
function to get struct rate_info data from ieee80211_tx_rate
struct, present in ieee80211_sta->deflink.tx_stats. However,
drivers can skip tx rate calculation by setting rate idx as
-1. Such drivers provides rate_info directly and hence
ieee80211s metric is updated incorrectly since ieee80211_tx_rate
has inconsistent data.
Add fix to use rate_info directly if present instead of
sta_set_rate_info_tx for updating ieee80211s metric.
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Link: https://lore.kernel.org/r/20220701133611.544-1-quic_adisi@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Lian Chen [Thu, 14 Jul 2022 09:16:36 +0000 (17:16 +0800)]
wifi: mac80211: make 4addr null frames using min_rate for WDS
WDS needs 4addr packets to trigger AP for wlan0.sta creation.
However, the 4addr null frame is sent at a high rate so that
sometimes the AP can't receive it. Switch to using min rate.
Signed-off-by: Lian Chen <lian.chen@mediatek.com>
Link: https://lore.kernel.org/r/20220714091636.59107-1-lian.chen@mediatek.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
XueBing Chen [Mon, 11 Jul 2022 14:27:58 +0000 (22:27 +0800)]
wifi: cfg80211: use strscpy to replace strlcpy
The strlcpy should not be used because it doesn't limit the source
length. Preferred is strscpy.
Signed-off-by: XueBing Chen <chenxuebing@jari.cn>
Link: https://lore.kernel.org/r/2d2fcbf7.e33.181eda8e70e.Coremail.chenxuebing@jari.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Wed, 13 Jul 2022 08:34:44 +0000 (10:34 +0200)]
wifi: mac80211: exclude multicast packets from AQL pending airtime
In AP mode, multicast traffic is handled very differently from normal traffic,
especially if at least one client is in powersave mode.
This means that multicast packets can be buffered a lot longer than normal
unicast packets, and can eat up the AQL budget very quickly because of the low
data rate.
Along with the recent change to maintain a global PHY AQL limit, this can lead
to significant latency spikes for unicast traffic.
Since queueing multicast to hardware is currently not constrained by AQL limits
anyway, let's just exclude it from the AQL pending airtime calculation entirely.
Fixes:
8e4bac067105 ("wifi: mac80211: add a per-PHY AQL limit to improve fairness")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20220713083444.86129-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 13 Jul 2022 19:16:45 +0000 (21:16 +0200)]
wifi: mac80211_hwsim: use 32-bit skb cookie
We won't really have enough skbs to need a 64-bit cookie,
and on 32-bit platforms storing the 64-bit cookie into the
void *rate_driver_data doesn't work anyway. Switch back to
using just a 32-bit cookie and uintptr_t for the type to
avoid compiler warnings about all this.
Fixes:
4ee186fa7e40 ("wifi: mac80211_hwsim: fix race condition in pending packet")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 13 Jul 2022 19:16:37 +0000 (21:16 +0200)]
wifi: rsi: remove unused variable
Remove a variable here that was now set but never used.
Fixes:
f276e20b182d ("wifi: mac80211: move interface config to new struct")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jakub Kicinski [Fri, 15 Jul 2022 05:11:37 +0000 (22:11 -0700)]
Merge tag 'mlx5-updates-2022-07-13' of git://git./linux/kernel/git/saeed/linux
Saeed Mahameed says:
====================
mlx5-updates-2022-07-13
1) Support 802.1ad for bridge offloads
Vlad Buslov Says:
=================
Current mlx5 bridge VLAN offload implementation only supports 802.1Q VLAN
Ethernet protocol. That protocol type is assumed by default and
SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL notification is ignored.
In order to support dynamically setting VLAN protocol handle
SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL notification by flushing FDB and
re-creating VLAN modify header actions with a new protocol. Implement support
for 802.1ad protocol by saving the current VLAN protocol to per-bridge variable
and re-create the necessary flow groups according to its current value (either
use cvlan or svlan flow fields).
==================
2) debugfs to count ongoing FW commands
3) debugfs to query eswitch vport firmware diagnostic counters
4) Add missing meter configuration in flow action
5) Some misc cleanup
* tag 'mlx5-updates-2022-07-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
net/mlx5e: Remove the duplicating check for striding RQ when enabling LRO
net/mlx5e: Move the LRO-XSK check to mlx5e_fix_features
net/mlx5e: Extend flower police validation
net/mlx5e: configure meter in flow action
net/mlx5e: Removed useless code in function
net/mlx5: Bridge, implement QinQ support
net/mlx5: Bridge, implement infrastructure for VLAN protocol change
net/mlx5: Bridge, extract VLAN push/pop actions creation
net/mlx5: Bridge, rename filter fg to vlan_filter
net/mlx5: Bridge, refactor groups sizes and indices
net/mlx5: debugfs, Add num of in-use FW command interface slots
net/mlx5: Expose vnic diagnostic counters for eswitch managed vports
net/mlx5: Use software VHCA id when it's supported
net/mlx5: Introduce ifc bits for using software vhca id
net/mlx5: Use the bitmap API to allocate bitmaps
====================
Link: https://lore.kernel.org/r/20220713225859.401241-1-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Jakub Kicinski [Fri, 15 Jul 2022 04:58:49 +0000 (21:58 -0700)]
Merge branch 'net-devlink-couple-of-trivial-fixes'
Jiri Pirko says:
====================
net: devlink: couple of trivial fixes
Just a couple of trivial fixes I found on the way.
====================
Link: https://lore.kernel.org/r/20220713141853.2992014-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Jiri Pirko [Wed, 13 Jul 2022 14:18:53 +0000 (16:18 +0200)]
net: devlink: fix return statement in devlink_port_new_notify()
Return directly without intermediate value store at the end of
devlink_port_new_notify() function.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Jiri Pirko [Wed, 13 Jul 2022 14:18:52 +0000 (16:18 +0200)]
net: devlink: fix a typo in function name devlink_port_new_notifiy()
Fix the typo in a name of devlink_port_new_notifiy() function.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Jiri Pirko [Wed, 13 Jul 2022 14:18:51 +0000 (16:18 +0200)]
net: devlink: make devlink_dpipe_headers_register() return void
The return value is not used, so change the return value type to void.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Jakub Kicinski [Thu, 14 Jul 2022 21:19:42 +0000 (14:19 -0700)]
Merge git://git./linux/kernel/git/netdev/net
include/net/sock.h
310731e2f161 ("net: Fix data-races around sysctl_mem.")
e70f3c701276 ("Revert "net: set SK_MEM_QUANTUM to 4096"")
https://lore.kernel.org/all/
20220711120211.
7c8b7cba@canb.auug.org.au/
net/ipv4/fib_semantics.c
747c14307214 ("ip: fix dflt addr selection for connected nexthop")
d62607c3fe45 ("net: rename reference+tracking helpers")
net/tls/tls.h
include/net/tls.h
3d8c51b25a23 ("net/tls: Check for errors in tls_device_init")
587903142308 ("tls: create an internal header")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Nathan Chancellor [Wed, 13 Jul 2022 15:24:37 +0000 (08:24 -0700)]
x86/speculation: Use DECLARE_PER_CPU for x86_spec_ctrl_current
Clang warns:
arch/x86/kernel/cpu/bugs.c:58:21: error: section attribute is specified on redeclared variable [-Werror,-Wsection]
DEFINE_PER_CPU(u64, x86_spec_ctrl_current);
^
arch/x86/include/asm/nospec-branch.h:283:12: note: previous declaration is here
extern u64 x86_spec_ctrl_current;
^
1 error generated.
The declaration should be using DECLARE_PER_CPU instead so all
attributes stay in sync.
Cc: stable@vger.kernel.org
Fixes:
fc02735b14ff ("KVM: VMX: Prevent guest RSB poisoning attacks with eIBRS")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 14 Jul 2022 19:48:07 +0000 (12:48 -0700)]
Merge tag 'net-5.19-rc7' of git://git./linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
"Including fixes from netfilter, bpf and wireless.
Still no major regressions, the release continues to be calm. An
uptick of fixes this time around due to trivial data race fixes and
patches flowing down from subtrees.
There has been a few driver fixes (particularly a few fixes for false
positives due to
66e4c8d95008 which went into -next in May!) that make
me worry the wide testing is not exactly fully through.
So "calm" but not "let's just cut the final ASAP" vibes over here.
Current release - regressions:
- wifi: rtw88: fix write to const table of channel parameters
Current release - new code bugs:
- mac80211: add gfp_t arg to ieeee80211_obss_color_collision_notify
- mlx5:
- TC, allow offload from uplink to other PF's VF
- Lag, decouple FDB selection and shared FDB
- Lag, correct get the port select mode str
- bnxt_en: fix and simplify XDP transmit path
- r8152: fix accessing unset transport header
Previous releases - regressions:
- conntrack: fix crash due to confirmed bit load reordering (after
atomic -> refcount conversion)
- stmmac: dwc-qos: disable split header for Tegra194
Previous releases - always broken:
- mlx5e: ring the TX doorbell on DMA errors
- bpf: make sure mac_header was set before using it
- mac80211: do not wake queues on a vif that is being stopped
- mac80211: fix queue selection for mesh/OCB interfaces
- ip: fix dflt addr selection for connected nexthop
- seg6: fix skb checksums for SRH encapsulation/insertion
- xdp: fix spurious packet loss in generic XDP TX path
- bunch of sysctl data race fixes
- nf_log: incorrect offset to network header
Misc:
- bpf: add flags arg to bpf_dynptr_read and bpf_dynptr_write APIs"
* tag 'net-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (87 commits)
nfp: flower: configure tunnel neighbour on cmsg rx
net/tls: Check for errors in tls_device_init
MAINTAINERS: Add an additional maintainer to the AMD XGBE driver
xen/netback: avoid entering xenvif_rx_next_skb() with an empty rx queue
selftests/net: test nexthop without gw
ip: fix dflt addr selection for connected nexthop
net: atlantic: remove aq_nic_deinit() when resume
net: atlantic: remove deep parameter on suspend/resume functions
sfc: fix kernel panic when creating VF
seg6: bpf: fix skb checksum in bpf_push_seg6_encap()
seg6: fix skb checksum in SRv6 End.B6 and End.B6.Encaps behaviors
seg6: fix skb checksum evaluation in SRH encapsulation/insertion
sfc: fix use after free when disabling sriov
net: sunhme: output link status with a single print.
r8152: fix accessing unset transport header
net: stmmac: fix leaks in probe
net: ftgmac100: Hold reference returned by of_get_child_by_name()
nexthop: Fix data-races around nexthop_compat_mode.
ipv4: Fix data-races around sysctl_ip_dynaddr.
tcp: Fix a data-race around sysctl_tcp_ecn_fallback.
...
Linus Torvalds [Thu, 14 Jul 2022 19:35:15 +0000 (12:35 -0700)]
Merge tag '5.19-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French:
"Three smb3 client fixes:
- two multichannel fixes: fix a potential deadlock freeing a channel,
and fix a race condition on failed creation of a new channel
- mount failure fix: work around a server bug in some common older
Samba servers by avoiding padding at the end of the negotiate
protocol request"
* tag '5.19-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
smb3: workaround negprot bug in some Samba servers
cifs: remove unnecessary locking of chan_lock while freeing session
cifs: fix race condition with delayed threads
Linus Torvalds [Thu, 14 Jul 2022 19:29:43 +0000 (12:29 -0700)]
Merge tag 'nfsd-5.19-3' of git://git./linux/kernel/git/cel/linux
Pull nfsd fixes from Chuck Lever:
"Notable regression fixes:
- Enable SETATTR(time_create) to fix regression with Mac OS clients
- Fix a lockd crasher and broken NLM UNLCK behavior"
* tag 'nfsd-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
lockd: fix nlm_close_files
lockd: set fl_owner when unlocking files
NFSD: Decode NFSv4 birth time attribute
Linus Torvalds [Thu, 14 Jul 2022 19:15:42 +0000 (12:15 -0700)]
Merge tag 'integrity-v5.19-fix' of git://git./linux/kernel/git/zohar/linux-integrity
Pull integrity fixes from Mimi Zohar:
"Here are a number of fixes for recently found bugs.
Only 'ima: fix violation measurement list record' was introduced in
the current release. The rest address existing bugs"
* tag 'integrity-v5.19-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
ima: Fix potential memory leak in ima_init_crypto()
ima: force signature verification when CONFIG_KEXEC_SIG is configured
ima: Fix a potential integer overflow in ima_appraise_measurement
ima: fix violation measurement list record
Revert "evm: Fix memleak in init_desc"
Linus Torvalds [Thu, 14 Jul 2022 19:08:59 +0000 (12:08 -0700)]
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
- quieten the spectre-bhb prints
- mark flattened device tree sections as shareable
- remove some obsolete CPU domain code and help text
- fix thumb unaligned access abort emulation
- fix amba_device_add() refcount underflow
- fix literal placement
* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: 9208/1: entry: add .ltorg directive to keep literals in range
ARM: 9207/1: amba: fix refcount underflow if amba_device_add() fails
ARM: 9214/1: alignment: advance IT state after emulating Thumb instruction
ARM: 9213/1: Print message about disabled Spectre workarounds only once
ARM: 9212/1: domain: Modify Kconfig help text
ARM: 9211/1: domain: drop modify_domain()
ARM: 9210/1: Mark the FDT_FIXED sections as shareable
ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle
Guenter Roeck [Thu, 14 Jul 2022 18:46:00 +0000 (11:46 -0700)]
um: Replace to_phys() and to_virt() with less generic function names
The UML function names to_virt() and to_phys() are exposed by UML
headers, and are very generic and may be defined by drivers. As it
turns out, commit
9409c9b6709e ("pmem: refactor pmem_clear_poison()")
did exactly that.
This results in build errors such as the following when trying to build
um:allmodconfig:
drivers/nvdimm/pmem.c: In function ‘pmem_dax_zero_page_range’:
./arch/um/include/asm/page.h:105:20: error: too few arguments to function ‘to_phys’
105 | #define __pa(virt) to_phys((void *) (unsigned long) (virt))
| ^~~~~~~
Use less generic function names for the um specific to_phys() and
to_virt() functions to fix the problem and to avoid similar problems in
the future.
Fixes:
9409c9b6709e ("pmem: refactor pmem_clear_poison()")
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 14 Jul 2022 18:34:16 +0000 (11:34 -0700)]
Merge tag 'sound-5.19-rc7' of git://git./linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Hopefully the last one for 5.19. This became bigger than wished, but
all changes are pretty device-specific small fixes, which look less
worrisome.
The majority of changes are about various ASoC fixes, while the usual
HD-audio quirks are included as well"
* tag 'sound-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits)
ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop
ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc221
ALSA: hda/realtek: fix mute/micmute LEDs for HP machines
ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671
ALSA: hda - Add fixup for Dell Latitidue E5430
ALSA: hda/conexant: Apply quirk for another HP ProDesk 600 G3 model
ALSA: hda/realtek: Fix headset mic for Acer SF313-51
ASoC: Intel: Skylake: Correct the handling of fmt_config flexible array
ASoC: Intel: Skylake: Correct the ssp rate discovery in skl_get_ssp_clks()
ASoC: rt5640: Fix the wrong state of JD1 and JD2
ASoC: Intel: sof_rt5682: fix out-of-bounds array access
ASoC: qdsp6: fix potential memory leak in q6apm_get_audioreach_graph()
ASoC: tas2764: Fix amp gain register offset & default
ASoC: tas2764: Correct playback volume range
ASoC: tas2764: Fix and extend FSYNC polarity handling
ASoC: tas2764: Add post reset delays
ASoC: dt-bindings: Fix description for msm8916
ASoC: doc: Capitalize RESET line name
ASoC: arizona: Update arizona_aif_cfg_changed to use RX_BCLK_RATE
ASoC: cs47l92: Fix event generation for OUT1 demux
...