From patchwork Mon Mar 26 13:36:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10307825 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 03F6060212 for ; Mon, 26 Mar 2018 13:37:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E69AB296C3 for ; Mon, 26 Mar 2018 13:36:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB00B296C9; Mon, 26 Mar 2018 13:36:59 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI 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 74923296C7 for ; Mon, 26 Mar 2018 13:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752129AbeCZNg5 (ORCPT ); Mon, 26 Mar 2018 09:36:57 -0400 Received: from mail-sn1nam01on0084.outbound.protection.outlook.com ([104.47.32.84]:28030 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751249AbeCZNgy (ORCPT ); Mon, 26 Mar 2018 09:36:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BorWSMSSaPz556YVQmEEgEGvq5ICJqILpdrCDWSYIlY=; b=X/1nh/ckTxBaMXpDQ5ROzt0phmXz8crWt4yRMU7QsD3WrgMBfmbs+fimPgZmzSImDO0o/J4rGqNgS121zVvyzG2IsYrZ6re4+eUWrVzhOKVwOQ1oGQgZwyHNjxpik27UOx2cUTSDf17ojOvz2GRND12M8s4IMif5+i3+WCkxgeI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; Received: from bars.quantenna.com (195.182.157.78) by BY2PR05MB1927.namprd05.prod.outlook.com (10.163.32.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.5; Mon, 26 Mar 2018 13:36:50 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Igor Mitsyanko , Avinash Patil , Dmitry Lebed , Dmitry Lebed Subject: [PATCH 2/3] cfg80211: enable use of non-cleared DFS channels for DFS offload Date: Mon, 26 Mar 2018 16:36:32 +0300 Message-Id: <20180326133633.8771-3-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180326133633.8771-1-sergey.matyukevich.os@quantenna.com> References: <20180326133633.8771-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: VI1PR0501CA0024.eurprd05.prod.outlook.com (10.172.9.162) To BY2PR05MB1927.namprd05.prod.outlook.com (10.163.32.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7bd2cacf-20a9-40ef-28df-08d5931ea267 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BY2PR05MB1927; X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1927; 3:+VKX1Ncoy7Cvo51mQZ2XmWlxlcUOptxcKeg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XtoYY7QK8DVvj9QoZQ2RlUoevsrenik6Yh6T2Zq3FEf379v5s6O5CMf8WpexAB/dAXbtNQb0HIZ4902FZSptyqB97GKkUwyfXZHWDSvpoRcbWjlmMn7Sje6uSAC5lCfWwerdk4aV+XkRcU6PdEux5+GlAMBfRCcVTH+diO913Wb9ZxLA1qX86mAtzZcyyQkoa0xvoDr5Bypee4PU+Oj0884o8xQZHLabT+hh1sGcKK+uBOv5Ow3DwuH9ys+sPDxBIPHjQZGiJ2pD0Lz5DP9u3AnWCfVMMeLpcgQcWISqqnDu6ShD/Q; 4:JsqWtK5SyylU44Uc5KkZ1NcnUVyI2HGoHBo90Px9ST1mA9QLiVEdR1SXqCfdXZBS4UYL2Zsf8Znh0Y6TyqNtEJF8pBCskgRBg8MBX4uo8pvjwCIYPYM0dubvYQCYdMPS/H8Bl6JuWpW+Br/RJbCLfan/guaSdsZaoEPD9Ptsnd9KDmgWVn33dDxNvPl0hVNWn31vSVdkfU8Uo9TPf687zdCrjGUSF8T+ze4eWoAdceb6M0LIIMALHWZCeL+wNdB0OwyByA5mi+pbSRBY4jVeSg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(10201501046)(6041310)(20161123562045)(201703131423095)(20161123555045)(201703061421075)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:BY2PR05MB1927; BCL:0; PCL:0; RULEID:; SRVR:BY2PR05MB1927; X-Forefront-PRVS: 06237E4555 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(346002)(376002)(189003)(199004)(25786009)(386003)(6666003)(86362001)(6916009)(4326008)(508600001)(81156014)(81166006)(8676002)(2351001)(6486002)(8936002)(39060400002)(50226002)(106356001)(54906003)(103116003)(2361001)(186003)(7736002)(53416004)(50466002)(2616005)(956004)(48376002)(26005)(446003)(11346002)(16526019)(59450400001)(69596002)(105586002)(51416003)(76176011)(305945005)(52116002)(97736004)(66066001)(47776003)(6116002)(3846002)(7696005)(1076002)(5660300001)(68736007)(36756003)(53936002)(16586007)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR05MB1927; H:bars.quantenna.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1927; 23:LSNghBQ4/M7CRIpE2DrPh/fqjkqxq1k6MLI8xDGVo?= =?us-ascii?Q?9sS4+QhV5lJRUk5AEakpg7Ryyk+9X1moLLHuDblhd8Guzfw5uZ6CN8KSBucb?= =?us-ascii?Q?D+sckt6ilxZXenOpaOaAEMQtSttXJsHL3S9BFoNbC2i3ud0ZTRyr8FGTeaY0?= =?us-ascii?Q?i5YCX9Rv+f/csovCY33SEQCIfBa9OYeufEAeHaGAJ9OHPjiFHliAlNJbTNXZ?= =?us-ascii?Q?RaeQqJO9tm+pOxfYTfgPzZzFkS+q51YagecEqkuEDPpwXw/rngtpt2qNeVGo?= =?us-ascii?Q?r4YkPiV4eSbGIBjxCzXtKBhpDoR1XwdbT+HdMtNBmITgjJW/KP4aDMwF0SFh?= =?us-ascii?Q?ECcYEyRtKmgvJkaT5yPF320fbMb1RSvNpz0sIRCkE8s1TeZZelwwRUJzMrLW?= =?us-ascii?Q?O4blBVgilS2MGUbubxBVD7n5MIm8ku3ZXr4VleyCeLvGwbuGSs8/SEDmVhzt?= =?us-ascii?Q?f9PKjajChqJAJ9caxPEGpyBkoZCs6D411cIPaQliL2Y8LCLjjaFkvFze8gvG?= =?us-ascii?Q?W+JQwAc1XFKxwScEuy6TI2kKv1AChX0dYiUdHZJIFoGdX2wVXuqny1TTy4S4?= =?us-ascii?Q?PATSA5DegrXqifra7D2Qy/ZcXeEUAtaBsf0kH3t8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1qth3pzdAEUE X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2018 13:36:50.7289 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7bd2cacf-20a9-40ef-28df-08d5931ea267 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR05MB1927 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 From: Dmitry Lebed Currently channel switch/start_ap to DFS channel cannot be done to non-CAC-cleared channel even if DFS offload if enabled. Make non-cleared DFS channels available if DFS offload is enabled. CAC will be started by HW after channel change, start_ap call, etc. Signed-off-by: Dmitry Lebed --- net/wireless/chan.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/wireless/chan.c b/net/wireless/chan.c index a48859982a32..2db713d18f71 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -579,6 +579,10 @@ static bool cfg80211_get_chans_dfs_available(struct wiphy *wiphy, { struct ieee80211_channel *c; u32 freq, start_freq, end_freq; + bool dfs_offload; + + dfs_offload = wiphy_ext_feature_isset(wiphy, + NL80211_EXT_FEATURE_DFS_OFFLOAD); start_freq = cfg80211_get_start_freq(center_freq, bandwidth); end_freq = cfg80211_get_end_freq(center_freq, bandwidth); @@ -596,8 +600,9 @@ static bool cfg80211_get_chans_dfs_available(struct wiphy *wiphy, if (c->flags & IEEE80211_CHAN_DISABLED) return false; - if ((c->flags & IEEE80211_CHAN_RADAR) && - (c->dfs_state != NL80211_DFS_AVAILABLE)) + if ((c->flags & IEEE80211_CHAN_RADAR) && + (c->dfs_state != NL80211_DFS_AVAILABLE) && + !(c->dfs_state == NL80211_DFS_USABLE && dfs_offload)) return false; }