aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-06-23 05:12:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-24 15:42:33 -0400
commitfa61cf70a6ae1089e459e4b59b2e8d8e90d8535e (patch)
tree1bd81709faaa15fb207de7db4df1ceed96374208 /include
parenta185045c8da1ec6627236b4ade0d949b15da43b3 (diff)
cfg80211/mac80211: Update set_tx_power to use mBm instead of dBm units
In preparation for a TX power setting interface in the nl80211, change the .set_tx_power function to use mBm units instead of dBm for greater accuracy and smaller power levels. Also, already in advance move the tx_power_setting enumeration to nl80211. This change affects the .tx_set_power function prototype. As a result, the corresponding changes are needed to modules using it. These are mac80211, iwmc3200wifi and rndis_wlan. Cc: Samuel Ortiz <samuel.ortiz@intel.com> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h13
-rw-r--r--include/net/cfg80211.h15
2 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 64fb32b93a2..07aa04693f9 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1659,4 +1659,17 @@ enum nl80211_cqm_rssi_threshold_event {
1659 NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, 1659 NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
1660}; 1660};
1661 1661
1662
1663/**
1664 * enum nl80211_tx_power_setting - TX power adjustment
1665 * @NL80211_TX_POWER_AUTOMATIC: automatically determine transmit power
1666 * @NL80211_TX_POWER_LIMITED: limit TX power by the mBm parameter
1667 * @NL80211_TX_POWER_FIXED: fix TX power to the mBm parameter
1668 */
1669enum nl80211_tx_power_setting {
1670 NL80211_TX_POWER_AUTOMATIC,
1671 NL80211_TX_POWER_LIMITED,
1672 NL80211_TX_POWER_FIXED,
1673};
1674
1662#endif /* __LINUX_NL80211_H */ 1675#endif /* __LINUX_NL80211_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 64374f4cb7c..9b8b3f486ec 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -875,19 +875,6 @@ enum wiphy_params_flags {
875 WIPHY_PARAM_COVERAGE_CLASS = 1 << 4, 875 WIPHY_PARAM_COVERAGE_CLASS = 1 << 4,
876}; 876};
877 877
878/**
879 * enum tx_power_setting - TX power adjustment
880 *
881 * @TX_POWER_AUTOMATIC: the dbm parameter is ignored
882 * @TX_POWER_LIMITED: limit TX power by the dbm parameter
883 * @TX_POWER_FIXED: fix TX power to the dbm parameter
884 */
885enum tx_power_setting {
886 TX_POWER_AUTOMATIC,
887 TX_POWER_LIMITED,
888 TX_POWER_FIXED,
889};
890
891/* 878/*
892 * cfg80211_bitrate_mask - masks for bitrate control 879 * cfg80211_bitrate_mask - masks for bitrate control
893 */ 880 */
@@ -1149,7 +1136,7 @@ struct cfg80211_ops {
1149 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); 1136 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
1150 1137
1151 int (*set_tx_power)(struct wiphy *wiphy, 1138 int (*set_tx_power)(struct wiphy *wiphy,
1152 enum tx_power_setting type, int dbm); 1139 enum nl80211_tx_power_setting type, int mbm);
1153 int (*get_tx_power)(struct wiphy *wiphy, int *dbm); 1140 int (*get_tx_power)(struct wiphy *wiphy, int *dbm);
1154 1141
1155 int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev, 1142 int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev,