diff options
author | Andre Guedes <andre.guedes@intel.com> | 2020-03-18 16:00:52 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2020-04-19 11:40:56 -0700 |
commit | 23b7b511675669702ad32bf7f92dcf2ae05015ba (patch) | |
tree | a7a17726f6dac55668c453651166135811e40efe | |
parent | 0c2e060859aa1cb8b13376554d802a251f750fa9 (diff) | |
download | linux-23b7b511675669702ad32bf7f92dcf2ae05015ba.tar.bz2 |
igc: Check unsupported flag in igc_add_mac_filter()
The IGC_MAC_STATE_SRC_ADDR flags is not supported by igc_add_mac_
filter() so this patch adds a check for it and returns -ENOTSUPP
in case it is set.
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/igc/igc_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index ade460f08ed1..66b3a689bb05 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2200,6 +2200,8 @@ static int igc_add_mac_filter(struct igc_adapter *adapter, const u8 *addr, if (is_zero_ether_addr(addr)) return -EINVAL; + if (flags & IGC_MAC_STATE_SRC_ADDR) + return -ENOTSUPP; /* Search for the first empty entry in the MAC table. * Do not touch entries at the end of the table reserved for the VF MAC |