|
@@ -5248,10 +5248,12 @@ start_poll:
|
|
|
int ipa3_rx_poll(u32 clnt_hdl, int weight)
|
|
|
{
|
|
|
struct ipa3_ep_context *ep;
|
|
|
+ struct ipa3_sys_context *wan_def_sys;
|
|
|
int ret;
|
|
|
int cnt = 0;
|
|
|
int num = 0;
|
|
|
int remain_aggr_weight;
|
|
|
+ int ipa_ep_idx;
|
|
|
struct ipa_active_client_logging_info log;
|
|
|
struct gsi_chan_xfer_notify notify[IPA_WAN_NAPI_MAX_FRAMES];
|
|
|
|
|
@@ -5263,8 +5265,16 @@ int ipa3_rx_poll(u32 clnt_hdl, int weight)
|
|
|
return cnt;
|
|
|
}
|
|
|
|
|
|
- remain_aggr_weight = weight / IPA_WAN_AGGR_PKT_CNT;
|
|
|
+ ipa_ep_idx = ipa3_get_ep_mapping(
|
|
|
+ IPA_CLIENT_APPS_WAN_CONS);
|
|
|
+ if (ipa_ep_idx ==
|
|
|
+ IPA_EP_NOT_ALLOCATED) {
|
|
|
+ IPAERR("Invalid client.\n");
|
|
|
+ return cnt;
|
|
|
+ }
|
|
|
|
|
|
+ wan_def_sys = ipa3_ctx->ep[ipa_ep_idx].sys;
|
|
|
+ remain_aggr_weight = weight / IPA_WAN_AGGR_PKT_CNT;
|
|
|
if (remain_aggr_weight > IPA_WAN_NAPI_MAX_FRAMES) {
|
|
|
IPAERR("NAPI weight is higher than expected\n");
|
|
|
IPAERR("expected %d got %d\n",
|
|
@@ -5301,11 +5311,11 @@ start_poll:
|
|
|
cnt += weight - remain_aggr_weight * IPA_WAN_AGGR_PKT_CNT;
|
|
|
|
|
|
ep->sys->repl_hdlr(ep->sys);
|
|
|
-
|
|
|
-
|
|
|
- * until minimum number descripotrs to replish.
|
|
|
+
|
|
|
+ * mode, wait for napi-poll and replenish again.
|
|
|
*/
|
|
|
- if (cnt < weight && ep->sys->len > IPA_DEFAULT_SYS_YELLOW_WM) {
|
|
|
+ if (cnt < weight && ep->sys->len > IPA_DEFAULT_SYS_YELLOW_WM &&
|
|
|
+ wan_def_sys->len > IPA_DEFAULT_SYS_YELLOW_WM) {
|
|
|
napi_complete(ep->sys->napi_obj);
|
|
|
ret = ipa3_rx_switch_to_intr_mode(ep->sys);
|
|
|
if (ret == -GSI_STATUS_PENDING_IRQ &&
|