Commit a90928f7 authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: Remove variable ieee->short_slot



ieee->short_slot also named priv->rtllib->short_slot is initialized to 1
and then unchanged. All evaluations will result accordingly. Remove
resulting dead code.

Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/74fe53ccfafe2e0e18319b5502ed83544cc3ffd8.1687583718.git.philipp.g.hortmann@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c011feb4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -774,7 +774,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
	priv->retry_data = DEFAULT_RETRY_DATA;
	priv->rtllib->rts = DEFAULT_RTS_THRESHOLD;
	priv->rtllib->rate = 110;
	priv->rtllib->short_slot = 1;
	priv->promisc = (dev->flags & IFF_PROMISC) ? 1 : 0;
	priv->bcck_in_ch14 = false;
	priv->cck_present_attn = 0;
+0 −1
Original line number Diff line number Diff line
@@ -1486,7 +1486,6 @@ struct rtllib_device {

	enum rtl_link_state link_state;

	int short_slot;
	int mode;       /* A, B, G */

	/* used for forcing the ibss workqueue to terminate
+3 −7
Original line number Diff line number Diff line
@@ -852,8 +852,7 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_device *ieee,
		cpu_to_le16(ieee->current_network.capability &
		WLAN_CAPABILITY_SHORT_PREAMBLE);

	if (ieee->short_slot && (ieee->current_network.capability &
	    WLAN_CAPABILITY_SHORT_SLOT_TIME))
	if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
		beacon_buf->capability |=
			cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);

@@ -939,9 +938,7 @@ static struct sk_buff *rtllib_assoc_resp(struct rtllib_device *ieee, u8 *dest)
	assoc->capability = cpu_to_le16(ieee->iw_mode == IW_MODE_MASTER ?
		WLAN_CAPABILITY_ESS : WLAN_CAPABILITY_IBSS);

	if (ieee->short_slot)
		assoc->capability |=
				 cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);
	assoc->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);

	crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];

@@ -1190,8 +1187,7 @@ rtllib_association_req(struct rtllib_network *beacon,
	if (beacon->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
		hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE);

	if (ieee->short_slot &&
	   (beacon->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME))
	if (beacon->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
		hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);

	hdr->listen_interval = cpu_to_le16(beacon->listen_interval);