b43: Fix ofdmtab write regression
[deliverable/linux.git] / drivers / net / wireless / b43 / b43.h
index a22435ade8ca64d6bc1bc4d1e1bda02f8ff397b0..813b2409f0c3010665d071f828ecd66e86957eb0 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "debugfs.h"
 #include "leds.h"
+#include "rfkill.h"
 #include "lo.h"
 #include "phy.h"
 
@@ -272,6 +273,8 @@ enum {
 #define B43_PHYTYPE_A                  0x00
 #define B43_PHYTYPE_B                  0x01
 #define B43_PHYTYPE_G                  0x02
+#define B43_PHYTYPE_N                  0x04
+#define B43_PHYTYPE_LP                 0x05
 
 /* PHYRegisters */
 #define B43_PHY_ILT_A_CTRL             0x0072
@@ -390,6 +393,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. */
@@ -541,6 +546,19 @@ 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;
 };
 
 /* Data structures for DMA transmission, per 80211 core. */
@@ -604,9 +622,8 @@ struct b43_wl {
         * at a time. General information about this interface follows.
         */
 
-       /* Opaque ID of the operating interface (!= monitor
-        * interface) from the ieee80211 subsystem.
-        * Do not modify.
+       /* Opaque ID of the operating interface from the ieee80211
+        * subsystem. Do not modify.
         */
        int if_id;
        /* The MAC address of the operating interface. */
@@ -615,14 +632,10 @@ struct b43_wl {
        u8 bssid[ETH_ALEN];
        /* Interface type. (IEEE80211_IF_TYPE_XXX) */
        int if_type;
-       /* Counter of active monitor interfaces. */
-       int monitor;
        /* Is the card operating in AP, STA or IBSS mode? */
        bool operating;
-       /* Promisc mode active?
-        * Note that (monitor != 0) implies promisc.
-        */
-       bool promisc;
+       /* filter flags */
+       unsigned int filter_flags;
        /* Stats about the wireless interface */
        struct ieee80211_low_level_stats ieee_stats;
 
@@ -630,9 +643,14 @@ struct b43_wl {
        u8 rng_initialized;
        char rng_name[30 + 1];
 
+       /* The RF-kill button */
+       struct b43_rfkill rfkill;
+
        /* List of all wireless devices on this chip */
        struct list_head devlist;
        u8 nr_devs;
+
+       bool radiotap_enabled;
 };
 
 /* Pointers to the firmware data and meta information about it. */
@@ -701,8 +719,11 @@ struct b43_wldev {
        /* Various statistics about the physical device. */
        struct b43_stats stats;
 
-#define B43_NR_LEDS            4
-       struct b43_led leds[B43_NR_LEDS];
+       /* The device LEDs. */
+       struct b43_led led_tx;
+       struct b43_led led_rx;
+       struct b43_led led_assoc;
+       struct b43_led led_radio;
 
        /* Reason code of the last interrupt. */
        u32 irq_reason;
@@ -779,8 +800,6 @@ static inline struct b43_wldev *dev_to_b43_wldev(struct device *dev)
 /* Is the device operating in a specified mode (IEEE80211_IF_TYPE_XXX). */
 static inline int b43_is_mode(struct b43_wl *wl, int type)
 {
-       if (type == IEEE80211_IF_TYPE_MNTR)
-               return !!(wl->monitor);
        return (wl->operating && wl->if_type == type);
 }
 
This page took 0.028859 seconds and 5 git commands to generate.