Skip to content

Commit df06978

Browse files
Loic PoulainKalle Valo
authored andcommitted
wcn36xx: Fix packet drop on resume
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@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1635150496-19290-1-git-send-email-loic.poulain@linaro.org
1 parent 113f304 commit df06978

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • drivers/net/wireless/ath/wcn36xx

‎drivers/net/wireless/ath/wcn36xx/main.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,13 @@ static int wcn36xx_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wow)
11241124
goto out;
11251125
ret = wcn36xx_smd_wlan_host_suspend_ind(wcn);
11261126
}
1127+
1128+
/* Disable IRQ, we don't want to handle any packet before mac80211 is
1129+
* resumed and ready to receive packets.
1130+
*/
1131+
disable_irq(wcn->tx_irq);
1132+
disable_irq(wcn->rx_irq);
1133+
11271134
out:
11281135
mutex_unlock(&wcn->conf_mutex);
11291136
return ret;
@@ -1146,6 +1153,10 @@ static int wcn36xx_resume(struct ieee80211_hw *hw)
11461153
wcn36xx_smd_ipv6_ns_offload(wcn, vif, false);
11471154
wcn36xx_smd_arp_offload(wcn, vif, false);
11481155
}
1156+
1157+
enable_irq(wcn->tx_irq);
1158+
enable_irq(wcn->rx_irq);
1159+
11491160
mutex_unlock(&wcn->conf_mutex);
11501161

11511162
return 0;

0 commit comments

Comments
 (0)