forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/net/wireless/ralink/rt2x00/rt2800lib.h
....@@ -1,20 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 Copyright (C) 2010 Willow Garage <http://www.willowgarage.com>
34 Copyright (C) 2010 Ivo van Doorn <IvDoorn@gmail.com>
45 Copyright (C) 2009 Bartlomiej Zolnierkiewicz
56
6
- This program is free software; you can redistribute it and/or modify
7
- it under the terms of the GNU General Public License as published by
8
- the Free Software Foundation; either version 2 of the License, or
9
- (at your option) any later version.
10
-
11
- This program is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with this program; if not, see <http://www.gnu.org/licenses/>.
187 */
198
209 #ifndef RT2800LIB_H
....@@ -76,6 +65,7 @@
7665 const u8 *data, const size_t len);
7766 int (*drv_init_registers)(struct rt2x00_dev *rt2x00dev);
7867 __le32 *(*drv_get_txwi)(struct queue_entry *entry);
68
+ unsigned int (*drv_get_dma_done)(struct data_queue *queue);
7969 };
8070
8171 static inline u32 rt2800_register_read(struct rt2x00_dev *rt2x00dev,
....@@ -177,6 +167,13 @@
177167 return rt2800ops->drv_get_txwi(entry);
178168 }
179169
170
+static inline unsigned int rt2800_drv_get_dma_done(struct data_queue *queue)
171
+{
172
+ const struct rt2800_ops *rt2800ops = queue->rt2x00dev->ops->drv;
173
+
174
+ return rt2800ops->drv_get_dma_done(queue);
175
+}
176
+
180177 void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev,
181178 const u8 command, const u8 token,
182179 const u8 arg0, const u8 arg1);
....@@ -195,6 +192,12 @@
195192
196193 void rt2800_txdone_entry(struct queue_entry *entry, u32 status, __le32 *txwi,
197194 bool match);
195
+void rt2800_txdone(struct rt2x00_dev *rt2x00dev, unsigned int quota);
196
+void rt2800_txdone_nostatus(struct rt2x00_dev *rt2x00dev);
197
+bool rt2800_txstatus_timeout(struct rt2x00_dev *rt2x00dev);
198
+bool rt2800_txstatus_pending(struct rt2x00_dev *rt2x00dev);
199
+
200
+void rt2800_watchdog(struct rt2x00_dev *rt2x00dev);
198201
199202 void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc);
200203 void rt2800_clear_beacon(struct queue_entry *entry);
....@@ -254,5 +257,6 @@
254257 void rt2800_get_txwi_rxwi_size(struct rt2x00_dev *rt2x00dev,
255258 unsigned short *txwi_size,
256259 unsigned short *rxwi_size);
260
+void rt2800_pre_reset_hw(struct rt2x00_dev *rt2x00dev);
257261
258262 #endif /* RT2800LIB_H */