hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/wl_linux_mon.c
....@@ -1,15 +1,16 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * Broadcom Dongle Host Driver (DHD), Linux monitor network interface
43 *
5
- * Copyright (C) 1999-2019, Broadcom Corporation
6
- *
4
+ * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
5
+ *
6
+ * Copyright (C) 1999-2017, Broadcom Corporation
7
+ *
78 * Unless you and Broadcom execute a separate written software license
89 * agreement governing use of this software, this software is licensed to you
910 * under the terms of the GNU General Public License version 2 (the "GPL"),
1011 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
1112 * following added to such license:
12
- *
13
+ *
1314 * As a special exception, the copyright holders of this software give you
1415 * permission to link this software with independent modules, and to copy and
1516 * distribute the resulting executable under terms of your choice, provided that
....@@ -17,7 +18,7 @@
1718 * the license of that module. An independent module is a module which is not
1819 * derived from this software. The special exception does not apply to any
1920 * modifications of the software.
20
- *
21
+ *
2122 * Notwithstanding the above, under no circumstances may you combine this
2223 * software in any way with any other Broadcom software provided under a license
2324 * other than the GPL, without Broadcom's express prior written consent.
....@@ -25,7 +26,7 @@
2526 *
2627 * <<Broadcom-WL-IPTag/Open:>>
2728 *
28
- * $Id: wl_linux_mon.c 514727 2014-11-12 03:02:48Z $
29
+ * $Id: wl_linux_mon.c 576195 2015-08-01 18:21:54Z $
2930 */
3031
3132 #include <osl.h>
....@@ -51,7 +52,7 @@
5152 MONITOR_STATE_INTERFACE_ADDED = 0x2,
5253 MONITOR_STATE_INTERFACE_DELETED = 0x4
5354 } monitor_states_t;
54
-int dhd_add_monitor(char *name, struct net_device **new_ndev);
55
+int dhd_add_monitor(const char *name, struct net_device **new_ndev);
5556 extern int dhd_start_xmit(struct sk_buff *skb, struct net_device *net);
5657 int dhd_del_monitor(struct net_device *ndev);
5758 int dhd_monitor_init(void *dhd_pub);
....@@ -62,7 +63,7 @@
6263 */
6364 #ifndef DHD_MAX_IFS
6465 #define DHD_MAX_IFS 16
65
-#endif
66
+#endif // endif
6667 #define MON_PRINT(format, ...) printk("DHD-MON: %s " format, __func__, ##__VA_ARGS__)
6768 #define MON_TRACE MON_PRINT
6869
....@@ -81,7 +82,7 @@
8182
8283 static dhd_linux_monitor_t g_monitor;
8384
84
-static struct net_device* lookup_real_netdev(char *name);
85
+static struct net_device* lookup_real_netdev(const char *name);
8586 static monitor_interface* ndev_to_monif(struct net_device *ndev);
8687 static int dhd_mon_if_open(struct net_device *ndev);
8788 static int dhd_mon_if_stop(struct net_device *ndev);
....@@ -97,7 +98,7 @@
9798 .ndo_set_rx_mode = dhd_mon_if_set_multicast_list,
9899 #else
99100 .ndo_set_multicast_list = dhd_mon_if_set_multicast_list,
100
-#endif
101
+#endif // endif
101102 .ndo_set_mac_address = dhd_mon_if_change_mac,
102103 };
103104
....@@ -108,7 +109,7 @@
108109 /* Look up dhd's net device table to find a match (e.g. interface "eth0" is a match for "mon.eth0"
109110 * "p2p-eth0-0" is a match for "mon.p2p-eth0-0")
110111 */
111
-static struct net_device* lookup_real_netdev(char *name)
112
+static struct net_device* lookup_real_netdev(const char *name)
112113 {
113114 struct net_device *ndev_found = NULL;
114115
....@@ -281,7 +282,7 @@
281282 * Global function definitions (declared in dhd_linux_mon.h)
282283 */
283284
284
-int dhd_add_monitor(char *name, struct net_device **new_ndev)
285
+int dhd_add_monitor(const char *name, struct net_device **new_ndev)
285286 {
286287 int i;
287288 int idx = -1;