From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Xie He <xie.he.0141@gmail.com>, Martin Schiller <ms@dev.tdt.de>,
Krzysztof Halasa <khc@pm.waw.pl>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.9 10/13] drivers/net/wan/hdlc_cisco: Add hard_header_len
Date: Mon, 7 Sep 2020 12:35:21 -0400 [thread overview]
Message-ID: <20200907163524.1281734-10-sashal@kernel.org> (raw)
In-Reply-To: <20200907163524.1281734-1-sashal@kernel.org>
From: Xie He <xie.he.0141@gmail.com>
[ Upstream commit 1a545ebe380bf4c1433e3c136e35a77764fda5ad ]
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 <ms@dev.tdt.de>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wan/hdlc_cisco.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c
index a408abc25512a..7f99fb666f196 100644
--- a/drivers/net/wan/hdlc_cisco.c
+++ b/drivers/net/wan/hdlc_cisco.c
@@ -377,6 +377,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);
--
2.25.1
next prev parent reply other threads:[~2020-09-07 16:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 16:35 [PATCH AUTOSEL 4.9 01/13] drivers/net/wan/lapbether: Added needed_tailroom Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.9 02/13] NFC: st95hf: Fix memleak in st95hf_in_send_cmd Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.9 03/13] firestream: Fix memleak in fs_open Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.9 05/13] drivers/net/wan/lapbether: Set network_header before transmitting Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.9 06/13] cfg80211: regulatory: reject invalid hints Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.9 07/13] net: usb: Fix uninit-was-stored issue in asix_read_phy_addr() Sasha Levin
2020-09-07 16:35 ` Sasha Levin [this message]
2020-09-07 16:35 ` [PATCH AUTOSEL 4.9 11/13] net: usb: dm9601: Add USB ID of Keenetic Plus DSL Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200907163524.1281734-10-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=ms@dev.tdt.de \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xie.he.0141@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).