msm: ipa3: fixed a dependency between tx-napi and LAN rx-napi

Fixed the if condition for enabling the NAPI netdev to init the netdev
if at least one of both features is enabled.

Change-Id: I14d454bf6eaa070a9ba5bab9e0b2d2f3bd4a8cf7
Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
This commit is contained in:
Amir Levy 2020-08-03 11:34:03 +03:00 • committed by Gerrit - the friendly Code Review server
commit e45ddd2b4e

View file

@ -6865,10 +6865,12 @@ static int ipa3_lan_poll(struct napi_struct *napi, int budget)
static inline void ipa3_enable_napi_netdev(void)
{
if (ipa3_ctx->lan_rx_napi_enable) {
if (ipa3_ctx->lan_rx_napi_enable || ipa3_ctx->tx_napi_enable) {
init_dummy_netdev(&ipa3_ctx->generic_ndev);
netif_napi_add(&ipa3_ctx->generic_ndev, &ipa3_ctx->napi_lan_rx,
ipa3_lan_poll, NAPI_WEIGHT);
if(ipa3_ctx->lan_rx_napi_enable) {
netif_napi_add(&ipa3_ctx->generic_ndev, &ipa3_ctx->napi_lan_rx,
ipa3_lan_poll, NAPI_WEIGHT);
}
}
}