Message ID | 20210517201932.8860-5-wgong@codeaurora.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Johannes Berg |
Headers | show |
Series | cfg80211/mac80211: Add support for 6GHZ STA for various modes : LPI, SP and VLP | expand |
On Mon, 2021-05-17 at 16:19 -0400, Wen Gong wrote: > > + * @IEEE80211_CHAN_PSD: power spectral density (in dBm) > + * on this channel. Do we need that? Which really is just another way of asking > + * @psd: power spectral density (in dBm) whether or not 0 is a valid value for this? > +++ b/include/uapi/linux/nl80211.h > @@ -4040,6 +4040,7 @@ enum nl80211_sched_scan_match_attr { > * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed > * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed > * @NL80211_RRF_NO_HE: HE operation not allowed > + * @NL80211_RRF_PSD: channels has power spectral density value It doesn't seem like we need this, after all, there must be some kind of attribute for the PSD, and then its presence/absence already indicates this? johannes
On 2021-07-23 17:24, Johannes Berg wrote: > On Mon, 2021-05-17 at 16:19 -0400, Wen Gong wrote: >> >> + * @IEEE80211_CHAN_PSD: power spectral density (in dBm) >> + * on this channel. > > Do we need that? Which really is just another way of asking > >> + * @psd: power spectral density (in dBm) > > whether or not 0 is a valid value for this? yes, 0 is also a valid value. It also have negative, such as -1dBm. > >> +++ b/include/uapi/linux/nl80211.h >> @@ -4040,6 +4040,7 @@ enum nl80211_sched_scan_match_attr { >> * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed >> * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed >> * @NL80211_RRF_NO_HE: HE operation not allowed >> + * @NL80211_RRF_PSD: channels has power spectral density value > > It doesn't seem like we need this, after all, there must be some kind > of > attribute for the PSD, and then its presence/absence already indicates > this? Now the psd value 0 is also a valid value, so now we can not consider the psd 0 as NON-PSD, so we need this flag to check it is psd or NON-psd. > > johannes
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 13d92c643794..2f1769412fd6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -107,6 +107,8 @@ struct wiphy; * on this channel. * @IEEE80211_CHAN_16MHZ: 16 MHz bandwidth is permitted * on this channel. + * @IEEE80211_CHAN_PSD: power spectral density (in dBm) + * on this channel. * */ enum ieee80211_channel_flags { @@ -129,6 +131,7 @@ enum ieee80211_channel_flags { IEEE80211_CHAN_4MHZ = 1<<16, IEEE80211_CHAN_8MHZ = 1<<17, IEEE80211_CHAN_16MHZ = 1<<18, + IEEE80211_CHAN_PSD = 1<<19, }; #define IEEE80211_CHAN_NO_HT40 \ @@ -162,6 +165,7 @@ enum ieee80211_channel_flags { * on this channel. * @dfs_state_entered: timestamp (jiffies) when the dfs state was entered. * @dfs_cac_ms: DFS CAC time in milliseconds, this is valid for DFS channels. + * @psd: power spectral density (in dBm) */ struct ieee80211_channel { enum nl80211_band band; @@ -178,6 +182,7 @@ struct ieee80211_channel { enum nl80211_dfs_state dfs_state; unsigned long dfs_state_entered; unsigned int dfs_cac_ms; + s8 psd; }; /** diff --git a/include/net/regulatory.h b/include/net/regulatory.h index 47f06f6f5a67..ed20004fb6a9 100644 --- a/include/net/regulatory.h +++ b/include/net/regulatory.h @@ -221,6 +221,7 @@ struct ieee80211_reg_rule { u32 flags; u32 dfs_cac_ms; bool has_wmm; + s8 psd; }; struct ieee80211_regdomain { diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 9f8e9e49a16a..b843ba0afad2 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -4040,6 +4040,7 @@ enum nl80211_sched_scan_match_attr { * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed * @NL80211_RRF_NO_HE: HE operation not allowed + * @NL80211_RRF_PSD: channels has power spectral density value */ enum nl80211_reg_rule_flags { NL80211_RRF_NO_OFDM = 1<<0, @@ -4058,6 +4059,7 @@ enum nl80211_reg_rule_flags { NL80211_RRF_NO_80MHZ = 1<<15, NL80211_RRF_NO_160MHZ = 1<<16, NL80211_RRF_NO_HE = 1<<17, + NL80211_RRF_PSD = 1<<18, }; #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
6GHz regulatory domains introduces power spectral density(psd). This patch is define the flags for psd. Signed-off-by: Wen Gong <wgong@codeaurora.org> --- include/net/cfg80211.h | 5 +++++ include/net/regulatory.h | 1 + include/uapi/linux/nl80211.h | 2 ++ 3 files changed, 8 insertions(+)