diff options
| author | Orhan K AKYILDIZ <oka@codeaurora.org> | 2017-12-11 11:46:15 -0800 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-12-17 14:46:56 -0800 |
| commit | 35bbeb6cf0ec2547dc47fc554a901ed7adbdeb79 (patch) | |
| tree | 8e1efb10198367fc1be2a974a5d7203c313d9e66 | |
| parent | 93d90600d6b944c7536d326dc39f70b60f02ebe8 (diff) | |
qcacmn: Dont initialize gsonapi to napi
In monkey tests we have observed that gsonapi and NAPI instances
are same. During the creation of rx NAPI instances, the GSONAPI
corresponding to them are initialized to rx napi, and soon after
the right value is overwritten when the flush callbacks are
registered. However, durign this window, the same NAPI struct is
used by two different objects and therefore collisions happen.
Init the gsonapi with NULL until the real value is set later
during initialization.
Change-Id: Iaff3adf193a3eeb16603ce5e6d0e93ea6f456e52
CRs-Fixed: 2154636
| -rw-r--r-- | hif/src/hif_napi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hif/src/hif_napi.c b/hif/src/hif_napi.c index 4f1d503081ab..a854172c0b36 100644 --- a/hif/src/hif_napi.c +++ b/hif/src/hif_napi.c @@ -185,7 +185,7 @@ int hif_napi_create(struct hif_opaque_softc *hif_ctx, NAPI_DEBUG("adding napi=%pK to netdev=%pK (poll=%pK, bdgt=%d)", &(napii->napi), &(napii->netdev), poll, budget); netif_napi_add(&(napii->netdev), &(napii->napi), poll, budget); - napii->offld_ctx = &(napii->napi); + napii->offld_ctx = NULL; NAPI_DEBUG("after napi_add"); NAPI_DEBUG("napi=0x%pK, netdev=0x%pK", @@ -884,9 +884,10 @@ int hif_napi_poll(struct hif_opaque_softc *hif_ctx, normalized++; bucket = normalized / (QCA_NAPI_BUDGET / QCA_NAPI_NUM_BUCKETS); if (bucket >= QCA_NAPI_NUM_BUCKETS) { + HIF_ERROR("Bad bucket#(%d) > QCA_NAPI_NUM_BUCKETS(%d)" + " (rc=%d/normalized=%d- corrected", + bucket, QCA_NAPI_NUM_BUCKETS, rc, normalized); bucket = QCA_NAPI_NUM_BUCKETS - 1; - HIF_ERROR("Bad bucket#(%d) > QCA_NAPI_NUM_BUCKETS(%d)", - bucket, QCA_NAPI_NUM_BUCKETS); } napi_info->stats[cpu].napi_budget_uses[bucket]++; } else { |
