* [PATCH/RFC] mac80211_hwsim: report fixed signal strength
@ 2009-07-10 14:56 Johannes Berg
2009-07-10 18:13 ` Jouni Malinen
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2009-07-10 14:56 UTC (permalink / raw)
To: John Linville; +Cc: Jouni Malinen, linux-wireless
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH/RFC] mac80211_hwsim: report fixed signal strength
2009-07-10 14:56 [PATCH/RFC] mac80211_hwsim: report fixed signal strength Johannes Berg
@ 2009-07-10 18:13 ` Jouni Malinen
0 siblings, 0 replies; 2+ messages in thread
From: Jouni Malinen @ 2009-07-10 18:13 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jouni Malinen, linux-wireless
On Fri, Jul 10, 2009 at 04:56:59PM +0200, Johannes Berg wrote:
> 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
> Anyone have any objections? I'm not sure -- but it's still useful at
> least for me testing the upper layers.
At some point, we might even get to simulating (e.g., by a user space
app) signal strength more properly, but for now, this looks fine to me.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-10 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10 14:56 [PATCH/RFC] mac80211_hwsim: report fixed signal strength Johannes Berg
2009-07-10 18:13 ` Jouni Malinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox