Commit eaf4fac
net: stmmac: Do not accept invalid MTU values
The maximum MTU value is determined by the maximum size of TX FIFO so
that a full packet can fit in the FIFO. Add a check for this in the MTU
change callback.
Also check if provided and rounded MTU does not passes the maximum limit
of 16K.
Changes from v2:
- Align MTU before checking if its valid
Fixes: 7ac6653 ("stmmac: Move the STMicroelectronics driver")
Signed-off-by: Jose Abreu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 5d626c8 commit eaf4fac
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3827 | 3827 | | |
3828 | 3828 | | |
3829 | 3829 | | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
3830 | 3836 | | |
3831 | 3837 | | |
3832 | 3838 | | |
3833 | 3839 | | |
3834 | 3840 | | |
3835 | 3841 | | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
3836 | 3848 | | |
3837 | 3849 | | |
3838 | 3850 | | |
| |||
0 commit comments