forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
....@@ -1,19 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
34 <http://rt2x00.serialmonkey.com>
45
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/>.
176 */
187
198 /*
....@@ -1430,7 +1419,7 @@
14301419 break;
14311420 case 2: /* Failure, excessive retries */
14321421 __set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags);
1433
- /* Don't break, this is a failed frame! */
1422
+ fallthrough; /* this is a failed frame! */
14341423 default: /* Failure */
14351424 __set_bit(TXDONE_FAILURE, &txdesc.flags);
14361425 }
....@@ -1458,9 +1447,10 @@
14581447 spin_unlock_irq(&rt2x00dev->irqmask_lock);
14591448 }
14601449
1461
-static void rt2500pci_txstatus_tasklet(unsigned long data)
1450
+static void rt2500pci_txstatus_tasklet(struct tasklet_struct *t)
14621451 {
1463
- struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
1452
+ struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t,
1453
+ txstatus_tasklet);
14641454 u32 reg;
14651455
14661456 /*
....@@ -1486,17 +1476,18 @@
14861476 }
14871477 }
14881478
1489
-static void rt2500pci_tbtt_tasklet(unsigned long data)
1479
+static void rt2500pci_tbtt_tasklet(struct tasklet_struct *t)
14901480 {
1491
- struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
1481
+ struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, tbtt_tasklet);
14921482 rt2x00lib_beacondone(rt2x00dev);
14931483 if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
14941484 rt2500pci_enable_interrupt(rt2x00dev, CSR8_TBCN_EXPIRE);
14951485 }
14961486
1497
-static void rt2500pci_rxdone_tasklet(unsigned long data)
1487
+static void rt2500pci_rxdone_tasklet(struct tasklet_struct *t)
14981488 {
1499
- struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
1489
+ struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t,
1490
+ rxdone_tasklet);
15001491 if (rt2x00mmio_rxdone(rt2x00dev))
15011492 tasklet_schedule(&rt2x00dev->rxdone_tasklet);
15021493 else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
....@@ -2143,8 +2134,7 @@
21432134 .id_table = rt2500pci_device_table,
21442135 .probe = rt2500pci_probe,
21452136 .remove = rt2x00pci_remove,
2146
- .suspend = rt2x00pci_suspend,
2147
- .resume = rt2x00pci_resume,
2137
+ .driver.pm = &rt2x00pci_pm_ops,
21482138 };
21492139
21502140 module_pci_driver(rt2500pci_driver);