From: "Arend van Spriel" <arend@broadcom.com>
To: "Victor Goldenshtein" <victorg@ti.com>
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Subject: Re: [PATCH v2] mac80211: add command to get current rssi
Date: Thu, 31 May 2012 14:17:58 +0200 [thread overview]
Message-ID: <4FC76176.4030700@broadcom.com> (raw)
In-Reply-To: <1338463991-7741-1-git-send-email-victorg@ti.com>
On 05/31/2012 01:33 PM, Victor Goldenshtein wrote:
> Get current rssi (in dBm) from the driver/FW.
>
> Instead of reporting the signal received in the last
> rx packet, which might be inaccurate if rx traffic is
> low and beacon filtering is enabled, get the singal
> from the driver/FW.
>
> Signed-off-by: Victor Goldenshtein <victorg@ti.com>
> ---
>
> v2:
> updated function documentation.
> added *sta argument to the drv_get_rssi().
> added return value to the drv_get_rssi().
>
> include/net/mac80211.h | 5 +++++
> net/mac80211/cfg.c | 21 +++++++++++++--------
> net/mac80211/driver-ops.h | 16 ++++++++++++++++
> net/mac80211/driver-trace.h | 6 ++++++
> 4 files changed, 40 insertions(+), 8 deletions(-)
>
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index 4d6e6c6..3758612 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -2231,6 +2231,9 @@ enum ieee80211_rate_control_changed {
> * @get_et_strings: Ethtool API to get a set of strings to describe stats
> * and perhaps other supported types of ethtool data-sets.
> *
> + * @get_rssi: Get current signal strength in dBm, the function is optional
> + * and must be allowed to sleep.
> + *
This documentation is provided for the driver. mac80211 already allows
this callback to sleep. So rephrase 'must be allowed to sleep' to 'is
allowed to sleep' or 'can sleep'.
> @@ -517,7 +520,7 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy,
> * network device.
> */
>
> - rcu_read_lock();
> + mutex_lock(&local->sta_mtx);
>
> if (sdata->vif.type == NL80211_IFTYPE_STATION) {
> sta = sta_info_get_bss(sdata, sdata->u.mgd.bssid);
> @@ -546,7 +549,7 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy,
> data[i] = (u8)sinfo.signal_avg;
> i++;
> } else {
> - list_for_each_entry_rcu(sta, &local->sta_list, list) {
> + list_for_each_entry(sta, &local->sta_list, list) {
> /* Make sure this station belongs to the proper dev */
> if (sta->sdata->dev != dev)
> continue;
Just for my curiosity/learning: How are these related to the new
callback? Is it because you are now doing the callback in sta_set_sinfo()?
Gr. AvS
next prev parent reply other threads:[~2012-05-31 12:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 11:33 [PATCH v2] mac80211: add command to get current rssi Victor Goldenshtein
2012-05-31 11:42 ` Johannes Berg
2012-05-31 12:29 ` Goldenshtein, Victor
2012-05-31 12:17 ` Arend van Spriel [this message]
2012-05-31 12:28 ` Goldenshtein, Victor
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=4FC76176.4030700@broadcom.com \
--to=arend@broadcom.com \
--cc=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.