All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Baochen Qiang <quic_bqiang@quicinc.com>
Cc: <ath11k@lists.infradead.org>,  <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v3] ath11k: Handle keepalive during WoWLAN suspend and resume
Date: Fri, 06 May 2022 09:32:49 +0300	[thread overview]
Message-ID: <87fsln9nn2.fsf@kernel.org> (raw)
In-Reply-To: <20220506012540.1579604-1-quic_bqiang@quicinc.com> (Baochen Qiang's message of "Fri, 6 May 2022 09:25:40 +0800")

Baochen Qiang <quic_bqiang@quicinc.com> writes:

> With WoWLAN enabled and after sleeping for a rather long time,
> we are seeing that with some APs, it is not able to wake up
> the STA though the correct wake up pattern has been configured.
> This is because the host doesn't send keepalive command to
> firmware, thus firmware will not send any packet to the AP and
> after a specific time the AP kicks out the STA.
>
> Fix this issue by enabling keepalive before going to suspend
> and disabling it after resume back.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>

[...]

> +int ath11k_wmi_sta_keepalive(struct ath11k *ar,
> +			     const struct wmi_sta_keepalive_arg *arg)
> +{
> +	struct ath11k_pdev_wmi *wmi = ar->wmi;
> +	struct wmi_sta_keepalive_cmd *cmd;
> +	struct wmi_sta_keepalive_arp_resp *arp;
> +	struct sk_buff *skb;
> +	size_t len;
> +
> +	len = sizeof(*cmd) + sizeof(*arp);
> +	skb = ath11k_wmi_alloc_skb(wmi->wmi_ab, len);
> +	if (!skb)
> +		return -ENOMEM;
> +
> +	cmd = (struct wmi_sta_keepalive_cmd *)skb->data;
> +	cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG,
> +				     WMI_TAG_STA_KEEPALIVE_CMD) |
> +				     FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
> +	cmd->vdev_id = arg->vdev_id;
> +	cmd->enabled = arg->enabled;
> +	cmd->interval = arg->interval;
> +	cmd->method = arg->method;
> +
> +	if (arg->method == WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE ||
> +	    arg->method == WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST) {
> +		arp = (struct wmi_sta_keepalive_arp_resp *)(cmd + 1);
> +		arp->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_STA_KEEPALVE_ARP_RESPONSE) |
> +				 FIELD_PREP(WMI_TLV_LEN, sizeof(*arp) - TLV_HDR_SIZE);

This added a new warning:

drivers/net/wireless/ath/ath11k/wmi.c:8989: line length of 94 exceeds 90 columns

I fixed it in the pending branch, no need to resend because of this.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@kernel.org>
To: Baochen Qiang <quic_bqiang@quicinc.com>
Cc: <ath11k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v3] ath11k: Handle keepalive during WoWLAN suspend and resume
Date: Fri, 06 May 2022 09:32:49 +0300	[thread overview]
Message-ID: <87fsln9nn2.fsf@kernel.org> (raw)
In-Reply-To: <20220506012540.1579604-1-quic_bqiang@quicinc.com> (Baochen Qiang's message of "Fri, 6 May 2022 09:25:40 +0800")

Baochen Qiang <quic_bqiang@quicinc.com> writes:

> With WoWLAN enabled and after sleeping for a rather long time,
> we are seeing that with some APs, it is not able to wake up
> the STA though the correct wake up pattern has been configured.
> This is because the host doesn't send keepalive command to
> firmware, thus firmware will not send any packet to the AP and
> after a specific time the AP kicks out the STA.
>
> Fix this issue by enabling keepalive before going to suspend
> and disabling it after resume back.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>

[...]

> +int ath11k_wmi_sta_keepalive(struct ath11k *ar,
> +			     const struct wmi_sta_keepalive_arg *arg)
> +{
> +	struct ath11k_pdev_wmi *wmi = ar->wmi;
> +	struct wmi_sta_keepalive_cmd *cmd;
> +	struct wmi_sta_keepalive_arp_resp *arp;
> +	struct sk_buff *skb;
> +	size_t len;
> +
> +	len = sizeof(*cmd) + sizeof(*arp);
> +	skb = ath11k_wmi_alloc_skb(wmi->wmi_ab, len);
> +	if (!skb)
> +		return -ENOMEM;
> +
> +	cmd = (struct wmi_sta_keepalive_cmd *)skb->data;
> +	cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG,
> +				     WMI_TAG_STA_KEEPALIVE_CMD) |
> +				     FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
> +	cmd->vdev_id = arg->vdev_id;
> +	cmd->enabled = arg->enabled;
> +	cmd->interval = arg->interval;
> +	cmd->method = arg->method;
> +
> +	if (arg->method == WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE ||
> +	    arg->method == WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST) {
> +		arp = (struct wmi_sta_keepalive_arp_resp *)(cmd + 1);
> +		arp->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_STA_KEEPALVE_ARP_RESPONSE) |
> +				 FIELD_PREP(WMI_TLV_LEN, sizeof(*arp) - TLV_HDR_SIZE);

This added a new warning:

drivers/net/wireless/ath/ath11k/wmi.c:8989: line length of 94 exceeds 90 columns

I fixed it in the pending branch, no need to resend because of this.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

  reply	other threads:[~2022-05-06  6:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06  1:25 [PATCH v3] ath11k: Handle keepalive during WoWLAN suspend and resume Baochen Qiang
2022-05-06  1:25 ` Baochen Qiang
2022-05-06  6:32 ` Kalle Valo [this message]
2022-05-06  6:32   ` Kalle Valo
2022-05-10 16:29 ` Kalle Valo
2022-05-10 16:29   ` Kalle Valo
2022-05-10 16:30 ` Kalle Valo
2022-05-10 16:30   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsln9nn2.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_bqiang@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.