ath11k: fix pdev when invoking ath11k_wmi_send_twt_enable_cmd()
authorPradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Fri, 13 Dec 2019 15:34:56 +0000 (16:34 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 18 Dec 2019 17:41:36 +0000 (19:41 +0200)
The code currently uses the wrong pdev id when enabling TWT. Fix this by
using the correct ones.

Fixes: e65a616f4e74 ("ath11k: add TWT support")
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath11k/mac.c

index 3450c22..b8cae42 100644 (file)
@@ -1917,9 +1917,9 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 
        if (changed & BSS_CHANGED_TWT) {
                if (info->twt_requester || info->twt_responder)
-                       ath11k_wmi_send_twt_enable_cmd(ar, ar->pdev_idx);
+                       ath11k_wmi_send_twt_enable_cmd(ar, ar->pdev->pdev_id);
                else
-                       ath11k_wmi_send_twt_disable_cmd(ar, ar->pdev_idx);
+                       ath11k_wmi_send_twt_disable_cmd(ar, ar->pdev->pdev_id);
        }
 
        if (changed & BSS_CHANGED_HE_OBSS_PD)