aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h97
1 files changed, 60 insertions, 37 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index a2bd5feb9d5c..9d1a158e2c33 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -37,6 +37,7 @@
37#include <linux/etherdevice.h> 37#include <linux/etherdevice.h>
38#include <linux/input-polldev.h> 38#include <linux/input-polldev.h>
39#include <linux/kfifo.h> 39#include <linux/kfifo.h>
40#include <linux/timer.h>
40 41
41#include <net/mac80211.h> 42#include <net/mac80211.h>
42 43
@@ -570,7 +571,8 @@ struct rt2x00lib_ops {
570 void (*start_queue) (struct data_queue *queue); 571 void (*start_queue) (struct data_queue *queue);
571 void (*kick_queue) (struct data_queue *queue); 572 void (*kick_queue) (struct data_queue *queue);
572 void (*stop_queue) (struct data_queue *queue); 573 void (*stop_queue) (struct data_queue *queue);
573 void (*flush_queue) (struct data_queue *queue); 574 void (*flush_queue) (struct data_queue *queue, bool drop);
575 void (*tx_dma_done) (struct queue_entry *entry);
574 576
575 /* 577 /*
576 * TX control handlers 578 * TX control handlers
@@ -643,11 +645,11 @@ struct rt2x00_ops {
643}; 645};
644 646
645/* 647/*
646 * rt2x00 device flags 648 * rt2x00 state flags
647 */ 649 */
648enum rt2x00_flags { 650enum rt2x00_state_flags {
649 /* 651 /*
650 * Device state flags 652 * Device flags
651 */ 653 */
652 DEVICE_STATE_PRESENT, 654 DEVICE_STATE_PRESENT,
653 DEVICE_STATE_REGISTERED_HW, 655 DEVICE_STATE_REGISTERED_HW,
@@ -657,42 +659,47 @@ enum rt2x00_flags {
657 DEVICE_STATE_SCANNING, 659 DEVICE_STATE_SCANNING,
658 660
659 /* 661 /*
660 * Driver requirements
661 */
662 DRIVER_REQUIRE_FIRMWARE,
663 DRIVER_REQUIRE_BEACON_GUARD,
664 DRIVER_REQUIRE_ATIM_QUEUE,
665 DRIVER_REQUIRE_DMA,
666 DRIVER_REQUIRE_COPY_IV,
667 DRIVER_REQUIRE_L2PAD,
668 DRIVER_REQUIRE_TXSTATUS_FIFO,
669 DRIVER_REQUIRE_TASKLET_CONTEXT,
670 DRIVER_REQUIRE_SW_SEQNO,
671 DRIVER_REQUIRE_HT_TX_DESC,
672
673 /*
674 * Driver features
675 */
676 CONFIG_SUPPORT_HW_BUTTON,
677 CONFIG_SUPPORT_HW_CRYPTO,
678 CONFIG_SUPPORT_POWER_LIMIT,
679 DRIVER_SUPPORT_CONTROL_FILTERS,
680 DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL,
681 DRIVER_SUPPORT_PRE_TBTT_INTERRUPT,
682 DRIVER_SUPPORT_LINK_TUNING,
683
684 /*
685 * Driver configuration 662 * Driver configuration
686 */ 663 */
687 CONFIG_FRAME_TYPE,
688 CONFIG_RF_SEQUENCE,
689 CONFIG_EXTERNAL_LNA_A,
690 CONFIG_EXTERNAL_LNA_BG,
691 CONFIG_DOUBLE_ANTENNA,
692 CONFIG_CHANNEL_HT40, 664 CONFIG_CHANNEL_HT40,
693}; 665};
694 666
695/* 667/*
668 * rt2x00 capability flags
669 */
670enum rt2x00_capability_flags {
671 /*
672 * Requirements
673 */
674 REQUIRE_FIRMWARE,
675 REQUIRE_BEACON_GUARD,
676 REQUIRE_ATIM_QUEUE,
677 REQUIRE_DMA,
678 REQUIRE_COPY_IV,
679 REQUIRE_L2PAD,
680 REQUIRE_TXSTATUS_FIFO,
681 REQUIRE_TASKLET_CONTEXT,
682 REQUIRE_SW_SEQNO,
683 REQUIRE_HT_TX_DESC,
684
685 /*
686 * Capabilities
687 */
688 CAPABILITY_HW_BUTTON,
689 CAPABILITY_HW_CRYPTO,
690 CAPABILITY_POWER_LIMIT,
691 CAPABILITY_CONTROL_FILTERS,
692 CAPABILITY_CONTROL_FILTER_PSPOLL,
693 CAPABILITY_PRE_TBTT_INTERRUPT,
694 CAPABILITY_LINK_TUNING,
695 CAPABILITY_FRAME_TYPE,
696 CAPABILITY_RF_SEQUENCE,
697 CAPABILITY_EXTERNAL_LNA_A,
698 CAPABILITY_EXTERNAL_LNA_BG,
699 CAPABILITY_DOUBLE_ANTENNA,
700};
701
702/*
696 * rt2x00 device structure. 703 * rt2x00 device structure.
697 */ 704 */
698struct rt2x00_dev { 705struct rt2x00_dev {
@@ -738,13 +745,20 @@ struct rt2x00_dev {
738#endif /* CONFIG_RT2X00_LIB_LEDS */ 745#endif /* CONFIG_RT2X00_LIB_LEDS */
739 746
740 /* 747 /*
741 * Device flags. 748 * Device state flags.
742 * In these flags the current status and some 749 * In these flags the current status is stored.
743 * of the device capabilities are stored. 750 * Access to these flags should occur atomically.
744 */ 751 */
745 unsigned long flags; 752 unsigned long flags;
746 753
747 /* 754 /*
755 * Device capabiltiy flags.
756 * In these flags the device/driver capabilities are stored.
757 * Access to these flags should occur non-atomically.
758 */
759 unsigned long cap_flags;
760
761 /*
748 * Device information, Bus IRQ and name (PCI, SoC) 762 * Device information, Bus IRQ and name (PCI, SoC)
749 */ 763 */
750 int irq; 764 int irq;
@@ -911,6 +925,11 @@ struct rt2x00_dev {
911 DECLARE_KFIFO_PTR(txstatus_fifo, u32); 925 DECLARE_KFIFO_PTR(txstatus_fifo, u32);
912 926
913 /* 927 /*
928 * Timer to ensure tx status reports are read (rt2800usb).
929 */
930 struct timer_list txstatus_timer;
931
932 /*
914 * Tasklet for processing tx status reports (rt2800pci). 933 * Tasklet for processing tx status reports (rt2800pci).
915 */ 934 */
916 struct tasklet_struct txstatus_tasklet; 935 struct tasklet_struct txstatus_tasklet;
@@ -1235,6 +1254,10 @@ int rt2x00mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
1235 const struct ieee80211_tx_queue_params *params); 1254 const struct ieee80211_tx_queue_params *params);
1236void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw); 1255void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw);
1237void rt2x00mac_flush(struct ieee80211_hw *hw, bool drop); 1256void rt2x00mac_flush(struct ieee80211_hw *hw, bool drop);
1257int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
1258int rt2x00mac_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
1259void rt2x00mac_get_ringparam(struct ieee80211_hw *hw,
1260 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
1238 1261
1239/* 1262/*
1240 * Driver allocation handlers. 1263 * Driver allocation handlers.