net: dsa: tag_rtl4_a: Use existing ETH_P_REALTEK constant
Subsystems (3)
PATCH 1/1 net: dsa: tag_rtl4_a: Use existing ETH_P_REALTEK constant
No functional change, uses the existing ETH_P_REALTEK constant already defined in if_ether.h.
Signed-off-by Florian Fainelli <[email protected]>
--- net/dsa/tag_rtl4_a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
net/dsa/tag_rtl4_a.c +2 -3
@@ -23,7 +23,6 @@#define RTL4_A_NAME "rtl4a"#define RTL4_A_HDR_LEN 4 -#define RTL4_A_ETHERTYPE 0x8899#define RTL4_A_PROTOCOL_SHIFT 12/* * 0x1 = Realtek Remote Control protocol (RRCP)
@@ -54,7 +53,7 @@ static struct sk_buff *rtl4a_tag_xmit(struct sk_buff *skb,/* Set Ethertype */ p = (__be16 *)tag; - *p =htons (RTL4_A_ETHERTYPE ); + *p =htons (ETH_P_REALTEK ); out = (RTL4_A_PROTOCOL_RTL8366RB <<RTL4_A_PROTOCOL_SHIFT );/* The lower bits indicate the port number */
@@ -82,7 +81,7 @@ static struct sk_buff *rtl4a_tag_rcv(struct sk_buff *skb, tag =dsa_etype_header_pos_rx (skb); p = (__be16 *)tag; etype =ntohs (*p); -if (etype !=RTL4_A_ETHERTYPE ) { +if (etype !=ETH_P_REALTEK ) {/* Not custom, just pass through */ netdev_dbg (dev,"non-realtek ethertype 0x%04x\n" , etype);return skb;
Signature · 1 line
2.34.1
Quoted 4 lines · Florian Fainelli
No functional change, uses the existing
ETH_P_REALTEKconstant already defined inif_ether.h.Signed-off-by Florian Fainelli <[email protected]>
Reviewed-by Andrew Lunn <[email protected]>
Andrew
Quoted 5 lines · Florian Fainelli
No functional change, uses the existing
ETH_P_REALTEKconstant already defined inif_ether.h.Signed-off-by Florian Fainelli <[email protected]>---
Reviewed-by Vladimir Oltean <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 7 lines · On Mon, 13 Nov 2023 08:50:30 -0800 you wrote:
No functional change, uses the existing
ETH_P_REALTEKconstant already defined inif_ether.h.Signed-off-by Florian Fainelli <[email protected]>--- net/dsa/tag_rtl4_a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Here is the summary with links:
- [net-next] net: dsa: tag_rtl4_a: Use existing ETH_P_REALTEK constant
https://git.kernel.org/netdev/net-next/c/8fedaaca4071
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html