diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2021-06-16 23:28:26 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2021-06-23 12:29:13 +0300 |
commit | 358ae88881adc3ac1544104272eb7e9408f80b39 (patch) | |
tree | 313b9aeffab3d1325f962e550aa2a3d0c7fd6849 /include | |
parent | 3f9d9725cb7daf7e9a834aa4f24d88b049c3c1f5 (diff) | |
download | linux-358ae88881adc3ac1544104272eb7e9408f80b39.tar.xz |
cfg80211: expose the rfkill device to the low level driver
This will allow the low level driver to query the rfkill
state.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://lore.kernel.org/r/20210616202826.9833-1-emmanuel.grumbach@intel.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/cfg80211.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 60325b62daae..b3bc58ec9098 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -22,6 +22,7 @@ #include <linux/if_ether.h> #include <linux/ieee80211.h> #include <linux/net.h> +#include <linux/rfkill.h> #include <net/regulatory.h> /** @@ -4943,6 +4944,7 @@ struct wiphy_iftype_akm_suites { * configuration through the %NL80211_TID_CONFIG_ATTR_RETRY_SHORT and * %NL80211_TID_CONFIG_ATTR_RETRY_LONG attributes * @sar_capa: SAR control capabilities + * @rfkill: a pointer to the rfkill structure */ struct wiphy { struct mutex mtx; @@ -5085,6 +5087,8 @@ struct wiphy { const struct cfg80211_sar_capa *sar_capa; + struct rfkill *rfkill; + char priv[] __aligned(NETDEV_ALIGN); }; @@ -6659,7 +6663,10 @@ void wiphy_rfkill_start_polling(struct wiphy *wiphy); * wiphy_rfkill_stop_polling - stop polling rfkill * @wiphy: the wiphy */ -void wiphy_rfkill_stop_polling(struct wiphy *wiphy); +static inline void wiphy_rfkill_stop_polling(struct wiphy *wiphy) +{ + rfkill_pause_polling(wiphy->rfkill); +} /** * DOC: Vendor commands |