mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
net: wangxun: limit tx_max_coalesced_frames_irq
Add limitation on tx_max_coalesced_frames_irq as 0 ~ 65535, because 'wx->tx_work_limit' is declared as a member of type u16. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20250821023408.53472-3-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6d3f753c9c
commit
fd4aa243f1
|
|
@ -334,8 +334,11 @@ int wx_set_coalesce(struct net_device *netdev,
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (ec->tx_max_coalesced_frames_irq)
|
||||
wx->tx_work_limit = ec->tx_max_coalesced_frames_irq;
|
||||
if (ec->tx_max_coalesced_frames_irq > U16_MAX ||
|
||||
!ec->tx_max_coalesced_frames_irq)
|
||||
return -EINVAL;
|
||||
|
||||
wx->tx_work_limit = ec->tx_max_coalesced_frames_irq;
|
||||
|
||||
switch (wx->mac.type) {
|
||||
case wx_mac_sp:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user