staging: rtl8723bs: replace HT_CAP_AMPDU_FACTOR
Replace unique HT_CAP_AMPDU_FACTOR enum with kernel provided ieee80211_max_ampdu_length_exp enum. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201206034517.4276-4-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2415ae7fa2
commit
98b32c71a4
|
@ -2585,7 +2585,7 @@ void rtw_build_wmm_ie_ht(struct adapter *padapter, u8 *out_ie, uint *pout_len)
|
|||
unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len, u8 channel)
|
||||
{
|
||||
u32 ielen, out_len;
|
||||
enum HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor;
|
||||
enum ieee80211_max_ampdu_length_exp max_rx_ampdu_factor;
|
||||
unsigned char *p, *pframe;
|
||||
struct ieee80211_ht_cap ht_capie;
|
||||
u8 cbw40_enable = 0, stbc_rx_enable = 0, rf_type = 0, operation_bw = 0;
|
||||
|
@ -2705,7 +2705,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
|
|||
|
||||
if (padapter->driver_rx_ampdu_factor != 0xFF)
|
||||
max_rx_ampdu_factor =
|
||||
(enum HT_CAP_AMPDU_FACTOR)padapter->driver_rx_ampdu_factor;
|
||||
(enum ieee80211_max_ampdu_length_exp)padapter->driver_rx_ampdu_factor;
|
||||
else
|
||||
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR,
|
||||
&max_rx_ampdu_factor);
|
||||
|
|
|
@ -3880,7 +3880,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
|
|||
u16 reason_code;
|
||||
u16 BA_timeout_value;
|
||||
u16 BA_starting_seqctrl = 0;
|
||||
enum HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor;
|
||||
enum ieee80211_max_ampdu_length_exp max_rx_ampdu_factor;
|
||||
struct xmit_frame *pmgntframe;
|
||||
struct pkt_attrib *pattrib;
|
||||
u8 *pframe;
|
||||
|
@ -3975,18 +3975,18 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
|
|||
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen));
|
||||
if (padapter->driver_rx_ampdu_factor != 0xFF)
|
||||
max_rx_ampdu_factor =
|
||||
(enum HT_CAP_AMPDU_FACTOR)padapter->driver_rx_ampdu_factor;
|
||||
(enum ieee80211_max_ampdu_length_exp)padapter->driver_rx_ampdu_factor;
|
||||
else
|
||||
rtw_hal_get_def_var(padapter,
|
||||
HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
|
||||
|
||||
if (MAX_AMPDU_FACTOR_64K == max_rx_ampdu_factor)
|
||||
if (IEEE80211_HT_MAX_AMPDU_64K == max_rx_ampdu_factor)
|
||||
BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); /* 64 buffer size */
|
||||
else if (MAX_AMPDU_FACTOR_32K == max_rx_ampdu_factor)
|
||||
else if (IEEE80211_HT_MAX_AMPDU_32K == max_rx_ampdu_factor)
|
||||
BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x0800); /* 32 buffer size */
|
||||
else if (MAX_AMPDU_FACTOR_16K == max_rx_ampdu_factor)
|
||||
else if (IEEE80211_HT_MAX_AMPDU_16K == max_rx_ampdu_factor)
|
||||
BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x0400); /* 16 buffer size */
|
||||
else if (MAX_AMPDU_FACTOR_8K == max_rx_ampdu_factor)
|
||||
else if (IEEE80211_HT_MAX_AMPDU_8K == max_rx_ampdu_factor)
|
||||
BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x0200); /* 8 buffer size */
|
||||
else
|
||||
BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); /* 64 buffer size */
|
||||
|
|
|
@ -4373,7 +4373,7 @@ u8 GetHalDefVar8723B(struct adapter *padapter, enum HAL_DEF_VARIABLE variable, v
|
|||
/* Stanley@BB.SD3 suggests 16K can get stable performance */
|
||||
/* The experiment was done on SDIO interface */
|
||||
/* coding by Lucas@20130730 */
|
||||
*(u32 *)pval = MAX_AMPDU_FACTOR_16K;
|
||||
*(u32 *)pval = IEEE80211_HT_MAX_AMPDU_16K;
|
||||
break;
|
||||
case HAL_DEF_TX_LDPC:
|
||||
case HAL_DEF_RX_LDPC:
|
||||
|
|
|
@ -1802,7 +1802,7 @@ static u8 GetHalDefVar8723BSDIO(
|
|||
case HW_VAR_MAX_RX_AMPDU_FACTOR:
|
||||
/* Stanley@BB.SD3 suggests 16K can get stable performance */
|
||||
/* coding by Lucas@20130730 */
|
||||
*(u32 *)pValue = MAX_AMPDU_FACTOR_16K;
|
||||
*(u32 *)pValue = IEEE80211_HT_MAX_AMPDU_16K;
|
||||
break;
|
||||
default:
|
||||
bResult = GetHalDefVar8723B(Adapter, eVariable, pValue);
|
||||
|
|
|
@ -612,13 +612,6 @@ struct ADDBA_request {
|
|||
__le16 BA_starting_seqctrl;
|
||||
} __attribute__ ((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,
|
||||
};
|
||||
|
||||
/* 802.11n HT capabilities masks */
|
||||
#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
|
||||
#define IEEE80211_HT_CAP_SUP_WIDTH 0x0002
|
||||
|
|
Loading…
Reference in New Issue