| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com> |
|---|
| 3 | 4 | <http://rt2x00.serialmonkey.com> |
|---|
| 4 | 5 | |
|---|
| 5 | | - This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - it under the terms of the GNU General Public License as published by |
|---|
| 7 | | - the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | | - (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 | | - You should have received a copy of the GNU General Public License |
|---|
| 16 | | - along with this program; if not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | 6 | */ |
|---|
| 18 | 7 | |
|---|
| 19 | 8 | /* |
|---|
| .. | .. |
|---|
| 1302 | 1291 | break; |
|---|
| 1303 | 1292 | case 2: /* Failure, excessive retries */ |
|---|
| 1304 | 1293 | __set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags); |
|---|
| 1305 | | - /* Don't break, this is a failed frame! */ |
|---|
| 1294 | + fallthrough; /* this is a failed frame! */ |
|---|
| 1306 | 1295 | default: /* Failure */ |
|---|
| 1307 | 1296 | __set_bit(TXDONE_FAILURE, &txdesc.flags); |
|---|
| 1308 | 1297 | } |
|---|
| .. | .. |
|---|
| 1330 | 1319 | spin_unlock_irq(&rt2x00dev->irqmask_lock); |
|---|
| 1331 | 1320 | } |
|---|
| 1332 | 1321 | |
|---|
| 1333 | | -static void rt2400pci_txstatus_tasklet(unsigned long data) |
|---|
| 1322 | +static void rt2400pci_txstatus_tasklet(struct tasklet_struct *t) |
|---|
| 1334 | 1323 | { |
|---|
| 1335 | | - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
|---|
| 1324 | + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, |
|---|
| 1325 | + txstatus_tasklet); |
|---|
| 1336 | 1326 | u32 reg; |
|---|
| 1337 | 1327 | |
|---|
| 1338 | 1328 | /* |
|---|
| .. | .. |
|---|
| 1358 | 1348 | } |
|---|
| 1359 | 1349 | } |
|---|
| 1360 | 1350 | |
|---|
| 1361 | | -static void rt2400pci_tbtt_tasklet(unsigned long data) |
|---|
| 1351 | +static void rt2400pci_tbtt_tasklet(struct tasklet_struct *t) |
|---|
| 1362 | 1352 | { |
|---|
| 1363 | | - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
|---|
| 1353 | + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, tbtt_tasklet); |
|---|
| 1364 | 1354 | rt2x00lib_beacondone(rt2x00dev); |
|---|
| 1365 | 1355 | if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
|---|
| 1366 | 1356 | rt2400pci_enable_interrupt(rt2x00dev, CSR8_TBCN_EXPIRE); |
|---|
| 1367 | 1357 | } |
|---|
| 1368 | 1358 | |
|---|
| 1369 | | -static void rt2400pci_rxdone_tasklet(unsigned long data) |
|---|
| 1359 | +static void rt2400pci_rxdone_tasklet(struct tasklet_struct *t) |
|---|
| 1370 | 1360 | { |
|---|
| 1371 | | - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
|---|
| 1361 | + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, |
|---|
| 1362 | + rxdone_tasklet); |
|---|
| 1372 | 1363 | if (rt2x00mmio_rxdone(rt2x00dev)) |
|---|
| 1373 | 1364 | tasklet_schedule(&rt2x00dev->rxdone_tasklet); |
|---|
| 1374 | 1365 | else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
|---|
| .. | .. |
|---|
| 1845 | 1836 | .id_table = rt2400pci_device_table, |
|---|
| 1846 | 1837 | .probe = rt2400pci_probe, |
|---|
| 1847 | 1838 | .remove = rt2x00pci_remove, |
|---|
| 1848 | | - .suspend = rt2x00pci_suspend, |
|---|
| 1849 | | - .resume = rt2x00pci_resume, |
|---|
| 1839 | + .driver.pm = &rt2x00pci_pm_ops, |
|---|
| 1850 | 1840 | }; |
|---|
| 1851 | 1841 | |
|---|
| 1852 | 1842 | module_pci_driver(rt2400pci_driver); |
|---|