From: Kalle Valo <kvalo@kernel.org>
To: Kang Yang <quic_kangyang@quicinc.com>
Cc: <ath12k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 03/10] wifi: ath12k: implement handling of P2P NoA event
Date: Wed, 17 Jan 2024 15:22:33 +0200 [thread overview]
Message-ID: <87h6jc5c2u.fsf@kernel.org> (raw)
In-Reply-To: <20240112092824.7664-4-quic_kangyang@quicinc.com> (Kang Yang's message of "Fri, 12 Jan 2024 17:28:17 +0800")
Kang Yang <quic_kangyang@quicinc.com> writes:
> The NoA(Notice of Absence) attribute is used by the P2P Group Owner to
> signal its absence due to power save timing, concurrent operation, or
> off-channel scanning. It is also used in the P2P Presence Request-Response
> mechanism.
>
> The NoA attribute shall be present in the P2P IE in the beacon frames
> transmitted by a P2P Group Owner when a NoA schedule is being advertised,
> or when the CTWindow is non-zero.
>
> So add support to update P2P information after P2P GO is up through
> event WMI_P2P_NOA_EVENTID, and always put it in probe resp.
>
> Create p2p.c and p2p.h for P2P related functions and definitions.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
[...]
> +static void ath12k_mac_add_p2p_noa_ie(struct ath12k *ar,
> + struct ieee80211_vif *vif,
> + struct sk_buff *skb,
> + bool is_prb_rsp)
> +{
> + struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
> +
> + if (likely(!is_prb_rsp))
> + return;
> +
> + spin_lock_bh(&ar->data_lock);
> + if (arvif->u.ap.noa_data)
> + if (!pskb_expand_head(skb, 0, arvif->u.ap.noa_len,
> + GFP_ATOMIC))
> + skb_put_data(skb, arvif->u.ap.noa_data,
> + arvif->u.ap.noa_len);
> + spin_unlock_bh(&ar->data_lock);
> +}
The if checks can be simplified and please add empty lines:
spin_lock_bh(&ar->data_lock);
if (arvif->u.ap.noa_data &&
!pskb_expand_head(skb, 0, arvif->u.ap.noa_len, GFP_ATOMIC))
skb_put_data(skb, arvif->u.ap.noa_data,
arvif->u.ap.noa_len);
spin_unlock_bh(&ar->data_lock);
Though I'm not really fond of the idea having pskb_expand_head() call
within the if check but I guess it's the cleanest option here.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-01-17 13:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 9:28 [PATCH v2 00/10] wifi: ath12k: P2P support for WCN7850 Kang Yang
2024-01-12 9:28 ` [PATCH v2 01/10] wifi: ath12k: change interface combination for P2P mode Kang Yang
2024-01-13 1:15 ` Jeff Johnson
2024-01-12 9:28 ` [PATCH v2 02/10] wifi: ath12k: add P2P IE in beacon template Kang Yang
2024-01-13 1:16 ` Jeff Johnson
2024-01-12 9:28 ` [PATCH v2 03/10] wifi: ath12k: implement handling of P2P NoA event Kang Yang
2024-01-13 1:22 ` Jeff Johnson
2024-01-13 1:35 ` Karthikeyan Periyasamy
2024-01-13 2:05 ` Jeff Johnson
2024-01-17 13:22 ` Kalle Valo [this message]
2024-01-12 9:28 ` [PATCH v2 04/10] wifi: ath12k: implement remain on channel for P2P mode Kang Yang
2024-01-13 1:23 ` Jeff Johnson
2024-01-13 1:44 ` Karthikeyan Periyasamy
2024-01-12 9:28 ` [PATCH v2 05/10] wifi: ath12k: change WLAN_SCAN_PARAMS_MAX_IE_LEN from 256 to 512 Kang Yang
2024-01-13 1:25 ` Jeff Johnson
2024-01-12 9:28 ` [PATCH v2 06/10] wifi: ath12k: allow specific mgmt frame tx while vdev is not up Kang Yang
2024-01-13 1:28 ` Jeff Johnson
2024-01-12 9:28 ` [PATCH v2 07/10] wifi: ath12k: fix broken structure wmi_vdev_create_cmd Kang Yang
2024-01-13 1:29 ` Jeff Johnson
2024-01-12 9:28 ` [PATCH v2 08/10] wifi: ath12k: move peer delete after vdev stop of station for WCN7850 Kang Yang
2024-01-13 1:30 ` Jeff Johnson
2024-01-12 9:28 ` [PATCH v2 09/10] wifi: ath12k: designating channel frequency for ROC scan Kang Yang
2024-01-13 1:31 ` Jeff Johnson
2024-01-12 9:28 ` [PATCH v2 10/10] wifi: ath12k: advertise P2P dev support for WCN7850 Kang Yang
2024-01-13 1:32 ` Jeff Johnson
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=87h6jc5c2u.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_kangyang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox