qcacmn: add API to get NAPI instance corresponding to NAPI ID

Add API to get NAPI instance from NAPI ID. Handle to NAPI is required
for Rx processing via GRO.

Change-Id: I15535827a03953231670d4138235c4876b16e045
CRs-Fixed: 2062180
This commit is contained in:
Manjunathappa Prakash 2018-04-15 00:42:41 -07:00 committed by nshrivas
parent c8754ac4bd
commit e51aba73e7
3 changed files with 10 additions and 10 deletions

View File

@ -864,12 +864,12 @@ struct policy_mgr_cdp_cbacks {
/**
* struct policy_mgr_dp_cbacks - CDP Callbacks to be invoked
* from policy manager
* @hdd_disable_lro_in_concurrency: Callback to disable LRO
* @hdd_disable_rx_ol_in_concurrency: Callback to disable LRO/GRO offloads
* @hdd_set_rx_mode_rps_cb: Callback to set RPS
* @hdd_ipa_set_mcc_mode_cb: Callback to set mcc mode for ipa module
*/
struct policy_mgr_dp_cbacks {
void (*hdd_disable_lro_in_concurrency)(bool);
void (*hdd_disable_rx_ol_in_concurrency)(bool);
void (*hdd_set_rx_mode_rps_cb)(bool);
void (*hdd_ipa_set_mcc_mode_cb)(bool);
};

View File

@ -1159,7 +1159,7 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
pm_ctx->tdls_cbacks.tdls_notify_increment_session(psoc);
/*
* Disable LRO if P2P or IBSS or SAP connection has come up or
* Disable LRO/GRO if P2P or IBSS or SAP connection has come up or
* there are more than one STA connections
*/
if ((policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE, NULL) > 1) ||
@ -1168,8 +1168,8 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
0) ||
(policy_mgr_mode_specific_connection_count(psoc, PM_P2P_GO_MODE, NULL) > 0) ||
(policy_mgr_mode_specific_connection_count(psoc, PM_IBSS_MODE, NULL) > 0)) {
if (pm_ctx->dp_cbacks.hdd_disable_lro_in_concurrency != NULL)
pm_ctx->dp_cbacks.hdd_disable_lro_in_concurrency(true);
if (pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency != NULL)
pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency(true);
};
/* Enable RPS if SAP interface has come up */
@ -1229,15 +1229,15 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
/* Notify tdls */
if (pm_ctx->tdls_cbacks.tdls_notify_decrement_session)
pm_ctx->tdls_cbacks.tdls_notify_decrement_session(psoc);
/* Enable LRO if there no concurrency */
/* Enable LRO/GRO if there no concurrency */
if ((policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE, NULL) == 1) &&
(policy_mgr_mode_specific_connection_count(psoc, PM_SAP_MODE, NULL) == 0) &&
(policy_mgr_mode_specific_connection_count(psoc, PM_P2P_CLIENT_MODE, NULL) ==
0) &&
(policy_mgr_mode_specific_connection_count(psoc, PM_P2P_GO_MODE, NULL) == 0) &&
(policy_mgr_mode_specific_connection_count(psoc, PM_IBSS_MODE, NULL) == 0)) {
if (pm_ctx->dp_cbacks.hdd_disable_lro_in_concurrency != NULL)
pm_ctx->dp_cbacks.hdd_disable_lro_in_concurrency(false);
if (pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency != NULL)
pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency(false);
};
/* Disable RPS if SAP interface has come up */

View File

@ -645,8 +645,8 @@ QDF_STATUS policy_mgr_register_dp_cb(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
pm_ctx->dp_cbacks.hdd_disable_lro_in_concurrency =
dp_cbacks->hdd_disable_lro_in_concurrency;
pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency =
dp_cbacks->hdd_disable_rx_ol_in_concurrency;
pm_ctx->dp_cbacks.hdd_set_rx_mode_rps_cb =
dp_cbacks->hdd_set_rx_mode_rps_cb;
pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb =