diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-10 10:56:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:11 -0400 |
commit | 4b14c96dfbf068acb85c3fa2446b3949c0230deb (patch) | |
tree | 53db59f81ed5f065d7432e577120f99fb7a23eb3 /drivers/net/wireless/mac80211_hwsim.c | |
parent | c56c5714f12808e3f702817e72a78dd12f1704eb (diff) |
mac80211_hwsim: report fixed signal strength
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index e9b5442f1dda..78431abc8b40 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -406,7 +406,8 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw, | |||
406 | rx_status.freq = data->channel->center_freq; | 406 | rx_status.freq = data->channel->center_freq; |
407 | rx_status.band = data->channel->band; | 407 | rx_status.band = data->channel->band; |
408 | rx_status.rate_idx = info->control.rates[0].idx; | 408 | rx_status.rate_idx = info->control.rates[0].idx; |
409 | /* TODO: simulate signal strength (and optional packet drop) */ | 409 | /* TODO: simulate real signal strength (and optional packet loss) */ |
410 | rx_status.signal = -50; | ||
410 | 411 | ||
411 | if (data->ps != PS_DISABLED) | 412 | if (data->ps != PS_DISABLED) |
412 | hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM); | 413 | hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM); |
@@ -1024,7 +1025,8 @@ static int __init init_mac80211_hwsim(void) | |||
1024 | BIT(NL80211_IFTYPE_AP) | | 1025 | BIT(NL80211_IFTYPE_AP) | |
1025 | BIT(NL80211_IFTYPE_MESH_POINT); | 1026 | BIT(NL80211_IFTYPE_MESH_POINT); |
1026 | 1027 | ||
1027 | hw->flags = IEEE80211_HW_MFP_CAPABLE; | 1028 | hw->flags = IEEE80211_HW_MFP_CAPABLE | |
1029 | IEEE80211_HW_SIGNAL_DBM; | ||
1028 | 1030 | ||
1029 | /* ask mac80211 to reserve space for magic */ | 1031 | /* ask mac80211 to reserve space for magic */ |
1030 | hw->vif_data_size = sizeof(struct hwsim_vif_priv); | 1032 | hw->vif_data_size = sizeof(struct hwsim_vif_priv); |