Commit 62dad5b0 authored by Benoit Papillault's avatar Benoit Papillault Committed by John W. Linville

ath9k: Added get_survey callback in order to get channel noise

Signed-off-by: default avatarBenoit Papillault <benoit.papillault@free.fr>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d10e2e02
...@@ -2044,6 +2044,25 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw, ...@@ -2044,6 +2044,25 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
return ret; return ret;
} }
static int ath9k_get_survey(struct ieee80211_hw *hw, int idx,
struct survey_info *survey)
{
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_conf *conf = &hw->conf;
if (idx != 0)
return -ENOENT;
survey->channel = conf->channel;
survey->filled = SURVEY_INFO_NOISE_DBM;
survey->noise = common->ani.noise_floor;
return 0;
}
static void ath9k_sw_scan_start(struct ieee80211_hw *hw) static void ath9k_sw_scan_start(struct ieee80211_hw *hw)
{ {
struct ath_wiphy *aphy = hw->priv; struct ath_wiphy *aphy = hw->priv;
...@@ -2115,6 +2134,7 @@ struct ieee80211_ops ath9k_ops = { ...@@ -2115,6 +2134,7 @@ struct ieee80211_ops ath9k_ops = {
.set_tsf = ath9k_set_tsf, .set_tsf = ath9k_set_tsf,
.reset_tsf = ath9k_reset_tsf, .reset_tsf = ath9k_reset_tsf,
.ampdu_action = ath9k_ampdu_action, .ampdu_action = ath9k_ampdu_action,
.get_survey = ath9k_get_survey,
.sw_scan_start = ath9k_sw_scan_start, .sw_scan_start = ath9k_sw_scan_start,
.sw_scan_complete = ath9k_sw_scan_complete, .sw_scan_complete = ath9k_sw_scan_complete,
.rfkill_poll = ath9k_rfkill_poll_state, .rfkill_poll = ath9k_rfkill_poll_state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment