From patchwork Fri Aug 25 02:29:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9921157 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 794AB600C5 for ; Fri, 25 Aug 2017 02:30:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6009C204BA for ; Fri, 25 Aug 2017 02:30:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53CB5204BE; Fri, 25 Aug 2017 02:30:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE37D204C1 for ; Fri, 25 Aug 2017 02:30:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754382AbdHYCar (ORCPT ); Thu, 24 Aug 2017 22:30:47 -0400 Received: from mail-cys01nam02on0082.outbound.protection.outlook.com ([104.47.37.82]:41477 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754347AbdHYCaq (ORCPT ); Thu, 24 Aug 2017 22:30:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QZTR2GNQtYSVivZuMG9Nv2VFAHKkH8/ygH6ijRftdiY=; b=vM10fi7lgCE8GRozx+izbbxLdC3X+e1suZPSZAYWJT/z5T8WuOBCr4k6fvE6b1H4gn0c/UeszSzJ68OR9uNx77ju3eKkBuwXHB71tO1SgYzPwt9hy3q0sN+xABTFgmbBLoFN4JwkA4thytK/nYuffXqVF6ppuGqpnWWEmT0NYbc= Received: from dodo-dell.quantenna.com (12.131.200.68) by SN1PR0501MB2047.namprd05.prod.outlook.com (10.163.227.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.4; Fri, 25 Aug 2017 02:30:43 +0000 From: igor.mitsyanko.os@quantenna.com To: linux-wireless@vger.kernel.org Cc: sergey.matyukevich.os@quantenna.com, avinashp@quantenna.com, johannes@sipsolutions.net, Igor Mitsyanko Subject: [PATCH 01/27] qtnfmac: qlink: convert channel width from bitfiled to simple enum Date: Thu, 24 Aug 2017 19:29:58 -0700 Message-Id: <20170825023024.10565-2-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170825023024.10565-1-igor.mitsyanko.os@quantenna.com> References: <20170825023024.10565-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: CY4PR15CA0017.namprd15.prod.outlook.com (10.172.74.27) To SN1PR0501MB2047.namprd05.prod.outlook.com (10.163.227.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c6bdc6a0-d8a8-4f7d-3df1-08d4eb61499c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR0501MB2047; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 3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y3e/vXaQrplKHi6BogYO1T1slUjZhhYReOjzft9wMHh/cXSOPAmH6e9lKw+B04bEtyDzAFj7YuGLaSG108v9GHbL7SihPbMUw+icQfDYS1yIC0WIXTCZ275+1e0AIVdms687fJPzJ9ldUhGO4U3nA6+H1qC/22H4qb28KIOV7Wl8ZU3ij6PAqMZp1kdMvP1HRQ5Rbnoi3gUnOCIUxRXNNz+IPHfkHn6fKxCXVL3ko//KnLIlmdnfTmfMA+nQb+1Qzypx93/B5Z88yEL6xCeWdrHZNNxGNTyKAnFcm3DMK4ojZ3OTWLUjAiOu4YAVd1sHyw5X+cpQQ5noLZAHbH4nCVSTaaemqr/+fhpyJNfzZ/KOsxUL9+QRukpcwRIA91Wn70K4KKftQTf43isy13fHTOYVHRoIvgbFRDNPrG4CU8n54+zPJD+FYUY4ZIU7BSuVbq5lIuUv8=; 4:NLPJoNl4kUyJx4HbQcnpVt9CqAqamqk12BdEhIrlqMQ0DoMtwhkS9VT4BhndL5H8zEb/3KwlQQOF5Vq4JGQA1sbwMWg9/ULioh8MmJ946fs7VX+upse32CAgaIAY805TBn4Wuq88SCNVab6kfjoGQOUrD1JcYsoPNbGYJd0BpQjJwSykvNVc0Uhb8TXMdrim5/+G3RVfdRrcPs0lLxwIzYusNtThn4nq+9QUP8iakoRgwdnqtOO2kdnkDKXoDwwR X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0501MB2047; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0501MB2047; X-Forefront-PRVS: 041032FF37 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39830400002)(199003)(189002)(76176999)(53416004)(50986999)(110136004)(7350300001)(6916009)(6666003)(2950100002)(47776003)(2906002)(9686003)(53936002)(66066001)(2361001)(106356001)(105586002)(2351001)(86362001)(305945005)(33646002)(7736002)(42186005)(81166006)(81156014)(107886003)(8676002)(103116003)(478600001)(85782001)(68736007)(50226002)(50466002)(3846002)(6486002)(25786009)(36756003)(97736004)(5660300001)(1076002)(6116002)(69596002)(5003940100001)(101416001)(4326008)(189998001)(48376002)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0501MB2047; H:dodo-dell.quantenna.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=igor.mitsyanko.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0501MB2047; 23:taSpdkOMyQNXWBSS3IEbszscgYHR1zstj7P74Sf?= =?us-ascii?Q?IbU7EvWdqFqlkwQl5mbciTEiVxxN1bOGX9epp/yhlmUEngJaJhDbYP2KK6uQ?= =?us-ascii?Q?yos5bxryp6D0BnZwwC+KacuYlgEQQgYr+VMcae7BjC5AKBqpDVY072SPGOBJ?= =?us-ascii?Q?wKC3Ql9DtJyCKUxgx0CBZ7cOOQDliszLm6WGdiJPtuHvDVd8aIwojbqdKCsQ?= =?us-ascii?Q?PRCJ3duWCymS5mitU6nX4cfKQw+q8+CjfjdwTFIC+iirjk91VZKPM6hdCP4i?= =?us-ascii?Q?z5PuzjFVQ0JYuGOoHqHIWjegXHK4LBiAj6YYsvWm1Ag4dZ8XytpsRiTbU1C5?= =?us-ascii?Q?zOtmTz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g5bgY/mky?= =?us-ascii?Q?xIRSr6LrPCQ5iqCpcAVjmZ50cYAWkcm3UzL39avEq?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 6:gtPGtFn/fbhCTOJHba4TU2MTbOw2azoxyHjH5rsK+HP6xEbocqb3EFnghCpoY5cQxPQcAQJZT7L/TRIogjAPEk8XfSTwQ3MXViF5TxA2DgQoWvP+Z3u0pmBOMg16OW+CoHu9/NJsYwSZB9HdaYcYiWbcS2tM2T8TbqXu080UhArAgOXPj9vAsEm+KMrV+K81UWyhdMcSeJ0jmZxK18+RV8Jt4SfenpFrKSKdibv9Q74Ezi6/1qJ2p9UKFNtz5fjp1v+o1pzYc3ZAZIIoUXvn1AtxnF5W8h9ybNYV2+BUP1E8H3zKUsx7nep0aviyF2IpH4AbM/0brjtQ6xSpGO6b+g==; 5:NVvUNvp3SYQKRoYkbdCuRLfTw6VdSuYMWCBwsAHY0mKJwTLiM/TuIWqmz7MfKad6pkIX8Lu1O4V2/6qTayM/01T6SqpByX0wnW6LeuV9Qnd4lhOdU6kMLX1k0eayZFhrtWAiPOopK7V3GZHHezU86w==; 24:0jaJOVQ/fSDaH6ZAD4ZUdTBZwLD28sCLSsfv+5w0sJIJEyb3UlKI+2Ry+frqHv8wb2vKD+9mKI+4UwK3tU+TX3qYxSqP/+GQ3IQZWLKpzCg=; 7:/K18Hp3Te0vEDIxe8FqoVZe1wYen/9Jfk/X5x+tQz57RXf4ava2DDQtXTnyiAgcVgGGu4LOfLToN7Vnw8ZGkUrMqe4Tx6lxZCUZxUZBuzKCoJSU/r70CVW7BBTX3UFehydlmo7NA+U3UAs3I6WGpL6oFWR+e4cjZT8zne8VnKCKGhD43DpH1Xat/ISex9VaDlJmcYHKKYZ6WuZHyFohUMxDVxCBIBefBSNqHOB2dbT4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 02:30:43.9788 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0501MB2047 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Igor Mitsyanko Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 16 ++++++++-------- drivers/net/wireless/quantenna/qtnfmac/qlink_util.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index a8242f6..a69fd470 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -108,14 +108,14 @@ enum qlink_sta_flags { }; enum qlink_channel_width { - QLINK_CHAN_WIDTH_5 = BIT(0), - QLINK_CHAN_WIDTH_10 = BIT(1), - QLINK_CHAN_WIDTH_20_NOHT = BIT(2), - QLINK_CHAN_WIDTH_20 = BIT(3), - QLINK_CHAN_WIDTH_40 = BIT(4), - QLINK_CHAN_WIDTH_80 = BIT(5), - QLINK_CHAN_WIDTH_80P80 = BIT(6), - QLINK_CHAN_WIDTH_160 = BIT(7), + QLINK_CHAN_WIDTH_5 = 0, + QLINK_CHAN_WIDTH_10, + QLINK_CHAN_WIDTH_20_NOHT, + QLINK_CHAN_WIDTH_20, + QLINK_CHAN_WIDTH_40, + QLINK_CHAN_WIDTH_80, + QLINK_CHAN_WIDTH_80P80, + QLINK_CHAN_WIDTH_160, }; /* QLINK Command messages related definitions diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c index cf024c9..369b77d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c @@ -49,28 +49,28 @@ u8 qlink_chan_width_mask_to_nl(u16 qlink_mask) { u8 result = 0; - if (qlink_mask & QLINK_CHAN_WIDTH_5) + if (qlink_mask & BIT(QLINK_CHAN_WIDTH_5)) result |= BIT(NL80211_CHAN_WIDTH_5); - if (qlink_mask & QLINK_CHAN_WIDTH_10) + if (qlink_mask & BIT(QLINK_CHAN_WIDTH_10)) result |= BIT(NL80211_CHAN_WIDTH_10); - if (qlink_mask & QLINK_CHAN_WIDTH_20_NOHT) + if (qlink_mask & BIT(QLINK_CHAN_WIDTH_20_NOHT)) result |= BIT(NL80211_CHAN_WIDTH_20_NOHT); - if (qlink_mask & QLINK_CHAN_WIDTH_20) + if (qlink_mask & BIT(QLINK_CHAN_WIDTH_20)) result |= BIT(NL80211_CHAN_WIDTH_20); - if (qlink_mask & QLINK_CHAN_WIDTH_40) + if (qlink_mask & BIT(QLINK_CHAN_WIDTH_40)) result |= BIT(NL80211_CHAN_WIDTH_40); - if (qlink_mask & QLINK_CHAN_WIDTH_80) + if (qlink_mask & BIT(QLINK_CHAN_WIDTH_80)) result |= BIT(NL80211_CHAN_WIDTH_80); - if (qlink_mask & QLINK_CHAN_WIDTH_80P80) + if (qlink_mask & BIT(QLINK_CHAN_WIDTH_80P80)) result |= BIT(NL80211_CHAN_WIDTH_80P80); - if (qlink_mask & QLINK_CHAN_WIDTH_160) + if (qlink_mask & BIT(QLINK_CHAN_WIDTH_160)) result |= BIT(NL80211_CHAN_WIDTH_160); return result;