qcacmn: send ml_partner info during assoc vdev peer assoc cmd
Send ml_partner info during assoc vdev peer assoc cmd Change-Id: Icd69a513dbaeed7ca334a8627fb4b8a9b28d01c3 CRs-Fixed: 3530674
This commit is contained in:

committed by
Rahul Choudhary

parent
39fabd2c13
commit
2799299d9e
@@ -182,6 +182,20 @@ void mlo_mgr_update_link_info_reset(struct wlan_mlo_dev_context *ml_dev);
|
|||||||
void mlo_mgr_update_ap_link_info(struct wlan_objmgr_vdev *vdev, uint8_t link_id,
|
void mlo_mgr_update_ap_link_info(struct wlan_objmgr_vdev *vdev, uint8_t link_id,
|
||||||
uint8_t *ap_link_addr,
|
uint8_t *ap_link_addr,
|
||||||
struct wlan_channel channel);
|
struct wlan_channel channel);
|
||||||
|
/**
|
||||||
|
* mlo_mgr_update_ap_channel_info() - Update AP channel information
|
||||||
|
* @vdev: Object Manager vdev
|
||||||
|
* @link_id: Link id of the AP MLD link
|
||||||
|
* @ap_link_addr: AP link addresses
|
||||||
|
* @channel: wlan channel information of the link
|
||||||
|
*
|
||||||
|
* Update AP channel information for each link of AP MLD
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void mlo_mgr_update_ap_channel_info(struct wlan_objmgr_vdev *vdev,
|
||||||
|
uint8_t link_id,
|
||||||
|
uint8_t *ap_link_addr,
|
||||||
|
struct wlan_channel channel);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mlo_mgr_get_ap_link_by_link_id() - Get mlo link info from link id
|
* mlo_mgr_get_ap_link_by_link_id() - Get mlo link info from link id
|
||||||
|
@@ -41,8 +41,8 @@ void mlo_mgr_update_link_info_mac_addr(struct wlan_objmgr_vdev *vdev,
|
|||||||
QDF_MAC_ADDR_SIZE);
|
QDF_MAC_ADDR_SIZE);
|
||||||
|
|
||||||
link_info->vdev_id = link_mac_info->vdev_id;
|
link_info->vdev_id = link_mac_info->vdev_id;
|
||||||
mlo_debug("link_info_iter:%d vdev_id %d "QDF_MAC_ADDR_FMT,
|
mlo_debug("Update STA Link info for vdev_id %d, link_addr:" QDF_MAC_ADDR_FMT,
|
||||||
link_info_iter, link_info->vdev_id,
|
link_info->vdev_id,
|
||||||
QDF_MAC_ADDR_REF(link_info->link_addr.bytes));
|
QDF_MAC_ADDR_REF(link_info->link_addr.bytes));
|
||||||
link_mac_info++;
|
link_mac_info++;
|
||||||
link_info++;
|
link_info++;
|
||||||
@@ -74,6 +74,36 @@ void mlo_mgr_update_ap_link_info(struct wlan_objmgr_vdev *vdev, uint8_t link_id,
|
|||||||
qdf_mem_copy(&link_info->ap_link_addr, ap_link_addr, QDF_MAC_ADDR_SIZE);
|
qdf_mem_copy(&link_info->ap_link_addr, ap_link_addr, QDF_MAC_ADDR_SIZE);
|
||||||
qdf_mem_copy(link_info->link_chan_info, &channel, sizeof(channel));
|
qdf_mem_copy(link_info->link_chan_info, &channel, sizeof(channel));
|
||||||
link_info->link_id = link_id;
|
link_info->link_id = link_id;
|
||||||
|
|
||||||
|
mlo_debug("Update AP Link info for link_id: %d, vdev_id:%d, link_addr:" QDF_MAC_ADDR_FMT,
|
||||||
|
link_info->link_id, link_info->vdev_id,
|
||||||
|
QDF_MAC_ADDR_REF(link_info->ap_link_addr.bytes));
|
||||||
|
}
|
||||||
|
|
||||||
|
void mlo_mgr_update_ap_channel_info(struct wlan_objmgr_vdev *vdev, uint8_t link_id,
|
||||||
|
uint8_t *ap_link_addr,
|
||||||
|
struct wlan_channel channel)
|
||||||
|
{
|
||||||
|
struct mlo_link_info *link_info;
|
||||||
|
|
||||||
|
if (!vdev || !vdev->mlo_dev_ctx || !ap_link_addr)
|
||||||
|
return;
|
||||||
|
|
||||||
|
link_info = mlo_mgr_get_ap_link_by_link_id(vdev, link_id);
|
||||||
|
if (!link_info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
qdf_mem_copy(link_info->link_chan_info, &channel,
|
||||||
|
sizeof(*link_info->link_chan_info));
|
||||||
|
|
||||||
|
mlo_debug("Update AP Channel info link_id: %d, vdev_id:%d, link_addr:" QDF_MAC_ADDR_FMT,
|
||||||
|
link_info->link_id, link_info->vdev_id,
|
||||||
|
QDF_MAC_ADDR_REF(link_info->ap_link_addr.bytes));
|
||||||
|
mlo_debug("Ch_freq: %d, freq1: %d, freq2: %d phy_mode: %d",
|
||||||
|
link_info->link_chan_info->ch_freq,
|
||||||
|
link_info->link_chan_info->ch_cfreq1,
|
||||||
|
link_info->link_chan_info->ch_cfreq2,
|
||||||
|
link_info->link_chan_info->ch_phymode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlo_mgr_update_link_info_reset(struct wlan_mlo_dev_context *ml_dev)
|
void mlo_mgr_update_link_info_reset(struct wlan_mlo_dev_context *ml_dev)
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
#ifndef ENABLE_HOST_TO_TARGET_CONVERSION
|
#ifndef ENABLE_HOST_TO_TARGET_CONVERSION
|
||||||
#include <wmi_unified.h>
|
#include <wmi_unified.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <wlan_objmgr_vdev_obj.h>
|
||||||
|
|
||||||
#define MAC_MAX_KEY_LENGTH 32
|
#define MAC_MAX_KEY_LENGTH 32
|
||||||
#define MAC_PN_LENGTH 8
|
#define MAC_PN_LENGTH 8
|
||||||
@@ -1235,6 +1236,10 @@ struct wmi_host_link_state_params {
|
|||||||
* @max_num_simultaneous_links: Max number of simultaneous links as per
|
* @max_num_simultaneous_links: Max number of simultaneous links as per
|
||||||
* MLD Capability for ML peer
|
* MLD Capability for ML peer
|
||||||
* @nstr_indication_bitmap: NSTR indication bitmap
|
* @nstr_indication_bitmap: NSTR indication bitmap
|
||||||
|
* @vdev_id: ID of the vdev object
|
||||||
|
* @bssid: AP link address
|
||||||
|
* @chan: Wlan channel information
|
||||||
|
* @mac_addr: Self mac addresses
|
||||||
*/
|
*/
|
||||||
struct peer_assoc_mlo_params {
|
struct peer_assoc_mlo_params {
|
||||||
uint32_t mlo_enabled:1,
|
uint32_t mlo_enabled:1,
|
||||||
@@ -1262,6 +1267,10 @@ struct peer_assoc_mlo_params {
|
|||||||
uint16_t medium_sync_max_txop_num;
|
uint16_t medium_sync_max_txop_num;
|
||||||
uint16_t max_num_simultaneous_links;
|
uint16_t max_num_simultaneous_links;
|
||||||
uint32_t nstr_indication_bitmap;
|
uint32_t nstr_indication_bitmap;
|
||||||
|
uint32_t vdev_id;
|
||||||
|
struct qdf_mac_addr bssid;
|
||||||
|
struct wlan_channel chan;
|
||||||
|
struct qdf_mac_addr mac_addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1280,6 +1289,10 @@ struct peer_assoc_mlo_params {
|
|||||||
* @msd_cap_support: indicate if MSD supported
|
* @msd_cap_support: indicate if MSD supported
|
||||||
* @unused: spare bits
|
* @unused: spare bits
|
||||||
* @logical_link_index: Unique index for links of the mlo. Starts with Zero
|
* @logical_link_index: Unique index for links of the mlo. Starts with Zero
|
||||||
|
* @link_id: AP Link Id
|
||||||
|
* @bssid: AP link address
|
||||||
|
* @chan: Wlan channel information
|
||||||
|
* @mac_addr: Self mac addresses
|
||||||
*/
|
*/
|
||||||
struct ml_partner_info {
|
struct ml_partner_info {
|
||||||
uint32_t vdev_id;
|
uint32_t vdev_id;
|
||||||
@@ -1295,6 +1308,10 @@ struct ml_partner_info {
|
|||||||
msd_cap_support:1,
|
msd_cap_support:1,
|
||||||
unused:23;
|
unused:23;
|
||||||
uint32_t logical_link_index;
|
uint32_t logical_link_index;
|
||||||
|
uint32_t link_id;
|
||||||
|
struct qdf_mac_addr bssid;
|
||||||
|
struct wlan_channel chan;
|
||||||
|
struct qdf_mac_addr mac_addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1382,6 +1399,7 @@ struct peer_assoc_ml_partner_links {
|
|||||||
* @ml_links: MLO partner links
|
* @ml_links: MLO partner links
|
||||||
* @qcn_node_flag: if node is QCN node
|
* @qcn_node_flag: if node is QCN node
|
||||||
* @mesh_node_flag: if node is 4 addr node
|
* @mesh_node_flag: if node is 4 addr node
|
||||||
|
* @is_assoc_vdev: true if assoc vdev
|
||||||
* @peer_dms_capable: is peer DMS capable
|
* @peer_dms_capable: is peer DMS capable
|
||||||
* @reserved: spare bits
|
* @reserved: spare bits
|
||||||
* @t2lm_params: TID-to-link mapping params
|
* @t2lm_params: TID-to-link mapping params
|
||||||
@@ -1470,6 +1488,7 @@ struct peer_assoc_params {
|
|||||||
struct peer_assoc_ml_partner_links ml_links;
|
struct peer_assoc_ml_partner_links ml_links;
|
||||||
bool qcn_node_flag;
|
bool qcn_node_flag;
|
||||||
bool mesh_node_flag;
|
bool mesh_node_flag;
|
||||||
|
bool is_assoc_vdev;
|
||||||
#endif
|
#endif
|
||||||
uint8_t peer_dms_capable:1,
|
uint8_t peer_dms_capable:1,
|
||||||
reserved:7;
|
reserved:7;
|
||||||
|
@@ -242,10 +242,14 @@ size_t peer_assoc_mlo_params_size(struct peer_assoc_params *req)
|
|||||||
{
|
{
|
||||||
size_t peer_assoc_mlo_size = sizeof(wmi_peer_assoc_mlo_params) +
|
size_t peer_assoc_mlo_size = sizeof(wmi_peer_assoc_mlo_params) +
|
||||||
WMI_TLV_HDR_SIZE +
|
WMI_TLV_HDR_SIZE +
|
||||||
(req->ml_links.num_links *
|
((req->ml_links.num_links) *
|
||||||
sizeof(wmi_peer_assoc_mlo_partner_link_params)) +
|
sizeof(wmi_peer_assoc_mlo_partner_link_params)) +
|
||||||
WMI_TLV_HDR_SIZE;
|
WMI_TLV_HDR_SIZE;
|
||||||
|
|
||||||
|
if (req->is_assoc_vdev)
|
||||||
|
peer_assoc_mlo_size = peer_assoc_mlo_size +
|
||||||
|
sizeof(wmi_peer_assoc_mlo_partner_link_params);
|
||||||
|
|
||||||
return peer_assoc_mlo_size;
|
return peer_assoc_mlo_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,6 +312,46 @@ uint8_t *peer_assoc_add_mlo_params(uint8_t *buf_ptr,
|
|||||||
return buf_ptr + sizeof(wmi_peer_assoc_mlo_params);
|
return buf_ptr + sizeof(wmi_peer_assoc_mlo_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void wmi_copy_chan_info(wmi_channel *dst_chan,
|
||||||
|
struct wlan_channel *src_chan)
|
||||||
|
{
|
||||||
|
dst_chan->mhz = src_chan->ch_freq;
|
||||||
|
dst_chan->band_center_freq1 = src_chan->ch_cfreq1;
|
||||||
|
dst_chan->band_center_freq2 = src_chan->ch_cfreq2;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
peer_assoc_update_assoc_link_info(uint8_t **buf_ptr,
|
||||||
|
struct peer_assoc_params *req)
|
||||||
|
{
|
||||||
|
wmi_peer_assoc_mlo_partner_link_params *ml_partner_link;
|
||||||
|
|
||||||
|
if (!req->is_assoc_vdev)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ml_partner_link = (wmi_peer_assoc_mlo_partner_link_params *)(*buf_ptr);
|
||||||
|
|
||||||
|
/* Fill Assoc link info */
|
||||||
|
WMITLV_SET_HDR(&ml_partner_link->tlv_header,
|
||||||
|
WMITLV_TAG_STRUC_wmi_peer_assoc_mlo_partner_link_params,
|
||||||
|
WMITLV_GET_STRUCT_TLVLEN(wmi_peer_assoc_mlo_partner_link_params));
|
||||||
|
ml_partner_link->vdev_id = req->mlo_params.vdev_id;
|
||||||
|
ml_partner_link->ieee_link_id = req->mlo_params.ieee_link_id;
|
||||||
|
WMI_CHAR_ARRAY_TO_MAC_ADDR(req->mlo_params.bssid.bytes,
|
||||||
|
&ml_partner_link->bss_id);
|
||||||
|
WMI_CHAR_ARRAY_TO_MAC_ADDR(req->mlo_params.mac_addr.bytes,
|
||||||
|
&ml_partner_link->self_mac);
|
||||||
|
wmi_copy_chan_info(&ml_partner_link->wmi_chan, &req->mlo_params.chan);
|
||||||
|
|
||||||
|
wmi_debug("Send Link info with link_id: %d vdev_id: %d AP link addr: "QDF_MAC_ADDR_FMT ", STA addr: "QDF_MAC_ADDR_FMT,
|
||||||
|
ml_partner_link->ieee_link_id, ml_partner_link->vdev_id,
|
||||||
|
QDF_MAC_ADDR_REF(req->mlo_params.bssid.bytes),
|
||||||
|
QDF_MAC_ADDR_REF(req->mlo_params.mac_addr.bytes));
|
||||||
|
|
||||||
|
ml_partner_link++;
|
||||||
|
*buf_ptr = (uint8_t *)ml_partner_link;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t *peer_assoc_add_ml_partner_links(uint8_t *buf_ptr,
|
uint8_t *peer_assoc_add_ml_partner_links(uint8_t *buf_ptr,
|
||||||
struct peer_assoc_params *req)
|
struct peer_assoc_params *req)
|
||||||
{
|
{
|
||||||
@@ -316,11 +360,12 @@ uint8_t *peer_assoc_add_ml_partner_links(uint8_t *buf_ptr,
|
|||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
||||||
(req->ml_links.num_links *
|
((req->ml_links.num_links + req->is_assoc_vdev) *
|
||||||
sizeof(wmi_peer_assoc_mlo_partner_link_params)));
|
sizeof(wmi_peer_assoc_mlo_partner_link_params)));
|
||||||
buf_ptr += sizeof(uint32_t);
|
buf_ptr += sizeof(uint32_t);
|
||||||
|
|
||||||
ml_partner_link = (wmi_peer_assoc_mlo_partner_link_params *)buf_ptr;
|
ml_partner_link = (wmi_peer_assoc_mlo_partner_link_params *)buf_ptr;
|
||||||
|
peer_assoc_update_assoc_link_info((uint8_t **)&ml_partner_link, req);
|
||||||
partner_info = req->ml_links.partner_info;
|
partner_info = req->ml_links.partner_info;
|
||||||
for (i = 0; i < req->ml_links.num_links; i++) {
|
for (i = 0; i < req->ml_links.num_links; i++) {
|
||||||
WMITLV_SET_HDR(&ml_partner_link->tlv_header,
|
WMITLV_SET_HDR(&ml_partner_link->tlv_header,
|
||||||
@@ -338,12 +383,25 @@ uint8_t *peer_assoc_add_ml_partner_links(uint8_t *buf_ptr,
|
|||||||
partner_info[i].mlo_logical_link_index_valid);
|
partner_info[i].mlo_logical_link_index_valid);
|
||||||
ml_partner_link->mlo_flags.emlsr_support = partner_info[i].emlsr_support;
|
ml_partner_link->mlo_flags.emlsr_support = partner_info[i].emlsr_support;
|
||||||
ml_partner_link->logical_link_index = partner_info[i].logical_link_index;
|
ml_partner_link->logical_link_index = partner_info[i].logical_link_index;
|
||||||
|
ml_partner_link->ieee_link_id = partner_info[i].link_id;
|
||||||
|
WMI_CHAR_ARRAY_TO_MAC_ADDR(partner_info[i].bssid.bytes,
|
||||||
|
&ml_partner_link->bss_id);
|
||||||
|
WMI_CHAR_ARRAY_TO_MAC_ADDR(partner_info[i].mac_addr.bytes,
|
||||||
|
&ml_partner_link->self_mac);
|
||||||
|
|
||||||
|
wmi_debug("Send Link info with link_id: %d vdev_id: %d AP link addr: "QDF_MAC_ADDR_FMT ", STA addr: "QDF_MAC_ADDR_FMT,
|
||||||
|
ml_partner_link->ieee_link_id,
|
||||||
|
ml_partner_link->vdev_id,
|
||||||
|
QDF_MAC_ADDR_REF(partner_info[i].bssid.bytes),
|
||||||
|
QDF_MAC_ADDR_REF(partner_info[i].mac_addr.bytes));
|
||||||
|
wmi_copy_chan_info(&ml_partner_link->wmi_chan,
|
||||||
|
&partner_info[i].chan);
|
||||||
|
|
||||||
ml_partner_link++;
|
ml_partner_link++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return buf_ptr +
|
return buf_ptr +
|
||||||
(req->ml_links.num_links *
|
((req->ml_links.num_links + req->is_assoc_vdev) *
|
||||||
sizeof(wmi_peer_assoc_mlo_partner_link_params));
|
sizeof(wmi_peer_assoc_mlo_partner_link_params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user