From: Ping-Ke Shih <pkshih@realtek.com>
To: Kalle Valo <kvalo@kernel.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Zong-Zhe Yang <kevin_yang@realtek.com>
Subject: RE: [PATCH v2 1/6] wifi: rtw89: 8922a: configure AP_LINK_PS if FW supports
Date: Wed, 20 Nov 2024 03:11:40 +0000 [thread overview]
Message-ID: <9ac0fb9682e74b3f89b92be245f61998@realtek.com> (raw)
In-Reply-To: <87mshwvhz2.fsf@kernel.org>
Kalle Valo <kvalo@kernel.org> wrote:
> Ping-Ke Shih <pkshih@realtek.com> writes:
>
> > From: Zong-Zhe Yang <kevin_yang@realtek.com>
> >
> > After FW v0.35.46.0, for AP mode, RTL8922A FW supports a new FW feature,
> > called NOTIFY_AP_INFO, to notify driver information related to AP mode.
> > And, one function of it is to monitor PS states of remote stations. Once
> > one of them changes, FW will send a C2H event to tell driver. With this
> > FW feature, we can declare AP_LINK_PS.
> >
> > For now, driver still needs to determine if a frame is ps-poll or U-APSD
> > trigger. So, add the corresponding RX handling in driver, which activates
> > only when at least one AP is running.
> >
> > Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
>
> [...]
>
> > +static inline void rtw89_assoc_link_clr(struct rtw89_sta_link *rtwsta_link)
> > +{
> > + struct rtw89_sta *rtwsta = rtwsta_link->rtwsta;
> > + struct rtw89_dev *rtwdev = rtwsta->rtwdev;
> > +
> > + rcu_assign_pointer(rtwdev->assoc_link_on_macid[rtwsta_link->mac_id],
> > + NULL);
> > + synchronize_rcu();
> > +}
>
> In ath12k patches I got feedback that synchronize_rcu() should not be
> used unless we explicitly need it, for example if if we free something
> or similar. Just wanted to mention this, up to you if you want to keep
> it or not.
The 'rtwdev->assoc_link_on_macid[rtwsta_link->mac_id]' is to store pointer of
rtwsta that is drv_priv [] of ieee80211_sta. After returning from this
function (disassoc), ieee80211_sta is going to be freed by kfree, no other
synchronize_rcu(), so I think this is necessary here.
Thanks for your reminder.
next prev parent reply other threads:[~2024-11-20 3:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 4:02 [PATCH v2 0/6] wifi: rtw89: preparation for MLO including AP_LINK_PS feature, ieee80211_ops and links Ping-Ke Shih
2024-11-18 4:02 ` [PATCH v2 1/6] wifi: rtw89: 8922a: configure AP_LINK_PS if FW supports Ping-Ke Shih
2024-11-18 12:34 ` Kalle Valo
2024-11-20 3:11 ` Ping-Ke Shih [this message]
2024-11-18 12:35 ` Kalle Valo
2024-11-20 3:14 ` Ping-Ke Shih
2024-11-20 9:12 ` Kalle Valo
2024-11-18 4:02 ` [PATCH v2 2/6] wifi: rtw89: register ops of can_activate_links Ping-Ke Shih
2024-11-18 4:02 ` [PATCH v2 3/6] wifi: rtw89: implement ops of change vif/sta links Ping-Ke Shih
2024-11-18 4:02 ` [PATCH v2 4/6] wifi: rtw89: apply MLD pairwise key to dynamically active links Ping-Ke Shih
2024-11-18 4:02 ` [PATCH v2 5/6] wifi: rtw89: pass target link_id to ieee80211_gtk_rekey_add() Ping-Ke Shih
2024-11-18 4:02 ` [PATCH v2 6/6] wifi: rtw89: pass target link_id to ieee80211_nullfunc_get() Ping-Ke Shih
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=9ac0fb9682e74b3f89b92be245f61998@realtek.com \
--to=pkshih@realtek.com \
--cc=kevin_yang@realtek.com \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.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).