From patchwork Mon Sep 7 10:15:04 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: 259374 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=-12.7 required=3.0 tests=BAYES_00,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, URIBL_BLOCKED, 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 590F7C43461 for ; Mon, 7 Sep 2020 10:25:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15DBD204FD for ; Mon, 7 Sep 2020 10:25:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="fNgmVdmX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728406AbgIGKQk (ORCPT ); Mon, 7 Sep 2020 06:16:40 -0400 Received: from mail-eopbgr770081.outbound.protection.outlook.com ([40.107.77.81]:21675 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728741AbgIGKQa (ORCPT ); Mon, 7 Sep 2020 06:16:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KLafFf/gXXrqzGzuGcG3simyjFjf1k+A+4ZPVZShH5s181be7aqeENHHekj8DXBSnN38pGATzVnUM6l3o7h2kquNf8jznLWv+oGzkdGKx62SlW39TdxH8+OtMi2FAAXBXU3eTIWUEe+eiMwkKy96ivF1s6Sd/0jVuLTugwktSyQXHkf3mTMe/akNwF2/PRqkjMjOaZTCpTy87pwD73aiZ7VFQGNGDdM3RafwEytan3AO7pqUYDadiJcWAsPZmuryPKL/IL88tMhjg3ajpHiWVmTRvILAxb55iLz8uuaCddQP/Ujd9wCSQu3vF0dAtCXWLP2PrzXJ3YnyF6cvO56l/A== 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=kYDK+4n3lVRV+3X4FSxbCFv4F3eKWdbh6ZIPIgKPxZM=; b=IkghpV38k7q4SsANJ7MED0ocZSS6yqAk2IbZ21Uk8Ul7H24ZfjyPJqB/t8yXHkaARbfuki65/zbiky5peUCXojZbpT+dT5lorKTBgPCuWtNcHNzkYqgIzh/lY1/AHk8D2+L1pxkRIlYZGsApvZ2oqEuLDRalPQFlYdG7A/tVBdw3mHkpANhOeJHYKynLQ+bjohGttFNwFwx2hFgzh4Vtgbe8FmxPI+1ixARrsYMox8UL41hsg95G+s0pcIZDgCirDIPE0CCK4y3oeAtmEe6IuEFiFaHbrLagXMwXgTZv/iIRSZec1Db/CrusuaVj69pmIK6IjJ8Q21j7QndeOszQsA== 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=kYDK+4n3lVRV+3X4FSxbCFv4F3eKWdbh6ZIPIgKPxZM=; b=fNgmVdmX7Pi4tbpK5zy5zJV7Y7xr6ZTpSMVNtDzzuSKTE3vnHaHWkVY1R1Zp8iDl9Y1reH+2xOtWlEOq09Byh8nUL92itwFJMFuzf0sqJt6C1mnYEIymt2IFjmnpvFmM0WAmpd4x60A2pxmLqXxHQT+FNKtAxun/+oVMr4nBoQY= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:07 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::85c9:1aa9:aeab:3fa6]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::85c9:1aa9:aeab:3fa6%4]) with mapi id 15.20.3348.019; Mon, 7 Sep 2020 10:16:07 +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/31] staging: wfx: drop useless struct hif_map_link_flags Date: Mon, 7 Sep 2020 12:15:04 +0200 Message-Id: <20200907101521.66082-15-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200907101521.66082-1-Jerome.Pouiller@silabs.com> References: <20200907101521.66082-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0109.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::25) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (37.71.187.125) by PR0P264CA0109.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.16 via Frontend Transport; Mon, 7 Sep 2020 10:16:06 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [37.71.187.125] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a3cc4816-f727-47f3-eef3-08d85317090c X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qz19+Cs7gHpmcZFvbWo4VwaojBm4JpEZtLjlnw5BCjdwSjxx6yN4iztjTxOY4gQvoFzzC7bQEJtDy236bQcxDbW9CasYsGII1u99ZULZvUL2oKKBqiimeejOLgFO7oKysmJ9uk1OKPzY61HVFt2lKIZeuPXzeJkTOshTOBUCYcaKOBXAZDo/sN8K/0BxGhQ3wgX06zMxC9aNGziBRf169cxBJrmMYzN8K79PAXLRMILZ4rwH8ajI71yz8mGA3JGscQb/QroSJEj7JIPaY4Py9A0+qR9HkykOS9HNx8ML+J/0NnLrMBTa1DX8KOnGL4APZjMwrzuT/5ywwX64IaySwg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UNaVLDRXJlT96RPr3bslParBZv8RUyZtEt7sSPlQAW/O5ujEgvyUuJbarrpsews4xCziXgBj7VN6tSAgP8/CmpSjgJzkHiJFwQEnRrJ+af7eFhy+5EFZ2jaFgmblBd8Ze1Bl2CwqmPHQcljuzAS47teD0HEh5SKziklREV0NQLwqFXpxP9YDe+1zQ+qbKDlEkJjC6tDw1ijpyGeqL5ng2cm8UcLwO0hn73/8lr8aZj6x6Cuwub73wJfvmEbzmpWmj17SM9Vxht7c1RWRQqCdBQzOtEcMY4pWl+2KNRDrTll4iZS00O/zzGvnODegxDsA9bvKYYaQyk75Su0tGrGVo7ffyIcalreRUfCgSwrHBruBFQzwBNfqsSPxaQGro70RMi5HY0fmMLy5GKPNWQ8yIQStymjuaAsLgxtQqWQaVXw53BXfRBJb0TSfxAq/fZs8eBzeTdko4hjanDW/Ifbkw5JQcAR7Xy176TcS1Bizl9wTzrMDPj3kYEPs1lhTWSyp1fohbNnp1CaaLd5qTBrSfStmmRWGgtuGBc+Vl3ogPpjr/uwtXBy2GHj6F+Vxkh9S+Xq7gwvbefjdR6D20hbPZZb53zTAwl/dofh4Mgnvywj769Nm5MipDIME83Hz+YjEYUeqtrGvoQAiZnWMXLRa7Q== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3cc4816-f727-47f3-eef3-08d85317090c X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2020 10:16:07.5749 (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: +toXlm85eX9lv+JzoXVsrSyJbC2LfOknRaajI7O79r2IK2hPmhp1bi3tGWMRVWIioAhOFm9bJIxVV0JMYY5rlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_map_link_flags has no reason to exist. Drop it and simplify access to struct hif_req_map_link. Also rename the field 'map_direction' in 'unmap'. It is more meaningful and allows to drop enum hif_sta_map_direction. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 15 +++------------ drivers/staging/wfx/hif_tx.c | 4 ++-- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 895f26d9f1a2..f86f6d491fb2 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -434,20 +434,11 @@ struct hif_cnf_beacon_transmit { #define HIF_LINK_ID_MAX 14 #define HIF_LINK_ID_NOT_ASSOCIATED (HIF_LINK_ID_MAX + 1) -enum hif_sta_map_direction { - HIF_STA_MAP = 0x0, - HIF_STA_UNMAP = 0x1 -}; - -struct hif_map_link_flags { - u8 map_direction:1; - u8 mfpc:1; - u8 reserved:6; -} __packed; - struct hif_req_map_link { u8 mac_addr[ETH_ALEN]; - struct hif_map_link_flags map_link_flags; + u8 unmap:1; + u8 mfpc:1; + u8 reserved:6; u8 peer_sta_id; } __packed; diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 49523e70af6c..eddb60dec069 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -502,8 +502,8 @@ int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, boo return -ENOMEM; if (mac_addr) ether_addr_copy(body->mac_addr, mac_addr); - body->map_link_flags.mfpc = mfp ? 1 : 0; - body->map_link_flags.map_direction = unmap ? 1 : 0; + body->mfpc = mfp ? 1 : 0; + body->unmap = unmap ? 1 : 0; body->peer_sta_id = sta_id; wfx_fill_header(hif, wvif->id, HIF_REQ_ID_MAP_LINK, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false);