mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
wifi: rtw89: send nullfunc based on the given link
The nullfunc sender function is link specific. Use core_tx_write_link with sw_mld flag to TX the nullfunc via the given link. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-4-pkshih@realtek.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
829bd3599a
commit
a8ba4acab7
@@ -3335,8 +3335,10 @@ static int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev,
|
||||
{
|
||||
struct ieee80211_vif *vif = rtwvif_link_to_vif(rtwvif_link);
|
||||
int link_id = ieee80211_vif_is_mld(vif) ? rtwvif_link->link_id : -1;
|
||||
struct rtw89_sta_link *rtwsta_link;
|
||||
struct ieee80211_sta *sta;
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct rtw89_sta *rtwsta;
|
||||
struct sk_buff *skb;
|
||||
int ret, qsel;
|
||||
|
||||
@@ -3349,6 +3351,7 @@ static int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev,
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
rtwsta = sta_to_rtwsta(sta);
|
||||
|
||||
skb = ieee80211_nullfunc_get(rtwdev->hw, vif, link_id, qos);
|
||||
if (!skb) {
|
||||
@@ -3360,7 +3363,13 @@ static int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev,
|
||||
if (ps)
|
||||
hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
|
||||
|
||||
ret = rtw89_core_tx_write(rtwdev, vif, sta, skb, &qsel);
|
||||
rtwsta_link = rtwsta->links[rtwvif_link->link_id];
|
||||
if (unlikely(!rtwsta_link)) {
|
||||
ret = -ENOLINK;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = rtw89_core_tx_write_link(rtwdev, rtwvif_link, rtwsta_link, skb, &qsel, true);
|
||||
if (ret) {
|
||||
rtw89_warn(rtwdev, "nullfunc transmit failed: %d\n", ret);
|
||||
dev_kfree_skb_any(skb);
|
||||
|
||||
Reference in New Issue
Block a user