2018-12-11 04:56:22

by Pradeep Kumar Chitrapu

[permalink] [raw]
Subject: [PATCH] ath10k: fix incorrect multicast/broadcast rate setting

From: Pradeep kumar Chitrapu <[email protected]>

Invalid rate code is sent to firmware when multicast rate value of 0 is
sent to driver indicating disabled case, causing broken mesh path.
so fix that.

Tested on QCA9984 with firmware 10.4-3.6.1-00827

Fixes: cd93b83ad92 ("ath10k: support for multicast rate control")
Co-developed-by: Zhi Chen <[email protected]>
Signed-off-by: Zhi Chen <[email protected]>
Signed-off-by: Pradeep Kumar Chitrapu <[email protected]>
---
drivers/net/wireless/ath/ath10k/mac.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 6771d8185af5..4546b73b2e45 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5486,8 +5486,8 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
- u8 rate, basic_rate_idx;
- int rateidx, ret = 0, hw_rate_code;
+ u8 rate, basic_rate_idx, rateidx;
+ int ret = 0, hw_rate_code, mcast_rate;
enum nl80211_band band;
const struct ieee80211_supported_band *sband;

@@ -5674,7 +5674,11 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_MCAST_RATE &&
!WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
band = def.chan->band;
- rateidx = vif->bss_conf.mcast_rate[band] - 1;
+ mcast_rate = vif->bss_conf.mcast_rate[band];
+ if (mcast_rate > 0)
+ rateidx = mcast_rate - 1;
+ else
+ rateidx = ffs(vif->bss_conf.basic_rates) - 1;

if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY)
rateidx += ATH10K_MAC_FIRST_OFDM_RATE_IDX;
--
1.9.1



2018-12-11 19:22:44

by Peter Oh

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix incorrect multicast/broadcast rate setting



On 12/10/2018 08:56 PM, Pradeep Kumar Chitrapu wrote:
> From: Pradeep kumar Chitrapu <[email protected]>
>
> Invalid rate code is sent to firmware when multicast rate value of 0 is
> sent to driver indicating disabled case, causing broken mesh path.
> so fix that.
>
> Tested on QCA9984 with firmware 10.4-3.6.1-00827
>
Test data is too small. You need to provide at least QCA9880 and QCA4019
data together which share ath10k for mesh.

Thanks,
Peter

2019-02-07 14:43:03

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix incorrect multicast/broadcast rate setting

Peter Oh <[email protected]> writes:

> On 12/10/2018 08:56 PM, Pradeep Kumar Chitrapu wrote:
>> From: Pradeep kumar Chitrapu <[email protected]>
>>
>> Invalid rate code is sent to firmware when multicast rate value of 0 is
>> sent to driver indicating disabled case, causing broken mesh path.
>> so fix that.
>>
>> Tested on QCA9984 with firmware 10.4-3.6.1-00827
>>
> Test data is too small. You need to provide at least QCA9880 and QCA4019
> data together which share ath10k for mesh.

Pradeep, did you test those? Or someone else?

But isn't the firmware almost the same on those hardware anyway?

--
Kalle Valo

2019-02-25 20:10:42

by Sven Eckelmann

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix incorrect multicast/broadcast rate setting

On Tuesday, 11 December 2018 05:56:11 CET Pradeep Kumar Chitrapu wrote:
> From: Pradeep kumar Chitrapu <[email protected]>
>
> Invalid rate code is sent to firmware when multicast rate value of 0 is
> sent to driver indicating disabled case, causing broken mesh path.
> so fix that.
>
> Tested on QCA9984 with firmware 10.4-3.6.1-00827
>
> Fixes: cd93b83ad92 ("ath10k: support for multicast rate control")
> Co-developed-by: Zhi Chen <[email protected]>
> Signed-off-by: Zhi Chen <[email protected]>
> Signed-off-by: Pradeep Kumar Chitrapu <[email protected]>

Tested-by: Sven Eckelmann <[email protected]>

Was tested on QCA988X with 10.2.4-1.0-00041

Kind regards,
Sven


Attachments:
signature.asc (833.00 B)
This is a digitally signed message part.

2019-02-26 09:23:39

by Sven Eckelmann

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix incorrect multicast/broadcast rate setting

On Monday, 25 February 2019 21:00:38 CET Sven Eckelmann wrote:
[...]
> Tested-by: Sven Eckelmann <[email protected]>
>
> Was tested on QCA988X with 10.2.4-1.0-00041

I just wanted to test it with 802.11s setup on IPQ4019 with 10.4-3.5.3-00057
and QCA9888 with 10.4-3.5.3-00053 (ath10k-firmware) and 10.4-3.6-00140
(linux-firmware 2018-12-16-211de167) for both. But it looks like the firmware
always crashes with and without this patch and 11s.

[ 221.620803] ath10k_pci 0000:01:00.0: wmi command 36967 timeout, restarting hardware
[ 221.744056] ieee80211 phy0: Hardware restart was requested
[ 225.130829] ath10k_pci 0000:01:00.0: failed to receive control response completion, polling..
[ 226.170824] ath10k_pci 0000:01:00.0: Service connect timeout
[ 226.170871] ath10k_pci 0000:01:00.0: failed to connect htt (-110)
[ 226.252248] ath10k_pci 0000:01:00.0: Could not init core: -110

If i count correctly, this is WMI_10_4_GPIO_CONFIG_CMDID. Not really supported
by upstream but it looks like there is an Openwrt private patch (not yet
accepted upstream [1])

package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch

which I have now removed to fix this problem for me.

The tests with 10.4-3.6-00140 and 10.4-3.5.3-* worked fine without this patch.

@Kalle are you expecting that he resents the patch again or can you just
append this information to the commit message? At least it looks at the moment
like there will be no new patch in the near future. But the
commit cd93b83ad92 ("ath10k: support for multicast rate control") is breaking
real world setups.

Kind regards,
Sven

[1] https://patchwork.kernel.org/patch/10327075/


Attachments:
signature.asc (833.00 B)
This is a digitally signed message part.

2019-04-03 12:28:25

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix incorrect multicast/broadcast rate setting

Sven Eckelmann <[email protected]> writes:

> On Monday, 25 February 2019 21:00:38 CET Sven Eckelmann wrote:
> [...]
>> Tested-by: Sven Eckelmann <[email protected]>
>>
>> Was tested on QCA988X with 10.2.4-1.0-00041
>
> I just wanted to test it with 802.11s setup on IPQ4019 with 10.4-3.5.3-00057
> and QCA9888 with 10.4-3.5.3-00053 (ath10k-firmware) and 10.4-3.6-00140
> (linux-firmware 2018-12-16-211de167) for both. But it looks like the firmware
> always crashes with and without this patch and 11s.
>
> [ 221.620803] ath10k_pci 0000:01:00.0: wmi command 36967 timeout, restarting hardware
> [ 221.744056] ieee80211 phy0: Hardware restart was requested
> [ 225.130829] ath10k_pci 0000:01:00.0: failed to receive control response completion, polling..
> [ 226.170824] ath10k_pci 0000:01:00.0: Service connect timeout
> [ 226.170871] ath10k_pci 0000:01:00.0: failed to connect htt (-110)
> [ 226.252248] ath10k_pci 0000:01:00.0: Could not init core: -110
>
> If i count correctly, this is WMI_10_4_GPIO_CONFIG_CMDID. Not really supported
> by upstream but it looks like there is an Openwrt private patch (not yet
> accepted upstream [1])
>
> package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
>
> which I have now removed to fix this problem for me.
>
> The tests with 10.4-3.6-00140 and 10.4-3.5.3-* worked fine without this patch.
>
> @Kalle are you expecting that he resents the patch again or can you just
> append this information to the commit message? At least it looks at the moment
> like there will be no new patch in the near future. But the
> commit cd93b83ad92 ("ath10k: support for multicast rate control") is breaking
> real world setups.

I'm planning to apply this. I was not sure what you wanted to add to the
commit log but I changed to now what's below. Please let me know if you
want to change it.

ath10k: fix incorrect multicast/broadcast rate setting

Invalid rate code is sent to firmware when multicast rate value of 0 is
sent to driver indicating disabled case, causing broken mesh path.
so fix that.

Tested on QCA9984 with firmware 10.4-3.6.1-00827

Sven tested on IPQ4019 with 10.4-3.5.3-00057 and QCA9888 with 10.4-3.5.3-00053
(ath10k-firmware) and 10.4-3.6-00140 (linux-firmware 2018-12-16-211de167).

Fixes: cd93b83ad92 ("ath10k: support for multicast rate control")
Co-developed-by: Zhi Chen <[email protected]>
Signed-off-by: Zhi Chen <[email protected]>
Signed-off-by: Pradeep Kumar Chitrapu <[email protected]>
Tested-by: Sven Eckelmann <[email protected]>
Patchwork-Id: 10723033
Signed-off-by: Kalle Valo <[email protected]>

--
Kalle Valo

2019-04-03 13:04:18

by Sven Eckelmann

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix incorrect multicast/broadcast rate setting

On Wednesday, 3 April 2019 14:28:16 CEST Kalle Valo wrote:
[...]
> I'm planning to apply this. I was not sure what you wanted to add to the
> commit log but I changed to now what's below. Please let me know if you
> want to change it.
>
> ath10k: fix incorrect multicast/broadcast rate setting
>
> Invalid rate code is sent to firmware when multicast rate value of 0 is
> sent to driver indicating disabled case, causing broken mesh path.
> so fix that.
>
> Tested on QCA9984 with firmware 10.4-3.6.1-00827
>
> Sven tested on IPQ4019 with 10.4-3.5.3-00057 and QCA9888 with 10.4-3.5.3-00053
> (ath10k-firmware) and 10.4-3.6-00140 (linux-firmware 2018-12-16-211de167).
>
> Fixes: cd93b83ad92 ("ath10k: support for multicast rate control")
> Co-developed-by: Zhi Chen <[email protected]>
> Signed-off-by: Zhi Chen <[email protected]>
> Signed-off-by: Pradeep Kumar Chitrapu <[email protected]>
> Tested-by: Sven Eckelmann <[email protected]>
> Patchwork-Id: 10723033
> Signed-off-by: Kalle Valo <[email protected]>

I thought you just wanted to have this information added to the "Tested on "
line by him. So I didn't really invest time to propose a new paragraph.

The new paragraph is fine for me.

Kind regards,
Sven


Attachments:
signature.asc (833.00 B)
This is a digitally signed message part.

2019-04-29 14:44:04

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix incorrect multicast/broadcast rate setting

Pradeep Kumar Chitrapu <[email protected]> wrote:

> Invalid rate code is sent to firmware when multicast rate value of 0 is
> sent to driver indicating disabled case, causing broken mesh path.
> so fix that.
>
> Tested on QCA9984 with firmware 10.4-3.6.1-00827
>
> Sven tested on IPQ4019 with 10.4-3.5.3-00057 and QCA9888 with 10.4-3.5.3-00053
> (ath10k-firmware) and 10.4-3.6-00140 (linux-firmware 2018-12-16-211de167).
>
> Fixes: cd93b83ad92 ("ath10k: support for multicast rate control")
> Co-developed-by: Zhi Chen <[email protected]>
> Signed-off-by: Zhi Chen <[email protected]>
> Signed-off-by: Pradeep Kumar Chitrapu <[email protected]>
> Tested-by: Sven Eckelmann <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

93ee3d108fc7 ath10k: fix incorrect multicast/broadcast rate setting

--
https://patchwork.kernel.org/patch/10723033/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches