Commit 2cb22a7a authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: replaced typedef struct wl_info_t by struct wl_info.

Part of the code cleanup effort. CodingStyle doc advises to restrict the usage
of typedefs. Also moved several function declarations from .c to .h file
because this typedef replace operation induced checkpatch.pl warnings.
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 01d11441
...@@ -32,14 +32,13 @@ ...@@ -32,14 +32,13 @@
#include <dhd.h> #include <dhd.h>
#include <dhdioctl.h> #include <dhdioctl.h>
typedef void wlc_info_t;
typedef void wl_info_t;
typedef const struct si_pub si_t; typedef const struct si_pub si_t;
#include <wlioctl.h> #include <wlioctl.h>
#include <proto/ethernet.h> #include <proto/ethernet.h>
#include <dngl_stats.h> #include <dngl_stats.h>
#include <dhd.h> #include <dhd.h>
#define WL_ERROR(x) printf x #define WL_ERROR(x) printf x
#define WL_TRACE(x) #define WL_TRACE(x)
#define WL_ASSOC(x) #define WL_ASSOC(x)
......
...@@ -144,4 +144,7 @@ typedef struct { ...@@ -144,4 +144,7 @@ typedef struct {
/* Max. nvram variable table size */ /* Max. nvram variable table size */
#define MAXSZ_NVRAM_VARS 4096 #define MAXSZ_NVRAM_VARS 4096
/* handle forward declaration */
struct wl_info;
#endif /* _bcmdefs_h_ */ #endif /* _bcmdefs_h_ */
...@@ -99,13 +99,13 @@ struct ieee80211_tkip_data { ...@@ -99,13 +99,13 @@ struct ieee80211_tkip_data {
}; };
#define WL_DEV_IF(dev) ((wl_if_t *)netdev_priv(dev)) #define WL_DEV_IF(dev) ((wl_if_t *)netdev_priv(dev))
#define WL_INFO(dev) ((wl_info_t *)(WL_DEV_IF(dev)->wl)) /* points to wl */ #define WL_INFO(dev) ((struct wl_info *)(WL_DEV_IF(dev)->wl))
static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev); static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev);
static void wl_release_fw(wl_info_t *wl); static void wl_release_fw(struct wl_info *wl);
/* local prototypes */ /* local prototypes */
static int wl_start(struct sk_buff *skb, wl_info_t *wl); static int wl_start(struct sk_buff *skb, struct wl_info *wl);
static int wl_start_int(wl_info_t *wl, struct ieee80211_hw *hw, static int wl_start_int(struct wl_info *wl, struct ieee80211_hw *hw,
struct sk_buff *skb); struct sk_buff *skb);
static void wl_dpc(unsigned long data); static void wl_dpc(unsigned long data);
...@@ -176,7 +176,7 @@ static int wl_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -176,7 +176,7 @@ static int wl_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb) static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
{ {
int status; int status;
wl_info_t *wl = hw->priv; struct wl_info *wl = hw->priv;
WL_LOCK(wl); WL_LOCK(wl);
if (!wl->pub->up) { if (!wl->pub->up) {
WL_ERROR(("ops->tx called while down\n")); WL_ERROR(("ops->tx called while down\n"));
...@@ -191,7 +191,7 @@ static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -191,7 +191,7 @@ static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
static int wl_ops_start(struct ieee80211_hw *hw) static int wl_ops_start(struct ieee80211_hw *hw)
{ {
wl_info_t *wl = hw->priv; struct wl_info *wl = hw->priv;
/* struct ieee80211_channel *curchan = hw->conf.channel; */ /* struct ieee80211_channel *curchan = hw->conf.channel; */
WL_NONE(("%s : Initial channel: %d\n", __func__, curchan->hw_value)); WL_NONE(("%s : Initial channel: %d\n", __func__, curchan->hw_value));
...@@ -204,7 +204,7 @@ static int wl_ops_start(struct ieee80211_hw *hw) ...@@ -204,7 +204,7 @@ static int wl_ops_start(struct ieee80211_hw *hw)
static void wl_ops_stop(struct ieee80211_hw *hw) static void wl_ops_stop(struct ieee80211_hw *hw)
{ {
wl_info_t *wl = hw->priv; struct wl_info *wl = hw->priv;
ASSERT(wl); ASSERT(wl);
WL_LOCK(wl); WL_LOCK(wl);
wl_down(wl); wl_down(wl);
...@@ -217,7 +217,7 @@ static void wl_ops_stop(struct ieee80211_hw *hw) ...@@ -217,7 +217,7 @@ static void wl_ops_stop(struct ieee80211_hw *hw)
static int static int
wl_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wl_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ {
wl_info_t *wl; struct wl_info *wl;
int err; int err;
/* Just STA for now */ /* Just STA for now */
...@@ -251,7 +251,7 @@ static int ...@@ -251,7 +251,7 @@ static int
ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan, ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan,
enum nl80211_channel_type type) enum nl80211_channel_type type)
{ {
wl_info_t *wl = HW_TO_WL(hw); struct wl_info *wl = HW_TO_WL(hw);
int err = 0; int err = 0;
switch (type) { switch (type) {
...@@ -276,7 +276,7 @@ ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan, ...@@ -276,7 +276,7 @@ ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan,
static int wl_ops_config(struct ieee80211_hw *hw, u32 changed) static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
{ {
struct ieee80211_conf *conf = &hw->conf; struct ieee80211_conf *conf = &hw->conf;
wl_info_t *wl = HW_TO_WL(hw); struct wl_info *wl = HW_TO_WL(hw);
int err = 0; int err = 0;
int new_int; int new_int;
...@@ -343,7 +343,7 @@ wl_ops_bss_info_changed(struct ieee80211_hw *hw, ...@@ -343,7 +343,7 @@ wl_ops_bss_info_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
struct ieee80211_bss_conf *info, u32 changed) struct ieee80211_bss_conf *info, u32 changed)
{ {
wl_info_t *wl = HW_TO_WL(hw); struct wl_info *wl = HW_TO_WL(hw);
int val; int val;
...@@ -413,7 +413,7 @@ wl_ops_configure_filter(struct ieee80211_hw *hw, ...@@ -413,7 +413,7 @@ wl_ops_configure_filter(struct ieee80211_hw *hw,
unsigned int changed_flags, unsigned int changed_flags,
unsigned int *total_flags, u64 multicast) unsigned int *total_flags, u64 multicast)
{ {
wl_info_t *wl = hw->priv; struct wl_info *wl = hw->priv;
changed_flags &= MAC_FILTERS; changed_flags &= MAC_FILTERS;
*total_flags &= MAC_FILTERS; *total_flags &= MAC_FILTERS;
...@@ -500,7 +500,7 @@ static int ...@@ -500,7 +500,7 @@ static int
wl_ops_conf_tx(struct ieee80211_hw *hw, u16 queue, wl_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
const struct ieee80211_tx_queue_params *params) const struct ieee80211_tx_queue_params *params)
{ {
wl_info_t *wl = hw->priv; struct wl_info *wl = hw->priv;
WL_NONE(("%s: Enter (WME config)\n", __func__)); WL_NONE(("%s: Enter (WME config)\n", __func__));
WL_NONE(("queue %d, txop %d, cwmin %d, cwmax %d, aifs %d\n", queue, WL_NONE(("queue %d, txop %d, cwmin %d, cwmax %d, aifs %d\n", queue,
...@@ -526,7 +526,7 @@ wl_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -526,7 +526,7 @@ wl_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct scb *scb; struct scb *scb;
int i; int i;
wl_info_t *wl = hw->priv; struct wl_info *wl = hw->priv;
/* Init the scb */ /* Init the scb */
scb = (struct scb *)sta->drv_priv; scb = (struct scb *)sta->drv_priv;
...@@ -571,7 +571,7 @@ wl_ampdu_action(struct ieee80211_hw *hw, ...@@ -571,7 +571,7 @@ wl_ampdu_action(struct ieee80211_hw *hw,
#if defined(BCMDBG) #if defined(BCMDBG)
struct scb *scb = (struct scb *)sta->drv_priv; struct scb *scb = (struct scb *)sta->drv_priv;
#endif #endif
wl_info_t *wl = hw->priv; struct wl_info *wl = hw->priv;
ASSERT(scb->magic == SCB_MAGIC); ASSERT(scb->magic == SCB_MAGIC);
switch (action) { switch (action) {
...@@ -630,7 +630,7 @@ static const struct ieee80211_ops wl_ops = { ...@@ -630,7 +630,7 @@ static const struct ieee80211_ops wl_ops = {
.ampdu_action = wl_ampdu_action, .ampdu_action = wl_ampdu_action,
}; };
static int wl_set_hint(wl_info_t *wl, char *abbrev) static int wl_set_hint(struct wl_info *wl, char *abbrev)
{ {
WL_ERROR(("%s: Sending country code %c%c to MAC80211\n", __func__, WL_ERROR(("%s: Sending country code %c%c to MAC80211\n", __func__,
abbrev[0], abbrev[1])); abbrev[0], abbrev[1]));
...@@ -648,10 +648,10 @@ static int wl_set_hint(wl_info_t *wl, char *abbrev) ...@@ -648,10 +648,10 @@ static int wl_set_hint(wl_info_t *wl, char *abbrev)
* a warning that this function is defined but not used if we declare * a warning that this function is defined but not used if we declare
* it as static. * it as static.
*/ */
static wl_info_t *wl_attach(u16 vendor, u16 device, unsigned long regs, static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
uint bustype, void *btparam, uint irq) uint bustype, void *btparam, uint irq)
{ {
wl_info_t *wl; struct wl_info *wl;
struct osl_info *osh; struct osl_info *osh;
int unit, err; int unit, err;
...@@ -954,7 +954,7 @@ static struct ieee80211_supported_band wl_band_5GHz_nphy = { ...@@ -954,7 +954,7 @@ static struct ieee80211_supported_band wl_band_5GHz_nphy = {
static int ieee_hw_rate_init(struct ieee80211_hw *hw) static int ieee_hw_rate_init(struct ieee80211_hw *hw)
{ {
wl_info_t *wl = HW_TO_WL(hw); struct wl_info *wl = HW_TO_WL(hw);
int has_5g; int has_5g;
char phy_list[4]; char phy_list[4];
...@@ -1033,7 +1033,7 @@ int __devinit ...@@ -1033,7 +1033,7 @@ int __devinit
wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ {
int rc; int rc;
wl_info_t *wl; struct wl_info *wl;
struct ieee80211_hw *hw; struct ieee80211_hw *hw;
u32 val; u32 val;
...@@ -1062,7 +1062,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1062,7 +1062,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if ((val & 0x0000ff00) != 0) if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
hw = ieee80211_alloc_hw(sizeof(wl_info_t), &wl_ops); hw = ieee80211_alloc_hw(sizeof(struct wl_info), &wl_ops);
if (!hw) { if (!hw) {
WL_ERROR(("%s: ieee80211_alloc_hw failed\n", __func__)); WL_ERROR(("%s: ieee80211_alloc_hw failed\n", __func__));
rc = -ENOMEM; rc = -ENOMEM;
...@@ -1092,7 +1092,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1092,7 +1092,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef LINUXSTA_PS #ifdef LINUXSTA_PS
static int wl_suspend(struct pci_dev *pdev, pm_message_t state) static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
{ {
wl_info_t *wl; struct wl_info *wl;
struct ieee80211_hw *hw; struct ieee80211_hw *hw;
WL_TRACE(("wl: wl_suspend\n")); WL_TRACE(("wl: wl_suspend\n"));
...@@ -1115,7 +1115,7 @@ static int wl_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -1115,7 +1115,7 @@ static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
static int wl_resume(struct pci_dev *pdev) static int wl_resume(struct pci_dev *pdev)
{ {
wl_info_t *wl; struct wl_info *wl;
struct ieee80211_hw *hw; struct ieee80211_hw *hw;
int err = 0; int err = 0;
u32 val; u32 val;
...@@ -1154,7 +1154,7 @@ static int wl_resume(struct pci_dev *pdev) ...@@ -1154,7 +1154,7 @@ static int wl_resume(struct pci_dev *pdev)
static void wl_remove(struct pci_dev *pdev) static void wl_remove(struct pci_dev *pdev)
{ {
wl_info_t *wl; struct wl_info *wl;
struct ieee80211_hw *hw; struct ieee80211_hw *hw;
hw = pci_get_drvdata(pdev); hw = pci_get_drvdata(pdev);
...@@ -1257,7 +1257,7 @@ module_exit(wl_module_exit); ...@@ -1257,7 +1257,7 @@ module_exit(wl_module_exit);
* by the wl parameter. * by the wl parameter.
* *
*/ */
void wl_free(wl_info_t *wl) void wl_free(struct wl_info *wl)
{ {
wl_timer_t *t, *next; wl_timer_t *t, *next;
struct osl_info *osh; struct osl_info *osh;
...@@ -1316,7 +1316,7 @@ void wl_free(wl_info_t *wl) ...@@ -1316,7 +1316,7 @@ void wl_free(wl_info_t *wl)
} }
/* transmit a packet */ /* transmit a packet */
static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl) static int BCMFASTPATH wl_start(struct sk_buff *skb, struct wl_info *wl)
{ {
if (!wl) if (!wl)
return -ENETDOWN; return -ENETDOWN;
...@@ -1325,19 +1325,19 @@ static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl) ...@@ -1325,19 +1325,19 @@ static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl)
} }
static int BCMFASTPATH static int BCMFASTPATH
wl_start_int(wl_info_t *wl, struct ieee80211_hw *hw, struct sk_buff *skb) wl_start_int(struct wl_info *wl, struct ieee80211_hw *hw, struct sk_buff *skb)
{ {
wlc_sendpkt_mac80211(wl->wlc, skb, hw); wlc_sendpkt_mac80211(wl->wlc, skb, hw);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
void wl_txflowcontrol(wl_info_t *wl, struct wl_if *wlif, bool state, int prio) void wl_txflowcontrol(struct wl_info *wl, struct wl_if *wlif, bool state,
int prio)
{ {
WL_ERROR(("Shouldn't be here %s\n", __func__)); WL_ERROR(("Shouldn't be here %s\n", __func__));
} }
void wl_init(struct wl_info *wl)
void wl_init(wl_info_t *wl)
{ {
WL_TRACE(("wl%d: wl_init\n", wl->pub->unit)); WL_TRACE(("wl%d: wl_init\n", wl->pub->unit));
...@@ -1346,7 +1346,7 @@ void wl_init(wl_info_t *wl) ...@@ -1346,7 +1346,7 @@ void wl_init(wl_info_t *wl)
wlc_init(wl->wlc); wlc_init(wl->wlc);
} }
uint wl_reset(wl_info_t *wl) uint wl_reset(struct wl_info *wl)
{ {
WL_TRACE(("wl%d: wl_reset\n", wl->pub->unit)); WL_TRACE(("wl%d: wl_reset\n", wl->pub->unit));
...@@ -1362,7 +1362,7 @@ uint wl_reset(wl_info_t *wl) ...@@ -1362,7 +1362,7 @@ uint wl_reset(wl_info_t *wl)
* These are interrupt on/off entry points. Disable interrupts * These are interrupt on/off entry points. Disable interrupts
* during interrupt state transition. * during interrupt state transition.
*/ */
void BCMFASTPATH wl_intrson(wl_info_t *wl) void BCMFASTPATH wl_intrson(struct wl_info *wl)
{ {
unsigned long flags; unsigned long flags;
...@@ -1371,12 +1371,12 @@ void BCMFASTPATH wl_intrson(wl_info_t *wl) ...@@ -1371,12 +1371,12 @@ void BCMFASTPATH wl_intrson(wl_info_t *wl)
INT_UNLOCK(wl, flags); INT_UNLOCK(wl, flags);
} }
bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth) bool wl_alloc_dma_resources(struct wl_info *wl, uint addrwidth)
{ {
return true; return true;
} }
u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl) u32 BCMFASTPATH wl_intrsoff(struct wl_info *wl)
{ {
unsigned long flags; unsigned long flags;
u32 status; u32 status;
...@@ -1387,7 +1387,7 @@ u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl) ...@@ -1387,7 +1387,7 @@ u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl)
return status; return status;
} }
void wl_intrsrestore(wl_info_t *wl, u32 macintmask) void wl_intrsrestore(struct wl_info *wl, u32 macintmask)
{ {
unsigned long flags; unsigned long flags;
...@@ -1396,7 +1396,7 @@ void wl_intrsrestore(wl_info_t *wl, u32 macintmask) ...@@ -1396,7 +1396,7 @@ void wl_intrsrestore(wl_info_t *wl, u32 macintmask)
INT_UNLOCK(wl, flags); INT_UNLOCK(wl, flags);
} }
int wl_up(wl_info_t *wl) int wl_up(struct wl_info *wl)
{ {
int error = 0; int error = 0;
...@@ -1408,7 +1408,7 @@ int wl_up(wl_info_t *wl) ...@@ -1408,7 +1408,7 @@ int wl_up(wl_info_t *wl)
return error; return error;
} }
void wl_down(wl_info_t *wl) void wl_down(struct wl_info *wl)
{ {
uint callbacks, ret_val = 0; uint callbacks, ret_val = 0;
...@@ -1429,11 +1429,11 @@ void wl_down(wl_info_t *wl) ...@@ -1429,11 +1429,11 @@ void wl_down(wl_info_t *wl)
irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id) irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
{ {
wl_info_t *wl; struct wl_info *wl;
bool ours, wantdpc; bool ours, wantdpc;
unsigned long flags; unsigned long flags;
wl = (wl_info_t *) dev_id; wl = (struct wl_info *) dev_id;
WL_ISRLOCK(wl, flags); WL_ISRLOCK(wl, flags);
...@@ -1457,9 +1457,9 @@ irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id) ...@@ -1457,9 +1457,9 @@ irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
static void BCMFASTPATH wl_dpc(unsigned long data) static void BCMFASTPATH wl_dpc(unsigned long data)
{ {
wl_info_t *wl; struct wl_info *wl;
wl = (wl_info_t *) data; wl = (struct wl_info *) data;
WL_LOCK(wl); WL_LOCK(wl);
...@@ -1492,17 +1492,17 @@ static void BCMFASTPATH wl_dpc(unsigned long data) ...@@ -1492,17 +1492,17 @@ static void BCMFASTPATH wl_dpc(unsigned long data)
WL_UNLOCK(wl); WL_UNLOCK(wl);
} }
static void wl_link_up(wl_info_t *wl, char *ifname) static void wl_link_up(struct wl_info *wl, char *ifname)
{ {
WL_ERROR(("wl%d: link up (%s)\n", wl->pub->unit, ifname)); WL_ERROR(("wl%d: link up (%s)\n", wl->pub->unit, ifname));
} }
static void wl_link_down(wl_info_t *wl, char *ifname) static void wl_link_down(struct wl_info *wl, char *ifname)
{ {
WL_ERROR(("wl%d: link down (%s)\n", wl->pub->unit, ifname)); WL_ERROR(("wl%d: link down (%s)\n", wl->pub->unit, ifname));
} }
void wl_event(wl_info_t *wl, char *ifname, wlc_event_t *e) void wl_event(struct wl_info *wl, char *ifname, wlc_event_t *e)
{ {
switch (e->event.event_type) { switch (e->event.event_type) {
...@@ -1544,7 +1544,7 @@ static void _wl_timer(wl_timer_t *t) ...@@ -1544,7 +1544,7 @@ static void _wl_timer(wl_timer_t *t)
WL_UNLOCK(t->wl); WL_UNLOCK(t->wl);
} }
wl_timer_t *wl_init_timer(wl_info_t *wl, void (*fn) (void *arg), void *arg, wl_timer_t *wl_init_timer(struct wl_info *wl, void (*fn) (void *arg), void *arg,
const char *name) const char *name)
{ {
wl_timer_t *t; wl_timer_t *t;
...@@ -1578,7 +1578,7 @@ wl_timer_t *wl_init_timer(wl_info_t *wl, void (*fn) (void *arg), void *arg, ...@@ -1578,7 +1578,7 @@ wl_timer_t *wl_init_timer(wl_info_t *wl, void (*fn) (void *arg), void *arg,
/* BMAC_NOTE: Add timer adds only the kernel timer since it's going to be more accurate /* BMAC_NOTE: Add timer adds only the kernel timer since it's going to be more accurate
* as well as it's easier to make it periodic * as well as it's easier to make it periodic
*/ */
void wl_add_timer(wl_info_t *wl, wl_timer_t *t, uint ms, int periodic) void wl_add_timer(struct wl_info *wl, wl_timer_t *t, uint ms, int periodic)
{ {
#ifdef BCMDBG #ifdef BCMDBG
if (t->set) { if (t->set) {
...@@ -1598,7 +1598,7 @@ void wl_add_timer(wl_info_t *wl, wl_timer_t *t, uint ms, int periodic) ...@@ -1598,7 +1598,7 @@ void wl_add_timer(wl_info_t *wl, wl_timer_t *t, uint ms, int periodic)
} }
/* return true if timer successfully deleted, false if still pending */ /* return true if timer successfully deleted, false if still pending */
bool wl_del_timer(wl_info_t *wl, wl_timer_t *t) bool wl_del_timer(struct wl_info *wl, wl_timer_t *t)
{ {
if (t->set) { if (t->set) {
t->set = false; t->set = false;
...@@ -1611,7 +1611,7 @@ bool wl_del_timer(wl_info_t *wl, wl_timer_t *t) ...@@ -1611,7 +1611,7 @@ bool wl_del_timer(wl_info_t *wl, wl_timer_t *t)
return true; return true;
} }
void wl_free_timer(wl_info_t *wl, wl_timer_t *t) void wl_free_timer(struct wl_info *wl, wl_timer_t *t)
{ {
wl_timer_t *tmp; wl_timer_t *tmp;
...@@ -1647,7 +1647,7 @@ void wl_free_timer(wl_info_t *wl, wl_timer_t *t) ...@@ -1647,7 +1647,7 @@ void wl_free_timer(wl_info_t *wl, wl_timer_t *t)
static int wl_linux_watchdog(void *ctx) static int wl_linux_watchdog(void *ctx)
{ {
wl_info_t *wl = (wl_info_t *) ctx; struct wl_info *wl = (struct wl_info *) ctx;
struct net_device_stats *stats = NULL; struct net_device_stats *stats = NULL;
uint id; uint id;
/* refresh stats */ /* refresh stats */
...@@ -1687,13 +1687,12 @@ struct wl_fw_hdr { ...@@ -1687,13 +1687,12 @@ struct wl_fw_hdr {
u32 idx; u32 idx;
}; };
char *wl_firmwares[WL_MAX_FW] = { char *wl_firmwares[WL_MAX_FW] = {
"brcm/bcm43xx", "brcm/bcm43xx",
NULL NULL
}; };
int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx) int wl_ucode_init_buf(struct wl_info *wl, void **pbuf, u32 idx)
{ {
int i, entry; int i, entry;
const u8 *pdata; const u8 *pdata;
...@@ -1719,7 +1718,7 @@ int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx) ...@@ -1719,7 +1718,7 @@ int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx)
return -1; return -1;
} }
int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx) int wl_ucode_init_uint(struct wl_info *wl, u32 *data, u32 idx)
{ {
int i, entry; int i, entry;
const u8 *pdata; const u8 *pdata;
...@@ -1740,7 +1739,7 @@ int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx) ...@@ -1740,7 +1739,7 @@ int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx)
return -1; return -1;
} }
static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev) static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev)
{ {
int status; int status;
struct device *device = &pdev->dev; struct device *device = &pdev->dev;
...@@ -1786,7 +1785,7 @@ void wl_ucode_free_buf(void *p) ...@@ -1786,7 +1785,7 @@ void wl_ucode_free_buf(void *p)
kfree(p); kfree(p);
} }
static void wl_release_fw(wl_info_t *wl) static void wl_release_fw(struct wl_info *wl)
{ {
int i; int i;
for (i = 0; i < WL_MAX_FW; i++) { for (i = 0; i < WL_MAX_FW; i++) {
......
...@@ -97,9 +97,6 @@ struct wl_info { ...@@ -97,9 +97,6 @@ struct wl_info {
#define INT_LOCK(wl, flags) spin_lock_irqsave(&(wl)->isr_lock, flags) #define INT_LOCK(wl, flags) spin_lock_irqsave(&(wl)->isr_lock, flags)
#define INT_UNLOCK(wl, flags) spin_unlock_irqrestore(&(wl)->isr_lock, flags) #define INT_UNLOCK(wl, flags) spin_unlock_irqrestore(&(wl)->isr_lock, flags)
/* handle forward declaration */
typedef struct wl_info wl_info_t;
#ifndef PCI_D0 #ifndef PCI_D0
#define PCI_D0 0 #define PCI_D0 0
#endif #endif
...@@ -114,12 +111,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id); ...@@ -114,12 +111,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id);
extern int __devinit wl_pci_probe(struct pci_dev *pdev, extern int __devinit wl_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent); const struct pci_device_id *ent);
extern void wl_free(wl_info_t *wl); extern void wl_free(struct wl_info *wl);
extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
extern int wl_ucode_data_init(wl_info_t *wl);
extern void wl_ucode_data_free(void);
extern void wl_ucode_free_buf(void *);
extern int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx);
extern int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx);
#endif /* _wl_mac80211_h_ */ #endif /* _wl_mac80211_h_ */
...@@ -35,3 +35,11 @@ extern u32 *bcm43xx_24_lcn; ...@@ -35,3 +35,11 @@ extern u32 *bcm43xx_24_lcn;
extern u32 bcm43xx_24_lcnsz; extern u32 bcm43xx_24_lcnsz;
extern u32 *bcm43xx_bommajor; extern u32 *bcm43xx_bommajor;
extern u32 *bcm43xx_bomminor; extern u32 *bcm43xx_bomminor;
extern int wl_ucode_data_init(struct wl_info *wl);
extern void wl_ucode_data_free(void);
extern int wl_ucode_init_buf(struct wl_info *wl, void **pbuf, unsigned int idx);
extern int wl_ucode_init_uint(struct wl_info *wl, unsigned *data,
unsigned int idx);
extern void wl_ucode_free_buf(void *);
...@@ -14,17 +14,12 @@ ...@@ -14,17 +14,12 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
typedef struct wl_info wl_info_t;
#include <linux/types.h> #include <linux/types.h>
#include <bcmdefs.h> #include <bcmdefs.h>
#include <d11ucode_ext.h> #include <d11ucode_ext.h>
#include <wl_ucode.h> #include <wl_ucode.h>
extern int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, unsigned int idx);
extern int wl_ucode_init_uint(wl_info_t *wl, unsigned *data, unsigned int idx);
extern int wl_ucode_data_init(wl_info_t *wl);
extern void wl_ucode_data_free(void);
extern void wl_ucode_free_buf(void *);
d11init_t *d11lcn0bsinitvals24; d11init_t *d11lcn0bsinitvals24;
d11init_t *d11lcn0initvals24; d11init_t *d11lcn0initvals24;
...@@ -42,7 +37,7 @@ u32 bcm43xx_24_lcnsz; ...@@ -42,7 +37,7 @@ u32 bcm43xx_24_lcnsz;
u32 *bcm43xx_bommajor; u32 *bcm43xx_bommajor;
u32 *bcm43xx_bomminor; u32 *bcm43xx_bomminor;
int wl_ucode_data_init(wl_info_t *wl) int wl_ucode_data_init(struct wl_info *wl)
{ {
wl_ucode_init_buf(wl, (void **)&d11lcn0bsinitvals24, wl_ucode_init_buf(wl, (void **)&d11lcn0bsinitvals24,
D11LCN0BSINITVALS24); D11LCN0BSINITVALS24);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment