cfg80211: in bitrate_mask, rename mcs to ht_mcs
Rename NL80211_TXRATE_MCS to NL80211_TXRATE_HT and also rename mcs to ht_mcs in struct cfg80211_bitrate_mask. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> [reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
b9243ab0c9
commit
d1e33e654e
|
@ -2754,9 +2754,9 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx,
|
|||
mask->control[band].legacy << 4;
|
||||
|
||||
/* copy mcs rate mask */
|
||||
mcsrate = mask->control[band].mcs[1];
|
||||
mcsrate = mask->control[band].ht_mcs[1];
|
||||
mcsrate <<= 8;
|
||||
mcsrate |= mask->control[band].mcs[0];
|
||||
mcsrate |= mask->control[band].ht_mcs[0];
|
||||
ratemask[band] |= mcsrate << 12;
|
||||
ratemask[band] |= mcsrate << 28;
|
||||
}
|
||||
|
@ -2806,7 +2806,7 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx,
|
|||
mask->control[band].legacy << 4;
|
||||
|
||||
/* copy mcs rate mask */
|
||||
mcsrate = mask->control[band].mcs[0];
|
||||
mcsrate = mask->control[band].ht_mcs[0];
|
||||
ratemask[band] |= mcsrate << 12;
|
||||
ratemask[band] |= mcsrate << 20;
|
||||
}
|
||||
|
|
|
@ -1170,10 +1170,10 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
|
|||
else
|
||||
bitmap_rates[1] = mask->control[band].legacy;
|
||||
|
||||
/* Fill MCS rates */
|
||||
bitmap_rates[2] = mask->control[band].mcs[0];
|
||||
/* Fill HT MCS rates */
|
||||
bitmap_rates[2] = mask->control[band].ht_mcs[0];
|
||||
if (priv->adapter->hw_dev_mcs_support == HT_STREAM_2X2)
|
||||
bitmap_rates[2] |= mask->control[band].mcs[1] << 8;
|
||||
bitmap_rates[2] |= mask->control[band].ht_mcs[1] << 8;
|
||||
|
||||
return mwifiex_send_cmd_sync(priv, HostCmd_CMD_TX_RATE_CFG,
|
||||
HostCmd_ACT_GEN_SET, 0, bitmap_rates);
|
||||
|
|
|
@ -1766,7 +1766,7 @@ enum wiphy_params_flags {
|
|||
struct cfg80211_bitrate_mask {
|
||||
struct {
|
||||
u32 legacy;
|
||||
u8 mcs[IEEE80211_HT_MCS_MASK_LEN];
|
||||
u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
|
||||
} control[IEEE80211_NUM_BANDS];
|
||||
};
|
||||
/**
|
||||
|
|
|
@ -3110,7 +3110,7 @@ enum nl80211_key_attributes {
|
|||
* in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with
|
||||
* 1 = 500 kbps) but without the IE length restriction (at most
|
||||
* %NL80211_MAX_SUPP_RATES in a single array).
|
||||
* @NL80211_TXRATE_MCS: HT (MCS) rates allowed for TX rate selection
|
||||
* @NL80211_TXRATE_HT: HT (MCS) rates allowed for TX rate selection
|
||||
* in an array of MCS numbers.
|
||||
* @__NL80211_TXRATE_AFTER_LAST: internal
|
||||
* @NL80211_TXRATE_MAX: highest TX rate attribute
|
||||
|
@ -3118,13 +3118,15 @@ enum nl80211_key_attributes {
|
|||
enum nl80211_tx_rate_attributes {
|
||||
__NL80211_TXRATE_INVALID,
|
||||
NL80211_TXRATE_LEGACY,
|
||||
NL80211_TXRATE_MCS,
|
||||
NL80211_TXRATE_HT,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_TXRATE_AFTER_LAST,
|
||||
NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
#define NL80211_TXRATE_MCS NL80211_TXRATE_HT
|
||||
|
||||
/**
|
||||
* enum nl80211_band - Frequency band
|
||||
* @NL80211_BAND_2GHZ: 2.4 GHz ISM band
|
||||
|
|
|
@ -2588,8 +2588,8 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
|
|||
int j;
|
||||
|
||||
sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
|
||||
memcpy(sdata->rc_rateidx_mcs_mask[i], mask->control[i].mcs,
|
||||
sizeof(mask->control[i].mcs));
|
||||
memcpy(sdata->rc_rateidx_mcs_mask[i], mask->control[i].ht_mcs,
|
||||
sizeof(mask->control[i].ht_mcs));
|
||||
|
||||
sdata->rc_has_mcs_mask[i] = false;
|
||||
if (!sband)
|
||||
|
|
|
@ -7312,8 +7312,8 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband,
|
|||
static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = {
|
||||
[NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY,
|
||||
.len = NL80211_MAX_SUPP_RATES },
|
||||
[NL80211_TXRATE_MCS] = { .type = NLA_BINARY,
|
||||
.len = NL80211_MAX_SUPP_HT_RATES },
|
||||
[NL80211_TXRATE_HT] = { .type = NLA_BINARY,
|
||||
.len = NL80211_MAX_SUPP_HT_RATES },
|
||||
};
|
||||
|
||||
static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
|
||||
|
@ -7339,9 +7339,9 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
|
|||
continue;
|
||||
|
||||
mask.control[i].legacy = (1 << sband->n_bitrates) - 1;
|
||||
memcpy(mask.control[i].mcs,
|
||||
memcpy(mask.control[i].ht_mcs,
|
||||
sband->ht_cap.mcs.rx_mask,
|
||||
sizeof(mask.control[i].mcs));
|
||||
sizeof(mask.control[i].ht_mcs));
|
||||
}
|
||||
|
||||
/* if no rates are given set it back to the defaults */
|
||||
|
@ -7372,12 +7372,12 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
|
|||
nla_len(tb[NL80211_TXRATE_LEGACY]))
|
||||
return -EINVAL;
|
||||
}
|
||||
if (tb[NL80211_TXRATE_MCS]) {
|
||||
if (tb[NL80211_TXRATE_HT]) {
|
||||
if (!ht_rateset_to_mask(
|
||||
sband,
|
||||
nla_data(tb[NL80211_TXRATE_MCS]),
|
||||
nla_len(tb[NL80211_TXRATE_MCS]),
|
||||
mask.control[band].mcs))
|
||||
nla_data(tb[NL80211_TXRATE_HT]),
|
||||
nla_len(tb[NL80211_TXRATE_HT]),
|
||||
mask.control[band].ht_mcs))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -7388,7 +7388,7 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
|
|||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++)
|
||||
if (mask.control[band].mcs[i])
|
||||
if (mask.control[band].ht_mcs[i])
|
||||
break;
|
||||
|
||||
/* legacy and mcs rates may not be both empty */
|
||||
|
|
Loading…
Reference in New Issue