Merge tag 'char-misc-5.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / net / dsa / tag_rtl4_a.c
index 40811ba..f920487 100644 (file)
@@ -54,9 +54,10 @@ static struct sk_buff *rtl4a_tag_xmit(struct sk_buff *skb,
        p = (__be16 *)tag;
        *p = htons(RTL4_A_ETHERTYPE);
 
-       out = (RTL4_A_PROTOCOL_RTL8366RB << 12) | (2 << 8);
-       /* The lower bits is the port number */
-       out |= (u8)dp->index;
+       out = (RTL4_A_PROTOCOL_RTL8366RB << RTL4_A_PROTOCOL_SHIFT) | (2 << 8);
+       /* The lower bits indicate the port number */
+       out |= BIT(dp->index);
+
        p = (__be16 *)(tag + 2);
        *p = htons(out);