mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
cxgbe(4): Avoid overflow while calculating channel rate.
Reported by: Coverity (CID 1008352) MFC after: 1 week Sponsored by: Chelsio Communications
This commit is contained in:
parent
c8e7055577
commit
5a35633d7f
1 changed files with 1 additions and 1 deletions
|
|
@ -5770,7 +5770,7 @@ int t4_set_sched_ipg(struct adapter *adap, int sched, unsigned int ipg)
|
|||
*/
|
||||
static u64 chan_rate(struct adapter *adap, unsigned int bytes256)
|
||||
{
|
||||
u64 v = bytes256 * adap->params.vpd.cclk;
|
||||
u64 v = (u64)bytes256 * adap->params.vpd.cclk;
|
||||
|
||||
return v * 62 + v / 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue