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:
Felix Fietkau
2021-10-11 21:52:21 +02:00
parent 5560b08f8e
commit 1af0242d12
+3 -2
View File
@@ -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);