net: airoha: simplify rx/free packet logic a bit
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Wed, 8 Oct 2025 07:31:38 +0000 (10:31 +0300)
committerJerome Forissier <jerome.forissier@linaro.org>
Wed, 22 Oct 2025 12:28:33 +0000 (14:28 +0200)
commitec127937199d7ec7116f07bb1642565ab6671a36
treee91449cb4b4196b93c585b8f67927d42a47453f7
parent4b8e78585171787794611205d661b97bc5f4dd83
net: airoha: simplify rx/free packet logic a bit

The commit 997786bbf473 ("drivers/net/airoha_eth: fix stalling in package
receiving") can be improved. Instead of returning previous descriptor
it's possible:
 * do nothing in even descriptor case
 * return 2 descriptor to the queue (current and previous) in the odd
   descriptor case.

This patch:
 * implements above approach
 * remove logic not required within new approach
 * adds note that PKTBUFSRX must be even and larger than 7
   for reliable driver operations

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
drivers/net/airoha_eth.c