linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] cfg80211: expose cfg80211_disable_40mhz_24ghz module parameter
@ 2014-06-06 14:23 Arend van Spriel
  2014-06-13 10:06 ` Arend van Spriel
  0 siblings, 1 reply; 2+ messages in thread
From: Arend van Spriel @ 2014-06-06 14:23 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Arend van Spriel

Drivers may need to know this variable value for configuring the
device they are controlling. It can be determined indirectly by
setting IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag in the field
ieee80211_sta_htcap::cap of 2G band. During the wiphy_register()
call cfg80211 will clear that bit if the module parameter is true.
However, brcmfmac for one needs to know the value to determine
its custom regulatory domain which must be applied before doing
the wiphy_register().

Cc: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
Hi Johannes,

In brcmfmac I need to know the value of cfg80211 module parameter
as stated in the commit message. Just taking a shot at how to get
this exposed. I was reluctant exporting the module parameter itself.

Regards,
Arend
---
 include/net/cfg80211.h |    9 +++++++++
 net/wireless/core.c    |    6 ++++++
 2 files changed, 15 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f3539a1..9279197 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3107,6 +3107,15 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
 struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
 
 /**
+ * wiphy_is_40mhz_24ghz_disabled - check whether 40MHz bandwidth in 2.4G
+ *
+ * @wiphy: The wiphy to check.
+ *
+ * Return: true is 40MHz is disabled in 2.4G band.
+ */
+bool wiphy_is_40mhz_24ghz_disabled(struct wiphy *wiphy);
+
+/**
  * wiphy_register - register a wiphy with cfg80211
  *
  * @wiphy: The wiphy to register.
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 086cddd..52750ef 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -355,6 +355,12 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
 }
 EXPORT_SYMBOL(wiphy_new);
 
+bool wiphy_is_40mhz_24ghz_disabled(struct wiphy *wiphy)
+{
+	return cfg80211_disable_40mhz_24ghz;
+}
+EXPORT_SYMBOL(wiphy_is_40mhz_24ghz_disabled);
+
 static int wiphy_verify_combinations(struct wiphy *wiphy)
 {
 	const struct ieee80211_iface_combination *c;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] cfg80211: expose cfg80211_disable_40mhz_24ghz module parameter
  2014-06-06 14:23 [RFC] cfg80211: expose cfg80211_disable_40mhz_24ghz module parameter Arend van Spriel
@ 2014-06-13 10:06 ` Arend van Spriel
  0 siblings, 0 replies; 2+ messages in thread
From: Arend van Spriel @ 2014-06-13 10:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 06-06-14 16:23, Arend van Spriel wrote:
> Drivers may need to know this variable value for configuring the
> device they are controlling. It can be determined indirectly by
> setting IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag in the field
> ieee80211_sta_htcap::cap of 2G band. During the wiphy_register()
> call cfg80211 will clear that bit if the module parameter is true.
> However, brcmfmac for one needs to know the value to determine
> its custom regulatory domain which must be applied before doing
> the wiphy_register().
>
> Cc: Johannes Berg <johannes.berg@intel.com>
> Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
> Signed-off-by: Arend van Spriel <arend@broadcom.com>
> ---
> Hi Johannes,
>
> In brcmfmac I need to know the value of cfg80211 module parameter
> as stated in the commit message. Just taking a shot at how to get
> this exposed. I was reluctant exporting the module parameter itself.

Hi Johannes,

Could you give me your feedback on this. Would be appreciated.

Regards,
Arend

> Regards,
> Arend
> ---
>   include/net/cfg80211.h |    9 +++++++++
>   net/wireless/core.c    |    6 ++++++
>   2 files changed, 15 insertions(+)
>
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index f3539a1..9279197 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -3107,6 +3107,15 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
>   struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
>
>   /**
> + * wiphy_is_40mhz_24ghz_disabled - check whether 40MHz bandwidth in 2.4G
> + *
> + * @wiphy: The wiphy to check.
> + *
> + * Return: true is 40MHz is disabled in 2.4G band.
> + */
> +bool wiphy_is_40mhz_24ghz_disabled(struct wiphy *wiphy);
> +
> +/**
>    * wiphy_register - register a wiphy with cfg80211
>    *
>    * @wiphy: The wiphy to register.
> diff --git a/net/wireless/core.c b/net/wireless/core.c
> index 086cddd..52750ef 100644
> --- a/net/wireless/core.c
> +++ b/net/wireless/core.c
> @@ -355,6 +355,12 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
>   }
>   EXPORT_SYMBOL(wiphy_new);
>
> +bool wiphy_is_40mhz_24ghz_disabled(struct wiphy *wiphy)
> +{
> +	return cfg80211_disable_40mhz_24ghz;
> +}
> +EXPORT_SYMBOL(wiphy_is_40mhz_24ghz_disabled);
> +
>   static int wiphy_verify_combinations(struct wiphy *wiphy)
>   {
>   	const struct ieee80211_iface_combination *c;
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-13 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-06 14:23 [RFC] cfg80211: expose cfg80211_disable_40mhz_24ghz module parameter Arend van Spriel
2014-06-13 10:06 ` Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).