hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/wireless/ralink/rt2x00/rt2x00.h
....@@ -1,21 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 Copyright (C) 2010 Willow Garage <http://www.willowgarage.com>
34 Copyright (C) 2004 - 2010 Ivo van Doorn <IvDoorn@gmail.com>
45 Copyright (C) 2004 - 2009 Gertjan van Wingerde <gwingerde@gmail.com>
56 <http://rt2x00.serialmonkey.com>
67
7
- This program is free software; you can redistribute it and/or modify
8
- it under the terms of the GNU General Public License as published by
9
- the Free Software Foundation; either version 2 of the License, or
10
- (at your option) any later version.
11
-
12
- This program is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- GNU General Public License for more details.
16
-
17
- You should have received a copy of the GNU General Public License
18
- along with this program; if not, see <http://www.gnu.org/licenses/>.
198 */
209
2110 /*
....@@ -34,7 +23,6 @@
3423 #include <linux/leds.h>
3524 #include <linux/mutex.h>
3625 #include <linux/etherdevice.h>
37
-#include <linux/input-polldev.h>
3826 #include <linux/kfifo.h>
3927 #include <linux/hrtimer.h>
4028 #include <linux/average.h>
....@@ -69,10 +57,10 @@
6957 printk(KERN_ERR KBUILD_MODNAME ": %s: Error - " fmt, \
7058 __func__, ##__VA_ARGS__)
7159 #define rt2x00_err(dev, fmt, ...) \
72
- wiphy_err((dev)->hw->wiphy, "%s: Error - " fmt, \
60
+ wiphy_err_ratelimited((dev)->hw->wiphy, "%s: Error - " fmt, \
7361 __func__, ##__VA_ARGS__)
7462 #define rt2x00_warn(dev, fmt, ...) \
75
- wiphy_warn((dev)->hw->wiphy, "%s: Warning - " fmt, \
63
+ wiphy_warn_ratelimited((dev)->hw->wiphy, "%s: Warning - " fmt, \
7664 __func__, ##__VA_ARGS__)
7765 #define rt2x00_info(dev, fmt, ...) \
7866 wiphy_info((dev)->hw->wiphy, "%s: Info - " fmt, \
....@@ -336,6 +324,8 @@
336324 * to bring the device/driver back into the desired state.
337325 */
338326 struct delayed_work watchdog_work;
327
+ unsigned int watchdog_interval;
328
+ bool watchdog_disabled;
339329
340330 /*
341331 * Work structure for scheduling periodic AGC adjustments.
....@@ -528,11 +518,11 @@
528518 /*
529519 * TX status tasklet handler.
530520 */
531
- void (*txstatus_tasklet) (unsigned long data);
532
- void (*pretbtt_tasklet) (unsigned long data);
533
- void (*tbtt_tasklet) (unsigned long data);
534
- void (*rxdone_tasklet) (unsigned long data);
535
- void (*autowake_tasklet) (unsigned long data);
521
+ void (*txstatus_tasklet) (struct tasklet_struct *t);
522
+ void (*pretbtt_tasklet) (struct tasklet_struct *t);
523
+ void (*tbtt_tasklet) (struct tasklet_struct *t);
524
+ void (*rxdone_tasklet) (struct tasklet_struct *t);
525
+ void (*autowake_tasklet) (struct tasklet_struct *t);
536526
537527 /*
538528 * Device init handlers.
....@@ -626,6 +616,7 @@
626616 void (*config) (struct rt2x00_dev *rt2x00dev,
627617 struct rt2x00lib_conf *libconf,
628618 const unsigned int changed_flags);
619
+ void (*pre_reset_hw) (struct rt2x00_dev *rt2x00dev);
629620 int (*sta_add) (struct rt2x00_dev *rt2x00dev,
630621 struct ieee80211_vif *vif,
631622 struct ieee80211_sta *sta);
....@@ -665,6 +656,8 @@
665656 DEVICE_STATE_STARTED,
666657 DEVICE_STATE_ENABLED_RADIO,
667658 DEVICE_STATE_SCANNING,
659
+ DEVICE_STATE_FLUSHING,
660
+ DEVICE_STATE_RESET,
668661
669662 /*
670663 * Driver configuration
....@@ -720,6 +713,7 @@
720713 CAPABILITY_VCO_RECALIBRATION,
721714 CAPABILITY_EXTERNAL_PA_TX0,
722715 CAPABILITY_EXTERNAL_PA_TX1,
716
+ CAPABILITY_RESTART_HW,
723717 };
724718
725719 /*
....@@ -1013,6 +1007,7 @@
10131007 unsigned int extra_tx_headroom;
10141008
10151009 struct usb_anchor *anchor;
1010
+ unsigned int num_proto_errs;
10161011
10171012 /* Clock for System On Chip devices. */
10181013 struct clk *clk;
....@@ -1275,6 +1270,12 @@
12751270 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_VCO_RECALIBRATION);
12761271 }
12771272
1273
+static inline bool
1274
+rt2x00_has_cap_restart_hw(struct rt2x00_dev *rt2x00dev)
1275
+{
1276
+ return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RESTART_HW);
1277
+}
1278
+
12781279 /**
12791280 * rt2x00queue_map_txskb - Map a skb into DMA for TX purposes.
12801281 * @entry: Pointer to &struct queue_entry
....@@ -1438,6 +1439,8 @@
14381439 struct sk_buff *skb);
14391440 int rt2x00mac_start(struct ieee80211_hw *hw);
14401441 void rt2x00mac_stop(struct ieee80211_hw *hw);
1442
+void rt2x00mac_reconfig_complete(struct ieee80211_hw *hw,
1443
+ enum ieee80211_reconfig_type reconfig_type);
14411444 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
14421445 struct ieee80211_vif *vif);
14431446 void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
....@@ -1484,9 +1487,8 @@
14841487 */
14851488 int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev);
14861489 void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev);
1487
-#ifdef CONFIG_PM
1488
-int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state);
1490
+
1491
+int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev);
14891492 int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);
1490
-#endif /* CONFIG_PM */
14911493
14921494 #endif /* RT2X00_H */