Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5241665rwl; Sun, 8 Jan 2023 11:06:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXsxdh0qBPFszYHCgy6jndOT86bFcVcvD1wvAgf2ONrPNHOJpsILTaA6y0zuq3tAIhIlr2mc X-Received: by 2002:a17:906:cd1a:b0:801:d0bc:f616 with SMTP id oz26-20020a170906cd1a00b00801d0bcf616mr71000093ejb.62.1673204777209; Sun, 08 Jan 2023 11:06:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204777; cv=none; d=google.com; s=arc-20160816; b=JAURLw9W/ydU8SZVIk2UdC3fR2eRmH0CUEb+S0cNVqlSHswRE0x8T1kkJtx9f5dY4r VtMe+Q58s/hZ3r7FZsx9JM4hPaNZfuyreF4XZeedC1Eph8Qp+iUozCH9p5RJ4Teuk+2/ 32+vrwx8qBeyu3oQp+r+8B6Ln24Fe64edmb0j4hNMtnWkZe0G7R1QXGnd+XXSbkT4FRV itvxScdc+g7eiEW1lBFdInmYasakFNVDZPVJVkx4FSlBkA+4Vfoz0260e7csV7uZywU0 8v6A8LRMoipucOTDxDyhfqnWwcp/x1IK8kQU92Vg9CH8BPbLHBlosAq4Li/Ri9XQrr3F DBdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SFilvH1g/Bb+qK7QsmXseOAddGVaE8m9tWzulwv+2ZM=; b=rJW/da8avbiO8dx3rIgnmL8IuoeZC/+BjOjXNB+R158OZTD2adtAM3GFAsFMg9w3eu yAVL3KABMoF93rQq3XYuZk9e2MLt7cLR9u4/sGVM5pywuT7U89KFn4xk6+wgI+Mq0DrM JQbhLtpoMHF0ieqBQRch5F660vjnIpNoV60DydrjFmOSmiU273CYDkopY+K/088MzmM2 42kpMQQY0jBotRIZbwDnLhi7Tlu/OqBKRXQ6AXXFNLfF/XIjzAJWosO3u73IUGankrY+ T/6v4ZhYStuF8oldetSGBImzyOLpoQM+nLOqme0/ezVw/pXpJ8upqPKFEzNRskdUfnMl Q/6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji1-20020a170907980100b0084514612c2fsi7338488ejc.613.2023.01.08.11.06.05; Sun, 08 Jan 2023 11:06:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236095AbjAHS6x (ORCPT + 51 others); Sun, 8 Jan 2023 13:58:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236242AbjAHS6G (ORCPT ); Sun, 8 Jan 2023 13:58:06 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9704EE00C for ; Sun, 8 Jan 2023 10:58:05 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pEaro-0003b8-H6; Sun, 08 Jan 2023 19:58:00 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 12/13] staging: r8188eu: xmit_priv's vcs is not used Date: Sun, 8 Jan 2023 19:57:37 +0100 Message-Id: <20230108185738.597105-13-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The vcs component in struct xmit_priv is set but not used. We can remove vcs and the rtw_update_protection function, whose only job is to set vcs. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme.c | 5 ---- drivers/staging/r8188eu/core/rtw_xmit.c | 34 ---------------------- drivers/staging/r8188eu/include/rtw_xmit.h | 2 -- drivers/staging/r8188eu/os_dep/os_intfs.c | 1 - 4 files changed, 42 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index b272123626ac..fb7d0e161fdd 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -444,8 +444,6 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex if (check_fwstate(pmlmepriv, _FW_LINKED) && is_same_network(&pmlmepriv->cur_network.network, pnetwork)) { update_network(&pmlmepriv->cur_network.network, pnetwork, adapter, true); - rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof(struct ndis_802_11_fixed_ie), - pmlmepriv->cur_network.network.IELength); } } @@ -1027,9 +1025,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net break; } - rtw_update_protection(padapter, (cur_network->network.IEs) + - sizeof(struct ndis_802_11_fixed_ie), - (cur_network->network.IELength)); rtw_update_ht_cap(padapter, cur_network->network.IEs, cur_network->network.IELength); } diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 1cd560630de3..8b055e3fbfa5 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1099,40 +1099,6 @@ s32 rtw_put_snap(u8 *data, u16 h_proto) return SNAP_SIZE + sizeof(u16); } -void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len) -{ - uint protection; - u8 *perp; - int erp_len; - struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - struct registry_priv *pregistrypriv = &padapter->registrypriv; - - switch (pxmitpriv->vcs_setting) { - case DISABLE_VCS: - pxmitpriv->vcs = NONE_VCS; - break; - case ENABLE_VCS: - break; - case AUTO_VCS: - default: - perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len); - if (!perp) { - pxmitpriv->vcs = NONE_VCS; - } else { - protection = (*(perp + 2)) & BIT(1); - if (protection) { - if (pregistrypriv->vcs_type == RTS_CTS) - pxmitpriv->vcs = RTS_CTS; - else - pxmitpriv->vcs = CTS_TO_SELF; - } else { - pxmitpriv->vcs = NONE_VCS; - } - } - break; - } -} - void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz) { struct sta_info *psta = NULL; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 77d79c43209f..abac0103b53a 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -268,7 +268,6 @@ struct xmit_priv { uint frag_len; struct adapter *adapter; u8 vcs_setting; - u8 vcs; u64 tx_bytes; u64 tx_pkts; u64 tx_drop; @@ -311,7 +310,6 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf); void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz); -void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len); s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrib); s32 rtw_put_snap(u8 *data, u16 h_proto); diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index ae03d39de092..f022f6b1cf3e 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -393,7 +393,6 @@ static void rtw_init_default_value(struct adapter *padapter) /* xmit_priv */ pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense; - pxmitpriv->vcs = pregistrypriv->vcs_type; pxmitpriv->frag_len = pregistrypriv->frag_thresh; /* mlme_priv */ -- 2.30.2