qcacld-3.0: update the ml client parameters as per cfg80211_new_sta

In case of SAP, update the cfg80211_new_sta with the support for the
ML STA client with below info:

1) MLO link ID of the AP
2) Station's MLD address
3) (Re)Association Response IEs sent to the station

Change-Id: I5647d5bcfac43255bc0ae1d9f3b7a1b563ef5250
CRs-Fixed: 3485476
This commit is contained in:
Arun Kumar Khandavalli 2023-05-08 15:02:21 +05:30 committed by Rahul Choudhary
parent efd112bf15
commit 8abc6e1ae3
3 changed files with 89 additions and 1 deletions

6
Kbuild
View File

@ -3296,12 +3296,16 @@ ifeq ($(findstring yes, $(found)), yes)
ccflags-y += -DCFG80211_EXTERNAL_AUTH_MLO_SUPPORT ccflags-y += -DCFG80211_EXTERNAL_AUTH_MLO_SUPPORT
endif endif
found = $(shell if grep -qF "NL80211_EXT_FEATURE_SECURE_NAN" $(srctree)/include/uapi/linux/nl80211.h; then echo "yes"; else echo "no"; fi;) found = $(shell if grep -qF "NL80211_EXT_FEATURE_SECURE_NAN" $(srctree)/include/uapi/linux/nl80211.h; then echo "yes"; else echo "no"; fi;)
ifeq ($(findstring yes, $(found)), yes) ifeq ($(findstring yes, $(found)), yes)
ccflags-y += -DCFG80211_EXT_FEATURE_SECURE_NAN ccflags-y += -DCFG80211_EXT_FEATURE_SECURE_NAN
endif endif
found = $(shell if grep -qF "bool mlo_params_valid;" $(srctree)/include/net/cfg80211.h; then echo "yes" ;else echo "no" ;fi;)
ifeq ($(findstring yes, $(found)), yes)
ccflags-y += -DCFG80211_MLD_AP_STA_CONNECT_UPSTREAM_SUPPORT
endif
ifeq (qca_cld3, $(WLAN_WEAR_CHIPSET)) ifeq (qca_cld3, $(WLAN_WEAR_CHIPSET))
ccflags-y += -DWLAN_WEAR_CHIPSET ccflags-y += -DWLAN_WEAR_CHIPSET
endif endif

View File

@ -26116,6 +26116,44 @@ hdd_ml_sap_owe_fill_ml_info(struct hdd_adapter *adapter,
qdf_mem_copy(&owe_info->peer_mld_addr[0], peer_mld_addr, ETH_ALEN); qdf_mem_copy(&owe_info->peer_mld_addr[0], peer_mld_addr, ETH_ALEN);
wlan_objmgr_peer_release_ref(peer, WLAN_OSIF_ID); wlan_objmgr_peer_release_ref(peer, WLAN_OSIF_ID);
} }
#elif defined(CFG80211_MLD_AP_STA_CONNECT_UPSTREAM_SUPPORT)
static void
hdd_ml_sap_owe_fill_ml_info(struct hdd_adapter *adapter,
struct cfg80211_update_owe_info *owe_info,
uint8_t *peer_mac)
{
bool is_mlo_vdev;
struct wlan_objmgr_peer *peer;
struct wlan_objmgr_vdev *vdev;
uint8_t *peer_mld_addr;
vdev = hdd_objmgr_get_vdev_by_user(adapter->deflink,
WLAN_HDD_ID_OBJ_MGR);
if (!vdev)
return;
is_mlo_vdev = wlan_vdev_mlme_is_mlo_vdev(vdev);
if (!is_mlo_vdev) {
owe_info->assoc_link_id = -1;
hdd_objmgr_put_vdev_by_user(vdev, WLAN_HDD_ID_OBJ_MGR);
return;
}
owe_info->assoc_link_id = wlan_vdev_get_link_id(vdev);
hdd_objmgr_put_vdev_by_user(vdev, WLAN_HDD_ID_OBJ_MGR);
peer = wlan_objmgr_get_peer_by_mac(adapter->hdd_ctx->psoc,
peer_mac, WLAN_HDD_ID_OBJ_MGR);
if (!peer) {
hdd_err("Peer not found with MAC " QDF_MAC_ADDR_FMT,
QDF_MAC_ADDR_REF(peer_mac));
return;
}
peer_mld_addr = wlan_peer_mlme_get_mldaddr(peer);
qdf_mem_copy(&owe_info->peer_mld_addr[0], peer_mld_addr, ETH_ALEN);
wlan_objmgr_peer_release_ref(peer, WLAN_HDD_ID_OBJ_MGR);
}
#else #else
static void static void
hdd_ml_sap_owe_fill_ml_info(struct hdd_adapter *adapter, hdd_ml_sap_owe_fill_ml_info(struct hdd_adapter *adapter,

View File

@ -1930,6 +1930,52 @@ hdd_hostapd_sap_fill_peer_ml_info(struct hdd_adapter *adapter,
&sta_info->assoc_resp_ies_len); &sta_info->assoc_resp_ies_len);
wlan_objmgr_peer_release_ref(sta_peer, WLAN_OSIF_ID); wlan_objmgr_peer_release_ref(sta_peer, WLAN_OSIF_ID);
} }
#elif defined(CFG80211_MLD_AP_STA_CONNECT_UPSTREAM_SUPPORT)
static void
hdd_hostapd_sap_fill_peer_ml_info(struct hdd_adapter *adapter,
struct station_info *sta_info,
uint8_t *peer_mac)
{
bool is_mlo_vdev;
QDF_STATUS status;
struct wlan_objmgr_vdev *vdev;
struct wlan_objmgr_peer *sta_peer;
vdev = hdd_objmgr_get_vdev_by_user(adapter->deflink,
WLAN_HDD_ID_OBJ_MGR);
if (!vdev) {
hdd_err("Failed to get link id, VDEV NULL");
return;
}
is_mlo_vdev = wlan_vdev_mlme_is_mlo_vdev(vdev);
if (!is_mlo_vdev) {
sta_info->assoc_link_id = -1;
hdd_objmgr_put_vdev_by_user(vdev, WLAN_HDD_ID_OBJ_MGR);
return;
}
sta_info->assoc_link_id = wlan_vdev_get_link_id(vdev);
hdd_objmgr_put_vdev_by_user(vdev, WLAN_HDD_ID_OBJ_MGR);
sta_peer = wlan_objmgr_get_peer_by_mac(adapter->hdd_ctx->psoc,
peer_mac, WLAN_HDD_ID_OBJ_MGR);
if (!sta_peer) {
hdd_err("Peer not found with MAC " QDF_MAC_ADDR_FMT,
QDF_MAC_ADDR_REF(peer_mac));
return;
}
qdf_mem_copy(sta_info->mld_addr, wlan_peer_mlme_get_mldaddr(sta_peer),
ETH_ALEN);
status = ucfg_mlme_peer_get_assoc_rsp_ies(
sta_peer,
&sta_info->assoc_resp_ies,
&sta_info->assoc_resp_ies_len);
wlan_objmgr_peer_release_ref(sta_peer, WLAN_HDD_ID_OBJ_MGR);
sta_info->mlo_params_valid = true;
}
#else #else
static void static void
hdd_hostapd_sap_fill_peer_ml_info(struct hdd_adapter *adapter, hdd_hostapd_sap_fill_peer_ml_info(struct hdd_adapter *adapter,