hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/mediatek/mt7601u/mcu.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * (c) Copyright 2002-2010, Ralink Technology, Inc.
34 * Copyright (C) 2014 Felix Fietkau <nbd@openwrt.org>
45 * Copyright (C) 2015 Jakub Kicinski <kubakici@wp.pl>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2
8
- * 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.
146 */
157
168 #include <linux/kernel.h>
....@@ -124,8 +116,10 @@
124116 int sent, ret;
125117 u8 seq = 0;
126118
127
- if (test_bit(MT7601U_STATE_REMOVED, &dev->state))
119
+ if (test_bit(MT7601U_STATE_REMOVED, &dev->state)) {
120
+ consume_skb(skb);
128121 return 0;
122
+ }
129123
130124 mutex_lock(&dev->mcu.mutex);
131125