From patchwork Mon Mar 4 15:42:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr Figiel X-Patchwork-Id: 10837979 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B0261399 for ; Mon, 4 Mar 2019 15:42:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0724B2A56D for ; Mon, 4 Mar 2019 15:42:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EED4E2A5B1; Mon, 4 Mar 2019 15:42:50 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 83AF42A56D for ; Mon, 4 Mar 2019 15:42:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727147AbfCDPmt (ORCPT ); Mon, 4 Mar 2019 10:42:49 -0500 Received: from mail-eopbgr110049.outbound.protection.outlook.com ([40.107.11.49]:32896 "EHLO GBR01-CWL-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726649AbfCDPmt (ORCPT ); Mon, 4 Mar 2019 10:42:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=camlinlimited.onmicrosoft.com; s=selector1-camlintechnologies-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t06YGanGCa27kGiD965O28qP4lJJ24kou98nX/RDVZk=; b=mtQmC2vU/xtqUqnw9hcvjgthMjsEapDyJ1XWaNCR5obyaLs34AqhuBHL/deNpoomEpSVJ6gJjrk8ZjzsIwfobnRbWcdKPTeCVsJcLukZa6KEkhSscIs5qkpuRrFd3CZhgxThXrbTAl0vYhjSbG6qVhPT0rWoJqukX+KFrNHYaNc= Received: from LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM (20.179.129.83) by LNXP123MB2060.GBRP123.PROD.OUTLOOK.COM (20.179.128.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.18; Mon, 4 Mar 2019 15:42:44 +0000 Received: from LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM ([fe80::396a:e27e:d5dd:6bf0]) by LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM ([fe80::396a:e27e:d5dd:6bf0%4]) with mapi id 15.20.1665.019; Mon, 4 Mar 2019 15:42:44 +0000 From: Piotr Figiel To: "linux-wireless@vger.kernel.org" CC: "arend.vanspriel@broadcom.com" , "franky.lin@broadcom.com" , "hante.meuleman@broadcom.com" , "chi-hsien.lin@cypress.com" , "wright.feng@cypress.com" , "kvalo@codeaurora.org" , "brcm80211-dev-list@cypress.com" , Piotr Figiel Subject: [PATCH 0/2] brcmfmac: fixes for errors during USB disconnect Thread-Topic: [PATCH 0/2] brcmfmac: fixes for errors during USB disconnect Thread-Index: AQHU0qDpEjb5Q2/02kKwExcOG90nPQ== Date: Mon, 4 Mar 2019 15:42:44 +0000 Message-ID: <1551714128-27412-1-git-send-email-p.figiel@camlintechnologies.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [95.143.242.242] x-clientproxiedby: VI1PR08CA0217.eurprd08.prod.outlook.com (2603:10a6:802:15::26) To LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:dc::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=p.figiel@camlintechnologies.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: deef259a-977d-40ae-2376-08d6a0b80b6f x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:LNXP123MB2060; x-ms-traffictypediagnostic: LNXP123MB2060: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BLNXP123MB2060=3B23=3AJs?= =?iso-8859-1?q?/K/wJAYddiOqPVm4NWVam94bylRY1MhYfV+EmflMiLr4pgQG0+ZLUMabW14f?= =?iso-8859-1?q?VGpclok1RonhdRi/tUD1I4I960W+MKbMdjBajQpXt/48N8S0jJjuPWzVRR3d?= =?iso-8859-1?q?TV23rFfhwISckGaf8C7JLod6DqYR6zIBC0ZdoviD/6tsnLkkNChmQcEMrbxM?= =?iso-8859-1?q?sbL0OWo3EzAVg3ptNhG3r3XdiALTRvJ9D2jdC6rKqhMD9zZkFr8c/K8LnLdh?= =?iso-8859-1?q?RUK+8YX2KYiIo6rhWKWkpnLP8X3rCfrXxLJzCGcx9V64WdkSuuYsCwImWFYu?= =?iso-8859-1?q?eOAUpfIJ9yFiCZjSTAjA9P5R7Sr+lsqSSzcgi9Yr2zH+8sR2crPdKkE7S8Vv?= =?iso-8859-1?q?MgWQf2SFjTkfDfEX0RM3GSx9hvdJBOl9g3IL8C1ytwSeGjIDSiHmETnOdwgU?= =?iso-8859-1?q?FnClXJwgBb6f8SlltzMBKM3EH7KQ59e3u6SNiJSMN3rgE7DQJ58OffbNI8Te?= =?iso-8859-1?q?wtZ1EhxIfQ9PGA54gdU95Qxgbrk9miaQz7CrDST3jj3K7TVrcrh8Ql8tgfTx?= =?iso-8859-1?q?RNLc0BJiw6c375BhlmmQfTGO0A3iwp5vpPXHoMk1JZN6qqYCI5SOlgDvLZIn?= =?iso-8859-1?q?7IJrrpUfXyhuW1G8PPzZDLQj3m94rN0gWDzQLIO4Je2B46/r1el7qJHN4H2l?= =?iso-8859-1?q?zhNvXOwPsKxIsJHeeIheOci8vy53HDYEieVGVcNCt//MRcN2nYHplmj2O/83?= =?iso-8859-1?q?WEkP34/HWvpQsTnKr01fgHGd0YT25pgAxFkVOyM+VdGve7LCTCGwB7qDiLT7?= =?iso-8859-1?q?nW1gQUnuHSanmDzFC33uG16s4RsNhP6V1RU5v+c6ivCRQmjwkw+vCh5W7NqE?= =?iso-8859-1?q?98QI8iOQQSHiLvdQmy+4ufPG11ZEFoPoH5xCQ4hr4bkH9+narlSKoiqhPI+u?= =?iso-8859-1?q?AHpvp3/vQsQ8WbNYjL9JFMwTMUeE5V+sPMB+H2+kBY1Rks6Q+Qkw7cH9wqk9?= =?iso-8859-1?q?CD23uyyMUHguS3C19H1aZz3ueEiGdOYe5ldDGo6w4iB80o0xK9x4I/rcifvg?= =?iso-8859-1?q?w1d5ULTZq/ycz/KbbjvgR6kot2a29tokYA7Jzp6obi5NJ1H8YiaO2P1xGTyQ?= =?iso-8859-1?q?D641LsqK74YTuE2AhJQC9bJLcf2C1YmzWIeONrLpuEh3ksilHDRjdZL6grsJ?= =?iso-8859-1?q?kw3jsYcUh4Gky8FoyUd+jI16DFl+5r2Y/YYEbBnxL6vI9CNlPv7yPuYqjB3Q?= =?iso-8859-1?q?MT1aB+6E1QcxBJDE9L6nbc7pqrD2Oo81PINA=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09669DB681 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39850400004)(136003)(396003)(366004)(376002)(189003)(199004)(478600001)(71190400001)(71200400001)(8936002)(107886003)(50226002)(54906003)(106356001)(105586002)(86362001)(14444005)(256004)(6486002)(81166006)(81156014)(5660300002)(4326008)(6436002)(53936002)(316002)(8676002)(36756003)(6512007)(14454004)(5640700003)(66066001)(97736004)(99286004)(6916009)(3846002)(68736007)(7736002)(25786009)(102836004)(52116002)(305945005)(2616005)(386003)(6506007)(486006)(2906002)(2501003)(476003)(6116002)(26005)(2351001)(186003);DIR:OUT;SFP:1101;SCL:1;SRVR:LNXP123MB2060;H:LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: camlintechnologies.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: G2zuaEq8wdBpkngo/jt15ABRfhd2r759PXU0l23ZALksm9ol4jMmd+lvKzi5smkcKMz4N+4LWrekQDjkD9fs7309So1DkGTikih9gZqW1AezaIveAgLsFcdWIqwSoJ5+TL1BSx49+tZzGGRjs/1aIycMzawWMjD66tCWKybiaS5WjdPhepOxvYH9XruyWEl9gn8iXJvhqzv2Xn7lFfJAl4HpRboFqmHkhsCtyKF5LUeZqIv57UZY2UUn91bP2YOIgK8eg9AoFzkAB52BHvV7vBNWsLb1/y3itQzPd+ZnFLN6/LDrp5asZD28zvrwLuCQ0/SggtWEeZu/s45ZbCLCY5UJ7IIbE3/v2DCXEaPGiIAdOUWob40YxadLzGaMmRna8ktkY/MUYFQpU7qkAboRU6SiSTCB6pYzx0sdWBjaAXA= MIME-Version: 1.0 X-OriginatorOrg: camlintechnologies.com X-MS-Exchange-CrossTenant-Network-Message-Id: deef259a-977d-40ae-2376-08d6a0b80b6f X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2019 15:42:44.8685 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fd4b1729-b18d-46d2-9ba0-2717b852b252 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: LNXP123MB2060 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 During tests including automated connect and disconnect of the Raspberry Pi WiFi Dongle (USB dongle with BCM43143) a number of issues were detected, including a WARNING and Oops with NULL pointer dereference. With this patchset an attempt is made to fix those two issues. During the test the interface was configured in AP mode and the traffic was generated with iperf3 in a way that AP was a transmitting server at the moment of disconnect. Note that the patch was tested only on the aforementioned dongle. The issues were initially detected on LTS 4.19, but were reproduced on wireless-drivers-next/master and the patches apply on that tree. Piotr Figiel (2): brcmfmac: fix WARNING during USB disconnect in case of unempty psq brcmfmac: fix NULL pointer derefence during USB disconnect .../wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 11 +++- .../wireless/broadcom/brcm80211/brcmfmac/bcdc.h | 6 ++- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 4 +- .../broadcom/brcm80211/brcmfmac/fwsignal.c | 58 ++++++++++++++-------- .../broadcom/brcm80211/brcmfmac/fwsignal.h | 3 +- .../wireless/broadcom/brcm80211/brcmfmac/proto.c | 10 +++- .../wireless/broadcom/brcm80211/brcmfmac/proto.h | 3 +- 7 files changed, 64 insertions(+), 31 deletions(-)