qcacld-3.0: Fix dp_get_vdev_priv_obj to return dp_link
Currently objmgr_vdev returns dp_intf, which is now changed to dp_link. Change-Id: Ib2be45cb821fb2d9ab9e32bcf485a74509e4040e CRs-Fixed: 3518895
这个提交包含在:
@@ -474,10 +474,18 @@ static inline void
|
||||
dp_add_latency_critical_client(struct wlan_objmgr_vdev *vdev,
|
||||
enum qca_wlan_802_11_mode phymode)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf = dp_link->dp_intf;
|
||||
|
||||
if (!dp_link) {
|
||||
dp_err("No dp_link for objmgr vdev %pK", vdev);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
if (!dp_intf) {
|
||||
dp_err("Unable to get DP interface");
|
||||
dp_err("Invalid dp_intf for dp_link %pK (" QDF_MAC_ADDR_FMT ")",
|
||||
dp_link, QDF_MAC_ADDR_REF(dp_link->mac_addr.bytes));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -512,10 +520,18 @@ static inline void
|
||||
dp_del_latency_critical_client(struct wlan_objmgr_vdev *vdev,
|
||||
enum qca_wlan_802_11_mode phymode)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf = dp_link->dp_intf;
|
||||
|
||||
if (!dp_link) {
|
||||
dp_err("No dp_link for objmgr vdev %pK", vdev);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
if (!dp_intf) {
|
||||
dp_err("Unable to get DP interface");
|
||||
dp_err("Invalid dp_intf for dp_link %pK (" QDF_MAC_ADDR_FMT ")",
|
||||
dp_link, QDF_MAC_ADDR_REF(dp_link->mac_addr.bytes));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 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
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "wlan_objmgr_psoc_obj.h"
|
||||
#include "wlan_utility.h"
|
||||
|
||||
struct wlan_dp_intf;
|
||||
struct wlan_dp_link;
|
||||
|
||||
/* Get/Put Ref */
|
||||
|
||||
#define dp_comp_peer_get_ref(peer) wlan_objmgr_peer_try_get_ref(peer, WLAN_DP_ID)
|
||||
@@ -69,10 +72,10 @@ dp_get_peer_priv_obj(struct wlan_objmgr_peer *peer)
|
||||
*
|
||||
* Return: DP vdev private object
|
||||
*/
|
||||
static inline struct wlan_dp_intf *
|
||||
static inline struct wlan_dp_link *
|
||||
dp_get_vdev_priv_obj(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_dp_intf *obj;
|
||||
struct wlan_dp_link *obj;
|
||||
|
||||
if (!vdev) {
|
||||
dp_err("vdev is null");
|
||||
|
@@ -2213,12 +2213,19 @@ void dp_bus_bw_compute_timer_try_stop(struct wlan_objmgr_psoc *psoc)
|
||||
void dp_bus_bw_compute_prev_txrx_stats(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_vdev_get_psoc(vdev);
|
||||
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
struct wlan_dp_psoc_context *dp_ctx = dp_psoc_get_priv(psoc);
|
||||
|
||||
if (!dp_link) {
|
||||
dp_err("No dp_link for objmgr vdev %pK", vdev);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
if (!dp_intf) {
|
||||
dp_err("Unable to get DP interface");
|
||||
dp_err("Invalid dp_intf for dp_link %pK (" QDF_MAC_ADDR_FMT ")",
|
||||
dp_link, QDF_MAC_ADDR_REF(dp_link->mac_addr.bytes));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2240,13 +2247,22 @@ void dp_bus_bw_compute_prev_txrx_stats(struct wlan_objmgr_vdev *vdev)
|
||||
void dp_bus_bw_compute_reset_prev_txrx_stats(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_vdev_get_psoc(vdev);
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
struct wlan_dp_psoc_context *dp_ctx = dp_psoc_get_priv(psoc);
|
||||
|
||||
if (!dp_intf) {
|
||||
dp_err("Unable to get DP interface");
|
||||
if (!dp_link) {
|
||||
dp_err("No dp_link for objmgr vdev %pK", vdev);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
if (!dp_intf) {
|
||||
dp_err("Invalid dp_intf for dp_link %pK (" QDF_MAC_ADDR_FMT ")",
|
||||
dp_link, QDF_MAC_ADDR_REF(dp_link->mac_addr.bytes));
|
||||
return;
|
||||
}
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == cds_get_conparam())
|
||||
return;
|
||||
|
||||
|
@@ -787,6 +787,7 @@ dp_rx_mic_error_ind(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t pdev_id,
|
||||
struct dp_mic_error_info *dp_mic_info;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
struct wlan_dp_link *dp_link;
|
||||
|
||||
if (!psoc)
|
||||
return;
|
||||
@@ -796,12 +797,13 @@ dp_rx_mic_error_ind(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t pdev_id,
|
||||
WLAN_DP_ID);
|
||||
if (!vdev)
|
||||
return;
|
||||
dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
if (!dp_intf) {
|
||||
dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
if (!dp_link) {
|
||||
dp_comp_vdev_put_ref(vdev);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
dp_mic_info = qdf_mem_malloc(sizeof(*dp_mic_info));
|
||||
if (!dp_mic_info) {
|
||||
dp_comp_vdev_put_ref(vdev);
|
||||
@@ -1064,12 +1066,7 @@ dp_vdev_obj_destroy_notification(struct wlan_objmgr_vdev *vdev, void *arg)
|
||||
dp_info("DP VDEV OBJ destroy notification, vdev_id %d",
|
||||
wlan_vdev_get_id(vdev));
|
||||
|
||||
dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
/*
|
||||
* TODO - Remove the below line after proto-type of
|
||||
* dp_get_vdev_priv_obj is changed
|
||||
*/
|
||||
dp_link = (struct wlan_dp_link *)dp_intf;
|
||||
dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
if (!dp_link) {
|
||||
dp_err("Failed to get DP link obj");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
@@ -1398,12 +1395,15 @@ err:
|
||||
|
||||
void dp_try_send_rps_ind(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
|
||||
if (!dp_intf) {
|
||||
dp_err("dp interface is NULL");
|
||||
if (!dp_link) {
|
||||
dp_err("dp link is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
if (dp_intf->dp_ctx->rps)
|
||||
dp_send_rps_ind(dp_intf);
|
||||
}
|
||||
@@ -1441,6 +1441,7 @@ void dp_set_rps(uint8_t vdev_id, bool enable)
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct wlan_dp_psoc_context *dp_ctx;
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
struct wlan_dp_link *dp_link;
|
||||
|
||||
dp_ctx = dp_get_context();
|
||||
if (!dp_ctx)
|
||||
@@ -1451,13 +1452,15 @@ void dp_set_rps(uint8_t vdev_id, bool enable)
|
||||
if (!vdev)
|
||||
return;
|
||||
|
||||
dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
if (!dp_intf) {
|
||||
dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
if (!dp_link) {
|
||||
dp_comp_vdev_put_ref(vdev);
|
||||
dp_err_rl("DP interface not found for vdev_id: %d", vdev_id);
|
||||
dp_err_rl("DP link not found for vdev_id: %d", vdev_id);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
|
||||
dp_info("Set RPS to %d for vdev_id %d", enable, vdev_id);
|
||||
if (!dp_ctx->rps) {
|
||||
if (enable)
|
||||
@@ -1535,6 +1538,7 @@ QDF_STATUS dp_get_arp_stats_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
struct dp_rsp_stats *rsp)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
struct wlan_dp_link *dp_link;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc,
|
||||
@@ -1545,13 +1549,15 @@ QDF_STATUS dp_get_arp_stats_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
if (!dp_intf) {
|
||||
dp_err("Unable to get DP interface");
|
||||
dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
if (!dp_link) {
|
||||
dp_err("Unable to get DP link for vdev_id %d", rsp->vdev_id);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_DP_ID);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
|
||||
dp_info("rsp->arp_req_enqueue :%x", rsp->arp_req_enqueue);
|
||||
dp_info("rsp->arp_req_tx_success :%x", rsp->arp_req_tx_success);
|
||||
dp_info("rsp->arp_req_tx_failure :%x", rsp->arp_req_tx_failure);
|
||||
|
@@ -46,12 +46,15 @@ static uint32_t dp_txrx_get_tx_ack_count(struct wlan_dp_intf *dp_intf)
|
||||
void dp_nud_set_gateway_addr(struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr gw_mac_addr)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
|
||||
if (!dp_intf) {
|
||||
dp_err("Unable to get DP Interface");
|
||||
if (!dp_link) {
|
||||
dp_err("Unable to get DP link");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
qdf_mem_copy(dp_intf->nud_tracking.gw_mac_addr.bytes,
|
||||
gw_mac_addr.bytes,
|
||||
sizeof(struct qdf_mac_addr));
|
||||
@@ -463,12 +466,15 @@ void dp_nud_netevent_cb(struct qdf_mac_addr *netdev_addr,
|
||||
|
||||
void dp_nud_indicate_roam(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
|
||||
if (!dp_intf) {
|
||||
dp_err("Unable to get DP Interface");
|
||||
if (!dp_link) {
|
||||
dp_err("Unable to get DP link");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
dp_nud_set_tracking(dp_intf, DP_NUD_NONE, false);
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 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
|
||||
@@ -84,14 +84,16 @@ void dp_periodic_sta_stats_config(struct dp_config *config,
|
||||
|
||||
void dp_periodic_sta_stats_start(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
struct dp_config *dp_cfg;
|
||||
|
||||
if (!dp_intf) {
|
||||
dp_nofl_err("Unable to get DP interface");
|
||||
if (!dp_link) {
|
||||
dp_nofl_err("Unable to get DP link");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
dp_cfg = dp_intf->dp_ctx->dp_cfg;
|
||||
|
||||
if ((dp_intf->device_mode == QDF_STA_MODE) &&
|
||||
@@ -108,14 +110,16 @@ void dp_periodic_sta_stats_start(struct wlan_objmgr_vdev *vdev)
|
||||
|
||||
void dp_periodic_sta_stats_stop(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_link *dp_link = dp_get_vdev_priv_obj(vdev);
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
struct dp_config *dp_cfg;
|
||||
|
||||
if (!dp_intf) {
|
||||
dp_nofl_err("Unable to get DP interface");
|
||||
if (!dp_link) {
|
||||
dp_nofl_err("Unable to get DP link");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_link->dp_intf;
|
||||
dp_cfg = dp_intf->dp_ctx->dp_cfg;
|
||||
|
||||
if ((dp_intf->device_mode == QDF_STA_MODE) &&
|
||||
|
文件差异内容过多而无法显示
加载差异
在新工单中引用
屏蔽一个用户