mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
0c7e477c66
commit
b0e5615493
|
@ -3988,6 +3988,8 @@ static int ath10k_conf_tx_uapsd(struct ath10k *ar, struct ieee80211_vif *vif,
|
||||||
u16 ac, bool enable)
|
u16 ac, bool enable)
|
||||||
{
|
{
|
||||||
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
|
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
|
||||||
|
struct wmi_sta_uapsd_auto_trig_arg arg = {};
|
||||||
|
u32 prio = 0, acc = 0;
|
||||||
u32 value = 0;
|
u32 value = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -4000,18 +4002,26 @@ static int ath10k_conf_tx_uapsd(struct ath10k *ar, struct ieee80211_vif *vif,
|
||||||
case IEEE80211_AC_VO:
|
case IEEE80211_AC_VO:
|
||||||
value = WMI_STA_PS_UAPSD_AC3_DELIVERY_EN |
|
value = WMI_STA_PS_UAPSD_AC3_DELIVERY_EN |
|
||||||
WMI_STA_PS_UAPSD_AC3_TRIGGER_EN;
|
WMI_STA_PS_UAPSD_AC3_TRIGGER_EN;
|
||||||
|
prio = 7;
|
||||||
|
acc = 3;
|
||||||
break;
|
break;
|
||||||
case IEEE80211_AC_VI:
|
case IEEE80211_AC_VI:
|
||||||
value = WMI_STA_PS_UAPSD_AC2_DELIVERY_EN |
|
value = WMI_STA_PS_UAPSD_AC2_DELIVERY_EN |
|
||||||
WMI_STA_PS_UAPSD_AC2_TRIGGER_EN;
|
WMI_STA_PS_UAPSD_AC2_TRIGGER_EN;
|
||||||
|
prio = 5;
|
||||||
|
acc = 2;
|
||||||
break;
|
break;
|
||||||
case IEEE80211_AC_BE:
|
case IEEE80211_AC_BE:
|
||||||
value = WMI_STA_PS_UAPSD_AC1_DELIVERY_EN |
|
value = WMI_STA_PS_UAPSD_AC1_DELIVERY_EN |
|
||||||
WMI_STA_PS_UAPSD_AC1_TRIGGER_EN;
|
WMI_STA_PS_UAPSD_AC1_TRIGGER_EN;
|
||||||
|
prio = 2;
|
||||||
|
acc = 1;
|
||||||
break;
|
break;
|
||||||
case IEEE80211_AC_BK:
|
case IEEE80211_AC_BK:
|
||||||
value = WMI_STA_PS_UAPSD_AC0_DELIVERY_EN |
|
value = WMI_STA_PS_UAPSD_AC0_DELIVERY_EN |
|
||||||
WMI_STA_PS_UAPSD_AC0_TRIGGER_EN;
|
WMI_STA_PS_UAPSD_AC0_TRIGGER_EN;
|
||||||
|
prio = 0;
|
||||||
|
acc = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4053,6 +4063,29 @@ static int ath10k_conf_tx_uapsd(struct ath10k *ar, struct ieee80211_vif *vif,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (test_bit(WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, ar->wmi.svc_map) ||
|
||||||
|
test_bit(WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, ar->wmi.svc_map)) {
|
||||||
|
/* Only userspace can make an educated decision when to send
|
||||||
|
* trigger frame. The following effectively disables u-UAPSD
|
||||||
|
* autotrigger in firmware (which is enabled by default
|
||||||
|
* provided the autotrigger service is available).
|
||||||
|
*/
|
||||||
|
|
||||||
|
arg.wmm_ac = acc;
|
||||||
|
arg.user_priority = prio;
|
||||||
|
arg.service_interval = 0;
|
||||||
|
arg.suspend_interval = WMI_STA_UAPSD_MAX_INTERVAL_MSEC;
|
||||||
|
arg.delay_interval = WMI_STA_UAPSD_MAX_INTERVAL_MSEC;
|
||||||
|
|
||||||
|
ret = ath10k_wmi_vdev_sta_uapsd(ar, arvif->vdev_id,
|
||||||
|
arvif->bssid, &arg, 1);
|
||||||
|
if (ret) {
|
||||||
|
ath10k_warn(ar, "failed to set uapsd auto trigger %d\n",
|
||||||
|
ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue