mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
wifi: mt76: scan: fix setting tx_info fields
ieee80211_tx_prepare_skb initializes the skb cb, so fields need to be set afterwards. Link: https://patch.msgid.link/20250311103646.43346-8-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
86db2c5d4e
commit
5b5f1ca9ce
|
|
@ -52,11 +52,6 @@ mt76_scan_send_probe(struct mt76_dev *dev, struct cfg80211_ssid *ssid)
|
|||
ether_addr_copy(hdr->addr3, req->bssid);
|
||||
}
|
||||
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
if (req->no_cck)
|
||||
info->flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
|
||||
info->control.flags |= IEEE80211_TX_CTRL_DONT_USE_RATE_MASK;
|
||||
|
||||
if (req->ie_len)
|
||||
skb_put_data(skb, req->ie, req->ie_len);
|
||||
|
||||
|
|
@ -64,10 +59,20 @@ mt76_scan_send_probe(struct mt76_dev *dev, struct cfg80211_ssid *ssid)
|
|||
skb_set_queue_mapping(skb, IEEE80211_AC_VO);
|
||||
|
||||
rcu_read_lock();
|
||||
if (ieee80211_tx_prepare_skb(phy->hw, vif, skb, band, NULL))
|
||||
mt76_tx(phy, NULL, mvif->wcid, skb);
|
||||
else
|
||||
|
||||
if (!ieee80211_tx_prepare_skb(phy->hw, vif, skb, band, NULL)) {
|
||||
ieee80211_free_txskb(phy->hw, skb);
|
||||
goto out;
|
||||
}
|
||||
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
if (req->no_cck)
|
||||
info->flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
|
||||
info->control.flags |= IEEE80211_TX_CTRL_DONT_USE_RATE_MASK;
|
||||
|
||||
mt76_tx(phy, NULL, mvif->wcid, skb);
|
||||
|
||||
out:
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user