Message ID | 20200115135338.14374-18-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 C0CE8C33CB1 for <linux-wireless@archiver.kernel.org>; Wed, 15 Jan 2020 14:00:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C20624656 for <linux-wireless@archiver.kernel.org>; Wed, 15 Jan 2020 14:00:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="XGDtkF9T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729427AbgAONym (ORCPT <rfc822;linux-wireless@archiver.kernel.org>); Wed, 15 Jan 2020 08:54:42 -0500 Received: from mail-dm6nam11on2085.outbound.protection.outlook.com ([40.107.223.85]:14113 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729378AbgAONym (ORCPT <rfc822; linux-wireless@vger.kernel.org>); Wed, 15 Jan 2020 08:54:42 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UJaanCjTatpOTrUaOSDqisAZX2i+FuiGfMbhglPSAVH00ahXUOh0cq4Q2eLv/hkQEh9kh8d8eWYyP4PzPQgcv3bGT2N+afWFx/XQ+ci2XwkjHI9aviQipPED/2HEpwP0BeARt9CV4k3YkQ2Bfhh0/VabR5gKyc2jIQcLIykx8Qa51RauTS8Lm3E6FDQKggDILG9lj7VJNsPPmJP1S+lphCMjqCuWtXxShNJ7fdlPrx+jfN1zqba+w2tUrbtKiGtAu8MvNCrea3SPsIo1koLI+AzfoqO9dV3RNZaVad5DCO8G8XblSthA9q3o/DgUE/daWFdyIvziobquUI+n6Ecv0g== 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=vzVf8PCsjhv48CVwVz+IbX+oGTKM2/8Ap4mn8+5bTGE=; b=BfVJFgf67nDRo2+z1cG0jjy3csHZ8S/Vrmry94eqhYk179uLEgRx3E1SK9PNc2NdIiw0xelAWIHDw98J9046QM4n2NaxoMYNqiGdi0pnKZ96GyPGhoxg79puf6E8BmYho5YdCF4BMNYCLHPFIopYHHXudAOQXTOf70rymMncj0315ZOjrQkQEM6Mh2WQjvpBEzHeX8AuV3sRyYndQZKkHrEtBRO/XJKxsKZ60K4SsrwDZOBD539T28Usz+Xm2mYkWOzKmrSNxumCglCJRBY2uVFI3QsWactnXo5vOTt14cOzm6ewhRX9ohYeAXqlp9uR6AIegm+oZv6XLpXnTz2/qA== 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=vzVf8PCsjhv48CVwVz+IbX+oGTKM2/8Ap4mn8+5bTGE=; b=XGDtkF9T+Kp0mI65nMRvvvpFro8hovIrVxfdSrh6asvC/TGEoJM0//gwJ5cxHpMhRf53MtSUWo4P3PqJ1GCWk6dVODZdSedaRS1ddBGwICXhensBleyc0s+rDXPWZE5Zuxv1IQkKXuGUVY3sPFu65lVd2gBnWuMeHsvqlCrebGA= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4094.namprd11.prod.outlook.com (10.255.180.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Wed, 15 Jan 2020 13:54:26 +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:54:26 +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:54:25 +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 17/65] staging: wfx: simplify wfx_upload_ap_templates() Thread-Topic: [PATCH v2 17/65] staging: wfx: simplify wfx_upload_ap_templates() Thread-Index: AQHVy6tMm6Ei/ubRgkWvfX7AxA3Pvg== Date: Wed, 15 Jan 2020 13:54:26 +0000 Message-ID: <20200115135338.14374-18-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: dd43a2a5-47bc-407e-3228-08d799c26ef8 x-ms-traffictypediagnostic: MN2PR11MB4094: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <MN2PR11MB40944FB9D23AA9B70BFBC90393370@MN2PR11MB4094.namprd11.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 02830F0362 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39850400004)(366004)(396003)(346002)(136003)(376002)(189003)(199004)(316002)(110136005)(54906003)(85202003)(81156014)(5660300002)(8676002)(71200400001)(8936002)(81166006)(186003)(6506007)(86362001)(66946007)(66446008)(66476007)(66556008)(2906002)(64756008)(478600001)(6512007)(52116002)(66574012)(6486002)(1076003)(16526019)(4326008)(85182001)(107886003)(36756003)(8886007)(2616005); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB4094; H:MN2PR11MB4063.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: Lq4Fk2fm81heqR5dIkGWvE6YbPzgHF86ivMmt62pt2l2vv2hWIPP9O31aFtPgy1T8P25upqpd88ga7EESw2gp3spPDG1FAKt+LjFWq8twlOqZbvB79XwXeUVSxyIT7tN7lwwjWig+VG6hbkx4nySym4GKjK/eqYAiE+vgt+WZVxK5/yc+VKtuzvQz203P0wZFDSJhr+DonqiCsGS+XXIVp+3kQ1tWagPYYOwgbHC8K4EknyBGELRuAvVvnzofZBh/ZcExi7SxTbPB7HjszvbVtF2oGpGq13DE2tGI2iopEmdT5mcHcwBJa+p+fTQjL9L9kYEiYylElZhIKnfjp+KdohiLdGX1/dFGl0pFJeKdUIY7U0Qk/a1FppYd6vZF2ct8NYB83TH1vkLtcCDjo/9YHInSwjKEbJlP7UVG7PYA+nITL5C4Zp03isq7CJGoLz7 Content-Type: text/plain; charset="utf-8" Content-ID: <6AAE882B4E271E4CA0420451E9A569DF@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd43a2a5-47bc-407e-3228-08d799c26ef8 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 13:54:26.2628 (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: IMgMxJPLUosRPpSAHJy1VrFi7W4CzjTpA8ydoRoTz4bWmTJntEzUTML7bcRUdzyXXsMIMsuPKpzqaVf+X2zOJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4094 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/sta.c b/drivers/staging/wfx/sta.c index fdde7ab92302..1181203489f0 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -783,7 +783,6 @@ static int wfx_update_beaconing(struct wfx_vif *wvif) static int wfx_upload_ap_templates(struct wfx_vif *wvif) { struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; if (wvif->vif->type == NL80211_IFTYPE_STATION || wvif->vif->type == NL80211_IFTYPE_MONITOR || @@ -795,14 +794,11 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif) return -ENOMEM; hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN, API_RATE_INDEX_B_1MBPS); + dev_kfree_skb(skb); - /* TODO: Distill probe resp; remove TIM and any other beacon-specific - * IEs - */ - mgmt = (void *)skb->data; - mgmt->frame_control = - cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP); - + skb = ieee80211_proberesp_get(wvif->wdev->hw, wvif->vif); + if (!skb) + return -ENOMEM; hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES, API_RATE_INDEX_B_1MBPS); dev_kfree_skb(skb);