qcacmn: Add vdev delete notify callback
Add vdev delete notify callback for DP vdev, which is called when dp_vdev is freed. This will notify the osif/non-cmn dp layer upon dp_vdev delete. Change-Id: I22110ebd048066e84644c04b4903c50dd61c61a4 CRs-Fixed: 3696638
This commit is contained in:

committed by
Ravindra Konda

parent
37cd1d31ac
commit
a5c5711971
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -1195,6 +1195,7 @@ typedef QDF_STATUS(*ol_txrx_get_tsf_time)(void *osif_dev, uint64_t input_time,
|
|||||||
* @get_key: function pointer to get key of the peer with
|
* @get_key: function pointer to get key of the peer with
|
||||||
* specific key index
|
* specific key index
|
||||||
* @get_tsf_time: function pointer to get TSF
|
* @get_tsf_time: function pointer to get TSF
|
||||||
|
* @vdev_del_notify: vdev delete notifier
|
||||||
*/
|
*/
|
||||||
struct ol_txrx_ops {
|
struct ol_txrx_ops {
|
||||||
struct {
|
struct {
|
||||||
@@ -1227,6 +1228,7 @@ struct ol_txrx_ops {
|
|||||||
|
|
||||||
ol_txrx_get_key_fp get_key;
|
ol_txrx_get_key_fp get_key;
|
||||||
ol_txrx_get_tsf_time get_tsf_time;
|
ol_txrx_get_tsf_time get_tsf_time;
|
||||||
|
ol_txrx_vdev_delete_cb vdev_del_notify;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -4984,6 +4984,7 @@ static QDF_STATUS dp_vdev_register_wifi3(struct cdp_soc_t *soc_hdl,
|
|||||||
#endif
|
#endif
|
||||||
vdev->me_convert = txrx_ops->me_convert;
|
vdev->me_convert = txrx_ops->me_convert;
|
||||||
vdev->get_tsf_time = txrx_ops->get_tsf_time;
|
vdev->get_tsf_time = txrx_ops->get_tsf_time;
|
||||||
|
vdev->vdev_del_notify = txrx_ops->vdev_del_notify;
|
||||||
|
|
||||||
dp_vdev_register_rx_eapol(vdev, txrx_ops);
|
dp_vdev_register_rx_eapol(vdev, txrx_ops);
|
||||||
|
|
||||||
@@ -6339,6 +6340,8 @@ void dp_vdev_unref_delete(struct dp_soc *soc, struct dp_vdev *vdev,
|
|||||||
{
|
{
|
||||||
ol_txrx_vdev_delete_cb vdev_delete_cb = NULL;
|
ol_txrx_vdev_delete_cb vdev_delete_cb = NULL;
|
||||||
void *vdev_delete_context = NULL;
|
void *vdev_delete_context = NULL;
|
||||||
|
ol_txrx_vdev_delete_cb vdev_del_notify = NULL;
|
||||||
|
void *vdev_del_noitfy_ctx = NULL;
|
||||||
uint8_t vdev_id = vdev->vdev_id;
|
uint8_t vdev_id = vdev->vdev_id;
|
||||||
struct dp_pdev *pdev = vdev->pdev;
|
struct dp_pdev *pdev = vdev->pdev;
|
||||||
struct dp_vdev *tmp_vdev = NULL;
|
struct dp_vdev *tmp_vdev = NULL;
|
||||||
@@ -6361,8 +6364,12 @@ void dp_vdev_unref_delete(struct dp_soc *soc, struct dp_vdev *vdev,
|
|||||||
vdev_delete_cb = vdev->delete.callback;
|
vdev_delete_cb = vdev->delete.callback;
|
||||||
vdev_delete_context = vdev->delete.context;
|
vdev_delete_context = vdev->delete.context;
|
||||||
|
|
||||||
dp_info("deleting vdev object %pK ("QDF_MAC_ADDR_FMT")- its last peer is done",
|
vdev_del_notify = vdev->vdev_del_notify;
|
||||||
vdev, QDF_MAC_ADDR_REF(vdev->mac_addr.raw));
|
vdev_del_noitfy_ctx = vdev->osif_vdev;
|
||||||
|
|
||||||
|
dp_info("deleting vdev object %pK (" QDF_MAC_ADDR_FMT ")%s",
|
||||||
|
vdev, QDF_MAC_ADDR_REF(vdev->mac_addr.raw),
|
||||||
|
vdev_del_notify ? " with del_notify" : "");
|
||||||
|
|
||||||
if (wlan_op_mode_monitor == vdev->opmode) {
|
if (wlan_op_mode_monitor == vdev->opmode) {
|
||||||
dp_monitor_vdev_delete(soc, vdev);
|
dp_monitor_vdev_delete(soc, vdev);
|
||||||
@@ -6394,8 +6401,6 @@ free_vdev:
|
|||||||
|
|
||||||
dp_cfg_event_record_vdev_evt(soc, DP_CFG_EVENT_VDEV_UNREF_DEL,
|
dp_cfg_event_record_vdev_evt(soc, DP_CFG_EVENT_VDEV_UNREF_DEL,
|
||||||
vdev);
|
vdev);
|
||||||
dp_info("deleting vdev object %pK ("QDF_MAC_ADDR_FMT")",
|
|
||||||
vdev, QDF_MAC_ADDR_REF(vdev->mac_addr.raw));
|
|
||||||
wlan_minidump_remove(vdev, sizeof(*vdev), soc->ctrl_psoc,
|
wlan_minidump_remove(vdev, sizeof(*vdev), soc->ctrl_psoc,
|
||||||
WLAN_MD_DP_VDEV, "dp_vdev");
|
WLAN_MD_DP_VDEV, "dp_vdev");
|
||||||
qdf_mem_free(vdev);
|
qdf_mem_free(vdev);
|
||||||
@@ -6403,6 +6408,9 @@ free_vdev:
|
|||||||
|
|
||||||
if (vdev_delete_cb)
|
if (vdev_delete_cb)
|
||||||
vdev_delete_cb(vdev_delete_context);
|
vdev_delete_cb(vdev_delete_context);
|
||||||
|
|
||||||
|
if (vdev_del_notify)
|
||||||
|
vdev_del_notify(vdev_del_noitfy_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_export_symbol(dp_vdev_unref_delete);
|
qdf_export_symbol(dp_vdev_unref_delete);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -4099,6 +4099,9 @@ struct dp_vdev {
|
|||||||
/* callback to classify critical packets */
|
/* callback to classify critical packets */
|
||||||
ol_txrx_classify_critical_pkt_fp tx_classify_critical_pkt_cb;
|
ol_txrx_classify_critical_pkt_fp tx_classify_critical_pkt_cb;
|
||||||
|
|
||||||
|
/* delete notifier to DP component */
|
||||||
|
ol_txrx_vdev_delete_cb vdev_del_notify;
|
||||||
|
|
||||||
/* deferred vdev deletion state */
|
/* deferred vdev deletion state */
|
||||||
struct {
|
struct {
|
||||||
/* VDEV delete pending */
|
/* VDEV delete pending */
|
||||||
|
Reference in New Issue
Block a user