aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f20da7d63b1e..1a21895b732b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -752,6 +752,19 @@ enum wiphy_params_flags {
752}; 752};
753 753
754/** 754/**
755 * enum tx_power_setting - TX power adjustment
756 *
757 * @TX_POWER_AUTOMATIC: the dbm parameter is ignored
758 * @TX_POWER_LIMITED: limit TX power by the dbm parameter
759 * @TX_POWER_FIXED: fix TX power to the dbm parameter
760 */
761enum tx_power_setting {
762 TX_POWER_AUTOMATIC,
763 TX_POWER_LIMITED,
764 TX_POWER_FIXED,
765};
766
767/**
755 * struct cfg80211_ops - backend description for wireless configuration 768 * struct cfg80211_ops - backend description for wireless configuration
756 * 769 *
757 * This struct is registered by fullmac card drivers and/or wireless stacks 770 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -837,6 +850,13 @@ enum wiphy_params_flags {
837 * @changed bitfield (see &enum wiphy_params_flags) describes which values 850 * @changed bitfield (see &enum wiphy_params_flags) describes which values
838 * have changed. The actual parameter values are available in 851 * have changed. The actual parameter values are available in
839 * struct wiphy. If returning an error, no value should be changed. 852 * struct wiphy. If returning an error, no value should be changed.
853 *
854 * @set_tx_power: set the transmit power according to the parameters
855 * @get_tx_power: store the current TX power into the dbm variable;
856 * return 0 if successful
857 *
858 * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
859 * functions to adjust rfkill hw state
840 */ 860 */
841struct cfg80211_ops { 861struct cfg80211_ops {
842 int (*suspend)(struct wiphy *wiphy); 862 int (*suspend)(struct wiphy *wiphy);
@@ -928,6 +948,12 @@ struct cfg80211_ops {
928 int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev); 948 int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev);
929 949
930 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); 950 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
951
952 int (*set_tx_power)(struct wiphy *wiphy,
953 enum tx_power_setting type, int dbm);
954 int (*get_tx_power)(struct wiphy *wiphy, int *dbm);
955
956 void (*rfkill_poll)(struct wiphy *wiphy);
931}; 957};
932 958
933/* 959/*
@@ -1451,6 +1477,12 @@ int cfg80211_wext_siwencode(struct net_device *dev,
1451int cfg80211_wext_giwencode(struct net_device *dev, 1477int cfg80211_wext_giwencode(struct net_device *dev,
1452 struct iw_request_info *info, 1478 struct iw_request_info *info,
1453 struct iw_point *erq, char *keybuf); 1479 struct iw_point *erq, char *keybuf);
1480int cfg80211_wext_siwtxpower(struct net_device *dev,
1481 struct iw_request_info *info,
1482 union iwreq_data *data, char *keybuf);
1483int cfg80211_wext_giwtxpower(struct net_device *dev,
1484 struct iw_request_info *info,
1485 union iwreq_data *data, char *keybuf);
1454 1486
1455/* 1487/*
1456 * callbacks for asynchronous cfg80211 methods, notification 1488 * callbacks for asynchronous cfg80211 methods, notification
@@ -1636,4 +1668,23 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
1636 */ 1668 */
1637void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); 1669void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp);
1638 1670
1671/**
1672 * wiphy_rfkill_set_hw_state - notify cfg80211 about hw block state
1673 * @wiphy: the wiphy
1674 * @blocked: block status
1675 */
1676void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked);
1677
1678/**
1679 * wiphy_rfkill_start_polling - start polling rfkill
1680 * @wiphy: the wiphy
1681 */
1682void wiphy_rfkill_start_polling(struct wiphy *wiphy);
1683
1684/**
1685 * wiphy_rfkill_stop_polling - stop polling rfkill
1686 * @wiphy: the wiphy
1687 */
1688void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
1689
1639#endif /* __NET_CFG80211_H */ 1690#endif /* __NET_CFG80211_H */