Skip to content

Commit

Permalink
staging: brcm80211: cleanup function prototypes in header files
Browse files Browse the repository at this point in the history
Several header files were specifying function prototypes although
no other module was relying on them. They have been moved to the
related source file and made static or removed if the functions
were non-existent in the driver.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Mar 1, 2011
1 parent b693380 commit 62b54dc
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 155 deletions.
3 changes: 0 additions & 3 deletions drivers/staging/brcm80211/brcmsmac/wl_export.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ extern uint wl_reset(struct wl_info *wl);
extern void wl_intrson(struct wl_info *wl);
extern u32 wl_intrsoff(struct wl_info *wl);
extern void wl_intrsrestore(struct wl_info *wl, u32 macintmask);
extern void wl_event(struct wl_info *wl, char *ifname, wlc_event_t *e);
extern void wl_event_sendup(struct wl_info *wl, const wlc_event_t *e,
u8 *data, u32 len);
extern int wl_up(struct wl_info *wl);
extern void wl_down(struct wl_info *wl);
extern void wl_txflowcontrol(struct wl_info *wl, struct wl_if *wlif, bool state,
Expand Down
16 changes: 11 additions & 5 deletions drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ static int wl_start(struct sk_buff *skb, struct wl_info *wl);
static int wl_start_int(struct wl_info *wl, struct ieee80211_hw *hw,
struct sk_buff *skb);
static void wl_dpc(unsigned long data);
static irqreturn_t wl_isr(int irq, void *dev_id);

static int __devinit wl_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent);
static void wl_remove(struct pci_dev *pdev);
static void wl_free(struct wl_info *wl);

MODULE_AUTHOR("Broadcom Corporation");
MODULE_DESCRIPTION("Broadcom 802.11n wireless LAN driver.");
Expand All @@ -93,8 +99,6 @@ static struct pci_device_id wl_id_table[] = {
};

MODULE_DEVICE_TABLE(pci, wl_id_table);
static void wl_remove(struct pci_dev *pdev);


#ifdef BCMDBG
static int msglevel = 0xdeadbeef;
Expand All @@ -105,6 +109,8 @@ module_param(phymsglevel, int, 0);

#define HW_TO_WL(hw) (hw->priv)
#define WL_TO_HW(wl) (wl->pub->ieee_hw)

/* MAC80211 callback functions */
static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
static int wl_ops_start(struct ieee80211_hw *hw);
static void wl_ops_stop(struct ieee80211_hw *hw);
Expand Down Expand Up @@ -1096,7 +1102,7 @@ static int ieee_hw_init(struct ieee80211_hw *hw)
*
* Perimeter lock is initialized in the course of this function.
*/
int __devinit
static int __devinit
wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int rc;
Expand Down Expand Up @@ -1334,7 +1340,7 @@ module_exit(wl_module_exit);
* precondition: can both be called locked and unlocked
*
*/
void wl_free(struct wl_info *wl)
static void wl_free(struct wl_info *wl)
{
wl_timer_t *t, *next;
struct osl_info *osh;
Expand Down Expand Up @@ -1525,7 +1531,7 @@ void wl_down(struct wl_info *wl)
WL_LOCK(wl);
}

irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
static irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
{
struct wl_info *wl;
bool ours, wantdpc;
Expand Down
17 changes: 0 additions & 17 deletions drivers/staging/brcm80211/brcmsmac/wl_mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,4 @@ struct wl_info {
#define INT_LOCK(wl, flags) spin_lock_irqsave(&(wl)->isr_lock, flags)
#define INT_UNLOCK(wl, flags) spin_unlock_irqrestore(&(wl)->isr_lock, flags)

#ifndef PCI_D0
#define PCI_D0 0
#endif

#ifndef PCI_D3hot
#define PCI_D3hot 3
#endif

/* exported functions */

extern irqreturn_t wl_isr(int irq, void *dev_id);

extern int __devinit wl_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent);
extern void wl_free(struct wl_info *wl);
extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);

#endif /* _wl_mac80211_h_ */
6 changes: 4 additions & 2 deletions drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <wlc_alloc.h>
#include <wl_dbg.h>

static struct wlc_bsscfg *wlc_bsscfg_malloc(struct osl_info *osh, uint unit);
static void wlc_bsscfg_mfree(struct osl_info *osh, struct wlc_bsscfg *cfg);
static struct wlc_pub *wlc_pub_malloc(struct osl_info *osh, uint unit,
uint *err, uint devid);
static void wlc_pub_mfree(struct osl_info *osh, struct wlc_pub *pub);
Expand Down Expand Up @@ -114,7 +116,7 @@ static void wlc_pub_mfree(struct osl_info *osh, struct wlc_pub *pub)
kfree(pub);
}

wlc_bsscfg_t *wlc_bsscfg_malloc(struct osl_info *osh, uint unit)
static wlc_bsscfg_t *wlc_bsscfg_malloc(struct osl_info *osh, uint unit)
{
wlc_bsscfg_t *cfg;

Expand All @@ -134,7 +136,7 @@ wlc_bsscfg_t *wlc_bsscfg_malloc(struct osl_info *osh, uint unit)
return NULL;
}

void wlc_bsscfg_mfree(struct osl_info *osh, wlc_bsscfg_t *cfg)
static void wlc_bsscfg_mfree(struct osl_info *osh, wlc_bsscfg_t *cfg)
{
if (cfg == NULL)
return;
Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/brcm80211/brcmsmac/wlc_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ extern void *wlc_calloc(struct osl_info *osh, uint unit, uint size);
extern struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit,
uint *err, uint devid);
extern void wlc_detach_mfree(struct wlc_info *wlc, struct osl_info *osh);

struct wlc_bsscfg;
extern struct wlc_bsscfg *wlc_bsscfg_malloc(struct osl_info *osh, uint unit);
extern void wlc_bsscfg_mfree(struct osl_info *osh, struct wlc_bsscfg *cfg);
6 changes: 4 additions & 2 deletions drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ static void wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu,
struct scb *scb,
struct sk_buff *p, tx_status_t *txs,
u32 frmtxstatus, u32 frmtxstatus2);
static bool wlc_ampdu_cap(struct ampdu_info *ampdu);
static int wlc_ampdu_set(struct ampdu_info *ampdu, bool on);

struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc)
{
Expand Down Expand Up @@ -1227,7 +1229,7 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
return ini;
}

int wlc_ampdu_set(struct ampdu_info *ampdu, bool on)
static int wlc_ampdu_set(struct ampdu_info *ampdu, bool on)
{
struct wlc_info *wlc = ampdu->wlc;

Expand All @@ -1250,7 +1252,7 @@ int wlc_ampdu_set(struct ampdu_info *ampdu, bool on)
return 0;
}

bool wlc_ampdu_cap(struct ampdu_info *ampdu)
static bool wlc_ampdu_cap(struct ampdu_info *ampdu)
{
if (WLC_PHY_11N_CAP(ampdu->wlc->band))
return true;
Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/brcm80211/brcmsmac/wlc_ampdu.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@

extern struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc);
extern void wlc_ampdu_detach(struct ampdu_info *ampdu);
extern bool wlc_ampdu_cap(struct ampdu_info *ampdu);
extern int wlc_ampdu_set(struct ampdu_info *ampdu, bool on);
extern int wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
struct sk_buff **aggp, int prec);
extern void wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs);
extern void wlc_ampdu_reset(struct ampdu_info *ampdu);
extern void wlc_ampdu_macaddr_upd(struct wlc_info *wlc);
extern void wlc_ampdu_shm_upd(struct ampdu_info *ampdu);

extern u8 wlc_ampdu_null_delim_cnt(struct ampdu_info *ampdu, struct scb *scb,
ratespec_t rspec, int phylen);
extern void scb_ampdu_cleanup(struct ampdu_info *ampdu, struct scb *scb);

#endif /* _wlc_ampdu_h_ */
28 changes: 19 additions & 9 deletions drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,30 @@ static void wlc_flushqueues(struct wlc_info *wlc);
static void wlc_write_mhf(struct wlc_hw_info *wlc_hw, u16 *mhfs);
static void wlc_mctrl_reset(struct wlc_hw_info *wlc_hw);
static void wlc_corerev_fifofixup(struct wlc_hw_info *wlc_hw);
static bool wlc_bmac_tx_fifo_suspended(struct wlc_hw_info *wlc_hw,
uint tx_fifo);
static void wlc_bmac_tx_fifo_suspend(struct wlc_hw_info *wlc_hw, uint tx_fifo);
static void wlc_bmac_tx_fifo_resume(struct wlc_hw_info *wlc_hw, uint tx_fifo);

/* Low Level Prototypes */
static int wlc_bmac_bandtype(struct wlc_hw_info *wlc_hw);
static void wlc_bmac_info_init(struct wlc_hw_info *wlc_hw);
static void wlc_bmac_xtal(struct wlc_hw_info *wlc_hw, bool want);
static u16 wlc_bmac_read_objmem(struct wlc_hw_info *wlc_hw, uint offset,
u32 sel);
static void wlc_bmac_write_objmem(struct wlc_hw_info *wlc_hw, uint offset,
u16 v, u32 sel);
static void wlc_bmac_core_phy_clk(struct wlc_hw_info *wlc_hw, bool clk);
static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme);
static void wlc_bmac_detach_dmapio(struct wlc_hw_info *wlc_hw);
static void wlc_ucode_bsinit(struct wlc_hw_info *wlc_hw);
static bool wlc_validboardtype(struct wlc_hw_info *wlc);
static bool wlc_isgoodchip(struct wlc_hw_info *wlc_hw);
static bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw);
static char *wlc_get_macaddr(struct wlc_hw_info *wlc_hw);
static void wlc_mhfdef(struct wlc_info *wlc, u16 *mhfs, u16 mhf2_init);
static void wlc_mctrl_write(struct wlc_hw_info *wlc_hw);
static void wlc_bmac_mute(struct wlc_hw_info *wlc_hw, bool want, mbool flags);
static void wlc_ucode_mute_override_set(struct wlc_hw_info *wlc_hw);
static void wlc_ucode_mute_override_clear(struct wlc_hw_info *wlc_hw);
static u32 wlc_wlintrsoff(struct wlc_info *wlc);
Expand Down Expand Up @@ -984,7 +994,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
* may get overrides later in this function
* BMAC_NOTES, move low out and resolve the dangling ones
*/
void wlc_bmac_info_init(struct wlc_hw_info *wlc_hw)
static void wlc_bmac_info_init(struct wlc_hw_info *wlc_hw)
{
struct wlc_info *wlc = wlc_hw->wlc;

Expand Down Expand Up @@ -1276,7 +1286,7 @@ void wlc_bmac_hw_etheraddr(struct wlc_hw_info *wlc_hw, u8 *ea)
memcpy(ea, wlc_hw->etheraddr, ETH_ALEN);
}

int wlc_bmac_bandtype(struct wlc_hw_info *wlc_hw)
static int wlc_bmac_bandtype(struct wlc_hw_info *wlc_hw)
{
return wlc_hw->band->bandtype;
}
Expand Down Expand Up @@ -1864,7 +1874,7 @@ WLBANDINITFN(wlc_bmac_bsinit) (struct wlc_info *wlc, chanspec_t chanspec)
wlc_bmac_upd_synthpu(wlc_hw);
}

void wlc_bmac_core_phy_clk(struct wlc_hw_info *wlc_hw, bool clk)
static void wlc_bmac_core_phy_clk(struct wlc_hw_info *wlc_hw, bool clk)
{
WL_TRACE("wl%d: wlc_bmac_core_phy_clk: clk %d\n", wlc_hw->unit, clk);

Expand Down Expand Up @@ -2863,7 +2873,7 @@ void wlc_intrsrestore(struct wlc_info *wlc, u32 macintmask)
W_REG(wlc_hw->osh, &wlc_hw->regs->macintmask, wlc->macintmask);
}

void wlc_bmac_mute(struct wlc_hw_info *wlc_hw, bool on, mbool flags)
static void wlc_bmac_mute(struct wlc_hw_info *wlc_hw, bool on, mbool flags)
{
u8 null_ether_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};

Expand Down Expand Up @@ -2918,7 +2928,7 @@ int wlc_bmac_xmtfifo_sz_get(struct wlc_hw_info *wlc_hw, uint fifo, uint *blocks)
* be pulling data into a tx fifo, by the time the MAC acks the suspend
* request.
*/
bool wlc_bmac_tx_fifo_suspended(struct wlc_hw_info *wlc_hw, uint tx_fifo)
static bool wlc_bmac_tx_fifo_suspended(struct wlc_hw_info *wlc_hw, uint tx_fifo)
{
/* check that a suspend has been requested and is no longer pending */

Expand All @@ -2937,7 +2947,7 @@ bool wlc_bmac_tx_fifo_suspended(struct wlc_hw_info *wlc_hw, uint tx_fifo)
return false;
}

void wlc_bmac_tx_fifo_suspend(struct wlc_hw_info *wlc_hw, uint tx_fifo)
static void wlc_bmac_tx_fifo_suspend(struct wlc_hw_info *wlc_hw, uint tx_fifo)
{
u8 fifo = 1 << tx_fifo;

Expand Down Expand Up @@ -2968,7 +2978,7 @@ void wlc_bmac_tx_fifo_suspend(struct wlc_hw_info *wlc_hw, uint tx_fifo)
}
}

void wlc_bmac_tx_fifo_resume(struct wlc_hw_info *wlc_hw, uint tx_fifo)
static void wlc_bmac_tx_fifo_resume(struct wlc_hw_info *wlc_hw, uint tx_fifo)
{
/* BMAC_NOTE: WLC_TX_FIFO_ENAB is done in wlc_dpc() for DMA case but need to be done
* here for PIO otherwise the watchdog will catch the inconsistency and fire
Expand Down Expand Up @@ -3380,7 +3390,7 @@ wlc_bmac_read_tsf(struct wlc_hw_info *wlc_hw, u32 *tsf_l_ptr,
return;
}

bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw)
static bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw)
{
d11regs_t *regs;
u32 w, val;
Expand Down Expand Up @@ -3542,7 +3552,7 @@ void wlc_coredisable(struct wlc_hw_info *wlc_hw)
}

/* power both the pll and external oscillator on/off */
void wlc_bmac_xtal(struct wlc_hw_info *wlc_hw, bool want)
static void wlc_bmac_xtal(struct wlc_hw_info *wlc_hw, bool want)
{
WL_TRACE("wl%d: wlc_bmac_xtal: want %d\n", wlc_hw->unit, want);

Expand Down
42 changes: 4 additions & 38 deletions drivers/staging/brcm80211/brcmsmac/wlc_bmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _wlc_bmac_h_
#define _wlc_bmac_h_

/* XXXXX this interface is under wlc.c by design
* http://hwnbu-twiki.broadcom.com/bin/view/Mwgroup/WlBmacDesign
Expand Down Expand Up @@ -77,30 +79,13 @@ enum {
IOV_BMAC_LAST
};

typedef enum {
BMAC_DUMP_GPIO_ID,
BMAC_DUMP_SI_ID,
BMAC_DUMP_SIREG_ID,
BMAC_DUMP_SICLK_ID,
BMAC_DUMP_CCREG_ID,
BMAC_DUMP_PCIEREG_ID,
BMAC_DUMP_PHYREG_ID,
BMAC_DUMP_PHYTBL_ID,
BMAC_DUMP_PHYTBL2_ID,
BMAC_DUMP_PHY_RADIOREG_ID,
BMAC_DUMP_LAST
} wlc_bmac_dump_id_t;

extern int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device,
uint unit, bool piomode, struct osl_info *osh,
void *regsva, uint bustype, void *btparam);
extern int wlc_bmac_detach(struct wlc_info *wlc);
extern void wlc_bmac_watchdog(void *arg);
extern void wlc_bmac_info_init(struct wlc_hw_info *wlc_hw);

/* up/down, reset, clk */
extern void wlc_bmac_xtal(struct wlc_hw_info *wlc_hw, bool want);

extern void wlc_bmac_copyto_objmem(struct wlc_hw_info *wlc_hw,
uint offset, const void *buf, int len,
u32 sel);
Expand All @@ -111,7 +96,6 @@ extern void wlc_bmac_copyfrom_objmem(struct wlc_hw_info *wlc_hw, uint offset,
#define wlc_bmac_copyto_shm(wlc_hw, offset, buf, len) \
wlc_bmac_copyto_objmem(wlc_hw, offset, buf, len, OBJADDR_SHM_SEL)

extern void wlc_bmac_core_phy_clk(struct wlc_hw_info *wlc_hw, bool clk);
extern void wlc_bmac_core_phypll_reset(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on);
extern void wlc_bmac_phyclk_fgc(struct wlc_hw_info *wlc_hw, bool clk);
Expand All @@ -125,17 +109,13 @@ extern int wlc_bmac_up_prep(struct wlc_hw_info *wlc_hw);
extern int wlc_bmac_up_finish(struct wlc_hw_info *wlc_hw);
extern int wlc_bmac_down_prep(struct wlc_hw_info *wlc_hw);
extern int wlc_bmac_down_finish(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_corereset(struct wlc_hw_info *wlc_hw, u32 flags);
extern void wlc_bmac_switch_macfreq(struct wlc_hw_info *wlc_hw, u8 spurmode);

/* chanspec, ucode interface */
extern int wlc_bmac_bandtype(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_set_chanspec(struct wlc_hw_info *wlc_hw,
chanspec_t chanspec,
bool mute, struct txpwr_limits *txpwr);

extern void wlc_bmac_txfifo(struct wlc_hw_info *wlc_hw, uint fifo, void *p,
bool commit, u16 frameid, u8 txpktpend);
extern int wlc_bmac_xmtfifo_sz_get(struct wlc_hw_info *wlc_hw, uint fifo,
uint *blocks);
extern void wlc_bmac_mhf(struct wlc_hw_info *wlc_hw, u8 idx, u16 mask,
Expand All @@ -157,22 +137,14 @@ extern void wlc_bmac_write_template_ram(struct wlc_hw_info *wlc_hw, int offset,
extern void wlc_bmac_copyfrom_vars(struct wlc_hw_info *wlc_hw, char **buf,
uint *len);

extern void wlc_bmac_process_ps_switch(struct wlc_hw_info *wlc,
struct ether_addr *ea, s8 ps_on);
extern void wlc_bmac_hw_etheraddr(struct wlc_hw_info *wlc_hw,
u8 *ea);
extern bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw);

extern bool wlc_bmac_radio_read_hwdisabled(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_set_shortslot(struct wlc_hw_info *wlc_hw, bool shortslot);
extern void wlc_bmac_mute(struct wlc_hw_info *wlc_hw, bool want, mbool flags);
extern void wlc_bmac_band_stf_ss_set(struct wlc_hw_info *wlc_hw, u8 stf_mode);

extern void wlc_bmac_wait_for_wake(struct wlc_hw_info *wlc_hw);
extern bool wlc_bmac_tx_fifo_suspended(struct wlc_hw_info *wlc_hw,
uint tx_fifo);
extern void wlc_bmac_tx_fifo_suspend(struct wlc_hw_info *wlc_hw, uint tx_fifo);
extern void wlc_bmac_tx_fifo_resume(struct wlc_hw_info *wlc_hw, uint tx_fifo);

extern void wlc_ucode_wake_override_set(struct wlc_hw_info *wlc_hw,
u32 override_bit);
Expand Down Expand Up @@ -206,13 +178,7 @@ extern void wlc_bmac_pllreq(struct wlc_hw_info *wlc_hw, bool set,
mbool req_bit);
extern bool wlc_bmac_taclear(struct wlc_hw_info *wlc_hw, bool ta_ok);
extern void wlc_bmac_hw_up(struct wlc_hw_info *wlc_hw);

extern void wlc_bmac_dump(struct wlc_hw_info *wlc_hw, struct bcmstrbuf *b,
wlc_bmac_dump_id_t dump_id);

extern u16 wlc_bmac_rate_shm_offset(struct wlc_hw_info *wlc_hw, u8 rate);

extern void wlc_bmac_assert_type_set(struct wlc_hw_info *wlc_hw, u32 type);
extern void wlc_bmac_blink_sync(struct wlc_hw_info *wlc_hw, u32 led_pins);

extern void wlc_bmac_antsel_set(struct wlc_hw_info *wlc_hw, u32 antsel_avail);

#endif /* _wlc_bmac_h_ */
Loading

0 comments on commit 62b54dc

Please sign in to comment.