summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | wifi: mac80211: stop warning after reconfig failuresJohannes Berg2023-06-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a reconfig failure in the driver, then we need to shut down the network interface(s) at the network stack level through cfg80211, which can result in a lot of those "Failed check-sdata-in-driver check, ..." warnings, since interfaces are considered to not be in the driver when the reconfiguration fails, but we still need to go through all the shutdown flow. Avoid many of these warnings by storing the fact that the stack experienced a reconfiguration failure and not doing the warning in that case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230604120651.3750c4ae6e76.I9e80d6026f59263c008a1a68f6cd6891ca0b93b0@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: consistently use u64 for BSS changesAnjaneyulu2023-06-061-5/+9
| | | | | | | | | | | | | | | | | | | | Currently, enum ieee80211_bss_change has more than 32 flags. Change the type of the corresponding variables from u32 to u64. Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230604120651.10354a05eaf1.If19359262fe2728dd523ea6d7c3aa7dc50940411@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: remove element scratch_lenJohannes Berg2023-06-061-3/+0
|/ | | | | | | This isn't used, and there isn't really a good way it could be used, so just remove that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: use the new drop reasons infrastructureJohannes Berg2023-04-201-7/+1
| | | | | | | | | | | | | | | | | It can be really hard to analyse or debug why packets are going missing in mac80211, so add the needed infrastructure to use use the new per-subsystem drop reasons. We actually use two drop reason subsystems here because of the different handling of frames that are dropped but still go to monitor for old versions of hostapd, and those that are just completely unusable (e.g. crypto failed.) Annotate a few reasons here just to illustrate this, we'll need to go through and annotate more of them later. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* wifi: mac80211: enable EHT mesh supportRyder Lee2023-03-311-0/+2
| | | | | | | | | | | | Similar to AP beacon, this enables the basic mesh EHT mode, including EHT operation IE and the fixed field of EHT operation information IE. As for the optional part (i.e. preamble puncturing bitmap) will be added in future patch. Tested-by: Lian Chen <lian.chen@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Link: https://lore.kernel.org/r/1e0ddb9001312451c3e99c4eed2072caf8075f61.1679935259.git.ryder.lee@mediatek.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* Merge wireless/main into wireless-next/mainJohannes Berg2023-03-311-0/+3
|\ | | | | | | | | | | | | There are a few merge conflicts due to overlapping fixes and changes, merge wireless/main to fix them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * wifi: mac80211: Serialize ieee80211_handle_wake_tx_queue()Alexander Wetzel2023-03-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ieee80211_handle_wake_tx_queue must not run concurrent multiple times. It calls ieee80211_txq_schedule_start() and the drivers migrated to iTXQ do not expect overlapping drv_tx() calls. This fixes 'c850e31f79f0 ("wifi: mac80211: add internal handler for wake_tx_queue")', which introduced ieee80211_handle_wake_tx_queue. Drivers started to use it with 'a790cc3a4fad ("wifi: mac80211: add wake_tx_queue callback to drivers")'. But only after fixing an independent bug with '4444bc2116ae ("wifi: mac80211: Proper mark iTXQs for resumption")' problematic concurrent calls really happened and exposed the initial issue. Fixes: c850e31f79f0 ("wifi: mac80211: add internal handler for wake_tx_queue") Reported-by: Thomas Mann <rauchwolke@gmx.net> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217119 Link: https://lore.kernel.org/r/b8efebc6-4399-d0b8-b2a0-66843314616b@leemhuis.info/ Link: https://lore.kernel.org/r/b7445607128a6b9ed7c17fcdcf3679bfaf4aaea.camel@sipsolutions.net> CC: <stable@vger.kernel.org> Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de> Link: https://lore.kernel.org/r/20230314211122.111688-1-alexander@wetzel-home.de [add missing spin_lock_init() noticed by Felix] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: S1G capabilities information element in probe requestKieran Frewen2023-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | Add the missing S1G capabilities information element to probe requests. Signed-off-by: Kieran Frewen <kieran.frewen@morsemicro.com> Co-developed-by: Gilad Itzkovitch <gilad.itzkovitch@morsemicro.com> Signed-off-by: Gilad Itzkovitch <gilad.itzkovitch@morsemicro.com> Link: https://lore.kernel.org/r/20230223032512.3848105-1-gilad.itzkovitch@virscient.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: support RNR for EMA APAloka Dixit2023-03-241-3/+18
| | | | | | | | | | | | | | | | | | | | Generate EMA beacons, each including MBSSID and RNR elements at a given index. If number of stored RNR elements is more than the number of MBSSID elements then add those in every EMA beacon. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> Link: https://lore.kernel.org/r/20230323113801.6903-3-quic_alokad@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: generate EMA beacons in AP modeAloka Dixit2023-03-221-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add APIs to generate an array of beacons for an EMA AP (enhanced multiple BSSID advertisements), each including a single MBSSID element. EMA profile periodicity equals the count of elements. - ieee80211_beacon_get_template_ema_list() - Generate and return all EMA beacon templates. Drivers must call ieee80211_beacon_free_ema_list() to free the memory. No change in the prototype for the existing API, ieee80211_beacon_get_template(), which should be used for non-EMA AP. - ieee80211_beacon_get_template_ema_index() - Generate a beacon which includes the multiple BSSID element at the given index. Drivers can use this function in a loop until NULL is returned which indicates end of available MBSSID elements. - ieee80211_beacon_free_ema_list() - free the memory allocated for the list of EMA beacon templates. Modify existing functions ieee80211_beacon_get_ap(), ieee80211_get_mbssid_beacon_len() and ieee80211_beacon_add_mbssid() to accept a new parameter for EMA index. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> Co-developed-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org> Link: https://lore.kernel.org/r/20221206005040.3177-2-quic_alokad@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: use mesh header cache to speed up mesh forwardingFelix Fietkau2023-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | Significantly reduces mesh forwarding path CPU usage and enables the direct use of iTXQ. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Link: https://lore.kernel.org/r/20230314095956.62085-5-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: mesh fast xmit supportFelix Fietkau2023-03-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, fast xmit only worked on interface types where initially a sta lookup is performed, and a cached header can be attached to the sta, requiring only some fields to be updated at runtime. This technique is not directly applicable for a mesh device type due to the dynamic nature of the topology and protocol. There are more addresses that need to be filled, and there is an extra header with a dynamic length based on the addressing mode. Change the code to cache entries contain a copy of the mesh subframe header + bridge tunnel header, as well as an embedded struct ieee80211_fast_tx, which contains the information for building the 802.11 header. Add a mesh specific early fast xmit call, which looks up a cached entry and adds only the mesh subframe header, before passing it over to the generic fast xmit code. To ensure the changes in network are reflected in these cached headers, flush affected cached entries on path changes, as well as other conditions that currently trigger a fast xmit check in other modes (key changes etc.) This code is loosely based on a previous implementation by: Sriram R <quic_srirrama@quicinc.com> Cc: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20230314095956.62085-4-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: fix race in mesh sequence number assignmentFelix Fietkau2023-03-221-1/+1
| | | | | | | | | | | | | | | | | | Since the sequence number is shared across different tx queues, it needs to be atomic in order to avoid accidental duplicate assignment Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20230314095956.62085-2-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: add support for letting drivers register tc offload supportFelix Fietkau2023-03-221-1/+2
| | | | | | | | | | | | | | | | | | | | On newer MediaTek SoCs (e.g. MT7986), WLAN->WLAN or WLAN->Ethernet flows can be offloaded by the SoC. In order to support that, the .ndo_setup_tc op is needed. Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20230321091248.30947-1-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wifi: mac80211: add netdev per-link debugfs data and driver hookBenjamin Berg2023-03-071-0/+4
|/ | | | | | | | | | | This adds the infrastructure to have netdev specific per-link data both for mac80211 and the driver in debugfs. For the driver, a new callback is added which is only used if MLO is supported. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230301115906.fb4c947e4df8.I69b3516ddf4c8a7501b395f652d6063444ecad63@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: remove mesh forwarding congestion checkFelix Fietkau2023-02-141-1/+0
| | | | | | | | | | Now that all drivers use iTXQ, it does not make sense to check to drop tx forwarding packets when the driver has stopped the queues. fq_codel will take care of dropping packets when the queues fill up Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20230213100855.34315-3-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: mlme: handle EHT channel puncturingJohannes Berg2023-02-141-1/+1
| | | | | | | | | | | | | | | | | Handle the Puncturing info received from the AP in the EHT Operation element in beacons. If the info is invalid: - during association: disable EHT connection for the AP - after association: disconnect This commit includes many (internal) bugfixes and spec updates various people. Co-developed-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://lore.kernel.org/r/20230127123930.4fbc74582331.I3547481d49f958389f59dfeba3fcc75e72b0aa6e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: move color collision detection report in a delayed workLorenzo Bianconi2023-02-141-0/+3
| | | | | | | | | | | | | | Move color collision report in a dedicated delayed work and do not run it in interrupt context in order to rate-limit the number of events reported to userspace. Moreover grab wdev mutex in ieee80211_color_collision_detection_work routine since it is required by cfg80211_obss_color_collision_notify(). Tested-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Fixes: 5f9404abdf2a ("mac80211: add support for BSS color change") Link: https://lore.kernel.org/r/3f6cf60c892ad40c1cca4a55d62b1224ef1c6ce9.1674644379.git.lorenzo@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: Proper mark iTXQs for resumptionAlexander Wetzel2023-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When a running wake_tx_queue() call is aborted due to a hw queue stop the corresponding iTXQ is not always correctly marked for resumption: wake_tx_push_queue() can stops the queue run without setting @IEEE80211_TXQ_STOP_NETIF_TX. Without the @IEEE80211_TXQ_STOP_NETIF_TX flag __ieee80211_wake_txqs() will not schedule a new queue run and remaining frames in the queue get stuck till another frame is queued to it. Fix the issue for all drivers - also the ones with custom wake_tx_queue callbacks - by moving the logic into ieee80211_tx_dequeue() and drop the redundant @txqs_stopped. @IEEE80211_TXQ_STOP_NETIF_TX is also renamed to @IEEE80211_TXQ_DIRTY to better describe the flag. Fixes: c850e31f79f0 ("wifi: mac80211: add internal handler for wake_tx_queue") Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de> Link: https://lore.kernel.org/r/20221230121850.218810-1-alexander@wetzel-home.de Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: Drop support for TX push pathAlexander Wetzel2022-10-101-1/+0
| | | | | | | | All drivers are now using mac80211 internal queues (iTXQs). Drop mac80211 internal support for the old push path. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: check link ID in auth/assoc continuationJohannes Berg2022-10-071-0/+1
| | | | | | | | Ensure that the link ID matches in auth/assoc continuation, otherwise we need to reset all the data. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: Process association status for affiliated linksIlan Peer2022-10-071-0/+2
| | | | | | | | In case the AP returned a non success status for one of the links, do not activate the link. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: Parse station profile from association responseIlan Peer2022-10-071-1/+25
| | | | | | | | | | | | | | | | | When processing an association response frame for a Multi-Link connection, extract the per station profile for each additional link, and use it for parsing the link elements. As the Multi-Link element might be fragmented, add support for reassembling a fragmented element. To simplify memory management logic, extend 'struct ieee802_11_elems' to hold a scratch buffer, which is used for the defragmentation. Once an element is reconstructed in the scratch area, point the corresponding element pointer to it. Currently only defragmentation of Multi-Link element and the contained per-STA profile subelement is supported. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: implement link switchingJohannes Berg2022-09-061-0/+4
| | | | | | | | | | | Implement an API function and debugfs file to switch active links. Also provide an async version of the API so drivers can call it in arbitrary contexts, e.g. while in the authorized callback. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: mlme: refactor QoS settings codeJohannes Berg2022-09-031-0/+1
| | | | | | | Refactor the code to apply QoS settings to the driver so we can call it on link switch. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: move link code to a new fileJohannes Berg2022-09-031-3/+11
| | | | | | | | We probably should've done that originally, we already have about 300 lines of code there, and will add more. Move all the link code we wrote to a new file. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: remove unused arg to ieee80211_chandef_eht_operJohannes Berg2022-09-031-2/+1
| | | | | | | | We don't need the sdata argument, and it doesn't make any sense for a direct conversion from one value to another, so just remove the argument Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: correct SMPS mode in HE 6 GHz capabilityJohannes Berg2022-08-261-0/+1
| | | | | | | | If we add 6 GHz capability in MLO, we cannot use the SMPS mode from the deflink. Pass it separately instead since on a second link we don't even have a link data struct yet. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: cfg80211/mac80211: check EHT capability size correctlyJohannes Berg2022-08-251-1/+5
| | | | | | | | | For AP/non-AP the EHT MCS/NSS subfield size differs, the 4-octet subfield is only used for 20 MHz-only non-AP STA. Pass an argument around everywhere to be able to parse it properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: properly implement MLO key handlingJohannes Berg2022-08-251-0/+1
| | | | | | | | | Implement key installation and lookup (on TX and RX) for MLO, so we can use multiple GTKs/IGTKs/BIGTKs. Co-authored-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: rx: track link in RX dataJohannes Berg2022-07-221-0/+1
| | | | | | | | We'll need the link e.g. for decrypt, and shouldn't be looking it up all the time later, so track it in the RX data. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: optionally implement MLO multicast TXJohannes Berg2022-07-221-0/+1
| | | | | | | | | | | | | | | | | | | For drivers using software encryption for multicast TX, such as mac80211_hwsim, mac80211 needs to duplicate the multicast frames on each link, if MLO is enabled. Do this, but don't just make it dependent on the key but provide a separate flag for drivers to opt out of this. This is not very efficient, I expect that drivers will do it in firmware/hardware or at least with DMA engine assistence, so this is mostly for hwsim. To make this work, also implement the SNS11 sequence number space that an AP MLD shall have, and modify the API to the __ieee80211_subif_start_xmit() function to always require the link ID bits to be set. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: expand ieee80211_mgmt_tx() for MLOJohannes Berg2022-07-221-4/+4
| | | | | | | | | | | | | | | There are a couple of new things that should be possible with MLO: * selecting the link to transmit to a station by link ID, which a previous patch added to the nl80211 API * selecting the link by frequency, similarly * allowing transmittion to an MLD without specifying any channel or link ID, with MLD addresses Enable these use cases. Also fix the address comparison in client mode to use the AP (MLD) address. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: support MLO authentication/association with one linkJohannes Berg2022-07-151-7/+25
| | | | | | | | | | | | | | | | | | | | | | It might seem a bit pointless to do a multi-link operation connection with just a single link, but this is already a big change, so for now, limit MLO connections to a single link. Extending that to multiple links will require * work on parsing the multi-link element with STA profile properly, including element fragmentation; * checking the per-link status in the multi-link element * implementing logic to have active/inactive links to let drivers decide which links should be active; * implementing multicast RX deduplication; * and likely more. For now this is still useful since it lets us do multi-link connections for the purposes of testing APIs and the higher layers such as wpa_supplicant. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: add API to parse multi-link elementJohannes Berg2022-07-151-0/+5
| | | | | | | | | | | Add the necessary API to parse the multi-link element in the future. For now, link only to the element when found so we can use it in the client-side code later. Later, we'll need to fill this in to deal with element fragmentation, parse the STA profile, etc. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: move IEEE80211_SDATA_OPERATING_GMODE to linkJohannes Berg2022-07-151-2/+4
| | | | | | | | 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>
* wifi: mac80211: Support multi link in ieee80211_recalc_min_chandef()Andrei Otcheretianski2022-07-151-1/+2
| | | | | | | | | | 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>
* wifi: mac80211: Allow EAPOL tx from specific linkAndrei Otcheretianski2022-07-151-0/+3
| | | | | | | Allow link source address on TX. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: cfg80211/mac80211: Support control port TX from specific linkAndrei Otcheretianski2022-07-151-1/+1
| | | | | | | | 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>
* wifi: mac80211: add a helper to fragment an elementJohannes Berg2022-07-151-0/+1
| | | | | | | | | | 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>
* wifi: mac80211: use only channel width in ieee80211_parse_bitrates()Johannes Berg2022-07-151-3/+9
| | | | | | | 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>
* wifi: mac80211: fix multi-BSSID element parsingJohannes Berg2022-07-151-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* wifi: mac80211: move tdls_chan_switch_prohibited to link dataJohannes Berg2022-07-151-1/+2
| | | | | | | 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>
* wifi: mac80211: refactor elements parsing with parameter structJohannes Berg2022-07-151-5/+45
| | | | | | | | 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>
* wifi: mac80211: mlme: use ieee80211_get_link_sband()Johannes Berg2022-07-151-0/+2
| | | | | | | | | 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>
* wifi: mac80211: split IEEE80211_STA_DISABLE_WMM to link dataJohannes Berg2022-07-151-1/+1
| | | | | | | | 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>
* wifi: mac80211: mlme: first adjustments for MLOJohannes Berg2022-07-151-2/+2
| | | | | | | | | | | | | 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>
* wifi: mac80211: mlme: do IEEE80211_STA_RESET_SIGNAL_AVE per linkJohannes Berg2022-07-151-1/+1
| | | | | | | | | 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>
* wifi: mac80211: change QoS settings API to take link into accountJohannes Berg2022-07-151-2/+3
| | | | | | | Take the link into account in the QoS settings (EDCA parameters) APIs. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wifi: mac80211: set up/tear down client vif links properlyJohannes Berg2022-07-151-0/+2
| | | | | | | | | | | | | | | | | | | | 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>