From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH v2 11/12] staging: r8188eu: xmit_priv's vcs is not used
Date: Mon, 9 Jan 2023 22:28:51 +0100 [thread overview]
Message-ID: <20230109212852.75612-12-martin@kaiser.cx> (raw)
In-Reply-To: <20230109212852.75612-1-martin@kaiser.cx>
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 <martin@kaiser.cx>
---
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
next prev parent reply other threads:[~2023-01-09 21:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-08 18:57 [PATCH 00/13] staging: r8188eu: some more xmit cleanups Martin Kaiser
2023-01-08 18:57 ` [PATCH 01/13] staging: r8188eu: beq_cnt is write-only Martin Kaiser
2023-01-08 18:57 ` [PATCH 02/13] staging: r8188eu: bkq_cnt " Martin Kaiser
2023-01-08 18:57 ` [PATCH 03/13] staging: r8188eu: viq_cnt " Martin Kaiser
2023-01-08 18:57 ` [PATCH 04/13] staging: r8188eu: voq_cnt " Martin Kaiser
2023-01-08 18:57 ` [PATCH 05/13] staging: r8188eu: replace switch with if Martin Kaiser
2023-01-08 18:57 ` [PATCH 06/13] staging: r8188eu: make rtl8188eu_inirp_init a void function Martin Kaiser
2023-01-08 19:57 ` Pavel Skripkin
2023-01-09 21:24 ` Martin Kaiser
2023-01-08 18:57 ` [PATCH 07/13] staging: r8188eu: dir_dev is unused Martin Kaiser
2023-01-08 18:57 ` [PATCH 08/13] staging: r8188eu: remove unused hal_xmit_handler define Martin Kaiser
2023-01-08 18:57 ` [PATCH 09/13] staging: r8188eu: txirp_cnt is write-only Martin Kaiser
2023-01-08 18:57 ` [PATCH 10/13] staging: r8188eu: remove unused QSLT defines Martin Kaiser
2023-01-08 18:57 ` [PATCH 11/13] staging: r8188eu: xmit_priv's vcs_type is not used Martin Kaiser
2023-01-08 18:57 ` [PATCH 12/13] staging: r8188eu: xmit_priv's vcs " Martin Kaiser
2023-01-08 18:57 ` [PATCH 13/13] staging: r8188eu: xmit_priv's vcs_setting " Martin Kaiser
2023-01-08 20:44 ` [PATCH 00/13] staging: r8188eu: some more xmit cleanups Philipp Hortmann
2023-01-09 21:28 ` [PATCH v2 00/12] " Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 01/12] staging: r8188eu: beq_cnt is write-only Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 02/12] staging: r8188eu: bkq_cnt " Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 03/12] staging: r8188eu: viq_cnt " Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 04/12] staging: r8188eu: voq_cnt " Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 05/12] staging: r8188eu: replace switch with if Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 06/12] staging: r8188eu: dir_dev is unused Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 07/12] staging: r8188eu: remove unused hal_xmit_handler define Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 08/12] staging: r8188eu: txirp_cnt is write-only Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 09/12] staging: r8188eu: remove unused QSLT defines Martin Kaiser
2023-01-09 21:28 ` [PATCH v2 10/12] staging: r8188eu: xmit_priv's vcs_type is not used Martin Kaiser
2023-01-09 21:28 ` Martin Kaiser [this message]
2023-01-09 21:28 ` [PATCH v2 12/12] staging: r8188eu: xmit_priv's vcs_setting " Martin Kaiser
2023-01-09 22:34 ` [PATCH v2 00/12] staging: r8188eu: some more xmit cleanups Philipp Hortmann
2023-01-10 18:13 ` Pavel Skripkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230109212852.75612-12-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox