2011-12-22 08:36:38

by Helmut Schaa

[permalink] [raw]
Subject: [PATCH] rt2x00: Mark active channel's survey data as "in use"

This is just a cosmetical fix since we only return survey data for the
active channel but it allows iw to show that the survey data is
for the currently used channel.

Signed-off-by: Helmut Schaa <[email protected]>
---
drivers/net/wireless/rt2x00/rt2800lib.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 14fc8d1..bb70e89 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4686,6 +4686,9 @@ int rt2800_get_survey(struct ieee80211_hw *hw, int idx,
survey->channel_time_ext_busy = busy_ext / 1000;
}

+ if (!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))
+ survey->filled |= SURVEY_INFO_IN_USE;
+
return 0;

}
--
1.7.7



2011-12-27 15:18:36

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Mark active channel's survey data as "in use"

On Thu, Dec 22, 2011 at 9:36 AM, Helmut Schaa
<[email protected]> wrote:
> This is just a cosmetical fix since we only return survey data for the
> active channel but it allows iw to show that the survey data is
> for the currently used channel.
>
> Signed-off-by: Helmut Schaa <[email protected]>

Acked-by: Ivo van Doorn <[email protected]>

> ---
> ?drivers/net/wireless/rt2x00/rt2800lib.c | ? ?3 +++
> ?1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 14fc8d1..bb70e89 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -4686,6 +4686,9 @@ int rt2800_get_survey(struct ieee80211_hw *hw, int idx,
> ? ? ? ? ? ? ? ?survey->channel_time_ext_busy = busy_ext / 1000;
> ? ? ? ?}
>
> + ? ? ? if (!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))
> + ? ? ? ? ? ? ? survey->filled |= SURVEY_INFO_IN_USE;
> +
> ? ? ? ?return 0;
>
> ?}
> --
> 1.7.7
>