From patchwork Fri May 15 08:33:18 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: 1290951 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=silabs.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-silabs-onmicrosoft-com header.b=Rkl7lXQg; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49NhZ95tpLz9sTM for ; Fri, 15 May 2020 18:35:45 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728198AbgEOIeT (ORCPT ); Fri, 15 May 2020 04:34:19 -0400 Received: from mail-bn8nam11on2054.outbound.protection.outlook.com ([40.107.236.54]:18393 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728128AbgEOIeO (ORCPT ); Fri, 15 May 2020 04:34:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hcw2KaPzYOoryk/Kfs5LezrsFfsTsO6mLtLntzSUs6yJnEn3kwY+0pzzeDTIKUfJEr0/GexxT8KyNGj+hkvvN5cdywaHxPIHR0E5RZJCfzupja0eT1PCPY+OHz1csjRrJdUH7lmFsjwn+MaPBsTb+fdJUrPrKYVKtW7Z9enAtLHuE6vJthOOVsWVxu7f+GT+pBAJl2fvrtM/IshnpPRQYg9d2PIRun5cCi5IzKHH/MmOMxdYxvx0cplvvrfQAJrD5yCAHErR1sgJ/d/FLggjgAVqiegJY+aTzIsQODc55Ha5brxD/cX6fwgMhyKhm0jRSuCke1fVD/J+hk996QQ4Mg== 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=LD2oN55t8Dw8tcBb5rw07q4iSwGuyj0sgAKW/og9I5o=; b=ntp3sDqTaMQKYVec60Rm28UfbkSeWIZ1hQxtNxpJyeaFb3riy94Ipn7joPGe+7soxgYwg9DlLtjWEOHtIIuPNzCHjd5ai0vGlIehNZZNT8JNCPCcIRY1ctw/sKKnI3N6TquXQgH/17wOYFmG/ECgcd+gxdKlybVrL/7pohEtjC2Gda/2ozW2JvEWRQolh9+2pZcmEGwxp0lB19wHJ22Fdp4pvjjz6QgWK4NfjWZJTelqzCd238vc0wlFYiqw2vO2T6k/fkgqXGTL+cUUZn1eEX63Kz7g85juLPkagMrb8QpYT3rRn9b37dDCuq1/cjczhk6LP5auVDMdw4AITa6nDw== 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=LD2oN55t8Dw8tcBb5rw07q4iSwGuyj0sgAKW/og9I5o=; b=Rkl7lXQg57nd1NLFleLwBi7YF7SH2dxsRUoy42pX/JytL6Ln0+WBKHlpHGBBuPYDPnSxzlhUtjl/Eg+fquNeOHxqO8Nr0G5jnXpvNEus+epkE3Cn/lrJbo8xsahBHhFilppYhuuo4W1AxBip0z4Fuyt9xjBoHJUkLrdKIaPdmmM= 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 MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB2030.namprd11.prod.outlook.com (2603:10b6:300:28::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25; Fri, 15 May 2020 08:34:11 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.3000.022; Fri, 15 May 2020 08:34:11 +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 12/19] staging: wfx: merge wfx_stop_ap() with wfx_reset() Date: Fri, 15 May 2020 10:33:18 +0200 Message-Id: <20200515083325.378539-13-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200515083325.378539-1-Jerome.Pouiller@silabs.com> References: <20200515083325.378539-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0076.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:18::16) 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 (82.67.86.106) by PR0P264CA0076.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:18::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24 via Frontend Transport; Fri, 15 May 2020 08:34:09 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 75d432f8-6dc5-41af-66ac-08d7f8aabe04 X-MS-TrafficTypeDiagnostic: MWHPR11MB2030: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:741; X-Forefront-PRVS: 04041A2886 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h6dct3yAmSgqA5MSPoUEgTcNtUE9ppfVWCS9H/b2S2U/henzi3g1XDARZQI6cm8Mn41DSr3FTh6YCdZzZuQ1es8doMwh83WjNfZ7e5z6CXKb8X7KrhnQhrb325t8nz7DUorz3egEvQ4FUbyRgNmDfIxYAhxHCLotI9NFqKT1D6BEnHUFPrkCzt/KEky/XRKuNyysUoEjxg9DPgiRagS0sd/Yn1NLMY/pM/C26dENmmDV0QKoa0xPb5nILJBLIdADgbajGw5RTPOmaD4W1WepZrQqfhC7o4KXOl/mh9LbUyRcTD6ERxHdNYf1HfSRZeMVeYao+yKgJl0TAFO48AvK0t+FiBtLIC80pBQm/5KxUJT6zbMW9GJX8pBB+gr0Y+1JuCdp2MBiJ/SDDkbZrcwSE7sknx6lefxdmAE2vSYZoCmlvIdSw006aBdXnQnLBSrl 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)(346002)(366004)(376002)(39850400004)(396003)(6486002)(8936002)(2906002)(6506007)(4744005)(316002)(52116002)(8676002)(956004)(2616005)(16526019)(54906003)(86362001)(26005)(186003)(4326008)(478600001)(1076003)(66946007)(36756003)(5660300002)(66556008)(6512007)(107886003)(66476007)(6666004)(8886007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Wy5A5xhnoqq0k7XPVhSvZpOqZMvUS8IAIyiPaTZ+d5lZpK4S/rvWv0Oh1rfsOsQr1cPfA1Xm8TwtDTpSVOaviS7cLKHv66av4JEXPMWZskIQHnQiB8kG1cufD3mxpPrU3KEgS4ufFyjNV5SX3fosmqWQTZlpQv11Ww8fV2INeAoj/e0CZG3uye3PuG72OyvsV4EaSKx0mGaLSl+bgvCIbh37kch+uq3Xo3cCXaY/yg4JnYCEcyMm88birXx44q20aIbLWOrEq+zpvswogKY2lU4Uk7kyUAv6LyyZpKCfPSMZfIVUGrW3Tk2iEc0YbKmfY+fWlo2VcYmvziLQH+7Uc/u+rfYXMs+n5X6dpi2OHtDDIpPm2A75Div6Z7CIWcpap8n7fjPMGNyK1uCbL7ouex/OKjM1Q0j0FxCUCde5N8qdcsVbdu8RukgRsLu9RiEfhLNSMYkgTPxDqeTRK8yCQ7g28kblsaCqBCov3s2c8Ag= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75d432f8-6dc5-41af-66ac-08d7f8aabe04 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 08:34:11.5081 (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: 25Vevilr/bA3LTZ5qh7bFqo6OTLO9Nn0Xxs2E9MQQIqUR7/z95KPLBzOU9UlqAN4V4PR8lJpiNaFlExzw0F7TA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB2030 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller wfx_stop_ap() and wfx_reset() do the same thing. Merge them. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index e077f42b62dc..7d9f680ca53a 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -479,11 +479,7 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; - hif_reset(wvif, false); - wfx_tx_policy_init(wvif); - if (wvif_count(wvif->wdev) <= 1) - hif_set_block_ack_policy(wvif, 0xFF, 0xFF); - wvif->bss_not_support_ps_poll = false; + wfx_reset(wvif); } static void wfx_join_finalize(struct wfx_vif *wvif,