b43: Add QOS support
[deliverable/linux.git] / drivers / net / wireless / b43 / b43.h
index 7b6fc1ab2b904fc607273d8d67946d159107d871..55031463c3965ebb87a4534e8e8f68c38d22bd47 100644 (file)
 #include "lo.h"
 #include "phy.h"
 
+
+/* The unique identifier of the firmware that's officially supported by
+ * this driver version. */
+#define B43_SUPPORTED_FIRMWARE_ID      "FW13"
+
+
 #ifdef CONFIG_B43_DEBUG
 # define B43_DEBUG     1
 #else
@@ -35,8 +41,8 @@
 #define B43_MMIO_DMA4_IRQ_MASK         0x44
 #define B43_MMIO_DMA5_REASON           0x48
 #define B43_MMIO_DMA5_IRQ_MASK         0x4C
-#define B43_MMIO_MACCTL                        0x120
-#define B43_MMIO_STATUS2_BITFIELD      0x124
+#define B43_MMIO_MACCTL                        0x120   /* MAC control */
+#define B43_MMIO_MACCMD                        0x124   /* MAC command */
 #define B43_MMIO_GEN_IRQ_REASON                0x128
 #define B43_MMIO_GEN_IRQ_MASK          0x12C
 #define B43_MMIO_RAM_CONTROL           0x130
@@ -50,6 +56,9 @@
 #define B43_MMIO_XMITSTAT_1            0x174
 #define B43_MMIO_REV3PLUS_TSF_LOW      0x180   /* core rev >= 3 only */
 #define B43_MMIO_REV3PLUS_TSF_HIGH     0x184   /* core rev >= 3 only */
+#define B43_MMIO_TSF_CFP_REP           0x188
+#define B43_MMIO_TSF_CFP_START         0x18C
+#define B43_MMIO_TSF_CFP_MAXDUR                0x190
 
 /* 32-bit DMA */
 #define B43_MMIO_DMA32_BASE0           0x200
 #define B43_MMIO_DMA64_BASE3           0x2C0
 #define B43_MMIO_DMA64_BASE4           0x300
 #define B43_MMIO_DMA64_BASE5           0x340
-/* PIO */
-#define B43_MMIO_PIO1_BASE             0x300
-#define B43_MMIO_PIO2_BASE             0x310
-#define B43_MMIO_PIO3_BASE             0x320
-#define B43_MMIO_PIO4_BASE             0x330
 
 #define B43_MMIO_PHY_VER               0x3E0
 #define B43_MMIO_PHY_RADIO             0x3E2
 #define B43_MMIO_RADIO_HWENABLED_LO    0x49A
 #define B43_MMIO_GPIO_CONTROL          0x49C
 #define B43_MMIO_GPIO_MASK             0x49E
+#define B43_MMIO_TSF_CFP_START_LOW     0x604
+#define B43_MMIO_TSF_CFP_START_HIGH    0x606
 #define B43_MMIO_TSF_0                 0x632   /* core rev < 3 only */
 #define B43_MMIO_TSF_1                 0x634   /* core rev < 3 only */
 #define B43_MMIO_TSF_2                 0x636   /* core rev < 3 only */
 #define B43_MMIO_TSF_3                 0x638   /* core rev < 3 only */
 #define B43_MMIO_RNG                   0x65A
+#define B43_MMIO_IFSCTL                        0x688 /* Interframe space control */
+#define  B43_MMIO_IFSCTL_USE_EDCF      0x0004
 #define B43_MMIO_POWERUP_DELAY         0x6A8
 
 /* SPROM boardflags_lo values */
@@ -138,7 +146,8 @@ enum {
 #define B43_SHM_SH_PHYTYPE             0x0052  /* PHY type */
 #define B43_SHM_SH_ANTSWAP             0x005C  /* Antenna swap threshold */
 #define B43_SHM_SH_HOSTFLO             0x005E  /* Hostflags for ucode options (low) */
-#define B43_SHM_SH_HOSTFHI             0x0060  /* Hostflags for ucode options (high) */
+#define B43_SHM_SH_HOSTFMI             0x0060  /* Hostflags for ucode options (middle) */
+#define B43_SHM_SH_HOSTFHI             0x0062  /* Hostflags for ucode options (high) */
 #define B43_SHM_SH_RFATT               0x0064  /* Current radio attenuation value */
 #define B43_SHM_SH_RADAR               0x0066  /* Radar register */
 #define B43_SHM_SH_PHYTXNOI            0x006E  /* PHY noise directly after TX (lower 8bit only) */
@@ -170,14 +179,17 @@ enum {
 #define B43_SHM_SH_SLOTT               0x0010  /* Slot time */
 #define B43_SHM_SH_DTIMPER             0x0012  /* DTIM period */
 #define B43_SHM_SH_NOSLPZNATDTIM       0x004C  /* NOSLPZNAT DTIM */
-/* SHM_SHARED beacon variables */
+/* SHM_SHARED beacon/AP variables */
 #define B43_SHM_SH_BTL0                        0x0018  /* Beacon template length 0 */
 #define B43_SHM_SH_BTL1                        0x001A  /* Beacon template length 1 */
 #define B43_SHM_SH_BTSFOFF             0x001C  /* Beacon TSF offset */
 #define B43_SHM_SH_TIMBPOS             0x001E  /* TIM B position in beacon */
+#define B43_SHM_SH_DTIMP               0x0012  /* DTIP period */
+#define B43_SHM_SH_MCASTCOOKIE         0x00A8  /* Last bcast/mcast frame ID */
 #define B43_SHM_SH_SFFBLIM             0x0044  /* Short frame fallback retry limit */
 #define B43_SHM_SH_LFFBLIM             0x0046  /* Long frame fallback retry limit */
 #define B43_SHM_SH_BEACPHYCTL          0x0054  /* Beacon PHY TX control word (see PHY TX control) */
+#define B43_SHM_SH_EXTNPHYCTL          0x00B0  /* Extended bytes for beacon PHY control (N) */
 /* SHM_SHARED ACK/CTS control */
 #define B43_SHM_SH_ACKCTSPHYCTL                0x0022  /* ACK/CTS PHY control word (see PHY TX control) */
 /* SHM_SHARED probe response variables */
@@ -223,31 +235,41 @@ enum {
 #define B43_MMIO_RADIO_HWENABLED_LO_MASK (1 << 4)
 
 /* HostFlags. See b43_hf_read/write() */
-#define B43_HF_ANTDIVHELP              0x00000001      /* ucode antenna div helper */
-#define B43_HF_SYMW                    0x00000002      /* G-PHY SYM workaround */
-#define B43_HF_RXPULLW                 0x00000004      /* RX pullup workaround */
-#define B43_HF_CCKBOOST                        0x00000008      /* 4dB CCK power boost (exclusive with OFDM boost) */
-#define B43_HF_BTCOEX                  0x00000010      /* Bluetooth coexistance */
-#define B43_HF_GDCW                    0x00000020      /* G-PHY DV canceller filter bw workaround */
-#define B43_HF_OFDMPABOOST             0x00000040      /* Enable PA gain boost for OFDM */
-#define B43_HF_ACPR                    0x00000080      /* Disable for Japan, channel 14 */
-#define B43_HF_EDCF                    0x00000100      /* on if WME and MAC suspended */
-#define B43_HF_TSSIRPSMW               0x00000200      /* TSSI reset PSM ucode workaround */
-#define B43_HF_DSCRQ                   0x00000400      /* Disable slow clock request in ucode */
-#define B43_HF_ACIW                    0x00000800      /* ACI workaround: shift bits by 2 on PHY CRS */
-#define B43_HF_2060W                   0x00001000      /* 2060 radio workaround */
-#define B43_HF_RADARW                  0x00002000      /* Radar workaround */
-#define B43_HF_USEDEFKEYS              0x00004000      /* Enable use of default keys */
-#define B43_HF_BT4PRIOCOEX             0x00010000      /* Bluetooth 2-priority coexistance */
-#define B43_HF_FWKUP                   0x00020000      /* Fast wake-up ucode */
-#define B43_HF_VCORECALC               0x00040000      /* Force VCO recalculation when powering up synthpu */
-#define B43_HF_PCISCW                  0x00080000      /* PCI slow clock workaround */
-#define B43_HF_4318TSSI                        0x00200000      /* 4318 TSSI */
-#define B43_HF_FBCMCFIFO               0x00400000      /* Flush bcast/mcast FIFO immediately */
-#define B43_HF_HWPCTL                  0x00800000      /* Enable hardwarre power control */
-#define B43_HF_BTCOEXALT               0x01000000      /* Bluetooth coexistance in alternate pins */
-#define B43_HF_TXBTCHECK               0x02000000      /* Bluetooth check during transmission */
-#define B43_HF_SKCFPUP                 0x04000000      /* Skip CFP update */
+#define B43_HF_ANTDIVHELP      0x000000000001ULL /* ucode antenna div helper */
+#define B43_HF_SYMW            0x000000000002ULL /* G-PHY SYM workaround */
+#define B43_HF_RXPULLW         0x000000000004ULL /* RX pullup workaround */
+#define B43_HF_CCKBOOST                0x000000000008ULL /* 4dB CCK power boost (exclusive with OFDM boost) */
+#define B43_HF_BTCOEX          0x000000000010ULL /* Bluetooth coexistance */
+#define B43_HF_GDCW            0x000000000020ULL /* G-PHY DC canceller filter bw workaround */
+#define B43_HF_OFDMPABOOST     0x000000000040ULL /* Enable PA gain boost for OFDM */
+#define B43_HF_ACPR            0x000000000080ULL /* Disable for Japan, channel 14 */
+#define B43_HF_EDCF            0x000000000100ULL /* on if WME and MAC suspended */
+#define B43_HF_TSSIRPSMW       0x000000000200ULL /* TSSI reset PSM ucode workaround */
+#define B43_HF_20IN40IQW       0x000000000200ULL /* 20 in 40 MHz I/Q workaround (rev >= 13 only) */
+#define B43_HF_DSCRQ           0x000000000400ULL /* Disable slow clock request in ucode */
+#define B43_HF_ACIW            0x000000000800ULL /* ACI workaround: shift bits by 2 on PHY CRS */
+#define B43_HF_2060W           0x000000001000ULL /* 2060 radio workaround */
+#define B43_HF_RADARW          0x000000002000ULL /* Radar workaround */
+#define B43_HF_USEDEFKEYS      0x000000004000ULL /* Enable use of default keys */
+#define B43_HF_AFTERBURNER     0x000000008000ULL /* Afterburner enabled */
+#define B43_HF_BT4PRIOCOEX     0x000000010000ULL /* Bluetooth 4-priority coexistance */
+#define B43_HF_FWKUP           0x000000020000ULL /* Fast wake-up ucode */
+#define B43_HF_VCORECALC       0x000000040000ULL /* Force VCO recalculation when powering up synthpu */
+#define B43_HF_PCISCW          0x000000080000ULL /* PCI slow clock workaround */
+#define B43_HF_4318TSSI                0x000000200000ULL /* 4318 TSSI */
+#define B43_HF_FBCMCFIFO       0x000000400000ULL /* Flush bcast/mcast FIFO immediately */
+#define B43_HF_HWPCTL          0x000000800000ULL /* Enable hardwarre power control */
+#define B43_HF_BTCOEXALT       0x000001000000ULL /* Bluetooth coexistance in alternate pins */
+#define B43_HF_TXBTCHECK       0x000002000000ULL /* Bluetooth check during transmission */
+#define B43_HF_SKCFPUP         0x000004000000ULL /* Skip CFP update */
+#define B43_HF_N40W            0x000008000000ULL /* N PHY 40 MHz workaround (rev >= 13 only) */
+#define B43_HF_ANTSEL          0x000020000000ULL /* Antenna selection (for testing antenna div.) */
+#define B43_HF_BT3COEXT                0x000020000000ULL /* Bluetooth 3-wire coexistence (rev >= 13 only) */
+#define B43_HF_BTCANT          0x000040000000ULL /* Bluetooth coexistence (antenna mode) (rev >= 13 only) */
+#define B43_HF_ANTSELEN                0x000100000000ULL /* Antenna selection enabled (rev >= 13 only) */
+#define B43_HF_ANTSELMODE      0x000200000000ULL /* Antenna selection mode (rev >= 13 only) */
+#define B43_HF_MLADVW          0x001000000000ULL /* N PHY ML ADV workaround (rev >= 13 only) */
+#define B43_HF_PR45960W                0x080000000000ULL /* PR 45960 workaround (rev >= 13 only) */
 
 /* MacFilter offsets. */
 #define B43_MACFILTER_SELF             0x0000
@@ -321,17 +343,29 @@ enum {
 #define B43_MACCTL_DISCPMQ             0x40000000      /* Discard Power Management Queue */
 #define B43_MACCTL_GMODE               0x80000000      /* G Mode */
 
-/* 802.11 core specific TM State Low flags */
+/* MAC Command bitfield */
+#define B43_MACCMD_BEACON0_VALID       0x00000001      /* Beacon 0 in template RAM is busy/valid */
+#define B43_MACCMD_BEACON1_VALID       0x00000002      /* Beacon 1 in template RAM is busy/valid */
+#define B43_MACCMD_DFQ_VALID           0x00000004      /* Directed frame queue valid (IBSS PS mode, ATIM) */
+#define B43_MACCMD_CCA                 0x00000008      /* Clear channel assessment */
+#define B43_MACCMD_BGNOISE             0x00000010      /* Background noise */
+
+/* 802.11 core specific TM State Low (SSB_TMSLOW) flags */
 #define B43_TMSLOW_GMODE               0x20000000      /* G Mode Enable */
-#define B43_TMSLOW_PLLREFSEL           0x00200000      /* PLL Frequency Reference Select */
+#define B43_TMSLOW_PHYCLKSPEED         0x00C00000      /* PHY clock speed mask (N-PHY only) */
+#define  B43_TMSLOW_PHYCLKSPEED_40MHZ  0x00000000      /* 40 MHz PHY */
+#define  B43_TMSLOW_PHYCLKSPEED_80MHZ  0x00400000      /* 80 MHz PHY */
+#define  B43_TMSLOW_PHYCLKSPEED_160MHZ 0x00800000      /* 160 MHz PHY */
+#define B43_TMSLOW_PLLREFSEL           0x00200000      /* PLL Frequency Reference Select (rev >= 5) */
 #define B43_TMSLOW_MACPHYCLKEN         0x00100000      /* MAC PHY Clock Control Enable (rev >= 5) */
 #define B43_TMSLOW_PHYRESET            0x00080000      /* PHY Reset */
 #define B43_TMSLOW_PHYCLKEN            0x00040000      /* PHY Clock Enable */
 
-/* 802.11 core specific TM State High flags */
+/* 802.11 core specific TM State High (SSB_TMSHIGH) flags */
+#define B43_TMSHIGH_DUALBAND_PHY       0x00080000      /* Dualband PHY available */
 #define B43_TMSHIGH_FCLOCK             0x00040000      /* Fast Clock Available (rev >= 5) */
-#define B43_TMSHIGH_APHY               0x00020000      /* A-PHY available (rev >= 5) */
-#define B43_TMSHIGH_GPHY               0x00010000      /* G-PHY available (rev >= 5) */
+#define B43_TMSHIGH_HAVE_5GHZ_PHY      0x00020000      /* 5 GHz PHY available (rev >= 5) */
+#define B43_TMSHIGH_HAVE_2GHZ_PHY      0x00010000      /* 2.4 GHz PHY available (rev >= 5) */
 
 /* Generic-Interrupt reasons. */
 #define B43_IRQ_MAC_SUSPENDED          0x00000001
@@ -393,6 +427,8 @@ enum {
 #define B43_DEFAULT_SHORT_RETRY_LIMIT  7
 #define B43_DEFAULT_LONG_RETRY_LIMIT   4
 
+#define B43_PHY_TX_BADNESS_LIMIT       1000
+
 /* Max size of a security key */
 #define B43_SEC_KEYSIZE                        16
 /* Security algorithms. */
@@ -435,20 +471,13 @@ struct b43_iv {
 } __attribute__((__packed__));
 
 
-#define B43_PHYMODE(phytype)           (1 << (phytype))
-#define B43_PHYMODE_A                  B43_PHYMODE(B43_PHYTYPE_A)
-#define B43_PHYMODE_B                  B43_PHYMODE(B43_PHYTYPE_B)
-#define B43_PHYMODE_G                  B43_PHYMODE(B43_PHYTYPE_G)
-
 struct b43_phy {
-       /* Possible PHYMODEs on this PHY */
-       u8 possible_phymodes;
+       /* Band support flags. */
+       bool supports_2ghz;
+       bool supports_5ghz;
+
        /* GMODE bit enabled? */
        bool gmode;
-       /* Possible ieee80211 subsystem hwmodes for this PHY.
-        * Which mode is selected, depends on thr GMODE enabled bit */
-#define B43_MAX_PHYHWMODES     2
-       struct ieee80211_hw_mode hwmodes[B43_MAX_PHYHWMODES];
 
        /* Analog Type */
        u8 analog;
@@ -462,7 +491,6 @@ struct b43_phy {
        u16 radio_ver;          /* Radio version */
        u8 radio_rev;           /* Radio revision */
 
-       bool locked;            /* Only used in b43_phy_{un}lock() */
        bool dyn_tssi_tbl;      /* tssi2dbm is kmalloc()ed. */
 
        /* ACI (adjacent channel interference) flags. */
@@ -499,11 +527,6 @@ struct b43_phy {
        s16 lna_gain;           /* LNA */
        s16 pga_gain;           /* PGA */
 
-       /* PHY lock for core.rev < 3
-        * This lock is only used by b43_phy_{un}lock()
-        */
-       spinlock_t lock;
-
        /* Desired TX power level (in dBm).
         * This is set by the user and adjusted in b43_phy_xmitpower(). */
        u8 power_level;
@@ -514,9 +537,7 @@ struct b43_phy {
        struct b43_bbatt bbatt;
        struct b43_rfatt rfatt;
        u8 tx_control;          /* B43_TXCTL_XXX */
-#ifdef CONFIG_B43_DEBUG
-       bool manual_txpower_control;    /* Manual TX-power control enabled? */
-#endif
+
        /* Hardware Power Control enabled? */
        bool hardware_power_control;
 
@@ -544,6 +565,26 @@ struct b43_phy {
        u16 lofcal;
 
        u16 initval;            //FIXME rename?
+
+       /* PHY TX errors counter. */
+       atomic_t txerr_cnt;
+
+       /* The device does address auto increment for the OFDM tables.
+        * We cache the previously used address here and omit the address
+        * write on the next table access, if possible. */
+       u16 ofdmtab_addr; /* The address currently set in hardware. */
+       enum { /* The last data flow direction. */
+               B43_OFDMTAB_DIRECTION_UNKNOWN = 0,
+               B43_OFDMTAB_DIRECTION_READ,
+               B43_OFDMTAB_DIRECTION_WRITE,
+       } ofdmtab_addr_direction;
+
+#if B43_DEBUG
+       /* Manual TX-power control enabled? */
+       bool manual_txpower_control;
+       /* PHY registers locked by b43_phy_lock()? */
+       bool phy_locked;
+#endif /* B43_DEBUG */
 };
 
 /* Data structures for DMA transmission, per 80211 core. */
@@ -559,14 +600,6 @@ struct b43_dma {
        struct b43_dmaring *rx_ring3;   /* only available on core.rev < 5 */
 };
 
-/* Data structures for PIO transmission, per 80211 core. */
-struct b43_pio {
-       struct b43_pioqueue *queue0;
-       struct b43_pioqueue *queue1;
-       struct b43_pioqueue *queue2;
-       struct b43_pioqueue *queue3;
-};
-
 /* Context information for a noise calculation (Link Quality). */
 struct b43_noise_calculation {
        u8 channel_at_start;
@@ -590,6 +623,35 @@ struct b43_key {
        u8 algorithm;
 };
 
+/* SHM offsets to the QOS data structures for the 4 different queues. */
+#define B43_QOS_PARAMS(queue)  (B43_SHM_SH_EDCFQ + \
+                                (B43_NR_QOSPARAMS * sizeof(u16) * (queue)))
+#define B43_QOS_BACKGROUND     B43_QOS_PARAMS(0)
+#define B43_QOS_BESTEFFORT     B43_QOS_PARAMS(1)
+#define B43_QOS_VIDEO          B43_QOS_PARAMS(2)
+#define B43_QOS_VOICE          B43_QOS_PARAMS(3)
+
+/* QOS parameter hardware data structure offsets. */
+#define B43_NR_QOSPARAMS       22
+enum {
+       B43_QOSPARAM_TXOP = 0,
+       B43_QOSPARAM_CWMIN,
+       B43_QOSPARAM_CWMAX,
+       B43_QOSPARAM_CWCUR,
+       B43_QOSPARAM_AIFS,
+       B43_QOSPARAM_BSLOTS,
+       B43_QOSPARAM_REGGAP,
+       B43_QOSPARAM_STATUS,
+};
+
+/* QOS parameters for a queue. */
+struct b43_qos_params {
+       /* The QOS parameters */
+       struct ieee80211_tx_queue_params p;
+       /* Does this need to get uploaded to hardware? */
+       bool need_hw_update;
+};
+
 struct b43_wldev;
 
 /* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */
@@ -599,18 +661,18 @@ struct b43_wl {
        /* Pointer to the ieee80211 hardware data structure */
        struct ieee80211_hw *hw;
 
-       spinlock_t irq_lock;
        struct mutex mutex;
+       spinlock_t irq_lock;
+       /* Lock for LEDs access. */
        spinlock_t leds_lock;
+       /* Lock for SHM access. */
+       spinlock_t shm_lock;
 
        /* We can only have one operating interface (802.11 core)
         * at a time. General information about this interface follows.
         */
 
-       /* Opaque ID of the operating interface from the ieee80211
-        * subsystem. Do not modify.
-        */
-       int if_id;
+       struct ieee80211_vif *vif;
        /* The MAC address of the operating interface. */
        u8 mac_addr[ETH_ALEN];
        /* Current BSSID */
@@ -634,18 +696,39 @@ struct b43_wl {
        /* List of all wireless devices on this chip */
        struct list_head devlist;
        u8 nr_devs;
+
+       bool radiotap_enabled;
+
+       /* The beacon we are currently using (AP or IBSS mode).
+        * This beacon stuff is protected by the irq_lock. */
+       struct sk_buff *current_beacon;
+       bool beacon0_uploaded;
+       bool beacon1_uploaded;
+
+       /* The current QOS parameters for the 4 queues.
+        * This is protected by the irq_lock. */
+       struct b43_qos_params qos_params[4];
+       /* Workqueue for updating QOS parameters in hardware. */
+       struct work_struct qos_update_work;
+};
+
+/* In-memory representation of a cached microcode file. */
+struct b43_firmware_file {
+       const char *filename;
+       const struct firmware *data;
 };
 
 /* Pointers to the firmware data and meta information about it. */
 struct b43_firmware {
        /* Microcode */
-       const struct firmware *ucode;
+       struct b43_firmware_file ucode;
        /* PCM code */
-       const struct firmware *pcm;
+       struct b43_firmware_file pcm;
        /* Initial MMIO values for the firmware */
-       const struct firmware *initvals;
+       struct b43_firmware_file initvals;
        /* Initial MMIO values for the firmware, band-specific */
-       const struct firmware *initvals_band;
+       struct b43_firmware_file initvals_band;
+
        /* Firmware revision */
        u16 rev;
        /* Firmware patchlevel */
@@ -683,21 +766,17 @@ struct b43_wldev {
        /* Saved init status for handling suspend. */
        int suspend_init_status;
 
-       bool __using_pio;       /* Internal, use b43_using_pio(). */
        bool bad_frames_preempt;        /* Use "Bad Frames Preemption" (default off) */
-       bool reg124_set_0x4;    /* Some variable to keep track of IRQ stuff. */
-       bool short_preamble;    /* TRUE, if short preamble is enabled. */
+       bool dfq_valid;         /* Directed frame queue valid (IBSS PS mode, ATIM) */
        bool short_slot;        /* TRUE, if short slot timing is enabled. */
        bool radio_hw_enable;   /* saved state of radio hardware enabled state */
+       bool suspend_in_progress;       /* TRUE, if we are in a suspend/resume cycle */
 
        /* PHY/Radio device. */
        struct b43_phy phy;
-       union {
-               /* DMA engines. */
-               struct b43_dma dma;
-               /* PIO engines. */
-               struct b43_pio pio;
-       };
+
+       /* DMA engines. */
+       struct b43_dma dma;
 
        /* Various statistics about the physical device. */
        struct b43_stats stats;
@@ -732,9 +811,6 @@ struct b43_wldev {
        u8 max_nr_keys;
        struct b43_key key[58];
 
-       /* Cached beacon template while uploading the template. */
-       struct sk_buff *cached_beacon;
-
        /* Firmware data */
        struct b43_firmware fw;
 
@@ -752,28 +828,6 @@ static inline struct b43_wl *hw_to_b43_wl(struct ieee80211_hw *hw)
        return hw->priv;
 }
 
-/* Helper function, which returns a boolean.
- * TRUE, if PIO is used; FALSE, if DMA is used.
- */
-#if defined(CONFIG_B43_DMA) && defined(CONFIG_B43_PIO)
-static inline int b43_using_pio(struct b43_wldev *dev)
-{
-       return dev->__using_pio;
-}
-#elif defined(CONFIG_B43_DMA)
-static inline int b43_using_pio(struct b43_wldev *dev)
-{
-       return 0;
-}
-#elif defined(CONFIG_B43_PIO)
-static inline int b43_using_pio(struct b43_wldev *dev)
-{
-       return 1;
-}
-#else
-# error "Using neither DMA nor PIO? Confused..."
-#endif
-
 static inline struct b43_wldev *dev_to_b43_wldev(struct device *dev)
 {
        struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
This page took 0.037751 seconds and 5 git commands to generate.