mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: use hrtimer_setup() in mt76x02u beacon init
Replace the two-step hrtimer initialization pattern with a single consolidated call to hrtimer_setup(). The legacy approach of calling hrtimer_init() followed by manual assignment to timer.function is deprecated. The new hrtimer_setup() helper atomically initializes the timer and assigns the callback function in one operation, eliminating the race-prone intermediate state where the timer is initialized but lacks a handler. Signed-off-by: Mieczyslaw Nalewaj <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
018f60316d
commit
012e52ae38
+2
-2
@@ -264,8 +264,8 @@ void mt76x02u_init_beacon_config(struct mt76x02_dev *dev)
|
|||||||
};
|
};
|
||||||
dev->beacon_ops = &beacon_ops;
|
dev->beacon_ops = &beacon_ops;
|
||||||
|
|
||||||
hrtimer_init(&dev->pre_tbtt_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
hrtimer_setup(&dev->pre_tbtt_timer, mt76x02u_pre_tbtt_interrupt, CLOCK_MONOTONIC,
|
||||||
dev->pre_tbtt_timer.function = mt76x02u_pre_tbtt_interrupt;
|
HRTIMER_MODE_REL);
|
||||||
INIT_WORK(&dev->pre_tbtt_work, mt76x02u_pre_tbtt_work);
|
INIT_WORK(&dev->pre_tbtt_work, mt76x02u_pre_tbtt_work);
|
||||||
|
|
||||||
mt76x02_init_beacon_config(dev);
|
mt76x02_init_beacon_config(dev);
|
||||||
|
|||||||
Reference in New Issue
Block a user