From 5856373554eb21e54e61b2fc807b73034f77a955 Mon Sep 17 00:00:00 2001 From: Krunalsinh Padhar Date: Wed, 16 Aug 2023 12:29:17 -0700 Subject: [PATCH] Extend QCA vendor command to include more parameters for netdev events Extend enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event to add MLD MAC address, the number of links, and link info. Link info contains ifindex and MAC address of each link of a non-AP MLD that was negotiated in ML association. Signed-off-by: Jouni Malinen --- src/common/qca-vendor.h | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 3773368c4..7fbae2c31 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -920,7 +920,9 @@ enum qca_radiotap_vendor_ids { * In some implementations, MLO has multiple netdevs out of which one * netdev is designated as primary to provide a unified interface to the * bridge. In those implementations this event is sent on every MLO peer - * connection. + * connection. User applications on an AP MLD will use this event to get + * info for all the links from non-AP MLD that were negotiated to be used + * for the ML association. * * The attributes used with this event are defined in * enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event. @@ -15110,12 +15112,25 @@ enum qca_wlan_vendor_attr_sr { * MLD MAC address of the peer. * @QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_PRIM_IFINDEX: u32 attribute, * used to pass ifindex of the primary netdev. + * @QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_MLD_IFINDEX: u32 attribute, + * used to pass ifindex of the MLD netdev. + * @QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_NUM_LINKS: u8 attribute, + * used to indicate the number of links that the non-AP MLD negotiated to be + * used in the ML connection. + * @QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_LINK_INFO: Nested + * attribute, contains information regarding links of the non-AP MLD. + * User applications need to know all the links of a non-AP MLD that are + * participating in the ML association. The possible attributes inside this + * attribute are defined in enum qca_wlan_vendor_attr_mlo_link_info. */ enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event { QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_INVALID = 0, QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_MACADDR = 1, QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_MLD_MAC_ADDR = 2, QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_PRIM_IFINDEX = 3, + QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_MLD_IFINDEX = 4, + QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_NUM_LINKS = 5, + QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_LINK_INFO = 6, /* keep last */ QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_AFTER_LAST, @@ -15123,6 +15138,27 @@ enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event { QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_AFTER_LAST - 1, }; +/** + * enum qca_wlan_vendor_attr_mlo_link_info - Defines attributes for + * non-AP MLD link parameters used by the attribute + * %QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_LINK_INFO. + * + * @QCA_WLAN_VENDOR_ATTR_MLO_LINK_INFO_IFINDEX: u32 attribute, used + * to pass the netdev ifindex of the non-AP MLD link. + * @QCA_WLAN_VENDOR_ATTR_MLO_LINK_INFO_MACADDR: 6 byte MAC address of + * the non-AP MLD link. + */ +enum qca_wlan_vendor_attr_mlo_link_info { + QCA_WLAN_VENDOR_ATTR_MLO_LINK_INFO_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_MLO_LINK_INFO_IFINDEX = 1, + QCA_WLAN_VENDOR_ATTR_MLO_LINK_INFO_MACADDR = 2, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_MLO_LINK_INFO_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_MLO_LINK_INFO_MAX = + QCA_WLAN_VENDOR_ATTR_MLO_LINK_INFO_AFTER_LAST - 1, +}; + /** * enum qca_wlan_vendor_attr_afc_freq_psd_info: This enum is used with * nested attributes QCA_WLAN_VENDOR_ATTR_AFC_RESP_FREQ_PSD_INFO and