hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/nfc/hci/llc_shdlc.c
....@@ -1,19 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * shdlc Link Layer Control
34 *
45 * Copyright (C) 2012 Intel Corporation. All rights reserved.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
176 */
187
198 #define pr_fmt(fmt) "shdlc: %s: " fmt, __func__
....@@ -134,7 +123,7 @@
134123 return ((y >= x) || (y < z)) ? true : false;
135124 }
136125
137
-static struct sk_buff *llc_shdlc_alloc_skb(struct llc_shdlc *shdlc,
126
+static struct sk_buff *llc_shdlc_alloc_skb(const struct llc_shdlc *shdlc,
138127 int payload_len)
139128 {
140129 struct sk_buff *skb;
....@@ -148,7 +137,7 @@
148137 }
149138
150139 /* immediately sends an S frame. */
151
-static int llc_shdlc_send_s_frame(struct llc_shdlc *shdlc,
140
+static int llc_shdlc_send_s_frame(const struct llc_shdlc *shdlc,
152141 enum sframe_type sframe_type, int nr)
153142 {
154143 int r;
....@@ -170,7 +159,7 @@
170159 }
171160
172161 /* immediately sends an U frame. skb may contain optional payload */
173
-static int llc_shdlc_send_u_frame(struct llc_shdlc *shdlc,
162
+static int llc_shdlc_send_u_frame(const struct llc_shdlc *shdlc,
174163 struct sk_buff *skb,
175164 enum uframe_modifier uframe_modifier)
176165 {
....@@ -372,7 +361,7 @@
372361 wake_up(shdlc->connect_wq);
373362 }
374363
375
-static int llc_shdlc_connect_initiate(struct llc_shdlc *shdlc)
364
+static int llc_shdlc_connect_initiate(const struct llc_shdlc *shdlc)
376365 {
377366 struct sk_buff *skb;
378367
....@@ -388,7 +377,7 @@
388377 return llc_shdlc_send_u_frame(shdlc, skb, U_FRAME_RSET);
389378 }
390379
391
-static int llc_shdlc_connect_send_ua(struct llc_shdlc *shdlc)
380
+static int llc_shdlc_connect_send_ua(const struct llc_shdlc *shdlc)
392381 {
393382 struct sk_buff *skb;
394383