From: Dmitry Antipov <dmantipov@yandex.ru>
To: Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org,
Dmitry Antipov <dmantipov@yandex.ru>
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 [thread overview]
Message-ID: <20230808152542.91117-1-dmantipov@yandex.ru> (raw)
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 <dmantipov@yandex.ru>
---
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
next reply other threads:[~2023-08-08 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 15:25 Dmitry Antipov [this message]
2023-08-08 15:25 ` [PATCH 2/2] wifi: ath10k: consistently use kstrtoX_from_user() functions Dmitry Antipov
2023-08-08 16:20 ` [PATCH 1/2] wifi: ath10k: do not ignore value returned by ath10k_wmi_peer_set_param() Jeff Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230808152542.91117-1-dmantipov@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=quic_jjohnson@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).