Skip to content

Commit

Permalink
drivers/net/wan/hdlc_cisco: Add hard_header_len
Browse files Browse the repository at this point in the history
This driver didn't set hard_header_len. This patch sets hard_header_len
for it according to its header_ops->create function.

This driver's header_ops->create function (cisco_hard_header) creates
a header of (struct hdlc_header), so hard_header_len should be set to
sizeof(struct hdlc_header).

Cc: Martin Schiller <[email protected]>
Signed-off-by: Xie He <[email protected]>
Acked-by: Krzysztof Halasa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Xie He authored and davem330 committed Aug 31, 2020
1 parent 9dda511 commit 1a545eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wan/hdlc_cisco.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
memcpy(&state(hdlc)->settings, &new_settings, size);
spin_lock_init(&state(hdlc)->lock);
dev->header_ops = &cisco_header_ops;
dev->hard_header_len = sizeof(struct hdlc_header);
dev->type = ARPHRD_CISCO;
call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev);
netif_dormant_on(dev);
Expand Down

0 comments on commit 1a545eb

Please sign in to comment.