diff options
author | Ross Schmidt <ross.schm.dev@gmail.com> | 2020-12-05 21:45:12 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-07 15:12:40 +0100 |
commit | ac74ae7671d7d3ca3c827b1820b9248d235886ff (patch) | |
tree | 7b0cd5f05eae32978f80eb3fdc3e46c2f731ec57 /drivers/staging | |
parent | 98b32c71a455ff289442779fee02ad60a6217006 (diff) | |
download | linux-ac74ae7671d7d3ca3c827b1820b9248d235886ff.tar.gz linux-ac74ae7671d7d3ca3c827b1820b9248d235886ff.tar.bz2 linux-ac74ae7671d7d3ca3c827b1820b9248d235886ff.zip |
staging: rtl8723bs: replace OP_MODE_* and HT_INFO_OPERATION_MODE_* macros
Replace unique OP_MODE_* and HT_INFO_OPERATION_MODE_* macro families
with kernel provided IEEE80211_HT_OP_MODE_* macros.
Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
Link: https://lore.kernel.org/r/20201206034517.4276-5-ross.schm.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_ap.c | 30 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/include/wifi.h | 13 |
2 files changed, 15 insertions, 28 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 984b9f5a83ac..27446156ed34 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -1842,28 +1842,28 @@ static int rtw_ht_operation_update(struct adapter *padapter) DBG_871X("%s current operation mode = 0x%X\n", __func__, pmlmepriv->ht_op_mode); - if (!(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT) + if (!(pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT) && pmlmepriv->num_sta_ht_no_gf) { pmlmepriv->ht_op_mode |= - HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT; + IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT; op_mode_changes++; } else if ((pmlmepriv->ht_op_mode & - HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT) && + IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT) && pmlmepriv->num_sta_ht_no_gf == 0) { pmlmepriv->ht_op_mode &= - ~HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT; + ~IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT; op_mode_changes++; } - if (!(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT) && + if (!(pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT) && (pmlmepriv->num_sta_no_ht || pmlmepriv->olbc_ht)) { - pmlmepriv->ht_op_mode |= HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT; + pmlmepriv->ht_op_mode |= IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT; op_mode_changes++; } else if ((pmlmepriv->ht_op_mode & - HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT) && + IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT) && (pmlmepriv->num_sta_no_ht == 0 && !pmlmepriv->olbc_ht)) { pmlmepriv->ht_op_mode &= - ~HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT; + ~IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT; op_mode_changes++; } @@ -1873,20 +1873,20 @@ static int rtw_ht_operation_update(struct adapter *padapter) */ new_op_mode = 0; if (pmlmepriv->num_sta_no_ht || - (pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT)) - new_op_mode = OP_MODE_MIXED; + (pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT)) + new_op_mode = IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED; else if ( (le16_to_cpu(phtpriv_ap->ht_cap.cap_info) & IEEE80211_HT_CAP_SUP_WIDTH) && pmlmepriv->num_sta_ht_20mhz) - new_op_mode = OP_MODE_20MHZ_HT_STA_ASSOCED; + new_op_mode = IEEE80211_HT_OP_MODE_PROTECTION_20MHZ; else if (pmlmepriv->olbc_ht) - new_op_mode = OP_MODE_MAY_BE_LEGACY_STAS; + new_op_mode = IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER; else - new_op_mode = OP_MODE_PURE; + new_op_mode = IEEE80211_HT_OP_MODE_PROTECTION_NONE; - cur_op_mode = pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_OP_MODE_MASK; + cur_op_mode = pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_PROTECTION; if (cur_op_mode != new_op_mode) { - pmlmepriv->ht_op_mode &= ~HT_INFO_OPERATION_MODE_OP_MODE_MASK; + pmlmepriv->ht_op_mode &= ~IEEE80211_HT_OP_MODE_PROTECTION; pmlmepriv->ht_op_mode |= new_op_mode; op_mode_changes++; } diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wifi.h index 9c92b5020fbc..2fb1687ecabf 100644 --- a/drivers/staging/rtl8723bs/include/wifi.h +++ b/drivers/staging/rtl8723bs/include/wifi.h @@ -673,12 +673,6 @@ struct ADDBA_request { #define WLAN_HT_CAP_SM_PS_INVALID 2 #define WLAN_HT_CAP_SM_PS_DISABLED 3 - -#define OP_MODE_PURE 0 -#define OP_MODE_MAY_BE_LEGACY_STAS 1 -#define OP_MODE_20MHZ_HT_STA_ASSOCED 2 -#define OP_MODE_MIXED 3 - #define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK ((u8) BIT(0) | BIT(1)) #define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE ((u8) BIT(0)) #define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW ((u8) BIT(0) | BIT(1)) @@ -687,13 +681,6 @@ struct ADDBA_request { #define HT_INFO_HT_PARAM_CTRL_ACCESS_ONLY ((u8) BIT(4)) #define HT_INFO_HT_PARAM_SRV_INTERVAL_GRANULARITY ((u8) BIT(5)) -#define HT_INFO_OPERATION_MODE_OP_MODE_MASK \ - ((u16) (0x0001 | 0x0002)) -#define HT_INFO_OPERATION_MODE_OP_MODE_OFFSET 0 -#define HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT ((u8) BIT(2)) -#define HT_INFO_OPERATION_MODE_TRANSMIT_BURST_LIMIT ((u8) BIT(3)) -#define HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT ((u8) BIT(4)) - #define HT_INFO_STBC_PARAM_DUAL_BEACON ((u16) BIT(6)) #define HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT ((u16) BIT(7)) #define HT_INFO_STBC_PARAM_SECONDARY_BCN ((u16) BIT(8)) |