From patchwork Sat Sep 2 01:44:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9935431 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 05B2E603B4 for ; Sat, 2 Sep 2017 01:45:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC73128542 for ; Sat, 2 Sep 2017 01:45:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E14EC28545; Sat, 2 Sep 2017 01:45:07 +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 5462828552 for ; Sat, 2 Sep 2017 01:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751400AbdIBBpE (ORCPT ); Fri, 1 Sep 2017 21:45:04 -0400 Received: from mail-co1nam03on0052.outbound.protection.outlook.com ([104.47.40.52]:13344 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750941AbdIBBo7 (ORCPT ); Fri, 1 Sep 2017 21:44:59 -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=n8y9T8u1njAZeI6Vspyc3ZSej59NwIJ1rVpVLo8uLW07GSMCsciYYH7w6cLDbJEHNQdvMgZouZKEJDOA5BmvEEZZg+YIHlBLGLRekSoa1g4civzhFigC1GgiXAdkNs52ceeB60H8M9MpFdcAhe6V1HwH1H/yhrfZ6tKFNd3MzC8= Received: from dodo-dell.quantenna.com (12.131.200.68) by BY2PR0501MB2039.namprd05.prod.outlook.com (10.163.197.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.3; Sat, 2 Sep 2017 01:44:56 +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 Subject: [PATCH V2 1/9] qtnfmac: qlink: convert channel width from bitfiled to simple enum Date: Fri, 1 Sep 2017 18:44:43 -0700 Message-Id: <20170902014451.17766-2-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170902014451.17766-1-igor.mitsyanko.os@quantenna.com> References: <20170902014451.17766-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: MWHPR1301CA0021.namprd13.prod.outlook.com (10.174.164.162) To BY2PR0501MB2039.namprd05.prod.outlook.com (10.163.197.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8a204418-c69a-487b-ffb4-08d4f1a43724 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR0501MB2039; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 3:4PvHG2B0rJ0m2viB6NLZ4hBzmuXli8jQxYE38aHuY2eW1iCtEP9wu3Be1Wqp/fnM39TI4X2AQ2I7ksCdiNmNUStDiSPw6xySAJnlCFTloXyIGcKH4xdgmd2/reLUquzdEZwZb7lSKb9x/MErB+nG7O2lc0iQrwjYg0M006yPpp2xpTHe4/lThz4Fc2x0gM1rk61FvyT6Kt32YpMMaBvEVG6VPuGihe1IgYKA1/osmWbzxsZyUzfwcoffwD1NuwVN; 25:BB7OMEw2+NDZ3OPafSBJDtVoL5Uy1TBfmebsqoJCLsNRPoDaFNG6ypKLUtPuKUy6+tz3DvgH2k0uKjaWeHKBKk/OKVvK/8QsPmTw3gjvx/lkdMCWSPymfW8VeCSxGdV6eABCNGTmvNTUv49GPuDoLLSYCwUe6/ZfaDHexXD0sbB5U8Qkh3B6V3S9KeNxPQMRAgLwJm2PRvpe7UJeIitgiUM125h1MV//jO/Wd2X8ToVI1WXuMaX6U43k90n+9qw8PaRGMRr3LlfmqfzKNFPLLQkg/kp/xXuImFXjK4fPy0984RcqM9xtbSCjKCpKoX3OIbYv7EY89lF/sHOGLkYiGw==; 31:x9nTIjFIUHga7+xe7RqkJ6S6oN78OgGfZ7j9NSH5W+POp6VasWb356IxvOZoLt+2gfnKWM9dxzJORlRI53gBrgK071HIIHIMdi2SYD2ieA5rF3uD7xw4hUv/qpmU7M/cqYioGnHn3wz9gANCM9+VhNxIB2bH+qp1HZ+TV14+ytMKBx41sJEm05t9R8JFwP4r/9tPgrEaq50uSrZajevI8JhpkzsUMv/d1kNLctDwwxc= X-MS-TrafficTypeDiagnostic: BY2PR0501MB2039: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=igor.mitsyanko.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 20:V7iOuw/ja6coTsUQH32McSu02dXAZFLClZemtqjh5H+t5NR5OysXn6PMvQftOLdyRLF4tbGPWp8pgbhYvYPafJ8Tm/yiJGopFKRwTNMdyN3YDNf5usvdEO953q+HUC4VImNU59hlsaIs0+/MeKeyHf6Bsz00/BDx9ryuZyu5KJd7HJJVnLt4upj7fv/Y0xTDy9aSfhuIB1aWjXfZsrR/gSQWWYEXz7anXehlXJiBucJiepCt4WkpGrpX/qob+PoPlwI9WdIELa0SCWLBr67+XG2K46C8aZRfd5Zp3BPWZTrsvUtO8ZokazChVFd3jjKE4o5hago4rIfOZmZFFL1gtyRdgoGGsIZ+y8Mz0RYLqDHh+6U0iFvMx7jMZqltNoVBzylpOrDTWtm5DkuKf+3qwVjvycTRTTVOkXYuMN8aXw48aGCq6FWwTHdvc4giqYuZWRavnoe1h8ssstEvH96VVSFSBvRn6UFjLwT3MIFXlX5yfi9axC9v/0ZcbZhzqwz6TzMue5g9KIuqEGOqhoEh/Rt21fMqncgmaB4h3pn7WqqUeGsQysivLsHrHtWi0TzBMUZFcMLojvbJAztJpXOz95flgVV7t2EK/06sTFHfGc4=; 4:q8O9kmyP8PWBV/5J7AzcbOLAEM1F5SAuiMaY1UwYyDLW5stko4QvQIKYyWy6EPN2D0Z6fA1M8blVRu77BJutfZ6VBGHA2kVN9lJwv/O0V+/qK8bUr/f8VK6HzIW4/diuh05VzyHZmVAdSQQ+udXrDVuwn5rsUBAEJJVRmS1YCQb106htF7iPK5BBz8Ixqk07yNAFHOD7xf0Gj8rYbVG3lYhsq6TDpWwNDijyYaF5+tu7fvrfA8gilAnCbbR8EuyA 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)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0501MB2039; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0501MB2039; X-Forefront-PRVS: 04180B6720 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39830400002)(189002)(199003)(103116003)(97736004)(50986999)(1076002)(6116002)(3846002)(76176999)(8676002)(50226002)(81166006)(85782001)(81156014)(8936002)(5003940100001)(36756003)(68736007)(2906002)(53416004)(86362001)(106356001)(478600001)(33646002)(6916009)(50466002)(2950100002)(48376002)(47776003)(2361001)(2351001)(66066001)(6666003)(4326008)(7736002)(9686003)(5660300001)(189998001)(42186005)(6486002)(53936002)(305945005)(110136004)(105586002)(69596002)(101416001)(25786009)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0501MB2039; H:dodo-dell.quantenna.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0501MB2039; 23:dyaD0eCYvZIuNy3aKTo1tMl5mnBQn5mOiHqC3qU?= =?us-ascii?Q?6uturJ9SfLDrp0xZzdGUGd6XIpi5zMZda38v7rBv8pGclV+iiK9KMjLHI2I7?= =?us-ascii?Q?rQj/FdND52xBTjs8ALQR2a1ZaE4LY0VKK/QtOSugZkVITwSutaRns4yn7qk6?= =?us-ascii?Q?RsbJ2x+p2EmGAxkpNPdVFVGw+2iclN6cfWjlHWWP23hdju/jzVR2QcKNZWss?= =?us-ascii?Q?xyS+kqHVzR7osQK4CAORK2H6bAKpJG0Sodh9ATaT9/1rZNubV7h/iHrJ6ERw?= =?us-ascii?Q?eUg6otJz4WepHSMRofhgNssRUX9Lg8wrSjERG77YQd70GfjN7ivXzXC8QT5y?= =?us-ascii?Q?bl1yaE2cOihZ827OX/vCxlxi5qa1XzUtTAWkDVEyLK3v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jHMkgtRBnasXGNdZxruFxfYWbaJFSjAypmHy1hy9/95+lwas0DxjjdRSjI/S/nlzC/vz5YjeW7Y0/02wPLbHSFtMybxpkqz350W0nUKQ94i8PKZlPNj41SmbmLZL2/jPrvLTpilI3sazSHhyPjOS6TzTcLdu40f9dfEmyRThxGjrEuaDgWiiVOsIp9Uziod4HwXLN4cyFtev+aI+eODTFa+fZKFMK6RUdjF92sH8RDv3lh/ttAyT1WyJXFdsGE6194pqllkHzyVLoavudc++8fPQU9BpI2Dh/rrFb4V/q565hxzY5jl1y/9r5CceT+NoQ==; 5:RsCg0fgO/xXCuSgjq/ZUTyseMLR1fSG6QE889qGinNa+rBqFZZS2ibL7g5IArEhGUsxQeY0GmgKi/zOikkK015yE7tnqwjw7CRrQaqo5dKUDKR+vFDDW8QOfe9Mwas+bHjFQKMENwwAl0HXowLQMLA==; 24:eXbgVBcwLvfFm6gONqrnqo4tO4lTJ5LlY6oO8M8O//+SlD1fC1m0KQ+nJqCYxoqkPuoKZhFxwi1Et8631Ax+lkpPXs8CyTmLG7qCoJr7FKM=; 7:ocxMGpM326TXn1GvHZhr2GP9um7czLNhMjiMdZDfzXn6WI9nUspd7j+UtYPmoTRSmYrmRYienxmHc/ea1bCtPTwm5tsrRKSnVEmu6+pjGValzvkYnHVBJkD4a3lhUSEFUUJkFYUS1Hi+Y0tTXprNKRjcAn7nVSYJDLfJCEVI4GxMnit9kGBdytouamFrhIOX6ko4oki8+LPkeyoAbYE+0V2S5N1vVL07j+HLD2qLLGY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2017 01:44:56.0997 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0501MB2039 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 Reviewed-by: Sergey Matyukevich --- 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;