Message ID | 20200115121041.10863-38-Jerome.Pouiller@silabs.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Johannes Berg |
Headers | show
Return-Path: <SRS0=LItA=3E=vger.kernel.org=linux-wireless-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1D5B138D for <patchwork-linux-wireless@patchwork.kernel.org>; Wed, 15 Jan 2020 12:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85A09207FF for <patchwork-linux-wireless@patchwork.kernel.org>; Wed, 15 Jan 2020 12:16:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="R5KFS8gR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731821AbgAOMQd (ORCPT <rfc822;patchwork-linux-wireless@patchwork.kernel.org>); Wed, 15 Jan 2020 07:16:33 -0500 Received: from mail-bn7nam10on2048.outbound.protection.outlook.com ([40.107.92.48]:31808 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731307AbgAOMNe (ORCPT <rfc822;linux-wireless@vger.kernel.org>); Wed, 15 Jan 2020 07:13:34 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CNfNMp5BUSKdlT8lafMpCvTd2i+N9k6cJPWuPtkvlkOIhgVA3pwZnh/SDzadexnEkICGKg3Yq3LfOuZL8tsuzkuQPSbIbhG0xxF5dbBbtWqol3JE3yhqR3PmExwC5vCy7x0XCNfjzvmhwaCPnxIjKNAQ9Adcw63y43ztjfT54GzKmczzjgoK+wWCh/vBZJyjtpdBEtcTbt5R/pj/kHImWpZXvnnd4ORhF2aGTd/AZVmzP9AHLN9iQg5z7mcXcIAbDHtjb55QdPJS2mO9MCSpAqupA7Um3sX8o+fmEbCJFOHUFi6DZ5uavTeHUBfrbQmLhBrS/cyXqN3NCJaJxl7YkQ== 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=CBaXNPMvbAQ5kZMs3yMkL4wJfKb9U8Fdu8r8vzW9Cok8lJ8OusMjpMJ4aKlKj9HBAWE5EG+FkGbXGiy7IshzKCubIz4BkjJQ70QeQE5m3VcDme2oomot+T6euvVgoaku+oZhtK2YLPFOaHY52WnUAZG22fEN3AREjkhu052jslnso/qNDbvajfUNEbf/JvfwGZn8z+VBfpyFoP1Uy2LjLTVANgAs55TLrBw44gSldjFHm2L/IbmYojXobtybQp8Do3ok5tEZSiECOMuN0DlnpsNrqWs9I91jqsoEbmhBcNtWYTLDyeco+OF/dd9kCCajeCdyelwal2ZKtFDL11i2Xg== 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=R5KFS8gRH0ItUXIDfI7esF9lB+4D7GixRU5S2KaaY2E4rp6CdhWcZqVUmDIFlP4A8uQjBPvr4iapHlVqgY5gyiR9JK9uvR3VV9Jyvgv1rRDNuLUoHhgUpUbb1mnkVfX9dcK1A/q0nA7yi1W0XzrcIL/xcn4zwKrO+HukYh8MRTE= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4096.namprd11.prod.outlook.com (20.179.150.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.10; Wed, 15 Jan 2020 12:13:24 +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 12:13:24 +0000 Received: from pc-42.silabs.com (37.71.187.125) by PR2PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:101:16::21) 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 12:12:57 +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?SsOpcsO0bWUgUG91aWxsZXI=?= <Jerome.Pouiller@silabs.com> Subject: [PATCH 37/65] staging: wfx: simplify wfx_set_mcast_filter() Thread-Topic: [PATCH 37/65] staging: wfx: simplify wfx_set_mcast_filter() Thread-Index: AQHVy50ffyZ+1pzr9kexID2HJOS3AQ== Date: Wed, 15 Jan 2020 12:12:58 +0000 Message-ID: <20200115121041.10863-38-Jerome.Pouiller@silabs.com> References: <20200115121041.10863-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20200115121041.10863-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR2PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:101:16::21) 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: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 02b9fd2b-5f37-4140-02be-08d799b44254 x-ms-traffictypediagnostic: MN2PR11MB4096: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <MN2PR11MB4096B7C806541A479CB4769D93370@MN2PR11MB4096.namprd11.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:3631; x-forefront-prvs: 02830F0362 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(346002)(39860400002)(366004)(376002)(136003)(199004)(189003)(85202003)(66946007)(66446008)(66476007)(2906002)(107886003)(66556008)(1076003)(66574012)(64756008)(5660300002)(8936002)(6486002)(186003)(26005)(8676002)(316002)(81156014)(36756003)(52116002)(2616005)(7696005)(478600001)(16526019)(956004)(54906003)(110136005)(86362001)(71200400001)(85182001)(4326008)(81166006);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4096;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: 4MavCGGu3CReDAA87N6vK2Tu/JIizp7yMGPem6VB0eYDzD6cxbAI2vBkgWpNwhRVGvS/EIjpg/nmhhAry9WaiU0I8JHIm1kSbill5gKUnQyivLtDJ6nBRrXZIkeXckFGl5s0+3rFTAkIDCdCJN9jyqysOfQS2NTMv5uvzLrv+lwfj4BwxKm1+cUXn0DtEZOf/lqCzqaM8rVyHV33t5OBHNzUFXXuRisb8YgndtEoupANtiWJ9tqA1gUTnWJhXiVxY+rnsTmGGldyE0ATnwW3ciWqFw7q7KaeZBRTbQCrAsC0tUDnTW48b9EdTZRsyqudVNCeCkETusYgMATtt5v8/vFWqYmFJavAbucywx2Toin11H15xjfnJuJPG0l89X6/irlNFWSRr3ulE5KqLrpRQMi/vg/O0xIpjkkjAQfzELVjnjY2cN7DsZIfIBMy6LpO Content-Type: text/plain; charset="utf-8" Content-ID: <A04B25D8678C36479DB6BF62394E3711@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02b9fd2b-5f37-4140-02be-08d799b44254 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 12:12:58.3898 (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: d1drJ1rc7yBYXSAKNQirHJiFb8WnXYzAIr1upGkqansa6n7zsHmC7GiNvjDCeopEBkU/fDmDZONJdQfUYUgIow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4096 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 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)