linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: request firmware flush in ath10k_flush.
@ 2014-09-19 18:28 greearb
  2014-09-23  9:16 ` Michal Kazior
  0 siblings, 1 reply; 7+ messages in thread
From: greearb @ 2014-09-19 18:28 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath10k, Ben Greear

From: Ben Greear <greearb@candelatech.com>

CT firmware now supports flushing all tids for all
peers for all vdevs.  This appears to help the ath10k_flush
logic work faster and not cause timeouts.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---

This requires the previously-sent patch that enables the
ATH10K_FW_FEATURE_WMI_10X_CT feature bit.  This patch provide
a nice improvement in stability and flush performance in my
testing scenarios.

 drivers/net/wireless/ath/ath10k/mac.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index af24f6c..6014856 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3830,6 +3830,7 @@ static void ath10k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	struct ath10k *ar = hw->priv;
 	bool skip;
 	int ret;
+	u8 peer_addr[ETH_ALEN] = {0};
 
 	/* mac80211 doesn't care if we really xmit queued frames or not
 	 * we'll collect those frames either way if we stop/delete vdevs */
@@ -3841,6 +3842,12 @@ static void ath10k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	if (ar->state == ATH10K_STATE_WEDGED)
 		goto skip;
 
+	/* If we are CT firmware, ask it to flush all tids on all peers on
+	 * all vdevs.  Normal firmware will just crash if you do this.
+	 */
+	if (test_bit(ATH10K_FW_FEATURE_WMI_10X_CT, ar->fw_features))
+		ath10k_wmi_peer_flush(ar, 0xFFFFFFFF, peer_addr, 0xFFFFFFFF);
+
 	ret = wait_event_timeout(ar->htt.empty_tx_wq, ({
 			bool empty;
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ath10k: request firmware flush in ath10k_flush.
  2014-09-19 18:28 [PATCH] ath10k: request firmware flush in ath10k_flush greearb
@ 2014-09-23  9:16 ` Michal Kazior
  2014-09-23 14:19   ` Ben Greear
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Kazior @ 2014-09-23  9:16 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless, ath10k@lists.infradead.org

On 19 September 2014 20:28,  <greearb@candelatech.com> wrote:
[...]
> +       /* If we are CT firmware, ask it to flush all tids on all peers on
> +        * all vdevs.  Normal firmware will just crash if you do this.
> +        */
> +       if (test_bit(ATH10K_FW_FEATURE_WMI_10X_CT, ar->fw_features))
> +               ath10k_wmi_peer_flush(ar, 0xFFFFFFFF, peer_addr, 0xFFFFFFFF);

I recall you've explained this some time ago, but can you refresh my
memory, please? Is this any different from iterating over all peers
and flushing each? Or does your firmware do so extra magic that is
impossible to do with normal firmware commands?


Michał

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ath10k: request firmware flush in ath10k_flush.
  2014-09-23  9:16 ` Michal Kazior
@ 2014-09-23 14:19   ` Ben Greear
  2014-09-24  6:50     ` Michal Kazior
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Greear @ 2014-09-23 14:19 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k@lists.infradead.org



On 09/23/2014 02:16 AM, Michal Kazior wrote:
> On 19 September 2014 20:28,  <greearb@candelatech.com> wrote:
> [...]
>> +       /* If we are CT firmware, ask it to flush all tids on all peers on
>> +        * all vdevs.  Normal firmware will just crash if you do this.
>> +        */
>> +       if (test_bit(ATH10K_FW_FEATURE_WMI_10X_CT, ar->fw_features))
>> +               ath10k_wmi_peer_flush(ar, 0xFFFFFFFF, peer_addr, 0xFFFFFFFF);
>
> I recall you've explained this some time ago, but can you refresh my
> memory, please? Is this any different from iterating over all peers
> and flushing each? Or does your firmware do so extra magic that is
> impossible to do with normal firmware commands?

My firmware does that iteration internally.

You could probably do that in the driver, but it would be a lot
of messages (for all vdevs, all peers, all tids)...
I was not sure if there were limits to the number
of commands you should attempt during the flush...

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ath10k: request firmware flush in ath10k_flush.
  2014-09-23 14:19   ` Ben Greear
@ 2014-09-24  6:50     ` Michal Kazior
  2014-09-24 16:13       ` Ben Greear
  2014-09-29 10:53       ` Kalle Valo
  0 siblings, 2 replies; 7+ messages in thread
From: Michal Kazior @ 2014-09-24  6:50 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless, ath10k@lists.infradead.org

On 23 September 2014 16:19, Ben Greear <greearb@candelatech.com> wrote:
> On 09/23/2014 02:16 AM, Michal Kazior wrote:
>> On 19 September 2014 20:28,  <greearb@candelatech.com> wrote:
>> [...]
>>>
>>> +       /* If we are CT firmware, ask it to flush all tids on all peers
>>> on
>>> +        * all vdevs.  Normal firmware will just crash if you do this.
>>> +        */
>>> +       if (test_bit(ATH10K_FW_FEATURE_WMI_10X_CT, ar->fw_features))
>>> +               ath10k_wmi_peer_flush(ar, 0xFFFFFFFF, peer_addr,
>>> 0xFFFFFFFF);
>>
>> I recall you've explained this some time ago, but can you refresh my
>> memory, please? Is this any different from iterating over all peers
>> and flushing each? Or does your firmware do so extra magic that is
>> impossible to do with normal firmware commands?
>
> My firmware does that iteration internally.
>
> You could probably do that in the driver, but it would be a lot
> of messages (for all vdevs, all peers, all tids)...
> I was not sure if there were limits to the number
> of commands you should attempt during the flush...

Thanks. I think ath10k should do this instead of having CT-specific
flush eventually.

I recall I actually did per-peer flushing in RFC patches a long time
ago but I didn't pursue getting them merged. I think Denton uses these
patches in his setup. They don't flush vdev self-peers though (do you
do that internally?).


Michał

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ath10k: request firmware flush in ath10k_flush.
  2014-09-24  6:50     ` Michal Kazior
@ 2014-09-24 16:13       ` Ben Greear
  2014-09-29 10:53       ` Kalle Valo
  1 sibling, 0 replies; 7+ messages in thread
From: Ben Greear @ 2014-09-24 16:13 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k@lists.infradead.org

On 09/23/2014 11:50 PM, Michal Kazior wrote:
> On 23 September 2014 16:19, Ben Greear <greearb@candelatech.com> wrote:
>> On 09/23/2014 02:16 AM, Michal Kazior wrote:
>>> On 19 September 2014 20:28,  <greearb@candelatech.com> wrote:
>>> [...]
>>>>
>>>> +       /* If we are CT firmware, ask it to flush all tids on all peers
>>>> on
>>>> +        * all vdevs.  Normal firmware will just crash if you do this.
>>>> +        */
>>>> +       if (test_bit(ATH10K_FW_FEATURE_WMI_10X_CT, ar->fw_features))
>>>> +               ath10k_wmi_peer_flush(ar, 0xFFFFFFFF, peer_addr,
>>>> 0xFFFFFFFF);
>>>
>>> I recall you've explained this some time ago, but can you refresh my
>>> memory, please? Is this any different from iterating over all peers
>>> and flushing each? Or does your firmware do so extra magic that is
>>> impossible to do with normal firmware commands?
>>
>> My firmware does that iteration internally.
>>
>> You could probably do that in the driver, but it would be a lot
>> of messages (for all vdevs, all peers, all tids)...
>> I was not sure if there were limits to the number
>> of commands you should attempt during the flush...
> 
> Thanks. I think ath10k should do this instead of having CT-specific
> flush eventually.

Yes, though I would still like the optimization enabled if my
firmware is running...

> I recall I actually did per-peer flushing in RFC patches a long time
> ago but I didn't pursue getting them merged. I think Denton uses these
> patches in his setup. They don't flush vdev self-peers though (do you
> do that internally?).

I think I do.  Let me check, and send you some details privately.

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ath10k: request firmware flush in ath10k_flush.
  2014-09-24  6:50     ` Michal Kazior
  2014-09-24 16:13       ` Ben Greear
@ 2014-09-29 10:53       ` Kalle Valo
  2014-09-29 15:58         ` Ben Greear
  1 sibling, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2014-09-29 10:53 UTC (permalink / raw)
  To: Michal Kazior; +Cc: Ben Greear, linux-wireless, ath10k@lists.infradead.org

Michal Kazior <michal.kazior@tieto.com> writes:

> On 23 September 2014 16:19, Ben Greear <greearb@candelatech.com> wrote:
>> On 09/23/2014 02:16 AM, Michal Kazior wrote:
>>> On 19 September 2014 20:28,  <greearb@candelatech.com> wrote:
>>> [...]
>>>>
>>>> +       /* If we are CT firmware, ask it to flush all tids on all peers
>>>> on
>>>> +        * all vdevs.  Normal firmware will just crash if you do this.
>>>> +        */
>>>> +       if (test_bit(ATH10K_FW_FEATURE_WMI_10X_CT, ar->fw_features))
>>>> +               ath10k_wmi_peer_flush(ar, 0xFFFFFFFF, peer_addr,
>>>> 0xFFFFFFFF);
>>>
>>> I recall you've explained this some time ago, but can you refresh my
>>> memory, please? Is this any different from iterating over all peers
>>> and flushing each? Or does your firmware do so extra magic that is
>>> impossible to do with normal firmware commands?
>>
>> My firmware does that iteration internally.
>>
>> You could probably do that in the driver, but it would be a lot
>> of messages (for all vdevs, all peers, all tids)...
>> I was not sure if there were limits to the number
>> of commands you should attempt during the flush...
>
> Thanks. I think ath10k should do this instead of having CT-specific
> flush eventually.

I agree. We should not be forking functionality unless absolutely
necessary.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ath10k: request firmware flush in ath10k_flush.
  2014-09-29 10:53       ` Kalle Valo
@ 2014-09-29 15:58         ` Ben Greear
  0 siblings, 0 replies; 7+ messages in thread
From: Ben Greear @ 2014-09-29 15:58 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Michal Kazior, linux-wireless, ath10k@lists.infradead.org

On 09/29/2014 03:53 AM, Kalle Valo wrote:

>> Thanks. I think ath10k should do this instead of having CT-specific
>> flush eventually.
> 
> I agree. We should not be forking functionality unless absolutely
> necessary.

Ok, this patch is easy to carry in my own tree.

But, for things upstream firmware just cannot support,
like tx-rate-status and rx-software-crypt, how do you
want it flagged in the driver?  Can I get the CT firmware
flag in for that, or does it have to be some other way?

If you just will not accept any such patch, let me know so
I can quite bothering you about it.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-29 15:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-19 18:28 [PATCH] ath10k: request firmware flush in ath10k_flush greearb
2014-09-23  9:16 ` Michal Kazior
2014-09-23 14:19   ` Ben Greear
2014-09-24  6:50     ` Michal Kazior
2014-09-24 16:13       ` Ben Greear
2014-09-29 10:53       ` Kalle Valo
2014-09-29 15:58         ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).