ath10k: workaround qca6174 sta powersave issue
authorMichal Kazior <michal.kazior@tieto.com>
Fri, 13 Feb 2015 12:30:15 +0000 (13:30 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 4 Mar 2015 13:38:35 +0000 (15:38 +0200)
qca6184 WLAN.RM.2.0-00073 has a bug in sta
powersave state machine and requires peer param to
be poked to enable the powersave.

Calling this unconditionally should be safe for
other chips/firmwares.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/wmi.h

index f9c1507478eab403307acfe1eab70c3579fecf5a..943e8909ea82e110fd00c704fea77a4611f0e7d4 100644 (file)
@@ -1922,6 +1922,18 @@ static void ath10k_bss_assoc(struct ieee80211_hw *hw,
        }
 
        arvif->is_up = true;
+
+       /* Workaround: Some firmware revisions (tested with qca6174
+        * WLAN.RM.2.0-00073) have buggy powersave state machine and must be
+        * poked with peer param command.
+        */
+       ret = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, arvif->bssid,
+                                       WMI_PEER_DUMMY_VAR, 1);
+       if (ret) {
+               ath10k_warn(ar, "failed to poke peer %pM param for ps workaround on vdev %i: %d\n",
+                           arvif->bssid, arvif->vdev_id, ret);
+               return;
+       }
 }
 
 static void ath10k_bss_disassoc(struct ieee80211_hw *hw,
index 28c1822af6cf48bd9d703d70710ac3439c24e064..adf935bf0580f488708688c4728aaab1f7325dc5 100644 (file)
@@ -4445,7 +4445,8 @@ enum wmi_peer_param {
        WMI_PEER_AUTHORIZE  = 0x3,
        WMI_PEER_CHAN_WIDTH = 0x4,
        WMI_PEER_NSS        = 0x5,
-       WMI_PEER_USE_4ADDR  = 0x6
+       WMI_PEER_USE_4ADDR  = 0x6,
+       WMI_PEER_DUMMY_VAR  = 0xff, /* dummy parameter for STA PS workaround */
 };
 
 struct wmi_peer_set_param_cmd {