mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/ti/icssg/icssg_prueth.c net/mac80211/chan.c89884459a0("wifi: mac80211: fix idle calculation with multi-link")87f5500285("wifi: mac80211: simplify ieee80211_assign_link_chanctx()") https://lore.kernel.org/all/20240422105623.7b1fbda2@canb.auug.org.au/ net/unix/garbage.c1971d13ffa("af_unix: Suppress false-positive lockdep splat for spin_lock() in __unix_gc().")4090fa373f("af_unix: Replace garbage collection algorithm.") drivers/net/ethernet/ti/icssg/icssg_prueth.c drivers/net/ethernet/ti/icssg/icssg_common.c4dcd0e83ea("net: ti: icssg-prueth: Fix signedness bug in prueth_init_rx_chns()")e2dc7bfd67("net: ti: icssg-prueth: Move common functions into a separate file") No adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -611,6 +611,31 @@ static inline void eth_hw_addr_gen(struct net_device *dev, const u8 *base_addr,
|
||||
eth_hw_addr_set(dev, addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* eth_skb_pkt_type - Assign packet type if destination address does not match
|
||||
* @skb: Assigned a packet type if address does not match @dev address
|
||||
* @dev: Network device used to compare packet address against
|
||||
*
|
||||
* If the destination MAC address of the packet does not match the network
|
||||
* device address, assign an appropriate packet type.
|
||||
*/
|
||||
static inline void eth_skb_pkt_type(struct sk_buff *skb,
|
||||
const struct net_device *dev)
|
||||
{
|
||||
const struct ethhdr *eth = eth_hdr(skb);
|
||||
|
||||
if (unlikely(!ether_addr_equal_64bits(eth->h_dest, dev->dev_addr))) {
|
||||
if (unlikely(is_multicast_ether_addr_64bits(eth->h_dest))) {
|
||||
if (ether_addr_equal_64bits(eth->h_dest, dev->broadcast))
|
||||
skb->pkt_type = PACKET_BROADCAST;
|
||||
else
|
||||
skb->pkt_type = PACKET_MULTICAST;
|
||||
} else {
|
||||
skb->pkt_type = PACKET_OTHERHOST;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* eth_skb_pad - Pad buffer to mininum number of octets for Ethernet frame
|
||||
* @skb: Buffer to pad
|
||||
|
||||
Reference in New Issue
Block a user