From patchwork Tue Apr 18 12:09:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 9685441 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF4BB602C2 for ; Tue, 18 Apr 2017 12:09:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0DC928427 for ; Tue, 18 Apr 2017 12:09:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C55992844E; Tue, 18 Apr 2017 12:09:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5632F28427 for ; Tue, 18 Apr 2017 12:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755183AbdDRMJj (ORCPT ); Tue, 18 Apr 2017 08:09:39 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:31299 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbdDRMJh (ORCPT ); Tue, 18 Apr 2017 08:09:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1492517377; x=1524053377; h=from:to:cc:subject:date:message-id:mime-version; bh=HhmhAM+7AatB/o0vXIsDkcJXF1fWlbGcfZpudh+YOT8=; b=G6KicNhpM4wsh9lEbFu5OoXq/Mf7zkslce3sKWf1CyxD62CprSQDingm 1/5wE3X4IEzlcetM6tylRVEr7t/nr3RnOG+r6MylkOHM77HtTRxgwa0LX moGKMOyujxEg2fcc1jJyCfvpPmzaixDCdWyX9owdRE2Hpm0CxWhCwgF63 4=; X-IronPort-AV: E=Sophos;i="5.37,219,1488873600"; d="scan'208";a="279576359" Received: from unknown (HELO ironmsg02-R.qualcomm.com) ([10.53.140.106]) by wolverine01.qualcomm.com with ESMTP; 18 Apr 2017 05:09:35 -0700 X-IronPort-AV: E=McAfee;i="5800,7501,8501"; a="941876391" X-MGA-submission: =?us-ascii?q?MDFTP7NEJY6QTFTYWVHUWQ4shqIU3zksQyM4DX?= =?us-ascii?q?Mn1sV3XWgQhMJPYwAJhbFpwWPThFeBwDibyAlPMCne+MMlMIbbqNrQj/?= =?us-ascii?q?wwQAYNwpGD9+7b9KqVeksdzK8tEmPh1+GFN94ecXSE4v/lkkXboP18Ih?= =?us-ascii?q?Ql?= Received: from nasanexm01d.na.qualcomm.com ([10.85.0.84]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 18 Apr 2017 05:09:35 -0700 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by NASANEXM01D.na.qualcomm.com (10.85.0.84) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 18 Apr 2017 05:09:34 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 18 Apr 2017 17:39:27 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Tue, 18 Apr 2017 17:39:21 +0530 From: Vasanthakumar Thiagarajan To: CC: , Vasanthakumar Thiagarajan Subject: [PATCH] cfg80211: Fix dfs state propagation for non-DFS center channel Date: Tue, 18 Apr 2017 17:39:19 +0530 Message-ID: <1492517359-5994-1-git-send-email-vthiagar@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01f.ap.qualcomm.com (10.252.127.15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When part of a bigger bandwidth (160 MHz) channel falls in DFS channel range it is possible that the center frequency may not necessarily be a radar channel. Remove the sanity check on channel flag for IEEE80211_CHAN_RADAR in regulatory_propagate_dfs_state(), this should fix the dfs state propagation for non-DFS center freq which has DFS channels in it's bandwidth, should also fix unnecessary WARN_ON() spam in regulatory_propagate_dfs_state(). Fixes: 8976672736d6 ("cfg80211: Share Channel DFS state across wiphys of same DFS domain") Reported-by: Johannes Berg Signed-off-by: Vasanthakumar Thiagarajan --- net/wireless/reg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index a38f315..5fae296 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -3244,9 +3244,6 @@ void regulatory_propagate_dfs_state(struct wiphy *wiphy, if (WARN_ON(!cfg80211_chandef_valid(chandef))) return; - if (WARN_ON(!(chandef->chan->flags & IEEE80211_CHAN_RADAR))) - return; - list_for_each_entry(rdev, &cfg80211_rdev_list, list) { if (wiphy == &rdev->wiphy) continue;