From patchwork Sun Jun 17 10:06:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omer Efrat X-Patchwork-Id: 10468741 X-Patchwork-Delegate: johannes@sipsolutions.net 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 94416600CC for ; Sun, 17 Jun 2018 10:06:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74F622881E for ; Sun, 17 Jun 2018 10:06:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 692EA288CF; Sun, 17 Jun 2018 10:06: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 A75E92881E for ; Sun, 17 Jun 2018 10:06:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933401AbeFQKGf (ORCPT ); Sun, 17 Jun 2018 06:06:35 -0400 Received: from mail-eopbgr140130.outbound.protection.outlook.com ([40.107.14.130]:48192 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933351AbeFQKGe (ORCPT ); Sun, 17 Jun 2018 06:06:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tandemg.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ukZtrZENtQVJwZU2sEXUfiOfu0449y3IGSPrzQbCdTg=; b=oze2cLIzhd//6Rh5EZNDFM42LJs+41ovkUan23OdfKbDEaz7NtnBuTqRTjlHdQOzf/dFqTwCN2zrZtrdgBcQ2z0Bz/o6dFQmEVz3CCY8wiRUhNV9u9uYGuncunD3ddAjznF6kEptLcowAMc8SH6Sce3gt/i9/7MCJN0olprgxeA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=omer.efrat@tandemg.com; Received: from omer-laptop.tandemg.local (37.142.120.98) by VI1PR02MB3629.eurprd02.prod.outlook.com (2603:10a6:803:31::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Sun, 17 Jun 2018 10:06:30 +0000 From: Omer Efrat To: linux-wireless@vger.kernel.org Cc: Omer Efrat Subject: [PATCH v3 2/5] mac80211: use BIT_ULL for NL80211_STA_INFO_* attribute types Date: Sun, 17 Jun 2018 13:06:25 +0300 Message-Id: <1529229985-17840-1-git-send-email-omer.efrat@tandemg.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [37.142.120.98] X-ClientProxiedBy: AM5P189CA0019.EURP189.PROD.OUTLOOK.COM (2603:10a6:206:15::32) To VI1PR02MB3629.eurprd02.prod.outlook.com (2603:10a6:803:31::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0d578401-9467-4cc0-b96f-08d5d439ff83 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR02MB3629; X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB3629; 3:Tnl44KGDcHgNYYXPLtk1jTDBJOrGX2r/mIuNljtioA4TLJ6CMtjhsYykRv2dVECs+45ufoZunwHWYARU8wQ7yZ+PFftrCOWCOZmD972HYxLd8tCp69/rVQBh9Pxyh191bfE2BP1hHKj/C9FE/m8I8stgxXq1gtIHfPHRkPkopONdq+rBxxSETG6Z1TLoD89mfgde8INMDpWpqwz+mueu4xxQZRpcZNRSW+6Gr168JMcEvIcCkd1nkf1hhB4V3hxn; 25:bfCYjc9yjhwf4pc6PVAzJcmNcVz+AwH3xwlxZMMW9jVr6dsBifKh9ZsaCCh0u8rZQIBclBTWjXi0cK+G5tL6xlZ7PqSBGa1MG46uZ8wRXLGSm8X1kgaacwwyxz41To7ZLs6NvlzRWot9WcyjDIcDj60BGlBLKmmGYGAhHYXAW6ElGi+gqE4GmQzdkyjnY/1CPBe1mwOA5k3XUfRj0LSap9mnmHTiW5SpJJ2pi/OJBXPFR/oVrCprirD79BQTi1DY5v3VfY8GXUlIbGSbqGRav0c39ONWstuMqO/N+ZadQ8C6truMpZnhN3i/3aW6S5dsHrxlgysfFrcfcuMWe4Mx6w==; 31:TBCWJS4LBYda5yvtYWszM7wknUvcDIB72ItBlA8Q+itxmO1hfBCx5xUWs76PsgmRn1KQ1OB5lsXJkuT5qhs/KH/pAdc15U7Nan8b+zJX3AlIbCpGktDNQxda2Mt8rxQQlkPhocCu+cCA06TNkDJav8SoSka5fUCK7bTX46h0bLUarSZY/T1Lqy2ItovHPnBKVvgkioeHVXPWQX8T2PAIyD/qkD5VAWo1oynIpi6+meA= X-MS-TrafficTypeDiagnostic: VI1PR02MB3629: X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB3629; 20:4zjcvtNKQDX6o9RtaGc2mYgw2ur85vNLevWRYbDiE9bNykaiqiLQih9esm9fQbeCGvP0jUUCTCEqI9yJtFjuVlyiNHa/WJIcawas6OFFPIK+hwuxoL1B7XfbvsHb5Xd3tYpXedMwhsYUZXc9c3RL/x8OCKh0Pu90AUHHKflBd5ncXWEbAEBttDpS1bsnIro1sEbGvLQtf+wM4W5hy4yrTX/HztHVIH5HO7nj48dCzk4cjgUIOI0hi18uTrjWxG2xKlq8FOFD6TYstMfZMz2bFOMRs8wto+ZPuXWZsxCgG1zFGCmQ+we8J4LenXc04olMX84eY+3WMhkLvel392km8w==; 4:Cy4jjHM4W8udLoTjQGbws315DoDrhYtGFG9VhkI/iOX2VYnL1gSBGiTdW7XwMqZU/JfFxE2xJby11bfqh2KeIm8ctcEcrJDFB3EqR4WMwrylKvZvj96Ke+exlApu9lx+oAD9hhV97rJXZreuIUYsqR67+6VtXQtyfYJ/ZKekqhfy/5er/yzpsYbr1Oz7nsOeeLbsfSL2U6qCn/OzQylDeaqafTZM7aOLRGqxl92n+cAZgnyZQ0usD6E/Z0HEUeS0763l24AwdbmWE1GV7bIwYg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:VI1PR02MB3629; BCL:0; PCL:0; RULEID:; SRVR:VI1PR02MB3629; X-Forefront-PRVS: 07063A0A30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(376002)(39830400003)(39380400002)(346002)(396003)(199004)(189003)(2616005)(956004)(476003)(50466002)(6506007)(486006)(2906002)(2361001)(4326008)(25786009)(26005)(44832011)(2351001)(68736007)(48376002)(3846002)(186003)(386003)(16526019)(51416003)(52116002)(66066001)(47776003)(6116002)(6666003)(16586007)(86362001)(8676002)(36756003)(107886003)(6486002)(53936002)(6916009)(15760500003)(50226002)(81156014)(8936002)(81166006)(6512007)(97736004)(5660300001)(7736002)(105586002)(478600001)(316002)(305945005)(106356001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR02MB3629; H:omer-laptop.tandemg.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: tandemg.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR02MB3629; 23:Y7cCLPDc1wHS2x+hKpYaUfV7L7EZB2IGspUaT8c3z?= =?us-ascii?Q?15Ixs+To6jjo0ikzzVGSprcHH/HBRSmSAeZfagszYqirJs1sbeEh2OHXzGw1?= =?us-ascii?Q?/mWFiOfWKqqsVjcHU7Ead8zRQYpUg92+Eaf/hN3eWJU5DpRX31PGYaJCHxbc?= =?us-ascii?Q?R+uyKvokH81RIt5JkgYiWEeGG4IoJXMBKrf+aB9EbdGH2wTzFt8r3KZbkUcX?= =?us-ascii?Q?qamje9Nwa/CbffdDg0yzZ0hEw+bqAuTxCISzfCgSAxpa3wqZwl50O+aBYzuB?= =?us-ascii?Q?8fxMuKyjZsMObbG3StcLHUBgHdGvaZ93skyWAAgZp1ncReq1uIjpgF8bGnUk?= =?us-ascii?Q?sn5ZQFChM84ahvKtJGpcvY0YAdYcgppK1Ryls2GB2soGGliFAEPYEe1QRZAD?= =?us-ascii?Q?3/unbap/NpXYlPD9fl6LtKuh4irIEJLbomPyAf8WLawkaKIzMFfUlMeirP0w?= =?us-ascii?Q?28CIqFfaF6b7+kQIKCgBdNw0/teboFgGCm3r660FAzb2rBf5yk1l7TSWJAUa?= =?us-ascii?Q?z/N4P26HHrAv/VzVD/91roCA30TVM5SfsvcL4MkGH9YCO+wWVbII8K5WcoX5?= =?us-ascii?Q?uuaw/8MJZyvDnBkdS8Bbm1dbQ1QKT15sg+Bw8FCJKBwGj+yCYOf8k0HozZnz?= =?us-ascii?Q?9iy9wnSrAXzvD06ZQsaNEunanaZXH5KxQ7b7NoMGH2TlyO2HBrXUjQIY+ZbA?= =?us-ascii?Q?zzq5NJH6xqvtNYBSPad7by8mjQb9AOGPxCpIVHa51+c64Rt6J798EDhzjWAG?= =?us-ascii?Q?5OtVLP6t5UeInDg5/rNMcdjVFEsnoTxu/8XmlTh69deTjEa3cReqLhyP+zJV?= =?us-ascii?Q?E088YaXrwv2W1zBTWoiokCRBcQOWN15Prn3OWYpyr0fj/9y4jV0wKbOWpXe5?= =?us-ascii?Q?OrlXm67eDeYlBoCPaYIutu8H8Pp6ZigriWRWY8RW7pH2lOZW56aMcJoTeV6y?= =?us-ascii?Q?zRlSfs57K21sSWND1Ilb9h+PpMheAfBgqOWayDeDnP/SkMiCdm33RN9yR3Fm?= =?us-ascii?Q?TyYB5AGk8VSU/4M3llr0UTXqz7sr7gQmwqMwUOmUa4nnH66OSXmbfS4U/1mb?= =?us-ascii?Q?nKW9sZc5twqTxT/IXo6u2nLPjvCpWeJ9wdTZemvfA9wttUunOUuqH9LNo7O1?= =?us-ascii?Q?Y7d4wA4nD6JgDfZR7nkowJb01pNMh788Md0ei+XWNhXpuwqokgARfviATODt?= =?us-ascii?Q?zem4FM5kw/RlvSiSPxh03Kv/Qe06L10aqreIIaw2BbLPp+kpVSbBatJ4A=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: P7WAsXVOqY+DwUA76jLHns2jAGbLHm7Qf7p6nAjcG8PM2XnPQWd1WlSfqMSbMDtcsCR0k4odvutp/BSCINm5WOoSC5tx52SfNdBT9DT3j+Vq73yKEqwZ9U638mQe+qDTbUyQE3xmTe/HARs4i2cc8ybLzytJt5ACkeS2NR5YGJERRgsxqcbPiqGiy2TlZgFY X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB3629; 6:uTN0g7y0mIaC43AoxwEsZbgBMmvmQRVn3Y3LcNL3omy3O3bz/GB+HQ4z1Y4MHRBXVNG9oMk7UQFCfz/3xQm+UXfxObHQfaJ1zexWLcnxOSynNyHr6HdMWt7MNXhHrBKuS4qeUUtRwf/J1OfqDyEXW9p0LBJpczHLXFa5B6AnG8dZoQVY9ypHGRUyhpX2J1iBhy7v1leZBJo9bMjomXAgAp7PLOeeSq6kg2ZwAWwm2QlAirmTJbpEpUqeafcwku9jymjZxYGJwMLr3iJLW/6FNa+lu8rjInAtHu1hQvW7/9vztu+rz9iu26PeK79lY5ZVNN8iFWGUifFfh+ZNEWMSBv0OV3SryZqdN+oRjPWCriEqMHjgg8X31gA+kiKzasj5GYCTpOtX18ZSlnxV2UFVWUP2fA9vRHk7KThdr2FJ4YwAw031lB/Ci2XCL0dzN+qD6N+z9ONh1xRP+a+o5kx8IQ==; 5:eNaazSn5c7sRx8gLmXpUXmi9ZZIx/l0RxjMWEUcbJCLBYbar0+Nss3SC8F+eWnuovCyuZwzEbq6IccB6lQkKkGbQbNgGtdy8POY+e1GTTWr0Ej0umNMztDmJN71pUSyiPmG+WYdRyk/SXNvI2l3MBjk1rX/+bPUP4bT8kwfOlnU=; 24:Ik62gGGmjxW/MgaQNSNtEGJlpQ9b1IS8fWHTYrpL0vFpDBMclLyPLnpJgUqt89znAjycs65hrYFFIKPYzG7RqEYKPySeHZsu8/i3CHWKBcs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB3629; 7:eYsmLDfrJ9E5rfcOtPSSDs1HzePg399esSw4G6Ns2gGcZn09k8CtMlWeaxNLSxhj9+35Hc8H2tdjlRKjqw2ZYNGAquHiQhW6JMRdZCEIYHiPtKdyxfogQPETyCKsPORTfbDcvRQgyf5ZeYsS6QnMjli4KmQ2H8N9ytUH9wtpFXYyGtCnOTsmabxCEnx1z5sMjYdnuo5BoFfCdzZvEJP4tcdLHAejT9id94ktWzxwyQyb49vLu2GW3d0A3FMxK7SA X-OriginatorOrg: tandemg.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2018 10:06:30.3777 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d578401-9467-4cc0-b96f-08d5d439ff83 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d690b55a-f04a-454b-9f62-fb1e25467a25 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB3629 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 The BIT macro uses unsigned long which some architectures handle as 32 bit and therefore might cause macro's shift to overflow when used on a value equals or larger than 32 (NL80211_STA_INFO_RX_DURATION and afterwards). Since 'filled' member in station_info changed to u64, BIT_ULL macro should be used with all NL80211_STA_INFO_* attribute types instead of BIT to prevent future possible bugs when one will use BIT macro for higher attributes by mistake. This commit cleans up all usages of BIT macro with the above field in mac80211 by changing it to BIT_ULL instead. Signed-off-by: Omer Efrat --- net/mac80211/ethtool.c | 6 ++-- net/mac80211/sta_info.c | 84 ++++++++++++++++++++++++------------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/net/mac80211/ethtool.c b/net/mac80211/ethtool.c index 690c142..5ac7438 100644 --- a/net/mac80211/ethtool.c +++ b/net/mac80211/ethtool.c @@ -116,16 +116,16 @@ static void ieee80211_get_stats(struct net_device *dev, data[i++] = sta->sta_state; - if (sinfo.filled & BIT(NL80211_STA_INFO_TX_BITRATE)) + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_TX_BITRATE)) data[i] = 100000ULL * cfg80211_calculate_bitrate(&sinfo.txrate); i++; - if (sinfo.filled & BIT(NL80211_STA_INFO_RX_BITRATE)) + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_RX_BITRATE)) data[i] = 100000ULL * cfg80211_calculate_bitrate(&sinfo.rxrate); i++; - if (sinfo.filled & BIT(NL80211_STA_INFO_SIGNAL_AVG)) + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG)) data[i] = (u8)sinfo.signal_avg; i++; } else { diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index aa8fe77..f342022 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -2114,38 +2114,38 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, drv_sta_statistics(local, sdata, &sta->sta, sinfo); - sinfo->filled |= BIT(NL80211_STA_INFO_INACTIVE_TIME) | - BIT(NL80211_STA_INFO_STA_FLAGS) | - BIT(NL80211_STA_INFO_BSS_PARAM) | - BIT(NL80211_STA_INFO_CONNECTED_TIME) | - BIT(NL80211_STA_INFO_RX_DROP_MISC); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_INACTIVE_TIME) | + BIT_ULL(NL80211_STA_INFO_STA_FLAGS) | + BIT_ULL(NL80211_STA_INFO_BSS_PARAM) | + BIT_ULL(NL80211_STA_INFO_CONNECTED_TIME) | + BIT_ULL(NL80211_STA_INFO_RX_DROP_MISC); if (sdata->vif.type == NL80211_IFTYPE_STATION) { sinfo->beacon_loss_count = sdata->u.mgd.beacon_loss_count; - sinfo->filled |= BIT(NL80211_STA_INFO_BEACON_LOSS); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_BEACON_LOSS); } sinfo->connected_time = ktime_get_seconds() - sta->last_connected; sinfo->inactive_time = jiffies_to_msecs(jiffies - ieee80211_sta_last_active(sta)); - if (!(sinfo->filled & (BIT(NL80211_STA_INFO_TX_BYTES64) | - BIT(NL80211_STA_INFO_TX_BYTES)))) { + if (!(sinfo->filled & (BIT_ULL(NL80211_STA_INFO_TX_BYTES64) | + BIT_ULL(NL80211_STA_INFO_TX_BYTES)))) { sinfo->tx_bytes = 0; for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) sinfo->tx_bytes += sta->tx_stats.bytes[ac]; - sinfo->filled |= BIT(NL80211_STA_INFO_TX_BYTES64); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES64); } - if (!(sinfo->filled & BIT(NL80211_STA_INFO_TX_PACKETS))) { + if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_TX_PACKETS))) { sinfo->tx_packets = 0; for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) sinfo->tx_packets += sta->tx_stats.packets[ac]; - sinfo->filled |= BIT(NL80211_STA_INFO_TX_PACKETS); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS); } - if (!(sinfo->filled & (BIT(NL80211_STA_INFO_RX_BYTES64) | - BIT(NL80211_STA_INFO_RX_BYTES)))) { + if (!(sinfo->filled & (BIT_ULL(NL80211_STA_INFO_RX_BYTES64) | + BIT_ULL(NL80211_STA_INFO_RX_BYTES)))) { sinfo->rx_bytes += sta_get_stats_bytes(&sta->rx_stats); if (sta->pcpu_rx_stats) { @@ -2157,10 +2157,10 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, } } - sinfo->filled |= BIT(NL80211_STA_INFO_RX_BYTES64); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_BYTES64); } - if (!(sinfo->filled & BIT(NL80211_STA_INFO_RX_PACKETS))) { + if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_RX_PACKETS))) { sinfo->rx_packets = sta->rx_stats.packets; if (sta->pcpu_rx_stats) { for_each_possible_cpu(cpu) { @@ -2170,17 +2170,17 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, sinfo->rx_packets += cpurxs->packets; } } - sinfo->filled |= BIT(NL80211_STA_INFO_RX_PACKETS); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_PACKETS); } - if (!(sinfo->filled & BIT(NL80211_STA_INFO_TX_RETRIES))) { + if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_TX_RETRIES))) { sinfo->tx_retries = sta->status_stats.retry_count; - sinfo->filled |= BIT(NL80211_STA_INFO_TX_RETRIES); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES); } - if (!(sinfo->filled & BIT(NL80211_STA_INFO_TX_FAILED))) { + if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_TX_FAILED))) { sinfo->tx_failed = sta->status_stats.retry_failed; - sinfo->filled |= BIT(NL80211_STA_INFO_TX_FAILED); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED); } sinfo->rx_dropped_misc = sta->rx_stats.dropped; @@ -2195,23 +2195,23 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, if (sdata->vif.type == NL80211_IFTYPE_STATION && !(sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER)) { - sinfo->filled |= BIT(NL80211_STA_INFO_BEACON_RX) | - BIT(NL80211_STA_INFO_BEACON_SIGNAL_AVG); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_BEACON_RX) | + BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG); sinfo->rx_beacon_signal_avg = ieee80211_ave_rssi(&sdata->vif); } if (ieee80211_hw_check(&sta->local->hw, SIGNAL_DBM) || ieee80211_hw_check(&sta->local->hw, SIGNAL_UNSPEC)) { - if (!(sinfo->filled & BIT(NL80211_STA_INFO_SIGNAL))) { + if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_SIGNAL))) { sinfo->signal = (s8)last_rxstats->last_signal; - sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL); } if (!sta->pcpu_rx_stats && - !(sinfo->filled & BIT(NL80211_STA_INFO_SIGNAL_AVG))) { + !(sinfo->filled & BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG))) { sinfo->signal_avg = -ewma_signal_read(&sta->rx_stats_avg.signal); - sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL_AVG); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG); } } @@ -2220,11 +2220,11 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, * pcpu statistics */ if (last_rxstats->chains && - !(sinfo->filled & (BIT(NL80211_STA_INFO_CHAIN_SIGNAL) | - BIT(NL80211_STA_INFO_CHAIN_SIGNAL_AVG)))) { - sinfo->filled |= BIT(NL80211_STA_INFO_CHAIN_SIGNAL); + !(sinfo->filled & (BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL) | + BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL_AVG)))) { + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL); if (!sta->pcpu_rx_stats) - sinfo->filled |= BIT(NL80211_STA_INFO_CHAIN_SIGNAL_AVG); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL_AVG); sinfo->chains = last_rxstats->chains; @@ -2236,15 +2236,15 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, } } - if (!(sinfo->filled & BIT(NL80211_STA_INFO_TX_BITRATE))) { + if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_TX_BITRATE))) { sta_set_rate_info_tx(sta, &sta->tx_stats.last_rate, &sinfo->txrate); - sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE); } - if (!(sinfo->filled & BIT(NL80211_STA_INFO_RX_BITRATE))) { + if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_RX_BITRATE))) { if (sta_set_rate_info_rx(sta, &sinfo->rxrate) == 0) - sinfo->filled |= BIT(NL80211_STA_INFO_RX_BITRATE); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_BITRATE); } if (tidstats && !cfg80211_sinfo_alloc_tid_stats(sinfo, GFP_KERNEL)) { @@ -2257,18 +2257,18 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, if (ieee80211_vif_is_mesh(&sdata->vif)) { #ifdef CONFIG_MAC80211_MESH - sinfo->filled |= BIT(NL80211_STA_INFO_LLID) | - BIT(NL80211_STA_INFO_PLID) | - BIT(NL80211_STA_INFO_PLINK_STATE) | - BIT(NL80211_STA_INFO_LOCAL_PM) | - BIT(NL80211_STA_INFO_PEER_PM) | - BIT(NL80211_STA_INFO_NONPEER_PM); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_LLID) | + BIT_ULL(NL80211_STA_INFO_PLID) | + BIT_ULL(NL80211_STA_INFO_PLINK_STATE) | + BIT_ULL(NL80211_STA_INFO_LOCAL_PM) | + BIT_ULL(NL80211_STA_INFO_PEER_PM) | + BIT_ULL(NL80211_STA_INFO_NONPEER_PM); sinfo->llid = sta->mesh->llid; sinfo->plid = sta->mesh->plid; sinfo->plink_state = sta->mesh->plink_state; if (test_sta_flag(sta, WLAN_STA_TOFFSET_KNOWN)) { - sinfo->filled |= BIT(NL80211_STA_INFO_T_OFFSET); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_T_OFFSET); sinfo->t_offset = sta->mesh->t_offset; } sinfo->local_pm = sta->mesh->local_pm; @@ -2313,7 +2313,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, thr = sta_get_expected_throughput(sta); if (thr != 0) { - sinfo->filled |= BIT(NL80211_STA_INFO_EXPECTED_THROUGHPUT); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_EXPECTED_THROUGHPUT); sinfo->expected_throughput = thr; }