Commit a5dc694e authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by David S. Miller

net: ethernet: mtk_ppe: add MTK_FOE_ENTRY_V{1,2}_SIZE macros

Introduce MTK_FOE_ENTRY_V{1,2}_SIZE macros in order to make more
explicit foe_entry size for different chipset revisions.
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bf837e8f
...@@ -4804,7 +4804,7 @@ static const struct mtk_soc_data mt7621_data = { ...@@ -4804,7 +4804,7 @@ static const struct mtk_soc_data mt7621_data = {
.required_pctl = false, .required_pctl = false,
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
...@@ -4825,7 +4825,7 @@ static const struct mtk_soc_data mt7622_data = { ...@@ -4825,7 +4825,7 @@ static const struct mtk_soc_data mt7622_data = {
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
.has_accounting = true, .has_accounting = true,
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
...@@ -4844,7 +4844,7 @@ static const struct mtk_soc_data mt7623_data = { ...@@ -4844,7 +4844,7 @@ static const struct mtk_soc_data mt7623_data = {
.required_pctl = true, .required_pctl = true,
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
...@@ -4882,8 +4882,8 @@ static const struct mtk_soc_data mt7981_data = { ...@@ -4882,8 +4882,8 @@ static const struct mtk_soc_data mt7981_data = {
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry),
.has_accounting = true, .has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
...@@ -4903,8 +4903,8 @@ static const struct mtk_soc_data mt7986_data = { ...@@ -4903,8 +4903,8 @@ static const struct mtk_soc_data mt7986_data = {
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry),
.has_accounting = true, .has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
......
...@@ -216,6 +216,9 @@ struct mtk_foe_ipv6_6rd { ...@@ -216,6 +216,9 @@ struct mtk_foe_ipv6_6rd {
struct mtk_foe_mac_info l2; struct mtk_foe_mac_info l2;
}; };
#define MTK_FOE_ENTRY_V1_SIZE 80
#define MTK_FOE_ENTRY_V2_SIZE 96
struct mtk_foe_entry { struct mtk_foe_entry {
u32 ib1; u32 ib1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment