The local variable max_rx_ampdu_factor in rtw_restructure_ht_ie() and issue_action_BA() is always set to MAX_AMPDU_FACTOR_64K. Remove the variable from both functions and use MAX_AMPDU_FACTOR_64K directly. The case HW_VAR_MAX_RX_AMPDU_FACTOR in GetHalDefVar8188EUsb() is now unused and can be removed. Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_mlme.c | 4 +--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 20 +------------------- drivers/staging/r8188eu/hal/usb_halinit.c | 3 --- drivers/staging/r8188eu/include/hal_intf.h | 1 - drivers/staging/r8188eu/include/wifi.h | 7 +------ 5 files changed, 3 insertions(+), 32 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index 094885c80a1a..038bddc361c3 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -1894,7 +1894,6 @@ void rtw_joinbss_reset(struct adapter *padapter) unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len) { u32 ielen, out_len; - enum ht_cap_ampdu_factor max_rx_ampdu_factor; unsigned char *p; struct ieee80211_ht_cap ht_capie; unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00}; @@ -1930,8 +1929,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_ AMPDU_para [4:2]:Min MPDU Start Spacing */ - GetHalDefVar8188EUsb(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor); - ht_capie.ampdu_params_info = (max_rx_ampdu_factor & 0x03); + ht_capie.ampdu_params_info = (MAX_AMPDU_FACTOR_64K & 0x03); if (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_) ht_capie.ampdu_params_info |= (IEEE80211_HT_AMPDU_PARM_DENSITY & (0x07 << 2)); diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index aa5ed6ecc432..d60882983086 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -5747,7 +5747,6 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch u16 BA_timeout_value; __le16 le_tmp; u16 BA_starting_seqctrl = 0; - enum ht_cap_ampdu_factor max_rx_ampdu_factor; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; u8 *pframe; @@ -5830,24 +5829,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch pframe = rtw_set_fixed_ie(pframe, 1, &pmlmeinfo->ADDBA_req.dialog_token, &pattrib->pktlen); pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)&status, &pattrib->pktlen); BA_para_set = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f; - GetHalDefVar8188EUsb(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor); - switch (max_rx_ampdu_factor) { - case MAX_AMPDU_FACTOR_64K: - BA_para_set |= 0x1000; /* 64 buffer size */ - break; - case MAX_AMPDU_FACTOR_32K: - BA_para_set |= 0x0800; /* 32 buffer size */ - break; - case MAX_AMPDU_FACTOR_16K: - BA_para_set |= 0x0400; /* 16 buffer size */ - break; - case MAX_AMPDU_FACTOR_8K: - BA_para_set |= 0x0200; /* 8 buffer size */ - break; - default: - BA_para_set |= 0x1000; /* 64 buffer size */ - break; - } + BA_para_set |= 0x1000; /* 64 buffer size */ if (pregpriv->ampdu_amsdu == 0)/* disabled */ BA_para_set = BA_para_set & ~BIT(0); diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 4bb1812f5ae7..87382806774b 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -1625,9 +1625,6 @@ u8 GetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable case HAL_DEF_DBG_DM_FUNC: *((u32 *)pValue) = haldata->odmpriv.SupportAbility; break; - case HW_VAR_MAX_RX_AMPDU_FACTOR: - *((u32 *)pValue) = MAX_AMPDU_FACTOR_64K; - break; case HW_DEF_RA_INFO_DUMP: { u8 entry_id = *((u8 *)pValue); diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h index 231badaa9cce..f382b7fefb4a 100644 --- a/drivers/staging/r8188eu/include/hal_intf.h +++ b/drivers/staging/r8188eu/include/hal_intf.h @@ -77,7 +77,6 @@ enum hal_def_variable { HAL_DEF_CURRENT_ANTENNA, HAL_DEF_DBG_DUMP_RXPKT,/* for dbg */ HAL_DEF_DBG_DM_FUNC,/* for dbg */ - HW_VAR_MAX_RX_AMPDU_FACTOR, HW_DEF_RA_INFO_DUMP, HAL_DEF_DBG_DUMP_TXPKT, }; diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h index 0b0bd39a257f..e7083d721dae 100644 --- a/drivers/staging/r8188eu/include/wifi.h +++ b/drivers/staging/r8188eu/include/wifi.h @@ -569,12 +569,7 @@ struct ADDBA_request { __le16 BA_starting_seqctrl; } __packed; -enum ht_cap_ampdu_factor { - MAX_AMPDU_FACTOR_8K = 0, - MAX_AMPDU_FACTOR_16K = 1, - MAX_AMPDU_FACTOR_32K = 2, - MAX_AMPDU_FACTOR_64K = 3, -}; +#define MAX_AMPDU_FACTOR_64K 3 /* Spatial Multiplexing Power Save Modes */ #define WLAN_HT_CAP_SM_PS_STATIC 0 -- 2.34.1