From patchwork Mon Oct 30 10:13:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10032281 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 40396600C5 for ; Mon, 30 Oct 2017 10:14:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CF9B28818 for ; Mon, 30 Oct 2017 10:14:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21B91285A0; Mon, 30 Oct 2017 10:14:25 +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 1FD8528818 for ; Mon, 30 Oct 2017 10:14:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932564AbdJ3KOW (ORCPT ); Mon, 30 Oct 2017 06:14:22 -0400 Received: from mail-bl2nam02on0069.outbound.protection.outlook.com ([104.47.38.69]:1922 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932557AbdJ3KOS (ORCPT ); Mon, 30 Oct 2017 06:14:18 -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=4sRAKFZ7v7CHJTdVdhIrzkYFbZoRwWgbq+7WfLHGi8Y=; b=gEvkWNvBnkUujOj8Kcr1Wkp2YOQ8kbDjaIZ7S4HhDXoNIIeykRsgqOevJsAlU8vfDURlx72gn6XwmDMa/SRcjOr2RCUDVt8J4+/iZU/yMyAZy0Pv8SXcPH/pWAYupFAw5vV//SIvoCT1AjA67V1U/9ZvlR8/HuB7VIZuHbYLgxk= Received: from bars.quantenna.com (195.182.157.78) by CY1PR05MB1930.namprd05.prod.outlook.com (10.162.216.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.4; Mon, 30 Oct 2017 10:14:16 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Vasily Ulyanov Subject: [PATCH v2 5/5] qtnfmac: advertise support of inactivity timeout Date: Mon, 30 Oct 2017 13:13:50 +0300 Message-Id: <20171030101350.21251-6-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171030101350.21251-1-sergey.matyukevich.os@quantenna.com> References: <20171030101350.21251-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: VI1PR08CA0130.eurprd08.prod.outlook.com (10.175.228.160) To CY1PR05MB1930.namprd05.prod.outlook.com (10.162.216.12) X-MS-Office365-Filtering-Correlation-Id: 07104b1c-9320-4802-6476-08d51f7efabb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603238); SRVR:CY1PR05MB1930; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1930; 3:H1VmUMXGusOp07cJMGleAdDJqnVCegOezF7i/1wXRMt6tezxhV89c0aFmbMGJYQVSRzrk3VsGfT7dYTQox3yer+wfLtXQ9wSJaZUXJfHUV/5kcwpj5wFnOKQdCjWBKIScfApEpElRy8qwlcGTEQjEOn2ekTysnQr+LHfiNc8C9/3zH2kknY1P7HDaZad8zpgSctl0FECHDmleg4XFIZvqwMBC957uZHKkS1yfUxemrGtuYHcrp0jO4eenn1tlbGn; 25:dPx6STUVyQ08kPxSQAioD8DL2x9/i1xE6hWQG/IzmUvce3Hrm3x7qwulAAWabWS5USIlC0ThBaKFwDaE0ySqtZaeRhK0WkveW/eFfVX6RTWPfANSBGyhNW+Ec8bGlUlDVhKrl2AScq0vcAOqqNVrGFRN1/7WFt67vmcRq4/K8rF47/isxNnXz9kaCgHAMmW0lUoAHQaEieUZnRmMwF4QObHwNfKLusLaB/fkJENFsIfEoOztdGgFGubHMKqFB/5+cy5uoRP3/GbtTGPR8MA4kHB19QNv2L+H6g2lZcR45/VQ6oufFcGx2OICeVSLol7Uzme5G2mEKFDEvvySMl8K5zyqkkjR8SOgGEl0Xzi/X0I=; 31:98wU6Edbx7zCf6z5I2A+TFGuo0qVa9P6XAPy9kmOhIQsjXmKPeGK/tnHnQjR+lg1lPrDAv0/K+Q90jQF9uSq5VUVBfl6wrnRzfu/NIVmWI4N1d8hfj6RDDYCMCBmYLeSb95/sWZDtI9HxIRvs8Eob7qBTBU18ByAxC0MV0C4d2w8zolJP+LISqz7zRvdTvEvRyIf/0x6A/H5kuLrRHiopRffB6fjJ705jjrm1rfaJP0= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR05MB1930: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1930; 20:gSpNmZ5HZZK5DcK8cU1muYkd4NUzuLqxYZNl5W5UASJlQwKWoi6soGRCsnmumDWVhh07MdGU9d+OQxdaE0XK5NjuK2zB0bSU69KJFc0OjDJPkaWih0AO3LzufLP725cvU5XgINaMtD6sp2sk8La/OV9obmKgj9gd7BfuQiJVLr5mVG3LPGxbg9cRGYAHrMdan8+ERJAZlgHvALMx0owhLr2pAVUOzQU8/jLndW1jEBzGtPrH+gsK19sIQ4TspcVcnmmdjz4eAt+wOU892nHLZC6cYmROCk9JKECwYUuLMW5mm8rLm7RwslVgZcFG3buI1tZeJQdTkEmfNpsv7HtM/olAqZl1wnY4VATgTQUDJyOKBEAGtMqe4VARGkTSfk44+TtbFfpysAqjD6I+wXJQLTZ/V0ILYkHx3aujJyqQ6lRFKaww5jeYGRmJdnP75R5O7qKBvD5HwKZdf1D8Lgg9IJdU9YSHmROjEMEcq6bYhAQVfrPSK/4PJuS433LXzF8A; 4:flRA1Oq1+3TkFBfaT5Rr7BBp/4Af5BtS6JL5Ki84QpNXROWCj+kLXSu5A9/bkR79NvW/UaJ9Uc1MZIFRrCL2Xy72Sx5viDCPwxUz7Im8BDE9QrqQwlK1xVBVcDhq8wRIvu9UOtt1Zfg9wl1iMssKnhhimkWBP6kLHXRhgEyQ1rZewS7evyg0L71nbCAP73z1aaPT0DAO/U2ApszZuxll/RGELzLwBS6lhEmH1xFOu/lTiGdUC2wsedI8gr8mNEgjkSlS65xDVW+gpuJ0AXPuaw== 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)(8121501046)(5005006)(3002001)(3231020)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR05MB1930; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR05MB1930; X-Forefront-PRVS: 0476D4AB88 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39830400002)(346002)(376002)(199003)(189002)(53936002)(53416004)(2906002)(86362001)(50466002)(48376002)(305945005)(7736002)(4326008)(69596002)(8936002)(50986999)(107886003)(101416001)(76176999)(1076002)(25786009)(478600001)(8676002)(81156014)(103116003)(81166006)(36756003)(3846002)(68736007)(6486002)(6116002)(16526018)(50226002)(5003940100001)(2950100002)(54906003)(6666003)(6916009)(33646002)(16586007)(66066001)(47776003)(189998001)(5660300001)(97736004)(2351001)(2361001)(105586002)(316002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR05MB1930; 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; CY1PR05MB1930; 23:sI4GXXJrrMUTUejLfA36v2aOu7PXuMMsgZ5c6pmk9?= =?us-ascii?Q?+WhOeI9MX48oZF/bk1j377O7e7iEot8CpfYFZqqHIOVCLru47L5RKxg9u209?= =?us-ascii?Q?FHnUWi2M7W1ze3QVPyGQyl5ZEKEk70PpIshd7ZDaWdrdZV73u36MiE0UDBwI?= =?us-ascii?Q?LvduxAzG2W8sapxwZYpkuFJ6+nBmM3wJia/6q6IcLTv7bZRUT2yryX8eIjeI?= =?us-ascii?Q?+neH4wQMxqnuKuCA2l+BViBqAZ0ahqo7PaMuTvXuQZ5r47ehGSu1Z1t2Q0en?= =?us-ascii?Q?M5ehUyy6IL6QDGZLpti78u31nIs5g7yee3KTJhgnjJc7NH1sgMHxd5J4LhxZ?= =?us-ascii?Q?WaHfDcuO/GNJKOreYIW4ZT80QtCLZZEtXLSqqTs2U8YGkuZ47bsKlJ0BqOau?= =?us-ascii?Q?YYXPNQtv+Pqc3wCy8vuDuhTyhSrU9sFjryeucdFGl0ttpkoRJhbpYWyQtTLG?= =?us-ascii?Q?K5XnBAZomz+Hf4pLkaN9RIO2A/tYbzTNr9C0pxYgD+LAk0nd9lPGUv8CxjYw?= =?us-ascii?Q?/XTBJX1kKfMw7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4yQxgvAgSZyy5ScysJ7qOeG5wG20HyBod1ChxHFEATiZ1QHCamVJFhUtsIQ6sWedShhLs/Y/Qm4UsGFv2wZMwdZpefn7PKWMaQBhqflwXTdNVj7/LL/hFJrBOQEEfYDyYl18JRRYZqwV6/KR4n6mGN485KUUDYos=; 5:JnzXY1l6+M++OwMT6ZnHT8jqewaZBmAibvx/0lZrR7eUzyBrLk2VDBQA8L77/YHwXymgZ/9qoTSYKDZ4CGSlOiQuzlnaqnXIW+qDxQ761E//JQvUioRNfiJCk4jbieax/zX0XshNE3OamwOZ7He9yuVmTrprxcXc3857jKgosck=; 24:5TIaQx9Sqc4yLGsAGHXE6PO+g46aIfg8d7D9HPex1L4syup+9nqp8JM8nX6gIM/6uenf71d5T+lHQ4h1THXvIKMeve4gTP+cNvDVmuu+ZW4=; 7:70z3Yn+iTaoQWMsM0B2CNH9pyKk46hlvwlcndlUqNLmL4PxNcDWlGyOkFT+DqE/oKw/IJvy/DwI0WJBIqLBWHJzLGsxLJictFfLJoLWoNyM3O8yhyfkvaDsh42ir5V3PWZGk8NOX2xjOlrUFqy+jpo3Zkwy6HQGXSzxnrHl3eIU0VUyN524gX3tkMTJLj7Gyj68ESRtUKu/KszFYubYLIpGlveknpDhkzaxy0KxoKQxmIW+AyqINFQZyW1ogHPiE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2017 10:14:16.3686 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 07104b1c-9320-4802-6476-08d51f7efabb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB1930 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 64db4082c9d2..e70f5bd5e498 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -956,7 +956,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 {