- 15 Jul, 2022 40 commits
-
-
Johannes Berg authored
Factor out the code to set up the assoc link into a new function ieee80211_setup_assoc_link(). While at it, also modify the 'override' handling to just take into account whether or not the conn_flags were changed, which is what we need to setup again the channel later. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There's no need to pass the address, we can look at the auth_data inside the function rather than outside. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Refactor the per-link setup out of ieee80211_assoc_success() into a new function ieee80211_assoc_config_link(). It looks useless for now to parse the elements again inside ieee80211_assoc_config_link(), but that will be done with the link ID in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Refactor ieee80211_prep_channel() to make the link argument optional and add a conn_flags pointer argument instead, so that we can later use this for links that don't exist yet to build the right information for MLO. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For MLO, we will need to build these elements per link, so factor out the code that does this, returning the capability, to simplify building the multi-link element in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
With MLO, when we'll disconnect from an AP MLD, we'll just destroy all the links. Therefore, the only thing we (may) need to reset is the deflink data, so switch back to that and adjust the comments accordingly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For MLO we'll need to read flags not directly from the link as it may not even exist yet if we're just setting up flags for a secondary link before sending the association request, so pass the incoming conn_flags separately. Also, while at it, pass the sdata/link separately as for non-tracking now the link may be NULL. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We'll need ieee80211_prep_channel() in other code for MLO later, so move the code up - unchanged for now - to avoid forward declarations in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Refactor the code here since we need to have it also for each link station after association in MLO later. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The flag here is currently per interface, but the way we set and clear it means it should be per link, so change it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Change ieee80211_check_rate_mask() to use a link rather than the sdata and deflink/bss_conf. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When sending an authentication frame from an MLD, include the multi-link element with the MLD address and use the link address for transmission. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Clean up the code building the supported channels element a little bit by using a local variable instead of the long line. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When a link is stopped for removal, release the channel context it may have. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For now, prohibit DEAUTH_NEED_MGD_TX_PREP since we can't really transmit this on a specific link yet as we don't know which links are active. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The new NL80211_CMD_ADD_LINK_STA and NL80211_CMD_MODIFY_LINK_STA commands have strict policy validation, so fix the policy so it can be validated correctly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
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 authored
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: d648c230 ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
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: efbabc11 ("cfg80211: Indicate MLO connection info in connect and roam callbacks") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Gregory Greenman authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
We should check that MLO connections are supported before attempting to authenticate with MLO parameters, check that. Fixes: d648c230 ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
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 authored
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 authored
If the BSS lookup returned an error, set it to NULL so we don't try to free it. Fixes: d648c230 ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
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 authored
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 authored
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 authored
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 authored
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 authored
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: 820acc81 ("mac80211: Add EHT capabilities to association/probe request") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
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>
-