net: bql: fix building with BQL disabled
authorArnd Bergmann <arnd@arndb.de>
Wed, 28 Feb 2024 16:06:56 +0000 (17:06 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Mar 2024 08:46:15 +0000 (08:46 +0000)
commiteb2c11b27c58a62b5027b77f702c15cd0ca38f7d
treeae3de33c004a7d670b0211b813d1074f0e363bb5
parent1eecc7ab82c42133b748e1895275942a054a7f67
net: bql: fix building with BQL disabled

It is now possible to disable BQL, but that causes the cpsw driver to break:

drivers/net/ethernet/ti/am65-cpsw-nuss.c:297:28: error: no member named 'dql' in 'struct netdev_queue'
  297 |                    dql_avail(&netif_txq->dql),

There is already a helper function in net/sch_generic.h that could
be used to help here. Move its implementation into the common
linux/netdevice.h along with the other bql interfaces and change
both users over to the new interface.

Fixes: ea7f3cfaa588 ("net: bql: allow the config to be disabled")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/am65-cpsw-nuss.c
include/linux/netdevice.h
include/net/sch_generic.h