From patchwork Mon Apr 20 16:03:01 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: 215912 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 D037BC3A5A0 for ; Mon, 20 Apr 2020 16:05:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A6F572078E for ; Mon, 20 Apr 2020 16:05: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="FWti3igT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728861AbgDTQDq (ORCPT ); Mon, 20 Apr 2020 12:03:46 -0400 Received: from mail-mw2nam10on2061.outbound.protection.outlook.com ([40.107.94.61]:6055 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728691AbgDTQDp (ORCPT ); Mon, 20 Apr 2020 12:03:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WOQqRBfRsrObs25L4O5Rzjt9pH7C8sttgh561T9F7fIx6w7ry+7h9WWjweT98GSpGcF36ey0nME9/r0ktIbbm5pfFPGGhzeUgXyux+E52+fEMiQRcJ3EHPjOwA0KswlzPtI3OCCYoBhohJt/yMTB/22QOjFhJPTXUhESfqd6nQnSZ/SEyI+UAV36oDETT0MMP+NtigeRkRJPvSy9zaayXEDbaSir44Xk3ekFemr3lL/Yl/XKILrsGJOrvRqiPBBn8lytnIiwppGViE+WkaXRiqXUkTe6bil4BcWvsjYn7kcb7W8gOeI6hHm5quZzMQsQfq8JOrTQneKcYt7nUGujWg== 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=ggeuuNXuX9ydvLStcV/yrVHa8U5v9ZFTwIl4pzB4nzA=; b=k1eSbGA+IWsnTS/VE/k90Xzr3ExCSWMlmAbVokqd0WOyD7k5/IDwcx8LYdbeN//UmcFTKosfQPJ7ZCT8B5PzI9dT9d8rShm6IHYBfc/94EBToQrIzdCLVbnU5RUDyTLgfBgnlvL24gHnycPIjSTuXEuHNXPppkAtHeGKLLsgT8H/fJ+e+XPGx/gpXZN1oSmH3PLwNgkLPSNDGu9NlNtOXX+HB+NIgK2qZSMeURDHyaVJy5WZovsQuYq0Iis/g1TQ9yrYzXKPLQw0X8uhXMYH+iPA+4NEvSEIjwSByaX7oGmBrAbyfODLqZsTYAwAdt1hyNfTm8FlRSpODCIAufdmPQ== 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=ggeuuNXuX9ydvLStcV/yrVHa8U5v9ZFTwIl4pzB4nzA=; b=FWti3igTLlQ4xSRzMyj7ECDdxScSSp/k+nVKFDTsLS45TFtfRR6BwdwQgCNUczaZT6pIXNgAxJ/0veDExOtOXiVZtugfu8/Ng9n34UGWDF51p/IL+heuEvdzuefAKPGzLGn03bH0/QsZadjDCfl4kHGcwR3BqIMcdlzevDhUf3U= 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:03:41 +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:41 +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 06/16] staging: wfx: dual CTS is never necessary Date: Mon, 20 Apr 2020 18:03:01 +0200 Message-Id: <20200420160311.57323-7-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:39 +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: f6c021c7-f708-47dc-e1e2-08d7e54464cf X-MS-TrafficTypeDiagnostic: MWHSPR00MB249: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; 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)(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: dCCnfp5OTejGxhE+qWut2jnsABbDXpF5Nr+SpFQeNKJ5PASjbwoKAWc6kbufikmzcg4s1rdDP0a4fy8G1Uu3DIqaB4ndWaT+ysX+2b6wGUv4uh75nRdhEOu6tG6tqXGv7+4MPCMpZx6qnCsjjWyA7h3bvsVynxx9NbCNwFNORKEF909O3AL5s4I2PxTWcgFtmKx4iBH3jrSizUzjpo3Gtu/R7JPBknIsD3jcWAqv1DnAeS1r9KyoQxN9a0D/K3hieTHOCBXcOti29jRd8arKiqUR9ChwrNoS8W/wsF38SbeC4A20GIG6jW1GeQDUSAj+DpwuFwjvXjTFYeSoD180lY1Uf3NqZ+vzh50s3T12ubDcj0gwyH0ME55hsUZZUBE7uUWERYa6HgC0hq/3lDKfnqBkteyvLYN/bHDTqx0Ax8xPrwy1fUBzm6m9UKowRGCu X-MS-Exchange-AntiSpam-MessageData: dgT1W6dZA+JHlq4l9ZTwreg+75A7a8Nwy8HWo/mQLzvZ9gMB/2LL0rqmvJ5xnyBuaY2NC2oFEjpzKBcaTtK6FLNHVeBP+ztD7xKFfQatl4sa7fbfmALO26tQOuEN4ocow2vWgF/iFzG8M1j9IiGXcGucBXucxvYTexdS9euqE1ql2uBOjv0+o8wM9AJCPskx0adiITa7OF0yngGb6/U8Lj7N04SoJ0MefYGYpIk+bfzBBdovMTwmLUxSxnHCbrCZIAek1bqs0NKsWF14+Po9h/GkVmV3gwiQ0NtYAK6MYny3ovXgFJRKJPYTCA+BvObsDUrrTUK3bzhzBrYwh18smRXnQYHRIsjLuoHGAugPKdMpb27G7ejeWEX75i6Z30pw2CbDkAotMEtCzE72uwTN2OslHo2v4wbXV26synTgwN8PtayqD6lhp1jytJYJwlGsn1oUeXImhvuqw3K7opk8wLSCSqt5oVDQDyoZ/pkRD+hBu3ERIducmi4Dkor2cOC/eYX5YcfuweXhH69sbdydsF57IlezLsLQw8Lni8RglLUi9m8JjgOXfPbJXXQdXRyca3wuFCyFfhkrLsZv9RUsAFfQ3ilYGDMFmK95r7Mb7pyFbx0N/Q6OP68qKVQ1XreXcvyfYlFVKI4x40h4Sb/vflTMi02Q+Vd3Fa3tJYsGTgthtiHpJW0wKa6fuQBUlYSi/kya1knQsPkatKiekbMKtptwbhv7nco7taVn5gLS+4N2ZXbDx7yyQxVMcasIFl8561i58JTmafxosXuXLxhcCDUAfO4wBE32KOzEcONB8kTEHxaaWySocdx7sr/ZxnpOStuHcDlrPQLoqOYjIzUdPdudf4iSG/9jSUdg9eGD6jY= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6c021c7-f708-47dc-e1e2-08d7e54464cf X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:41.1855 (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: y1Jz1KLkPQw7kyD7mDQl3KtAveI60M9yMNJUsoUEs1XiVZ5o8EFXBGQkT6jTrHWzosGL5oZafGTAUyFDUKDBBw== 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 Dual CTS is only necessary when sending/receiving STBC data. However, the chip does not support STBC, so it is never necessary to enable double CTS. We can simplify the code. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_mib.h | 6 ------ drivers/staging/wfx/hif_tx_mib.c | 10 ---------- drivers/staging/wfx/hif_tx_mib.h | 1 - drivers/staging/wfx/sta.c | 6 ------ 4 files changed, 23 deletions(-) diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index 9f30cf503ad5..6f1434795fa8 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -379,12 +379,6 @@ struct hif_mib_protected_mgmt_policy { u8 reserved2[3]; } __packed; -struct hif_mib_set_ht_protection { - u8 dual_cts_prot:1; - u8 reserved1:7; - u8 reserved2[3]; -} __packed; - struct hif_mib_keep_alive_period { __le16 keep_alive_period; u8 reserved[2]; diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 1d26d740bd0b..f04116ecb373 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -365,16 +365,6 @@ int hif_slot_time(struct wfx_vif *wvif, int val) &arg, sizeof(arg)); } -int hif_dual_cts_protection(struct wfx_vif *wvif, bool enable) -{ - struct hif_mib_set_ht_protection arg = { - .dual_cts_prot = enable, - }; - - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SET_HT_PROTECTION, - &arg, sizeof(arg)); -} - int hif_wep_default_key_id(struct wfx_vif *wvif, int val) { struct hif_mib_wep_default_key_id arg = { diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index 0f8b3bd9f14e..bb7c104a03d8 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -52,7 +52,6 @@ int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable); int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val); int hif_erp_use_protection(struct wfx_vif *wvif, bool enable); int hif_slot_time(struct wfx_vif *wvif, int val); -int hif_dual_cts_protection(struct wfx_vif *wvif, bool enable); int hif_wep_default_key_id(struct wfx_vif *wvif, int val); int hif_rts_threshold(struct wfx_vif *wvif, int val); diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index a0c7737903b9..2a9c7f28d934 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -482,12 +482,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif, else bss_params.operational_rate_set = -1; rcu_read_unlock(); - if (sta && - info->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT) - hif_dual_cts_protection(wvif, true); - else - hif_dual_cts_protection(wvif, false); - // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use // the same value. bss_params.beacon_lost_count = 7;