Search Linux Wireless

[PATCH 1/2] wifi: ath10k: do not ignore value returned by ath10k_wmi_peer_set_param()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux