.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * shdlc Link Layer Control |
---|
3 | 4 | * |
---|
4 | 5 | * 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/>. |
---|
17 | 6 | */ |
---|
18 | 7 | |
---|
19 | 8 | #define pr_fmt(fmt) "shdlc: %s: " fmt, __func__ |
---|
.. | .. |
---|
134 | 123 | return ((y >= x) || (y < z)) ? true : false; |
---|
135 | 124 | } |
---|
136 | 125 | |
---|
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, |
---|
138 | 127 | int payload_len) |
---|
139 | 128 | { |
---|
140 | 129 | struct sk_buff *skb; |
---|
.. | .. |
---|
148 | 137 | } |
---|
149 | 138 | |
---|
150 | 139 | /* 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, |
---|
152 | 141 | enum sframe_type sframe_type, int nr) |
---|
153 | 142 | { |
---|
154 | 143 | int r; |
---|
.. | .. |
---|
170 | 159 | } |
---|
171 | 160 | |
---|
172 | 161 | /* 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, |
---|
174 | 163 | struct sk_buff *skb, |
---|
175 | 164 | enum uframe_modifier uframe_modifier) |
---|
176 | 165 | { |
---|
.. | .. |
---|
372 | 361 | wake_up(shdlc->connect_wq); |
---|
373 | 362 | } |
---|
374 | 363 | |
---|
375 | | -static int llc_shdlc_connect_initiate(struct llc_shdlc *shdlc) |
---|
| 364 | +static int llc_shdlc_connect_initiate(const struct llc_shdlc *shdlc) |
---|
376 | 365 | { |
---|
377 | 366 | struct sk_buff *skb; |
---|
378 | 367 | |
---|
.. | .. |
---|
388 | 377 | return llc_shdlc_send_u_frame(shdlc, skb, U_FRAME_RSET); |
---|
389 | 378 | } |
---|
390 | 379 | |
---|
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) |
---|
392 | 381 | { |
---|
393 | 382 | struct sk_buff *skb; |
---|
394 | 383 | |
---|