mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Add HDD flow pool map/unmap for policy manger
Add HDD flow pool map and unmap functions. These are registered with the policy manager (via CDS) so that lithium_dp vdev flow pools are created/deleted when vdev become active/not-active under the control of the policy manager Change-Id: I1ff6b3bafa78df68fbf9a221ac0d001bd5a06d8d CRs-Fixed: 2240815
This commit is contained in:
parent
99d06c14e9
commit
a0cbc92c6b
2 changed files with 39 additions and 20 deletions
|
|
@ -10209,6 +10209,43 @@ static inline QDF_STATUS hdd_register_bcn_cb(struct hdd_context *hdd_ctx)
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_v2_flow_pool_map() - Flow pool create callback when vdev is active
|
||||
* @vdev_id: vdev_id, corresponds to flow_pool
|
||||
*
|
||||
* Return: none.
|
||||
*/
|
||||
static void hdd_v2_flow_pool_map(int vdev_id)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
|
||||
status = cdp_flow_pool_map(cds_get_context(QDF_MODULE_ID_SOC),
|
||||
cds_get_context(QDF_MODULE_ID_TXRX),
|
||||
vdev_id);
|
||||
/*
|
||||
* For Adrastea flow control v2 is based on FW MAP events,
|
||||
* so this above callback is not implemented.
|
||||
* Hence this is not actual failure. Dont return failure
|
||||
*/
|
||||
if ((status != QDF_STATUS_SUCCESS) &&
|
||||
(status != QDF_STATUS_E_INVAL)) {
|
||||
hdd_err("vdev_id: %d, failed to create flow pool status %d",
|
||||
vdev_id, status);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_v2_flow_pool_unmap() - Flow pool create callback when vdev is not active
|
||||
* @vdev_id: vdev_id, corresponds to flow_pool
|
||||
*
|
||||
* Return: none.
|
||||
*/
|
||||
static void hdd_v2_flow_pool_unmap(int vdev_id)
|
||||
{
|
||||
cdp_flow_pool_unmap(cds_get_context(QDF_MODULE_ID_SOC),
|
||||
cds_get_context(QDF_MODULE_ID_TXRX), vdev_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_configure_cds() - Configure cds modules
|
||||
* @hdd_ctx: HDD context
|
||||
|
|
@ -10317,6 +10354,8 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
|
|||
hdd_disable_rx_ol_in_concurrency;
|
||||
dp_cbs.hdd_set_rx_mode_rps_cb = hdd_set_rx_mode_rps;
|
||||
dp_cbs.hdd_ipa_set_mcc_mode_cb = hdd_ipa_set_mcc_mode;
|
||||
dp_cbs.hdd_v2_flow_pool_map = hdd_v2_flow_pool_map;
|
||||
dp_cbs.hdd_v2_flow_pool_unmap = hdd_v2_flow_pool_unmap;
|
||||
status = policy_mgr_register_dp_cb(hdd_ctx->hdd_psoc, &dp_cbs);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_debug("Failed to register DP cb with Policy Manager");
|
||||
|
|
|
|||
|
|
@ -2570,7 +2570,6 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
|||
struct wma_target_req *req_msg;
|
||||
uint32_t chan_mode;
|
||||
enum phy_ch_width ch_width;
|
||||
QDF_STATUS status;
|
||||
|
||||
mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
|
||||
if (mac_ctx == NULL) {
|
||||
|
|
@ -2820,20 +2819,6 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
|||
cdp_fc_vdev_unpause(cds_get_context(QDF_MODULE_ID_SOC),
|
||||
wma->interfaces[params.vdev_id].handle,
|
||||
0xffffffff);
|
||||
status = cdp_flow_pool_map(cds_get_context(QDF_MODULE_ID_SOC),
|
||||
cds_get_context(QDF_MODULE_ID_TXRX),
|
||||
params.vdev_id);
|
||||
/*
|
||||
* For Adrastea flow control v2 is based on FW MAP events,
|
||||
* so this above callback is not implemented.
|
||||
* Hence this is not actual failure. Dont return failure
|
||||
*/
|
||||
if ((status != QDF_STATUS_SUCCESS) &&
|
||||
(status != QDF_STATUS_E_INVAL)) {
|
||||
WMA_LOGE("%s: vdev_id: %d, failed to create flow pool status %d",
|
||||
__func__, params.vdev_id, status);
|
||||
return status;
|
||||
}
|
||||
wma_vdev_update_pause_bitmap(params.vdev_id, 0);
|
||||
}
|
||||
|
||||
|
|
@ -5672,11 +5657,6 @@ void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params)
|
|||
wma->interfaces[params->smesessionId].handle,
|
||||
OL_TXQ_PAUSE_REASON_VDEV_STOP);
|
||||
|
||||
/* smesessionId is not equal to vdev_id with which pool is created */
|
||||
cdp_flow_pool_unmap(cds_get_context(QDF_MODULE_ID_SOC),
|
||||
cds_get_context(QDF_MODULE_ID_TXRX),
|
||||
params->smesessionId);
|
||||
|
||||
if (wma_send_vdev_stop_to_fw(wma, params->smesessionId)) {
|
||||
WMA_LOGE("%s: %d Failed to send vdev stop", __func__, __LINE__);
|
||||
wma_remove_vdev_req(wma, params->smesessionId,
|
||||
|
|
|
|||
Loading…
Reference in a new issue