diff options
Diffstat (limited to 'drivers/net/ethernet/intel/igc')
| -rw-r--r-- | drivers/net/ethernet/intel/igc/igc_ethtool.c | 9 | 
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 946e775e34ae..a938ec8db681 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1222,8 +1222,8 @@ static void igc_ethtool_init_nfc_rule(struct igc_nfc_rule *rule,   * @adapter: Pointer to adapter   * @rule: Rule under evaluation   * - * Rules with both destination and source MAC addresses are considered invalid - * since the driver doesn't support them. + * The driver doesn't support rules with multiple matches so if more than + * one bit in filter flags is set, @rule is considered invalid.   *   * Also, if there is already another rule with the same filter in a different   * location, @rule is considered invalid. @@ -1244,9 +1244,8 @@ static int igc_ethtool_check_nfc_rule(struct igc_adapter *adapter,  		return -EINVAL;  	} -	if (flags & IGC_FILTER_FLAG_DST_MAC_ADDR && -	    flags & IGC_FILTER_FLAG_SRC_MAC_ADDR) { -		netdev_dbg(dev, "Filters with both dst and src are not supported\n"); +	if (flags & (flags - 1)) { +		netdev_dbg(dev, "Rule with multiple matches not supported\n");  		return -EOPNOTSUPP;  	}  |