drivers: ethernet: Fix DSA tag size for KSZ8863.
Allow DSA_TAG_SIZE to be set based on the size determined by Kconfig and the enabled switch hardware. This fixes support for the KSZ8863 which also has a tail tag of one byte. Signed-off-by: Bas van Loon <s.r.vanloon@ziggo.nl>
This commit is contained in:
parent
30aa72020d
commit
e1ba85e9a2
2 changed files with 10 additions and 6 deletions
|
|
@ -45,6 +45,14 @@ config DSA_KSZ_TAIL_TAGGING
|
||||||
help
|
help
|
||||||
Add support for tail tagging on DSA device.
|
Add support for tail tagging on DSA device.
|
||||||
|
|
||||||
|
config DSA_TAG_SIZE
|
||||||
|
int "DSA tag size in bytes"
|
||||||
|
default 1 if DSA_KSZ8794 || DSA_KSZ8863
|
||||||
|
default 0
|
||||||
|
depends on DSA_KSZ_TAIL_TAGGING
|
||||||
|
help
|
||||||
|
Set the DSA tag length in bytes.
|
||||||
|
|
||||||
config DSA_SPI
|
config DSA_SPI
|
||||||
bool "Support for PHY SPI interface"
|
bool "Support for PHY SPI interface"
|
||||||
depends on SPI && (DSA_KSZ8794 || DSA_KSZ8863)
|
depends on SPI && (DSA_KSZ8794 || DSA_KSZ8863)
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,8 @@
|
||||||
#define NET_DSA_PORT_MAX_COUNT 8
|
#define NET_DSA_PORT_MAX_COUNT 8
|
||||||
#define DSA_STATUS_PERIOD_MS K_MSEC(1000)
|
#define DSA_STATUS_PERIOD_MS K_MSEC(1000)
|
||||||
|
|
||||||
/*
|
#ifdef CONFIG_DSA_TAG_SIZE
|
||||||
* Size of the DSA TAG:
|
#define DSA_TAG_SIZE CONFIG_DSA_TAG_SIZE
|
||||||
* - KSZ8794 - 1 byte
|
|
||||||
*/
|
|
||||||
#if defined(CONFIG_DSA_KSZ8794) && defined(CONFIG_DSA_KSZ_TAIL_TAGGING)
|
|
||||||
#define DSA_TAG_SIZE 1
|
|
||||||
#else
|
#else
|
||||||
#define DSA_TAG_SIZE 0
|
#define DSA_TAG_SIZE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue