mac80211: sample survey implementation for mac80211 & hwsim
This adds the survey function to both mac80211 itself and to mac80211_hwsim. For the latter driver, we simply invent some noise level.A real driver which cannot determine the real channel noise MUST NOT report any noise, especially not a magically conjured one :-) Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
03ceedea97
commit
1289723ef2
@@ -346,6 +346,15 @@ static inline int drv_ampdu_action(struct ieee80211_local *local,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int drv_get_survey(struct ieee80211_local *local, int idx,
|
||||
struct survey_info *survey)
|
||||
{
|
||||
int ret = -EOPNOTSUPP;
|
||||
if (local->ops->conf_tx)
|
||||
ret = local->ops->get_survey(&local->hw, idx, survey);
|
||||
/* trace_drv_get_survey(local, idx, survey, ret); */
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void drv_rfkill_poll(struct ieee80211_local *local)
|
||||
{
|
||||
|
Reference in New Issue
Block a user