qcacmn: Cleanup STA link VDEV connect API
Remove unused argument in mlo_send_link_connect() and fetch MLD address from connect response to fill in partner link connect request. Change-Id: Iad6089c39d14115774cf1456341965cad8c0110d CRs-Fixed: 3714999
This commit is contained in:

committed by
Ravindra Konda

orang tua
56b867e257
melakukan
a8b3fe0035
@@ -752,7 +752,6 @@ QDF_STATUS mlo_mgr_link_switch_start_connect(struct wlan_objmgr_vdev *vdev)
|
||||
struct mlo_link_info *mlo_link_info;
|
||||
uint8_t *vdev_mac;
|
||||
struct wlan_mlo_sta *sta_ctx;
|
||||
struct qdf_mac_addr mld_addr;
|
||||
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
||||
struct wlan_mlo_link_switch_req *req = &mlo_dev_ctx->link_ctx->last_req;
|
||||
struct wlan_objmgr_vdev *assoc_vdev = wlan_mlo_get_assoc_link_vdev(vdev);
|
||||
@@ -790,20 +789,18 @@ QDF_STATUS mlo_mgr_link_switch_start_connect(struct wlan_objmgr_vdev *vdev)
|
||||
}
|
||||
copied_conn_req_lock_release(sta_ctx);
|
||||
|
||||
status = wlan_vdev_get_bss_peer_mld_mac(assoc_vdev, &mld_addr);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
mlo_debug("Get MLD addr failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
conn_req.vdev_id = wlan_vdev_get_id(vdev);
|
||||
conn_req.source = CM_MLO_LINK_SWITCH_CONNECT;
|
||||
wlan_vdev_set_link_id(vdev, req->new_ieee_link_id);
|
||||
|
||||
qdf_copy_macaddr(&conn_req.bssid, &mlo_link_info->ap_link_addr);
|
||||
qdf_copy_macaddr(&conn_req.mld_addr, &mld_addr);
|
||||
wlan_vdev_mlme_get_ssid(assoc_vdev, conn_req.ssid.ssid,
|
||||
&conn_req.ssid.length);
|
||||
status = wlan_vdev_get_bss_peer_mld_mac(assoc_vdev, &conn_req.mld_addr);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
mlo_debug("Get MLD addr failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
conn_req.crypto.auth_type = 0;
|
||||
conn_req.ml_parnter_info = sta_ctx->ml_partner_info;
|
||||
|
@@ -891,26 +891,21 @@ mlo_prepare_and_send_connect(struct wlan_objmgr_vdev *vdev,
|
||||
* mlo_send_link_connect- Create/Issue the connection on secondary link
|
||||
*
|
||||
* @vdev: vdev pointer
|
||||
* @mlo_dev_ctx: ml dev context
|
||||
* @assoc_rsp: assoc response
|
||||
* @ml_parnter_info: ml partner link info
|
||||
* @resp: Connection resp of assoc VDEV
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
|
||||
static void
|
||||
mlo_send_link_connect(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_mlo_dev_context *mlo_dev_ctx,
|
||||
struct element_info *assoc_rsp,
|
||||
struct mlo_partner_info *ml_parnter_info)
|
||||
static void mlo_send_link_connect(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_cm_connect_resp *resp)
|
||||
{
|
||||
/* Create the secondary interface, Send keys if the last link */
|
||||
QDF_STATUS status;
|
||||
uint8_t i, partner_idx = 0;
|
||||
struct wlan_ssid ssid = {0};
|
||||
struct wlan_objmgr_vdev *wlan_vdev_list[WLAN_UMAC_MLO_MAX_VDEVS];
|
||||
uint16_t vdev_count = 0;
|
||||
struct qdf_mac_addr mld_addr;
|
||||
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
||||
struct mlo_partner_info *ml_parnter_info = &resp->ml_parnter_info;
|
||||
|
||||
mlo_debug("Sending link connect on partner interface");
|
||||
wlan_vdev_mlme_get_ssid(
|
||||
@@ -925,10 +920,6 @@ mlo_send_link_connect(struct wlan_objmgr_vdev *vdev,
|
||||
if(wlan_vdev_mlme_is_mlo_link_vdev(vdev))
|
||||
return;
|
||||
|
||||
status = wlan_vdev_get_bss_peer_mld_mac(vdev, &mld_addr);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return;
|
||||
|
||||
mlo_sta_get_vdev_list(vdev, &vdev_count, wlan_vdev_list);
|
||||
for (i = 0; i < vdev_count; i++) {
|
||||
if (wlan_vdev_list[i] == vdev) {
|
||||
@@ -947,22 +938,21 @@ mlo_send_link_connect(struct wlan_objmgr_vdev *vdev,
|
||||
wlan_vdev_list[i],
|
||||
*ml_parnter_info,
|
||||
ml_parnter_info->partner_link_info[partner_idx],
|
||||
ssid, &mld_addr);
|
||||
ssid, &resp->mld_addr);
|
||||
mlo_update_connected_links(wlan_vdev_list[i], 1);
|
||||
partner_idx++;
|
||||
mlo_release_vdev_ref(wlan_vdev_list[i]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void
|
||||
mlo_send_link_connect(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_mlo_dev_context *mlo_dev_ctx,
|
||||
struct element_info *assoc_rsp,
|
||||
struct mlo_partner_info *ml_parnter_info)
|
||||
static void mlo_send_link_connect(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_cm_connect_resp *resp)
|
||||
{
|
||||
struct wlan_ssid ssid = {0};
|
||||
uint8_t i = 0;
|
||||
uint8_t j = 0;
|
||||
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
|
||||
struct mlo_partner_info *ml_parnter_info = &resp->ml_parnter_info;
|
||||
|
||||
if (!ml_parnter_info->num_partner_links) {
|
||||
mlo_err("No partner info in connect resp");
|
||||
@@ -1315,9 +1305,7 @@ void mlo_sta_link_connect_notify(struct wlan_objmgr_vdev *vdev,
|
||||
mlo_update_connected_links_bmap(mlo_dev_ctx,
|
||||
rsp->ml_parnter_info);
|
||||
}
|
||||
mlo_send_link_connect(vdev, mlo_dev_ctx,
|
||||
&rsp->connect_ies.assoc_rsp,
|
||||
&rsp->ml_parnter_info);
|
||||
mlo_send_link_connect(vdev, rsp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user