diff --git a/target/linux/qualcommax/patches-6.6/0983-1-netdevice-threaded-napi-helper.patch b/target/linux/qualcommax/patches-6.6/0983-1-netdevice-threaded-napi-helper.patch new file mode 100644 index 0000000000..f905097e8a --- /dev/null +++ b/target/linux/qualcommax/patches-6.6/0983-1-netdevice-threaded-napi-helper.patch @@ -0,0 +1,59 @@ +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -2711,6 +2711,25 @@ netif_napi_add(struct net_device *dev, s + netif_napi_add_weight(dev, napi, poll, NAPI_POLL_WEIGHT); + } + ++ ++static inline void netif_threaded_napi_add_weight(struct net_device *dev, ++ struct napi_struct *napi, ++ int (*poll)(struct napi_struct *, int), ++ int weight) ++{ ++ netif_napi_add_weight(dev, napi, poll, weight); ++ if (num_online_cpus() > 1) { ++ dev_set_threaded(dev, true); ++ } ++} ++ ++static inline void netif_threaded_napi_add(struct net_device *dev, ++ struct napi_struct *napi, ++ int (*poll)(struct napi_struct *, int)) ++{ ++ netif_threaded_napi_add_weight(dev, napi, poll, NAPI_POLL_WEIGHT); ++} ++ + static inline void + netif_napi_add_tx_weight(struct net_device *dev, + struct napi_struct *napi, +@@ -2721,6 +2740,16 @@ netif_napi_add_tx_weight(struct net_devi + netif_napi_add_weight(dev, napi, poll, weight); + } + ++static inline void ++netif_threaded_napi_add_tx_weight(struct net_device *dev, ++ struct napi_struct *napi, ++ int (*poll)(struct napi_struct *, int), ++ int weight) ++{ ++ set_bit(NAPI_STATE_NO_BUSY_POLL, &napi->state); ++ netif_threaded_napi_add_weight(dev, napi, poll, weight); ++} ++ + /** + * netif_napi_add_tx() - initialize a NAPI context to be used for Tx only + * @dev: network device +@@ -2738,6 +2767,13 @@ static inline void netif_napi_add_tx(str + netif_napi_add_tx_weight(dev, napi, poll, NAPI_POLL_WEIGHT); + } + ++static inline void netif_threaded_napi_add_tx(struct net_device *dev, ++ struct napi_struct *napi, ++ int (*poll)(struct napi_struct *, int)) ++{ ++ netif_threaded_napi_add_tx_weight(dev, napi, poll, NAPI_POLL_WEIGHT); ++} ++ + /** + * __netif_napi_del - remove a NAPI context + * @napi: NAPI context