Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4469977rwb; Tue, 8 Aug 2023 08:59:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTjJeSceZNVWBmDpRHD3ZdOiwWs8kKYqCDf6sBZcOMMph+H1xm3mRGyMheb92t4ht84ewj X-Received: by 2002:a2e:780b:0:b0:2b6:fa71:5bae with SMTP id t11-20020a2e780b000000b002b6fa715baemr8952495ljc.12.1691510341362; Tue, 08 Aug 2023 08:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691510341; cv=none; d=google.com; s=arc-20160816; b=SphHdaA1UqT1n9H+j4g2jfNlFEs8XDm77Q7IThaJ2e8nujyR2GtSCFXfxBayzLMAoO 7kECQEyQOxx9bn/6OEzY8eRX9aNDNlor/uLdH2d38rGJXCU3easLqQ9kVamqn7PgENzI Gtu5BVYjquCSh7KjoToQ3lRqr7fBRiuLbOLI7F3v3REkEyNIvdivbvKNlhpds2Uym06M 3MN5LClmJdL2K1atGNJgSEdGTqTkfBlCrFnvpvWNpzbS8POQ1XiFmSfJgXrxN7oFz9g+ jMC2ktv3AM+h8XcryWvEgYq5ugTM6wNYZ7a/TocRvlCWZaxaNcBmleLDUVk/0KwXsdud FfpA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=HzciPL0UHcDSko7HoMRoD6OUrboLAVfN1ZdHJ8vTpHI=; fh=TTeZ1eq67ykykzFyt2yNRVsls/VAWXFpY2o/rLP0ENc=; b=CqOm/tdZwBfIRUsjjYWHagM2GWzrjHpOvzz+gWUipq7iieL3c/KzDkp3ti5Xrgpz4/ T16IGnl98qiXm6WGN4bNBOQ/jXmDwRFE5Y7MoiNDASTnsImjjat//PWSlBwqSSq5/TUR IBNI0v1zyqreJGFWoIINVV2kWaT0uPykkQqSLAg7IBcDkobXsfDNEvqkZTHs1EQ69D7L so6/hOUIrGdztq/2ny05D5RqYdDOHf4IPiM0xOgLv24H2JCcBRPyw+C/VyChRANZuPk0 6+lBXy2M0ad6g/dePlquvMu97CdwooSeF/nJbaMLuxQzRWUQf7Vdi4s/uLOO0sqV2IwQ A0Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=foz7XxK+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a170906059500b00991fe707692si7298093ejn.63.2023.08.08.08.58.45; Tue, 08 Aug 2023 08:59:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@yandex.ru header.s=mail header.b=foz7XxK+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231246AbjHHP6b (ORCPT + 57 others); Tue, 8 Aug 2023 11:58:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231271AbjHHP5C (ORCPT ); Tue, 8 Aug 2023 11:57:02 -0400 Received: from forward203a.mail.yandex.net (forward203a.mail.yandex.net [178.154.239.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B776B5B95 for ; Tue, 8 Aug 2023 08:43:54 -0700 (PDT) Received: from forward100a.mail.yandex.net (forward100a.mail.yandex.net [IPv6:2a02:6b8:c0e:500:1:45:d181:d100]) by forward203a.mail.yandex.net (Yandex) with ESMTP id 3605748754 for ; Tue, 8 Aug 2023 18:27:03 +0300 (MSK) Received: from mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net [IPv6:2a02:6b8:c18:3c99:0:640:7c39:0]) by forward100a.mail.yandex.net (Yandex) with ESMTP id 98BEA46CF3; Tue, 8 Aug 2023 18:26:46 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id jQaGdD4DR0U0-3aoxAOA1; Tue, 08 Aug 2023 18:26:46 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1691508406; bh=HzciPL0UHcDSko7HoMRoD6OUrboLAVfN1ZdHJ8vTpHI=; h=Message-ID:Date:Cc:Subject:To:From; b=foz7XxK+1I4FGZZAtpJTxJV4hc5y6m0JmmHiHopwDnrswJ81M/zBfreoYn2OtB511 nSubwrMDlvTCbO9d9R81Kf2Z5DYG9nlTbqaCw32Wk1Tk+8axzMbSOmE50dcqXwuiRw vV6GuvJPiIawDy3zxSoV41gHim7JSKn5atRofTeI= Authentication-Results: mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Antipov To: Jeff Johnson Cc: Kalle Valo , linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org, Dmitry Antipov Subject: [PATCH 1/2] wifi: ath10k: do not ignore value returned by ath10k_wmi_peer_set_param() Date: Tue, 8 Aug 2023 18:25:35 +0300 Message-ID: <20230808152542.91117-1-dmantipov@yandex.ru> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_RPBL,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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-wireless@vger.kernel.org Do not ignore value returned by 'ath10k_wmi_peer_set_param()' but rather propagate it as the return value of the 'ath10k_set_key()'. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 9cdd00575029 ("ath10k: fix TDLS peer TX data failure issue on encryped AP") Fixes: 382e51c139ef ("ath10k: set WMI_PEER_AUTHORIZE after a firmware crash") Signed-off-by: Dmitry Antipov --- drivers/net/wireless/ath/ath10k/mac.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 03e7bc5b6c0b..22e5ee151c49 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6663,12 +6663,14 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, spin_unlock_bh(&ar->data_lock); if (sta && sta->tdls) - ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr, - ar->wmi.peer_param->authorize, 1); - else if (sta && cmd == SET_KEY && (key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) - ath10k_wmi_peer_set_param(ar, arvif->vdev_id, peer_addr, - ar->wmi.peer_param->authorize, 1); - + ret = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr, + ar->wmi.peer_param->authorize, + 1); + else if (sta && cmd == SET_KEY && + (key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) + ret = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, peer_addr, + ar->wmi.peer_param->authorize, + 1); exit: mutex_unlock(&ar->conf_mutex); return ret; -- 2.41.0