/* The firmware register to fetch the debug-IRQ reason from. */ #define B43_DEBUGIRQ_REASON_REG 63 /* Debug-IRQ reasons. */ #define B43_DEBUGIRQ_PANIC 0/* The firmware panic'ed */ #define B43_DEBUGIRQ_DUMP_SHM 1/* Dump shared SHM */ #define B43_DEBUGIRQ_DUMP_REGS 2/* Dump the microcode registers */ #define B43_DEBUGIRQ_MARKER 3/* A "marker" was thrown by the firmware. */ #define B43_DEBUGIRQ_ACK 0xFFFF /* The host writes that to ACK the IRQ */
/* The firmware register that contains the "marker" line. */ #define B43_MARKER_ID_REG 2 #define B43_MARKER_LINE_REG 3
/* The firmware register to fetch the panic reason from. */ #define B43_FWPANIC_REASON_REG 3 /* Firmware panic reason codes */ #define B43_FWPANIC_DIE 0/* Firmware died. Don't auto-restart it. */ #define B43_FWPANIC_RESTART 1/* Firmware died. Schedule a controller reset. */
/* The firmware register that contains the watchdog counter. */ #define B43_WATCHDOG_REG 1
/* Device specific rate values. * The actual values defined here are (rate_in_mbps * 2).
* Some code depends on this. Don't change it. */ #define B43_CCK_RATE_1MB 0x02 #define B43_CCK_RATE_2MB 0x04 #define B43_CCK_RATE_5MB 0x0B #define B43_CCK_RATE_11MB 0x16 #define B43_OFDM_RATE_6MB 0x0C #define B43_OFDM_RATE_9MB 0x12 #define B43_OFDM_RATE_12MB 0x18 #define B43_OFDM_RATE_18MB 0x24 #define B43_OFDM_RATE_24MB 0x30 #define B43_OFDM_RATE_36MB 0x48 #define B43_OFDM_RATE_48MB 0x60 #define B43_OFDM_RATE_54MB 0x6C /* Convert a b43 rate value to a rate in 100kbps */ #define B43_RATE_TO_BASE100KBPS(rate) (((rate) * 10) / 2)
/* Max size of a security key */ #define B43_SEC_KEYSIZE 16 /* Max number of group keys */ #define B43_NR_GROUP_KEYS 4 /* Max number of pairwise keys */ #define B43_NR_PAIRWISE_KEYS 50 /* Security algorithms. */ enum {
B43_SEC_ALGO_NONE = 0, /* unencrypted, as of TX header. */
B43_SEC_ALGO_WEP40,
B43_SEC_ALGO_TKIP,
B43_SEC_ALGO_AES,
B43_SEC_ALGO_WEP104,
B43_SEC_ALGO_AES_LEGACY,
};
struct b43_dmaring;
/* The firmware file header */ #define B43_FW_TYPE_UCODE 'u' #define B43_FW_TYPE_PCM 'p' #define B43_FW_TYPE_IV 'i' struct b43_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 B43_IV_OFFSET_MASK 0x7FFF #define B43_IV_32BIT 0x8000 struct b43_iv {
__be16 offset_size; union {
__be16 d16;
__be32 d32;
} __packed data;
} __packed;
/* Data structures for DMA transmission, per 80211 core. */ struct b43_dma { struct b43_dmaring *tx_ring_AC_BK; /* Background */ struct b43_dmaring *tx_ring_AC_BE; /* Best Effort */ struct b43_dmaring *tx_ring_AC_VI; /* Video */ struct b43_dmaring *tx_ring_AC_VO; /* Voice */ struct b43_dmaring *tx_ring_mcast; /* Multicast */
struct b43_dmaring *rx_ring;
u32 translation; /* Routing bits */ bool translation_in_low; /* Should translation bit go into low addr? */ bool parity; /* Check for parity */
};
struct b43_pio_txqueue; struct b43_pio_rxqueue;
/* Data structures for PIO transmission, per 80211 core. */ struct b43_pio { struct b43_pio_txqueue *tx_queue_AC_BK; /* Background */ struct b43_pio_txqueue *tx_queue_AC_BE; /* Best Effort */ struct b43_pio_txqueue *tx_queue_AC_VI; /* Video */ struct b43_pio_txqueue *tx_queue_AC_VO; /* Voice */ struct b43_pio_txqueue *tx_queue_mcast; /* Multicast */
struct b43_pio_rxqueue *rx_queue;
};
/* Context information for a noise calculation (Link Quality). */ struct b43_noise_calculation { bool calculation_running;
u8 nr_samples;
s8 samples[8][4];
};
struct b43_stats {
u8 link_noise;
};
struct b43_key { /* If keyconf is NULL, this key is disabled. * keyconf is a cookie. Don't derefenrence it outside of the set_key
* path, because b43 doesn't own it. */ struct ieee80211_key_conf *keyconf;
u8 algorithm;
};
/* SHM offsets to the QOS data structures for the 4 different queues. */ #define B43_QOS_QUEUE_NUM 4 #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 parameters for a queue. */ struct b43_qos_params { /* The QOS parameters */ struct ieee80211_tx_queue_params p;
};
struct b43_wl;
/* The type of the firmware file. */ enum b43_firmware_file_type {
B43_FWTYPE_PROPRIETARY,
B43_FWTYPE_OPENSOURCE,
B43_NR_FWTYPES,
};
/* Context data for fetching firmware. */ struct b43_request_fw_context { /* The device we are requesting the fw for. */ struct b43_wldev *dev; /* a pointer to the firmware object */ conststruct firmware *blob; /* The type of firmware to request. */ enum b43_firmware_file_type req_type; /* Error messages for each firmware type. */ char errors[B43_NR_FWTYPES][128]; /* Temporary buffer for storing the firmware name. */ char fwname[64]; /* A fatal error occurred while requesting. Firmware request
* can not continue, as any other request will also fail. */ int fatal_failure;
};
/* In-memory representation of a cached microcode file. */ struct b43_firmware_file { constchar *filename; conststruct firmware *data; /* Type of the firmware file name. Note that this does only indicate * the type by the firmware name. NOT the file contents. * If you want to check for proprietary vs opensource, use (struct b43_firmware)->opensource * instead! The (struct b43_firmware)->opensource flag is derived from the actual firmware * binary code, not just the filename.
*/ enum b43_firmware_file_type type;
};
/* Pointers to the firmware data and meta information about it. */ struct b43_firmware { /* Microcode */ struct b43_firmware_file ucode; /* PCM code */ struct b43_firmware_file pcm; /* Initial MMIO values for the firmware */ struct b43_firmware_file initvals; /* Initial MMIO values for the firmware, band-specific */ struct b43_firmware_file initvals_band;
/* Format of header used by firmware */ enum b43_firmware_hdr_format hdr_format;
/* Set to true, if we are using an opensource firmware.
* Use this to check for proprietary vs opensource. */ bool opensource; /* Set to true, if the core needs a PCM firmware, but * we failed to load one. This is always false for
* core rev > 10, as these don't need PCM firmware. */ bool pcm_request_failed;
};
/* Device (802.11 core) initialization status. */ enum {
B43_STAT_UNINIT = 0, /* Uninitialized. */
B43_STAT_INITIALIZED = 1, /* Initialized, but not started, yet. */
B43_STAT_STARTED = 2, /* Up and running. */
}; #define b43_status(wldev) atomic_read(&(wldev)->__init_status) #define b43_set_status(wldev, stat) do { \
atomic_set(&(wldev)->__init_status, (stat)); \
smp_wmb(); \
} while (0)
/* Data structure for one wireless device (802.11 core) */ struct b43_wldev { struct b43_bus_dev *dev; struct b43_wl *wl; /* a completion event structure needed if this call is asynchronous */ struct completion fw_load_complete;
/* The device initialization status.
* Use b43_status() to query. */
atomic_t __init_status;
bool bad_frames_preempt; /* Use "Bad Frames Preemption" (default off) */ bool dfq_valid; /* Directed frame queue valid (IBSS PS mode, ATIM) */ bool radio_hw_enable; /* saved state of radio hardware enabled state */ bool qos_enabled; /* TRUE, if QoS is used. */ bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */ bool use_pio; /* TRUE if next init should use PIO */
/* PHY/Radio device. */ struct b43_phy phy;
union { /* DMA engines. */ struct b43_dma dma; /* PIO engines. */ struct b43_pio pio;
}; /* Use b43_using_pio_transfers() to check whether we are using
* DMA or PIO data transfers. */ bool __using_pio_transfers;
/* Various statistics about the physical device. */ struct b43_stats stats;
/* 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 b43_noise_calculation noisecalc; /* if > 0 MAC is suspended. if == 0 MAC is enabled. */ int mac_suspended;
/* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */ struct b43_wl { /* Pointer to the active wireless device on this chip */ struct b43_wldev *current_dev; /* Pointer to the ieee80211 hardware data structure */ struct ieee80211_hw *hw;
/* Global driver mutex. Every operation must run with this mutex locked. */ struct mutex mutex; /* Hard-IRQ spinlock. This lock protects things used in the hard-IRQ
* handler, only. This basically is just the IRQ mask register. */
spinlock_t hardirq_lock;
/* Set this if we call ieee80211_register_hw() and check if we call
* ieee80211_unregister_hw(). */ bool hw_registered;
/* We can only have one operating interface (802.11 core) * at a time. General information about this interface follows.
*/
struct ieee80211_vif *vif; /* The MAC address of the operating interface. */
u8 mac_addr[ETH_ALEN]; /* Current BSSID */
u8 bssid[ETH_ALEN]; /* Interface type. (NL80211_IFTYPE_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;
/* The beacon we are currently using (AP or IBSS mode). */ 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;
spinlock_t beacon_lock;
/* The current QOS parameters for the 4 queues. */ struct b43_qos_params qos_params[B43_QOS_QUEUE_NUM];
/* Work for adjustment of the transmission power. * This is scheduled when we determine that the actual TX output
* power doesn't match what we want. */ struct work_struct txpower_adjust_work;
/* Packet transmit work */ struct work_struct tx_work;
/* Queue of packets to be transmitted. */ struct sk_buff_head tx_queue[B43_QOS_QUEUE_NUM];
/* Flag that implement the queues stopping. */ bool tx_queue_stopped[B43_QOS_QUEUE_NUM];
/* firmware loading work */ struct work_struct firmware_load;
/* The device LEDs. */ struct b43_leds leds;
/* Kmalloc'ed scratch space for PIO TX/RX. Protected by wl->mutex. */
u8 pio_scratchspace[118] __attribute__((__aligned__(8)));
u8 pio_tailspace[4] __attribute__((__aligned__(8)));
};
/* Is the device operating in a specified mode (NL80211_IFTYPE_XXX). */ staticinlineint b43_is_mode(struct b43_wl *wl, int type)
{ return (wl->operating && wl->if_type == type);
}
/** * b43_current_band - Returns the currently used band. * Returns one of NL80211_BAND_2GHZ and NL80211_BAND_5GHZ.
*/ staticinlineenum nl80211_band b43_current_band(struct b43_wl *wl)
{ return wl->hw->conf.chandef.chan->band;
}
/* A WARN_ON variant that vanishes when b43 debugging is disabled.
* This _also_ evaluates the arg with debugging disabled. */ #if B43_DEBUG # define B43_WARN_ON(x) WARN_ON(x) #else staticinlinebool __b43_warn_on_dummy(bool x) { return x; } # define B43_WARN_ON(x) __b43_warn_on_dummy(unlikely(!!(x))) #endif
/* Convert an integer to a Q5.2 value */ #define INT_TO_Q52(i) ((i) << 2) /* Convert a Q5.2 value to an integer (precision loss!) */ #define Q52_TO_INT(q52) ((q52) >> 2) /* Macros for printing a value in Q5.2 format */ #define Q52_FMT "%u.%u" #define Q52_ARG(q52) Q52_TO_INT(q52), ((((q52) & 0x3) * 100) / 4)
#endif/* B43_H_ */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet am 2026-06-07)
¤
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.