- 21 Jun, 2022 1 commit
-
-
Alexey Kodanev authored
As a result of the execution of the inner while loop, the value of 'idx' can be equal to LINK_QUAL_MAX_RETRY_NUM. However, this is not checked after the loop and 'idx' is used to write the LINK_QUAL_MAX_RETRY_NUM size array 'lq_cmd->rs_table[idx]' below in the outer loop. The fix is to check the new value of 'idx' inside the nested loop, and break both loops if index equals the size. Checking it at the start is now pointless, so let's remove it. Detected using the static analysis tool - Svace. Fixes: be663ab6 ("iwlwifi: split the drivers for agn and legacy devices 3945/4965") Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220608171614.28891-1-aleksei.kodanev@bell-sw.com
-
- 20 Jun, 2022 39 commits
-
-
Veerendranath Jakkam authored
The MLO links used for connection with an MLD AP are decided by the driver in case of SME offloaded to driver. Add support for the drivers to indicate the information of links used for MLO connection in connect and roam callbacks, update the connected links information in wdev from connect/roam result sent by driver. Also, send the connected links information to userspace. Add a netlink flag attribute to indicate that userspace supports handling of MLO connection. Drivers must not do MLO connection when this flag is not set. This is to maintain backwards compatibility with older supplicant versions which doesn't have support for MLO connection. Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Shaul Triebitz authored
Print the link ID in link_info_changed function. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Add initial support to hwsim for creating MLO-capable radios dynamically (and statically via module parameter, but that's not really recommended.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When retrieving scan data, expose not just whether or not the interface (possibly an MLD) is associated to the BSS or not, but also on which link ID if it is an MLD. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When getting/dumping an interface, expose information about valid links. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Shaul Triebitz authored
Add to hwsim a link_data structure. For now, move the beacon interval and beacon timer to the link_data structure (making them per link). Set a beacon timer for each link and transmit a per link beacon (pass the link_id to ieee80211_beacon_get). Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We should set the STA deflink addresses in case no link is really added. Fixes: 046d2e7c ("mac80211: prepare sta handling for MLO support") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Maintain a hash table of link-sta addresses so we can find them for management frames etc. where addresses haven't been replaced by the drivers to the MLD address yet. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We need to be able to access these in a race-free way under traffic while adding/removing them, so RCU-ify the pointers. This requires passing a link_sta to a lot of functions so we don't have to do the RCU handling everywhere. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Hardcoding link[0] is more confusing than using deflink, so use deflink for now, which requires making the macro a bit safer. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
This is only used in rx.c, so move it into the file. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Shaul Triebitz authored
Pass the link id through to the get_beacon and return the beacon for a specific link id. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Shaul Triebitz authored
In start_ap and stop_ap mac80211 callbacks pass the link_id to the drivers. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Shaul Triebitz authored
Use link and link_conf according to the link_id provided by cfg in start_ap/stop_ap and change_beacon. Also use them in the functions called by them. Note that for a non MLD device, the link_id is 0, and link[0] and link_conf[0] equal to deflink and bss_conf respectively (what was there before). Also, call vif_info_change for BSS related changes (SSID), and link_info_change for LINK related changes (instead of the legacy bss_info_change). Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When a link is added or removed via nl80211, these are called. Implement them so we don't have to check in all the different per-link commands whether we've already created the necessary datastructures. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Add some optional callbacks for link add/remove so that drivers can react here. Initially, I thought it would be sufficient to just create the link in start_ap etc., but it turns out that's not so simple, since there are quite a few callbacks that can be called: if they're erroneously without start_ap, things might crash. Thus it might be easier for drivers to allocate all the necessary data structures immediately, to not have to worry about it in each callback, since cfg80211 checks that the link ID is valid (has been added.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We wanted to have this sorted by direction (to/from driver), but didn't maintain that well. Sort the file now. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Add the necessary infrastructure, including a new driver method, to add/remove links to/from a station. To do this, refactor the link alloc/free a bit, splitting that so we can do it without linking them, to handle failures better. Note that a station entry must be created representing an MLD or a non-MLD STA, it cannot change between the two. When representing an MLD, the 'deflink' is used for the first link, which might be removed later, in which case the memory isn't reused. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Take a few bits out of the control.flags to add the link ID to TX frame metadata, so drivers don't need to look it up by the address themselves. Implement that lookup where it's needed, for internal frame TX, and set it to "unspecified" for data transmissions. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
If the interface is an MLD, then we don't know which band the frame will be transmitted on, and we don't know how to look up the band. Set the band information to zero in that case, the driver cannot rely on it anyway. No longer inline ieee80211_tx_skb_tid() since it's even bigger now. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Add the necessary infrastructure, including a new driver method, to add/remove links to/from an interface. Also add the missing link address to bss_conf (which we use as link_conf too), and fill it, in station mode for now just randomly, in AP mode we get the address from cfg80211 since the link must be created with an address first. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For authentication, we need the BSS, the link_id and the AP MLD address to create the link and station, (for now) the driver assigns a link address and sends the frame, the MLD address needs to be the address of the interface. For association, pass the list of BSSes that were selected for the MLO connection, along with extra per-STA profile elements, the AP MLD address and the link ID on which the association request should be sent. Note that for now we don't have a proper way to pass the link address(es) and so the driver/mac80211 will select one, but depending on how that selection works it means that assoc w/o auth data still being around (mac80211 implementation detail) the association won't necessarily work - so this will need to be extended in the future to sort out the link addressing. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When channel contexts are used, IEEE80211_CONF_CHANGE_SMPS doesn't make sense and doesn't apply (which is documented). Mask it in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Shaul Triebitz authored
Replace the bss_info_changed callback with vif_cfg_changed and link_info_changed callbacks (for vif changes and link changes). Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
This function has far too many parameters now, move out the BSS lookup and pass the request struct instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Add the definitions necessary to build and parse some of the multi-link element, the per-STA profile isn't fully included. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For MLO we'll need to do this multiple times, so refactor this. For now keep the disconnect_bssid, but we'll need to figure out how to handle that with MLD. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Today it makes more sense to pass the necessary parameters to look up the BSS entry to cfg80211_mlme_assoc(), but with MLO we will need to look up multiple, and that gets awkward. Pull the lookup code into the callers so we can change it better. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In ieee80211_build_hdr() we do the same thing for all interface types except for AP_VLAN, but we can simplify the code by pulling the common thing in front of the switch and overriding it for AP_VLAN. This will also simplify the code for MLD here later. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
For MLD, we might eventually not really know the band on status, but some code assumes it's there. Move the sband lookup deep to the code that actually needs it, to make it clear where exactly it's needed and for what purposes. For rate control, at least initially we won't support it in MLO, so that won't be an issue. For TX monitoring, we may have to elide the rate and/or rely on ieee80211_tx_status_ext() for rate information. This also simplifies the function prototypes. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
This used to be sorted by driver methods, APIs and internal functions, but got added to in the wrong sections. Fix that by ordering the file properly again. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We need to no longer use bss_conf here, but the per-link data. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Add the link_id parameter and adjust the code accordingly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Start making some SMPS related code MLD-aware. This isn't really done yet, but again cuts down our 'deflink' reliance. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Update ieee80211_ht_cap_ie_to_sta_ht_cap() to handle per-link data. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Update the code in eht.c and add the link_id parameter where necessary. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Update the code in vht.c and add the link_id parameter where necessary. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
We don't need to setup lists and work structs every time we switch the interface type, factor that out into a new ieee80211_link_init() function and use it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
If MLO is enabled by the driver then validate a set of capabilities that mac80211 will initially not support in MLO. This might change if features are implemented. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-