Issam Hamdi <ih@xxxxxxxxxxxxxxxxxx> writes: > From: Simon Wunderlich <simon.wunderlich@xxxxxxxxxxxxx> > > The chip is switching seemingly random into a state which can be described > as "deaf". No or nearly no interrupts are generated anymore for incoming > packets. Existing links either break down after a while and new links will > not be established. > > The driver doesn't know if there is no other device available or if it > ended up in an "deaf" state. Resetting the chip proactively avoids > permanent problems in case the chip really was in its "deaf" state but > maybe causes unnecessary resets in case it wasn't "deaf". > > This patch originally developed by "Simon Wunderlich <simon.wunderlich@xxxxxxxxxxxxx>" > and "Sven Eckelmann <sven.eckelmann@xxxxxxxxxxxxx>" > > Co-developed-by: Simon Wunderlich <sw@xxxxxxxxxxxxxxxxxx> > Co-developed-by: Sven Eckelmann <se@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Issam Hamdi <ih@xxxxxxxxxxxxxxxxxx> s-o-b missing here as well. > --- a/drivers/net/wireless/ath/ath9k/link.c > +++ b/drivers/net/wireless/ath/ath9k/link.c > @@ -162,13 +162,59 @@ static bool ath_hw_hang_deadbeef(struct ath_softc *sc) > return true; > } > > +static bool ath_hw_hang_deaf(struct ath_softc *sc) > +{ > +#if !defined(CPTCFG_ATH9K_DEBUGFS) || defined(CPTCFG_ATH9K_TX99) > + return false; > +#else We don't use CPTCFG_ in upstream. Try to avoid '#if' if possible, what about IS_ENABLED(): if (!IS_ENABLED(CONFIG_ATH9K_DEBUGFS) || !IS_ENABLED(CONFIG_ATH9K_TX99) return false; -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches