iwlwifi: rs-fw: enable STBC in he correctly
In the HE phy capabilities IE there are 2 bits to signal support for STBC in bandwidths of 80Mhz or less, and of 160Mhz. Use these bits to determine STBC support if this IE exists. Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
ae17404e38
commit
3e467b8e4c
2 changed files with 23 additions and 7 deletions
|
@ -66,12 +66,16 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum iwl_tlc_mng_cfg_flags_enum - options for TLC config flags
|
* enum iwl_tlc_mng_cfg_flags_enum - options for TLC config flags
|
||||||
* @IWL_TLC_MNG_CFG_FLAGS_STBC_MSK: enable STBC
|
* @IWL_TLC_MNG_CFG_FLAGS_STBC_MSK: enable STBC. For HE this enables STBC for
|
||||||
|
* bandwidths <= 80MHz
|
||||||
* @IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK: enable LDPC
|
* @IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK: enable LDPC
|
||||||
|
* @IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK: enable STBC in HE at 160MHz
|
||||||
|
* bandwidth
|
||||||
*/
|
*/
|
||||||
enum iwl_tlc_mng_cfg_flags {
|
enum iwl_tlc_mng_cfg_flags {
|
||||||
IWL_TLC_MNG_CFG_FLAGS_STBC_MSK = BIT(0),
|
IWL_TLC_MNG_CFG_FLAGS_STBC_MSK = BIT(0),
|
||||||
IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK = BIT(1),
|
IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK = BIT(1),
|
||||||
|
IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK = BIT(2),
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -117,14 +117,26 @@ static u16 rs_fw_set_config_flags(struct iwl_mvm *mvm,
|
||||||
{
|
{
|
||||||
struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
|
struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
|
||||||
struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
|
struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
|
||||||
|
struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
|
||||||
bool vht_ena = vht_cap && vht_cap->vht_supported;
|
bool vht_ena = vht_cap && vht_cap->vht_supported;
|
||||||
u16 flags = 0;
|
u16 flags = 0;
|
||||||
|
|
||||||
if (mvm->cfg->ht_params->stbc &&
|
if (mvm->cfg->ht_params->stbc &&
|
||||||
(num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1) &&
|
(num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1)) {
|
||||||
((ht_cap && (ht_cap->cap & IEEE80211_HT_CAP_RX_STBC)) ||
|
if (he_cap && he_cap->has_he) {
|
||||||
(vht_ena && (vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK))))
|
if (he_cap->he_cap_elem.phy_cap_info[2] &
|
||||||
flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
|
IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ)
|
||||||
|
flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
|
||||||
|
|
||||||
|
if (he_cap->he_cap_elem.phy_cap_info[7] &
|
||||||
|
IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ)
|
||||||
|
flags |= IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK;
|
||||||
|
} else if ((ht_cap &&
|
||||||
|
(ht_cap->cap & IEEE80211_HT_CAP_RX_STBC)) ||
|
||||||
|
(vht_ena &&
|
||||||
|
(vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK)))
|
||||||
|
flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
|
||||||
|
}
|
||||||
|
|
||||||
if (mvm->cfg->ht_params->ldpc &&
|
if (mvm->cfg->ht_params->ldpc &&
|
||||||
((ht_cap && (ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING)) ||
|
((ht_cap && (ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING)) ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue