Skip to content

Commit d1e33e6

Browse files
dziedjanjmberg-intel
authored andcommitted
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>
1 parent b9243ab commit d1e33e6

6 files changed

Lines changed: 22 additions & 20 deletions

File tree

‎drivers/net/wireless/ath/ath6kl/wmi.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2754,9 +2754,9 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx,
27542754
mask->control[band].legacy << 4;
27552755

27562756
/* copy mcs rate mask */
2757-
mcsrate = mask->control[band].mcs[1];
2757+
mcsrate = mask->control[band].ht_mcs[1];
27582758
mcsrate <<= 8;
2759-
mcsrate |= mask->control[band].mcs[0];
2759+
mcsrate |= mask->control[band].ht_mcs[0];
27602760
ratemask[band] |= mcsrate << 12;
27612761
ratemask[band] |= mcsrate << 28;
27622762
}
@@ -2806,7 +2806,7 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx,
28062806
mask->control[band].legacy << 4;
28072807

28082808
/* copy mcs rate mask */
2809-
mcsrate = mask->control[band].mcs[0];
2809+
mcsrate = mask->control[band].ht_mcs[0];
28102810
ratemask[band] |= mcsrate << 12;
28112811
ratemask[band] |= mcsrate << 20;
28122812
}

‎drivers/net/wireless/mwifiex/cfg80211.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,10 +1170,10 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
11701170
else
11711171
bitmap_rates[1] = mask->control[band].legacy;
11721172

1173-
/* Fill MCS rates */
1174-
bitmap_rates[2] = mask->control[band].mcs[0];
1173+
/* Fill HT MCS rates */
1174+
bitmap_rates[2] = mask->control[band].ht_mcs[0];
11751175
if (priv->adapter->hw_dev_mcs_support == HT_STREAM_2X2)
1176-
bitmap_rates[2] |= mask->control[band].mcs[1] << 8;
1176+
bitmap_rates[2] |= mask->control[band].ht_mcs[1] << 8;
11771177

11781178
return mwifiex_send_cmd_sync(priv, HostCmd_CMD_TX_RATE_CFG,
11791179
HostCmd_ACT_GEN_SET, 0, bitmap_rates);

‎include/net/cfg80211.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,7 @@ enum wiphy_params_flags {
17661766
struct cfg80211_bitrate_mask {
17671767
struct {
17681768
u32 legacy;
1769-
u8 mcs[IEEE80211_HT_MCS_MASK_LEN];
1769+
u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
17701770
} control[IEEE80211_NUM_BANDS];
17711771
};
17721772
/**

‎include/uapi/linux/nl80211.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,21 +3110,23 @@ enum nl80211_key_attributes {
31103110
* in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with
31113111
* 1 = 500 kbps) but without the IE length restriction (at most
31123112
* %NL80211_MAX_SUPP_RATES in a single array).
3113-
* @NL80211_TXRATE_MCS: HT (MCS) rates allowed for TX rate selection
3113+
* @NL80211_TXRATE_HT: HT (MCS) rates allowed for TX rate selection
31143114
* in an array of MCS numbers.
31153115
* @__NL80211_TXRATE_AFTER_LAST: internal
31163116
* @NL80211_TXRATE_MAX: highest TX rate attribute
31173117
*/
31183118
enum nl80211_tx_rate_attributes {
31193119
__NL80211_TXRATE_INVALID,
31203120
NL80211_TXRATE_LEGACY,
3121-
NL80211_TXRATE_MCS,
3121+
NL80211_TXRATE_HT,
31223122

31233123
/* keep last */
31243124
__NL80211_TXRATE_AFTER_LAST,
31253125
NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1
31263126
};
31273127

3128+
#define NL80211_TXRATE_MCS NL80211_TXRATE_HT
3129+
31283130
/**
31293131
* enum nl80211_band - Frequency band
31303132
* @NL80211_BAND_2GHZ: 2.4 GHz ISM band

‎net/mac80211/cfg.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2588,8 +2588,8 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
25882588
int j;
25892589

25902590
sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
2591-
memcpy(sdata->rc_rateidx_mcs_mask[i], mask->control[i].mcs,
2592-
sizeof(mask->control[i].mcs));
2591+
memcpy(sdata->rc_rateidx_mcs_mask[i], mask->control[i].ht_mcs,
2592+
sizeof(mask->control[i].ht_mcs));
25932593

25942594
sdata->rc_has_mcs_mask[i] = false;
25952595
if (!sband)

‎net/wireless/nl80211.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7312,8 +7312,8 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband,
73127312
static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = {
73137313
[NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY,
73147314
.len = NL80211_MAX_SUPP_RATES },
7315-
[NL80211_TXRATE_MCS] = { .type = NLA_BINARY,
7316-
.len = NL80211_MAX_SUPP_HT_RATES },
7315+
[NL80211_TXRATE_HT] = { .type = NLA_BINARY,
7316+
.len = NL80211_MAX_SUPP_HT_RATES },
73177317
};
73187318

73197319
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,
73397339
continue;
73407340

73417341
mask.control[i].legacy = (1 << sband->n_bitrates) - 1;
7342-
memcpy(mask.control[i].mcs,
7342+
memcpy(mask.control[i].ht_mcs,
73437343
sband->ht_cap.mcs.rx_mask,
7344-
sizeof(mask.control[i].mcs));
7344+
sizeof(mask.control[i].ht_mcs));
73457345
}
73467346

73477347
/* 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,
73727372
nla_len(tb[NL80211_TXRATE_LEGACY]))
73737373
return -EINVAL;
73747374
}
7375-
if (tb[NL80211_TXRATE_MCS]) {
7375+
if (tb[NL80211_TXRATE_HT]) {
73767376
if (!ht_rateset_to_mask(
73777377
sband,
7378-
nla_data(tb[NL80211_TXRATE_MCS]),
7379-
nla_len(tb[NL80211_TXRATE_MCS]),
7380-
mask.control[band].mcs))
7378+
nla_data(tb[NL80211_TXRATE_HT]),
7379+
nla_len(tb[NL80211_TXRATE_HT]),
7380+
mask.control[band].ht_mcs))
73817381
return -EINVAL;
73827382
}
73837383

@@ -7388,7 +7388,7 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
73887388
return -EINVAL;
73897389

73907390
for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++)
7391-
if (mask.control[band].mcs[i])
7391+
if (mask.control[band].ht_mcs[i])
73927392
break;
73937393

73947394
/* legacy and mcs rates may not be both empty */

0 commit comments

Comments
 (0)