From patchwork Mon Apr 20 16:03:10 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: 215913 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.7 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 1F17DC3A5A0 for ; Mon, 20 Apr 2020 16:05:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E39B820B1F for ; Mon, 20 Apr 2020 16:05: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="BkC5wilF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729530AbgDTQEH (ORCPT ); Mon, 20 Apr 2020 12:04:07 -0400 Received: from mail-bn8nam11on2067.outbound.protection.outlook.com ([40.107.236.67]:31360 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729267AbgDTQEF (ORCPT ); Mon, 20 Apr 2020 12:04:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mVDZDeUmSJ5poq0mihgEg+1gY5DhncTxb3B86946yRAN0/6N8Piy0DjU1lzrcWjk98enTo3Z+9WOpE3ugXH9pCJ5LfMUTT5/7m3Tit0bxB4YBPA7y/yd5RTOTpw8luTWn/BSDq+2ynfr7IaXeDBCkG7td1cUSlJBvRZ15kiPZcPKymr6jJ3bvU6kkpumshvhOrL/5ZrjlPoZk1QgN0wnHxxHatL7faHHIq0Z4TBXu2QvQpWtXKYQA5OZbnTaoWsUoGNT/H0vWyQSOEaOsg030GEWeY/uw1rIPHg08mTyHpFY5yYE/hAc8s1jmhRV0Eb81wodr9i250IGU36g6Oy3zw== 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=Xw7T7f7hrYyhFdaSjG4PdZOKuWDOeu/vP9hEhfuhEI0=; b=VMVyXqVkSGh+oLy0dIvq0QhmwpEiJYn6187Bkg312ucu4M1Rm9YaGULolLcwlyjv8uj5z+YsEwTixh9eXSWGc6fe5XT1gniK9/a+w9YXK408XHY268zZRsTispD0Jw+NdYOv/+aXGz3VoEvt50EBvN0z9JKJcslf38IvnEqXsfhxW92elgJz8FhQvvwIFt1qj2BpoYDQlrXAsBk1vMz0Fza0c4qxOFm5vVljDEN5/jRSjnSg2MjjM9t5yWTZ/qUPcPbb0B3TT5gwkK2FQBzwdmfzgh69WPkll1mcWi2H7f8uC5OgdqD6d9jc66gp0UkZuEnGDDUjKOa7SMLm7m8vjA== 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=Xw7T7f7hrYyhFdaSjG4PdZOKuWDOeu/vP9hEhfuhEI0=; b=BkC5wilFV6zmf2IVhLn/H+qKcbne8ZDJUQtz3GN3UzvKzyuqoTH8Og+o+eGAMgpf32+PwDHHnm/oVRdq+YEi7ptvsWAEpne0ps0kYVbqJBODOnQ5fraFcglB9qacBU6AzvNXaeqTZmEsVhe0EvBqVRpbiqYQZFAnHfAiun0oKFg= 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 MWHSPR00MB249.namprd11.prod.outlook.com (2603:10b6:300:68::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25; Mon, 20 Apr 2020 16:04:02 +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.2921.030; Mon, 20 Apr 2020 16:04:02 +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 15/16] staging: wfx: drop unused enum wfx_state Date: Mon, 20 Apr 2020 18:03:10 +0200 Message-Id: <20200420160311.57323-16-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:04:00 +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: a8a2d833-8262-4d8d-9778-08d7e5447142 X-MS-TrafficTypeDiagnostic: MWHSPR00MB249: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 03793408BA 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:(10009020)(136003)(366004)(376002)(396003)(39850400004)(346002)(8676002)(7696005)(52116002)(6666004)(4326008)(8936002)(81156014)(66556008)(66476007)(66946007)(36756003)(186003)(54906003)(16526019)(107886003)(478600001)(2906002)(316002)(66574012)(1076003)(86362001)(6486002)(2616005)(5660300002); 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: h8IZj19/0+6c/gFh+Rx2c0TtaKOTPzb53MmWme1XqqKnkRLO6TfQ1zQdkbw/CIgOe35BdG8X1rjAZ9wiMl7ruvL3J0mCPVt9KA3mcLEo1Fky9AjjcmUwZe2Y9VRghySXlxDae4ChozEik+PZ905jaU/T/0T+HVtmmBCrVbNl0by7k6waanmpPJXusmO6Y9WPCUsOaFAxvoBWt2W5ju6XK5c9N9rzEQrrmPYG6456uLUEBu7b9irD93lWFVDQGb/5ehoaxjaIAKxu6XPIaHF1q+HJ+r7v5vFMG76cMF/pYUKDBq6AeiMv1cHv2rILROrbGtMEUrlvFrqW6sT7sneOHwckGRY39Exaeb1Z9Ds4y0XpebkUPU3FYCqbqSoNCxBSPXtvvTo3oIDaMAm6avE0ENWTRuce1bNTWqdVqPhov/skBtVjhocl24cBdD6eI7vi X-MS-Exchange-AntiSpam-MessageData: kQaYB5HBm2d9CZrVnEOv0vtIgA8eqytEaJD7pbRSdA9y8PWfQhfLsAeYUHB3J8dldSiGX/PE0xjt5XrLG6gH9faYguliARnl3mLDvj3t67UJivkF1D36Ha0IPJztI9eCd8v7GSj67zqm9i04GF/jBLn3WSDgPZltxGhLtEF382K02FKld8sj93hC4P+7ZnLdhu4TeFqet7Rrqaht6PcTptXN3xIupLOyuhnuQJCea+NxRUb7cy/RbSb7Ns3xyhIID7GEJzD01U13OMjDmKkjOyGsst5ow0X9FdyTjZwpWq1Xb1ROdrE9mG9VzBBl85vUOMvl89hcjIaVzIT8w8B/k5tUC6yvC+TdQkzNWhnFUQYy1bkPGzArFXyEg6PYGEDJ1AWmG6Y1wwnYxw9iu9pZ/Ct44AfMofBKuXRI8ymKg7rnUSjRSBIu0aKqMIq8UxVACrbc81+LbsdPMjMEZK4nIJScW7Gmx60EGkUt160sV2NLVv6zM6xeIm/vPf3hjWhfLj1lNHawqc/P1aKBllK5hlFWzsbClcg4Hs0QTwpvhNDsdsMvRSxAVhuy45A7vN5tL9Go5gE38wkwpBPcmObi2Cbuszv+vpW9TgNgR+SGdngTzNMC0qr7ohGhPiGjp+HRHwBmQEMfGvb6miyPsywVsYfRsvxAFnvFcUDNAV5xxrg4NNDyef7PFqsUgg45HSKdCRQnSl6EcZhHSMv37l74bgcLObYA2RoyWATXrRD9clq022yQs+JHxEsqVjq5k0zN9eAPENrXXN2G8di62jZHJRCcEFRjTMg6/7TZX+3HipgqJWF1glwDwnTTMVBPUl66kVKKC6Bxvumm+cSIVwHCkAvp33JrOfiaOSl3wVPGwNU= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8a2d833-8262-4d8d-9778-08d7e5447142 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:04:02.0099 (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: x5UrRqeZaJZ+hhUDmnKY/5V7FF9AiYVCV8Cc/G9xI3FpXydHy3dQ3H/W+qPT4ih/eShrpr8nA3AXdd39YEw45Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHSPR00MB249 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller In former code, the field wvif->state was more or less redundant with vif->type. With the lasts change it has become unused. It is now time to drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 13 ------------- drivers/staging/wfx/sta.h | 8 -------- drivers/staging/wfx/wfx.h | 1 - 3 files changed, 22 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 1732f3d0a1e5..1e43e3b65953 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -286,8 +286,6 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw, // Call it with wdev->conf_mutex locked static void wfx_do_unjoin(struct wfx_vif *wvif) { - wvif->state = WFX_STATE_PASSIVE; - /* Unjoin is a reset. */ wfx_tx_lock_flush(wvif->wdev); hif_reset(wvif, false); @@ -367,11 +365,6 @@ static void wfx_do_join(struct wfx_vif *wvif) wfx_do_unjoin(wvif); } else { wvif->join_complete_status = 0; - if (wvif->vif->type == NL80211_IFTYPE_ADHOC) - wvif->state = WFX_STATE_IBSS; - else - wvif->state = WFX_STATE_PRE_STA; - /* Due to beacon filtering it is possible that the * AP's beacon is not known for the mac80211 stack. * Disable filtering temporary to make sure the stack @@ -448,7 +441,6 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; - wvif->state = WFX_STATE_AP; wfx_upload_ap_templates(wvif); hif_start(wvif, &vif->bss_conf, wvif->channel); return 0; @@ -462,7 +454,6 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wfx_tx_policy_init(wvif); if (wvif_count(wvif->wdev) <= 1) hif_set_block_ack_policy(wvif, 0xFF, 0xFF); - wvif->state = WFX_STATE_PASSIVE; } static void wfx_join_finalize(struct wfx_vif *wvif, @@ -475,9 +466,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif, hif_set_bss_params(wvif, info->aid, 7); hif_set_beacon_wakeup_period(wvif, 1, 1); wfx_update_pm(wvif); - - if (!info->ibss_joined) - wvif->state = WFX_STATE_STA; } int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif) @@ -787,7 +775,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw, WARN(wvif->link_id_map != 1, "corrupted state"); hif_reset(wvif, false); - wvif->state = WFX_STATE_PASSIVE; hif_set_macaddr(wvif, NULL); wfx_tx_policy_init(wvif); diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index fe728e642cfc..e814fe743b7d 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -15,14 +15,6 @@ struct wfx_dev; struct wfx_vif; -enum wfx_state { - WFX_STATE_PASSIVE = 0, - WFX_STATE_PRE_STA, - WFX_STATE_STA, - WFX_STATE_IBSS, - WFX_STATE_AP, -}; - struct wfx_sta_priv { int link_id; int vif_id; diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 354a62394db0..8d29bf77cfed 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -66,7 +66,6 @@ struct wfx_vif { struct ieee80211_vif *vif; struct ieee80211_channel *channel; int id; - enum wfx_state state; u32 link_id_map;