Message ID | 20200115135338.14374-60-Jerome.Pouiller@silabs.com |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=LItA=3E=vger.kernel.org=linux-wireless-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41B13C4741C for <linux-wireless@archiver.kernel.org>; Wed, 15 Jan 2020 13:56:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 170562465A for <linux-wireless@archiver.kernel.org>; Wed, 15 Jan 2020 13:56:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="D6cLMlm6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730108AbgAONzk (ORCPT <rfc822;linux-wireless@archiver.kernel.org>); Wed, 15 Jan 2020 08:55:40 -0500 Received: from mail-eopbgr770047.outbound.protection.outlook.com ([40.107.77.47]:48566 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730086AbgAONzi (ORCPT <rfc822; linux-wireless@vger.kernel.org>); Wed, 15 Jan 2020 08:55:38 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FcGS5yVCSmN0pzzkQvGr3UilUEo+1qC7awgO9HpsSVzedMRyyQ4XdkZ4e8TDMjLRbwEy/NcSeIiGTQCScAnZsicO3hqmsoI5ggoYSCaFvOYXGsKwyq/6c81aGM+GOV8c40hharDK7kkd3UuWRmKfo3Z+EiTJm6i0oQMMbvGCRGuVU5HSOL+6rSysEcVcMIiv2v1zV8uPg8/l4Qr63MDQ/wWcgcRSGxfqzKEIqSPtuKUFgcUNxORHHqiwGyg9AqQthXgyHBCZXIxgeflGvKreBXkIP6XzivZoI8Uscg1WwfvoDho6AU5PxylikX60dr/Efxw96Sa0So9hQufvuina6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NV6i8iFSi16VOyb/8DY1eR4/NhyYerJyThLKXln0oV0=; b=j2zV0Pp9p4+Yqw8cJg3CwBxtsiD5emvvjVFrHwJIEBL+6WvzJkN1rVU5MYSHiECEFJnPOo0zNnbVEt5nD1aEV8gihyrBieAnuKt1gAJSU20ZSh1a9zGMYXDdPPGB26buyqhl41qzG7UfgXdUK+4JBUCU2ZP50YvbFzehZX5AhIwsxSto66vx+I9XfNEiCsr4cVUU0bDESrdawHzLvf+I4DftvrEz1S2aKeotSt3nmaojSb/YbaAPkM4xT3FewCew/Yt1dsys/osRQmnYG+96Gz7rb29li7UR9266ajbhxyiAaS6HWGPPB7tgd6hsc+ZP8tSJ6YRYdxSbkFqlZKhEuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NV6i8iFSi16VOyb/8DY1eR4/NhyYerJyThLKXln0oV0=; b=D6cLMlm6SR1Y9NqD4ZOkGkZU0wsLUNxhpTSLowLMSC83pq423NOuF2IOC0uHL1vcv+Iu/+dUJ47K2ynysVa7I95V2l00DApYzsrPABdkw0Du64uGe6i9gpDAZN2O9ArOdNFyrOlnl+dYhrrKw1SnbUfWo1FQToxu5F8myyOns90= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB3661.namprd11.prod.outlook.com (20.178.252.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18; Wed, 15 Jan 2020 13:55:32 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf%4]) with mapi id 15.20.2623.018; Wed, 15 Jan 2020 13:55:32 +0000 Received: from pc-42.home (2a01:e35:8bf5:66a0:3dbe:4cb5:6059:a948) by PR2P264CA0008.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Wed, 15 Jan 2020 13:55:27 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= <Jerome.Pouiller@silabs.com> To: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>, "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org> CC: "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Kalle Valo <kvalo@codeaurora.org>, "David S . Miller" <davem@davemloft.net>, =?utf-8?b?SsOpcsO0bWUgUG91?= =?utf-8?q?iller?= <Jerome.Pouiller@silabs.com> Subject: [PATCH v2 59/65] staging: wfx: ensure that packet_id is unique Thread-Topic: [PATCH v2 59/65] staging: wfx: ensure that packet_id is unique Thread-Index: AQHVy6txUER+GWdktEqnlcABTK2d+A== Date: Wed, 15 Jan 2020 13:55:28 +0000 Message-ID: <20200115135338.14374-60-Jerome.Pouiller@silabs.com> References: <20200115135338.14374-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20200115135338.14374-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR2P264CA0008.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::20) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.25.0 x-originating-ip: [2a01:e35:8bf5:66a0:3dbe:4cb5:6059:a948] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0631c169-8da4-470c-07b5-08d799c29441 x-ms-traffictypediagnostic: MN2PR11MB3661: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <MN2PR11MB36615E69458E6964E3BAD05493370@MN2PR11MB3661.namprd11.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 02830F0362 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(396003)(136003)(346002)(366004)(199004)(189003)(8886007)(6486002)(316002)(54906003)(71200400001)(36756003)(6506007)(66476007)(66446008)(66946007)(110136005)(8676002)(81166006)(81156014)(478600001)(86362001)(2616005)(4326008)(66574012)(2906002)(107886003)(1076003)(16526019)(186003)(85202003)(5660300002)(6512007)(52116002)(64756008)(66556008)(85182001)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB3661; H:MN2PR11MB4063.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: czYwTgkgAJdIhp0rUR/YWE1J3SzIhZZSxC0aLsP/8Df9dvrisMye2EPEt2aOryeyGOy104iGqionEfVhYkvEXPViTdo/ScHD7TBDfZZTfBFgWsGqk1fb+zsVB+NIZqlmJP8q9DTZLe6Ua5cPxBjFJ8YcGlqsQyz/c+A/NJRArXo8DSdee8PMdO+CcujT1if1MpEPdneGbPBo5DmUE7uT/tRAyxwtktmXs5Y6lYcEjd93A4ujPYZ/ffS7YXNiwsUCSrgg+Ycc3XLj5w3o5FUOySjAyam0dALOa9tBEqZ5ntM+i8yQammEsFjm8BPzDxgQCDfs3OfCiVCeVytOcJzabNXe0V+cfmQk3OStHhT3aQQ39LJc0+bCw37znB8HV/9A6JUHBME5V1W/W16kDBpXXQqXJFZSEBhDeflDMiUq1AgfOV3O+43YzH5h3CwA86/4 Content-Type: text/plain; charset="utf-8" Content-ID: <0171E68131C9814BAA64F3F408878735@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0631c169-8da4-470c-07b5-08d799c29441 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 13:55:28.8268 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Iq6b9uIEO1aQ/lOTybKcvhMlKiqD1cC2jeA2x9jBpNNaf3geZIFRpXdMLbTCvsX+8hRyykxY1Qbv6w19UoVrEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3661 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: <linux-wireless.vger.kernel.org> X-Mailing-List: linux-wireless@vger.kernel.org |
Series |
Simplify and improve the wfx driver
|
expand
|
diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index c32994553633..20f4740734f2 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -469,8 +469,12 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, // Fill tx request req = (struct hif_req_tx *)hif_msg->body; - req->packet_id = queue_id << 16 | - IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)); + // packet_id just need to be unique on device. 32bits are more than + // necessary for that task, so we tae advantage of it to add some extra + // data for debug. + req->packet_id = queue_id << 28 | + IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)) << 16 | + (atomic_add_return(1, &wvif->wdev->packet_id) & 0xFFFF); req->data_flags.fc_offset = offset; if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) req->data_flags.after_dtim = 1; diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 5d61946e33e0..8b85bb1abb9c 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -54,6 +54,7 @@ struct wfx_dev { int tx_burst_idx; atomic_t tx_lock; + atomic_t packet_id; u32 key_map; struct hif_req_add_key keys[MAX_KEY_ENTRIES];