From patchwork Sat May 23 02:50:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Kirsher X-Patchwork-Id: 218652 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71E5BC433E1 for ; Sat, 23 May 2020 02:51:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A7B6206DD for ; Sat, 23 May 2020 02:51:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387576AbgEWCvR (ORCPT ); Fri, 22 May 2020 22:51:17 -0400 Received: from mga17.intel.com ([192.55.52.151]:37983 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387544AbgEWCvO (ORCPT ); Fri, 22 May 2020 22:51:14 -0400 IronPort-SDR: 3NBTSpWkWt0Qq5p3BL30taOupdrx0Mep2O9Dy9xw+fGCGSUb64IvQ0dwSJKPFb+yaTeu0+YeH3 4b9tx1Qwm50Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 19:51:12 -0700 IronPort-SDR: l+tYJj6SFL/bm/vPRggU0Qphs9Ga7htawdqszoeo2rChuJnYIZ9vArkJE9NqAbdBevvKUMJtKM Q6JlsWiLxz4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,424,1583222400"; d="scan'208";a="290291076" Received: from jtkirshe-desk1.jf.intel.com ([134.134.177.86]) by fmsmga004.fm.intel.com with ESMTP; 22 May 2020 19:51:11 -0700 From: Jeff Kirsher To: davem@davemloft.net Cc: Andre Guedes , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, Aaron Brown , Jeff Kirsher Subject: [net-next 05/17] igc: Fix NFC rules with multicast addresses Date: Fri, 22 May 2020 19:50:57 -0700 Message-Id: <20200523025109.3313635-6-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200523025109.3313635-1-jeffrey.t.kirsher@intel.com> References: <20200523025109.3313635-1-jeffrey.t.kirsher@intel.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Andre Guedes Multicast MAC addresses are valid address for NFC rules but igc_add_mac_filter() is currently rejecting them. In fact, the I225 controller doesn't impose any constraint on the address value so this patch gets rid of the address validation check in MAC filter APIs. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index f48d6127a220..acb8dfdf275f 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2249,9 +2249,6 @@ int igc_add_mac_filter(struct igc_adapter *adapter, struct net_device *dev = adapter->netdev; int index; - if (!is_valid_ether_addr(addr)) - return -EINVAL; - index = igc_find_mac_filter(adapter, type, addr); if (index >= 0) goto update_filter; @@ -2283,9 +2280,6 @@ int igc_del_mac_filter(struct igc_adapter *adapter, struct net_device *dev = adapter->netdev; int index; - if (!is_valid_ether_addr(addr)) - return -EINVAL; - index = igc_find_mac_filter(adapter, type, addr); if (index < 0) return -ENOENT;