forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/ethernet/cavium/thunder/nic.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2015 Cavium, Inc.
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms of version 2 of the GNU General Public License
6
- * as published by the Free Software Foundation.
74 */
85
96 #ifndef NIC_H
....@@ -271,7 +268,7 @@
271268 };
272269
273270 struct nicvf_work {
274
- struct delayed_work work;
271
+ struct work_struct work;
275272 u8 mode;
276273 struct xcast_addr_list *mc;
277274 };
....@@ -327,7 +324,11 @@
327324 struct nicvf_work rx_mode_work;
328325 /* spinlock to protect workqueue arguments from concurrent access */
329326 spinlock_t rx_mode_wq_lock;
330
-
327
+ /* workqueue for handling kernel ndo_set_rx_mode() calls */
328
+ struct workqueue_struct *nicvf_rx_mode_wq;
329
+ /* mutex to protect VF's mailbox contents from concurrent access */
330
+ struct mutex rx_mode_mtx;
331
+ struct delayed_work link_change_work;
331332 /* PTP timestamp */
332333 struct cavium_ptp *ptp_clock;
333334 /* Inbound timestamping is on */
....@@ -575,10 +576,8 @@
575576
576577 struct xcast {
577578 u8 msg;
578
- union {
579
- u8 mode;
580
- u64 mac;
581
- } data;
579
+ u8 mode;
580
+ u64 mac:48;
582581 };
583582
584583 /* 128 bit shared memory between PF and each VF */