From patchwork Tue Sep 15 14:12:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 263942 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 999F2C433E2 for ; Tue, 15 Sep 2020 23:24:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5093C212CC for ; Tue, 15 Sep 2020 23:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600212284; bh=xAdK3PiHwXgLjxAasfNZs7F1puTlp5nfQfYOvPu9SUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=tWDHCpsbC4Lt0dh255AK8t5/Ycd5QbgyA8sbraFCuclQi2zn6I6Ntvx+WQqM0ZzIc ECWcouAOetp/BPl7knlaR3c2uHk8c0Hiqmi6JljNM6/MmNJnqOlmz2SEMYA3sTmCXw tIYbfxSjyVJCDyuV9eC9whPIzox5GtUZhZc4Q1QA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727371AbgIOXYk (ORCPT ); Tue, 15 Sep 2020 19:24:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:48814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727179AbgIOOiA (ORCPT ); Tue, 15 Sep 2020 10:38:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4332A2245C; Tue, 15 Sep 2020 14:27:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600180064; bh=xAdK3PiHwXgLjxAasfNZs7F1puTlp5nfQfYOvPu9SUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hqhzzDkl5eNRbIB13t7ytxLjehiYP57GTK5iyU1Eh7cLYNmQf6IYNlhpZ3BgVgR1H xwwygJCXrE7ax8cYBYCPXqLsY/YnyZxH60fyHTARk+7PO00xjWfyq9S0HFqpi7EufU EHNf7SNNSaO7kEzKkTySIoZ/EqPpQcbaRVt6D3P4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Schiller , Xie He , Krzysztof Halasa , "David S. Miller" , Sasha Levin Subject: [PATCH 5.8 095/177] drivers/net/wan/hdlc_cisco: Add hard_header_len Date: Tue, 15 Sep 2020 16:12:46 +0200 Message-Id: <20200915140658.195514672@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140653.610388773@linuxfoundation.org> References: <20200915140653.610388773@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Xie He [ 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 Signed-off-by: Xie He Acked-by: Krzysztof Halasa Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 d8cba3625c185..444130655d8ea 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c @@ -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);