aab435bccd50b7b5866045266024b57ac797a3ab
[openwrt/staging/wigyori.git] / package / kernel / ath10k-ct / patches / 164-ath10k-commit-rates-from-mac80211.patch
1 From: Sven Eckelmann <sven@narfation.org>
2 Date: Tue, 26 Feb 2019 08:06:35 +0100
3 Subject: ath10k-ct: apply mac80211 rates to ath10k-ct rate state
4
5 The rates from mac80211 have to be copied to the state of ath10k-ct or
6 otherwise the ath10k_check_apply_special_rates function overwrites
7 them again with some default values. This breaks for example the
8 mcast_rate set for a wifi-iface.
9
10 Signed-off-by: Sven Eckelmann <sven@narfation.org>
11
12 --- a/ath10k-4.19/mac.c
13 +++ b/ath10k-4.19/mac.c
14 @@ -6617,6 +6617,7 @@ static void ath10k_bss_info_changed(stru
15 "mac vdev %d mcast_rate %x\n",
16 arvif->vdev_id, rate);
17
18 + arvif->mcast_rate[band] = rate;
19 vdev_param = ar->wmi.vdev_param->mcast_data_rate;
20 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
21 vdev_param, rate);
22 @@ -6625,6 +6626,7 @@ static void ath10k_bss_info_changed(stru
23 "failed to set mcast rate on vdev %i: %d\n",
24 arvif->vdev_id, ret);
25
26 + arvif->bcast_rate[band] = rate;
27 vdev_param = ar->wmi.vdev_param->bcast_data_rate;
28 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
29 vdev_param, rate);
30 @@ -6651,6 +6653,7 @@ static void ath10k_bss_info_changed(stru
31 return;
32 }
33
34 + arvif->mgt_rate[def.chan->band] = hw_rate_code;
35 vdev_param = ar->wmi.vdev_param->mgmt_rate;
36 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
37 hw_rate_code);
38 --- a/ath10k-5.2/mac.c
39 +++ b/ath10k-5.2/mac.c
40 @@ -6732,6 +6732,7 @@ static void ath10k_bss_info_changed(stru
41 "mac vdev %d mcast_rate %x\n",
42 arvif->vdev_id, rate);
43
44 + arvif->mcast_rate[band] = rate;
45 vdev_param = ar->wmi.vdev_param->mcast_data_rate;
46 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
47 vdev_param, rate);
48 @@ -6740,6 +6741,7 @@ static void ath10k_bss_info_changed(stru
49 "failed to set mcast rate on vdev %i: %d\n",
50 arvif->vdev_id, ret);
51
52 + arvif->bcast_rate[band] = rate;
53 vdev_param = ar->wmi.vdev_param->bcast_data_rate;
54 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
55 vdev_param, rate);
56 @@ -6766,6 +6768,7 @@ static void ath10k_bss_info_changed(stru
57 return;
58 }
59
60 + arvif->mgt_rate[def.chan->band] = hw_rate_code;
61 vdev_param = ar->wmi.vdev_param->mgmt_rate;
62 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
63 hw_rate_code);