aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mlxsw: core_linecards: Expose device PSID over device infoJiri Pirko2022-07-263-0/+35
| | | | | | | | | | | | | | | | | | | | | Use tunneled MGIR to obtain PSID of line card device and extend device_info_get() op to fill up the info with that. Example: $ devlink dev info auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0: versions: fixed: hw.revision 0 fw.psid MT_0000000749 running: ini.version 4 fw 19.2010.1312 Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* mlxsw: reg: Add Management DownStream Device Tunneling RegisterJiri Pirko2022-07-261-0/+90
| | | | | | | | | The MDDT register allows to deliver query and request messages (PRM registers, commands) to a DownStream device. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* mlxsw: core_linecards: Probe active line cards for devices and expose FW versionJiri Pirko2022-07-263-0/+69
| | | | | | | | | | | | | | | | | | | | In case the line card is active, go over all possible existing devices (gearboxes) on it and expose FW version of the flashable one. Example: $ devlink dev info auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0: versions: fixed: hw.revision 0 running: ini.version 4 fw 19.2010.1312 Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* mlxsw: reg: Extend MDDQ by device_infoJiri Pirko2022-07-261-1/+82
| | | | | | | | | Extend existing MDDQ register by possibility to query information about devices residing on a line card. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* mlxsw: core_linecards: Expose HW revision and INI versionJiri Pirko2022-07-264-0/+61
| | | | | | | | | | | | | | | | | | | Implement info_get() to expose HW revision of a linecard and loaded INI version. Example: $ devlink dev info auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0: versions: fixed: hw.revision 0 running: ini.version 4 Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* mlxsw: core_linecards: Introduce per line card auxiliary deviceJiri Pirko2022-07-266-3/+194
| | | | | | | | | | | | | | | In order to be eventually able to expose line card gearbox version and possibility to flash FW, model the line card as a separate device on auxiliary bus. Add the auxiliary device for provisioned line card in order to be able to expose provisioned line card info over devlink dev info. When the line card becomes active, there may be other additional info added to the output. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: devlink: introduce nested devlink entity for line cardJiri Pirko2022-07-263-0/+46
| | | | | | | | | | | | | | | | | | | | | | For the purpose of exposing device info and allow flash update which is going to be implemented in follow-up patches, introduce a possibility for a line card to expose relation to nested devlink entity. The nested devlink entity represents the line card. Example: $ devlink lc show pci/0000:01:00.0 lc 1 pci/0000:01:00.0: lc 1 state active type 16x100G nested_devlink auxiliary/mlxsw_core.lc.0 supported_types: 16x100G $ devlink dev show auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0 Signed-off-by: Jiri Pirko <jiri@nvidia.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: devlink: move net check into devlinks_xa_for_each_registered_get()Jiri Pirko2022-07-261-96/+39
| | | | | | | | | | | Benefit from having devlinks iterator helper devlinks_xa_for_each_registered_get() and move the net pointer check inside. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: devlink: make sure that devlink_try_get() works with valid pointer ↵Jiri Pirko2022-07-261-91/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | during xarray iteration Remove dependency on devlink_mutex during devlinks xarray iteration. The reason is that devlink_register/unregister() functions taking devlink_mutex would deadlock during devlink reload operation of devlink instance which registers/unregisters nested devlink instances. The devlinks xarray consistency is ensured internally by xarray. There is a reference taken when working with devlink using devlink_try_get(). But there is no guarantee that devlink pointer picked during xarray iteration is not freed before devlink_try_get() is called. Make sure that devlink_try_get() works with valid pointer. Achieve it by: 1) Splitting devlink_put() so the completion is sent only after grace period. Completion unblocks the devlink_unregister() routine, which is followed-up by devlink_free() 2) During devlinks xa_array iteration, get devlink pointer from xa_array holding RCU read lock and taking reference using devlink_try_get() before unlock. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* Merge branch 'octeontx2-minor-tc-fixes'Paolo Abeni2022-07-261-33/+73
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subbaraya Sundeep says: ==================== Octeontx2 minor tc fixes This patch set fixes two problems found in tc code wrt to ratelimiting and when installing UDP/TCP filters. Patch 1: CN10K has different register format compared to CN9xx hence fixes that. Patch 2: Check flow mask also before installing a src/dst port filter, otherwise installing for one port installs for other one too. ==================== Link: https://lore.kernel.org/r/1658650874-16459-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
| * octeontx2-pf: Fix UDP/TCP src and dst port tc filtersSubbaraya Sundeep2022-07-261-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | Check the mask for non-zero value before installing tc filters for L4 source and destination ports. Otherwise installing a filter for source port installs destination port too and vice-versa. Fixes: 1d4d9e42c240 ("octeontx2-pf: Add tc flower hardware offload on ingress traffic") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
| * octeontx2-pf: cn10k: Fix egress ratelimit configurationSunil Goutham2022-07-261-21/+55
|/ | | | | | | | | | | | | | NIX_AF_TLXX_PIR/CIR register format has changed from OcteonTx2 to CN10K. CN10K supports larger burst size. Fix burst exponent and burst mantissa configuration for CN10K. Also fixed 'maxrate' from u32 to u64 since 'police.rate_bytes_ps' passed by stack is also u64. Fixes: e638a83f167e ("octeontx2-pf: TC_MATCHALL egress ratelimiting offload") Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
* sfc/siena: fix repeated words in commentswangjianli2022-07-261-1/+1
| | | | | | | | Delete the redundant word 'in'. Signed-off-by: wangjianli <wangjianli@cdjrlc.com> Link: https://lore.kernel.org/r/20220724075207.21080-1-wangjianli@cdjrlc.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
* sfc/falcon: fix repeated words in commentswangjianli2022-07-261-1/+1
| | | | | | | | Delete the redundant word 'in'. Signed-off-by: wangjianli <wangjianli@cdjrlc.com> Link: https://lore.kernel.org/r/20220724074746.19550-1-wangjianli@cdjrlc.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
* Merge branch 'add-mtu-change-with-stmmac-interface-running'Jakub Kicinski2022-07-257-313/+459
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Christian Marangi says: ==================== Add MTU change with stmmac interface running This series is to permit MTU change while the interface is running. Major rework are needed to permit to allocate a new dma conf based on the new MTU before applying it. This is to make sure there is enough space to allocate all the DMA queue before releasing the stmmac driver. This was tested with a simple way to stress the network while the interface is running. 2 ssh connection to the device: - One generating simple traffic with while true; do free; done - The other making the mtu change with a delay of 1 second The connection is correctly stopped and recovered after the MTU is changed. The first 2 patch of this series are minor fixup that fix problems presented while testing this. One fix a problem when we renable a queue while we are generating a new dma conf. The other is a corner case that was notice while stressing the driver and turning down the interface while there was some traffic. (this is a follow-up of a simpler patch that wanted to add the same feature. It was suggested to first try to check if it was possible to apply the new configuration. Posting as RFC as it does major rework for the new concept of DMA conf) ==================== Link: https://lore.kernel.org/r/20220723142933.16030-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| * net: ethernet: stmicro: stmmac: permit MTU change with interface upChristian Marangi2022-07-251-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | Remove the limitation where the interface needs to be down to change MTU by releasing and opening the stmmac driver to set the new MTU. Also call the set_filter function to correctly init the port. This permits to remove the EBUSY error while the ethernet port is running permitting a correct MTU change if for example a DSA request a MTU change for a switch CPU port. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| * net: ethernet: stmicro: stmmac: generate stmmac dma conf before openChristian Marangi2022-07-251-173/+289
| | | | | | | | | | | | | | | | | | | | Rework the driver to generate the stmmac dma_conf before stmmac_open. This permits a function to first check if it's possible to allocate a new dma_config and then pass it directly to __stmmac_open and "open" the interface with the new configuration. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| * net: ethernet: stmicro: stmmac: move dma conf to dedicated structChristian Marangi2022-07-257-163/+172
| | | | | | | | | | | | | | | | | | Move dma buf conf to dedicated struct. This in preparation for code rework that will permit to allocate separate dma_conf without affecting the priv struct. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| * net: ethernet: stmicro: stmmac: first disable all queues and disconnect in ↵Christian Marangi2022-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | release Disable all queues and disconnect before tx_disable in stmmac_release to prevent a corner case where packet may be still queued at the same time tx_disable is called resulting in kernel panic if some packet still has to be processed. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| * net: ethernet: stmicro: stmmac: move queue reset to dedicated functionsChristian Marangi2022-07-251-28/+31
|/ | | | | | | | | | Move queue reset to dedicated functions. This aside from a simple cleanup is also required to allocate a dma conf without resetting the tx queue while the device is temporarily detached as now the reset is not part of the dma init function and can be done later in the code flow. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: delete extra space and tab in blank lineWilliam Dean2022-07-252-2/+2
| | | | | | | | | delete extra space and tab in blank line, there is no functional change. Reported-by: Hacash Robot <hacashRobot@santino.com> Signed-off-by: William Dean <williamsukatube@gmail.com> Link: https://lore.kernel.org/r/20220723073222.2961602-1-williamsukatube@163.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* Merge tag 'wireless-next-2022-07-25' of ↵Jakub Kicinski2022-07-25179-6856/+9151
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v5.20 Third set of patches for v5.20. MLO work continues and we have a lot of stack changes due to that, including driver API changes. Not much driver patches except on mt76. Major changes: cfg80211/mac80211 - more prepartion for Wi-Fi 7 Multi-Link Operation (MLO) support, works with one link now - align with IEEE Draft P802.11be_D2.0 - hardware timestamps for receive and transmit mt76 - preparation for new chipset support - ACPI SAR support * tag 'wireless-next-2022-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (254 commits) wifi: mac80211: fix link data leak wifi: mac80211: mlme: fix disassoc with MLO wifi: mac80211: add macros to loop over active links wifi: mac80211: remove erroneous sband/link validation wifi: mac80211: mlme: transmit assoc frame with address translation wifi: mac80211: verify link addresses are different wifi: mac80211: rx: track link in RX data wifi: mac80211: optionally implement MLO multicast TX wifi: mac80211: expand ieee80211_mgmt_tx() for MLO wifi: nl80211: add MLO link ID to the NL80211_CMD_FRAME TX API wifi: mac80211: report link ID to cfg80211 on mgmt RX wifi: cfg80211: report link ID in NL80211_CMD_FRAME wifi: mac80211: add hardware timestamps for RX and TX wifi: cfg80211: add hardware timestamps to frame RX info wifi: cfg80211/nl80211: move rx management data into a struct wifi: cfg80211: add a function for reporting TX status with hardware timestamps wifi: nl80211: add RX and TX timestamp attributes wifi: ieee80211: add helper functions for detecting TM/FTM frames wifi: mac80211_hwsim: handle links for wmediumd/virtio wifi: mac80211: sta_info: fix link_sta insertion ... ==================== Link: https://lore.kernel.org/r/20220725174547.EA465C341C6@smtp.kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| * Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo2022-07-2510-19/+14
| |\ | | | | | | | | | ath.git patches for v5.20. One fix and rest minor cleanup.
| | * wifi: wcn36xx: fix repeated words in commentsJilin Yuan2022-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Delete the redundant word 'the'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220709124356.52543-1-yuanjilin@cdjrlc.com
| | * wifi: wil6210: fix repeated words in commentsJilin Yuan2022-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Delete the redundant word 'for'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220709132137.12442-1-yuanjilin@cdjrlc.com
| | * wifi: ath: fix repeated words in commentsJilin Yuan2022-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Delete the redundant word 'have'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220709124036.49674-1-yuanjilin@cdjrlc.com
| | * wifi: ath6kl: fix repeated words in commentsJilin Yuan2022-07-183-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Delete the redundant words 'the' and 'of'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220709123208.41736-1-yuanjilin@cdjrlc.com
| | * wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi()Dan Carpenter2022-07-181-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The simple_write_to_buffer() function will succeed if even a single byte is initialized. However, we need to initialize the whole buffer to prevent information leaks. Just use memdup_user(). Fixes: ff974e408334 ("wil6210: debugfs interface to send raw WMI command") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/Ysg14NdKAZF/hcNG@kili
| | * wifi: ath5k: fix repeated words in commentsJilin Yuan2022-07-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Delete the redundant word 'don't' and 'but'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220708154929.19199-1-yuanjilin@cdjrlc.com
| | * wifi: ath11k: mac: fix long lineKalle Valo2022-07-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent mac80211 API changes introduced a long line warning in ath11k: drivers/net/wireless/ath/ath11k/mac.c:1404: line length of 92 exceeds 90 columns Compile tested only. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220708170052.28615-1-kvalo@kernel.org
| * | wifi: mac80211: fix link data leakJohannes Berg2022-07-221-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | During the code reshuffling, I accidentally set this to NULL before using it, fix that to fix the link data leak. Fixes: d3e2439b0f33 ("wifi: mac80211: fix link manipulation") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: mlme: fix disassoc with MLOJohannes Berg2022-07-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In MLO we shouldn't call ieee80211_bss_info_change_notify(), call that only (for backward compatibility) without MLO, and otherwise ieee80211_vif_cfg_change_notify(). Similarly, ieee80211_reset_erp_info() only applies to the current link, and in MLO we assume the driver doesn't really need that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: add macros to loop over active linksGregory Greenman2022-07-221-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Add a preliminary version which will be updated later to loop over vif's and sta's active links. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: remove erroneous sband/link validationJohannes Berg2022-07-221-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In sta_apply_parameters(), we really no longer need to check that the link or sband exists, in fact, that's harmful if link 0 doesn't exist, since then this will fail. Just remove this check, it was added for validation of the sband where used, but it's not used here, it's now only used in sta_link_apply_parameters() which has an own lookup and check. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: mlme: transmit assoc frame with address translationJohannes Berg2022-07-221-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To transmit the association frame to the right station and with address translation, use the correct addresses there and set up the AP address in the configuration earlier so it's applied during the transmit of auth/assoc frames. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: verify link addresses are differentJohannes Berg2022-07-221-4/+34
| | | | | | | | | | | | | | | | | | | | | When adding multiple links, verify that they all have different addresses. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: rx: track link in RX dataJohannes Berg2022-07-222-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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-225-11/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-226-25/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: nl80211: add MLO link ID to the NL80211_CMD_FRAME TX APIJohannes Berg2022-07-223-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow optionally specifying the link ID to transmit on, which can be done instead of the link frequency, on an MLD addressed frame. Both can also be omitted in which case the frame must be MLD addressed and link selection (and address translation) will be done on lower layers. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: report link ID to cfg80211 on mgmt RXJohannes Berg2022-07-221-1/+3
| | | | | | | | | | | | | | | | | | | | | For frames received on an MLD, report the link ID to userspace. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: cfg80211: report link ID in NL80211_CMD_FRAMEJohannes Berg2022-07-222-0/+7
| | | | | | | | | | | | | | | | | | | | | If given by the underlying driver, report the link ID for MLO in NL80211_CMD_FRAME. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: add hardware timestamps for RX and TXAvraham Stern2022-07-223-19/+77
| | | | | | | | | | | | | | | | | | | | | | | | When the low level driver reports hardware timestamps for frame TX status or frame RX, pass the timestamps to cfg80211. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: cfg80211: add hardware timestamps to frame RX infoAvraham Stern2022-07-222-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add hardware timestamps to management frame RX info. This shall be used by drivers that support hardware timestamping for Timing measurement and Fine timing measurement action frames RX. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: cfg80211/nl80211: move rx management data into a structAvraham Stern2022-07-225-32/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | The functions for reporting rx management take many arguments. Collect all the arguments into a struct, which also make it easier to add more arguments if needed. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: cfg80211: add a function for reporting TX status with hardware timestampsAvraham Stern2022-07-222-16/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function for reporting TX status with hardware timestamps. This function shall be used for reporting the TX status of Timing measurement and Fine timing measurement action frames by devices that support reporting hardware timestamps. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: nl80211: add RX and TX timestamp attributesAvraham Stern2022-07-221-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add attributes for reporting hardware timestamps for management frames RX and TX. These attributes will be used for reporting hardware timestamps for Timing measurement and Fine Timing Measurement action frames, which will allow userspace applications to measure the path delay between devices and sync clocks. For TX, these attributes are used for reporting the frame RX time and the ack TX time. For TX, they are used for reporting the frame TX time and the ack RX time. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: ieee80211: add helper functions for detecting TM/FTM framesAvraham Stern2022-07-221-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | Add helper functions for detection timing measurement and fine timing measurement frames. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211_hwsim: handle links for wmediumd/virtioJohannes Berg2022-07-221-5/+35
| | | | | | | | | | | | | | | | | | | | | For wmediumd/virtio, handle both the RX channel for links, as well as the link addresses when links are added/removed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211: sta_info: fix link_sta insertionJohannes Berg2022-07-221-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When inserting a link STA, make sure it doesn't exist first and add lockdep assertions that we cannot modify the hash table without holding the sta_mtx, so this check is really correct. Also return without hashing if the driver failed, and warn if the hashing fails, which shouldn't happen due to the check described above. Fixes: cb71f1d136a6 ("wifi: mac80211: add sta link addition/removal") Fixes: ba6ddab94fc6 ("wifi: mac80211: maintain link-sta hash table") Signed-off-by: Johannes Berg <johannes.berg@intel.com>