From mboxrd@z Thu Jan 1 00:00:00 1970 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 A75CDC432C0 for ; Fri, 22 Nov 2019 10:52:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E92920656 for ; Fri, 22 Nov 2019 10:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419976; bh=xd9MmByD4kgF02UVppLESgoSj9OQHcqjVex2lFwXvoI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2mngL8q+obV4Fc8dHCY9lit+oCsZoDtPVVz09fqdWFCmVVBfTTgGFS3eoQZtDyduz cStCkSQdpMFMHzL+GvYkvg/PO/R8kqgeafOAPFhPPD6gNHauJx4hZs51Lmoct3lzEt RC4jOVmJ1bmxioUIByh5og+CmXyiIyfY7oIKPQrE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727208AbfKVKwz (ORCPT ); Fri, 22 Nov 2019 05:52:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:36878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728780AbfKVKww (ORCPT ); Fri, 22 Nov 2019 05:52:52 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1146220656; Fri, 22 Nov 2019 10:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419971; bh=xd9MmByD4kgF02UVppLESgoSj9OQHcqjVex2lFwXvoI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZCe1aQGUZYPTxZuyNji+E016ByycL3KKI8nzJUo0S0vLiSu3CnHltY29pIM45mnNg AQxUdoShE8kCn57xEfrp8sWY/MXJBM1HcdJNu/ZAis14W10ncnnORbpfV8XnRMnzy1 hVAXAGyXU5Hot8F9E4jJxyNmONS+ad3ARSI0FjUQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Matyukevich , Kalle Valo , Sasha Levin Subject: [PATCH 4.14 069/122] qtnfmac: drop error reports for out-of-bounds key indexes Date: Fri, 22 Nov 2019 11:28:42 +0100 Message-Id: <20191122100811.031900727@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100722.177052205@linuxfoundation.org> References: <20191122100722.177052205@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sergey Matyukevich [ Upstream commit 35da3fe63b8647ce3cc52fccdf186a60710815fb ] On disconnect wireless core attempts to remove all the supported keys. Following cfg80211_ops conventions, firmware returns -ENOENT code for the out-of-bound key indexes. This is a normal behavior, so no need to report errors for this case. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index a450bc6bc7745..d02f68792ce41 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -509,9 +509,16 @@ static int qtnf_del_key(struct wiphy *wiphy, struct net_device *dev, int ret; ret = qtnf_cmd_send_del_key(vif, key_index, pairwise, mac_addr); - if (ret) - pr_err("VIF%u.%u: failed to delete key: idx=%u pw=%u\n", - vif->mac->macid, vif->vifid, key_index, pairwise); + if (ret) { + if (ret == -ENOENT) { + pr_debug("VIF%u.%u: key index %d out of bounds\n", + vif->mac->macid, vif->vifid, key_index); + } else { + pr_err("VIF%u.%u: failed to delete key: idx=%u pw=%u\n", + vif->mac->macid, vif->vifid, + key_index, pairwise); + } + } return ret; } -- 2.20.1