diff options
author | Ross Schmidt <ross.schm.dev@gmail.com> | 2020-12-05 21:45:11 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-07 15:12:40 +0100 |
commit | 98b32c71a455ff289442779fee02ad60a6217006 (patch) | |
tree | 734b3e6e1d71aa794bcc2e79af4e9e89513501e5 /drivers | |
parent | 2415ae7fa2c7c23436d711eb75c5d40481d5a256 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 12 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/include/wifi.h | 7 |
5 files changed, 10 insertions, 17 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 865354a9851c..540041d326ae 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -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); diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 239c89ce7dc9..0743e56582ba 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -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 */ diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index de8caa6cd418..84e963909283 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -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: diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c index 08abfb8ec4c7..718ee9eee87c 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c @@ -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); diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wifi.h index 181c29b73617..9c92b5020fbc 100644 --- a/drivers/staging/rtl8723bs/include/wifi.h +++ b/drivers/staging/rtl8723bs/include/wifi.h @@ -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 |