@@ -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;
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(-)