From patchwork Thu Mar 1 09:39:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10250635 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 110DF602B5 for ; Thu, 1 Mar 2018 09:39:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1F0928FDF for ; Thu, 1 Mar 2018 09:39:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3A9828FF7; Thu, 1 Mar 2018 09:39:46 +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 69A0228FDF for ; Thu, 1 Mar 2018 09:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966675AbeCAJjo (ORCPT ); Thu, 1 Mar 2018 04:39:44 -0500 Received: from mail-cys01nam02on0060.outbound.protection.outlook.com ([104.47.37.60]:37856 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967054AbeCAJjj (ORCPT ); Thu, 1 Mar 2018 04:39:39 -0500 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=pWbf5sr+fJ1MHU2Qy1GQnnqyXwyjysQhIxaoPLgELz4=; b=xALIwCnUDpwYVxJYaCJ+m5dOEW2/3oQtsLr/UtO0J2iXgcc58LYSKHmZiB8Z/BYbX876ZyvLzAhSn9qQ0BUutdjtGqe9bUL4T3Qrcl+MP9nLmpcwrNt3UCg4OIdjvVhkS+zBFVBIQo2cw4b1+pyjueNLJRZYULvxTyXZlsR0VcA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; Received: from bars.quantenna.com (195.182.157.78) by BY2PR05MB1926.namprd05.prod.outlook.com (10.163.32.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.548.6; Thu, 1 Mar 2018 09:39:36 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Igor Mitsyanko , Avinash Patil , Dmitry Lebed , Dmitry Lebed Subject: [PATCH v3 2/2] cfg80211/nl80211: add CAC_STARTED event Date: Thu, 1 Mar 2018 12:39:16 +0300 Message-Id: <20180301093916.14096-3-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180301093916.14096-1-sergey.matyukevich.os@quantenna.com> References: <20180301093916.14096-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: HE1PR0102CA0021.eurprd01.prod.exchangelabs.com (10.170.250.34) To BY2PR05MB1926.namprd05.prod.outlook.com (10.163.32.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6fb3eeeb-224f-4112-6503-08d57f5859dc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BY2PR05MB1926; X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1926; 3:f7T1H3qEExVEuJq6k826zaJxq7N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urYytgFNKcrYyOomibLP71MMmScaefYSpApmc/IW8S83D3dSXtGOTkwzp1u4g22kKqvSwB8EbkmP0JqEHXyU99TQLAd5eNSkMZnUzDKcWA9p2g9qe8PZ4VkgGM45s1H9sRDt6H32drIt9xSAGugp969B+fvWf6XMgmnL8LZH2BVUmenxm1VyAkZX5Ys69AXOC7WNc1BxG/m46IFAHqUwHuDYME0mVLdEIQgvLN+oisPJOTYImmpnEM+xgyUNZuziON4pl7WW3f1KKn6yZH8JtKPOm3ToXAd4S+qkaU3FZ02Y1JrPmmkT8XCSELdHHECipa; 4:Y6G+Gyl2q1WUJhZ0s4mIABrdR7uDqF8J43YnCx9YJQYTJNxnKNb3VSJ/9YMVsAQUVkkHXnYQJXF6ejfsYaWgnzIjfTXZbBf8nfH8mxrCAIPOobGNKCH3YV1x9xJxiXO6oFBe99AU6BJlbvqMcIhHvDK5it3IOs/765jU9En4fbTsAvD9VRjgacUppb6tsUWgYRshOJVh+5aeD0B4KEhzR1+mya0p/J6jumI78F4oSG0wjt4drinrb6FcZ5Bm7qX71DEbC5f08OZN5powi7UyBQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231220)(944501161)(52105095)(93006095)(93001095)(6041288)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:BY2PR05MB1926; BCL:0; PCL:0; RULEID:; SRVR:BY2PR05MB1926; X-Forefront-PRVS: 05986C03E0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39840400004)(39380400002)(346002)(396003)(376002)(199004)(189003)(6486002)(54906003)(316002)(50226002)(16586007)(76176011)(2351001)(81156014)(81166006)(97736004)(2361001)(8676002)(8936002)(6916009)(39060400002)(1076002)(6666003)(50466002)(6116002)(47776003)(66066001)(478600001)(36756003)(3846002)(48376002)(2950100002)(106356001)(53936002)(59450400001)(4326008)(2906002)(103116003)(68736007)(386003)(25786009)(305945005)(7736002)(52116002)(5660300001)(7696005)(186003)(51416003)(53416004)(86362001)(69596002)(105586002)(16526019)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR05MB1926; H:bars.quantenna.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1926; 23:3ZplMJm/aJlOuKbZhdbUl0bCLKbWJxWHa7H7Kg+KW?= =?us-ascii?Q?2+NNz6humnOzluZZztx7thWlHc3ZY4outnCgdM4MYnQBD31YGb5q3Yyn1OBC?= =?us-ascii?Q?6knJZL0YCc0I5drq4Wy5hRO+O8inUD4ZfBbmyo/qWNvewdqGMMgWIg/fTm5t?= =?us-ascii?Q?DIwqDDG4Mzm/PoC+bD/YQSb8ulhehZdJmYXggS0URkUdr7SS/gSAKu+TqEXj?= =?us-ascii?Q?r9ercUEnUnh6V0nmZT4L8p68KLDjoE2q78gfIzlZwVX4j/ceVWwTnGESOvgq?= =?us-ascii?Q?Uw1dR850EenFN9zp2g5AwelGZc3Op/bIFggc1qbL/YODwHQntn3tH9hsBAu1?= =?us-ascii?Q?3FW2uCSRyr4tbKAFf3zwye9xr87IZb9JR4G1yxBoy7mWjTrAUf706ApheXGo?= =?us-ascii?Q?u2NSwVh6uM0NzPKMyThATm09tzprXrO/Q5QX99nVWgFn+1Nu3gJhheNrLXYG?= =?us-ascii?Q?meNKfJmr7mgM5MXWLkog+XYAyOAZev1LLq4lUUXplhI1EaLGIUOn+NzkqR0p?= =?us-ascii?Q?fKWjCW33LF9EgcVecBG8nLw20e9aRf6bs/in51fBV3PAsiUE5vvYTrPoFEEA?= =?us-ascii?Q?b6fHQ6Rcrfifzbj1tbA4/VN9LWKL8HiMq0+qo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W2z+SDlgkB9kAWdqgcVgEUY4i0vK/fh4dCR1Na9T+uAaNuu6dkyZfkjDYAYra/DAyOrmAtPZTmE6Ni0RIqD+Y2O0WluFHSpA7VcvvxvGThVsCZYucYC72nztff9cV2NCJ0IkqogYX0HNaVrgGWyXk/4woQ8=; 5:v8JXnnUBhOYJRMPp1DnShEmMDnZ5528mNnNbqTFbjkNvwz5RuUETA4bdDo2Ln9ULIdsXPxK3/o8nGAu47wMDu3Wlq96aZIBwPWSeMA1Q5zuml+PtLnYc4zVCMKKCOT3Upf3vk7dOOcks0Yp1mNN7EqCYAtC+mLAfUZ+YCN+nVLc=; 24:fiNl/zYfDRGZTWlsGMEaEtJnFoxr9uHUsy+p2n3VNhLNx6HRZCjNEkEz1H6bDzspDjIQZCx2bMz+LkVp38F6nZ3r1boUisoZN998OXKyL+o=; 7:06ZvzgEmLCx87DReMKmvT8bmKloVTBIoo/EgDIZ8g1m+s4KEoDHL+8rX27uGTo/ZsUoF+wWeHFemySLefdRT/kfSxVCj5AKDrfDPcCeEePfnCvhnIiwuuruOwKI7/5hxEXx5ePtZLeeLlRvlvENn6Vth74+AiYGRwYm9iOtAOn4FfSAnjKCev3W4uqKYIYSnonUT8Z5KDCVU2OnwYAgrPLSB6cZfgQ7/YLGMlnnFjPuXVFnc3cqdoblGPu5Ja2wI SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2018 09:39:36.3411 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6fb3eeeb-224f-4112-6503-08d57f5859dc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR05MB1926 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 CAC_STARTED event is needed for DFS offload feature and should be generated by driver/HW if DFS_OFFLOAD is enabled. Signed-off-by: Dmitry Lebed --- include/uapi/linux/nl80211.h | 3 +++ net/wireless/mlme.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 811928ce4e1c..1633c8b8494a 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -5137,6 +5137,8 @@ enum nl80211_smps_mode { * non-operating channel is expired and no longer valid. New CAC must * be done on this channel before starting the operation. This is not * applicable for ETSI dfs domain where pre-CAC is valid for ever. + * @NL80211_RADAR_CAC_STARTED: Channel Availability Check has been started, + * should be generated by HW if NL80211_EXT_FEATURE_DFS_OFFLOAD is enabled. */ enum nl80211_radar_event { NL80211_RADAR_DETECTED, @@ -5144,6 +5146,7 @@ enum nl80211_radar_event { NL80211_RADAR_CAC_ABORTED, NL80211_RADAR_NOP_FINISHED, NL80211_RADAR_PRE_CAC_EXPIRED, + NL80211_RADAR_CAC_STARTED, }; /** diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index a877b4d3e5d2..ce5bb624bf01 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c @@ -914,14 +914,17 @@ void cfg80211_cac_event(struct net_device *netdev, sizeof(struct cfg80211_chan_def)); queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk); cfg80211_sched_dfs_chan_update(rdev); - break; + /* fall through */ case NL80211_RADAR_CAC_ABORTED: + wdev->cac_started = false; + break; + case NL80211_RADAR_CAC_STARTED: + wdev->cac_started = true; break; default: WARN_ON(1); return; } - wdev->cac_started = false; nl80211_radar_notify(rdev, chandef, event, netdev, gfp); }