From patchwork Fri Jan 9 16:54:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 5601911 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4FB669F357 for ; Fri, 9 Jan 2015 17:04:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AF4F20604 for ; Fri, 9 Jan 2015 17:04:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB012205FF for ; Fri, 9 Jan 2015 17:04:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756388AbbAIREY (ORCPT ); Fri, 9 Jan 2015 12:04:24 -0500 Received: from packetmixer.de ([79.140.42.25]:59964 "EHLO mail.mail.packetmixer.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755274AbbAIREX (ORCPT ); Fri, 9 Jan 2015 12:04:23 -0500 X-Greylist: delayed 587 seconds by postgrey-1.27 at vger.kernel.org; Fri, 09 Jan 2015 12:04:22 EST Received: from kero.packetmixer.de (unknown [IPv6:2a02:3100:2608:b800:221:ccff:fe73:b665]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.mail.packetmixer.de (Postfix) with ESMTPSA id 0334C174001; Fri, 9 Jan 2015 17:58:42 +0100 (CET) From: Simon Wunderlich To: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org, kvalo@qca.qualcomm.com, mathias.kretschmer@fokus.fraunhofer.de, stable@vger.kernel.org, Simon Wunderlich Subject: [PATCH] ath9k: ignore radar PHY errors when DFS is not enabled Date: Fri, 9 Jan 2015 17:54:18 +0100 Message-Id: <1420822458-531-1-git-send-email-sw@simonwunderlich.de> X-Mailer: git-send-email 2.1.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 [v3.10+] Reported-by: Mathias Kretschmer Signed-off-by: Simon Wunderlich --- 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);