From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Jouni Malinen <Jouni.Malinen@Atheros.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH/RFC] mac80211_hwsim: report fixed signal strength
Date: Fri, 10 Jul 2009 16:56:59 +0200 [thread overview]
Message-ID: <1247237819.29747.3.camel@johannes.local> (raw)
There's no reason to think that hwsim has any
actual signal strength, but for testing it is
very useful to have it report _some_ value to
the stack so I can see if the value ends up
being reported correctly
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
Anyone have any objections? I'm not sure -- but it's still useful at
least for me testing the upper layers.
drivers/net/wireless/mac80211_hwsim.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- wireless-testing.orig/drivers/net/wireless/mac80211_hwsim.c 2009-07-10 16:26:35.000000000 +0200
+++ wireless-testing/drivers/net/wireless/mac80211_hwsim.c 2009-07-10 16:27:51.000000000 +0200
@@ -406,7 +406,8 @@ static bool mac80211_hwsim_tx_frame(stru
rx_status.freq = data->channel->center_freq;
rx_status.band = data->channel->band;
rx_status.rate_idx = info->control.rates[0].idx;
- /* TODO: simulate signal strength (and optional packet drop) */
+ /* TODO: simulate real signal strength (and optional packet loss) */
+ rx_status.signal = -50;
if (data->ps != PS_DISABLED)
hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
@@ -1026,7 +1027,8 @@ static int __init init_mac80211_hwsim(vo
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_MESH_POINT);
- hw->flags = IEEE80211_HW_MFP_CAPABLE;
+ hw->flags = IEEE80211_HW_MFP_CAPABLE |
+ IEEE80211_HW_SIGNAL_DBM;
/* ask mac80211 to reserve space for magic */
hw->vif_data_size = sizeof(struct hwsim_vif_priv);
next reply other threads:[~2009-07-10 15:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-10 14:56 Johannes Berg [this message]
2009-07-10 18:13 ` [PATCH/RFC] mac80211_hwsim: report fixed signal strength Jouni Malinen
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=1247237819.29747.3.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=Jouni.Malinen@Atheros.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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