qcacmn: Handle error scenarios in mgmt Rx REO module
Handle the following error scenarios in management Rx REO module. 1. Pdev corresponding to a HW link is deleted. 2. Pdev corresponding to a HW link not yet initialized completely. CRs-Fixed: 3272812 Change-Id: I34fbb19e24649371ff0ddb591e2ec14bfdfee58a
This commit is contained in:

committed by
Madan Koyyalamudi

parent
d93887d03f
commit
89fbda97fc
@@ -1022,6 +1022,13 @@ wlan_mgmt_rx_reo_algo_calculate_wait_count(
|
|||||||
pdev = wlan_get_pdev_from_mlo_link_id(link,
|
pdev = wlan_get_pdev_from_mlo_link_id(link,
|
||||||
WLAN_MGMT_RX_REO_ID);
|
WLAN_MGMT_RX_REO_ID);
|
||||||
|
|
||||||
|
/* No need to wait for any frames if the pdev is not found */
|
||||||
|
if (!pdev) {
|
||||||
|
mgmt_rx_reo_debug("pdev is null for link %d", link);
|
||||||
|
frames_pending = 0;
|
||||||
|
goto update_pending_frames;
|
||||||
|
}
|
||||||
|
|
||||||
rx_reo_pdev_ctx = wlan_mgmt_rx_reo_get_priv_object(pdev);
|
rx_reo_pdev_ctx = wlan_mgmt_rx_reo_get_priv_object(pdev);
|
||||||
if (!rx_reo_pdev_ctx) {
|
if (!rx_reo_pdev_ctx) {
|
||||||
mgmt_rx_reo_err("Mgmt reo context empty for pdev %pK",
|
mgmt_rx_reo_err("Mgmt reo context empty for pdev %pK",
|
||||||
@@ -1030,6 +1037,14 @@ wlan_mgmt_rx_reo_algo_calculate_wait_count(
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!rx_reo_pdev_ctx->init_complete) {
|
||||||
|
mgmt_rx_reo_debug("REO init in progress for link %d",
|
||||||
|
link);
|
||||||
|
wlan_objmgr_pdev_release_ref(pdev, WLAN_MGMT_RX_REO_ID);
|
||||||
|
frames_pending = 0;
|
||||||
|
goto update_pending_frames;
|
||||||
|
}
|
||||||
|
|
||||||
host_ss = &rx_reo_pdev_ctx->host_snapshot;
|
host_ss = &rx_reo_pdev_ctx->host_snapshot;
|
||||||
desc->host_snapshot[link] = rx_reo_pdev_ctx->host_snapshot;
|
desc->host_snapshot[link] = rx_reo_pdev_ctx->host_snapshot;
|
||||||
|
|
||||||
@@ -5130,6 +5145,52 @@ mgmt_rx_reo_initialize_snapshot_value(struct wlan_objmgr_pdev *pdev)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mgmt_rx_reo_set_initialization_complete() - Set initialization completion
|
||||||
|
* for management Rx REO pdev component private object
|
||||||
|
* @pdev: pointer to pdev object
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
static QDF_STATUS
|
||||||
|
mgmt_rx_reo_set_initialization_complete(struct wlan_objmgr_pdev *pdev)
|
||||||
|
{
|
||||||
|
struct mgmt_rx_reo_pdev_info *mgmt_rx_reo_pdev_ctx;
|
||||||
|
|
||||||
|
mgmt_rx_reo_pdev_ctx = wlan_mgmt_rx_reo_get_priv_object(pdev);
|
||||||
|
if (!mgmt_rx_reo_pdev_ctx) {
|
||||||
|
mgmt_rx_reo_err("Mgmt Rx REO priv object is null");
|
||||||
|
return QDF_STATUS_E_NULL_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
mgmt_rx_reo_pdev_ctx->init_complete = true;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mgmt_rx_reo_clear_initialization_complete() - Clear initialization completion
|
||||||
|
* for management Rx REO pdev component private object
|
||||||
|
* @pdev: pointer to pdev object
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
static QDF_STATUS
|
||||||
|
mgmt_rx_reo_clear_initialization_complete(struct wlan_objmgr_pdev *pdev)
|
||||||
|
{
|
||||||
|
struct mgmt_rx_reo_pdev_info *mgmt_rx_reo_pdev_ctx;
|
||||||
|
|
||||||
|
mgmt_rx_reo_pdev_ctx = wlan_mgmt_rx_reo_get_priv_object(pdev);
|
||||||
|
if (!mgmt_rx_reo_pdev_ctx) {
|
||||||
|
mgmt_rx_reo_err("Mgmt Rx REO priv object is null");
|
||||||
|
return QDF_STATUS_E_NULL_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
mgmt_rx_reo_pdev_ctx->init_complete = false;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mgmt_rx_reo_initialize_snapshots() - Initialize management Rx reorder
|
* mgmt_rx_reo_initialize_snapshots() - Initialize management Rx reorder
|
||||||
* snapshot related data structures for a given pdev
|
* snapshot related data structures for a given pdev
|
||||||
@@ -5192,6 +5253,12 @@ mgmt_rx_reo_attach(struct wlan_objmgr_pdev *pdev)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status = mgmt_rx_reo_set_initialization_complete(pdev);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
mgmt_rx_reo_err("Failed to set initialization complete");
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5203,6 +5270,12 @@ mgmt_rx_reo_detach(struct wlan_objmgr_pdev *pdev)
|
|||||||
if (!wlan_mgmt_rx_reo_is_feature_enabled_at_pdev(pdev))
|
if (!wlan_mgmt_rx_reo_is_feature_enabled_at_pdev(pdev))
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
status = mgmt_rx_reo_clear_initialization_complete(pdev);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
mgmt_rx_reo_err("Failed to clear initialization complete");
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
status = mgmt_rx_reo_clear_snapshots(pdev);
|
status = mgmt_rx_reo_clear_snapshots(pdev);
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
mgmt_rx_reo_err("Failed to clear mgmt Rx REO snapshots");
|
mgmt_rx_reo_err("Failed to clear mgmt Rx REO snapshots");
|
||||||
|
@@ -93,6 +93,8 @@
|
|||||||
* @host_target_shared_snapshot_info: Array of meta information related to
|
* @host_target_shared_snapshot_info: Array of meta information related to
|
||||||
* snapshots(for snapshots shared between host and target)
|
* snapshots(for snapshots shared between host and target)
|
||||||
* @filter: MGMT Rx REO filter
|
* @filter: MGMT Rx REO filter
|
||||||
|
* @init_complete: Flag to indicate initialization completion of the
|
||||||
|
* mgmt_rx_reo_pdev_info object
|
||||||
*/
|
*/
|
||||||
struct mgmt_rx_reo_pdev_info {
|
struct mgmt_rx_reo_pdev_info {
|
||||||
struct mgmt_rx_reo_snapshot_params host_snapshot;
|
struct mgmt_rx_reo_snapshot_params host_snapshot;
|
||||||
@@ -105,6 +107,7 @@ struct mgmt_rx_reo_pdev_info {
|
|||||||
[MGMT_RX_REO_SHARED_SNAPSHOT_MAX]
|
[MGMT_RX_REO_SHARED_SNAPSHOT_MAX]
|
||||||
[MGMT_RX_REO_SNAPSHOT_READ_RETRY_LIMIT]
|
[MGMT_RX_REO_SNAPSHOT_READ_RETRY_LIMIT]
|
||||||
[MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT];
|
[MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT];
|
||||||
|
bool init_complete;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user