[PATCH] mac80211_hwsim: Do not use undefined clockids
From: Marc Zyngier
Date: Sat Feb 25 2017 - 05:42:36 EST
Since 336a9cde10d6 ("hrtimer: Catch invalid clockids again"),
we spit out a warning at runtime when an illegal clockid is used,
catching the offender red handed, and falling back to CLOCK_MONOTONIC.
mac80211_hwsim is trying to use CLOCK_MONOTONIC_RAW, which doesn't
exist in the kernel. Before the above fix, we would have used
clockid 0, which happens to be CLOCK_MONOTONIC. This patch simply
makes this behaviour the expected one.
Cc: Johannes Berg <johannes.berg@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Fixes: 1d940aaab881 ("mac80211_hwsim: use CLOCK_MONOTONIC_RAW")
Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
---
drivers/net/wireless/mac80211_hwsim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 1620a5d2757d..0889fc81ce9e 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2671,7 +2671,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
tasklet_hrtimer_init(&data->beacon_timer,
mac80211_hwsim_beacon,
- CLOCK_MONOTONIC_RAW, HRTIMER_MODE_ABS);
+ CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
spin_lock_bh(&hwsim_radio_lock);
list_add_tail(&data->list, &hwsim_radios);
--
2.11.0
--
Jazz is not dead, it just smell funny.