From patchwork Sun Oct 15 20:53:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10007287 X-Patchwork-Delegate: kvalo@adurom.com 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 A607460216 for ; Sun, 15 Oct 2017 20:54:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97AEA1FEB1 for ; Sun, 15 Oct 2017 20:54:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C90125404; Sun, 15 Oct 2017 20:54:02 +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 ED1AD1FEB1 for ; Sun, 15 Oct 2017 20:54:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751700AbdJOUyA (ORCPT ); Sun, 15 Oct 2017 16:54:00 -0400 Received: from mail-bn3nam01on0051.outbound.protection.outlook.com ([104.47.33.51]:36001 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751660AbdJOUxy (ORCPT ); Sun, 15 Oct 2017 16:53: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=gIfQLgAEjmAwaF5t+c8ZJIgeHvIECFG5mx+Rnvr+vwI=; b=pw69iI8/Uet+2Jw/SNLCs44xpmyzA41MoBtdQG5LawzZa7INu2hftpbqwt6mFCl9/rsn7YTy7Lc713Jvw0+PqAR7on+iQxotd3tX/0gQBQ4mmvIgiSAA1yx4SjnMFUpw3xPPoTtdmS+ZACZy1PXK2vf+fi/NzxV+vRo5tFgVwwY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; Received: from bars.quantenna.com (195.182.157.78) by SN1PR05MB1934.namprd05.prod.outlook.com (10.162.132.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.5; Sun, 15 Oct 2017 20:53:51 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Vasily Ulyanov Subject: [PATCH 5/5] qtnfmac: advertise support of inactivity timeout Date: Sun, 15 Oct 2017 23:53:27 +0300 Message-Id: <20171015205327.9966-6-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171015205327.9966-1-sergey.matyukevich.os@quantenna.com> References: <20171015205327.9966-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: VI1P189CA0029.EURP189.PROD.OUTLOOK.COM (10.165.188.42) To SN1PR05MB1934.namprd05.prod.outlook.com (10.162.132.12) X-MS-Office365-Filtering-Correlation-Id: 916dc3e3-e5f8-4ef0-7f93-08d5140ed813 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:SN1PR05MB1934; X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1934; 3:TC30Zk4sck/1iwRkFdij0+AzvUjSaDGebnIN0Q2GgZXeB+Vo9xRvCO3K1O/TdmumqzoXejFH5hO3aSkB2vM2qqoVrQZjYOmsi7RNXgmjy0kRiAQKrQODYjnnvfSv/tqHJd4kXIfEavGBv9QXUVG0HNUKkQ2d/PNbheV+1jdLmweacbk/X1gT/4LefFTcfg/PrQTTx6iKXV880Ke2L4F1NpuHvTHJpp7XmfWYKl0yPsxzlnSgaY1EMJi/3SQWBBMw; 25:FFPd4wIEug8wvCms6b4kMbJFWqTWGhwkSztwrD8MdsZ4wLZjpob58U3z3FO0ueVM4Liyo6PMIj49tecQroo3FfklHlxpXXG9r17cxq1ZB5VR+/Rprl4aJo+jAr18AC0S8MrcEh21w3xeA4ntMi4Tim9rxrKlz/4g4yR1J76puPjQkVTWYz8fimLl2aA/f+aRxbTWQ3CxMA9cY5LjNeyeQeL7vngJ5XPuE3rw186n2iYZk/5tl0+4cP4x/8cPlIQOoCv+eQtrqAJh5+j+g+CVWpjSATcHPpKq/1eqLlUsU35sLSgyXxtR6/0a7vrZigEjoaSjij8O9sgar8CJUU1FTg==; 31:xgQ85c+OBztzsNN+4wZJ4JPFzy8z38HelTMhg/QCLQCd53Ijo4RiPcgBuAC17u3bF+4GDg32R0LMwrGaE4KxUxI23pHYJrmMcHFkna2Nw1ed62KU48oAvWF9Oz7xsn+Ji9PagKngy5qP/tWGBQBwfCxp8gElYru+oe0TbmlB3nc64IawwY1iiggdgJu9au4PH5m1atdJ/doyAuwhPXccG0srr1+/beFADRTuHQo3YKs= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PR05MB1934: X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1934; 20:MXlKiCWpcCBzxhIDygbJD/fZlVz1Mav20WHqM5Y2JKuxWM9/yQavNt5fK3gUzsP3TbIGApgZrAv1lp0/0wu96ycZP5PwPAjLGLKI8lXKO+K+bzQTwiC2WxNpe2773IvAloatpST2507+vmlQnZ+nlI30qmBAAGpbcWQP6WCoSF4XVktAnKe9pJxyvJ7ykecR9JTRA6nqFOeHXimtg7o9DUHj7LYAXCmCe1fnTVyvZR6JlaBIXr5PagSQydDBIxU/WR+CwOarqKDqdYO5+ouyO9HMAt9T7pqwZLjAVbFUgtydZldlviCpGiL567TZ0HcHFHk4K069lwAnUIBdaA0oA688gr2PGwx0X94pu84Bw9XP6hkyohZAF/8IzCntr+yc4ququrBPc88Zz8paHosgu4n72DlEzw0Ic2oLGU4xDji7qYqMZGWyf1M6b4SSSK8GVp6aoVR0k74HE8VOVMmK41obt0c7ut/RgMpMvUtfcrWP9rCwQZ87MT1wp0+uPFek; 4:h75pCl/psVuOshug2DICXRHnYHZVgbg7176ezheZXEKjU5YO+xMbQz/1jnMkhKlw9t0dkeYUqk16qehMzStvox1IIAezCPSns6i98175i0eLx/DMw06eeKYe3YfoS5rzFgJfhTcRmGLdp8azL0wBLrBaMVmR6n88Xoah7wzc1qHB2xy66t1aK+rZHoiL/i9/iP9dCm9vJ6HOQ4a4xLoIJJB8jLp9CnkIKYaeUhPjvVlcesUnORxPaL7w/QeT6HDf X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123555025)(20161123562025)(201703131423075)(201703061421075)(20161123560025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR05MB1934; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR05MB1934; X-Forefront-PRVS: 046164D5C4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(189002)(199003)(4326008)(2906002)(5003940100001)(2361001)(2351001)(16586007)(53936002)(47776003)(69596002)(81156014)(5660300001)(106356001)(97736004)(105586002)(54906003)(8936002)(53416004)(50226002)(8676002)(81166006)(33646002)(6116002)(189998001)(101416001)(48376002)(1076002)(103116003)(66066001)(305945005)(2950100002)(575784001)(86362001)(16526018)(68736007)(6916009)(6486002)(36756003)(3846002)(6666003)(25786009)(508600001)(50986999)(76176999)(7736002)(107886003)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR05MB1934; H:bars.quantenna.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; SN1PR05MB1934; 23:AK74J8QwrgQbDEENyyIrlwbAtGmn7rfqQLqckd64Y?= =?us-ascii?Q?4rGVTVwP9sgKjLKEWS27ioC53Mqus/rX+OrTF9Uuv0bw0LLeh5GnDlGInDmt?= =?us-ascii?Q?u36oXN02K6Fwxr8HVakZOCdN/vFFqs+4e5iT4PFbgDqAXHLUGBgzfFTjYBCJ?= =?us-ascii?Q?xoi4kKB26EgcuPWPvWTsQbVzhJtrizgZLibt3Xgf+RoJ5c7NuNS1sDWf+zwn?= =?us-ascii?Q?AyUeQL8AhwQdxOGZnaBQZWDoTx4cfekxnyB5tgulVsW2TdRjc9w0Ammkm8c9?= =?us-ascii?Q?frcVzY1iHKreORjCmMGceIg03PeMYyqgST+Eqt6CR9T1VBukYSkIZslYA8lo?= =?us-ascii?Q?pJ54WpXdgQu3w1IDXR7nmxQUU2+Qrj1w96tiEYsi1/QLItP9w7BXo2FwafQP?= =?us-ascii?Q?Dets/j5KRB1VLbyz5+AjSXbOBB31NbpkquMhy9L7/kpSHrFV1Cy3+MHSQSWX?= =?us-ascii?Q?IkiaoXZ9C/JIVl9qf0s2Lt11QL9ikoqiU7UOO9yIepmKzIZdxV9gN71hzYLO?= =?us-ascii?Q?9S4LGo+lucBzeNSP43qTGhvksg6wvuf7s0k9OMflsLZlH2sXF4QhRlCvvd9f?= =?us-ascii?Q?ht+8NK5y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j7jm7JFhqsvybLIZQm2rsEGchk1VgczvAxoABk289xLatCSeUVPbElG0QeH8DUcU/qM4Nw==; 5:EW2L4B+0mb+NMWyEo6oEDqnaB0VnAatYELMBSiNdxRYA89Hn0+f/6PrgPdFcIoARH/FkQ1sy9xLOl/1kavZgf+xCBw41xT0/9lvpPwzD14364L/LRGfRWld/2Y3+pKmn0HN8dfd3ExkrCgati02uXcsQqJm7JFflkc5k0W+pFWM=; 24:l4M4nVBnhLZDgn08ZXDgXlFP5RpP6OsEE2ds8f8wDte67yEPIfv/cYvlHSGvIWrG7GGCOyNaNY88KH8wghf1mctXx7lXACSu26mGsaJuClQ=; 7:TJsFSabQNymgVMdEiHPAsoCeHmiJFeIkc4/HMahpXp2DIHKKV2m0em/MLbjqmxOeFGD7yLNAFm9rN/xp7bao5e8zS+KbxL6bS2b3uNQT9JUZCpRnos4OzasZEJo0rlLZIQlMuNMTMe6OnArUYMyBGO0icekvbVqHCNis8gT87/k9SB6q62hTkuA6ZGB+9zGSjkByHMgE+CAEqM6NhvMsiXQisIwn6EKhlbdhFHiR5w0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2017 20:53:51.9109 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR05MB1934 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: Igor Mitsyanko Wireless device may implement a logic to kick-out STA due to inactivity for a certain period of time. This feature needs to be advertised to higher layers if supported. Timeout value is still taken from parameters to START_AP command, nothing changes here. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 5 ++++- drivers/net/wireless/quantenna/qtnfmac/commands.c | 5 +++-- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 11 ++++++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index b4c2fa7934fd..b9841c0d952f 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -955,7 +955,10 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac) ether_addr_copy(wiphy->perm_addr, mac->macaddr); - if (hw_info->hw_capab & QLINK_HW_SUPPORTS_REG_UPDATE) { + if (hw_info->hw_capab & QLINK_HW_CAPAB_STA_INACT_TIMEOUT) + wiphy->features |= NL80211_FEATURE_INACTIVITY_TIMER; + + if (hw_info->hw_capab & QLINK_HW_CAPAB_REG_UPDATE) { wiphy->regulatory_flags |= REGULATORY_STRICT_REG | REGULATORY_CUSTOM_REG; wiphy->reg_notifier = qtnf_cfg80211_reg_notifier; diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index babdc600c193..b81f81bd1411 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -975,10 +975,11 @@ qtnf_cmd_resp_proc_hw_info(struct qtnf_bus *bus, return -EINVAL; } - pr_info("fw_version=%d, MACs map %#x, alpha2=\"%c%c\", chains Tx=%u Rx=%u\n", + pr_info("fw_version=%d, MACs map %#x, alpha2=\"%c%c\", chains Tx=%u Rx=%u, capab=0x%x\n", hwinfo->fw_ver, hwinfo->mac_bitmap, hwinfo->rd->alpha2[0], hwinfo->rd->alpha2[1], - hwinfo->total_tx_chain, hwinfo->total_rx_chain); + hwinfo->total_tx_chain, hwinfo->total_rx_chain, + hwinfo->hw_capab); return 0; } diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 7b313d38c30b..0f582782682f 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -61,8 +61,17 @@ struct qlink_msg_header { /* Generic definitions of data and information carried in QLINK messages */ +/** + * enum qlink_hw_capab - device capabilities. + * + * @QLINK_HW_CAPAB_REG_UPDATE: device can update it's regulatory region. + * @QLINK_HW_CAPAB_STA_INACT_TIMEOUT: device implements a logic to kick-out + * associated STAs due to inactivity. Inactivity timeout period is taken + * from QLINK_CMD_START_AP parameters. + */ enum qlink_hw_capab { - QLINK_HW_SUPPORTS_REG_UPDATE = BIT(0), + QLINK_HW_CAPAB_REG_UPDATE = BIT(0), + QLINK_HW_CAPAB_STA_INACT_TIMEOUT = BIT(1), }; enum qlink_phy_mode {