#include "debugfs.h"
#include "leds.h"
+#include "rfkill.h"
#include "lo.h"
#include "phy.h"
#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
#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. */
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. */
* 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. */
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;
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. */
/* 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;
/* 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);
}