Commit 63fa0426 authored by Srinivasan Raju's avatar Srinivasan Raju Committed by Johannes Berg

nl80211: Add LC placeholder band definition to nl80211_band

Define LC band which is a draft under IEEE 802.11bb.
Current NL80211_BAND_LC is a placeholder band and
will be more defined IEEE 802.11bb progresses.
Signed-off-by: default avatarSrinivasan Raju <srini.raju@purelifi.com>
Link: https://lore.kernel.org/r/20211018100143.7565-2-srini.raju@purelifi.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1add667d
...@@ -4978,6 +4978,7 @@ enum nl80211_txrate_gi { ...@@ -4978,6 +4978,7 @@ enum nl80211_txrate_gi {
* @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz) * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)
* @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz) * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz)
* @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs * @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs
* @NL80211_BAND_LC: light communication band (placeholder)
* @NUM_NL80211_BANDS: number of bands, avoid using this in userspace * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
* since newer kernel versions may support more bands * since newer kernel versions may support more bands
*/ */
...@@ -4987,6 +4988,7 @@ enum nl80211_band { ...@@ -4987,6 +4988,7 @@ enum nl80211_band {
NL80211_BAND_60GHZ, NL80211_BAND_60GHZ,
NL80211_BAND_6GHZ, NL80211_BAND_6GHZ,
NL80211_BAND_S1GHZ, NL80211_BAND_S1GHZ,
NL80211_BAND_LC,
NUM_NL80211_BANDS, NUM_NL80211_BANDS,
}; };
......
...@@ -1490,6 +1490,7 @@ ieee80211_find_80211h_pwr_constr(struct ieee80211_sub_if_data *sdata, ...@@ -1490,6 +1490,7 @@ ieee80211_find_80211h_pwr_constr(struct ieee80211_sub_if_data *sdata,
fallthrough; fallthrough;
case NL80211_BAND_2GHZ: case NL80211_BAND_2GHZ:
case NL80211_BAND_60GHZ: case NL80211_BAND_60GHZ:
case NL80211_BAND_LC:
chan_increment = 1; chan_increment = 1;
break; break;
case NL80211_BAND_5GHZ: case NL80211_BAND_5GHZ:
......
...@@ -444,6 +444,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, ...@@ -444,6 +444,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
switch (i) { switch (i) {
case NL80211_BAND_2GHZ: case NL80211_BAND_2GHZ:
case NL80211_BAND_LC:
/* /*
* We use both here, even if we cannot really know for * We use both here, even if we cannot really know for
* sure the station will support both, but the only use * sure the station will support both, but the only use
......
...@@ -146,7 +146,8 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, ...@@ -146,7 +146,8 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
rate = DIV_ROUND_UP(r->bitrate, 1 << shift); rate = DIV_ROUND_UP(r->bitrate, 1 << shift);
switch (sband->band) { switch (sband->band) {
case NL80211_BAND_2GHZ: { case NL80211_BAND_2GHZ:
case NL80211_BAND_LC: {
u32 flag; u32 flag;
if (tx->sdata->flags & IEEE80211_SDATA_OPERATING_GMODE) if (tx->sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
flag = IEEE80211_RATE_MANDATORY_G; flag = IEEE80211_RATE_MANDATORY_G;
......
...@@ -866,6 +866,7 @@ nl80211_match_band_rssi_policy[NUM_NL80211_BANDS] = { ...@@ -866,6 +866,7 @@ nl80211_match_band_rssi_policy[NUM_NL80211_BANDS] = {
[NL80211_BAND_5GHZ] = { .type = NLA_S32 }, [NL80211_BAND_5GHZ] = { .type = NLA_S32 },
[NL80211_BAND_6GHZ] = { .type = NLA_S32 }, [NL80211_BAND_6GHZ] = { .type = NLA_S32 },
[NL80211_BAND_60GHZ] = { .type = NLA_S32 }, [NL80211_BAND_60GHZ] = { .type = NLA_S32 },
[NL80211_BAND_LC] = { .type = NLA_S32 },
}; };
static const struct nla_policy static const struct nla_policy
......
...@@ -80,6 +80,7 @@ u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band) ...@@ -80,6 +80,7 @@ u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band)
return 0; /* not supported */ return 0; /* not supported */
switch (band) { switch (band) {
case NL80211_BAND_2GHZ: case NL80211_BAND_2GHZ:
case NL80211_BAND_LC:
if (chan == 14) if (chan == 14)
return MHZ_TO_KHZ(2484); return MHZ_TO_KHZ(2484);
else if (chan < 14) else if (chan < 14)
...@@ -209,6 +210,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband) ...@@ -209,6 +210,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband)
WARN_ON(want); WARN_ON(want);
break; break;
case NL80211_BAND_2GHZ: case NL80211_BAND_2GHZ:
case NL80211_BAND_LC:
want = 7; want = 7;
for (i = 0; i < sband->n_bitrates; i++) { for (i = 0; i < sband->n_bitrates; i++) {
switch (sband->bitrates[i].bitrate) { switch (sband->bitrates[i].bitrate) {
......
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