Skip to content

Commit

Permalink
gianfar: Fix frame size calculation when hardware VLAN acceleration i…
Browse files Browse the repository at this point in the history
…s on

In gfar_change_mtu(), the frame size needs to be increased to account
for the extra 4 bytes VLAN adds to the ethernet header.  However,
it was being increased by the length of the whole header (18 bytes),
which is wrong.

Signed-off-by: Dai Haruki <[email protected]>
Signed-off-by: Andy Fleming <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>


---
yaml
---
svn_rev: 90395
current_ref: refs/heads/rpi-3.18.y
current_commit: faa8957
head_branch: refs/heads/rpi-3.18.y
  • Loading branch information
Dai Haruki authored and Jeff Garzik committed Mar 26, 2008
1 parent 1ef89ab commit 2e94393
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/rpi-3.18.y: a3cb96a13cf74b3e5bb4ecca0c39df1022539059
refs/heads/rpi-3.18.y: faa89577621b4296a8869e75b90a546c951df968
2 changes: 1 addition & 1 deletion trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)
int frame_size = new_mtu + ETH_HLEN;

if (priv->vlan_enable)
frame_size += VLAN_ETH_HLEN;
frame_size += VLAN_HLEN;

if (gfar_uses_fcb(priv))
frame_size += GMAC_FCB_LEN;
Expand Down

0 comments on commit 2e94393

Please sign in to comment.