From: Kalle Valo <kvalo@codeaurora.org>
To: mpubbise@codeaurora.org
Cc: Carl Huang <cjhuang@codeaurora.org>,
ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
cjhuang=codeaurora.org@codeaurora.org
Subject: Re: [PATCH] ath11k: enable power save in station mode
Date: Thu, 28 Oct 2021 15:19:30 +0300 [thread overview]
Message-ID: <87wnlx4a0d.fsf@codeaurora.org> (raw)
In-Reply-To: <f4457c0027a70d996eb5930a334a9832@codeaurora.org> (mpubbise's message of "Thu, 28 Oct 2021 10:53:34 +0530")
mpubbise@codeaurora.org writes:
> On 2021-10-12 00:36, Carl Huang wrote:
>> Enable power save in station mode.
>>
>> Run "iw dev wls1 set power_save off", check there is no NULL Data
>> frame
>> from sniffer. Run "iw dev wls1 set power_save on", check there is NULL
>> Data frame from sniffer.
>>
>> Tested-on: QCA6390 hw2.0 PCI
>> WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>>
>> Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
[...]
>> +int ath11k_wmi_set_psmode(struct ath11k *ar, u32 vdev_id,
>> + enum wmi_sta_ps_mode psmode)
>> +{
>> + struct ath11k_pdev_wmi *wmi = ar->wmi;
>> + struct wmi_sta_powersave_mode_cmd *cmd;
>> + struct sk_buff *skb;
>> + int ret;
>> +
>> + skb = ath11k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd));
>> + if (!skb)
>> + return -ENOMEM;
>> +
>> + cmd = (struct wmi_sta_powersave_mode_cmd *)skb->data;
>> + cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG,
>> + WMI_TAG_STA_POWERSAVE_MODE_CMD) |
>> + FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
>> +
>> + cmd->vdev_id = vdev_id;
>> + cmd->sta_ps_mode = psmode;
>> +
>> + ath11k_dbg(ar->ab, ATH11K_DBG_WMI,
>> + "WMI set sta ps vdev_id %d ps %d\n",
>> + vdev_id, psmode);
>> +
>> + ret = ath11k_wmi_cmd_send(wmi, skb, WMI_STA_POWERSAVE_MODE_CMDID);
>> + if (ret) {
>> + ath11k_warn(ar->ab, "failed to send WMI_STA_POWERSAVE_PARAM_CMDID");
>> + dev_kfree_skb(skb);
>> + }
>> +
>> + return ret;
>> +}
>
> An API which does this is already present in ATH11K, you may have to
> take a look at ath11k_wmi_pdev_set_ps_mode() ?
Good catch, I'll fix this in v2.
And please do trim your replies, quotes over 200 lines long make it hard
to read.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2021-10-28 12:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 19:06 [PATCH] ath11k: enable power save in station mode Carl Huang
2021-10-20 8:14 ` Kalle Valo
2021-10-28 12:16 ` Kalle Valo
2021-10-28 5:23 ` mpubbise
2021-10-28 12:19 ` Kalle Valo [this message]
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=87wnlx4a0d.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=cjhuang=codeaurora.org@codeaurora.org \
--cc=cjhuang@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mpubbise@codeaurora.org \
/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 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).