Message ID | 20200115135338.14374-38-Jerome.Pouiller@silabs.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=silabs.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-silabs-onmicrosoft-com header.b=gpVFi1t5; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47yTTl4pDGz9sTB for <patchwork-incoming-netdev@ozlabs.org>; Thu, 16 Jan 2020 00:59:39 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729835AbgAONzZ (ORCPT <rfc822;patchwork-incoming-netdev@ozlabs.org>); Wed, 15 Jan 2020 08:55:25 -0500 Received: from mail-dm6nam11on2047.outbound.protection.outlook.com ([40.107.223.47]:4897 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729814AbgAONzY (ORCPT <rfc822;netdev@vger.kernel.org>); Wed, 15 Jan 2020 08:55:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SDJIGc+vj/jBx9RmU4COyZ5QkY2huRuMwJRD15ICRLz9w+qIs/YasqTkGSe4dQhPCHfnaBvryljpl0Z71MWiernAKOmoGwJNdGnD+zt5L/rDjj8s50YUXCvio1SM3s/Io1M+YgKLvnPBl5eVBvOYTKd38WOP3mzXBlI0reneCTPDI/HZYLJu6FK/Y5Dq/nbpCevKls+QarwCZHzcdTIexfrADAbMlPJxwpF/P5tFaU1BqCEtAlAw++/VeSqm+X0NaWAFmy/GuTc8mxEoDfBxnZZrsDZfdZmpGPZz5rx1x5BaPxCNtOYSFN974z2sSEcm7QLMq6NQVDIGXNpdgkSJ4A== 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=HqaSYkN3+5Zn6ohlAX6hVbCkz5NgCFZL+6QN3uKKY08=; b=CNxHJ/VUvkFAq5rUrMz4l9B4OZDY/nvQtnUoW8D/stngtJESNSLmxzCOGWifqtfyfGDMzc7nwFAWLtcMoG6B6SCPfnBncc51l+ZalN74Fr6qHH4RcaxHXoF05pc2+E+rEySRJOR43I4FGSVeL2CpEXqv09dl1SZPjUCxPtlh1j09Fg1WkvX7vwc3FN8BZ1O18qAC1cegUZaSJcyghPyajJ4K43v8RvC1rdzkegDticfT4SdX6ecPY5Ozi1MRZGcxJ/jgz9cEo569+bmkRcRVrxm26w3+8FW90Z13S+ACcamciGyTCjdqtHa2iyNoAZnjfU5r1t22pdw/6hb5vapYyA== 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=HqaSYkN3+5Zn6ohlAX6hVbCkz5NgCFZL+6QN3uKKY08=; b=gpVFi1t5S+bYCET4HzZf36RVYQIg0tzp73yHC531xcK9xy8vIhHESDyXVVsLIT4cwSqkoxn7ujCoWBu1ayjS+UJWuHUsorQv3Kk6OvMA6YESqa7SD+phltgyRpUupul8n9zr1yIbClTOssDnKi49Wkj7u72MGV6U2AtnSS+Jx8Y= 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:55:20 +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:20 +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:55 +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 37/65] staging: wfx: simplify wfx_set_mcast_filter() Thread-Topic: [PATCH v2 37/65] staging: wfx: simplify wfx_set_mcast_filter() Thread-Index: AQHVy6texVjlQ/wD2USlTJjBKqBd1g== Date: Wed, 15 Jan 2020 13:54:56 +0000 Message-ID: <20200115135338.14374-38-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: d70ea8e3-9ecb-4b5c-5778-08d799c28141 x-ms-traffictypediagnostic: MN2PR11MB4094: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <MN2PR11MB40943A8170DA231DC325DAB293370@MN2PR11MB4094.namprd11.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:3631; 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: Ulc7FczGcmjWd3ab7ZcuwISrZXzJtXEOCDnk2HMAu+hwU3j7rDM9mX0WvSj4wBC8ooPKdA1j5htHHfmq3W8miADVcNqoMeg8fLy4QR7U6Pak6/vjMpWljalEcBRsTo6k+JHE8gCEBOilwBIw7f47OIh5pvG7pT/Qz47JDfwK/j/aS/IMBGoRT1i0B/uWnabTRkBFcvm0BZbRGSoiw3Imig8uJBNmDypM5Ojv9JTHBiVyBUnrKPss4DXIpqK2XKbVNReC03q4ZoGZut85BpPR9cjsR7/+mxAgnZyto4Aa+/+6laWt2hgYRB75jKSuQ6cyD7jgDgWIS/yD+LB1nh94UIpn2PXw+q0DbqVldflGPUujTbLNGkj9ncCzewUhANj0Ip5z8TCcIFMAZh57K9RKehWsOf1RzMNOwOgMmHdZgNBgo7QKpB417j51Wjk9Y//W Content-Type: text/plain; charset="utf-8" Content-ID: <813CD48D150FD04F90B8328CA5845427@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: d70ea8e3-9ecb-4b5c-5778-08d799c28141 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 13:54:56.9231 (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: l/MhyeFyhrOorcD2SFv9hDzd9jfyLosP6W/JMf9n0d6Uyb+q0KqJNe4zIQALuEIS6a/9So0l1625JHGpDZ3IvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4094 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@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 e71b99aa1f63..a934f66f3a4c 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -116,7 +116,7 @@ int wfx_fwd_probe_req(struct wfx_vif *wvif, bool enable) static int wfx_set_mcast_filter(struct wfx_vif *wvif, struct wfx_grp_addr_table *fp) { - int i, ret; + int i; // Temporary workaround for filters return hif_set_data_filtering(wvif, false, true); @@ -124,25 +124,15 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif, if (!fp->enable) return hif_set_data_filtering(wvif, false, true); - for (i = 0; i < fp->num_addresses; i++) { - ret = hif_set_mac_addr_condition(wvif, i, fp->address_list[i]); - if (ret) - return ret; - } - - ret = hif_set_uc_mc_bc_condition(wvif, 0, HIF_FILTER_UNICAST | - HIF_FILTER_BROADCAST); - if (ret) - return ret; - - ret = hif_set_config_data_filter(wvif, true, 0, BIT(1), - BIT(fp->num_addresses) - 1); - if (ret) - return ret; - - ret = hif_set_data_filtering(wvif, true, true); - - return ret; + for (i = 0; i < fp->num_addresses; i++) + hif_set_mac_addr_condition(wvif, i, fp->address_list[i]); + hif_set_uc_mc_bc_condition(wvif, 0, + HIF_FILTER_UNICAST | HIF_FILTER_BROADCAST); + hif_set_config_data_filter(wvif, true, 0, BIT(1), + BIT(fp->num_addresses) - 1); + hif_set_data_filtering(wvif, true, true); + + return 0; } void wfx_update_filtering(struct wfx_vif *wvif)