hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c
....@@ -1,18 +1,5 @@
1
-/*
2
- * Copyright (c) 2015-2016 Quantenna Communications, Inc.
3
- * All rights reserved.
4
- *
5
- * This program is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU General Public License
7
- * as published by the Free Software Foundation; either version 2
8
- * of the License, or (at your option) any later version.
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
- */
1
+// SPDX-License-Identifier: GPL-2.0+
2
+/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */
163
174 #include <linux/types.h>
185 #include <linux/io.h>
....@@ -42,19 +29,18 @@
4229 if (unlikely(size == 0 || size > QTN_IPC_MAX_DATA_SZ)) {
4330 pr_err("wrong rx packet size: %zu\n", size);
4431 rx_buff_ok = false;
45
- } else {
46
- memcpy_fromio(ipc->rx_data, ipc->shm_region->data, size);
32
+ }
33
+
34
+ if (likely(rx_buff_ok)) {
35
+ ipc->rx_packet_count++;
36
+ ipc->rx_callback.fn(ipc->rx_callback.arg,
37
+ ipc->shm_region->data, size);
4738 }
4839
4940 writel(QTNF_SHM_IPC_ACK, &shm_reg_hdr->flags);
5041 readl(&shm_reg_hdr->flags); /* flush PCIe write */
5142
5243 ipc->interrupt.fn(ipc->interrupt.arg);
53
-
54
- if (likely(rx_buff_ok)) {
55
- ipc->rx_packet_count++;
56
- ipc->rx_callback.fn(ipc->rx_callback.arg, ipc->rx_data, size);
57
- }
5844 }
5945
6046 static void qtnf_shm_ipc_irq_work(struct work_struct *work)