mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: replace a 64 bit divsion with a call to div_u64_rem
Fixes a build error on 32 bit targets Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+3
-2
@@ -2368,12 +2368,13 @@ void mt7915_mac_add_twt_setup(struct ieee80211_hw *hw,
|
||||
sta_setup_cmd == TWT_SETUP_CMD_SUGGEST) {
|
||||
u64 interval = (u64)le16_to_cpu(twt_agrt->mantissa) << exp;
|
||||
u64 flow_tsf, curr_tsf;
|
||||
u32 rem;
|
||||
|
||||
flow->sched = true;
|
||||
flow->start_tsf = mt7915_mac_twt_sched_list_add(dev, flow);
|
||||
curr_tsf = __mt7915_get_tsf(hw, msta->vif);
|
||||
flow_tsf = curr_tsf + interval -
|
||||
(curr_tsf - flow->start_tsf) % interval;
|
||||
div_u64_rem(curr_tsf - flow->start_tsf, interval, &rem);
|
||||
flow_tsf = curr_tsf + interval - rem;
|
||||
twt_agrt->twt = cpu_to_le64(flow_tsf);
|
||||
} else {
|
||||
list_add_tail(&flow->list, &dev->twt_list);
|
||||
|
||||
Reference in New Issue
Block a user