|
@@ -718,55 +718,55 @@ QDF_STATUS wlan_mgmt_txrx_psoc_open(struct wlan_objmgr_psoc *psoc)
|
|
|
}
|
|
|
|
|
|
QDF_STATUS wlan_mgmt_txrx_psoc_close(struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+QDF_STATUS wlan_mgmt_txrx_pdev_open(struct wlan_objmgr_pdev *pdev)
|
|
|
+{
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+QDF_STATUS wlan_mgmt_txrx_pdev_close(struct wlan_objmgr_pdev *pdev)
|
|
|
{
|
|
|
struct mgmt_txrx_priv_pdev_context *mgmt_txrx_pdev_ctx;
|
|
|
struct mgmt_txrx_desc_elem_t *mgmt_desc;
|
|
|
- uint16_t i;
|
|
|
uint32_t pool_size;
|
|
|
- uint8_t pdev_count, index;
|
|
|
- struct wlan_objmgr_pdev *pdev;
|
|
|
+ uint32_t index;
|
|
|
|
|
|
- if (!psoc) {
|
|
|
- mgmt_txrx_err("psoc context is NULL");
|
|
|
+ if (!pdev) {
|
|
|
+ mgmt_txrx_err("pdev context is NULL");
|
|
|
return QDF_STATUS_E_INVAL;
|
|
|
}
|
|
|
|
|
|
- pdev_count = wlan_psoc_get_pdev_count(psoc);
|
|
|
-
|
|
|
- for (index = 0; index < pdev_count; index++) {
|
|
|
- pdev = psoc->soc_objmgr.wlan_pdev_list[index];
|
|
|
+ mgmt_txrx_pdev_ctx = (struct mgmt_txrx_priv_pdev_context *)
|
|
|
+ wlan_objmgr_pdev_get_comp_private_obj(pdev,
|
|
|
+ WLAN_UMAC_COMP_MGMT_TXRX);
|
|
|
|
|
|
- if (!pdev) {
|
|
|
- mgmt_txrx_err("pdev context is NULL");
|
|
|
- return QDF_STATUS_E_INVAL;
|
|
|
- }
|
|
|
- mgmt_txrx_pdev_ctx = (struct mgmt_txrx_priv_pdev_context *)
|
|
|
- wlan_objmgr_pdev_get_comp_private_obj(pdev,
|
|
|
- WLAN_UMAC_COMP_MGMT_TXRX);
|
|
|
- if (!mgmt_txrx_pdev_ctx) {
|
|
|
- mgmt_txrx_err("mgmt txrx context is NULL");
|
|
|
+ if (!mgmt_txrx_pdev_ctx) {
|
|
|
+ mgmt_txrx_err("mgmt txrx context is NULL");
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- pool_size = mgmt_txrx_pdev_ctx->mgmt_desc_pool.free_list.max_size;
|
|
|
- if (!pool_size) {
|
|
|
- mgmt_txrx_err("pool size is 0");
|
|
|
- return QDF_STATUS_E_FAILURE;
|
|
|
- }
|
|
|
+ pool_size = mgmt_txrx_pdev_ctx->mgmt_desc_pool.free_list.max_size;
|
|
|
+ if (!pool_size) {
|
|
|
+ mgmt_txrx_err("pool size is 0");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
|
|
|
- for (i = 0; i < pool_size; i++) {
|
|
|
- if (mgmt_txrx_pdev_ctx->mgmt_desc_pool.pool[i].in_use) {
|
|
|
- mgmt_txrx_info(
|
|
|
- "mgmt descriptor with desc id: %d not in freelist",
|
|
|
- i);
|
|
|
- mgmt_desc = &mgmt_txrx_pdev_ctx->mgmt_desc_pool.pool[i];
|
|
|
- qdf_nbuf_free(mgmt_desc->nbuf);
|
|
|
- wlan_objmgr_peer_release_ref(mgmt_desc->peer,
|
|
|
- WLAN_MGMT_SB_ID);
|
|
|
- wlan_mgmt_txrx_desc_put(mgmt_txrx_pdev_ctx, i);
|
|
|
- }
|
|
|
+ for (index = 0; index < pool_size; index++) {
|
|
|
+ if (mgmt_txrx_pdev_ctx->mgmt_desc_pool.pool[index].in_use) {
|
|
|
+ mgmt_txrx_info(
|
|
|
+ "mgmt descriptor with desc id: %d not in freelist",
|
|
|
+ index);
|
|
|
+ mgmt_desc = &mgmt_txrx_pdev_ctx->mgmt_desc_pool.pool[index];
|
|
|
+ qdf_nbuf_free(mgmt_desc->nbuf);
|
|
|
+ wlan_objmgr_peer_release_ref(mgmt_desc->peer,
|
|
|
+ WLAN_MGMT_SB_ID);
|
|
|
+ wlan_mgmt_txrx_desc_put(mgmt_txrx_pdev_ctx, index);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|