aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2015-01-24 05:14:52 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2015-01-27 09:21:23 -0500
commitb0e561549316f520a80dc15dd341923b57bd4500 (patch)
tree2022091101e0db6f38eeddd028977c63cfe06d27
parent0c7e477c666e767f231fafe08e117669c64e5e14 (diff)
ath10k: disable uapsd autotrigger
Only userspace can make an educated decision when a trigger frame is required so make sure the autotrigger service is disabled. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 5331350d9dda..e3a3bbd41966 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3988,6 +3988,8 @@ static int ath10k_conf_tx_uapsd(struct ath10k *ar, struct ieee80211_vif *vif,
3988 u16 ac, bool enable) 3988 u16 ac, bool enable)
3989{ 3989{
3990 struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); 3990 struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
3991 struct wmi_sta_uapsd_auto_trig_arg arg = {};
3992 u32 prio = 0, acc = 0;
3991 u32 value = 0; 3993 u32 value = 0;
3992 int ret = 0; 3994 int ret = 0;
3993 3995
@@ -4000,18 +4002,26 @@ static int ath10k_conf_tx_uapsd(struct ath10k *ar, struct ieee80211_vif *vif,
4000 case IEEE80211_AC_VO: 4002 case IEEE80211_AC_VO:
4001 value = WMI_STA_PS_UAPSD_AC3_DELIVERY_EN | 4003 value = WMI_STA_PS_UAPSD_AC3_DELIVERY_EN |
4002 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN; 4004 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN;
4005 prio = 7;
4006 acc = 3;
4003 break; 4007 break;
4004 case IEEE80211_AC_VI: 4008 case IEEE80211_AC_VI:
4005 value = WMI_STA_PS_UAPSD_AC2_DELIVERY_EN | 4009 value = WMI_STA_PS_UAPSD_AC2_DELIVERY_EN |
4006 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN; 4010 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN;
4011 prio = 5;
4012 acc = 2;
4007 break; 4013 break;
4008 case IEEE80211_AC_BE: 4014 case IEEE80211_AC_BE:
4009 value = WMI_STA_PS_UAPSD_AC1_DELIVERY_EN | 4015 value = WMI_STA_PS_UAPSD_AC1_DELIVERY_EN |
4010 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN; 4016 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN;
4017 prio = 2;
4018 acc = 1;
4011 break; 4019 break;
4012 case IEEE80211_AC_BK: 4020 case IEEE80211_AC_BK:
4013 value = WMI_STA_PS_UAPSD_AC0_DELIVERY_EN | 4021 value = WMI_STA_PS_UAPSD_AC0_DELIVERY_EN |
4014 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN; 4022 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN;
4023 prio = 0;
4024 acc = 0;
4015 break; 4025 break;
4016 } 4026 }
4017 4027
@@ -4053,6 +4063,29 @@ static int ath10k_conf_tx_uapsd(struct ath10k *ar, struct ieee80211_vif *vif,
4053 return ret; 4063 return ret;
4054 } 4064 }
4055 4065
4066 if (test_bit(WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, ar->wmi.svc_map) ||
4067 test_bit(WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, ar->wmi.svc_map)) {
4068 /* Only userspace can make an educated decision when to send
4069 * trigger frame. The following effectively disables u-UAPSD
4070 * autotrigger in firmware (which is enabled by default
4071 * provided the autotrigger service is available).
4072 */
4073
4074 arg.wmm_ac = acc;
4075 arg.user_priority = prio;
4076 arg.service_interval = 0;
4077 arg.suspend_interval = WMI_STA_UAPSD_MAX_INTERVAL_MSEC;
4078 arg.delay_interval = WMI_STA_UAPSD_MAX_INTERVAL_MSEC;
4079
4080 ret = ath10k_wmi_vdev_sta_uapsd(ar, arvif->vdev_id,
4081 arvif->bssid, &arg, 1);
4082 if (ret) {
4083 ath10k_warn(ar, "failed to set uapsd auto trigger %d\n",
4084 ret);
4085 return ret;
4086 }
4087 }
4088
4056exit: 4089exit:
4057 return ret; 4090 return ret;
4058} 4091}