From 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 22 Oct 2024 10:36:11 +0000 Subject: [PATCH] 修改4g拨号为QMI,需要在系统里后台执行quectel-CM --- kernel/net/x25/x25_dev.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/kernel/net/x25/x25_dev.c b/kernel/net/x25/x25_dev.c index 30f7162..226397a 100644 --- a/kernel/net/x25/x25_dev.c +++ b/kernel/net/x25/x25_dev.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * X.25 Packet Layer release 002 * @@ -5,12 +6,6 @@ * releases, misbehave and/or generally screw up. It might even work. * * This code REQUIRES 2.1.15 or higher - * - * This module: - * This module is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. * * History * X.25 001 Jonathan Naylor Started coding. @@ -60,7 +55,7 @@ if (!sock_owned_by_user(sk)) { queued = x25_process_rx_frame(sk, skb); } else { - queued = !sk_add_backlog(sk, skb, sk->sk_rcvbuf); + queued = !sk_add_backlog(sk, skb, READ_ONCE(sk->sk_rcvbuf)); } bh_unlock_sock(sk); sock_put(sk); @@ -122,7 +117,7 @@ if (!pskb_may_pull(skb, 1)) { x25_neigh_put(nb); - return 0; + goto drop; } switch (skb->data[0]) { -- Gitblit v1.6.2