]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mac80211: don't unconditionally call drv_mgd_complete_tx()
authorJohannes Berg <johannes.berg@intel.com>
Wed, 5 Feb 2025 09:39:22 +0000 (11:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:38:02 +0000 (14:38 +0200)
[ Upstream commit 1798271b3604b902d45033ec569f2bf77e94ecc2 ]

We might not have called drv_mgd_prepare_tx(), so only call
drv_mgd_complete_tx() under the same conditions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250205110958.e091fc39a351.Ie6a3cdca070612a0aa4b3c6914ab9ed602d1f456@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/mlme.c

index b71d3a03032e8dc2e19247c7cb93757fff858067..11d9bce1a439042f078a8ebdbde832b50dd19a82 100644 (file)
@@ -2336,7 +2336,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
        if (tx)
                ieee80211_flush_queues(local, sdata, false);
 
-       drv_mgd_complete_tx(sdata->local, sdata, &info);
+       if (tx || frame_buf)
+               drv_mgd_complete_tx(sdata->local, sdata, &info);
 
        /* clear bssid only after building the needed mgmt frames */
        eth_zero_addr(ifmgd->bssid);