Message ID | 20241118040255.40854-1-pkshih@realtek.com |
---|---|
Headers | show |
Series | wifi: rtw89: preparation for MLO including AP_LINK_PS feature, ieee80211_ops and links | expand |
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.
Ping-Ke Shih <pkshih@realtek.com> writes: > 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> >> >> [...] >> >> > +// CLASS 36 - SoftAP >> >> In wireless we prefer '/* */'. >> > > The checkpatch is changed to allow this style by default, so I didn't catch > the warning. Add option "--ignore C99_COMMENT_TOLERANCE" to my local script. Oh, didn't know that. We should then add that to our ath12k-check script as well.