qcacmn: Update Wifi netdevs for IPA exception path NAPI

Starting Kernel 4.19 IPA LAN RX supports NAPI polling
mechanism. Netdevs that hook into IPA need to call
netif_receive_skb() or similar to deliver the packet
to network stack instead of using netif_rx_ni().

IPA driver exports ipa_get_lan_rx_napi(void) API for
this purpose. If this API call returns true use
netif_receive_skb() or fallback on legacy api.

Add the changes under a feature flag IPA_LAN_RX_NAPI_SUPPORT
which is enabled under a linux kernel version check for 4.19
and above.

Change-Id: I449404e86e934fd6113cb71e494575e67602f678
CRs-Fixed: 2588500
此提交包含在:
Nisha Menon
2019-12-17 13:47:24 -08:00
提交者 nshrivas
父節點 5f25cbe8f2
當前提交 7e8f67cfca
共有 2 個檔案被更改,包括 35 行新增2 行删除

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -665,5 +665,22 @@ static inline bool qdf_get_ipa_smmu_enabled(void)
}
#endif
#ifdef IPA_LAN_RX_NAPI_SUPPORT
/**
* qdf_ipa_get_lan_rx_napi() - Check if NAPI is enabled in LAN
* RX DP
*
* Returns: true if enabled, false otherwise
*/
static inline bool qdf_ipa_get_lan_rx_napi(void)
{
return __qdf_ipa_get_lan_rx_napi();
}
#else
static inline bool qdf_ipa_get_lan_rx_napi(void)
{
return false;
}
#endif /* IPA_LAN_RX_NAPI_SUPPORT */
#endif /* IPA_OFFLOAD */
#endif /* _QDF_IPA_H */