Patch "wcn36xx: Fix packet drop on resume" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wcn36xx: Fix packet drop on resume

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wcn36xx-fix-packet-drop-on-resume.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e07d82ba326a0bd56964da025ef1b13ff526b51f
Author: Loic Poulain <loic.poulain@xxxxxxxxxx>
Date:   Mon Oct 25 10:28:16 2021 +0200

    wcn36xx: Fix packet drop on resume
    
    [ Upstream commit df0697801d8aa2eebfe7f0b7388879639f8fe7cc ]
    
    If the system is resumed because of an incoming packet, the wcn36xx RX
    interrupts is fired before actual resuming of the wireless/mac80211
    stack, causing any received packets to be simply dropped. E.g. a ping
    request causes a system resume, but is dropped and so never forwarded
    to the IP stack.
    
    This change fixes that, disabling DMA interrupts on suspend to no pass
    packets until mac80211 is resumed and ready to handle them.
    
    Note that it's not incompatible with RX irq wake.
    
    Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxxx>
    Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1635150496-19290-1-git-send-email-loic.poulain@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 457fdf365b2d1..f98b44c257c61 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1115,6 +1115,13 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow)
 			goto out;
 		ret = wcn36xx_smd_wlan_host_suspend_ind(wcn);
 	}
+
+	/* Disable IRQ, we don't want to handle any packet before mac80211 is
+	 * resumed and ready to receive packets.
+	 */
+	disable_irq(wcn->tx_irq);
+	disable_irq(wcn->rx_irq);
+
 out:
 	mutex_unlock(&wcn->conf_mutex);
 	return ret;
@@ -1137,6 +1144,10 @@ static int wcn36xx_resume(struct ieee80211_hw *hw)
 		wcn36xx_smd_ipv6_ns_offload(wcn, vif, false);
 		wcn36xx_smd_arp_offload(wcn, vif, false);
 	}
+
+	enable_irq(wcn->tx_irq);
+	enable_irq(wcn->rx_irq);
+
 	mutex_unlock(&wcn->conf_mutex);
 
 	return 0;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux