Skip to content

Commit

Permalink
mt76: mt7915: use min_t() to make code cleaner
Browse files Browse the repository at this point in the history
Use min_t() in order to make code cleaner.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Changcheng Deng authored and Felix Fietkau committed Feb 24, 2022
1 parent d98a727 commit 7778735
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,8 @@ mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ipg, u8 mode)

ipg -= aifsn * slot_time;

if (ipg > TM_DEFAULT_SIFS) {
if (ipg < TM_MAX_SIFS)
sifs = ipg;
else
sifs = TM_MAX_SIFS;
}
if (ipg > TM_DEFAULT_SIFS)
sifs = min_t(u32, ipg, TM_MAX_SIFS);
}
done:
txv_time = mt76_get_field(dev, MT_TMAC_ATCR(phy->band_idx),
Expand Down

0 comments on commit 7778735

Please sign in to comment.