diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-07-28 14:47:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-29 12:46:47 -0400 |
commit | a55427e8284541d43630f10a6c637b28802c21b0 (patch) | |
tree | f498b53acfd996ae94f2ecdaf0061e06f16c5114 /drivers | |
parent | 0d462bbb0e20863b6c796abd779bfdb534d60278 (diff) |
ar9170: add get_survey callback in order to get channel noise
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index 5e2c51433967..c67b05f3bcbd 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -1905,6 +1905,24 @@ static int ar9170_get_stats(struct ieee80211_hw *hw, | |||
1905 | return 0; | 1905 | return 0; |
1906 | } | 1906 | } |
1907 | 1907 | ||
1908 | static int ar9170_get_survey(struct ieee80211_hw *hw, int idx, | ||
1909 | struct survey_info *survey) | ||
1910 | { | ||
1911 | struct ar9170 *ar = hw->priv; | ||
1912 | struct ieee80211_conf *conf = &hw->conf; | ||
1913 | |||
1914 | if (idx != 0) | ||
1915 | return -ENOENT; | ||
1916 | |||
1917 | /* TODO: update noise value, e.g. call ar9170_set_channel */ | ||
1918 | |||
1919 | survey->channel = conf->channel; | ||
1920 | survey->filled = SURVEY_INFO_NOISE_DBM; | ||
1921 | survey->noise = ar->noise[0]; | ||
1922 | |||
1923 | return 0; | ||
1924 | } | ||
1925 | |||
1908 | static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue, | 1926 | static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue, |
1909 | const struct ieee80211_tx_queue_params *param) | 1927 | const struct ieee80211_tx_queue_params *param) |
1910 | { | 1928 | { |
@@ -1957,6 +1975,7 @@ static const struct ieee80211_ops ar9170_ops = { | |||
1957 | .get_tsf = ar9170_op_get_tsf, | 1975 | .get_tsf = ar9170_op_get_tsf, |
1958 | .set_key = ar9170_set_key, | 1976 | .set_key = ar9170_set_key, |
1959 | .get_stats = ar9170_get_stats, | 1977 | .get_stats = ar9170_get_stats, |
1978 | .get_survey = ar9170_get_survey, | ||
1960 | .ampdu_action = ar9170_ampdu_action, | 1979 | .ampdu_action = ar9170_ampdu_action, |
1961 | }; | 1980 | }; |
1962 | 1981 | ||