Message ID | 1420822458-531-1-git-send-email-sw@simonwunderlich.de (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
On 01/09/15 17:54, Simon Wunderlich wrote: > Performing spectral scans on 5 GHz channels may result in PHY errors > sent by the hardware, even if DFS support is not enabled in the driver > (e.g. channel scanning or passive monitoring). In that case channels may > falsely get marked as 'unusable'. To fix that, only process radar PHY > errors when radar is explicitly enabled in the driver. Hi Simon, Not an ath9k expert, but I would think those channels would already be marked as unusable, because DFS is disabled in the driver. Or does this also affect 5G channels that do not require DFS. Regards, Arend > Cc: Stable<stable@vger.kernel.org> [v3.10+] > Reported-by: Mathias Kretschmer<mathias.kretschmer@fokus.fraunhofer.de> > Signed-off-by: Simon Wunderlich<sw@simonwunderlich.de> > --- > drivers/net/wireless/ath/ath9k/dfs.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/net/wireless/ath/ath9k/dfs.c b/drivers/net/wireless/ath/ath9k/dfs.c > index 726271c..3d04905 100644 > --- a/drivers/net/wireless/ath/ath9k/dfs.c > +++ b/drivers/net/wireless/ath/ath9k/dfs.c > @@ -152,6 +152,12 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data, > return; > } > > + if (!sc->hw->conf.radar_enabled) { > + ath_dbg(common, DFS, > + "Error: received radar phyerr while radar was disabled\n"); > + return; > + } > + > datalen = rs->rs_datalen; > if (datalen == 0) { > DFS_STAT_INC(sc, datalen_discards); -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Friday 09 January 2015 19:57:37 Arend van Spriel wrote: > On 01/09/15 17:54, Simon Wunderlich wrote: > > Performing spectral scans on 5 GHz channels may result in PHY errors > > sent by the hardware, even if DFS support is not enabled in the driver > > (e.g. channel scanning or passive monitoring). In that case channels may > > falsely get marked as 'unusable'. To fix that, only process radar PHY > > errors when radar is explicitly enabled in the driver. > > Hi Simon, > > Not an ath9k expert, but I would think those channels would already be > marked as unusable, because DFS is disabled in the driver. Or does this > also affect 5G channels that do not require DFS. > > Regards, > Arend Hey Arend, maybe that was not really clear, but this is talking about the DFS state "unusable". By default, channels are marked in DFS state "usable", and after the clear channel assessment (which is done e.g. when starting AP mode) they are marked as "available". As soon as radar is detected they are marked as "unusable". These DFS state changes should only happen while there is something operating with radar enabled, e.g. AP mode. It should not happen if we just have monitor mode or scan for channels. These channels should then stay in their previous DFS state (e.g. 'usable'). This was borked and this patch tries to fix it. :) Cheers, Simon
diff --git a/drivers/net/wireless/ath/ath9k/dfs.c b/drivers/net/wireless/ath/ath9k/dfs.c index 726271c..3d04905 100644 --- a/drivers/net/wireless/ath/ath9k/dfs.c +++ b/drivers/net/wireless/ath/ath9k/dfs.c @@ -152,6 +152,12 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data, return; } + if (!sc->hw->conf.radar_enabled) { + ath_dbg(common, DFS, + "Error: received radar phyerr while radar was disabled\n"); + return; + } + datalen = rs->rs_datalen; if (datalen == 0) { DFS_STAT_INC(sc, datalen_discards);
Performing spectral scans on 5 GHz channels may result in PHY errors sent by the hardware, even if DFS support is not enabled in the driver (e.g. channel scanning or passive monitoring). In that case channels may falsely get marked as 'unusable'. To fix that, only process radar PHY errors when radar is explicitly enabled in the driver. Cc: Stable <stable@vger.kernel.org> [v3.10+] Reported-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> --- drivers/net/wireless/ath/ath9k/dfs.c | 6 ++++++ 1 file changed, 6 insertions(+)