net: hns3: fix shaper parameter algorithm
driver inclusion category: bugfix bugzilla: NA CVE: NA HNS3 driver use unsigned int to calculate the shaper parameter, when the configured bandwidth is small, like 1M, the actual result is 1.28M in the chip side. This bug only appears when the bandwidth is less than 20M. This patch plus the ir_s one more time when the calculated result is equals to the configured bandwidth, so that can get a value closer to the configured bandwidth. Feature or Bugfix:Bugfix Signed-off-by: NYonglong Liu <liuyonglong@huawei.com> Reviewed-by: Nlinyunsheng <linyunsheng@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录