Commit d1e33e65 authored by Janusz Dziedzic's avatar Janusz Dziedzic Committed by Johannes Berg

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: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
[reword commit message]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b9243ab0
...@@ -2754,9 +2754,9 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx, ...@@ -2754,9 +2754,9 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx,
mask->control[band].legacy << 4; mask->control[band].legacy << 4;
/* copy mcs rate mask */ /* copy mcs rate mask */
mcsrate = mask->control[band].mcs[1]; mcsrate = mask->control[band].ht_mcs[1];
mcsrate <<= 8; mcsrate <<= 8;
mcsrate |= mask->control[band].mcs[0]; mcsrate |= mask->control[band].ht_mcs[0];
ratemask[band] |= mcsrate << 12; ratemask[band] |= mcsrate << 12;
ratemask[band] |= mcsrate << 28; ratemask[band] |= mcsrate << 28;
} }
...@@ -2806,7 +2806,7 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx, ...@@ -2806,7 +2806,7 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx,
mask->control[band].legacy << 4; mask->control[band].legacy << 4;
/* copy mcs rate mask */ /* copy mcs rate mask */
mcsrate = mask->control[band].mcs[0]; mcsrate = mask->control[band].ht_mcs[0];
ratemask[band] |= mcsrate << 12; ratemask[band] |= mcsrate << 12;
ratemask[band] |= mcsrate << 20; ratemask[band] |= mcsrate << 20;
} }
......
...@@ -1170,10 +1170,10 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy, ...@@ -1170,10 +1170,10 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
else else
bitmap_rates[1] = mask->control[band].legacy; bitmap_rates[1] = mask->control[band].legacy;
/* Fill MCS rates */ /* Fill HT MCS rates */
bitmap_rates[2] = mask->control[band].mcs[0]; bitmap_rates[2] = mask->control[band].ht_mcs[0];
if (priv->adapter->hw_dev_mcs_support == HT_STREAM_2X2) 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, return mwifiex_send_cmd_sync(priv, HostCmd_CMD_TX_RATE_CFG,
HostCmd_ACT_GEN_SET, 0, bitmap_rates); HostCmd_ACT_GEN_SET, 0, bitmap_rates);
......
...@@ -1766,7 +1766,7 @@ enum wiphy_params_flags { ...@@ -1766,7 +1766,7 @@ enum wiphy_params_flags {
struct cfg80211_bitrate_mask { struct cfg80211_bitrate_mask {
struct { struct {
u32 legacy; u32 legacy;
u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
} control[IEEE80211_NUM_BANDS]; } control[IEEE80211_NUM_BANDS];
}; };
/** /**
......
...@@ -3110,7 +3110,7 @@ enum nl80211_key_attributes { ...@@ -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 * 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 * 1 = 500 kbps) but without the IE length restriction (at most
* %NL80211_MAX_SUPP_RATES in a single array). * %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. * in an array of MCS numbers.
* @__NL80211_TXRATE_AFTER_LAST: internal * @__NL80211_TXRATE_AFTER_LAST: internal
* @NL80211_TXRATE_MAX: highest TX rate attribute * @NL80211_TXRATE_MAX: highest TX rate attribute
...@@ -3118,13 +3118,15 @@ enum nl80211_key_attributes { ...@@ -3118,13 +3118,15 @@ enum nl80211_key_attributes {
enum nl80211_tx_rate_attributes { enum nl80211_tx_rate_attributes {
__NL80211_TXRATE_INVALID, __NL80211_TXRATE_INVALID,
NL80211_TXRATE_LEGACY, NL80211_TXRATE_LEGACY,
NL80211_TXRATE_MCS, NL80211_TXRATE_HT,
/* keep last */ /* keep last */
__NL80211_TXRATE_AFTER_LAST, __NL80211_TXRATE_AFTER_LAST,
NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1 NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1
}; };
#define NL80211_TXRATE_MCS NL80211_TXRATE_HT
/** /**
* enum nl80211_band - Frequency band * enum nl80211_band - Frequency band
* @NL80211_BAND_2GHZ: 2.4 GHz ISM band * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
......
...@@ -2588,8 +2588,8 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, ...@@ -2588,8 +2588,8 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
int j; int j;
sdata->rc_rateidx_mask[i] = mask->control[i].legacy; sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
memcpy(sdata->rc_rateidx_mcs_mask[i], mask->control[i].mcs, memcpy(sdata->rc_rateidx_mcs_mask[i], mask->control[i].ht_mcs,
sizeof(mask->control[i].mcs)); sizeof(mask->control[i].ht_mcs));
sdata->rc_has_mcs_mask[i] = false; sdata->rc_has_mcs_mask[i] = false;
if (!sband) if (!sband)
......
...@@ -7312,7 +7312,7 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband, ...@@ -7312,7 +7312,7 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband,
static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = { static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = {
[NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY, [NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY,
.len = NL80211_MAX_SUPP_RATES }, .len = NL80211_MAX_SUPP_RATES },
[NL80211_TXRATE_MCS] = { .type = NLA_BINARY, [NL80211_TXRATE_HT] = { .type = NLA_BINARY,
.len = NL80211_MAX_SUPP_HT_RATES }, .len = NL80211_MAX_SUPP_HT_RATES },
}; };
...@@ -7339,9 +7339,9 @@ 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; continue;
mask.control[i].legacy = (1 << sband->n_bitrates) - 1; 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, 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 */ /* 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, ...@@ -7372,12 +7372,12 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
nla_len(tb[NL80211_TXRATE_LEGACY])) nla_len(tb[NL80211_TXRATE_LEGACY]))
return -EINVAL; return -EINVAL;
} }
if (tb[NL80211_TXRATE_MCS]) { if (tb[NL80211_TXRATE_HT]) {
if (!ht_rateset_to_mask( if (!ht_rateset_to_mask(
sband, sband,
nla_data(tb[NL80211_TXRATE_MCS]), nla_data(tb[NL80211_TXRATE_HT]),
nla_len(tb[NL80211_TXRATE_MCS]), nla_len(tb[NL80211_TXRATE_HT]),
mask.control[band].mcs)) mask.control[band].ht_mcs))
return -EINVAL; return -EINVAL;
} }
...@@ -7388,7 +7388,7 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, ...@@ -7388,7 +7388,7 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
return -EINVAL; return -EINVAL;
for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++)
if (mask.control[band].mcs[i]) if (mask.control[band].ht_mcs[i])
break; break;
/* legacy and mcs rates may not be both empty */ /* legacy and mcs rates may not be both empty */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment