Message ID | 20230607124647.27682-2-quic_adisi@quicinc.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Johannes Berg |
Headers | show |
Series | wifi: ath11k: fix CAC running state | expand |
On 6/7/2023 18:16, Aditya Kumar Singh wrote: > cfg80211 has cfg80211_chandef_dfs_usable() function to know whether > at least one channel in the chandef is in usable state or not. Also, > cfg80211_chandef_dfs_cac_time() function is there which tells the CAC > time required for the given chandef. > > Make these two functions visible to drivers by exporting their symbol > to global list of kernel symbols. > > Lower level drivers can make use of these two functions to be aware > if CAC is required on the given chandef and for how long. For example > drivers which maintains the CAC state internally can make use of these. > > Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> > --- Hi Johannes, Do you have any comments for this patch? - Aditya
Aditya Kumar Singh <quic_adisi@quicinc.com> writes: > On 6/7/2023 18:16, Aditya Kumar Singh wrote: >> cfg80211 has cfg80211_chandef_dfs_usable() function to know whether >> at least one channel in the chandef is in usable state or not. Also, >> cfg80211_chandef_dfs_cac_time() function is there which tells the CAC >> time required for the given chandef. >> Make these two functions visible to drivers by exporting their >> symbol >> to global list of kernel symbols. >> Lower level drivers can make use of these two functions to be aware >> if CAC is required on the given chandef and for how long. For example >> drivers which maintains the CAC state internally can make use of these. >> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> >> --- > Hi Johannes, > > Do you have any comments for this patch? The wireless trees are closed for July: https://lore.kernel.org/all/87y1kncuh4.fsf@kernel.org/ Though I changed my plans and came back earlier. And honestly these kind of emails don't really help. If a maintainer is busy (and they usually are) sending more mails will do the opposite. If you want to speed up your review help the maintainer somehow, for example by reviewing or testing other patches etc which can reduce the load of the maintainer.
On 6/7/2023 5:46 AM, Aditya Kumar Singh wrote: > cfg80211 has cfg80211_chandef_dfs_usable() function to know whether > at least one channel in the chandef is in usable state or not. Also, > cfg80211_chandef_dfs_cac_time() function is there which tells the CAC > time required for the given chandef. > > Make these two functions visible to drivers by exporting their symbol > to global list of kernel symbols. > > Lower level drivers can make use of these two functions to be aware > if CAC is required on the given chandef and for how long. For example > drivers which maintains the CAC state internally can make use of these. > > Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 9e04f69712b1..e99e83a7308e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -950,6 +950,30 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef, enum nl80211_iftype iftype); +/** + * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable and we + * can/need start CAC on such channel + * @wiphy: the wiphy to validate against + * @chandef: the channel definition to check + * + * Return: true if all channels available and at least + * one channel requires CAC (NL80211_DFS_USABLE) + */ +bool cfg80211_chandef_dfs_usable(struct wiphy *wiphy, + const struct cfg80211_chan_def *chandef); + +/** + * cfg80211_chandef_dfs_cac_time - get the DFS CAC time (in ms) for given + * channel definition + * @wiphy: the wiphy to validate against + * @chandef: the channel definition to check + * + * Returns: DFS CAC time (in ms) which applies for this channel definition + */ +unsigned int +cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, + const struct cfg80211_chan_def *chandef); + /** * nl80211_send_chandef - sends the channel definition. * @msg: the msg to send channel definition diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 0b7e81db383d..a78a6183d11e 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -666,6 +666,7 @@ bool cfg80211_chandef_dfs_usable(struct wiphy *wiphy, return (r1 + r2 > 0); } +EXPORT_SYMBOL(cfg80211_chandef_dfs_usable); /* * Checks if center frequency of chan falls with in the bandwidth @@ -965,6 +966,7 @@ cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, return max(t1, t2); } +EXPORT_SYMBOL(cfg80211_chandef_dfs_cac_time); static bool cfg80211_secondary_chans_ok(struct wiphy *wiphy, u32 center_freq, u32 bandwidth, diff --git a/net/wireless/core.h b/net/wireless/core.h index 7c61752f6d83..c0eaa4d4f42e 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -462,29 +462,12 @@ int cfg80211_scan(struct cfg80211_registered_device *rdev); extern struct work_struct cfg80211_disconnect_work; -/** - * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable - * @wiphy: the wiphy to validate against - * @chandef: the channel definition to check - * - * Checks if chandef is usable and we can/need start CAC on such channel. - * - * Return: true if all channels available and at least - * one channel requires CAC (NL80211_DFS_USABLE) - */ -bool cfg80211_chandef_dfs_usable(struct wiphy *wiphy, - const struct cfg80211_chan_def *chandef); - void cfg80211_set_dfs_state(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef, enum nl80211_dfs_state dfs_state); void cfg80211_dfs_channels_update_work(struct work_struct *work); -unsigned int -cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, - const struct cfg80211_chan_def *chandef); - void cfg80211_sched_dfs_chan_update(struct cfg80211_registered_device *rdev); int
cfg80211 has cfg80211_chandef_dfs_usable() function to know whether at least one channel in the chandef is in usable state or not. Also, cfg80211_chandef_dfs_cac_time() function is there which tells the CAC time required for the given chandef. Make these two functions visible to drivers by exporting their symbol to global list of kernel symbols. Lower level drivers can make use of these two functions to be aware if CAC is required on the given chandef and for how long. For example drivers which maintains the CAC state internally can make use of these. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> --- include/net/cfg80211.h | 24 ++++++++++++++++++++++++ net/wireless/chan.c | 2 ++ net/wireless/core.h | 17 ----------------- 3 files changed, 26 insertions(+), 17 deletions(-)