#define __UNDEF_NO_VERSION__
#define pr_fmt(fmt) …
#include <linux/etherdevice.h>
#include <linux/sched.h>
#include <linux/firmware.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/bcma/bcma.h>
#include <net/mac80211.h>
#include <defs.h>
#include "phy/phy_int.h"
#include "d11.h"
#include "channel.h"
#include "scb.h"
#include "pub.h"
#include "ucode_loader.h"
#include "mac80211_if.h"
#include "main.h"
#include "debug.h"
#include "led.h"
#define N_TX_QUEUES …
#define BRCMS_FLUSH_TIMEOUT …
#define MAC_FILTERS …
#define CHAN2GHZ(channel, freqency, chflags) …
#define CHAN5GHZ(channel, chflags) …
#define RATE(rate100m, _flags) …
struct firmware_hdr { … };
static const char * const brcms_firmwares[MAX_FW_IMAGES] = …;
static int n_adapters_found;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
static struct bcma_device_id brcms_coreid_table[] = …;
MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
#if defined(CONFIG_BRCMDBG)
module_param_named(debug, brcm_msg_level, uint, 0644);
#endif
static struct ieee80211_channel brcms_2ghz_chantable[] = …;
static struct ieee80211_channel brcms_5ghz_nphy_chantable[] = …;
static struct ieee80211_rate legacy_ratetable[] = …;
static const struct ieee80211_supported_band brcms_band_2GHz_nphy_template = …;
static const struct ieee80211_supported_band brcms_band_5GHz_nphy_template = …;
static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
{ … }
static void brcms_free(struct brcms_info *wl)
{ … }
static void brcms_remove(struct bcma_device *pdev)
{ … }
static void brcms_release_fw(struct brcms_info *wl)
{ … }
static int brcms_request_fw(struct brcms_info *wl, struct bcma_device *pdev)
{ … }
static void brcms_ops_tx(struct ieee80211_hw *hw,
struct ieee80211_tx_control *control,
struct sk_buff *skb)
{ … }
static int brcms_ops_start(struct ieee80211_hw *hw)
{ … }
static void brcms_ops_stop(struct ieee80211_hw *hw, bool suspend)
{ … }
static int
brcms_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ … }
static void
brcms_ops_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ … }
static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
{ … }
static void
brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *info, u64 changed)
{ … }
static void
brcms_ops_configure_filter(struct ieee80211_hw *hw,
unsigned int changed_flags,
unsigned int *total_flags, u64 multicast)
{ … }
static void brcms_ops_sw_scan_start(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
const u8 *mac_addr)
{ … }
static void brcms_ops_sw_scan_complete(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{ … }
static int
brcms_ops_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
unsigned int link_id, u16 queue,
const struct ieee80211_tx_queue_params *params)
{ … }
static int
brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{ … }
static int
brcms_ops_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_ampdu_params *params)
{ … }
static void brcms_ops_rfkill_poll(struct ieee80211_hw *hw)
{ … }
static bool brcms_tx_flush_completed(struct brcms_info *wl)
{ … }
static void brcms_ops_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 queues, bool drop)
{ … }
static u64 brcms_ops_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ … }
static void brcms_ops_set_tsf(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, u64 tsf)
{ … }
static int brcms_ops_beacon_set_tim(struct ieee80211_hw *hw,
struct ieee80211_sta *sta, bool set)
{ … }
static const struct ieee80211_ops brcms_ops = …;
void brcms_dpc(struct tasklet_struct *t)
{ … }
static irqreturn_t brcms_isr(int irq, void *dev_id)
{ … }
static int ieee_hw_rate_init(struct ieee80211_hw *hw)
{ … }
static int ieee_hw_init(struct ieee80211_hw *hw)
{ … }
static struct brcms_info *brcms_attach(struct bcma_device *pdev)
{ … }
static int brcms_bcma_probe(struct bcma_device *pdev)
{ … }
static int brcms_suspend(struct bcma_device *pdev)
{ … }
static int brcms_resume(struct bcma_device *pdev)
{ … }
static struct bcma_driver brcms_bcma_driver = …;
static void brcms_driver_init(struct work_struct *work)
{ … }
static DECLARE_WORK(brcms_driver_work, brcms_driver_init);
static int __init brcms_module_init(void)
{ … }
static void __exit brcms_module_exit(void)
{ … }
module_init(…) …;
module_exit(brcms_module_exit);
void brcms_txflowcontrol(struct brcms_info *wl, struct brcms_if *wlif,
bool state, int prio)
{ … }
void brcms_init(struct brcms_info *wl)
{ … }
uint brcms_reset(struct brcms_info *wl)
{ … }
void brcms_fatal_error(struct brcms_info *wl)
{ … }
void brcms_intrson(struct brcms_info *wl)
{ … }
u32 brcms_intrsoff(struct brcms_info *wl)
{ … }
void brcms_intrsrestore(struct brcms_info *wl, u32 macintmask)
{ … }
int brcms_up(struct brcms_info *wl)
{ … }
void brcms_down(struct brcms_info *wl)
__must_hold(&wl->lock)
{ … }
static void _brcms_timer(struct work_struct *work)
{ … }
struct brcms_timer *brcms_init_timer(struct brcms_info *wl,
void (*fn) (void *arg),
void *arg, const char *name)
{ … }
void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic)
{ … }
bool brcms_del_timer(struct brcms_timer *t)
{ … }
void brcms_free_timer(struct brcms_timer *t)
{ … }
int brcms_ucode_init_buf(struct brcms_info *wl, void **pbuf, u32 idx)
{ … }
int brcms_ucode_init_uint(struct brcms_info *wl, size_t *n_bytes, u32 idx)
{ … }
void brcms_ucode_free_buf(void *p)
{ … }
int brcms_check_firmwares(struct brcms_info *wl)
{ … }
bool brcms_rfkill_set_hw_state(struct brcms_info *wl)
__must_hold(&wl->lock)
{ … }