/* The firmware file header */ #define B43legacy_FW_TYPE_UCODE 'u' #define B43legacy_FW_TYPE_PCM 'p' #define B43legacy_FW_TYPE_IV 'i' struct b43legacy_fw_header { /* File type */
u8 type; /* File format version */
u8 ver;
u8 __padding[2]; /* Size of the data. For ucode and PCM this is in bytes.
* For IV this is number-of-ivs. */
__be32 size;
} __packed;
/* Initial Value file format */ #define B43legacy_IV_OFFSET_MASK 0x7FFF #define B43legacy_IV_32BIT 0x8000 struct b43legacy_iv {
__be16 offset_size; union {
__be16 d16;
__be32 d32;
} __packed data;
} __packed;
/* Radio switched on/off */ bool radio_on; struct { /* Values saved when turning the radio off.
* They are needed when turning it on again. */ bool valid;
u16 rfover;
u16 rfoverval;
} radio_off_context;
u16 minlowsig[2];
u16 minlowsigpos[2];
/* LO Measurement Data. * Use b43legacy_get_lopair() to get a value.
*/ struct b43legacy_lopair *_lo_pairs; /* TSSI to dBm table in use */ const s8 *tssi2dbm; /* idle TSSI value */
s8 idle_tssi; /* Target idle TSSI */ int tgt_idle_tssi; /* Current idle TSSI */ int cur_idle_tssi;
/* LocalOscillator control values. */ struct b43legacy_txpower_lo_control *lo_control; /* Values from b43legacy_calc_loopback_gain() */
s16 max_lb_gain; /* Maximum Loopback gain in hdB */
s16 trsw_rx_gain; /* TRSW RX gain in hdB */
s16 lna_lod_gain; /* LNA lod */
s16 lna_gain; /* LNA */
s16 pga_gain; /* PGA */
/* Desired TX power level (in dBm). This is set by the user and
* adjusted in b43legacy_phy_xmitpower(). */
u8 power_level;
/* Values from b43legacy_calc_loopback_gain() */
u16 loopback_gain[2];
/* TX Power control values. */ /* B/G PHY */ struct { /* Current Radio Attenuation for TXpower recalculation. */
u16 rfatt; /* Current Baseband Attenuation for TXpower recalculation. */
u16 bbatt; /* Current TXpower control value for TXpower recalculation. */
u16 txctl1;
u16 txctl2;
}; /* A PHY */ struct {
u16 txpwr_offset;
};
/* Current Interference Mitigation mode */ int interfmode; /* Stack of saved values from the Interference Mitigation code. * Each value in the stack is laid out as follows: * bit 0-11: offset * bit 12-15: register ID * bit 16-32: value * register ID is: 0x1 PHY, 0x2 Radio, 0x3 ILT
*/ #define B43legacy_INTERFSTACK_SIZE 26
u32 interfstack[B43legacy_INTERFSTACK_SIZE];
/* Saved values from the NRSSI Slope calculation */
s16 nrssi[2];
s32 nrssislope; /* In memory nrssi lookup table. */
s8 nrssi_lt[64];
/* QOS parameters for a queue. */ struct b43legacy_qos_params { /* The QOS parameters */ struct ieee80211_tx_queue_params p;
};
/* Data structure for the WLAN parts (802.11 cores) of the b43legacy chip. */ struct b43legacy_wl { /* Pointer to the active wireless device on this chip */ struct b43legacy_wldev *current_dev; /* Pointer to the ieee80211 hardware data structure */ struct ieee80211_hw *hw;
/* firmware loading work */ struct work_struct firmware_load;
/* We can only have one operating interface (802.11 core) * at a time. General information about this interface follows.
*/
struct ieee80211_vif *vif; /* MAC address (can be NULL). */
u8 mac_addr[ETH_ALEN]; /* Current BSSID (can be NULL). */
u8 bssid[ETH_ALEN]; /* Interface type. (IEEE80211_IF_TYPE_XXX) */ int if_type; /* Is the card operating in AP, STA or IBSS mode? */ bool operating; /* filter flags */ unsignedint filter_flags; /* Stats about the wireless interface */ struct ieee80211_low_level_stats ieee_stats;
/* List of all wireless devices on this chip */ struct list_head devlist;
u8 nr_devs;
bool radiotap_enabled; bool radio_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; bool beacon_templates_virgin; /* Never wrote the templates? */ struct work_struct beacon_update_trigger; /* The current QOS parameters for the 4 queues. */ struct b43legacy_qos_params qos_params[B43legacy_QOS_QUEUE_NUM];
/* Packet transmit work */ struct work_struct tx_work;
/* Queue of packets to be transmitted. */ struct sk_buff_head tx_queue[B43legacy_QOS_QUEUE_NUM];
/* Flag that implement the queues stopping. */ bool tx_queue_stopped[B43legacy_QOS_QUEUE_NUM];
};
/* Pointers to the firmware data and meta information about it. */ struct b43legacy_firmware { /* Microcode */ conststruct firmware *ucode; /* PCM code */ conststruct firmware *pcm; /* Initial MMIO values for the firmware */ conststruct firmware *initvals; /* Initial MMIO values for the firmware, band-specific */ conststruct firmware *initvals_band; /* Firmware revision */
u16 rev; /* Firmware patchlevel */
u16 patch;
};
/* Device (802.11 core) initialization status. */ enum {
B43legacy_STAT_UNINIT = 0, /* Uninitialized. */
B43legacy_STAT_INITIALIZED = 1, /* Initialized, not yet started. */
B43legacy_STAT_STARTED = 2, /* Up and running. */
}; #define b43legacy_status(wldev) atomic_read(&(wldev)->__init_status) #define b43legacy_set_status(wldev, stat) do { \
atomic_set(&(wldev)->__init_status, (stat)); \
smp_wmb(); \
} while (0)
/* *** --- HOW LOCKING WORKS IN B43legacy --- *** * * You should always acquire both, wl->mutex and wl->irq_lock unless: * - You don't need to acquire wl->irq_lock, if the interface is stopped. * - You don't need to acquire wl->mutex in the IRQ handler, IRQ tasklet * and packet TX path (and _ONLY_ there.)
*/
/* Data structure for one wireless device (802.11 core) */ struct b43legacy_wldev { struct ssb_device *dev; struct b43legacy_wl *wl;
/* The device initialization status.
* Use b43legacy_status() to query. */
atomic_t __init_status; /* Saved init status for handling suspend. */ int suspend_init_status;
bool __using_pio; /* Using pio rather than dma. */ bool bad_frames_preempt;/* Use "Bad Frames Preemption". */ bool dfq_valid; /* Directed frame queue valid (IBSS PS mode, ATIM). */ bool short_preamble; /* TRUE if using short preamble. */ bool radio_hw_enable; /* State of radio hardware enable bit. */
/* Reason code of the last interrupt. */
u32 irq_reason;
u32 dma_reason[6]; /* The currently active generic-interrupt mask. */
u32 irq_mask; /* Link Quality calculation context. */ struct b43legacy_noise_calculation noisecalc; /* if > 0 MAC is suspended. if == 0 MAC is enabled. */ int mac_suspended;
/* Interrupt Service Routine tasklet (bottom-half) */ struct tasklet_struct isr_tasklet;
/* Is the device operating in a specified mode (IEEE80211_IF_TYPE_XXX). */ staticinline int b43legacy_is_mode(struct b43legacy_wl *wl, int type)
{ return (wl->operating &&
wl->if_type == type);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.