diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 845b2232a3..9ce1d8b890 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -882,6 +882,21 @@ struct hif_target_info *hif_get_target_info_handle( } qdf_export_symbol(hif_get_target_info_handle); +#ifdef RECEIVE_OFFLOAD +int hif_get_rx_ctx_id(int ctx_id, struct hif_opaque_softc *hif_hdl) +{ + if (hif_napi_enabled(hif_hdl, -1)) + return NAPI_PIPE2ID(ctx_id); + else + return ctx_id; +} +#else +int hif_get_rx_ctx_id(int ctx_id, struct hif_opaque_softc *hif_hdl) +{ + return 0; +} +#endif + #if defined(FEATURE_LRO) /** @@ -902,27 +917,6 @@ void *hif_get_lro_info(int ctx_id, struct hif_opaque_softc *hif_hdl) return data; } - -/** - * hif_get_rx_ctx_id - Returns LRO instance ID based on underlying LRO instance - * @ctx_id: LRO context ID - * @hif_hdl: HIF Context - * - * Return: LRO instance ID - */ -int hif_get_rx_ctx_id(int ctx_id, struct hif_opaque_softc *hif_hdl) -{ - if (hif_napi_enabled(hif_hdl, -1)) - return NAPI_PIPE2ID(ctx_id); - else - return ctx_id; -} - -#else /* !defined(FEATURE_LRO) */ -int hif_get_rx_ctx_id(int ctx_id, struct hif_opaque_softc *hif_hdl) -{ - return 0; -} #endif /** diff --git a/hif/src/hif_main.h b/hif/src/hif_main.h index acbcacda01..517a28d382 100644 --- a/hif/src/hif_main.h +++ b/hif/src/hif_main.h @@ -277,6 +277,13 @@ void hif_wlan_disable(struct hif_softc *scn); int hif_target_sleep_state_adjust(struct hif_softc *scn, bool sleep_ok, bool wait_for_it); +/** + * hif_get_rx_ctx_id() - Returns NAPI instance ID based on CE ID + * @ctx_id: Rx CE context ID + * @hif_hdl: HIF Context + * + * Return: Rx instance ID + */ int hif_get_rx_ctx_id(int ctx_id, struct hif_opaque_softc *hif_hdl); void hif_ramdump_handler(struct hif_opaque_softc *scn); #ifdef HIF_USB diff --git a/hif/src/hif_napi.c b/hif/src/hif_napi.c index f4b03c0015..528de7d6bb 100644 --- a/hif/src/hif_napi.c +++ b/hif/src/hif_napi.c @@ -361,6 +361,13 @@ inline struct qca_napi_data *hif_napi_get_all(struct hif_opaque_softc *hif_ctx) return &(hif->napi_data); } +struct napi_struct *hif_get_napi(int napi_id, struct qca_napi_data *napid) +{ + int id = NAPI_ID2PIPE(napi_id); + + return &(napid->napis[id]->napi); +} + /** * * hif_napi_event() - reacts to events that impact NAPI diff --git a/hif/src/hif_napi.h b/hif/src/hif_napi.h index ac9dbacc3d..1596551e65 100644 --- a/hif/src/hif_napi.h +++ b/hif/src/hif_napi.h @@ -124,6 +124,15 @@ int hif_napi_destroy(struct hif_opaque_softc *hif, struct qca_napi_data *hif_napi_get_all(struct hif_opaque_softc *hif); +/** + * hif_get_napi() - get NAPI corresponding to napi_id + * @napi_id: NAPI instance + * @napi_d: Handle NAPI + * + * Return: napi corresponding napi_id + */ +struct napi_struct *hif_get_napi(int napi_id, struct qca_napi_data *napid); + int hif_napi_event(struct hif_opaque_softc *hif, enum qca_napi_event event, void *data); diff --git a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h index 461064e440..3db7f62741 100644 --- a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +++ b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h @@ -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); }; diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index fe25512095..9b86fdc7c3 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -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 */ diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c index 992e0ff2ae..4e97913bf3 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c @@ -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 =