Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2879383rwb; Mon, 15 Aug 2022 13:10:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR4l+vt2jwj/OEDiFHSEb2ar0CFChTJABYJx2ijF9Hc6bTQm+KNCIr/Qk/nV2FCZipQunG3k X-Received: by 2002:a17:906:ee8e:b0:730:4a24:f311 with SMTP id wt14-20020a170906ee8e00b007304a24f311mr11486116ejb.420.1660594237581; Mon, 15 Aug 2022 13:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594237; cv=none; d=google.com; s=arc-20160816; b=lylUyqkQvPDttFiN9bIcX9E0W3xA2NAK5EDyBbw+HTO8jiJWtoGpfP6wdOtgxH3A2D 44M+Gbo698/z3A7puhyTLc9gJZ2TXsyiXRak7xYYzFaIU6zntp4kRATy+B2ZrdzxCwJ0 Fz+FHrUjbtgxog6ga7Yt5jhTXcc7lt2I5xwUGUAnGBVXwXs55UuhLo0ipUZuML0pise+ nS0Kbh/5CmAifa+aTHYjutye+5gSbZGeyQRgTqNj139up9N66bbHe8EfSw+kV85kDBES hourM8uM8KavGKwxPr4IiKYpCvgsj1HHNHEuB5IywoxOUuMUZQBXRRp4hZ7pnHMgecg6 eGiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dkwvJgwUsCn/5ENLoNc92f/UZUrI6FsBMbH+3+MgUJE=; b=EVaxC4NazRCCSHgn4+dGrLVDMQNBwZzQMNnmmphdrfEGBmHhCR+YPRMI5hdR1Nye7D bnFoQ45cVr+EgXlgJLOqe21PCe8NwVJTrd+jIgoE131z1b+O2m7k4UqX/pAJT0DgPK/b wGps21wZkurBbXWNxEGQCg7vP8RLm2Kg/ifcXmZwlDV4ChzvY4hLD89MF9uX4e/JPiOF xQLqjms3POfquy9TJIhDqtdlrj/tL6NXcjGFkdVZrvJCAqO+AgpXaRnQ2xWRyWE3kBvZ 9IhWn68VCJFSGDwSuRT+t2gDSQC1E8PumA6Xjp9YRgVpZYnQYndlr/lZd2pBnU18IDZe RxIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="UWtP1P/h"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a056402270a00b0043cb30af926si9040806edd.58.2022.08.15.13.10.12; Mon, 15 Aug 2022 13:10:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="UWtP1P/h"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233507AbiHOTGy (ORCPT + 99 others); Mon, 15 Aug 2022 15:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245213AbiHOTBc (ORCPT ); Mon, 15 Aug 2022 15:01:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C20533346; Mon, 15 Aug 2022 11:33:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 09A1F60EEB; Mon, 15 Aug 2022 18:32:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0102EC433C1; Mon, 15 Aug 2022 18:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588377; bh=fgbD63ZK38KAvlC/0IPEiqXYZOkpZEoUNR19gQ29OQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UWtP1P/hVxBSlvrJYhE2UCSleRGnop20lLKb0P6Q0m8GFpWRc2pw7FDyzrvM2+mEn RmWcanFGKPA4IUBB4K7Efy6Yavut5RwB6kr905/rsNwOoDGCV9k0YY70STG8dJHZsg 1eJsqTMAPn6A4T2khXSCASuR09xLj1Nl6Wyr7kAg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jian Shen , Guangbin Huang , Shannon Nelson , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 383/779] net: ionic: fix error check for vlan flags in ionic_set_nic_features() Date: Mon, 15 Aug 2022 20:00:27 +0200 Message-Id: <20220815180353.657188214@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen [ Upstream commit a86e86db5e6d72c82724a63ca1c5293409a21518 ] The prototype of input features of ionic_set_nic_features() is netdev_features_t, but the vlan_flags is using the private definition of ionic drivers. It should use the variable ctx.cmd.lif_setattr.features, rather than features to check the vlan flags. So fixes it. Fixes: beead698b173 ("ionic: Add the basic NDO callbacks for netdev support") Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang Acked-by: Shannon Nelson Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 6ac507ddf09a..781313dbd04f 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -1565,7 +1565,7 @@ static int ionic_set_nic_features(struct ionic_lif *lif, if ((old_hw_features ^ lif->hw_features) & IONIC_ETH_HW_RX_HASH) ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL); - if ((vlan_flags & features) && + if ((vlan_flags & le64_to_cpu(ctx.cmd.lif_setattr.features)) && !(vlan_flags & le64_to_cpu(ctx.comp.lif_setattr.features))) dev_info_once(lif->ionic->dev, "NIC is not supporting vlan offload, likely in SmartNIC mode\n"); -- 2.35.1