Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08373630 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cfg80211: use same IR permissive rules for 6GHz band"

parents a3130be1 b185f070
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4499,6 +4499,7 @@ enum nl80211_txrate_gi {
 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
 * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
 * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
 * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz)
 * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
 *	since newer kernel versions may support more bands
 */
@@ -4506,6 +4507,7 @@ enum nl80211_band {
	NL80211_BAND_2GHZ,
	NL80211_BAND_5GHZ,
	NL80211_BAND_60GHZ,
	NL80211_BAND_6GHZ,

	NUM_NL80211_BANDS,
};
+1 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
			break;
		}
		case NL80211_BAND_5GHZ:
		case NL80211_BAND_6GHZ:
			if (r->flags & IEEE80211_RATE_MANDATORY_A)
				mrate = r->bitrate;
			break;
+2 −1
Original line number Diff line number Diff line
@@ -1050,7 +1050,8 @@ static bool cfg80211_ir_permissive_chan(struct wiphy *wiphy,
		if (chan == other_chan)
			return true;

		if (chan->band != NL80211_BAND_5GHZ)
		if (chan->band != NL80211_BAND_5GHZ &&
		    chan->band != NL80211_BAND_6GHZ)
			continue;

		r1 = cfg80211_get_unii(chan->center_freq);
+19 −2
Original line number Diff line number Diff line
@@ -3829,8 +3829,9 @@ void wiphy_regulatory_deregister(struct wiphy *wiphy)
}

/*
 * See http://www.fcc.gov/document/5-ghz-unlicensed-spectrum-unii, for
 * UNII band definitions
 * See FCC notices for UNII band definitions
 *  5GHz: https://www.fcc.gov/document/5-ghz-unlicensed-spectrum-unii
 *  6GHz: https://www.fcc.gov/document/fcc-proposes-more-spectrum-unlicensed-use-0
 */
int cfg80211_get_unii(int freq)
{
@@ -3854,6 +3855,22 @@ int cfg80211_get_unii(int freq)
	if (freq > 5725 && freq <= 5825)
		return 4;

	/* UNII-5 */
	if (freq > 5925 && freq <= 6425)
		return 5;

	/* UNII-6 */
	if (freq > 6425 && freq <= 6525)
		return 6;

	/* UNII-7 */
	if (freq > 6525 && freq <= 6875)
		return 7;

	/* UNII-8 */
	if (freq > 6875 && freq <= 7125)
		return 8;

	return -EINVAL;
}

+2 −1
Original line number Diff line number Diff line
@@ -3222,10 +3222,11 @@ TRACE_EVENT(rdev_set_mcast_rate,
		       sizeof(int) * NUM_NL80211_BANDS);
	),
	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]",
		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
		  WIPHY_PR_ARG, NETDEV_PR_ARG,
		  __entry->mcast_rate[NL80211_BAND_2GHZ],
		  __entry->mcast_rate[NL80211_BAND_5GHZ],
		  __entry->mcast_rate[NL80211_BAND_6GHZ],
		  __entry->mcast_rate[NL80211_BAND_60GHZ])
);

Loading