Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp144984ybv; Wed, 12 Feb 2020 21:09:11 -0800 (PST) X-Google-Smtp-Source: APXvYqwRGLen1Rs7himR/Oi4m4yM7Ad70LIX53gvf3AAVAPUodC0JwegsoRONKMKi9Lk5Bb8QIHj X-Received: by 2002:aca:1c0d:: with SMTP id c13mr1719650oic.44.1581570551390; Wed, 12 Feb 2020 21:09:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581570551; cv=none; d=google.com; s=arc-20160816; b=WU96D0CJHTwOODS66QcOj5Af5rhf96sdJy1mFYhPtfN4S19iBVMpGlOqDsNZH/rU44 7AXxfDoxcmZTXKAqiYPqrAhiLKK5ksa8FnEFPb1InJCDnhnGFNWsxiUR/pi7X6ZlrGjB GDaClj8u5woy4vTEdW1LLmeSIdMGUp1hGIbyOvNG+U1BjGuZpsSyBTkFCpuiUVETxpfJ so4UI1PJurgcsts0ts0UDbDMe8uuoWwtoWMRAI8P/OKdLuAXl5NFWKNAB6CvPbh1EMIU 3MgyJncMaMb5RmHHtROt4AnyCtSuJ9YLz3lsIosVZPbZP89pPIlkpfNiBr4oq7tjZrGN tmOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:authenticated-by; bh=rJb4EdHn5Rp3+yfSN52D91h4avwiZ6vFANGu1c3ZUg4=; b=L+4NrLi4I5V+8h3pBDAwAJ9EikoPjsesi0NxfimtxHNyGnpwrf23ffbz9wmfJ+XUFI W4dEkrQJP8HKXaBSLWb0pgHO0Xiy0lwjjiGkvsKJ8HNTIuI5/6suidjXznS8vGs4GsSG SD/xl0sC/q3DM0Styo6VMAxVyqXrZmRsL+IV3MYiyyBmWlxnf2IGYlWmvViwpIIEVSPt 6OX93wdoQKcRAtt9nU9jsvO7Gx3lSxUU4hcgxopZwVR9VLv2LxpUhGMqGBSo5ElPRUOa h5czQprf2JTdh+vD2Gj/d30mApbhxgc3W6/khl37yq5on/xI/U0GOaRTyjoHUSuYrbk3 sRqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si557717oto.205.2020.02.12.21.08.45; Wed, 12 Feb 2020 21:09:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726098AbgBMFIh (ORCPT + 99 others); Thu, 13 Feb 2020 00:08:37 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:45605 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgBMFIh (ORCPT ); Thu, 13 Feb 2020 00:08:37 -0500 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID 01D58O7E014906, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTEXMB06.realtek.com.tw[172.21.6.99]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id 01D58O7E014906 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Feb 2020 13:08:24 +0800 Received: from RTEXMB04.realtek.com.tw (172.21.6.97) by RTEXMB06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 13 Feb 2020 13:08:24 +0800 Received: from localhost.localdomain (172.21.68.128) by RTEXMB04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 13 Feb 2020 13:08:24 +0800 From: To: CC: , , Subject: [PATCH] rtw88: set WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, mac80211 supports it Date: Thu, 13 Feb 2020 13:08:19 +0800 Message-ID: <20200213050819.13467-1-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.128] X-ClientProxiedBy: RTEXMB02.realtek.com.tw (172.21.6.95) To RTEXMB04.realtek.com.tw (172.21.6.97) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Yan-Hsuan Chuang Set wiphy flag WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, because mac80211 actually supports it. With the flag set, driver can accept ROC event from wpa_supplicant or some other user space tools. Do note that driver is most used to run a station mode vif and is using sw_scan instead of use_chan_ctx. So, if the driver is going to use chan_ctx or hw_scan, must make sure that ROC can work. Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 2845d2838f7b..38c77678fa5b 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -1484,6 +1484,7 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw) BIT(NL80211_IFTYPE_MESH_POINT); hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS | + WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | WIPHY_FLAG_TDLS_EXTERNAL_SETUP; hw->wiphy->features |= NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR; -- 2.17.1