From: Johannes Berg <johannes@sipsolutions.net>
To: "Goldenshtein, Victor" <victorg@ti.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: add command to get current rssi
Date: Tue, 29 May 2012 09:11:24 +0200 [thread overview]
Message-ID: <1338275484.4342.22.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CAK80WHbLfOYgvNqoyZroGC6zvWs8UYNwRP_TzLmzDjVSqJK8XA@mail.gmail.com>
On Wed, 2012-05-23 at 11:51 +0300, Goldenshtein, Victor wrote:
> On Wed, May 23, 2012 at 9:58 AM, Goldenshtein, Victor <victorg@ti.com> wrote:
> > On Tue, May 22, 2012 at 9:40 PM, Johannes Berg
> > <johannes@sipsolutions.net> wrote:
> >> On Tue, 2012-05-22 at 09:45 +0300, Victor Goldenshtein wrote:
> >>
> >>> @@ -388,7 +389,10 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
> >>> if ((sta->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) ||
> >>> (sta->local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)) {
> >>> sinfo->filled |= STATION_INFO_SIGNAL | STATION_INFO_SIGNAL_AVG;
> >>> - sinfo->signal = (s8)sta->last_signal;
> >>> + if (local->ops->get_rssi)
> >>> + drv_get_rssi(local, sdata, &sinfo->signal);
> >>> + else
> >>> + sinfo->signal = (s8)sta->last_signal;
> >>> sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal);
> >>> }
> >>
> >> So .. you're filling a per-station value with a generic per-interface
> >> callback? What were you thinking? ;-)
> >>
> >
> > This is this is for managed only.
> > I can rename the drv_get_rssi() to drv_get_sta_rssi() and to call it
> > only for NL80211_IFTYPE_STATION, I think it would clarify things?
> >
>
> Alternatively we could leave it as general callback "drv_get_rssi()",
> add the peer address and let the driver decide if it supports
> retrieval of the rssi for the given peer. Thus, allowing us to do
> something like:
>
> if (!local->ops->get_rssi) || (drv_get_rssi(local, sdata,
> sta->sta.addr, &sinfo->signal))
> sinfo->signal = (s8)sta->last_signal;
However, I think you should pass &sta->sta, not sta->sta.addr.
johannes
next prev parent reply other threads:[~2012-05-29 7:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 6:45 [PATCH] mac80211: add command to get current rssi Victor Goldenshtein
2012-05-22 11:16 ` Kalle Valo
2012-05-22 14:25 ` Goldenshtein, Victor
2012-05-22 18:40 ` Johannes Berg
2012-05-23 6:58 ` Goldenshtein, Victor
2012-05-23 8:51 ` Goldenshtein, Victor
2012-05-29 7:11 ` Johannes Berg
2012-05-29 7:11 ` Johannes Berg [this message]
2012-05-29 14:39 ` Goldenshtein, Victor
2012-06-25 12:06 ` sylvain_gmail
2012-06-25 13:32 ` Kalle Valo
2012-06-26 8:05 ` sylvain_gmail
2012-06-26 8:20 ` DINO MYCLE
2012-06-26 8:50 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338275484.4342.22.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=victorg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.