From patchwork Wed Jan 9 16:08:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10754437 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-2.web.codeaurora.org (Postfix) with ESMTP id 068EA14DE for ; Wed, 9 Jan 2019 16:18:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAA1E29345 for ; Wed, 9 Jan 2019 16:18:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC5012946B; Wed, 9 Jan 2019 16:18:15 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 DB4CD29097 for ; Wed, 9 Jan 2019 16:18:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732662AbfAIQSN (ORCPT ); Wed, 9 Jan 2019 11:18:13 -0500 Received: from mail-eopbgr730062.outbound.protection.outlook.com ([40.107.73.62]:16105 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731100AbfAIQSN (ORCPT ); Wed, 9 Jan 2019 11:18:13 -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:X-MS-Exchange-SenderADCheck; bh=jTFsucJB0eEaua9mqU1n9S2aN5yM0k8/UZ5dbfKQ+lo=; b=OcLQqGGj2R4WrgtL9WncH2WVEhZLMz7wENZ6sywBPDAMSt+dglkcR94vxC4YHbrejersETLRcs9hOmFac+HTHF9DiAQ2A78W/MJvAixqshqpoOeHkbUvByZbXNBB4mTIZaNaRUEjVAmMfxu1Sr3DOMCdE1e7SENkOYFXYOrVVrg= Received: from MWHPR05MB3567.namprd05.prod.outlook.com (10.174.250.158) by MWHPR05MB3229.namprd05.prod.outlook.com (10.173.229.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1537.10; Wed, 9 Jan 2019 16:17:59 +0000 Received: from MWHPR05MB3567.namprd05.prod.outlook.com ([fe80::edd7:b7bf:920:e463]) by MWHPR05MB3567.namprd05.prod.outlook.com ([fe80::edd7:b7bf:920:e463%2]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:17:58 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com (52.135.117.74) by SN6PR05MB5264.namprd05.prod.outlook.com (20.177.252.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:08:54 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5]) by SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5%6]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:08:54 +0000 From: Sergey Matyukevich To: "linux-wireless@vger.kernel.org" CC: Igor Mitsyanko , Andrey Shevchenko Subject: [PATCH 1/7] qtnfmac: support EBUSY errcode for QLINK protocol Thread-Topic: [PATCH 1/7] qtnfmac: support EBUSY errcode for QLINK protocol Thread-Index: AQHUqDWe8TkZgrsN6kmLNUszhkMh7g== Date: Wed, 9 Jan 2019 16:08:54 +0000 Message-ID: <20190109160843.14832-2-sergey.matyukevich.os@quantenna.com> References: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> In-Reply-To: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0087.namprd07.prod.outlook.com (2603:10b6:a03:12b::28) To SN6PR05MB4928.namprd05.prod.outlook.com (2603:10b6:805:9d::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [195.182.157.78] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR05MB3229;6:1QioEcHtTG7BW4QTRJzrw6GXsso911BHCzUfC/+vYvNRFgNbPFJc3nePXzXwJreNYNdTtdlreZC1UuHsLTeMaanBhsaP6Fi0Xw+DiTUzofKemoHU59ocTrY6GqpUE4JHb8/YBUST76IYG6T45IAMfMH07pGq/ZJWpm0rvnEFkqi8yY2Jy8siEOH/caidbgtQWP6MSbk0juGsNtsSEuJyZ722cZB9Mjlu37hxHbzmFzMV6WBpma+Pmk029Ov7wfqvtu+u9xlh0f2YKNSF4AkoG1XOnaUfFRudvUvOAep9BoqQ7gHy25Tuim5VxE5wY//U+A6wZFw3Hpl0Hh/VTyPtQoBtDLPCO0SjCjp0Ao8DxNSg5TixWmNONhQyqToOGcTYfBesrsBeIrC4dJqVgxKF7vjS0/Z+SBMunVOP7qxFS5kogP7DCr66kgacVFByN1Z6qqnUy57EVlgUv12xs+FTfQ==;5:lQRX8EbHUnVe2qYMLsBdwpKELu0sjYSOCY/1oapot2wfXLi4zsfHO0LcS63LcRJKuxafyU4MkNiDDVdaJK1JQieXZ0ZIsZ7ZJ8nwnDg9PJf2fG9HetS02PDBlUm06KhQv9LA5zJ78QdeTTszSpw6Du9GfTvuykKQEkttyoFYPb0EhFPdxD8QQKvIJfcjeNKpfFtUQeboacJIXSFkLcH78A==;7:hutcZKZ4W3l4Qu33eMT47IP1veOcpKm3Sa8wWz53KJTvkZTWZgLuZxCiBww1rE694A/Nb5UFh1tLOZJzg9Vi2jsAzRjrSsuTZucViMN+4gz36GSBclSAqlf8TAdvtY8TGX91GRS0SltdZCgssn+0Sg== x-ms-office365-filtering-correlation-id: e6b22f87-2d3d-4c6a-2d45-08d6764cc09f x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR05MB5264; x-ms-traffictypediagnostic: SN6PR05MB5264:|MWHPR05MB3229: x-moderation-data: 1/9/2019 4:17:55 PM x-microsoft-antispam-prvs: x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39850400004)(396003)(366004)(376002)(346002)(136003)(199004)(189003)(25786009)(68736007)(478600001)(14454004)(316002)(7736002)(54906003)(4326008)(11346002)(446003)(99286004)(107886003)(6512007)(186003)(76176011)(52116002)(26005)(106356001)(6346003)(305945005)(6506007)(105586002)(386003)(71190400001)(2351001)(71200400001)(102836004)(53936002)(103116003)(36756003)(486006)(2616005)(476003)(1076003)(81156014)(8936002)(3846002)(6116002)(8676002)(81166006)(2501003)(5660300001)(66066001)(256004)(6436002)(6486002)(97736004)(436003)(86362001)(2906002)(6916009)(5640700003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR05MB3229;H:MWHPR05MB3567.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 5dX5KGM4tTTIGcyHl8sg+Yys7fvA5FdzQCUvX2QAX1qT3XZ5SyReF9Me/9pRvQoV1//J4/lCVCHLKiIHlrR/Cbsb9vnYDHpDqstCD83VJTBXmtT99VLRJ/N4/z3H5oBJxXJXaG4Zb5C/8KU7kpJtlC44NvdQbssRx/bdGSGQjhHthE0/IbHY6zTyU49s91c+FKu2fvr31dwhzvupKu0Esx0HFcXhZRV3uNU6oYOQemwIVK5N65P1vIM+j3FSNxjSEohQhh3Q16hAT3Pr6KLEUVW8ZC9FYQl3QtmOvSB9X+gdXyPdCrtaxbVqcaLg7RIR spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6b22f87-2d3d-4c6a-2d45-08d6764cc09f X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2019 16:17:58.9653 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR05MB3229 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: Andrey Shevchenko Add support of EBUSY error code for remote procedures over QLINK protocol. Signed-off-by: Andrey Shevchenko --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 ++ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 659e7649fe22..c2f085589f54 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -72,6 +72,8 @@ static int qtnf_cmd_resp_result_decode(enum qlink_cmd_result qcode) return -EADDRINUSE; case QLINK_CMD_RESULT_EADDRNOTAVAIL: return -EADDRNOTAVAIL; + case QLINK_CMD_RESULT_EBUSY: + return -EBUSY; default: return -EFAULT; } diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 8d62addea895..f9c7f87afaf8 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -733,6 +733,7 @@ enum qlink_cmd_result { QLINK_CMD_RESULT_EALREADY, QLINK_CMD_RESULT_EADDRINUSE, QLINK_CMD_RESULT_EADDRNOTAVAIL, + QLINK_CMD_RESULT_EBUSY, }; /** From patchwork Wed Jan 9 16:08:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10754439 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-2.web.codeaurora.org (Postfix) with ESMTP id 1017414DE for ; Wed, 9 Jan 2019 16:18:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0FDA29097 for ; Wed, 9 Jan 2019 16:18:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E292D2946B; Wed, 9 Jan 2019 16:18:21 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 CCE2329097 for ; Wed, 9 Jan 2019 16:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732703AbfAIQST (ORCPT ); Wed, 9 Jan 2019 11:18:19 -0500 Received: from mail-eopbgr750042.outbound.protection.outlook.com ([40.107.75.42]:34736 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732683AbfAIQSS (ORCPT ); Wed, 9 Jan 2019 11:18:18 -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:X-MS-Exchange-SenderADCheck; bh=YAlhlCgS0POEW2tI3EHE7ZUr4rcC8zREazI/E0ILplc=; b=sIeim4uzzkfXcwg61JgdDAZ/YtzpI3Q4ORTIWWmio6+1eJFcB/mM/aKW8FpuRePxclRyv5d9VxxtVyvlK2wi0GdSLZvtpDyKGYNZT5z/QOb4DEMdcNd8ZmeCeL8Rm1GjvWxRo/4DjBKAu7exM/BRAEbE+DzdaZ35GNRcKKKEBJE= Received: from SN6PR05MB5326.namprd05.prod.outlook.com (52.135.111.214) by SN6PR05MB5149.namprd05.prod.outlook.com (20.177.252.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.10; Wed, 9 Jan 2019 16:18:14 +0000 Received: from SN6PR05MB5326.namprd05.prod.outlook.com ([fe80::2d1b:782b:7272:fdcf]) by SN6PR05MB5326.namprd05.prod.outlook.com ([fe80::2d1b:782b:7272:fdcf%5]) with mapi id 15.20.1516.015; Wed, 9 Jan 2019 16:18:14 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com (52.135.117.74) by SN6PR05MB5264.namprd05.prod.outlook.com (20.177.252.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:08:56 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5]) by SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5%6]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:08:56 +0000 From: Sergey Matyukevich To: "linux-wireless@vger.kernel.org" CC: Igor Mitsyanko , Andrey Shevchenko , Sergey Matyukevich Subject: [PATCH 2/7] qtnfmac: fix legacy PCIe interrupt handling Thread-Topic: [PATCH 2/7] qtnfmac: fix legacy PCIe interrupt handling Thread-Index: AQHUqDWfiDp1OdNqK0+HLaH82JeJ1Q== Date: Wed, 9 Jan 2019 16:08:56 +0000 Message-ID: <20190109160843.14832-3-sergey.matyukevich.os@quantenna.com> References: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> In-Reply-To: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0087.namprd07.prod.outlook.com (2603:10b6:a03:12b::28) To SN6PR05MB4928.namprd05.prod.outlook.com (2603:10b6:805:9d::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [195.182.157.78] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SN6PR05MB5149;6:5nmzEwvyqGsl9MfqiqumwYyCNrFb2anKN3jgf+yWgzSGIpc+yKRIVy1ajFlqRdcOiiWVRRus+ewidk0EAwVsA524+tqxa6VD285v7ky3tASyfpFBxaAn8K5U6BvkxVBGZYkzulBNnqCO5RDrQIkzyfm1yw7N3dJQrHUCszi/fRMCpa96rxEnzAU3cSjk59WDxpE8cy373uvQIDgILwl8ejXiF6ycaESpj6o5HCAqJ2I8irMZDGJhJG8zzrVBee3IwPedFxWDpA54JtZr/yzOvOWELOGSkoLaHbGWbNcQFQllCitPe1RYxWWyr7JPsH4a+tjWRT+FJPWY0DgAcgJyUER+qbU8sxgq/bQM7TBncuFPR2v/VJWbGPuLGElB2ZBQVrWdJkhYVy7vGUNlcdFmkeeHnZfbJ3cIc29X7tnDv3CUjpCfWFVimJPkSDxLmkCvSlKo6HuiYcm96qJXMW0/4Q==;5:vuN0avvvyJcDhtrSCschHqzD4yaCKWLf6cY86CqCzoVCkNxQDqonaAY1kh84CofZuiiHla7SVYDDOc1pJ/bYBhUxNUdzey61rDWU15TbZLQenHTnRevNqpX1mYrZVzEgi1sutdY71js04D3xFWdwLv2qFfVBxyW83eONruuGfsppnB/ViU1Usw+SVc5d2KQBM7Je/JRj12hGrTwqc4Agwg==;7:0Foyd7Ir5IBxRkN8BSWrvqJRWX5rzYPsFU8LYpUjx17U33CXF0aUEEkmNlhkyuFriJ27hMA5y1Km9dS/2Ll3pX55keZ3zkPFUOOogcTK+WFoipEPL8WPICSLn5iXWXQkhsOdkDA5tWXC6mnrDyIUCw== x-ms-office365-filtering-correlation-id: 23f63de0-3487-4167-6e32-08d6764cc1ce x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR05MB5264; x-ms-traffictypediagnostic: SN6PR05MB5264:|SN6PR05MB5149: x-moderation-data: 1/9/2019 4:18:12 PM x-microsoft-antispam-prvs: x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(376002)(396003)(39850400004)(366004)(136003)(189003)(199004)(6436002)(6916009)(11346002)(6512007)(2906002)(106356001)(105586002)(81156014)(81166006)(8676002)(54906003)(86362001)(4326008)(256004)(102836004)(99286004)(68736007)(6486002)(8936002)(7736002)(3846002)(2351001)(107886003)(316002)(6116002)(446003)(36756003)(5640700003)(53936002)(476003)(103116003)(25786009)(486006)(97736004)(14454004)(1076003)(52116002)(66066001)(478600001)(386003)(2501003)(26005)(436003)(6506007)(76176011)(6346003)(2616005)(71190400001)(305945005)(5660300001)(186003)(71200400001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR05MB5149;H:SN6PR05MB5326.namprd05.prod.outlook.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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: RHiBG8u9ooApZXPCwLwSjTIA02xLpTST1rRFC/cXzynxK7MYr0lby63w+8TtbYZmGnu6HIsB0plyG/pRNxkwzD8pu8CrtooBf/v/25a1cdVMAf3ac7B3oyC4i0ZtCaReOwtXWFKbYUlfm3bpmg7VPfQC8LEH9XSUHt2OBJRTW1Qv7v6kIyGuvZgYEs6HBvA5NnJnwLGBPLqNbL1qpUqkLtb+357Em3lXg+hMpZCt/CBXzKSVedC9+qm5OmnWaW3MsljPXzotG2PLOACXcO2z3oTuLqF5xHDOXIbyngbn73/KhY9KTMAhJ66MAXkQAaEk spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23f63de0-3487-4167-6e32-08d6764cc1ce X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2019 16:18:14.1638 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB5149 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 In the current implementation INTx interrupt is deasserted after the control path processing. However this leads to missed interrupts from the wireless card. For instance, this may happen as a result of control path activity, when another interrupt arrives before INTx is deasserted. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c index 598edb814421..cbcda57105f3 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c @@ -559,6 +559,9 @@ static irqreturn_t qtnf_pcie_topaz_interrupt(int irq, void *data) if (!priv->msi_enabled && !qtnf_topaz_intx_asserted(ts)) return IRQ_NONE; + if (!priv->msi_enabled) + qtnf_deassert_intx(ts); + priv->pcie_irq_count++; qtnf_shm_ipc_irq_handler(&priv->shm_ipc_ep_in); @@ -571,9 +574,6 @@ static irqreturn_t qtnf_pcie_topaz_interrupt(int irq, void *data) tasklet_hi_schedule(&priv->reclaim_tq); - if (!priv->msi_enabled) - qtnf_deassert_intx(ts); - return IRQ_HANDLED; } From patchwork Wed Jan 9 16:08:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10754449 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-2.web.codeaurora.org (Postfix) with ESMTP id 38BA514DE for ; Wed, 9 Jan 2019 16:21:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 298CD2940E for ; Wed, 9 Jan 2019 16:21:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D7F7294AE; Wed, 9 Jan 2019 16:21:17 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 54BEA294A8 for ; Wed, 9 Jan 2019 16:21:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732590AbfAIQVP (ORCPT ); Wed, 9 Jan 2019 11:21:15 -0500 Received: from mail-eopbgr780071.outbound.protection.outlook.com ([40.107.78.71]:35136 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731100AbfAIQVP (ORCPT ); Wed, 9 Jan 2019 11:21:15 -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:X-MS-Exchange-SenderADCheck; bh=ibrdH3Wb03akSIyfyMarEpEJn9iSs6l9EvYRZDtHYzU=; b=f/5I9OhpuSI/l3sBKbcjjcNJBmI6DBwmclyyaTYpZxx53BeDbzlNy94eY3MQ2dozz5mIHvYHc8MFKwAxkp2Lk2uhUAX/NyVqUX/F3P0G3jHyPd3BJ42Gthd2UGIIXRhj4Xu//q/z49BHL1FM8Pb5qhu7WL64rwcc2KVM9mzud5Y= Received: from BN6PR05MB3282.namprd05.prod.outlook.com (10.174.95.29) by BN6PR05MB3364.namprd05.prod.outlook.com (10.174.95.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:18:25 +0000 Received: from BN6PR05MB3282.namprd05.prod.outlook.com ([fe80::93c:653a:fcac:74fe]) by BN6PR05MB3282.namprd05.prod.outlook.com ([fe80::93c:653a:fcac:74fe%3]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:18:25 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com (52.135.117.74) by SN6PR05MB5264.namprd05.prod.outlook.com (20.177.252.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:08:58 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5]) by SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5%6]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:08:58 +0000 From: Sergey Matyukevich To: "linux-wireless@vger.kernel.org" CC: Igor Mitsyanko , Andrey Shevchenko , Sergey Matyukevich Subject: [PATCH 3/7] qtnfmac: add support for 4addr mode Thread-Topic: [PATCH 3/7] qtnfmac: add support for 4addr mode Thread-Index: AQHUqDWg3er6X1GCYEuBkwCp6ITIQQ== Date: Wed, 9 Jan 2019 16:08:58 +0000 Message-ID: <20190109160843.14832-4-sergey.matyukevich.os@quantenna.com> References: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> In-Reply-To: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0087.namprd07.prod.outlook.com (2603:10b6:a03:12b::28) To SN6PR05MB4928.namprd05.prod.outlook.com (2603:10b6:805:9d::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [195.182.157.78] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN6PR05MB3364;6:VxkXWgfrvGe0s/lIhYjrxcBYCjokcJlyIeESNj0ZWAXF3j2MET9EKzRoSXnrEts8IBwcQAuQ9n71a/eBSc0RcI94FN4vFOLO/0W3qfTrJlYX/5tNuqnYHNPyfo3vV/DC3ms0PZIXMUBIqATypKmxBoABLoJWUuoL6jtCKMZa0jxi3gonUr+2b2dm2w+42yX+uKigWSFV7EuMd7GysP5Xjy4zSzDGPE4o9uelo6ZIvX6j+6G7rYV0rsucSwW66dueRnV1VzQt1QFROOuPQbD3pmQXdygC3G9oRuSTclG/qdS8VuK1qtsJf4Xy543iLZgtzq0saYoovxe5Tb74/VW1ygV80Mm0naKblaFPrggQRun4PBFDI0ioEWh0CTmUIF94GhfipQqJc1tJ3u6UsVfr3OSphV9tkMaKZScqHfKskvzIlkY+r1sOzAJ4ihSLXpXsgJ9T/0cKWvX5F3F/wO7sYA==;5:jpHiHdZb+5RYM2VZgvST8ATwH4adhdIBVcJcxxV7kn91WMDQ4ZIipAxasCyKCfCCRsTxebBA+7592PjAG6zQXTvIZjNo60nwYVaAMeR+s3b7t/lZGfWv1+LdtBlxCZwumBvYc5A7Yd96S4hchHm7U7/HDWsmBqOVHWaQVm15d7WfI7tBFXWqZxgqLA4HXn/3ta4Ci1cp0xXubHKngvZHuw==;7:OJ9bqTfBCZE674TDJcxv/+qIG+pZSDz6tUvp4pc9jUzT8cafTUTLwIbSq8C7JR2qQ6szWSJrZI9jv+jZ6k0CWCxXX+baENyQZuRxqBIX1WBDnU8wffk/I+s0N7nZggYtKvObbK+ggcDiEooVjI/xSg== x-ms-office365-filtering-correlation-id: f792521d-1d60-4a86-81e5-08d6764cc2f6 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR05MB5264; x-ms-traffictypediagnostic: SN6PR05MB5264:|BN6PR05MB3364: x-moderation-data: 1/9/2019 4:18:15 PM x-microsoft-antispam-prvs: x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(346002)(39850400004)(136003)(376002)(199004)(189003)(6346003)(68736007)(186003)(26005)(5024004)(14444005)(2906002)(102836004)(256004)(103116003)(436003)(71200400001)(71190400001)(6916009)(5660300001)(25786009)(11346002)(2616005)(446003)(476003)(3846002)(53936002)(36756003)(6116002)(6512007)(1076003)(478600001)(2501003)(14454004)(54906003)(2351001)(99286004)(6486002)(4326008)(5640700003)(486006)(66066001)(97736004)(6436002)(386003)(6506007)(316002)(105586002)(7736002)(305945005)(107886003)(86362001)(575784001)(52116002)(76176011)(8936002)(81166006)(81156014)(106356001)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR05MB3364;H:BN6PR05MB3282.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: l2yxatsjsgKXyMQ/wz2+kGwGtzzj7hbV/qY0uJfw+Ks9zJGmHJUPZci8yZ/VnqCswvQQDVTLUfXBaf095WsVFwEurV6jBjiVpvcjPdCrZkLxlfvsstDBZZnFQD+oxrt1lReiGU0+5d+fvo8QTv7mShgBg0Qj4RiQtLSH+ku+0jM5kfZGdxbGSbAccuE+sAfH/9x4ZzC6xH8p40l2/nqviTdqW7RT1YJx1S5c3r4rnJG55CWg/XK3jPARIhhp5ruenrpTE/21wG7UWe8M1f8cYOCShzlNQa4EFmdiquwsH69lWshlmyCPifyVIqQqYguK spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: f792521d-1d60-4a86-81e5-08d6764cc2f6 X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2019 16:18:25.0785 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3364 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 Advertise WIPHY_FLAG_4ADDR_STATION capability to wireless core. Send use4addr interface change flag to firmware in change_virtual_intf cfg80211 callback. In order to enable adding wireless station interface to bridge one should turn on 4addr mode using the following command: $ iw dev wlan0 set 4addr on $ brctl addif br0 wlan0 If this commands succeeds, then interface can be added to bridge. Note that when wireless interface is added to bridge, wpa_supplicant should be started with appropriate -b parameter, e.g: $ wpa_supplicant -Dnl80211 -iwlan0 -c/path/to/wpa_s.conf -b br0 Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 8 +++++--- drivers/net/wireless/quantenna/qtnfmac/commands.c | 14 +++++++++----- drivers/net/wireless/quantenna/qtnfmac/commands.h | 6 ++++-- drivers/net/wireless/quantenna/qtnfmac/core.c | 4 +++- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 3 ++- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 51b33ec78fac..9e0ac1744be7 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -139,7 +139,8 @@ qtnf_change_virtual_intf(struct wiphy *wiphy, qtnf_scan_done(vif->mac, true); - ret = qtnf_cmd_send_change_intf_type(vif, type, mac_addr); + ret = qtnf_cmd_send_change_intf_type(vif, type, params->use_4addr, + mac_addr); if (ret) { pr_err("VIF%u.%u: failed to change type to %d\n", vif->mac->macid, vif->vifid, type); @@ -228,7 +229,7 @@ static struct wireless_dev *qtnf_add_virtual_intf(struct wiphy *wiphy, if (params) mac_addr = params->macaddr; - ret = qtnf_cmd_send_add_intf(vif, type, mac_addr); + ret = qtnf_cmd_send_add_intf(vif, type, params->use_4addr, mac_addr); if (ret) { pr_err("VIF%u.%u: failed to add VIF %pM\n", mac->macid, vif->vifid, mac_addr); @@ -1107,7 +1108,8 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac) wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD | WIPHY_FLAG_AP_UAPSD | - WIPHY_FLAG_HAS_CHANNEL_SWITCH; + WIPHY_FLAG_HAS_CHANNEL_SWITCH | + WIPHY_FLAG_4ADDR_STATION; wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; if (hw_info->hw_capab & QLINK_HW_CAPAB_DFS_OFFLOAD) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index c2f085589f54..0748a756cc1c 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -734,6 +734,7 @@ int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac, static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif, enum nl80211_iftype iftype, + int use4addr, u8 *mac_addr, enum qlink_cmd_type cmd_type) { @@ -751,6 +752,7 @@ static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif, qtnf_bus_lock(vif->mac->bus); cmd = (struct qlink_cmd_manage_intf *)cmd_skb->data; + cmd->intf_info.use4addr = use4addr; switch (iftype) { case NL80211_IFTYPE_AP: @@ -786,17 +788,19 @@ static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif, return ret; } -int qtnf_cmd_send_add_intf(struct qtnf_vif *vif, - enum nl80211_iftype iftype, u8 *mac_addr) +int qtnf_cmd_send_add_intf(struct qtnf_vif *vif, enum nl80211_iftype iftype, + int use4addr, u8 *mac_addr) { - return qtnf_cmd_send_add_change_intf(vif, iftype, mac_addr, + return qtnf_cmd_send_add_change_intf(vif, iftype, use4addr, mac_addr, QLINK_CMD_ADD_INTF); } int qtnf_cmd_send_change_intf_type(struct qtnf_vif *vif, - enum nl80211_iftype iftype, u8 *mac_addr) + enum nl80211_iftype iftype, + int use4addr, + u8 *mac_addr) { - return qtnf_cmd_send_add_change_intf(vif, iftype, mac_addr, + return qtnf_cmd_send_add_change_intf(vif, iftype, use4addr, mac_addr, QLINK_CMD_CHANGE_INTF); } diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.h b/drivers/net/wireless/quantenna/qtnfmac/commands.h index 1ac41156c192..1c25e7905e9a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.h +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.h @@ -26,9 +26,11 @@ void qtnf_cmd_send_deinit_fw(struct qtnf_bus *bus); int qtnf_cmd_get_hw_info(struct qtnf_bus *bus); int qtnf_cmd_get_mac_info(struct qtnf_wmac *mac); int qtnf_cmd_send_add_intf(struct qtnf_vif *vif, enum nl80211_iftype iftype, - u8 *mac_addr); + int use4addr, u8 *mac_addr); int qtnf_cmd_send_change_intf_type(struct qtnf_vif *vif, - enum nl80211_iftype iftype, u8 *mac_addr); + enum nl80211_iftype iftype, + int use4addr, + u8 *mac_addr); int qtnf_cmd_send_del_intf(struct qtnf_vif *vif); int qtnf_cmd_band_info_get(struct qtnf_wmac *mac, struct ieee80211_supported_band *band); diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index 5d18a4a917c9..29258acfa8dc 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c @@ -195,6 +195,7 @@ static int qtnf_netdev_set_mac_address(struct net_device *ndev, void *addr) qtnf_scan_done(vif->mac, true); ret = qtnf_cmd_send_change_intf_type(vif, vif->wdev.iftype, + vif->wdev.use_4addr, sa->sa_data); if (ret) @@ -545,7 +546,8 @@ static int qtnf_core_mac_attach(struct qtnf_bus *bus, unsigned int macid) goto error; } - ret = qtnf_cmd_send_add_intf(vif, vif->wdev.iftype, vif->mac_addr); + ret = qtnf_cmd_send_add_intf(vif, vif->wdev.iftype, + vif->wdev.use_4addr, vif->mac_addr); if (ret) { pr_err("MAC%u: failed to add VIF\n", macid); goto error; diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index f9c7f87afaf8..a78cb9e05068 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -105,7 +105,8 @@ struct qlink_intf_info { __le16 if_type; __le16 vlanid; u8 mac_addr[ETH_ALEN]; - u8 rsvd[2]; + u8 use4addr; + u8 rsvd[1]; } __packed; enum qlink_sta_flags { From patchwork Wed Jan 9 16:09:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10754441 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-2.web.codeaurora.org (Postfix) with ESMTP id EA0C413B4 for ; Wed, 9 Jan 2019 16:18:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D768729097 for ; Wed, 9 Jan 2019 16:18:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9CBB2946B; Wed, 9 Jan 2019 16:18:34 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 5074829097 for ; Wed, 9 Jan 2019 16:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732678AbfAIQSd (ORCPT ); Wed, 9 Jan 2019 11:18:33 -0500 Received: from mail-eopbgr730074.outbound.protection.outlook.com ([40.107.73.74]:41411 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731100AbfAIQSd (ORCPT ); Wed, 9 Jan 2019 11:18:33 -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:X-MS-Exchange-SenderADCheck; bh=QEoLJJjeET7YVkkVmrU75AfN8ifqCZbwbdPtWBe7uQA=; b=v0L5b92RTgaLeeYB9wCYUs4QfvJ3CGE3DwxzJIzh8/TFSR/gOs/eW9l+XQimmms8xYU9DyZXoPXJgex3E0S1h2rkDjjjKPWREYGKQGTOz49nOVNLbWBJwOXnBVNpX1yAO/FO5jrfZRPYDH9ek7Uf8HpQzWl+WSobbde4u314Z8A= Received: from DM6PR05MB6348.namprd05.prod.outlook.com (20.178.224.143) by DM6PR05MB5227.namprd05.prod.outlook.com (20.177.223.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.3; Wed, 9 Jan 2019 16:18:27 +0000 Received: from DM6PR05MB6348.namprd05.prod.outlook.com ([fe80::1509:cc07:d728:69df]) by DM6PR05MB6348.namprd05.prod.outlook.com ([fe80::1509:cc07:d728:69df%4]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:18:27 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com (52.135.117.74) by SN6PR05MB5264.namprd05.prod.outlook.com (20.177.252.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:09:00 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5]) by SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5%6]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:09:00 +0000 From: Sergey Matyukevich To: "linux-wireless@vger.kernel.org" CC: Igor Mitsyanko , Andrey Shevchenko , Sergey Matyukevich Subject: [PATCH 4/7] qtnfmac: switch to 32bit values for RTS/FRAG thresholds Thread-Topic: [PATCH 4/7] qtnfmac: switch to 32bit values for RTS/FRAG thresholds Thread-Index: AQHUqDWhN1AXDTY7LkCpTe4y+lKMQA== Date: Wed, 9 Jan 2019 16:09:00 +0000 Message-ID: <20190109160843.14832-5-sergey.matyukevich.os@quantenna.com> References: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> In-Reply-To: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0087.namprd07.prod.outlook.com (2603:10b6:a03:12b::28) To SN6PR05MB4928.namprd05.prod.outlook.com (2603:10b6:805:9d::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [195.182.157.78] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM6PR05MB5227;6:rZIjjygB7zYKSJ3Ih9qVIo6iLwDzILBz4jhNxwAa6sUwfvlepHkrjftyMQ1yeqFmrcuQnH2J0LPaXe4+a6Cq8XwZIkAbVsfdJSyxgSzv0zkGIqve4fsHQlhaTgCnKeepYSQg2N45GGzkLTLbsoKrmMN9iuqIwCLeW6evcmghGlGztYEtGjkRgzpvrDbSEvz0JgkzyAsdMdCLOEYF+DcFXZ/pLXx3aNGOpE/uGQpVQp8Wz7eIroKJC3rq4kzlQGwmbpGdEDY9H2dpjzwDIlwjuG8F2KECviTLNjKTxw3RW6rxmyIkNUgdswV+PfLmzrMIfPItyO7USRwe9ChDySNOCs5SAFPtBzO5WaTjBqWne/uhRSOL+cw1v1wJPGUejUqileOf9rPY92h2NLZA9fFmtcrT/j1sTDZiS3oSDL8Fdutz/N61L4ANUiKt36n4SAwdhCksVK7bcEOsMEz/rk6d3g==;5:I5/hRkyThgKVGJDw/SqjgZVv2+Q+fSVOstYB+lV1iaZATsdZl4SnHXa6GTcSJ8mIjiPfnpFd0ZaPxhBuM55/zy1P1uzsqOVV5YA2x4LIjx4E8mxEZKvvcnK1LGdAZUeRPD6LfYPhOO9Fs0+uJyhLaMK0BxkP+sm4URCnFp+UYVgbDzY1S9cx+a7nkI8jvVUsv1MbY3vPi0A2OlPuegbuHg==;7:KOxQ27Yv4Up6wCcCQwxWB4QPG3loAiLksPjMv3nRY51NJCd6vGsLXKfggHHSOzr7Im441tZUQtxZGR+s+iZdRsMcIPNWGB5onlhkNTeWPxVEBDwTx+09VLbG/tsWBXJXev1/KyrK5i9ocadsNROVTg== x-ms-office365-filtering-correlation-id: a1641de5-84c9-4510-a738-08d6764cc41f x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR05MB5264; x-ms-traffictypediagnostic: SN6PR05MB5264:|DM6PR05MB5227: x-moderation-data: 1/9/2019 4:18:24 PM x-microsoft-antispam-prvs: x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39850400004)(136003)(346002)(396003)(366004)(376002)(199004)(189003)(1076003)(76176011)(36756003)(486006)(476003)(11346002)(5640700003)(446003)(7736002)(6486002)(81166006)(256004)(2616005)(81156014)(8676002)(6436002)(14454004)(14444005)(71190400001)(71200400001)(3846002)(6116002)(4326008)(99286004)(305945005)(436003)(2906002)(8936002)(5660300001)(53936002)(105586002)(2501003)(66066001)(316002)(107886003)(86362001)(575784001)(186003)(68736007)(54906003)(478600001)(6346003)(26005)(386003)(2351001)(103116003)(102836004)(106356001)(6512007)(6506007)(52116002)(6916009)(97736004)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR05MB5227;H:DM6PR05MB6348.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 81Kr+YLr2kUsY0KdnNP26xMR1PW6UsbKkruHtDAxu/GDlcIYqcJtV7uef0F2DznCldN2wPFoAS0Kz8d36o3Gk4jKS8/z7qOD2BVxUus9P2kVPib1aHSZawT1jpJ1SO29zThmiVXNnrGQ6VGj7KlJvwgCo8UhQ+TvyCNMg0zHm97zvxECX96QG7eaJauMl0SgRtQlVEwo9LLtTzfPLVDCNhiiol3LUwHKvf64EG9diKw5QBjez/3TBXzE4s65Am7E/oA6KGeNK/a1MQtAQaI/BUdjoaQ4qtJBb4r6itJPfeOXNlmg2xFSaeeZu0JF2G9Z spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1641de5-84c9-4510-a738-08d6764cc41f X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2019 16:18:27.2624 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB5227 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 Host wireless stack uses u32 type for RTS/FRAG threshold values. Switch to u32 in driver: pass u32 values to firmware and let firmware properly adapt these values according to its internal representation. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 8 ++++---- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 4 ++-- drivers/net/wireless/quantenna/qtnfmac/qlink_util.h | 11 +++++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 0748a756cc1c..66cb05dfdba5 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -1564,11 +1564,11 @@ static int qtnf_cmd_resp_proc_phy_params(struct qtnf_wmac *mac, switch (tlv_type) { case QTN_TLV_ID_FRAG_THRESH: phy_thr = (void *)tlv; - mac_info->frag_thr = (u32)le16_to_cpu(phy_thr->thr); + mac_info->frag_thr = le32_to_cpu(phy_thr->thr); break; case QTN_TLV_ID_RTS_THRESH: phy_thr = (void *)tlv; - mac_info->rts_thr = (u32)le16_to_cpu(phy_thr->thr); + mac_info->rts_thr = le32_to_cpu(phy_thr->thr); break; case QTN_TLV_ID_SRETRY_LIMIT: limit = (void *)tlv; @@ -1816,10 +1816,10 @@ int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u32 changed) qtnf_bus_lock(mac->bus); if (changed & WIPHY_PARAM_FRAG_THRESHOLD) - qtnf_cmd_skb_put_tlv_u16(cmd_skb, QTN_TLV_ID_FRAG_THRESH, + qtnf_cmd_skb_put_tlv_u32(cmd_skb, QTN_TLV_ID_FRAG_THRESH, wiphy->frag_threshold); if (changed & WIPHY_PARAM_RTS_THRESHOLD) - qtnf_cmd_skb_put_tlv_u16(cmd_skb, QTN_TLV_ID_RTS_THRESH, + qtnf_cmd_skb_put_tlv_u32(cmd_skb, QTN_TLV_ID_RTS_THRESH, wiphy->rts_threshold); if (changed & WIPHY_PARAM_COVERAGE_CLASS) qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_COVERAGE_CLASS, diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index a78cb9e05068..ace52e9d421d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -19,7 +19,7 @@ #include -#define QLINK_PROTO_VER 11 +#define QLINK_PROTO_VER 12 #define QLINK_MACID_RSVD 0xFF #define QLINK_VIFID_RSVD 0xFF @@ -1184,7 +1184,7 @@ struct qlink_iface_limit_record { struct qlink_tlv_frag_rts_thr { struct qlink_tlv_hdr hdr; - __le16 thr; + __le32 thr; } __packed; struct qlink_tlv_rlimit { diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h index 960d5d97492f..fc87827cb49c 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h @@ -69,6 +69,17 @@ static inline void qtnf_cmd_skb_put_tlv_u16(struct sk_buff *skb, memcpy(hdr->val, &tmp, sizeof(tmp)); } +static inline void qtnf_cmd_skb_put_tlv_u32(struct sk_buff *skb, + u16 tlv_id, u32 value) +{ + struct qlink_tlv_hdr *hdr = skb_put(skb, sizeof(*hdr) + sizeof(value)); + __le32 tmp = cpu_to_le32(value); + + hdr->type = cpu_to_le16(tlv_id); + hdr->len = cpu_to_le16(sizeof(value)); + memcpy(hdr->val, &tmp, sizeof(tmp)); +} + u16 qlink_iface_type_to_nl_mask(u16 qlink_type); u8 qlink_chan_width_mask_to_nl(u16 qlink_mask); void qlink_chandef_q2cfg(struct wiphy *wiphy, From patchwork Wed Jan 9 16:09:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10754443 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-2.web.codeaurora.org (Postfix) with ESMTP id 00C0D14E5 for ; Wed, 9 Jan 2019 16:19:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0FF429235 for ; Wed, 9 Jan 2019 16:19:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2A8129301; Wed, 9 Jan 2019 16:19:11 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 8B4CC29235 for ; Wed, 9 Jan 2019 16:19:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732679AbfAIQTK (ORCPT ); Wed, 9 Jan 2019 11:19:10 -0500 Received: from mail-eopbgr810057.outbound.protection.outlook.com ([40.107.81.57]:2452 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732277AbfAIQTK (ORCPT ); Wed, 9 Jan 2019 11:19:10 -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:X-MS-Exchange-SenderADCheck; bh=5ncLF8/hV1dbHT0MFF0+NPdpLzh53yPYLgsYVzN/RRg=; b=1FyOnpK6Xp8D45jBdQ6pQQEuIUtAMxenP/ulkcskGKrgB/2umg8OmtcolAAK0lWvgjm5IfyzeLzaCD8aZWrycnP46XBQvVwvtnZK+rHSSFEqUA/SIE6nymSg6TR1MCDFvy1/zRPg4S1aZLnFbyXyvxS2S3QoXL+VKYODqta3oAI= Received: from SN6PR05MB4703.namprd05.prod.outlook.com (52.135.114.213) by SN6PR05MB5583.namprd05.prod.outlook.com (52.135.110.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:18:59 +0000 Received: from SN6PR05MB4703.namprd05.prod.outlook.com ([fe80::f973:9029:e692:6817]) by SN6PR05MB4703.namprd05.prod.outlook.com ([fe80::f973:9029:e692:6817%3]) with mapi id 15.20.1537.005; Wed, 9 Jan 2019 16:18:59 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com (52.135.117.74) by SN6PR05MB5264.namprd05.prod.outlook.com (20.177.252.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:09:02 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5]) by SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5%6]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:09:02 +0000 From: Sergey Matyukevich To: "linux-wireless@vger.kernel.org" CC: Igor Mitsyanko , Andrey Shevchenko , Sergey Matyukevich Subject: [PATCH 5/7] qtnfmac: do not reject retry changes in driver Thread-Topic: [PATCH 5/7] qtnfmac: do not reject retry changes in driver Thread-Index: AQHUqDWj+LuSpi6aQE6CwhLKGHgqPA== Date: Wed, 9 Jan 2019 16:09:02 +0000 Message-ID: <20190109160843.14832-6-sergey.matyukevich.os@quantenna.com> References: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> In-Reply-To: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0087.namprd07.prod.outlook.com (2603:10b6:a03:12b::28) To SN6PR05MB4928.namprd05.prod.outlook.com (2603:10b6:805:9d::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [195.182.157.78] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SN6PR05MB5583;6:ujUAFbKhvCEH5tcl17VyhiDH0W88gI37tkNiuANLx5nQQHrfyrtviJfdTyOz5mTy2JYvK3F3V4DTTw31bqqSvok0xAbcbOL30rp9vZy/nQ24faBvUisBfImLdoYxTfo84EuIRRIITvEoWdzSUsMR1bhWNSdmarYhwqpD3WnWl7jt2ZFB5WebrtWUGuDwbbw3SvBVizawTuPBMomIHAXIhTdzlfVo2hQ5373TIwtYovJIUsVEUsti8DvRhfy2rJRMMNkdu0GTnQPhDZvYv0+lQEvypqdQerOxE6ucue7gKtwnXuCcqq2gxkzYkgcQlpCP7j3dCeFUwhEcGgQKRzD/wYaT/zBnyXK42oxwwTwPW2/8ROXiZRw+6ZoF5lVyv7H9RxOUTOeWyuQeF/qqchPrMiKkFYW+HXuV48In7Pz8tVSPNvsLimTvNCR4F3RDbQArIeAfYM9N+d60mmIyegBP5w==;5:xeXfn3PQFUJ+FWekjcgYdJKTmgtSJfwF3k+i2sEKLv/k9wdSyYFC9kH/mg+yPLum8ISRLklNQ5ED/qG0+Nx4KJy5KhwoeVyG83NBjhEafK3uOeLRbCqaFJlLKiAHfRxE8tRG1bEPjfSj544BuL2pGmWaidvDYHHpP4YuR5dDUY0/Rp/JIXmeqVS1zjcVUtMHIeL9cib9YzIlYL9roupQyw==;7:/QqAgjT4o4gbRK2/a6DtsvySe7r92vkmWy2GJaQ06FiK0bf4P+TnbOOV09TRNtYBlIAmsVExIjSofIFfnfa0FnuVdptf9ds9JDdU2qxpwUtSmJs8dkQYUcV4Wiq+XphwziH2EGCclh+qMseYhrPPew== x-ms-office365-filtering-correlation-id: 723ad69b-3c8d-4ff3-ebfc-08d6764cc54c x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR05MB5264; x-ms-traffictypediagnostic: SN6PR05MB5264:|SN6PR05MB5583: x-moderation-data: 1/9/2019 4:18:56 PM x-microsoft-antispam-prvs: x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(346002)(39850400004)(136003)(376002)(189003)(199004)(305945005)(446003)(1076003)(486006)(316002)(186003)(36756003)(105586002)(99286004)(7736002)(26005)(2501003)(106356001)(6346003)(575784001)(66066001)(102836004)(6916009)(53936002)(86362001)(54906003)(6512007)(5640700003)(8936002)(256004)(14444005)(97736004)(436003)(103116003)(3846002)(25786009)(386003)(6506007)(107886003)(2616005)(478600001)(476003)(11346002)(6116002)(2906002)(4326008)(76176011)(8676002)(71190400001)(14454004)(71200400001)(52116002)(2351001)(81166006)(68736007)(6486002)(6436002)(5660300001)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR05MB5583;H:SN6PR05MB4703.namprd05.prod.outlook.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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8w+LHMRnktZRoy9E6Wmjq/JCdBPSooTdTz50Yoe1/K9TWKYmjp89VKvZkDexFv3899N0JqdoHuGGb8426Xvz9xgGfwVSyiJ+zZH1aEhW3czjbVCb+Vh8CEiqt1ZCxfgHRQyEkUhUngky43cIDUc09HiS//CKevRSo/vuKEnSa/DXTNuzwu7Wt3PeFvWxNFs9GqwYbG3a2V8F3+wNQh7WD/a6kC7UOJhP9VruMd7V63K1Xf+IlRIdCEvlbJXQ/WPCjSSFYYKHFQUzzJ0T9EWL76Zt0nOzj2k9reouGEh/73vHTztrV0Liv2qk6PBhOVIC spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: 723ad69b-3c8d-4ff3-ebfc-08d6764cc54c X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2019 16:18:59.5353 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB5583 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 Do not reject RETRY changes in driver. This decision should belong to firmware. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 5 ----- drivers/net/wireless/quantenna/qtnfmac/commands.c | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 9e0ac1744be7..422b79a5b98d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -360,11 +360,6 @@ static int qtnf_set_wiphy_params(struct wiphy *wiphy, u32 changed) return -EFAULT; } - if (changed & (WIPHY_PARAM_RETRY_LONG | WIPHY_PARAM_RETRY_SHORT)) { - pr_err("MAC%u: can't modify retry params\n", mac->macid); - return -EOPNOTSUPP; - } - ret = qtnf_cmd_send_update_phy_params(mac, changed); if (ret) pr_err("MAC%u: failed to update PHY params\n", mac->macid); diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 66cb05dfdba5..3f0a0b6abf01 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -1825,6 +1825,14 @@ int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u32 changed) qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_COVERAGE_CLASS, wiphy->coverage_class); + if (changed & WIPHY_PARAM_RETRY_LONG) + qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_LRETRY_LIMIT, + wiphy->retry_long); + + if (changed & WIPHY_PARAM_RETRY_SHORT) + qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_SRETRY_LIMIT, + wiphy->retry_short); + ret = qtnf_cmd_send(mac->bus, cmd_skb); if (ret) goto out; From patchwork Wed Jan 9 16:09:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10754447 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-2.web.codeaurora.org (Postfix) with ESMTP id CFE5B14E5 for ; Wed, 9 Jan 2019 16:19:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA487293F0 for ; Wed, 9 Jan 2019 16:19:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE596293FE; Wed, 9 Jan 2019 16:19:40 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 1ECDD293F0 for ; Wed, 9 Jan 2019 16:19:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732683AbfAIQTi (ORCPT ); Wed, 9 Jan 2019 11:19:38 -0500 Received: from mail-eopbgr710078.outbound.protection.outlook.com ([40.107.71.78]:18263 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732590AbfAIQTi (ORCPT ); Wed, 9 Jan 2019 11:19:38 -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:X-MS-Exchange-SenderADCheck; bh=qvyt8Ieq5DDpLx6cdET0V1X4zG8rap9WCdwvQa5Iq4w=; b=OP0nw9HBDZQ0ASOv1zxz4NRjS1eiV4LcJY/jlhh8u5rLQmCkly4uBq5N9R0hJbtO7R8ELS63Va4ZEvvBPLuhdBWhnlWNbsZlUSu8B/00WrPzyFqf673Ij11X70YCH8meSxLjWBvB+S6qfJfrds9drNHM+h4SNkkFLi23x1tk5rs= Received: from MWHPR05MB3406.namprd05.prod.outlook.com (10.174.175.155) by MWHPR05MB3455.namprd05.prod.outlook.com (10.174.248.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.9; Wed, 9 Jan 2019 16:19:26 +0000 Received: from MWHPR05MB3406.namprd05.prod.outlook.com ([fe80::91e8:d95f:3a8b:6461]) by MWHPR05MB3406.namprd05.prod.outlook.com ([fe80::91e8:d95f:3a8b:6461%2]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:19:26 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com (52.135.117.74) by SN6PR05MB5264.namprd05.prod.outlook.com (20.177.252.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:09:04 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5]) by SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5%6]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:09:04 +0000 From: Sergey Matyukevich To: "linux-wireless@vger.kernel.org" CC: Igor Mitsyanko , Andrey Shevchenko , Sergey Matyukevich Subject: [PATCH 6/7] qtnfmac: convert to SPDX license identifiers Thread-Topic: [PATCH 6/7] qtnfmac: convert to SPDX license identifiers Thread-Index: AQHUqDWkiZBF5evYTEWKrejtV7PYJw== Date: Wed, 9 Jan 2019 16:09:04 +0000 Message-ID: <20190109160843.14832-7-sergey.matyukevich.os@quantenna.com> References: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> In-Reply-To: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0087.namprd07.prod.outlook.com (2603:10b6:a03:12b::28) To SN6PR05MB4928.namprd05.prod.outlook.com (2603:10b6:805:9d::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [195.182.157.78] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR05MB3455;6:JzTeEz/78kLxoa3Q4GbUlJgRQYcUENlMPI9gYlNi/eUfFnKFrcpcMqktJPIPi65nfSiGpgih4laXAPQKVU/YbXA0dfwyHI8f0bXy8Q5pcAqmpIqTULuN+vuVjZrKJSZ77mxsH8LaEensd6Sgcjh/x9phHwU5IG4KA0HxT3V3O/Oed+OnF9PI32VbGrzwbBiQxFAvi7e1QILYk7cCHuN0+GC9TabKPg0YN8Ca2TYgJ5nPMjqwsZ+u687tjLP/OyRSwXBn5QrzBqjQa1jOcAyrq9jUsxfy2uw1fjzb9+0J9RqtYVJEgYqJx9O7+2I2MWXdJS1QaGctrKxqnwzzf/m784r4Y+d8Jsfgtt/bR05ViU+LqtszsiBm1ik2kt35mOTqF/Em5etIr+Bj/MG5sRrkVYeqjJOyOhyTOe/rBnKP9bJpuo4KEfPbp6Q2dfTXXxGdt3lcMXTT0cEzb/b2sNvbww==;5:G4XI61elX+wQG9ikMFyNxiVp/9fKfVsi0vGUm0lfOHO2D7idxgrcYzuEpS5nKEmzEORAgwrF2dlN5sEy4oS1cPMbZxp+RobG3hPeY/EKmHAPS+5wOmgTGzrxkpD5fmJpBm1hnruj10s8p1EUYbgsBLyG855DevlRCAyLB0ItE7CkvrFThAw74juCbuL0NqVRVm8veSaMXca6Wuk+p3f4RQ==;7:rq8J/Ri6JKLQ89Gl9LQvQpEOD9wqGhHE7YifGE1l6cvh4TmlYv/mvvDpr/KJ5u93o2W/YeY1SWpRVtflW7fvb/DIqRrDEWtzieM06GmVGLkAySfTN0hDKyRecICndsJ2rH/KG07vrGPMjh4LT9N+6g== x-ms-office365-filtering-correlation-id: dbcce310-61fe-432c-f802-08d6764cc678 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR05MB5264; x-ms-traffictypediagnostic: SN6PR05MB5264:|MWHPR05MB3455: x-moderation-data: 1/9/2019 4:19:23 PM x-microsoft-antispam-prvs: x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39850400004)(346002)(396003)(376002)(366004)(136003)(189003)(199004)(476003)(86362001)(575784001)(6916009)(446003)(106356001)(6116002)(11346002)(6512007)(486006)(105586002)(6346003)(7736002)(26005)(2616005)(305945005)(5660300001)(386003)(6506007)(8936002)(6436002)(102836004)(107886003)(54906003)(5640700003)(316002)(8676002)(4326008)(81156014)(186003)(81166006)(3846002)(52116002)(71200400001)(103116003)(2351001)(99286004)(53946003)(6486002)(68736007)(53936002)(66066001)(97736004)(256004)(14444005)(25786009)(478600001)(71190400001)(4744004)(436003)(76176011)(1076003)(2906002)(14454004)(36756003)(2501003)(2004002)(579004)(559001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR05MB3455;H:MWHPR05MB3406.namprd05.prod.outlook.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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: chE5V58d07HPFtjgz0z5L78lAex8AQwDrlRQ9xjma1C9jgOU2QOCNo0IU5djZMbpzjQEFjl9XsBrhX6wqowrxCc/NWq7E9ZJatU3RoGY5sPeJygA3vr0SujT0JoxcGUXcDamzHJX838NwxGwiyccKajkTyGOKaWBYKNzH6qZNeRUe6/OqItImnmZxwLw5Ftu9G6FOixavuu8Zyjtgrw/oodAIgB7efRRdgwt4lc2ytWf/XH7RXdLl8ybWcSda9Ob1ma1zwfOnFhVl8d3/VTVABsv+roYOXovA7IkPlXl+dmjeqM8xrT3f7NGMAG2E6BT spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbcce310-61fe-432c-f802-08d6764cc678 X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2019 16:19:26.0722 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR05MB3455 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 Replace textual license with SPDX-License-Identifier. Add an SPDX-License-Identifier for the Makefile. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/Makefile | 1 + drivers/net/wireless/quantenna/qtnfmac/bus.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/cfg80211.h | 3 +++ drivers/net/wireless/quantenna/qtnfmac/commands.c | 16 ++-------------- drivers/net/wireless/quantenna/qtnfmac/commands.h | 16 ++-------------- drivers/net/wireless/quantenna/qtnfmac/core.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/core.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/debug.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/debug.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/event.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/event.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/qlink_util.c | 16 ++-------------- drivers/net/wireless/quantenna/qtnfmac/qlink_util.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/trans.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/trans.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/util.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/util.h | 17 ++--------------- 23 files changed, 46 insertions(+), 312 deletions(-) diff --git a/drivers/net/wireless/quantenna/Makefile b/drivers/net/wireless/quantenna/Makefile index baebfbde119e..cea83d178d2e 100644 --- a/drivers/net/wireless/quantenna/Makefile +++ b/drivers/net/wireless/quantenna/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Copyright (c) 2015-2016 Quantenna Communications, Inc. # All rights reserved. diff --git a/drivers/net/wireless/quantenna/qtnfmac/bus.h b/drivers/net/wireless/quantenna/qtnfmac/bus.h index 528ca7f5e070..7bd906cc7023 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/bus.h +++ b/drivers/net/wireless/quantenna/qtnfmac/bus.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015 Quantenna Communications - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015 Quantenna Communications. All rights reserved. */ #ifndef QTNFMAC_BUS_H #define QTNFMAC_BUS_H diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 422b79a5b98d..e9bef621a7d6 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2012-2012 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include #include diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h index b73425122a10..7f223d0fbbd3 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h @@ -1,3 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ + /* * Copyright (c) 2015-2016 Quantenna Communications, Inc. * All rights reserved. diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 3f0a0b6abf01..009a4e4f4c7a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -1,17 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include #include diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.h b/drivers/net/wireless/quantenna/qtnfmac/commands.h index 1c25e7905e9a..96dff643bbc4 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.h +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.h @@ -1,17 +1,5 @@ -/* - * Copyright (c) 2016 Quantenna Communications, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2016 Quantenna Communications. All rights reserved. */ #ifndef QLINK_COMMANDS_H_ #define QLINK_COMMANDS_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index 29258acfa8dc..ee1b75fda1dd 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include #include diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index 293055049caa..a31cff46e964 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_CORE_H_ #define _QTN_FMAC_CORE_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/debug.c b/drivers/net/wireless/quantenna/qtnfmac/debug.c index 9f826b9ef5d9..ad70cdb80060 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/debug.c +++ b/drivers/net/wireless/quantenna/qtnfmac/debug.c @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include "debug.h" diff --git a/drivers/net/wireless/quantenna/qtnfmac/debug.h b/drivers/net/wireless/quantenna/qtnfmac/debug.h index d6dd12b5d434..61b45536b83a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/debug.h +++ b/drivers/net/wireless/quantenna/qtnfmac/debug.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_DEBUG_H_ #define _QTN_FMAC_DEBUG_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 8b542b431b75..3038a000c287 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include #include diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.h b/drivers/net/wireless/quantenna/qtnfmac/event.h index ae759b602c2a..533ad99d045d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.h +++ b/drivers/net/wireless/quantenna/qtnfmac/event.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_EVENT_H_ #define _QTN_FMAC_EVENT_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index ace52e9d421d..d958b268de02 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_QLINK_H_ #define _QTN_QLINK_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c index aeeda81b09ea..72bfd17cb687 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c @@ -1,17 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h index fc87827cb49c..781ea7fe79f2 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_QLINK_UTIL_H_ #define _QTN_FMAC_QLINK_UTIL_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h b/drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h index 40295a511224..82d879950b62 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_HW_IDS_H_ #define _QTN_HW_IDS_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c index 2ec334199c2b..ff678951d3b2 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c +++ b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include #include diff --git a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h index c2a3702a9ee7..52cac5439b03 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h +++ b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_SHM_IPC_H_ #define _QTN_FMAC_SHM_IPC_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h index 95a5f89a8b1a..78be70df1218 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h +++ b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_SHM_IPC_DEFS_H_ #define _QTN_FMAC_SHM_IPC_DEFS_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/trans.c b/drivers/net/wireless/quantenna/qtnfmac/trans.c index 345f34ec9750..95356e280e23 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/trans.c +++ b/drivers/net/wireless/quantenna/qtnfmac/trans.c @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include #include diff --git a/drivers/net/wireless/quantenna/qtnfmac/trans.h b/drivers/net/wireless/quantenna/qtnfmac/trans.h index 9a473e07af0f..c0b76f871b31 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/trans.h +++ b/drivers/net/wireless/quantenna/qtnfmac/trans.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_TRANS_H_ #define _QTN_FMAC_TRANS_H_ diff --git a/drivers/net/wireless/quantenna/qtnfmac/util.c b/drivers/net/wireless/quantenna/qtnfmac/util.c index 3bc96b264769..cda6f5f3f38a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/util.c +++ b/drivers/net/wireless/quantenna/qtnfmac/util.c @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015-2016 Quantenna Communications, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include "util.h" #include "qtn_hw_ids.h" diff --git a/drivers/net/wireless/quantenna/qtnfmac/util.h b/drivers/net/wireless/quantenna/qtnfmac/util.h index b8744baac332..a14b7078a9c7 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/util.h +++ b/drivers/net/wireless/quantenna/qtnfmac/util.h @@ -1,18 +1,5 @@ -/* - * Copyright (c) 2015 Quantenna Communications - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015 Quantenna Communications. All rights reserved. */ #ifndef QTNFMAC_UTIL_H #define QTNFMAC_UTIL_H From patchwork Wed Jan 9 16:09:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10754445 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-2.web.codeaurora.org (Postfix) with ESMTP id EDB5314E5 for ; Wed, 9 Jan 2019 16:19:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9423F29235 for ; Wed, 9 Jan 2019 16:19:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85F0B293FC; Wed, 9 Jan 2019 16:19:37 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 0310829235 for ; Wed, 9 Jan 2019 16:19:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732681AbfAIQTg (ORCPT ); Wed, 9 Jan 2019 11:19:36 -0500 Received: from mail-eopbgr800054.outbound.protection.outlook.com ([40.107.80.54]:59254 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732280AbfAIQTf (ORCPT ); Wed, 9 Jan 2019 11:19:35 -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:X-MS-Exchange-SenderADCheck; bh=CvieQQ2uUCWiUcFrKE1pSqJODEWSaWnnWfidk9qwJoA=; b=dW4J176w5LA7FclgSqa0XTmM13aH0Amv1qGKHFCA36egfTScD1Zi0d0aKL6lGxYqTbqhy3shIH56HywdReIodMWGIdV3F9pJ5xlqUPo4K5UDqvcFXgcsxmreTvtsFalOd0SWrK6fHN/wTQ2TDmp06++emJnhkn/iOABeN4+twAM= Received: from BN6PR05MB3282.namprd05.prod.outlook.com (10.174.95.29) by BN6PR05MB3043.namprd05.prod.outlook.com (10.172.145.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.4; Wed, 9 Jan 2019 16:19:33 +0000 Received: from BN6PR05MB3282.namprd05.prod.outlook.com ([fe80::93c:653a:fcac:74fe]) by BN6PR05MB3282.namprd05.prod.outlook.com ([fe80::93c:653a:fcac:74fe%3]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:19:33 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com (52.135.117.74) by SN6PR05MB5264.namprd05.prod.outlook.com (20.177.252.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.6; Wed, 9 Jan 2019 16:09:06 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5]) by SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::6d1c:886b:bd14:71c5%6]) with mapi id 15.20.1516.010; Wed, 9 Jan 2019 16:09:06 +0000 From: Sergey Matyukevich To: "linux-wireless@vger.kernel.org" CC: Igor Mitsyanko , Andrey Shevchenko , Sergey Matyukevich Subject: [PATCH 7/7] qtnfmac: add missing bss record to host scan cache Thread-Topic: [PATCH 7/7] qtnfmac: add missing bss record to host scan cache Thread-Index: AQHUqDWlaHaynq2W1kmDqK6lVuPHZQ== Date: Wed, 9 Jan 2019 16:09:06 +0000 Message-ID: <20190109160843.14832-8-sergey.matyukevich.os@quantenna.com> References: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> In-Reply-To: <20190109160843.14832-1-sergey.matyukevich.os@quantenna.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0087.namprd07.prod.outlook.com (2603:10b6:a03:12b::28) To SN6PR05MB4928.namprd05.prod.outlook.com (2603:10b6:805:9d::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [195.182.157.78] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN6PR05MB3043;6:KjyX7BChhRhNQgcdaYJMZ01vBgDrzABwNYzDDompszzUI4cztraamVcOXApbfKO9B2oQmDNaHgJ/FvGcUkgEoQ75wPYZQ1PgDR4tNr95TVweOZP85gxu08gw0oSnvv9da9S9xVT5O6+j1WWst5n10RVOl5pKoH1JCvXxOgElliQ4/nHXF2JgyDVAQw6XNwBiIygcAKv0sAh8c6u7Iugl/vyJx9knS3H4KHKPQW13+Ok8Elyxt2Ed0mi6RBU/U42LikgfUUMl7TkNaY9Bp9/tIpAuTYeF1K4Mfz6k0/3MmES4dFwUYnSRV0aJLJE1aSijn4gG0PcTpKlPRFxuDsU+OAi04yNISeAY3NdvRoCP+XfTdbKWqtamjMk0dZNnwdfA0OmhhGM8LZNvsvj/HtyHTu/UaAlwxbQkW5ecS/hIxUqjbsBYHAcGmpTk+34OBBAHG6rlOODjuYIgveFwg2doIg==;5:Tk06YDp2t8mH6Zvf+TuQs1tGt5T+2lOYaTb18BYMN52CHTgzbcsKMoJtBjRWgvf0u6X2KmgpluL3UfHd5s08/9ylwWfRM/1JVHzz9kyQj3ngfKzx3HOl0eVOFi6MW4dzHSj2FSNOULci93TN8zPD04QccWKfCJabcNhX6aNG6zQ31zTlx8Sc+Dl/YMBGNaoQsDyjOAY5Q+C66AQ9KDCeuA==;7:uf7qFbfrrMVRBpf4pDK4XQVHIyhZ/ZHQD+Vk5W9zFFMGXaIcu4fHG2hCKthrfkVwXnttC/aJiGUzBAi8R75ViRxWoaJfiRl9Y3o5M5ojfhrvgcGiFoDGpKXMWS8vHLV/P0oo2qdXpV6cmRn/AGbGPA== x-ms-office365-filtering-correlation-id: 436bc513-0528-498a-aa73-08d6764cc7dd x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR05MB5264; x-ms-traffictypediagnostic: SN6PR05MB5264:|BN6PR05MB3043: x-moderation-data: 1/9/2019 4:19:32 PM x-microsoft-antispam-prvs: x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(376002)(136003)(39850400004)(346002)(189003)(199004)(486006)(7736002)(66066001)(6486002)(14454004)(103116003)(2906002)(26005)(305945005)(6346003)(436003)(97736004)(6916009)(186003)(102836004)(99286004)(6506007)(8676002)(386003)(81156014)(52116002)(2351001)(8936002)(81166006)(105586002)(478600001)(76176011)(107886003)(14444005)(5640700003)(71190400001)(54906003)(4326008)(256004)(476003)(68736007)(25786009)(316002)(5660300001)(2616005)(6512007)(1076003)(53936002)(446003)(36756003)(6436002)(3846002)(11346002)(6116002)(575784001)(86362001)(71200400001)(106356001)(2501003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR05MB3043;H:BN6PR05MB3282.namprd05.prod.outlook.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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Os0R1d4w9ZDsf1+2UdDEiJ5NrwTXQNR/X5ayV4leQrXdPVto6Xuu68vj/kEycfKtDEaYR58inQzRWt9CteBIR8CB4HLYz+xt7L4tgjjjFkQoBvXeB8uelNmgKcquuW4Q8fgGqWA6zsn/Jar/LnHmsTe5nwHUXPiau7PKohiL7JpOtTawKbF0acB4AQX9uC1oIp3iuBJEo0vxi6uGn8jqePd0/mlebwi1FkmYQ05duA6eiOu+DzRgccqkVp09bCa6wvwMBIuiLMYJvBtYWlwK45YO3BRDh08l9Qbu6u2QJzKPKkmNKymu1LUQ8YfE/EDI spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: 436bc513-0528-498a-aa73-08d6764cc7dd X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2019 16:19:33.6493 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3043 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 Make sure that valid BSS entry exists in wireless core scan records even in the case of successful connect reported by firmware. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/event.c | 79 ++++++++++++++++++++++++-- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 4 +- 2 files changed, 78 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 3038a000c287..3fd1a9217737 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -145,6 +145,12 @@ qtnf_event_handle_bss_join(struct qtnf_vif *vif, const struct qlink_event_bss_join *join_info, u16 len) { + struct wiphy *wiphy = priv_to_wiphy(vif->mac); + enum ieee80211_statuscode status = le16_to_cpu(join_info->status); + struct cfg80211_chan_def chandef; + struct cfg80211_bss *bss = NULL; + u8 *ie = NULL; + if (unlikely(len < sizeof(*join_info))) { pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", vif->mac->macid, vif->vifid, len, @@ -158,15 +164,80 @@ qtnf_event_handle_bss_join(struct qtnf_vif *vif, return -EPROTO; } - pr_debug("VIF%u.%u: BSSID:%pM\n", vif->mac->macid, vif->vifid, - join_info->bssid); + pr_debug("VIF%u.%u: BSSID:%pM status:%u\n", + vif->mac->macid, vif->vifid, join_info->bssid, status); + + if (status == WLAN_STATUS_SUCCESS) { + qlink_chandef_q2cfg(wiphy, &join_info->chan, &chandef); + if (!cfg80211_chandef_valid(&chandef)) { + pr_warn("MAC%u.%u: bad channel freq=%u cf1=%u cf2=%u bw=%u\n", + vif->mac->macid, vif->vifid, + chandef.chan->center_freq, + chandef.center_freq1, + chandef.center_freq2, + chandef.width); + status = WLAN_STATUS_UNSPECIFIED_FAILURE; + goto done; + } + bss = cfg80211_get_bss(wiphy, chandef.chan, join_info->bssid, + NULL, 0, IEEE80211_BSS_TYPE_ESS, + IEEE80211_PRIVACY_ANY); + if (!bss) { + pr_warn("VIF%u.%u: add missing BSS:%pM chan:%u\n", + vif->mac->macid, vif->vifid, + join_info->bssid, chandef.chan->hw_value); + + if (!vif->wdev.ssid_len) { + pr_warn("VIF%u.%u: SSID unknown for BSS:%pM\n", + vif->mac->macid, vif->vifid, + join_info->bssid); + status = WLAN_STATUS_UNSPECIFIED_FAILURE; + goto done; + } + + ie = kzalloc(2 + vif->wdev.ssid_len, GFP_KERNEL); + if (!ie) { + pr_warn("VIF%u.%u: IE alloc failed for BSS:%pM\n", + vif->mac->macid, vif->vifid, + join_info->bssid); + status = WLAN_STATUS_UNSPECIFIED_FAILURE; + goto done; + } + + ie[0] = WLAN_EID_SSID; + ie[1] = vif->wdev.ssid_len; + memcpy(ie + 2, vif->wdev.ssid, vif->wdev.ssid_len); + + bss = cfg80211_inform_bss(wiphy, chandef.chan, + CFG80211_BSS_FTYPE_UNKNOWN, + join_info->bssid, 0, + WLAN_CAPABILITY_ESS, 100, + ie, 2 + vif->wdev.ssid_len, + 0, GFP_KERNEL); + if (!bss) { + pr_warn("VIF%u.%u: can't connect to unknown BSS: %pM\n", + vif->mac->macid, vif->vifid, + join_info->bssid); + status = WLAN_STATUS_UNSPECIFIED_FAILURE; + goto done; + } + } + } + +done: cfg80211_connect_result(vif->netdev, join_info->bssid, NULL, 0, NULL, - 0, le16_to_cpu(join_info->status), GFP_KERNEL); + 0, status, GFP_KERNEL); + if (bss) { + if (!ether_addr_equal(vif->bssid, join_info->bssid)) + ether_addr_copy(vif->bssid, join_info->bssid); + cfg80211_put_bss(wiphy, bss); + } - if (le16_to_cpu(join_info->status) == WLAN_STATUS_SUCCESS) + if (status == WLAN_STATUS_SUCCESS) netif_carrier_on(vif->netdev); + kfree(ie); return 0; } diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index d958b268de02..27fdb5b01ee3 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -6,7 +6,7 @@ #include -#define QLINK_PROTO_VER 12 +#define QLINK_PROTO_VER 13 #define QLINK_MACID_RSVD 0xFF #define QLINK_VIFID_RSVD 0xFF @@ -975,11 +975,13 @@ struct qlink_event_sta_deauth { /** * struct qlink_event_bss_join - data for QLINK_EVENT_BSS_JOIN event * + * @chan: new operating channel definition * @bssid: BSSID of a BSS which interface tried to joined. * @status: status of joining attempt, see &enum ieee80211_statuscode. */ struct qlink_event_bss_join { struct qlink_event ehdr; + struct qlink_chandef chan; u8 bssid[ETH_ALEN]; __le16 status; } __packed;