net: fec: simplify the code logic of quirks
authorShenwei Wang <shenwei.wang@nxp.com>
Fri, 4 Nov 2022 02:47:54 +0000 (21:47 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2022 11:28:07 +0000 (11:28 +0000)
commit6c8fae0caf5dd893987a66772b12aacdf88dd848
treeef46aa29c50c5dad0e684ef708d9258b65a8483a
parentbb16db8393658e0978c3f0d30ae069e878264fa3
net: fec: simplify the code logic of quirks

Simplify the code logic of handling the quirk of FEC_QUIRK_HAS_RACC.
If a SoC has the RACC quirk, the driver will enable the 16bit shift
by default in the probe function for a better performance.

This patch handles the logic in one place to make the logic simple
and clean. The patch optimizes the fec_enet_xdp_get_tx_queue function
according to Paolo Abeni's comments, and it also exludes the SoCs that
require to do frame swap from XDP support.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c