Cleanup memcpy warnings

Introduce eth_hw_addr_set from 5.15
Port 48eab831ae
Port 6ed178cb23
This commit is contained in:
Carlos Garcés
2022-03-13 11:43:51 +01:00
parent 5fb30bc593
commit 0f1952813c
5 changed files with 15 additions and 8 deletions

View File

@@ -217,6 +217,14 @@ typedef void *timer_hdl_context;
typedef unsigned long systime;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
/* Porting from linux kernel v5.15-rc1 48eab831ae8b9f7002a533fa4235eed63ea1f1a3 */
static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
{
ether_addr_copy(dev->dev_addr, addr);
}
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22))
/* Porting from linux kernel, for compatible with old kernel. */
static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)