From: "John W. Linville" <linville@tuxdriver.com>
To: Blaise Gassend <blaise@willowgarage.com>
Cc: linville@redhat.com, linux-wireless@vger.kernel.org,
Jouni Malinen <j@w1.fi>
Subject: Re: [PATCH] mac80211_hwsim: Incorporate txpower into rssi
Date: Tue, 9 Nov 2010 16:24:22 -0500 [thread overview]
Message-ID: <20101109212422.GE2374@tuxdriver.com> (raw)
In-Reply-To: <AANLkTi=t-rEsFKMv-V7Q3cyY6A_+LiBBYW2WbwXzg50b@mail.gmail.com>
On Thu, Oct 28, 2010 at 02:01:24AM -0700, Blaise Gassend wrote:
> Up to now mac80211_hwsim has been reporting an rssi of -50. This patch
> improves the model slightly by returning txpower-50. This makes it
> easy to stimulate tests that need to see a varying rssi.
>
> Signed-off-by: Blaise Gassend <blaise@willowgarage.com>
This patch seems to be whitespace-damaged. Also, you should have a
space around the "-" operator.
Any comments on this patch from the mac80211_hwsim users?
> ---
> diff --git a/drivers/net/wireless/mac80211_hwsim.c
> b/drivers/net/wireless/mac80211
> index 7eaaa3b..3c44246 100644
> --- a/drivers/net/wireless/mac80211_hwsim.c
> +++ b/drivers/net/wireless/mac80211_hwsim.c
> @@ -309,6 +309,8 @@ struct mac80211_hwsim_data {
> */
> u64 group;
> struct dentry *debugfs_group;
> +
> + int power_level;
> };
>
>
> @@ -497,7 +499,7 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
> rx_status.band = data->channel->band;
> rx_status.rate_idx = info->control.rates[0].idx;
> /* TODO: simulate real signal strength (and optional packet loss) */
> - rx_status.signal = -50;
> + rx_status.signal = data->power_level-50;
>
> if (data->ps != PS_DISABLED)
> hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
> @@ -698,6 +700,7 @@ static int mac80211_hwsim_config(struct
> ieee80211_hw *hw, u32
> data->idle = !!(conf->flags & IEEE80211_CONF_IDLE);
>
> data->channel = conf->channel;
> + data->power_level = conf->power_level;
> if (!data->started || !data->beacon_int)
> del_timer(&data->beacon_timer);
> else
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2010-11-09 21:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 9:01 [PATCH] mac80211_hwsim: Incorporate txpower into rssi Blaise Gassend
2010-11-09 21:24 ` John W. Linville [this message]
2010-11-09 22:20 ` Jouni Malinen
2010-11-11 6:58 ` Blaise Gassend
2010-11-11 14:12 ` John W. Linville
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=20101109212422.GE2374@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=blaise@willowgarage.com \
--cc=j@w1.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).