OSDN Git Service

net: renesas: rswitch: Remove gptp flag from rswitch_gwca_queue
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 9 Feb 2023 08:17:40 +0000 (17:17 +0900)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Feb 2023 03:44:17 +0000 (19:44 -0800)
commit48cf0a25702b2d1d1ca5667d03df91780191657a
tree93082e114fbcea51ce0f9e4388712a1367fab80a
parente3f38039c681d8ac5956a742ee5d40b00cf57a37
net: renesas: rswitch: Remove gptp flag from rswitch_gwca_queue

In the previous code, the gptp flag was completely related to
the !dir_tx in struct rswitch_gwca_queue because
rswitch_gwca_queue_alloc() was called below:

< In rswitch_txdmac_alloc() >
err = rswitch_gwca_queue_alloc(ndev, priv, rdev->tx_queue, true, false,
      TX_RING_SIZE);
So, dir_tx = true, and gptp = false.

< In rswitch_rxdmac_alloc() >
err = rswitch_gwca_queue_alloc(ndev, priv, rdev->rx_queue, false, true,
      RX_RING_SIZE);
So, dir_tx = false, and gptp = true.

In the future, a new queue handling for timestamp will be implemented
and this gptp flag is confusable. So, remove the gptp flag.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/renesas/rswitch.h