From ccb39e047056dd363935fad4d2f2cabca9385952 Mon Sep 17 00:00:00 2001 From: Jia Ding Date: Fri, 19 May 2023 08:49:42 +0800 Subject: [PATCH] qcacld-3.0: Provide MLD MAC of connected clients to IPA For MLO connection, mld addr of connected peer is used for data packets over the air. Hence same mld addr needs to be notified to IPA so that offload path can be taken for connected peer with MLO connection. Currently for connected ref-clients, link address is provided to IPA driver and hence only link MAC address are installed to IPA HW. With MLD MAC address being used in ethernet header, MAC address mismatch occurs and IPA offload function is not working. Fix is to provide MLD MAC address of connected clients to IPA if SAP vdev is MLO and MLD address are not 0. Change-Id: Ie739b0c0c569bda03497eae3485d16917e9bdd84 CRs-Fixed: 3497200 --- core/hdd/src/wlan_hdd_hostapd.c | 11 ++++++++++- core/hdd/src/wlan_hdd_softap_tx_rx.c | 11 ++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 194d7c2caa..fa7f33a3f3 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2560,12 +2560,21 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event, sta_id = event->staId; if (ucfg_ipa_is_enabled()) { + vdev = adapter->deflink->vdev; + + if (wlan_vdev_mlme_is_mlo_vdev(vdev) && + !qdf_is_macaddr_zero(&event->sta_mld)) + qdf_copy_macaddr(&sta_addr, &event->sta_mld); + else + qdf_copy_macaddr(&sta_addr, &event->staMac); + status = ucfg_ipa_wlan_evt(hdd_ctx->pdev, adapter->dev, adapter->device_mode, adapter->deflink->vdev_id, WLAN_IPA_CLIENT_CONNECT_EX, - event->staMac.bytes, + (const uint8_t *) + &sta_addr.bytes[0], false); if (status) hdd_err("WLAN_CLIENT_CONNECT_EX event failed"); diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index f3801265aa..0540818c0a 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -480,10 +480,15 @@ QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter, * If the address is a broadcast address then the CDP layers expects * the self mac address of the adapter. */ - if (QDF_IS_ADDR_BROADCAST(sta->sta_mac.bytes)) + if (QDF_IS_ADDR_BROADCAST(sta->sta_mac.bytes)) { mac_addr = &adapter->mac_addr; - else - mac_addr = &sta->sta_mac; + } else { + if (wlan_vdev_mlme_is_mlo_vdev(adapter->deflink->vdev) && + !qdf_is_macaddr_zero(&sta->mld_addr)) + mac_addr = &sta->mld_addr; + else + mac_addr = &sta->sta_mac; + } if (ucfg_ipa_is_enabled()) { if (ucfg_ipa_wlan_evt(hdd_ctx->pdev, adapter->dev,