Merge tag 'wireless-next-2022-03-11' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / net / wireless / mac80211_hwsim.c
index 10b0821..28bfa7b 100644 (file)
@@ -2475,6 +2475,15 @@ static void hw_scan_work(struct work_struct *work)
                        if (req->ie_len)
                                skb_put_data(probe, req->ie, req->ie_len);
 
+                       if (!ieee80211_tx_prepare_skb(hwsim->hw,
+                                                     hwsim->hw_scan_vif,
+                                                     probe,
+                                                     hwsim->tmp_chan->band,
+                                                     NULL)) {
+                               kfree_skb(probe);
+                               continue;
+                       }
+
                        local_bh_disable();
                        mac80211_hwsim_tx_frame(hwsim->hw, probe,
                                                hwsim->tmp_chan);
@@ -4136,6 +4145,10 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
                }
                txi->flags |= IEEE80211_TX_STAT_ACK;
        }
+
+       if (hwsim_flags & HWSIM_TX_CTL_NO_ACK)
+               txi->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
+
        ieee80211_tx_status_irqsafe(data2->hw, skb);
        return 0;
 out: