qcacld-3.0: Export new API to update default link

Currently default link update is only done in link switch
or dynamic mac address update case.
There is other scenario also where default link case become
inactive and update to DP will not happen.

So, to handle those scenarios, expert new API to update
DP default link.

CRs-Fixed: 3733584
Change-Id: Iab24c38c454cc5cb9f568de680531b38e4d3da45
这个提交包含在:
Amit Mehta
2024-02-08 14:53:42 +05:30
提交者 Ravindra Konda
父节点 998bdc2630
当前提交 1d0a7af857
修改 6 个文件,包含 97 行新增3 行删除

查看文件

@@ -1017,4 +1017,14 @@ bool wlan_dp_cfg_is_rx_fisa_lru_del_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
/* DP CFG APIs - END */
/**
* __wlan_dp_update_def_link() - update DP interface default link
* @psoc: psoc handle
* @intf_mac: interface MAC address
* @vdev: objmgr vdev handle to set the def_link in dp_intf
*
*/
void __wlan_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *intf_mac,
struct wlan_objmgr_vdev *vdev);
#endif

查看文件

@@ -2770,3 +2770,50 @@ void wlan_dp_pdev_cfg_sync_profile(struct cdp_soc_t *cdp_soc, uint8_t pdev_id)
dp_err("pdev based config item not found in profile table");
}
#endif
void __wlan_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *intf_mac,
struct wlan_objmgr_vdev *vdev)
{
struct wlan_dp_intf *dp_intf;
struct wlan_dp_link *dp_link;
struct wlan_dp_psoc_context *dp_ctx;
struct qdf_mac_addr zero_addr = QDF_MAC_ADDR_ZERO_INIT;
dp_ctx = dp_psoc_get_priv(psoc);
dp_intf = dp_get_intf_by_macaddr(dp_ctx, intf_mac);
if (!dp_intf) {
dp_err("DP interface not found addr:" QDF_MAC_ADDR_FMT,
QDF_MAC_ADDR_REF(intf_mac->bytes));
QDF_BUG(0);
return;
}
dp_link = dp_get_vdev_priv_obj(vdev);
if (dp_link && dp_link->dp_intf == dp_intf) {
dp_info("change dp_intf %pK(" QDF_MAC_ADDR_FMT
") def_link %d(" QDF_MAC_ADDR_FMT ") -> %d("
QDF_MAC_ADDR_FMT ")",
dp_intf, QDF_MAC_ADDR_REF(dp_intf->mac_addr.bytes),
dp_intf->def_link->link_id,
QDF_MAC_ADDR_REF(dp_intf->def_link->mac_addr.bytes),
dp_link->link_id,
QDF_MAC_ADDR_REF(dp_link->mac_addr.bytes));
dp_intf->def_link = dp_link;
return;
}
dp_info("Update failed dp_intf %pK(" QDF_MAC_ADDR_FMT ") from %pK("
QDF_MAC_ADDR_FMT ") to %pK(" QDF_MAC_ADDR_FMT ") (intf %pK("
QDF_MAC_ADDR_FMT ") id %d) ",
dp_intf, QDF_MAC_ADDR_REF(dp_intf->mac_addr.bytes),
dp_intf->def_link,
QDF_MAC_ADDR_REF(dp_intf->def_link->mac_addr.bytes),
dp_link, dp_link ? QDF_MAC_ADDR_REF(dp_link->mac_addr.bytes) :
QDF_MAC_ADDR_REF(zero_addr.bytes),
dp_link ? dp_link->dp_intf : NULL,
dp_link ? QDF_MAC_ADDR_REF(dp_link->dp_intf->mac_addr.bytes) :
QDF_MAC_ADDR_REF(zero_addr.bytes),
dp_link ? dp_link->link_id : WLAN_INVALID_LINK_ID);
}

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -91,4 +91,15 @@ wlan_dp_is_local_pkt_capture_enabled(struct wlan_objmgr_psoc *psoc)
return false;
}
#endif /* WLAN_FEATURE_LOCAL_PKT_CAPTURE */
/**
* wlan_dp_update_def_link() - update DP interface default link
* @psoc: psoc handle
* @intf_mac: interface MAC address
* @vdev: objmgr vdev handle to set the def_link in dp_intf
*
*/
void wlan_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *intf_mac,
struct wlan_objmgr_vdev *vdev);
#endif

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -75,6 +75,17 @@ QDF_STATUS ucfg_dp_update_link_mac_addr(struct wlan_objmgr_vdev *vdev,
struct qdf_mac_addr *new_mac_addr,
bool is_link_switch);
/**
* ucfg_dp_update_def_link() - update DP interface default link
* @psoc: psoc handle
* @intf_mac: interface MAC address
* @vdev: objmgr vdev handle to set the def_link in dp_intf
*
*/
void ucfg_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *intf_mac,
struct wlan_objmgr_vdev *vdev);
/**
* ucfg_dp_update_intf_mac() - update DP interface MAC address
* @psoc: psoc handle

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -60,3 +60,10 @@ bool wlan_dp_is_local_pkt_capture_enabled(struct wlan_objmgr_psoc *psoc)
return cdp_cfg_get(soc, cfg_dp_local_pkt_capture);
}
#endif
void wlan_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *intf_mac,
struct wlan_objmgr_vdev *vdev)
{
__wlan_dp_update_def_link(psoc, intf_mac, vdev);
}

查看文件

@@ -159,6 +159,14 @@ QDF_STATUS ucfg_dp_update_link_mac_addr(struct wlan_objmgr_vdev *vdev,
return status;
}
void ucfg_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *intf_mac,
struct wlan_objmgr_vdev *vdev)
{
__wlan_dp_update_def_link(psoc, intf_mac, vdev);
}
void ucfg_dp_update_intf_mac(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *cur_mac,
struct qdf_mac_addr *new_mac,