further igc fixes for leap 15.5
This commit is contained in:
parent
87d109b757
commit
fb67d42fc7
|
|
@ -19,6 +19,17 @@
|
|||
#include "igc_tsn-5.14-ethercat.h"
|
||||
#include "igc_xdp-5.14-ethercat.h"
|
||||
|
||||
#ifdef CONFIG_SUSE_KERNEL
|
||||
#include <linux/suse_version.h>
|
||||
#else
|
||||
# ifndef SUSE_VERSION
|
||||
# define SUSE_VERSION 0
|
||||
# endif
|
||||
# ifndef SUSE_PATCHLEVEL
|
||||
# define SUSE_PATCHLEVEL 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define DRV_SUMMARY "Intel(R) 2.5G Ethernet Linux Driver (EtherCAT enabled)"
|
||||
|
||||
#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK)
|
||||
|
|
@ -953,7 +964,11 @@ static int igc_set_mac(struct net_device *netdev, void *p)
|
|||
if (!is_valid_ether_addr(addr->sa_data))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
#if SUSE_VERSION == 15 && SUSE_PATCHLEVEL >= 5
|
||||
eth_hw_addr_set(netdev, addr->sa_data);
|
||||
#else
|
||||
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
|
||||
#endif
|
||||
memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len);
|
||||
|
||||
/* set the correct pool for the new PF MAC address in entry 0 */
|
||||
|
|
@ -2243,7 +2258,11 @@ static int __igc_xdp_run_prog(struct igc_adapter *adapter,
|
|||
return IGC_XDP_REDIRECT;
|
||||
break;
|
||||
default:
|
||||
#if SUSE_VERSION == 15 && SUSE_PATCHLEVEL == 5
|
||||
bpf_warn_invalid_xdp_action(adapter->netdev, prog, act);
|
||||
#else
|
||||
bpf_warn_invalid_xdp_action(act);
|
||||
#endif
|
||||
fallthrough;
|
||||
case XDP_ABORTED:
|
||||
out_failure:
|
||||
|
|
@ -6109,7 +6128,11 @@ static int igc_probe(struct pci_dev *pdev,
|
|||
dev_err(&pdev->dev, "NVM Read Error\n");
|
||||
}
|
||||
|
||||
#if SUSE_VERSION == 15 && SUSE_PATCHLEVEL >= 5
|
||||
eth_hw_addr_set(netdev, hw->mac.addr);
|
||||
#else
|
||||
memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len);
|
||||
#endif
|
||||
|
||||
if (!is_valid_ether_addr(netdev->dev_addr)) {
|
||||
dev_err(&pdev->dev, "Invalid MAC Address\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue