Hi Egil,
quoted hunk ↗ jump to hunk
+static inline int lan9303_tx_use_arl(struct dsa_port *dp, u8 *dest_addr)
+{
+ struct lan9303 *chip = dp->ds->priv;
+
+ return chip->is_bridged && !ether_addr_equal(dest_addr,
eth_stp_addr);
+}
static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device
*dev)
{@@ -62,7 +80,10 @@ static struct sk_buff *lan9303_xmit(struct sk_buff *skb,
struct net_device *dev)
lan9303_tag = (u16 *)(skb->data + 2 * ETH_ALEN);
lan9303_tag[0] = htons(ETH_P_8021Q);
- lan9303_tag[1] = htons(dp->index | BIT(4));
+ lan9303_tag[1] = lan9303_tx_use_arl(dp, skb->data) ?
How about using skb_mac_header(skb) than skb->data?
+ LAN9303_TAG_TX_USE_ALR :
+ dp->index |
Thanks.
Woojung