[RFT] ath10k: restart fw on tx-credit timeout

Ben Greear greearb at candelatech.com
Fri Feb 6 08:15:22 PST 2015


On 02/06/2015 04:05 AM, Michal Kazior wrote:
> It makes little sense to continue and let
> firmware-host state become inconsistent if a WMI
> command can't be submitted to firmware.
>
> This effectively prevents after-affects of
> tx-credit starvation bug which include spurious
> sta kickout events and inability to associate new
> stations after some time when acting as AP.
>
> This should also speed up recovery/teardown in
> some cases when firmware stops responding for some
> reason.

I have not seen a WMI timeout since I added keep-alive
and CE polling in my firmware, but the patch looks OK
to me.

You might add something about 'WMI' in that warning
message to make it more clear what is not being
responsive.  At least in my tests, I could continue
to receive network traffic while WMI was blocked.

Thanks,
Ben

>
> Signed-off-by: Michal Kazior <michal.kazior at tieto.com>
> ---
>   drivers/net/wireless/ath/ath10k/wmi.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
> index aeea1c7..776b257 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -1045,9 +1045,15 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id)
>   		(ret != -EAGAIN);
>   	}), 3*HZ);
>
> -	if (ret)
> +	if (ret) {
>   		dev_kfree_skb_any(skb);
>
> +		if (ret == -EAGAIN) {
> +			ath10k_warn(ar, "firmware unresponsive, restarting..\n");
> +			queue_work(ar->workqueue, &ar->restart_work);
> +		}
> +	}
> +
>   	return ret;
>   }
>
>


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




More information about the ath10k mailing list