| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | Copyright (C) 2010 Willow Garage <http://www.willowgarage.com> |
|---|
| 3 | 4 | Copyright (C) 2010 Ivo van Doorn <IvDoorn@gmail.com> |
|---|
| 4 | 5 | Copyright (C) 2009 Bartlomiej Zolnierkiewicz |
|---|
| 5 | 6 | |
|---|
| 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/>. |
|---|
| 18 | 7 | */ |
|---|
| 19 | 8 | |
|---|
| 20 | 9 | #ifndef RT2800LIB_H |
|---|
| .. | .. |
|---|
| 76 | 65 | const u8 *data, const size_t len); |
|---|
| 77 | 66 | int (*drv_init_registers)(struct rt2x00_dev *rt2x00dev); |
|---|
| 78 | 67 | __le32 *(*drv_get_txwi)(struct queue_entry *entry); |
|---|
| 68 | + unsigned int (*drv_get_dma_done)(struct data_queue *queue); |
|---|
| 79 | 69 | }; |
|---|
| 80 | 70 | |
|---|
| 81 | 71 | static inline u32 rt2800_register_read(struct rt2x00_dev *rt2x00dev, |
|---|
| .. | .. |
|---|
| 177 | 167 | return rt2800ops->drv_get_txwi(entry); |
|---|
| 178 | 168 | } |
|---|
| 179 | 169 | |
|---|
| 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 | + |
|---|
| 180 | 177 | void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev, |
|---|
| 181 | 178 | const u8 command, const u8 token, |
|---|
| 182 | 179 | const u8 arg0, const u8 arg1); |
|---|
| .. | .. |
|---|
| 195 | 192 | |
|---|
| 196 | 193 | void rt2800_txdone_entry(struct queue_entry *entry, u32 status, __le32 *txwi, |
|---|
| 197 | 194 | 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); |
|---|
| 198 | 201 | |
|---|
| 199 | 202 | void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc); |
|---|
| 200 | 203 | void rt2800_clear_beacon(struct queue_entry *entry); |
|---|
| .. | .. |
|---|
| 254 | 257 | void rt2800_get_txwi_rxwi_size(struct rt2x00_dev *rt2x00dev, |
|---|
| 255 | 258 | unsigned short *txwi_size, |
|---|
| 256 | 259 | unsigned short *rxwi_size); |
|---|
| 260 | +void rt2800_pre_reset_hw(struct rt2x00_dev *rt2x00dev); |
|---|
| 257 | 261 | |
|---|
| 258 | 262 | #endif /* RT2800LIB_H */ |
|---|