From patchwork Mon Apr 27 13:40:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220501 Return-Path: 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, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 9033DC54FCB for ; Mon, 27 Apr 2020 13:41:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 661B5206D4 for ; Mon, 27 Apr 2020 13:41:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="oygfM4Gx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727891AbgD0NlD (ORCPT ); Mon, 27 Apr 2020 09:41:03 -0400 Received: from mail-mw2nam12on2071.outbound.protection.outlook.com ([40.107.244.71]:6160 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727844AbgD0NlC (ORCPT ); Mon, 27 Apr 2020 09:41:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oWScUi6LTxJnsK7J9zglDRw4ITVfhnE2KljLit5Z9TnBo6td0dBqiqwEY6a98xn6XcZr7a8+U93a0VHbrR4OnuWiXT8Ds7XDUKQz1ZOZ2CrnD2XnTDEUnhg96Ji4FvhGyAO2qYdRSAwvtOmPjDqkEEIpIdvJ9fmmm7FZZ9MhzPhMF/gKuPiaPFgWz7I3nie2nFVNl9lfjHU3s3b0hsOAlFyET+W0q1YgCLSwsq7GnEzrOv8Po4Ie7NjrbGby5IJO/HkMwpFhVB/JSZT8WP01RjWzRIUMSR7EkW0a+ctHZAZUNR4tcmfA8rk+hlSDcP1d0qVX264EMWRPc5lcHHMxEA== 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=wNn7O+LkSOLVea7vlLN+uZe+zF/6KR4RChRExQDAq6U=; b=I/r3iWoaR3JpJZCqBAIkMj1X8qmeCVqiAdCBlsJGsR1EAODEtKBlm9CZ21UG0Cb335ANZmcQqD68N+gGQBmIlxGslejtwQWvacVjkjkr1nTETPY3nvAoHXfDXOg+bBvjtGtqwNjVuAvrZz10xCgy9V+0C42w8OX3swUobJwphLZ5NCyesn04AzjBnKg1VJwbjmmibm/QqkOTbjrIPpCQ3/4cDHJyct9AwTV8O7s61i3KNPwnj236XaabX/fGl2m24f8sRcKPA6IkJuBiarFbHYbpw6lPmy+BeJA/RhpILL1H0z8r9qMYq8VAXOYVrNkdlgxFrNqyz6fSyLpbCrT+/w== 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=wNn7O+LkSOLVea7vlLN+uZe+zF/6KR4RChRExQDAq6U=; b=oygfM4Gx+6LFVnbZeUrsiauGgTIYvZ89bfElLeNmn4b7U0bOf2aYyKI9F31FSr6Mxd9UlHGgCAH7oNyPs/ObE2HOmLzOJnhlWx8LxAGUXptsNIOSRgWI/MGCYScuCmMWsG714pktQwkQlRakCtorhrgTWTPZL3pjD5ZmcBlBWjI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:00 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:40:59 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 01/17] staging: wfx: fix (future) TDLS support Date: Mon, 27 Apr 2020 15:40:15 +0200 Message-Id: <20200427134031.323403-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:40:57 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f37661d9-c036-4132-d0d6-08d7eab09ec0 X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4326008)(81156014)(86362001)(8936002)(6486002)(52116002)(6666004)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(66574012)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; 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: 2O/UdelLHzAkPrph+RQgbuDNCh2eo6h94npKJqq1lfpeRrFwX0w+PhvdD+C4GZ9fedhqsTUgj//75HfAwXNSDjSQlXkIk3Tt1qduBL9uBRqRO4OVL4Q5E8K8ywbYufpYL8NFfz46e0/GyUhNkEnc/2riBm3ztoNtT1GrI/PC74T1DtmGIxzKoVbOl+WXCj/8fUdL8eYuWzeHg7MFJOxCNf3f5vUnW4c06dv32nVvMH3He1zXmomzEC82h/JxtngSkzCEtff1S+EI+4uHOtVADa1P6stJCJOl1+E7Chh/SsERJ8LWn2v6fgJ8t07GguxDV2MufyrbwAesjFdLbVP2wlMyXQj50STTVzYJPsIUvCkrikYrHfw7F/g02PhEJ6TKYkBUBrlb7CvLo2fnyBYnvjZscnqDOnBDa93H8qK7/ynRuvvOViqzdNLWnvcwpc1d X-MS-Exchange-AntiSpam-MessageData: kktZQnoBN5aoW+do5KAdTtQuZqrF6zErfPtO/pRMHhSZPws3wh4zO6iH5L20e3+FexrdseO179d3lucqEqTQjcU7HA1gvy9J3USjTSSIaZXB7wcMNSb84h16l29rgFrN9gZ6LyQl1YtVVvslvy5pc3whjni+QSD8UM89sRMDWfsNUV115y5o7wp8xjpdc9I49MXpmOpGBJSqMODh+j7y7pZTZ/t1JYzjtYjTcbkyw/U5G+LOWpAZvKH32KG3zTaIP0c11ZmeKLRqLu5RDwbGyrg2HrDDt4htpYGneP6cTc1SNVgjI6umjJiptl06Ab3B+hOd/mkpuU80XznWZBra0S0etCbwPswkOSz921ERw0vrbOQhQw3yk9bqcd7tZqVcI+wtWx7boeGaL/3XM5jALuJX+WrpJQf2Lw77vi6LwAJIep1w3T5PLSezHVo8gZLUQgniLDxxvl0411dfLaj6/2fmA4/EZ/rwy4Ah//jpucaDEDoH59zFee3Tqw286zGNY70VIqcLnmWAiPi8zAbCKO+lwhrhp4SQHYOPtJJ/JadtsCozcIsvkXEc6O+K3MwF+ZunVTqmzmxmLgBtrR7Db9BpkgMy6NwlZ8BGVC5G+XxvAvWaVv0TIAyOtvF4+cAFGHcn4KXYncOrNSQVipcXYSJ20uujmcnlh8qWR+vJQZmVqNUjPeyt8DyZBNaws8yv2ZfInUwiiEMpI4NgzFXrRbmW0DLw3DuWINWHj+xvFdmyfoV0haGCeCCmy9npmNYwSxOWETmPJ85wKYn2hU7lgOqclVr8vFYGaONpIuWF9IV/veWkMf0LuKiZxDC49FiyPg74FhR1/MQcLoGAZzbImFLGSr4nYXOqByr+VhiFZtE= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f37661d9-c036-4132-d0d6-08d7eab09ec0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:40:59.6953 (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: AZK5Xog5eoDBoXRUhbp2FE6vh7Y3Jz5+75izXQGomzpkUdK7UqT6oc0JrWqZv/SfIAglzQz+7hW2weH7VSI5Jw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The device does not expect that the AP to have a link-id. However, TDLS peers should have a a link-id. The driver does not yet declare itself as supporting TDLS. Notwithstanding, fix the code in anticipation of the support of TDLS. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index f3e106f7eeac..2262e1de37f6 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -384,9 +384,8 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, spin_lock_init(&sta_priv->lock); sta_priv->vif_id = wvif->id; - // FIXME: in station mode, the current API interprets new link-id as a - // tdls peer. - if (vif->type == NL80211_IFTYPE_STATION) + // In station mode, the firmware interprets new link-id as a TDLS peer. + if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) return 0; sta_priv->link_id = ffz(wvif->link_id_map); wvif->link_id_map |= BIT(sta_priv->link_id); @@ -408,8 +407,8 @@ int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (sta_priv->buffered[i]) dev_warn(wvif->wdev->dev, "release station while %d pending frame on queue %d", sta_priv->buffered[i], i); - // FIXME: see note in wfx_sta_add() - if (vif->type == NL80211_IFTYPE_STATION) + // See note in wfx_sta_add() + if (!sta_priv->link_id) return 0; // FIXME add a mutex? hif_map_link(wvif, sta->addr, 1, sta_priv->link_id); From patchwork Mon Apr 27 13:40:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220494 Return-Path: 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, MSGID_FROM_MTA_HEADER, 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 9A187C55199 for ; Mon, 27 Apr 2020 13:43:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77E14206B6 for ; Mon, 27 Apr 2020 13:43:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="HfNwU2da" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728001AbgD0NlK (ORCPT ); Mon, 27 Apr 2020 09:41:10 -0400 Received: from mail-mw2nam12on2055.outbound.protection.outlook.com ([40.107.244.55]:9980 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727844AbgD0NlH (ORCPT ); Mon, 27 Apr 2020 09:41:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gk1nkiRT5yPJ1/FwZOzneD7SUjTeuYre5WQho4yg4jHK6qoPWdUDgRTdIK8Ygji6XhhHO+NwOSvy+UYRAUjM7pB70OvNbBQ9NCX2hEhr7Tox1tpScXrCE8yoZeC95ghxG0SqAZgs3YZWiQMpjJdhBsxxxqFgjxP2EHNLWeXc8nNt8RYS8jAy6MrR6Q60hqwQhN7MMxh+T8WG+hyh9T34eUq5oHMj2rLhG7qFZAvYnM2gWk5pPyhWI4G3TM/n+dD9p+HuiNDrbVxbxgdTAXp7HDT+Md4dO8rb9qSSG8g0BkB4zwdA2d5igFrzAhPibYYRA5oy+VoQAkwfK59j+IQpZw== 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=+GxryEBoOR/UFhLpgEEXMeXqf2ZX0cZxiTA24EZdFIA=; b=X+mDhhAvnErGDfjW9GbZH4BOICN2uMBM//+Pptj2mjcUoaohUTkk2AWSjb+tg1KSSaot9Jvp/lv/TpBZZYZ6HGmiR8Xq/LcBByZld6gBua+WXX/7pZoxRtMwWmXjyzZO/QO0WHquot7WjL3r9zvIZmXGMOJH/mviErYudQAm8Lw4CqI77aCqUXaXOzo+jmVmv1YPu3sIKb1R4XNCxHsCW+bYz2CRpnhA1nmNOCaYCVSoxIg3MHW1yCOGRjUiLRimnF7Vv5z2wruVVjzR/v4tKC8FXF5eQzGVKTf/3UOiZLp+K17XaGumvUovqGlzFGRnLySQACkleqclEPcuV3CKTg== 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=+GxryEBoOR/UFhLpgEEXMeXqf2ZX0cZxiTA24EZdFIA=; b=HfNwU2dacg7IlkDqxpKpjr86sNT4SgN4drcItbUQ3XINXZk1tzMkFn8sFuPVWryK/KL1x8IQD9GOgFxz64rBu/QPEtSajFTDF4CDQ6N46+/htmFJ1KK5Rp4eZYPA3n+Acln/HejmlyuIYXZGYsfuIyqgwDgWzSMuNzI02Lgx2aI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:05 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:41:05 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 03/17] staging: wfx: mark chip frozen on error indication Date: Mon, 27 Apr 2020 15:40:17 +0200 Message-Id: <20200427134031.323403-4-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:41:03 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d14050b-f51e-4fd5-fd92-08d7eab0a244 X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4744005)(4326008)(81156014)(86362001)(8936002)(6486002)(52116002)(6666004)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; 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: M1Aa3xMXR/2539ZlHeausStvOiGTprkIdAnB3yT6dtpcmgy3BEHFPBBKmUuwN6zzSSnhiLNuRZuh3ihJer8nrvy4V8mc9fGiE9HamP86tqvMe8ZNL9Nr/1C8ibtv5GHBQi36A0WCNkaB1M9a40wkiByDBu7r4lxGBLDzqTI31n9UimMQioEAGPbBz45ot7CPR3cDzmoY0l+qkkPifQTkXSTquElQP/QnbGWnIpyh08lTpFOtcAhO1va/miKrOhq4d7sru3xsyBRBpUCbBNQc7U5XZsik/UKVTuUM3ioyvnqOZsItiYosF91LzqCnVXthfwzFsA5qzCmIdlSCIoHkFb4//bbmKos7P1dYT7IoRmopZ3SxqZ58LC05D+oamODG2kg9mezKcLlCJnJjq5XKjFP2PbQxt2BKWurzuGul07sfKEeEF89a2agAE++MmOUe X-MS-Exchange-AntiSpam-MessageData: K6LDB0godt2pNvO0BwXidIWEmrIt7qkbbzxDMFonY04WK2yKnsDP3714ATtKrBVsFFlJu8gWkzE56OiQKcldh/bQaFt+F0IB30a8sDvovn6HfIKQxHk+JvHCE4tr3kdBJ6ENo/RrGbKCkTGPnEb6a9GthafGumt2vudqKA8xQano1xO9ln+GADvXxAw82QVvm9pyJGqpP+SNHOdrQOucZp67e6KsrsEBNKeZk/nwrsCvm4P1TIcosJH0dnXPbpHnxU+bjddMUk+kc98GHOv8vLdzEHzpnLAPXdsRS/lR7S9PQA2hcDUk/G6c3pmY2XXHZUjuEAfKhgVd2tau7415r4sQ9l1OlCSIK4l7t0hGTx4MduTCnaRFKe4z9aS7dSziBrMHklaiDyiuN5/7k11bj+7RIStnNf4H8vvsLSm8038I/3SrzDCdEp4h44KjVVRCdmWeEH5S8Sx5ywe5LbxWLtqwI/8qyztb1ZF5Ni5hYyHTumgN76kXD/FfREitLsk9sghz10nnh7A6YRPg9NRWrgMtHppfIjTnZtdEN/rDdlA3WsVlXFDKajbfk2IFYrNcECh6/Kz0UN0+wxdO9PZiyj1M6nO1oxQlWQ2sI3vQBP2ojQgrbDWJOoO1k/rQsZ/OY/D5ZUq5LVTgrlaefAU3mcqdWFxUNC7SVi5dKsyaCedc+hqXs3kUp82A8pKfIle5/om3Fu0vwUzwrsW77SrwD5lozIolxnnNN/TMT8IYjSS9k5Zpm2331Mb7UacEd1XZ4lnpYuKOmPwatcgbaj/ihpAzJvIPlmcw/Csx2OHhaKpbTGmeYZrHMDrIFfdco+JxyG0UaqK9zYE1AJ3vfwjX2FKtfG4s7YxlbzkLui0xyKc= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d14050b-f51e-4fd5-fd92-08d7eab0a244 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:41:05.7606 (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: j2GEOGWkHymZdAzG7ae1oOb1ECwAQJ3+lH1eImD/lkz7LxBcIeFhhQtK/frfAfgUhFFr5NNJ6QqA5wV5cKlubA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller When the driver receive an error indication, it means the chip won't answer to any command anymore. Therefore, mark the chip frozen when it happens (as when the driver receive an exception indication). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index b56138fef0bb..6dbe289a368f 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -276,6 +276,7 @@ static int hif_error_indication(struct wfx_dev *wdev, body->type); break; } + wdev->chip_frozen = true; return 0; } From patchwork Mon Apr 27 13:40:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220500 Return-Path: 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, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 7FAB6C55199 for ; Mon, 27 Apr 2020 13:41:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59DCA206B9 for ; Mon, 27 Apr 2020 13:41:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="YVwmDjdh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728047AbgD0NlQ (ORCPT ); Mon, 27 Apr 2020 09:41:16 -0400 Received: from mail-mw2nam12on2043.outbound.protection.outlook.com ([40.107.244.43]:54528 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728023AbgD0NlO (ORCPT ); Mon, 27 Apr 2020 09:41:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fLi1NTJC+bmMOYJr7jR7cgCFcQz7un5Gad0NypAJilKHN0+RrPFKpmfUULW/w2YcLpUswWk2jkRwFl1wSj1ODbTEAdHxYVIOQPMFUkT9QvcnM8rlVi/nVmRrBcE79BkQYHwZOc1JZmuDWIkv1pDxKGvl7ITNPc48wQB5PBjzWeXZmp0QbrqkAKZ2vAGkjfXd6zQu/LQ63N65ZVAaA9JsKgK5XrtAFP3+3HkbUT5/j03aq7+uCQkJ32wKi43yd/UCCxKZu479FXMFmFLdaWY+0xZwlPf+pVivJzz00ulsiTSDc1Kewd92AJAjb7IzuzaWduRqmXcdAEaMXISn8QrXXw== 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=wwN1CSqxAkNpNx9GcjrtNvXNAKQ0nmOQLgVi1ERHmhs=; b=R4bLtpt6+ivDpYySnwOOJWicerD86s4bqrfSmJdWSg2mNE1bJlc8Pkg7pReQqykC234p/YF5YBPWX4kMRQ5bM5+CgeMh1k2qhryraVMHUAgRRPwXgt4i7FPTK2rUHjO7Z/8RMJJA/YXgFTHiRFt9xLXje5p99P70oYZyjJS0RDXdhgyunZIhhklw7k6rKIMdIgh2F5MVHszxu2v4by9fHL219ypHYgnInB3PjEXdCBGEL8b/gMBMyUHx3zI1GIuMau2RBQf/cUrJgEF0UjCmqJk5IUBb/WGwr1m3U2s5KUkZ7KBodCt4rqzAy+ti2lzTzK9BdxAkX/P4ovJXDKGUbg== 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=wwN1CSqxAkNpNx9GcjrtNvXNAKQ0nmOQLgVi1ERHmhs=; b=YVwmDjdhpXYyKHaTSepo7FwTDSV/gaE+/FgPGTnpqlaCYhscPTO/JI011JhAFcjfmanEmUwvI/HKsiYiwpw1hAtArwu8vi9TpakfZ8PY8WIL+5D7aB8j/5s42ddUz7a+O+cMJiaCVfhyz1+wjJxiCWL9gs/sbw/z+IExYQ7gyGc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:12 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:41:12 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 05/17] staging: wfx: fix CAB sent at the wrong time Date: Mon, 27 Apr 2020 15:40:19 +0200 Message-Id: <20200427134031.323403-6-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:41:08 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bf205ff6-e2b0-4d51-1dd8-08d7eab0a630 X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4326008)(81156014)(86362001)(8936002)(6486002)(52116002)(6666004)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(66574012)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; 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: gR+mlpNiAwzNikdEssHXPT7dx4GD60dgnhWUnHxLd1VX5deMINNj2fCuIY8VGrlf/XR08vxfu3rF9WOLYKL0S7SaKXJllHvKdDOv1/m1jBulKUOdeTGRrMEL9k31qBOvafM/KfsioNmvLi9t/hdo0lNQzvjXAd7n9zypzj/kZoWn3O7cCdGGwluMbOHXHNhX+FwX0bwmfTc92HS+Ee94fxCSvPZoDkVzgv4XFCm0bweAruE82LIE3iMBfjEuNNAFbVtH+t10pleUnNSb+drfw+BS0IdylCHhovfo5toro3fFz0briRnzp9yyWAotuyeKQcZzVogZG1hEbP2tXaq3fmUDlWGUpWkFxm1Z6Sh1em5wkLO++2WfQy30CXyOrkCoN44ljPsra2JoE4P0Aty4QCDU6jnSoiDzQePe9PrhmPEiG3gD/DXia8iFsSR1kKsp X-MS-Exchange-AntiSpam-MessageData: 31ig2v6Gry7xAuRmP+EBV9VBwuuMOau7Cens3w7boQ0vOaaNCh8c+AUa/EVGL9fMflZYxdSr1X0ePc0BPhYzy1AxWQF3suvSqGZNifIS+gVi6iL0RIGGOI3XFDGBv/dkniZbexwD8Pp39mlRZkxfx7fbmy2BcTtH+mQdiGFGUlDcyIYR6oJXm7ANYJLiGuW8QTa6YX7TKtfJzEn+/9QRCBiFcfbGUqnDVddRkP1nSfUAANvwXDhikXf1uKwTHsvxieAN7WkCQAA92ZSd/ogKfFHFpc9PTxdAPUj7wqjGlv77Gx2KDxPIKLmkpkiWerwnKe3I+LoE1bsW4V3PNSGG57LdoPcQkCuwccKxknT35Y8IrUA/ClHVMgIESjpbi01gc/GDY2Qv6PX7Z8kieghC8yCtqJ2MKRHtudv7ITPX7je+F7JapRxoYQjB++b1aof+1GVnR9Cg0ec0TquMyyq70deB7ue+6bJ5PGVfAheZ42VDWW7MVF/Zg7kmLS0B9Gxo6lRoHMGszF/Dtx/WBs+nAy6wvuxVZ+AmiY4WwVHlyjUNwxTPzRkjQcULLjrCUzyGZsRAtDFJizahmh6sSsP0uz0HzJdznl2y2rVjPBVX+TqDy0UK7iGf1jYu9zCY6CQHfv+eEz4DxIxyvWxxtnyZU9CiPPnQIm4mOCD1cXeLeCBoQsgWVS9uuNyXWUVACaA1/Rwi+Mft38WuL9TxlxGiwb5W4P45lD2U6ick9kkqax45DaGt7JMVpeaKMruMsvipqh9DEKAIb6GSD3hTeQGwM0StHTuHZIL7HNR3CtroZq8EFa6tmZRNMB0OorUklq3a6/WfwgQdIp1cDQBQZ85zMRzQlD//AD8t2sTGgB3uqRA= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf205ff6-e2b0-4d51-1dd8-08d7eab0a630 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:41:12.3327 (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: Eh5YG+fAMyJwue/uJD54RNBnVFtwL38J8jWZ3ppIEh+vMdVQeTHoRVZDFZkC6jmNjGXzljvIl5tohtMBLTU1Vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller wfx_suspend_resume_mc() is called when the device is about to sent a DTIM. This is the right moment to enqueue Content After DTIM Beacon (CAB). However, wfx_suspend_resume_mc() is also called when the DTIM period ends. Until now, this event did also trig CAB. Note this issue did not have too much impact since when a CAB is sent outside of DTIM window, an error is reported by the firmware and mac80211 retries to send the data. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 77d5ff17a59a..5132c19e0367 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -641,6 +641,8 @@ int wfx_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set) void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd notify_cmd) { + if (notify_cmd != STA_NOTIFY_AWAKE) + return; WARN(!wfx_tx_queues_has_cab(wvif), "incorrect sequence"); WARN(wvif->after_dtim_tx_allowed, "incorrect sequence"); wvif->after_dtim_tx_allowed = true; From patchwork Mon Apr 27 13:40:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220499 Return-Path: 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, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 D41BCC54FD0 for ; Mon, 27 Apr 2020 13:41:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACD7F206BF for ; Mon, 27 Apr 2020 13:41:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="OE+laAYx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728105AbgD0Nl2 (ORCPT ); Mon, 27 Apr 2020 09:41:28 -0400 Received: from mail-mw2nam12on2070.outbound.protection.outlook.com ([40.107.244.70]:26405 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728057AbgD0NlT (ORCPT ); Mon, 27 Apr 2020 09:41:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h6f/IKkPNzsyGecOBcTPPdkIrzojNwDUHIs8GeT8e16DaNZPf/+io4dxKnm2V18pWL0Ig4Wi6v6rAWZAYYLcQEFrME6DR7PdjhQK1g91KnJ4PO9wFqD/ValZYuA2cwhXLapo6rnEC/S3ms5vUyFsZsV1bZdrkt8alb/SvIB8T7B8n3UXNkYrhNsneQsMcIpdKO5RJYk0vAqD5HeESFoEa6fRVUo0ZcJCNB9Sbxr/yRCzhUyDu1vd6mRZiEcuNk0I9rpjycZcKhYNeKfwZnZ58GUTt6KMNKjO+2enO+XPipAeyHPSnUuO5CXSxKJVu1Q8iHCTtv5+9PdkLpnWWtSlkQ== 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=Ls12IveF/ET4mH1NJA5R84/E6bI4tj6ugofbKWmst6g=; b=FjXz46DJeLygf39RSuVhJBJPJ7i9XLnRZVGZjGYWGuIEO/kB7rpac5GguX0TGmB3l7SIj4CFunsKdtOLIDrKeTvaS5SNME+TDPniUXfciXeZSwB+3VxVwjQsINu596hJMKgbH1FVYJ0Xie0j0UASzMi+BeVXuEG3JzP/BSEDphDuiOC3OPsspQMbxUIZkaB+9aPs2pFBbW3wnlc2jQ8SxAUFblis/FD6qr3/lZ8RFVDloAHxiuA31yH3qbLZ1sew2wyxPPVj2C2onp/PszInYhgXUGNn/Way2NOgWeo6Q2jv6/mipRgQ/ch250g3m+Uht/5F3fjFV5/hTuG3PUr3bg== 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=Ls12IveF/ET4mH1NJA5R84/E6bI4tj6ugofbKWmst6g=; b=OE+laAYx1zVoeLwpuTaFG+TJjgyHLDKHHyFaATSrnnAc6SJSGIFTF4sem2CS5NAaPa0azR8ubvEItTzaElCqWXMw2O4kPIJesx+EmeVBA3zjKnDZjbilhTfBjBQh2MSGxMypS50mECU+g5MOUU4jn9Gp1ugysN/t0E0jXVW00cw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:17 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:41:17 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 07/17] staging: wfx: add an explicit warning when chip detect too high temperature Date: Mon, 27 Apr 2020 15:40:21 +0200 Message-Id: <20200427134031.323403-8-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:41:14 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d7b5a36-3022-45e8-2c9b-08d7eab0a934 X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1417; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4326008)(81156014)(86362001)(8936002)(6486002)(52116002)(6666004)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(66574012)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; 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: pcNnUOaV36BM1jTS8xlEBIv5aeslHoLXy00PHYUsLYAULeUcbqThiHhJZnBJMOgsHyJ4YgWnk/Pc7sXg1InofviuMXPkJC4Tb+5PU8EtOo+e//ymM91Z09THzOmpf3c+37284SV9aoG9OlgGIi4wj9r/eIt3E9828zh4cqS5Q8x479olOVLfgj+tEFAPwqTdAbt8Kl6a0m2a9XZJAxDNDrjFSo/J2+qMa1imHyIo7o6JI9IRhQ/FVfp30li1aq9uOBWroTwnq23QLdC/UJ0sm2pIYWlV29SgG6b3rMXHQvYY89k1kJhAKYWecv7XR+uUdd0WmCUmvuaC3UkhHgZPRmRQkM3odk6Yv8rWa/jMbuiAM86gxGJZ1XBuCoh2m5wALex3fHRibPkB4oVajRT0R2b0rVMWa93bHxZaSou3ES5LyzOJHhVNQtMvfnVbr2MR X-MS-Exchange-AntiSpam-MessageData: kfiLR5kjbtrYUfkMQUdsiZ/GyYYlmboWYwR7mk+HJ3KnoX1REOiJmqVCLOZGgLdtgv+hxtRwIjyRjaWWKXRVHbnjjw41Rca/DVfRrqe0Z50mW8qrCB5pcvlI7ppDcAWwdESH7r91PWaE8Vcbv5+EV5Ob+ue0pXZKPRwtX3u5RUK3BCs7qY6se9yIpr+Uanz3WIxCbAsX6DPqrr9BJlOaOeMO8gmQcMLpBdn414neuSBJ5UxoHip87dKYCj3yTyT0F58WTdc30lwGGKxilzCBit82EFkBMaq6WuBWbmjgcFktwI2XDgZE1270iF3DaZvF6WnjpLtKQr7Fb49xLUxZZEUXVJ/UfCSrphNDwcJWfTIAUZeEnL6MntPcz75Xs0BoMj9T3m9URd4qBIUTwPlVfjgfiyG22On3+8yJHsGz4QvxDwPScbVPjLv3bD8Cr3634Fw4AVGBZkOLr4QGNpszesb/vUdxo72NJWxUDn5s8MOTa2wNUlzGaLyM61nK7iezf0MDaJwUsZUY+YbttzWv8oZI4hoPgRg0Leyvu38qcTqovUAUBp1/XRAqCaE0xKkfU27ZwIEr87tVIetZFa0d4hDFUf5rg4vp4+QPd46WdcX32IMjf31PydYfisv7RbqiyVNhvGVXbyJyeDO8CHxexFiauBSO7aDMLc4EReu0psfAW+UrzaeZFIfob+ehbXEn/4SZd/sdWbj/wjQ371XzAGz2oBGvtKw4pFnb9bjoNogeWWmcXJl99Z3y5lmFWPJeqHX4wngdAY0FGzOH9eeMFkxHQyDDptH5ZL1UBvcrvIPYmAZFzshJ+sE933MJlUrZLeK8ljQj5F5Zc+09eDP5h2T4Wo6SEPiPSpRhgWpVzdA= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d7b5a36-3022-45e8-2c9b-08d7eab0a934 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:41:17.2026 (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: g/FwydEZOkKD8L2Z/5PqdZSCkG5j6ekC9lvh5APibOwXo5J9NpoOIH8E9cq1IoXhLWLA9DO2eM2JjMz+Uy1vJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Device is able to measure its temperature and raise warning when this one is too high. If the the temperature is even higher, the chipis also able to send an error just before to stop responding. Until now, the error message was "asynchronous error: unknown (6)". Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 6de210139d8a..e6daac36f5c8 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -280,6 +280,10 @@ static int hif_error_indication(struct wfx_dev *wdev, dev_err(wdev->dev, "asynchronous error: out-of-range overvoltage: %#.8x\n", *pStatus); break; + case HIF_ERROR_OOR_TEMPERATURE: + dev_err(wdev->dev, "asynchronous error: out-of-range temperature: %#.8x\n", + *pStatus); + break; case HIF_ERROR_PDS_VERSION: dev_err(wdev->dev, "asynchronous error: wrong PDS payload or version: %#.8x\n", From patchwork Mon Apr 27 13:40:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220495 Return-Path: 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, MSGID_FROM_MTA_HEADER, 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 CB979CAB360 for ; Mon, 27 Apr 2020 13:42:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4E2A206B6 for ; Mon, 27 Apr 2020 13:42:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="ce5Ohdhf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728090AbgD0Nl1 (ORCPT ); Mon, 27 Apr 2020 09:41:27 -0400 Received: from mail-mw2nam12on2085.outbound.protection.outlook.com ([40.107.244.85]:27104 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728039AbgD0NlW (ORCPT ); Mon, 27 Apr 2020 09:41:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKEbyalUu3uCswzX3SyS9H9CwFiTZPf32suLvOvIm55iOvb69Q6KZa3BlIqstLtFgdpQjGMyBIcs1PjX0tJI1jjUcDiK05btlE0i4XnYy97sxwZAYQG9NfZf9glFcNBXA6q0VBSI8vOCz/kz6LUJOUetNwoo7+RudAYUCwEK1BTQrvk+1+xrPkXH+dfZzNesR37o/VPPEWA9SSkERb9+6Fqh7a0HgnedcfOtqn2ALnmwnolYSOiq8MxbIA1DBgqrYfMmMT44txuyrtz3s+j6Y3WXhX0l8khcL0fBlM4TTFHyc8TKpCRLW8DfG+6XIlV4+8iXrQv3YaILAqYD3JiXtw== 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=ArHefbqV21SB9u1u11bvJ2ldj7JfEtPQEMPuhZ4pQ5g=; b=I56hOfbq4TrBDzeUhsvWIxUabhqJo6wprRGXXV+UOcPMXRWyi/NqPRp1Rf0upKMxzhIIQ4Ncx+GXaJldmhHBtXQ7Y5xOcYpuYitG6k/l5WMU6PcM9JYvatDQJGU83B+FHfJVsOs/cbvOeCXyt8Aj+yHGX34Ui+s75d/ik2sVyJju3PsIydos0zndBzqQVIw1FOspauxNBXQkBj9VYFxOpJjs+4QivD/gI+bABg/5QLV4oVIyg0V8c2rxYzY+r476/hfZUEgs5ayHMjeR+Wn27m/q0rLGAwy9W/4A4kkYlj3f3P2Hlzr9y4pMnc6BKd1Hcm8wj2f2pAt38LdlBKCKrQ== 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=ArHefbqV21SB9u1u11bvJ2ldj7JfEtPQEMPuhZ4pQ5g=; b=ce5Ohdhf7qaqf1df7or0N+cFDReMdZbOsXErFJQaaMi5U4URbiBrv0hIGhak8drqOYnNq+cQG2jK1E9GiVVKeaKA4bn+zGDE6vIJQqqnTegtV/ucMNRRTMdcLb+3mYFaOFLAe6dEtOQPXx1fuRnkNPwhrh+AzxioFT+bY6dWjqs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:20 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:41:20 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 08/17] staging: wfx: fix highest Rx value declared in ieee80211_supported_band Date: Mon, 27 Apr 2020 15:40:22 +0200 Message-Id: <20200427134031.323403-9-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:41:17 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3383b784-e967-481b-15d3-08d7eab0ab25 X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4744005)(4326008)(81156014)(86362001)(8936002)(6486002)(52116002)(6666004)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(66574012)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; 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: Q/1XJupTjPYq0sCCH0R44mnao4/5sG1nGuuechHGjbPeLF4rNE50gMz4Zg8MXsPXweFj7e7pBDdbCfyL5RIUkgZBLI+4rhdDbY9+9ZYhvp0GxQ8SIOrleE+WSuhPFY+4zCiNQL5+47eS2mIN6bkvdkAwE7MuEY5i7TVTDm05LDErbaIEdtWfUwwH+QkiyRla1Yn7t2Pl24dAXFfti0Ba4LO4y56/hoMRExF39XWLd+o1AwBduejGR//Qd452I8Wzps64ZcTnQXypAmvhi6aF3Xo2H4xRv5JXflkPGt2OnLz9O8lwhNeH2AShTqDEs5iD9d9wI9349HovU/vU3isDLKYfGOwaEvylCdc6qF58A9of3gLQPbKBjhq1jcX36m+76ylAbiSCkGYVxDH0niKNnPR3CiQ61rWAdYv5KUiIzn2W4GNMWHpYEXQiyCuIyBhM X-MS-Exchange-AntiSpam-MessageData: hbqOdKH4fSxR0R8Csou9gs1K8E5bRbnHedGm+rB446MzJuuMtLt9Z7DRosxE83acHqouh14xl+oWej6OIU+NT3gqT9Pm9+m7dvqSJb51fMIvTADzVH5yDF/R9hqF3/GgeoocOMy+TCOTHz1pxyONckXLLe6cWEoBuPFtoCoF8Dj2pnxzbiNWbxH49vCG0L3J9jBL26MPTfkko1bBC+L1y6FBkPwLoJaR82Z8MIJjc5AOwkR1zkukN/j7DiJZhmMaNCc65LQNFVL+2QDHaF5TwEzVHDU1iQ1vGoqfsmjkoOjRpdIyP3hvi4KBl4ZOhbdbFi+FSrCUPcYusjQL+/EqnuHyHXx15FMkEKWM6hagYz51GR1AESNyKWrtqT9RZQqQuU/lIk+8aMR1RRSNqo9uNyG0R62u494wpvnYQUv+7hFqcqYlXzi/kB8QG5NNuHnVgLK1wIeHFL66Xt77r8ReQ34k0R6rR1fkSMCxxip+barbDxDGNtQeVeEIhKqQT4H7VEbHTPY+DoJcENt3rShvR/3eE1a5odlOzDn5MKZyMfJJesXPMGJ24QLsuHNuifM8DJ8f9lnKyP5zSPnVAEBp8vQ0fmL7HAYGUCG7IAVm6tLPcxBuuYIt8v6EMhNb5VE2KQlTfaj1cYyqoPrPj77tx7F4IfRk2XAbyLfxoK8cwBYSojnMAlyYLa1ng3LhC6fyRTGh5IC9Bfuf2YJIcWpoUrX5qavOcMACDUjFUCQdB8r4q6oT3QWWn3MG2L3yJE37nkKpkfvy6wI5HuyokoqGwnM0DTjRlaMlfXdpMjKM0ZHg0xOVJxjV2Fn7ZvfqjnJ8c/1tIkRzyPCHOsxHWpw8d+MysDeHrTWz7PVUFcyBYrU= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3383b784-e967-481b-15d3-08d7eab0ab25 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:41:20.6990 (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: AZ/HkmTCTFLt27RL1TbCOaOKQpv+jsnkJSnveze61ptkiqn+gkRLiQyLwiu89goJUdF0GHbkkS6JzV2+cRsJ0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The highest Rx value declared in ieee80211_supported_band had two problems: 1. The value should be little endian 2. ShortGI was not taken into account. So value should be 72 instead of 65. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 1093584373ad..742a286c9207 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -106,7 +106,7 @@ static const struct ieee80211_supported_band wfx_band_2ghz = { .ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE, .mcs = { .rx_mask = { 0xFF }, // MCS0 to MCS7 - .rx_highest = 65, + .rx_highest = cpu_to_le16(72), .tx_params = IEEE80211_HT_MCS_TX_DEFINED, }, }, From patchwork Mon Apr 27 13:40:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220496 Return-Path: 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, MSGID_FROM_MTA_HEADER, 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 A5033CAB362 for ; Mon, 27 Apr 2020 13:42:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C1C0206B6 for ; Mon, 27 Apr 2020 13:42:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="L0j6BhRP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728130AbgD0Nle (ORCPT ); Mon, 27 Apr 2020 09:41:34 -0400 Received: from mail-mw2nam12on2085.outbound.protection.outlook.com ([40.107.244.85]:27104 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728091AbgD0Nla (ORCPT ); Mon, 27 Apr 2020 09:41:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AB4+yeYtRwBzvo0O7f/4Hkg8GeF/FB1HKslCgzbmPWmC12R7KUGlscVR85enPWGfXLnd1nKwwDozfp9/sSeFGHeitNzGR3XQ5AgD2TA746fvyYqfuwos3z4/X8DymC3+HkyntDzEDQ7JX4np2/gz9TIjpX6naTbKBQiQzvarCCSIexVq85jRgeTAymgU8HeMylz7XSpOVHTjsa6OFiBhmSJHTZdizcJStiRjAZbCBeYQb8d8bAU9i7GEyXOXic7CkfUjx3rFhPel6oHbd132Ktbu4IdfhXLE+6IqzmRq5NAqY6C6UHVaBABzbf0t+WJc7Nkbr0qaChsKt2xu7eM6UQ== 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=GOXpCjXjNn0vmAehZaXxc39KhoDaQOMwOW0WJM7VOCQ=; b=kKwlFnqz4d8y4wOzNEvuA57GlF4bcvdNUiqUMa6kL9H1wv4Pa8TAXfUnL9HjzDEi7o+nnx640a7Fq5TWqQFb6s3mUpzseO/hy1ISMtWpyE8Lx3ZnWHyLLXQF8x9bSW8wvYwpilwnzb6J4Pc/ZO1VtoiChmfGqn41Qkh4swTI4Ww4uWLpN+Lgpf1GbfMrcs2ciLFxBYbUnEOZ8bL8jBGOJ5Y3phLasBwgpzDmHZnYk4E9RzdDUDjeDWFkiFn1xqVhCexw6p6kLYszHcvlxWG+Cvm+5YHrljfXDyv8hvkvlPJtx4g/ThqN89VEiN9W+0xqmTKp+RnMXaUstQBzFmWeoA== 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=GOXpCjXjNn0vmAehZaXxc39KhoDaQOMwOW0WJM7VOCQ=; b=L0j6BhRPAr0S1PbvR2/NZ4A3F5qKIV6aON407Y3NA3UobdXoTxUgAPrzgihD8wqH6M5SDaCOYB9n5Nk5HBhZsUP5/gGWq/URRBykkvPBawVVBhlVs3AiyYgzxu2TnSfNlAbRpLSRnYvJwsSchnzKHSFi2RY0pSt5F7Afe+Pd68Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:25 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:41:25 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 10/17] staging: wfx: fix the warning "inconsistent notification" Date: Mon, 27 Apr 2020 15:40:24 +0200 Message-Id: <20200427134031.323403-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:41:23 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d5508f0-71a5-474e-f200-08d7eab0ae01 X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4326008)(81156014)(86362001)(45080400002)(8936002)(15650500001)(6486002)(52116002)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(66574012)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; 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: wo+XuBYqeRLJV39h2Gxgx1QHIgaOrzmChEArGUtUS9sk97s9q9b9Acdd43ibWmXozuKIhJJMDqfZtw+sTZHXgjSGqdpBB47xlNufauaoirEbZwjCe8FmR5kAxTXXOqqApN8+FZJZAf0Urr8ZPTr8DPfaSmI/UusZCsRASQQUDof81A1PhJAokTCFF12spdvsLhcOCqFuyiuUnzgqdaEsShBYo6vgwrRAhLJuW4lZbyWRPaTPOQ6RYXVxWHUUTtoCakUHUSs5Ihhpk2OtHKN7jXHJE0Bkf4ughdYjBkec9CM+w/2isjsr27vcgL/ZYaXDbnPwsy4DI1v2xalunZwMgetL1j3NgPkkja/45Z/BrYSdcNxWbXUZMglFnx+LQtvfPjNv3kHWbPBAUo6pDz94ljwwmGMvafBNSlu6R8TSdQvEtknkmzeKWhQMzBAoThSy X-MS-Exchange-AntiSpam-MessageData: NdjaQFxM81XA16hPFY/WJZXZ89kQgoRAGfiHJ7T7eMYbsKib9X1Q6VG4dSB4jreILobdcA5eZ6lotmVpjGxNk8T9pdTizqdPFJ2T/PgWr6+SRiwCBmVEsh1yq7gNmzC4WVaZBuGzevCYSEquNpz6t7Bzv8ktlZC1mAoyMCGNBpKh1gj/LwCDsPBa4n4F9UrE+AkqG872RU5R8A2zOv+stApxpRTR7BwiPOgxksEcLiAboM7yb5G7HyQ4vGeFp/b7AlnxgLVL1qk7gh8XScILMLjlKIy65LkUoTPnbrSNju5Vw3WrTjypDTnIh+hpZmDxFH4hCzXgTOxbvVlvNjx+WwbBeA3jstppi8bghpPuwW08bUR434stjuDKP3gI+5Y1wUuYUEoYNPuDnKxFmoeHc9OSWbwB3U0Y53BjKHWWjcNf3uxr95F0jFmpLqgX0kPnKfEjqTe+gmkfQL7KquHfD/9TkY5jZBIwC2k6ArPII+V1795RffIQWSxyCul3kg7UuvH1s+uYCxAVM2z7JN3ftljojVYlJwy7+EeYooroYlsCyolGP12D6i/P4gcGter8mrCZVnokj2XyygLHP5OvuJpfs1PNTfltpAjdOlIlJFl6rsv5O9HN4jRsAKKfZT259tEvoCmDflEy3H7OrbS+DujDSMyT40H9rC4udpWPaLMUiazg66vzrVU4UCEtMjSXgSVyw7/a8YrueON8sKYEfe4YRD7N6FwOdQ09o1N0VyyQhyzvuxyYZW9YFezcBkIlwCB9vpr3kZ/4iBFTzEwhxccElMZqA0gqk48Ay3OQIX8OJyW+rE3EhueenUc5AQbF4KBY2JWNAReJ4EhiJDUe1iIHkKUX/wPJnlgXUvab/4M= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d5508f0-71a5-474e-f200-08d7eab0ae01 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:41:25.3869 (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: H/ZG6wSBb7jx/ALmUujQm/0WZgj4D6A7DRWFubEj83zliRFQlh7eOrDjCV2Fw0DUtQNBxNooSjz9Bi5FpdYLVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller In some circumstances, Tx traffic is sent without associated station but the station exists when the Tx status is received. Beside that, the driver keep a counter associated to each station. So, in this case, the counter is not incremented, but is decremented. In this case a warning "inconsistent notification" appears: ------------[ cut here ]------------ WARNING: CPU: 3 PID: 82 at /home/jerome/wfx/data_tx.c:469 wfx_skb_dtor+0x1a4/0x1d4 [wfx] inconsistent notification Modules linked in: [...] CPU: 3 PID: 82 Comm: kworker/3:1H Tainted: G C O 4.19.57-v7l+ #1244 Hardware name: BCM2835 Workqueue: events_highpri bh_work [wfx] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0xd4/0x118) [] (dump_stack) from [] (__warn+0x104/0x11c) [] (__warn) from [] (warn_slowpath_fmt+0x58/0x74) [] (warn_slowpath_fmt) from [] (wfx_skb_dtor+0x1a4/0x1d4 [wfx]) [] (wfx_skb_dtor [wfx]) from [] (wfx_tx_confirm_cb+0x198/0x2f0 [wfx]) [] (wfx_tx_confirm_cb [wfx]) from [] (hif_tx_confirm+0x50/0x70 [wfx]) [] (hif_tx_confirm [wfx]) from [] (wfx_handle_rx+0x128/0x22c [wfx]) [] (wfx_handle_rx [wfx]) from [] (bh_work+0x3cc/0x964 [wfx]) [] (bh_work [wfx]) from [] (process_one_work+0x170/0x458) [] (process_one_work) from [] (worker_thread+0x5c/0x5a4) [] (worker_thread) from [] (kthread+0x138/0x168) [] (kthread) from [] (ret_from_fork+0x14/0x28) Exception stack(0xee199fb0 to 0xee199ff8) 9fa0: 00000000 00000000 00000000 00000000 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ---[ end trace 64b9e754e12ef7de ]--- This patch fix this race between the station creation and the Tx data. Fixes: 7d2d2bfdeb82 ("staging: wfx: relocate "buffered" information to sta_priv") Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 18 +++++++++++++----- drivers/staging/wfx/data_tx.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 9c1a91207dd8..f8812079d801 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -224,6 +224,7 @@ static void wfx_tx_manage_pm(struct wfx_vif *wvif, struct ieee80211_hdr *hdr, int tid = ieee80211_get_tid(hdr); if (sta) { + tx_priv->has_sta = true; sta_priv = (struct wfx_sta_priv *)&sta->drv_priv; spin_lock_bh(&sta_priv->lock); sta_priv->buffered[tid]++; @@ -469,7 +470,8 @@ static void wfx_notify_buffered_tx(struct wfx_vif *wvif, struct sk_buff *skb) rcu_read_unlock(); } -static void wfx_skb_dtor(struct wfx_dev *wdev, struct sk_buff *skb) +static void wfx_skb_dtor(struct wfx_dev *wdev, + struct sk_buff *skb, bool has_sta) { struct hif_msg *hif = (struct hif_msg *)skb->data; struct hif_req_tx *req = (struct hif_req_tx *)hif->body; @@ -480,7 +482,8 @@ static void wfx_skb_dtor(struct wfx_dev *wdev, struct sk_buff *skb) WARN_ON(!wvif); skb_pull(skb, offset); - wfx_notify_buffered_tx(wvif, skb); + if (has_sta) + wfx_notify_buffered_tx(wvif, skb); wfx_tx_policy_put(wvif, req->tx_flags.retry_policy_index); ieee80211_tx_status_irqsafe(wdev->hw, skb); } @@ -493,6 +496,7 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, const struct hif_cnf_tx *arg) struct ieee80211_tx_rate *rate; struct ieee80211_tx_info *tx_info; const struct wfx_tx_priv *tx_priv; + bool has_sta; skb = wfx_pending_get(wvif->wdev, arg->packet_id); if (!skb) { @@ -503,6 +507,7 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, const struct hif_cnf_tx *arg) } tx_info = IEEE80211_SKB_CB(skb); tx_priv = wfx_skb_tx_priv(skb); + has_sta = tx_priv->has_sta; _trace_tx_stats(arg, skb, wfx_pending_get_pkt_us_delay(wvif->wdev, skb)); @@ -561,12 +566,13 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, const struct hif_cnf_tx *arg) } tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED; } - wfx_skb_dtor(wvif->wdev, skb); + wfx_skb_dtor(wvif->wdev, skb, has_sta); } void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop) { + const struct wfx_tx_priv *tx_priv; struct wfx_dev *wdev = hw->priv; struct sk_buff_head dropped; struct wfx_queue *queue; @@ -593,7 +599,9 @@ void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, wfx_tx_flush(wdev); if (wdev->chip_frozen) wfx_pending_drop(wdev, &dropped); - while ((skb = skb_dequeue(&dropped)) != NULL) - wfx_skb_dtor(wdev, skb); + while ((skb = skb_dequeue(&dropped)) != NULL) { + tx_priv = wfx_skb_tx_priv(skb); + wfx_skb_dtor(wdev, skb, tx_priv->has_sta); + } } diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index a308af3d68ad..54fff24508fb 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -36,6 +36,7 @@ struct tx_policy_cache { struct wfx_tx_priv { ktime_t xmit_timestamp; struct ieee80211_key_conf *hw_key; + bool has_sta; } __packed; void wfx_tx_policy_init(struct wfx_vif *wvif); From patchwork Mon Apr 27 13:40:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220498 Return-Path: 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, MSGID_FROM_MTA_HEADER, 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 B8DA3C55199 for ; Mon, 27 Apr 2020 13:41:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 92C622076A for ; Mon, 27 Apr 2020 13:41:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="X4DyRizG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728169AbgD0Nln (ORCPT ); Mon, 27 Apr 2020 09:41:43 -0400 Received: from mail-mw2nam12on2079.outbound.protection.outlook.com ([40.107.244.79]:26048 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728128AbgD0Nlk (ORCPT ); Mon, 27 Apr 2020 09:41:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UICqT+9rq4c/5qgq+AqBWi+MK59BcOw490o43dUWW66Dc7bRlT/OE96sx7yoZws5yHRbl5TrfKyP3HQtzec8unZKSjHmhXeC1v2m/HddMO8C9Z3cbgbNg7HQEXN5Qz095UXCEwWFZs/p11K/F3SHvbHXUwwQqirqQMMx39a0pm4kgKUNjnij6qgNI2Y/a4R0pifUEoaxk/jIY/GfOU4n0WvW4yIGh0y3qwwKTft2PA6rhV6oT0fL0c+/mRfkf/FXZjk1RY9gWIs6gYZ/DoIzU5uveYjB7ptpaFJ/MbiVTMKnXvmWZJaQlXzgJYj7odW+KMjPUJpNVtf5GJ/nCyzQwQ== 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=t4/GjzrCFiTbCEHiqTUBdkSPriUhMCEf9S0AkojpW7U=; b=MBR/wXn6ZyeWv88qERfdGXYCSPU3XL5EOhdIhVfirNQxwZjThxlVrCidTqQ7d7DRNOWYKM9EIqAF5g6mbn08CVPLgGY2lH6Y0YzSwNPJ7TBIGxHwPRCFU5TLzCtxKwgs2bFfUKmYRJH6sAspZd5MLawxC3WH6vmnVLPueqiIKkvpuMONOGsdkusFg0mt2TyNFGUAIrtAxAEbtrL+EP6sFKM4VvHF3m338oe7eEoQW3x2CVGWWCp+dGXXWVsNFz0eD9c49eiOZvJ/hnpi9Soz0Dc1JXO3DGOue/NxcpQLek/rRmqWwwvHE5sMPn48i8KfowAHhilj6bZ7brAtJS9leA== 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=t4/GjzrCFiTbCEHiqTUBdkSPriUhMCEf9S0AkojpW7U=; b=X4DyRizGBV+fpntuDSsI3I5FnSPtkCRNuPdAB6d6QqNJX4OYvr40ALBurzUxrcaUDvljFEnZSA6vSkkh99Iw8ci0Z5Bbdq2EENLa44gHs1/TeoOPt26YyEjS9XFoTihdgfWanAY1M5z4eR+PTH7z8oeNuwBX4SfEa43xY6FRq1o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:38 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:41:38 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 14/17] staging: wfx: update list of known messages in tracepoints Date: Mon, 27 Apr 2020 15:40:28 +0200 Message-Id: <20200427134031.323403-15-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:41:34 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e4b9079f-3866-4906-231b-08d7eab0b5a1 X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4326008)(81156014)(86362001)(8936002)(15650500001)(6486002)(52116002)(6666004)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(66574012)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; 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: wbShc5w4OgEyQbaWGdk4fr6qih4y8tlox4MGCSqefacAjzlRLTX6h7lWlJyIseNSRUdJyTPg7CScrytSzP99ThWz/3ahbBzHRa63PFukUMX5L2HEPc8J2nmLFrQ7uVmkXZM5JurTHIxMmn9zzeQFoaHqPZoH/zj8kURPAIzH6Mm9U6ntSeXUNlQV+8Q/n9SLzm05m0xLSd787Id1SGcfl6N+FAaYlItdyViQyM6LHkMqKV8uXFA022vY+n7Un0xpVSiyRA2cSAsE+Z6DO/8JKwCDoaOXusuhwakbg5k/FJl8KeBSvUdUP2J/sE8KLDYnn9nbliiFEgz/txX0hqNk2HdH9RTpB7lq30AWtu8DtNYfrre1XAHQL5G9IskbFF3JI1KHuVeFKK/9fc7838iQImVcxpu9NLE0ydCjdB72HX25RSPZBY5CneKAKJ1bVl1d X-MS-Exchange-AntiSpam-MessageData: 1chnTdK9BOV2MpXqa5F29XRxUwKQDka7YjQRZ9hf8z8+Jwo/WY/ZYirHDC7ZEwJ3S0lZ2D+UdUdMYGBRATp1pHdFnqeK0MxQb6V8Wr4qLYoLpXLeFOsnnOLp8fqXxuNgJ9Roao06CVhVJpzrasmaCcfeZDWThMvg+rwLU3dA/dM5zsEBdHlSjzR38E5MuGlVd/xzBOt8iCwRJO08ICu2cWFfU8SBH3wIB8/UGFmKEmbljDTczCzPzxqdmbyy/Z8JXKDkRlRGKmbYkXjCHD9el9JLhGEYMZNs8pNmXedx4YZJ/Q+VG7vSOn2YsTXd/gL4xFVXjFBdscppS3Qz2sO7/iYFMFdLe1vxJC313z/omfwVVAn+TXDToB6t2WCpA4304SVgXJnxXj1lZTobjMWKy6Na9b5WxoL8pR/ZHxaevnLD1rUsWwbVuUALHH1xxi2T190vc02DHgl34yXmkxEYNxDEWCp76+ns9KGsijU8BRyfPKE66K0QzmAHRH5oMibSfBwRdDFwQhfHFN/dtkK+X3mGGzPS/oI1QYJs9Fv6R8X5YaXRgxW5BcspUdcGAdOISZVwJLgddPOG1e8h9NtOJ4PBIoYD0EneWty/8CmqFTLa8s3g+T9CabnV9kpt5XoIv9fI9zAQvQKxRsxXHj7vI3MtdwialRaEfOoSyhxy6ZiJC5wmX5Uj+ej0Ss9O3V12Vro6gDktUa7Njs2Ky5NxEtR7w44DLrGqvreN/0DpGfvF8ERX5C9E56xxzeqYCLAbBMAhP/fVEkVSU/wtAIfA3pCcEc1+m/2Ljqq9dQwsl6hdi/+U7g7gpzxPBOtaNYs94juvFx3/crqppjVp+vFADj/L4inkVzG7pCUqXsdR280= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4b9079f-3866-4906-231b-08d7eab0b5a1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:41:38.0503 (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: 5oV16SfmD+AyWG8740O2LV6e3aOvVGusXWfBaDbze3vDGRqegxVeiORfYvJkMdH4is/adh6QCYerN+6Q4GQAng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Some messages are missing from the list of symbolic messages defined in traces.h. Add them. Also sort the list in order to simplify next changes. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/traces.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index 30c6a13f0e22..7b25e9511b00 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -104,8 +104,10 @@ hif_msg_list_enum hif_mib_name(ARP_KEEP_ALIVE_PERIOD) \ hif_mib_name(BEACON_FILTER_ENABLE) \ hif_mib_name(BEACON_FILTER_TABLE) \ + hif_mib_name(BEACON_STATS) \ hif_mib_name(BEACON_WAKEUP_PERIOD) \ hif_mib_name(BLOCK_ACK_POLICY) \ + hif_mib_name(CCA_CONFIG) \ hif_mib_name(CONFIG_DATA_FILTER) \ hif_mib_name(COUNTERS_TABLE) \ hif_mib_name(CURRENT_TX_POWER_LEVEL) \ @@ -114,29 +116,32 @@ hif_msg_list_enum hif_mib_name(DOT11_MAX_TRANSMIT_MSDU_LIFETIME) \ hif_mib_name(DOT11_RTS_THRESHOLD) \ hif_mib_name(DOT11_WEP_DEFAULT_KEY_ID) \ + hif_mib_name(ETHERTYPE_DATAFRAME_CONDITION) \ + hif_mib_name(EXTENDED_COUNTERS_TABLE) \ hif_mib_name(GL_BLOCK_ACK_INFO) \ hif_mib_name(GL_OPERATIONAL_POWER_MODE) \ hif_mib_name(GL_SET_MULTI_MSG) \ + hif_mib_name(GRP_SEQ_COUNTER) \ hif_mib_name(INACTIVITY_TIMER) \ hif_mib_name(INTERFACE_PROTECTION) \ hif_mib_name(IPV4_ADDR_DATAFRAME_CONDITION) \ hif_mib_name(IPV6_ADDR_DATAFRAME_CONDITION) \ hif_mib_name(KEEP_ALIVE_PERIOD) \ hif_mib_name(MAC_ADDR_DATAFRAME_CONDITION) \ + hif_mib_name(MAGIC_DATAFRAME_CONDITION) \ + hif_mib_name(MAX_TX_POWER_LEVEL) \ hif_mib_name(NON_ERP_PROTECTION) \ hif_mib_name(NS_IP_ADDRESSES_TABLE) \ hif_mib_name(OVERRIDE_INTERNAL_TX_RATE) \ + hif_mib_name(PORT_DATAFRAME_CONDITION) \ hif_mib_name(PROTECTED_MGMT_POLICY) \ - hif_mib_name(RX_FILTER) \ hif_mib_name(RCPI_RSSI_THRESHOLD) \ + hif_mib_name(RX_FILTER) \ hif_mib_name(SET_ASSOCIATION_MODE) \ hif_mib_name(SET_DATA_FILTERING) \ - hif_mib_name(ETHERTYPE_DATAFRAME_CONDITION) \ hif_mib_name(SET_HT_PROTECTION) \ - hif_mib_name(MAGIC_DATAFRAME_CONDITION) \ hif_mib_name(SET_TX_RATE_RETRY_POLICY) \ hif_mib_name(SET_UAPSD_INFORMATION) \ - hif_mib_name(PORT_DATAFRAME_CONDITION) \ hif_mib_name(SLOT_TIME) \ hif_mib_name(STATISTICS_TABLE) \ hif_mib_name(TEMPLATE_FRAME) \ From patchwork Mon Apr 27 13:40:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220497 Return-Path: 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, MSGID_FROM_MTA_HEADER, 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 D753BCAB361 for ; Mon, 27 Apr 2020 13:42:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD826206B6 for ; Mon, 27 Apr 2020 13:42:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="jYxyC/OA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728217AbgD0Nl7 (ORCPT ); Mon, 27 Apr 2020 09:41:59 -0400 Received: from mail-mw2nam12on2078.outbound.protection.outlook.com ([40.107.244.78]:6167 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728181AbgD0Nlr (ORCPT ); Mon, 27 Apr 2020 09:41:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q+m8A4dkt537S3/+e0Yhi6kWCWCNBlzSx4OyA5+s4UoKGCxvOGFUFsocOc42lHWt79wBYkivluKtwsT1SS69y1MAWZwqusiwProb2egybPXU0Fip0V1yXUJNufUMHNgd08TN8sSwZIu+lbzTtc8IfKtP6GfgopgWF81XuuEQ9gW+7HG/f8zHdeLXNCkaEXIysvTV50BMC3xjoHzUsDaACuwNwOmPmJ6f93+669c6JAtcbu1DPBChKM9i5Nm0Lblbo03+5HABnCEqtpVk65duCvWknMNJs9Y55Ez/di8+acWzwqZRpjk9PVUw4dl+sJ37vNxC3hVv6K9Z2u4qMMPpNA== 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=U4Qf85QInMmItIH52jEcdSx4hflv5Asj3HUCTAdM1jU=; b=UZd0Z97EnilVKjt6MqDEZ5/1uN4az8WdeM9ZfqSEMsNkCmX4Ha8mmTinKHKCvuokJ/TDfN7q6IM1yoDR56c0bwsDeMpaqWWOKV07eBVVVpPMhMIjrmnpTAQgGCmwZ9gbjfWr1O3U2zl30Obiji0to0Bb4bYCff6vQXT9P5cLK89HVVTDXBrohJRSGwS2xsKEsKyamulOqCl5WYA0ycBuMjcWdzZoYL90Xe+Hx2/c1HM/a05P67AgkndO4aXFA9KILlYWRl/NHXQCq5q6CBh4KddaUeOp5+Um04QL6IwhUg/VvZ3Ic/JRDehh3krA2tqFsLMJHHOXX2JZuVWgW7mGRA== 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=U4Qf85QInMmItIH52jEcdSx4hflv5Asj3HUCTAdM1jU=; b=jYxyC/OAyvoD3iX17p7QvSisTkTj13bnCgIo1oXn6rQC3j5C4om5j3SdpmGRAGZjmyJY+A893YBZRMh/kGydtNWaeuMgN4tm65RSimoRzI+wrhO1tQNWbKa8sZlwCadb7LGr7lRHml6lxceBGnW5vp/4VhaFM94JbqGEQONBu+c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1424.namprd11.prod.outlook.com (2603:10b6:300:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 13:41:45 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2937.023; Mon, 27 Apr 2020 13:41:45 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 16/17] staging: wfx: fix display of exception indication Date: Mon, 27 Apr 2020 15:40:30 +0200 Message-Id: <20200427134031.323403-17-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> References: <20200427134031.323403-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR0P264CA0232.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 13:41:42 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ca74b27a-f279-4da2-a0fa-08d7eab0b9ba X-MS-TrafficTypeDiagnostic: MWHPR11MB1424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(39850400004)(376002)(346002)(396003)(366004)(8886007)(66476007)(66556008)(4326008)(81156014)(86362001)(8936002)(6486002)(52116002)(6666004)(6506007)(5660300002)(16526019)(6512007)(1076003)(478600001)(8676002)(36756003)(186003)(2616005)(54906003)(107886003)(2906002)(316002)(66946007); DIR:OUT; SFP:1101; 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: 5xis6d1uaPVeI6VEx1aEabKBIGp1o17Acq+U8LrhdMuKiEWuOjlXTsL/Fjod7KAxp6KjyAIn+VJw2MdYTe9JWderKZRteIKGm9B2PKkcPTeaA0xu9Fxizfna4WBsEaWVj0l5dAYAX1+kJaYjHeyx1dOzsewCHMipZjFS9thGdDLp+A5fSL4RAJPIVUNvVtIewgyZHcaDZE5HU7altJmQODnG1gLqI8t7vFcjrKAK377fGMKFTAjAi+WYFeBJYMTr4s1+nb9Z45R82egNqp8tmSGaZQt7+k+WphaM9ydoImB+kFJso+cUkqaQKvgy2+7XlcQgCc0FD4RsZ7cQQDE0OSN8i5J1+AX+p8hpEebHkAhAfJlS5ul5s5vJ3Bnzkaai1+Ocw9l7u1qfFjaL+/avSGj4p9HcmJeMuiAgVE6ftxJ1Lf4GaDe+wnn0gcS0zt98 X-MS-Exchange-AntiSpam-MessageData: JIRBfXEPyonqzp5gVPWhM1IBmZ4UgoN4ixLvUKphcwR51GDWKY8Snrwdm7i8DomLqwzH3NwWpYucRZt89RkDozxILHbSmuvIJ5iMmUprZTqkbDG/Wvu7SUCjGM7HqGJzpTXRaBnQsyHQKEK3rQ/xXNl3XMbgkfT2pKd1G2syK3M79+stu1CuhEGPVqbiJsk+SC0i7FkI1+zgKHNgp2vftEDHBiMNTm5TvLha9WgF8zUGrOudV9fksgdzjUKcfB/9KWUAl4T2woBe7uYJ/47n0bui6cUhiUOh+pI5PNWD+sSs20TAP/Gsf7p/XObr2MHHIWKcQ7uqTR6h6uzgTR0rWiYQzUawrWDzQgtdP2PIXppChIzCD5yD4j81mq97WnMsN+hzhhn5zKeJ6rQzMTna+aaEDUJtgAz3e9Lhyz6Lrb5bdDGkxCKaI1NfyacMRnymR05ImJqbz6eCW+dRtl8RHLJTlScfPtoMNBWKlOpDjQjcM+EN9hKMH6OIY0pmXi4Q3cS+eXjfceV2h4Co3e5K/veyHeVcxS6JbM/zcfdFKNW154WfkPz+KmzigmyWyAu+aXr/PBdAjEGfWUdFbQzVI/P2vXONwd/aoviD1hU88rgWlFW3LoxfI4aGPzZpG7m4TN8cPdhTWKCBumWWmfMtde5RFUe7dk7jhyyk4dyYRJ1w+vC3gq5cE5mnlH3LhWzN+4+ifaDYuLXJj11Au7oH5eKZcwC7RBbMfbjDaY51OoKfyQ6Cgh4wPQViLJSDNg2h4+qjp+H3K8plIooja226JH069RGXc913DOH1aQdGJerQtxqXV/OIGP1TQ+eR9pCYbkeRpyHG9Qsv7e8rS6rJA0j9gxf5YhXey+YAKzNKa3A= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca74b27a-f279-4da2-a0fa-08d7eab0b9ba X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 13:41:44.9663 (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: +HPJC8v9Ilapq407cIMrFpD6Ze1uJYMSdekVnQE7J8bQN+BdYAdWM1tGCqAMu2Biuf+zDOc/yCWFksdDFUYW3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1424 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Until now, the exception received from the chip was only displayed if driver was compiled with DEBUG enabled. It was not very convenient to help users. We prefer to show the exception unconditionally. In add, this patch provides the semantic of the first bytes of the struct. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 11 +++++------ drivers/staging/wfx/hif_rx.c | 12 +++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 275354eb6b6a..1c010f15c6d0 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -223,12 +223,6 @@ struct hif_ind_generic { union hif_indication_data indication_data; } __packed; - -struct hif_ind_exception { - u8 data[124]; -} __packed; - - enum hif_error { HIF_ERROR_FIRMWARE_ROLLBACK = 0x0, HIF_ERROR_FIRMWARE_DEBUG_ENABLED = 0x1, @@ -248,6 +242,11 @@ struct hif_ind_error { u8 data[]; } __packed; +struct hif_ind_exception { + __le32 type; + u8 data[]; +} __packed; + enum hif_secure_link_state { SEC_LINK_UNAVAILABLE = 0x0, SEC_LINK_RESERVED = 0x1, diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index e6daac36f5c8..783f301d58a8 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -331,10 +331,16 @@ static int hif_generic_indication(struct wfx_dev *wdev, static int hif_exception_indication(struct wfx_dev *wdev, const struct hif_msg *hif, const void *buf) { - size_t len = hif->len - 4; // drop header + const struct hif_ind_exception *body = buf; + int type = le32_to_cpu(body->type); - dev_err(wdev->dev, "firmware exception\n"); - print_hex_dump_bytes("Dump: ", DUMP_PREFIX_NONE, buf, len); + if (type == 4) + dev_err(wdev->dev, "firmware assert %d\n", + le32_to_cpup((__le32 *)body->data)); + else + dev_err(wdev->dev, "firmware exception\n"); + print_hex_dump(KERN_INFO, "hif: ", DUMP_PREFIX_OFFSET, + 16, 1, hif, hif->len, false); wdev->chip_frozen = true; return -1;