Commit eb67bf26 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman

staging: r8188eu: xmit_priv's vcs is not used

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: default avatarMartin Kaiser <martin@kaiser.cx>
Acked-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-12-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 393669c7
...@@ -444,8 +444,6 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex ...@@ -444,8 +444,6 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
if (check_fwstate(pmlmepriv, _FW_LINKED) && if (check_fwstate(pmlmepriv, _FW_LINKED) &&
is_same_network(&pmlmepriv->cur_network.network, pnetwork)) { is_same_network(&pmlmepriv->cur_network.network, pnetwork)) {
update_network(&pmlmepriv->cur_network.network, pnetwork, adapter, true); 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 ...@@ -1027,9 +1025,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
break; 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); rtw_update_ht_cap(padapter, cur_network->network.IEs, cur_network->network.IELength);
} }
......
...@@ -1099,40 +1099,6 @@ s32 rtw_put_snap(u8 *data, u16 h_proto) ...@@ -1099,40 +1099,6 @@ s32 rtw_put_snap(u8 *data, u16 h_proto)
return SNAP_SIZE + sizeof(u16); 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) void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz)
{ {
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
......
...@@ -268,7 +268,6 @@ struct xmit_priv { ...@@ -268,7 +268,6 @@ struct xmit_priv {
uint frag_len; uint frag_len;
struct adapter *adapter; struct adapter *adapter;
u8 vcs_setting; u8 vcs_setting;
u8 vcs;
u64 tx_bytes; u64 tx_bytes;
u64 tx_pkts; u64 tx_pkts;
u64 tx_drop; u64 tx_drop;
...@@ -312,7 +311,6 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, ...@@ -312,7 +311,6 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv,
struct xmit_buf *pxmitbuf); struct xmit_buf *pxmitbuf);
void rtw_count_tx_stats(struct adapter *padapter, void rtw_count_tx_stats(struct adapter *padapter,
struct xmit_frame *pxmitframe, int sz); 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, s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr,
struct pkt_attrib *pattrib); struct pkt_attrib *pattrib);
s32 rtw_put_snap(u8 *data, u16 h_proto); s32 rtw_put_snap(u8 *data, u16 h_proto);
......
...@@ -393,7 +393,6 @@ static void rtw_init_default_value(struct adapter *padapter) ...@@ -393,7 +393,6 @@ static void rtw_init_default_value(struct adapter *padapter)
/* xmit_priv */ /* xmit_priv */
pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense; pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense;
pxmitpriv->vcs = pregistrypriv->vcs_type;
pxmitpriv->frag_len = pregistrypriv->frag_thresh; pxmitpriv->frag_len = pregistrypriv->frag_thresh;
/* mlme_priv */ /* mlme_priv */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment