]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ath10k: use per-vif wmm param setup if possible
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 28 Jan 2015 07:57:28 +0000 (09:57 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 29 Jan 2015 10:12:41 +0000 (12:12 +0200)
New wmi-tlv firmware for qca6174 supports this.

This should fix issues related to multi-vif WMM.

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

index 62e8adc492cbe1fa81adb9f73fb7f576be03877e..0c2ccc1011763addf85be6a9b9ec4cc789051914 100644 (file)
@@ -4129,11 +4129,23 @@ static int ath10k_conf_tx(struct ieee80211_hw *hw,
         */
        p->txop = params->txop * 32;
 
-       /* FIXME: FW accepts wmm params per hw, not per vif */
-       ret = ath10k_wmi_pdev_set_wmm_params(ar, &arvif->wmm_params);
-       if (ret) {
-               ath10k_warn(ar, "failed to set wmm params: %d\n", ret);
-               goto exit;
+       if (ar->wmi.ops->gen_vdev_wmm_conf) {
+               ret = ath10k_wmi_vdev_wmm_conf(ar, arvif->vdev_id,
+                                              &arvif->wmm_params);
+               if (ret) {
+                       ath10k_warn(ar, "failed to set vdev wmm params on vdev %i: %d\n",
+                                   arvif->vdev_id, ret);
+                       goto exit;
+               }
+       } else {
+               /* This won't work well with multi-interface cases but it's
+                * better than nothing.
+                */
+               ret = ath10k_wmi_pdev_set_wmm_params(ar, &arvif->wmm_params);
+               if (ret) {
+                       ath10k_warn(ar, "failed to set wmm params: %d\n", ret);
+                       goto exit;
+               }
        }
 
        ret = ath10k_conf_tx_uapsd(ar, vif, ac, params->uapsd);