net: dsa: tag_rtl4_a: Support also egress tags
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 16 Feb 2021 23:55:42 +0000 (00:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 11:34:07 +0000 (12:34 +0100)
commit10b55a0a7f4be197623f90958d9e6004c8fc987a
treeaa3e872b1f4d8f6edb911594fe33ffd35f707f83
parent7b23cad0308ad12bb1c228ff103d7e2ad836156d
net: dsa: tag_rtl4_a: Support also egress tags

commit 86dd9868b8788a9063893a97649594af93cd5aa6 upstream.

Support also transmitting frames using the custom "8899 A"
4 byte tag.

Qingfang came up with the solution: we need to pad the
ethernet frame to 60 bytes using eth_skb_pad(), then the
switch will happily accept frames with custom tags.

Cc: Mauri Sandberg <sandberg@mailfence.com>
Reported-by: DENG Qingfang <dqfext@gmail.com>
Fixes: efd7fe68f0c6 ("net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/dsa/tag_rtl4_a.c