From patchwork Mon Apr 20 16:03:08 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: 215916 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 B6EBAC3A5A0 for ; Mon, 20 Apr 2020 16:04:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 933A620775 for ; Mon, 20 Apr 2020 16:04:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="g8eUQ3z5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729809AbgDTQEW (ORCPT ); Mon, 20 Apr 2020 12:04:22 -0400 Received: from mail-bn8nam11on2081.outbound.protection.outlook.com ([40.107.236.81]:58834 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729710AbgDTQEU (ORCPT ); Mon, 20 Apr 2020 12:04:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MExWu/qY9IvU5qoSY25HcYgSBGny0vDk0w0QadxJxCEQMbasC4PcB23PTfUbmsmDEZ9XGQHB6S7agulGNJA1zxPkzXTn7xh85Edz0HkMmxjvjKD3g60lRJ5NAZXy8t4uzAPKSTUbI6qKURrUlrVDxqx3Apu72EYhx4NUdQoLiCBGDNQnt/5kwo2A98dTygUF+dLgT7xiy8GndZAsXwEXOO0SqYkHGIR2edbnv5II/JZZM8WCDORUBC7vhxBoFy73/O/8wCsJDQnppXGYbsPQ0sfvxJtSU8cVLQzc7Kea8/4rWlHXh3ZxApRgkcSYfbOyKkylw6L53hptDZznr9O9Xw== 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=DURtoK7Eo/KOt2TOBS3HLim3hNZQVHhh43H5x2GAUvo=; b=exbhzELWKN7hhBPh4Rz7AjxHWIJMF+U1pKcyHz0Glw2HKDTjMZxjtdY9lVNrFwaoj64x33lm8ztAdG+iSilr2ypeBa++aYBgAxIsGbBega45lnhJ8HDLqDkPnTcrfAbUftVNqbyGUZAgTdP7v0/ok5UOplWpJM5McIb7C3PDT905vy/fcXVTpuXtf1iBrZVOLsq+ifcn8u3YZ8D5zzhC+p4LNDH+re8+3MO3pd+55OgPfPLKgr7FRu7rGLIGMvRIYnxiR6hjJ2wmAOniJyoFdLxSHQ44NoQtq0lTnfHZ2i6rUA3h6syoy2pFjjm8OYfaH5YHq8T0oWoaXxYR4W7/IA== 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=DURtoK7Eo/KOt2TOBS3HLim3hNZQVHhh43H5x2GAUvo=; b=g8eUQ3z5xYOm92twCWDkWwNDxgrygID4zrYbJULAArgEHOCbbis0Mct8LrDJsklko0j+HjKONr2vEHSibp0Ss0YvUt3szo1c7OZeb62alQe7j4Fub3IYwgXZZ5HXXxbGWhxFYlcQ03dnNeCF0vvuVZgMo3QsT4go/9DOogQPuPU= 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 MWHPR11MB1792.namprd11.prod.outlook.com (2603:10b6:300:10b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 16:03:57 +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:03:57 +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 13/16] staging: wfx: drop useless checks in wfx_do_unjoin() Date: Mon, 20 Apr 2020 18:03:08 +0200 Message-Id: <20200420160311.57323-14-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:03:55 +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: 0046ccdc-f3a6-41c9-99a9-08d7e5446e90 X-MS-TrafficTypeDiagnostic: MWHPR11MB1792: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; 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)(39850400004)(346002)(376002)(366004)(396003)(136003)(66476007)(66556008)(186003)(66946007)(4326008)(86362001)(4744005)(16526019)(107886003)(6666004)(81156014)(7696005)(478600001)(52116002)(8676002)(66574012)(54906003)(316002)(6486002)(1076003)(2616005)(36756003)(8936002)(5660300002)(2906002); 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: MCXO44sGTc7ItFqXhccfQ5FLRj0q8yOg4QtBxxTOXlMAG6Td8bQAAasXdsznPZXWxfh52cMaZpP+cEiMBu4oElWhK1ZeZH61W0YOufUm6/j0tU9j4gC4Gk2H6PVN8GoICbjFwV0Ayt80yHlRsSo+fz9O+2rCjOlgOnDgp+TDh9KozLAZRI5QV4H9c2sTPXjbrCstzOQpzXwjw7raO+odJDW8uMxVtbTuEUGtxD219VZxR9ILFC5lVCVZFseFBFbFo4HnFEUpVY0TVQEuStjeFdjn9Uq4hQ1rJEGWXNRGaxeUytGOc9uuqdL/sXyb59UDzawgmjAqUWGqZgQLK4cqP788JssRxj8XDBMTCfRdgu36W4TJ/UIwm8jMDPF3GRM60+21OJMgUUbtv4P3WDCeglGc4j+VoO4vqmiQ8X+YzVM4TcK8RR/9fmjKNZNvXDsy X-MS-Exchange-AntiSpam-MessageData: 2L65xFSs9gGcpRE87XR7DFRt7htDr8UWSwRIvZYC/eUeJ4VXchld1EypyngKnbN1YtCyV3qEqgrYepm6huTAY/q41tu5CmoIyIUuOg2+VcSOEwLpZe20kP4H0dMcOlnxD3gBPsBgbOw9TpfBv7fyXda4jm+3KVjLJ1BzL2np7ZpRu8q2G/GJoRBfZJhXKJHPW4Z2DjDPjiDYBi6774c8Ii/jmi/BYNZw5h6Rds+7uadQzoQH/sTZMjLURblSIXgNrIrqQ7tBiQ67G7RL3KMI3bKmu8Z2Soum3d+4luYJyD2B7yVaT54K7zw555Ba4UVJR+RAXAIGn+Yb2DbI3ZE0G/wnlWMWdHeK+f81GATuBEhJkoQ1N1S0V/+vIzJTw5NIYiH2HPrt6j8V8z+8A1JS5ehHg0JtLliiST3K4lhP1iKp93aDh3dV+ly1IqwW5HQE5zAcBzWLDzAXefmxFgjoYqscoIFiF0GHFBjWohyxX/XU62lnuG7EBg9efkQefBz0CrFHyA6GfmUhzd26lEtJwIkxShGbxaE+GxKx2EQh+9AlUTn6OQBcehbdGWEmYr5yyD647tdb+fjfbHjo78HHymQ/npzIOpLFtGsE13gLSoTabn34tgYl70qRwHrAHF+69EKtN+XwzY88smIWfJswyruTqrnZzuY9M2+nNgetq0dXKe4y5CBE8gsunqc2LRLgEBP6htZT/jiQnbnUIufz3KAgVaZwvMoql8PKMd1fCryioasOr2P9i0GgAb8gbH8XvHQJ3enLUBZhIHG+uuDeOClovmSPaubbvSoHDhlSqotpE1OidJngmCJNEznNnkInQxVxScMkIBpGsCnubthxSUb7Jn30R5Wo6wNZBlaFKZ4= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0046ccdc-f3a6-41c9-99a9-08d7e5446e90 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:57.5329 (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: yz7mZRQeVWsGF6FpiessTpCAjKx+uV6IyNokODaP6Z/yrv49l3Cdwwsvkt5tG3dbhM83qPm15lqLC5mpmv9IRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1792 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The callers of wfx_do_unjoin() already take care of vif state. Therefore, it is not necessary to take care of the status of the interface. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 56cb6fff4a06..bc891b6e4392 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -286,12 +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) { - if (!wvif->state) - return; - - if (wvif->state == WFX_STATE_AP) - return; - wvif->state = WFX_STATE_PASSIVE; /* Unjoin is a reset. */