Commit 9bd91f3c authored by Joe Perches's avatar Joe Perches

brcm80211: Remove extern from function prototypes

There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
parent a3dabaf0
...@@ -632,29 +632,29 @@ struct brcmf_skb_reorder_data { ...@@ -632,29 +632,29 @@ struct brcmf_skb_reorder_data {
u8 *reorder; u8 *reorder;
}; };
extern int brcmf_netdev_wait_pend8021x(struct net_device *ndev); int brcmf_netdev_wait_pend8021x(struct net_device *ndev);
/* Return pointer to interface name */ /* Return pointer to interface name */
extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx); char *brcmf_ifname(struct brcmf_pub *drvr, int idx);
/* Query dongle */ /* Query dongle */
extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd,
uint cmd, void *buf, uint len); void *buf, uint len);
extern int brcmf_proto_cdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd, int brcmf_proto_cdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd,
void *buf, uint len); void *buf, uint len);
/* Remove any protocol-specific data header. */ /* Remove any protocol-specific data header. */
extern int brcmf_proto_hdrpull(struct brcmf_pub *drvr, bool do_fws, u8 *ifidx, int brcmf_proto_hdrpull(struct brcmf_pub *drvr, bool do_fws, u8 *ifidx,
struct sk_buff *rxp); struct sk_buff *rxp);
extern int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked); int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked);
extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx, struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx, s32 ifidx,
s32 ifidx, char *name, u8 *mac_addr); char *name, u8 *mac_addr);
extern void brcmf_del_if(struct brcmf_pub *drvr, s32 bssidx); void brcmf_del_if(struct brcmf_pub *drvr, s32 bssidx);
void brcmf_txflowblock_if(struct brcmf_if *ifp, void brcmf_txflowblock_if(struct brcmf_if *ifp,
enum brcmf_netif_stop_reason reason, bool state); enum brcmf_netif_stop_reason reason, bool state);
extern u32 brcmf_get_chip_info(struct brcmf_if *ifp); u32 brcmf_get_chip_info(struct brcmf_if *ifp);
extern void brcmf_txfinalize(struct brcmf_pub *drvr, struct sk_buff *txp, void brcmf_txfinalize(struct brcmf_pub *drvr, struct sk_buff *txp,
bool success); bool success);
#endif /* _BRCMF_H_ */ #endif /* _BRCMF_H_ */
...@@ -132,34 +132,33 @@ struct pktq *brcmf_bus_gettxq(struct brcmf_bus *bus) ...@@ -132,34 +132,33 @@ struct pktq *brcmf_bus_gettxq(struct brcmf_bus *bus)
* interface functions from common layer * interface functions from common layer
*/ */
extern bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, struct sk_buff *pkt,
struct sk_buff *pkt, int prec); int prec);
/* Receive frame for delivery to OS. Callee disposes of rxp. */ /* Receive frame for delivery to OS. Callee disposes of rxp. */
extern void brcmf_rx_frames(struct device *dev, struct sk_buff_head *rxlist); void brcmf_rx_frames(struct device *dev, struct sk_buff_head *rxlist);
/* Indication from bus module regarding presence/insertion of dongle. */ /* Indication from bus module regarding presence/insertion of dongle. */
extern int brcmf_attach(uint bus_hdrlen, struct device *dev); int brcmf_attach(uint bus_hdrlen, struct device *dev);
/* Indication from bus module regarding removal/absence of dongle */ /* Indication from bus module regarding removal/absence of dongle */
extern void brcmf_detach(struct device *dev); void brcmf_detach(struct device *dev);
/* Indication from bus module that dongle should be reset */ /* Indication from bus module that dongle should be reset */
extern void brcmf_dev_reset(struct device *dev); void brcmf_dev_reset(struct device *dev);
/* Indication from bus module to change flow-control state */ /* Indication from bus module to change flow-control state */
extern void brcmf_txflowblock(struct device *dev, bool state); void brcmf_txflowblock(struct device *dev, bool state);
/* Notify the bus has transferred the tx packet to firmware */ /* Notify the bus has transferred the tx packet to firmware */
extern void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success);
bool success);
extern int brcmf_bus_start(struct device *dev); int brcmf_bus_start(struct device *dev);
#ifdef CONFIG_BRCMFMAC_SDIO #ifdef CONFIG_BRCMFMAC_SDIO
extern void brcmf_sdio_exit(void); void brcmf_sdio_exit(void);
extern void brcmf_sdio_init(void); void brcmf_sdio_init(void);
#endif #endif
#ifdef CONFIG_BRCMFMAC_USB #ifdef CONFIG_BRCMFMAC_USB
extern void brcmf_usb_exit(void); void brcmf_usb_exit(void);
extern void brcmf_usb_init(void); void brcmf_usb_init(void);
#endif #endif
#endif /* _BRCMF_BUS_H_ */ #endif /* _BRCMF_BUS_H_ */
...@@ -22,21 +22,21 @@ ...@@ -22,21 +22,21 @@
*/ */
/* Linkage, sets prot link and updates hdrlen in pub */ /* Linkage, sets prot link and updates hdrlen in pub */
extern int brcmf_proto_attach(struct brcmf_pub *drvr); int brcmf_proto_attach(struct brcmf_pub *drvr);
/* Unlink, frees allocated protocol memory (including brcmf_proto) */ /* Unlink, frees allocated protocol memory (including brcmf_proto) */
extern void brcmf_proto_detach(struct brcmf_pub *drvr); void brcmf_proto_detach(struct brcmf_pub *drvr);
/* Stop protocol: sync w/dongle state. */ /* Stop protocol: sync w/dongle state. */
extern void brcmf_proto_stop(struct brcmf_pub *drvr); void brcmf_proto_stop(struct brcmf_pub *drvr);
/* Add any protocol-specific data header. /* Add any protocol-specific data header.
* Caller must reserve prot_hdrlen prepend space. * Caller must reserve prot_hdrlen prepend space.
*/ */
extern void brcmf_proto_hdrpush(struct brcmf_pub *, int ifidx, u8 offset, void brcmf_proto_hdrpush(struct brcmf_pub *, int ifidx, u8 offset,
struct sk_buff *txp); struct sk_buff *txp);
/* Sets dongle media info (drv_version, mac address). */ /* Sets dongle media info (drv_version, mac address). */
extern int brcmf_c_preinit_dcmds(struct brcmf_if *ifp); int brcmf_c_preinit_dcmds(struct brcmf_if *ifp);
#endif /* _BRCMF_PROTO_H_ */ #endif /* _BRCMF_PROTO_H_ */
...@@ -215,16 +215,15 @@ struct sdpcmd_regs { ...@@ -215,16 +215,15 @@ struct sdpcmd_regs {
u16 PAD[0x80]; u16 PAD[0x80];
}; };
extern int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev, int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev,
struct chip_info **ci_ptr, u32 regs); struct chip_info **ci_ptr, u32 regs);
extern void brcmf_sdio_chip_detach(struct chip_info **ci_ptr); void brcmf_sdio_chip_detach(struct chip_info **ci_ptr);
extern void brcmf_sdio_chip_drivestrengthinit(struct brcmf_sdio_dev *sdiodev, void brcmf_sdio_chip_drivestrengthinit(struct brcmf_sdio_dev *sdiodev,
struct chip_info *ci, struct chip_info *ci, u32 drivestrength);
u32 drivestrength); u8 brcmf_sdio_chip_getinfidx(struct chip_info *ci, u16 coreid);
extern u8 brcmf_sdio_chip_getinfidx(struct chip_info *ci, u16 coreid); void brcmf_sdio_chip_enter_download(struct brcmf_sdio_dev *sdiodev,
extern void brcmf_sdio_chip_enter_download(struct brcmf_sdio_dev *sdiodev,
struct chip_info *ci); struct chip_info *ci);
extern bool brcmf_sdio_chip_exit_download(struct brcmf_sdio_dev *sdiodev, bool brcmf_sdio_chip_exit_download(struct brcmf_sdio_dev *sdiodev,
struct chip_info *ci, char *nvram_dat, struct chip_info *ci, char *nvram_dat,
uint nvram_sz); uint nvram_sz);
......
...@@ -181,17 +181,17 @@ struct brcmf_sdio_dev { ...@@ -181,17 +181,17 @@ struct brcmf_sdio_dev {
}; };
/* Register/deregister interrupt handler. */ /* Register/deregister interrupt handler. */
extern int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev); int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev);
extern int brcmf_sdio_intr_unregister(struct brcmf_sdio_dev *sdiodev); int brcmf_sdio_intr_unregister(struct brcmf_sdio_dev *sdiodev);
/* sdio device register access interface */ /* sdio device register access interface */
extern u8 brcmf_sdio_regrb(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret); u8 brcmf_sdio_regrb(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret);
extern u32 brcmf_sdio_regrl(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret); u32 brcmf_sdio_regrl(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret);
extern void brcmf_sdio_regwb(struct brcmf_sdio_dev *sdiodev, u32 addr, void brcmf_sdio_regwb(struct brcmf_sdio_dev *sdiodev, u32 addr, u8 data,
u8 data, int *ret); int *ret);
extern void brcmf_sdio_regwl(struct brcmf_sdio_dev *sdiodev, u32 addr, void brcmf_sdio_regwl(struct brcmf_sdio_dev *sdiodev, u32 addr, u32 data,
u32 data, int *ret); int *ret);
extern int brcmf_sdio_regrw_helper(struct brcmf_sdio_dev *sdiodev, u32 addr, int brcmf_sdio_regrw_helper(struct brcmf_sdio_dev *sdiodev, u32 addr,
void *data, bool write); void *data, bool write);
/* Buffer transfer to/from device (client) core via cmd53. /* Buffer transfer to/from device (client) core via cmd53.
...@@ -206,21 +206,16 @@ extern int brcmf_sdio_regrw_helper(struct brcmf_sdio_dev *sdiodev, u32 addr, ...@@ -206,21 +206,16 @@ extern int brcmf_sdio_regrw_helper(struct brcmf_sdio_dev *sdiodev, u32 addr,
* Returns 0 or error code. * Returns 0 or error code.
* NOTE: Async operation is not currently supported. * NOTE: Async operation is not currently supported.
*/ */
extern int int brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
uint flags, struct sk_buff_head *pktq); uint flags, struct sk_buff_head *pktq);
extern int int brcmf_sdcard_send_buf(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
brcmf_sdcard_send_buf(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
uint flags, u8 *buf, uint nbytes); uint flags, u8 *buf, uint nbytes);
extern int int brcmf_sdcard_recv_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
brcmf_sdcard_recv_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
uint flags, struct sk_buff *pkt); uint flags, struct sk_buff *pkt);
extern int int brcmf_sdcard_recv_buf(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
brcmf_sdcard_recv_buf(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
uint flags, u8 *buf, uint nbytes); uint flags, u8 *buf, uint nbytes);
extern int int brcmf_sdcard_recv_chain(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
brcmf_sdcard_recv_chain(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
uint flags, struct sk_buff_head *pktq); uint flags, struct sk_buff_head *pktq);
/* Flags bits */ /* Flags bits */
...@@ -237,46 +232,43 @@ brcmf_sdcard_recv_chain(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, ...@@ -237,46 +232,43 @@ brcmf_sdcard_recv_chain(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
* nbytes: number of bytes to transfer to/from buf * nbytes: number of bytes to transfer to/from buf
* Returns 0 or error code. * Returns 0 or error code.
*/ */
extern int brcmf_sdcard_rwdata(struct brcmf_sdio_dev *sdiodev, uint rw, int brcmf_sdcard_rwdata(struct brcmf_sdio_dev *sdiodev, uint rw, u32 addr,
u32 addr, u8 *buf, uint nbytes); u8 *buf, uint nbytes);
extern int brcmf_sdio_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, int brcmf_sdio_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address,
u32 address, u8 *data, uint size); u8 *data, uint size);
/* Issue an abort to the specified function */ /* Issue an abort to the specified function */
extern int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn); int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn);
/* platform specific/high level functions */ /* platform specific/high level functions */
extern int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev); int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev);
extern int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev); int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev);
/* attach, return handler on success, NULL if failed. /* attach, return handler on success, NULL if failed.
* The handler shall be provided by all subsequent calls. No local cache * The handler shall be provided by all subsequent calls. No local cache
* cfghdl points to the starting address of pci device mapped memory * cfghdl points to the starting address of pci device mapped memory
*/ */
extern int brcmf_sdioh_attach(struct brcmf_sdio_dev *sdiodev); int brcmf_sdioh_attach(struct brcmf_sdio_dev *sdiodev);
extern void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev); void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev);
/* read or write one byte using cmd52 */ /* read or write one byte using cmd52 */
extern int brcmf_sdioh_request_byte(struct brcmf_sdio_dev *sdiodev, uint rw, int brcmf_sdioh_request_byte(struct brcmf_sdio_dev *sdiodev, uint rw, uint fnc,
uint fnc, uint addr, u8 *byte); uint addr, u8 *byte);
/* read or write 2/4 bytes using cmd53 */ /* read or write 2/4 bytes using cmd53 */
extern int int brcmf_sdioh_request_word(struct brcmf_sdio_dev *sdiodev, uint rw, uint fnc,
brcmf_sdioh_request_word(struct brcmf_sdio_dev *sdiodev, uint addr, u32 *word, uint nbyte);
uint rw, uint fnc, uint addr,
u32 *word, uint nbyte);
/* Watchdog timer interface for pm ops */ /* Watchdog timer interface for pm ops */
extern void brcmf_sdio_wdtmr_enable(struct brcmf_sdio_dev *sdiodev, void brcmf_sdio_wdtmr_enable(struct brcmf_sdio_dev *sdiodev, bool enable);
bool enable);
extern void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev); void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev);
extern void brcmf_sdbrcm_disconnect(void *ptr); void brcmf_sdbrcm_disconnect(void *ptr);
extern void brcmf_sdbrcm_isr(void *arg); void brcmf_sdbrcm_isr(void *arg);
extern void brcmf_sdbrcm_wd_timer(struct brcmf_sdio *bus, uint wdtick); void brcmf_sdbrcm_wd_timer(struct brcmf_sdio *bus, uint wdtick);
extern void brcmf_pm_resume_wait(struct brcmf_sdio_dev *sdiodev, void brcmf_pm_resume_wait(struct brcmf_sdio_dev *sdiodev,
wait_queue_head_t *wq); wait_queue_head_t *wq);
extern bool brcmf_pm_resume_error(struct brcmf_sdio_dev *sdiodev); bool brcmf_pm_resume_error(struct brcmf_sdio_dev *sdiodev);
#endif /* _BRCM_SDH_H_ */ #endif /* _BRCM_SDH_H_ */
...@@ -172,19 +172,19 @@ struct si_info { ...@@ -172,19 +172,19 @@ struct si_info {
/* AMBA Interconnect exported externs */ /* AMBA Interconnect exported externs */
extern u32 ai_core_cflags(struct bcma_device *core, u32 mask, u32 val); u32 ai_core_cflags(struct bcma_device *core, u32 mask, u32 val);
/* === exported functions === */ /* === exported functions === */
extern struct si_pub *ai_attach(struct bcma_bus *pbus); struct si_pub *ai_attach(struct bcma_bus *pbus);
extern void ai_detach(struct si_pub *sih); void ai_detach(struct si_pub *sih);
extern uint ai_cc_reg(struct si_pub *sih, uint regoff, u32 mask, u32 val); uint ai_cc_reg(struct si_pub *sih, uint regoff, u32 mask, u32 val);
extern void ai_clkctl_init(struct si_pub *sih); void ai_clkctl_init(struct si_pub *sih);
extern u16 ai_clkctl_fast_pwrup_delay(struct si_pub *sih); u16 ai_clkctl_fast_pwrup_delay(struct si_pub *sih);
extern bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode); bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode);
extern bool ai_deviceremoved(struct si_pub *sih); bool ai_deviceremoved(struct si_pub *sih);
/* Enable Ex-PA for 4313 */ /* Enable Ex-PA for 4313 */
extern void ai_epa_4313war(struct si_pub *sih); void ai_epa_4313war(struct si_pub *sih);
static inline u32 ai_get_cccaps(struct si_pub *sih) static inline u32 ai_get_cccaps(struct si_pub *sih)
{ {
......
...@@ -37,17 +37,17 @@ struct brcms_ampdu_session { ...@@ -37,17 +37,17 @@ struct brcms_ampdu_session {
u16 dma_len; u16 dma_len;
}; };
extern void brcms_c_ampdu_reset_session(struct brcms_ampdu_session *session, void brcms_c_ampdu_reset_session(struct brcms_ampdu_session *session,
struct brcms_c_info *wlc); struct brcms_c_info *wlc);
extern int brcms_c_ampdu_add_frame(struct brcms_ampdu_session *session, int brcms_c_ampdu_add_frame(struct brcms_ampdu_session *session,
struct sk_buff *p); struct sk_buff *p);
extern void brcms_c_ampdu_finalize(struct brcms_ampdu_session *session); void brcms_c_ampdu_finalize(struct brcms_ampdu_session *session);
extern struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc); struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc);
extern void brcms_c_ampdu_detach(struct ampdu_info *ampdu); void brcms_c_ampdu_detach(struct ampdu_info *ampdu);
extern void brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, void brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, struct tx_status *txs); struct sk_buff *p, struct tx_status *txs);
extern void brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc); void brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc);
extern void brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu); void brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu);
#endif /* _BRCM_AMPDU_H_ */ #endif /* _BRCM_AMPDU_H_ */
...@@ -17,13 +17,11 @@ ...@@ -17,13 +17,11 @@
#ifndef _BRCM_ANTSEL_H_ #ifndef _BRCM_ANTSEL_H_
#define _BRCM_ANTSEL_H_ #define _BRCM_ANTSEL_H_
extern struct antsel_info *brcms_c_antsel_attach(struct brcms_c_info *wlc); struct antsel_info *brcms_c_antsel_attach(struct brcms_c_info *wlc);
extern void brcms_c_antsel_detach(struct antsel_info *asi); void brcms_c_antsel_detach(struct antsel_info *asi);
extern void brcms_c_antsel_init(struct antsel_info *asi); void brcms_c_antsel_init(struct antsel_info *asi);
extern void brcms_c_antsel_antcfg_get(struct antsel_info *asi, bool usedef, void brcms_c_antsel_antcfg_get(struct antsel_info *asi, bool usedef, bool sel,
bool sel, u8 id, u8 fbid, u8 *antcfg, u8 *fbantcfg);
u8 id, u8 fbid, u8 *antcfg, u8 brcms_c_antsel_antsel2id(struct antsel_info *asi, u16 antsel);
u8 *fbantcfg);
extern u8 brcms_c_antsel_antsel2id(struct antsel_info *asi, u16 antsel);
#endif /* _BRCM_ANTSEL_H_ */ #endif /* _BRCM_ANTSEL_H_ */
...@@ -32,20 +32,16 @@ ...@@ -32,20 +32,16 @@
#define BRCMS_DFS_EU (BRCMS_DFS_TPC | BRCMS_RADAR_TYPE_EU) /* Flag for DFS EU */ #define BRCMS_DFS_EU (BRCMS_DFS_TPC | BRCMS_RADAR_TYPE_EU) /* Flag for DFS EU */
extern struct brcms_cm_info * struct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc);
brcms_c_channel_mgr_attach(struct brcms_c_info *wlc);
extern void brcms_c_channel_mgr_detach(struct brcms_cm_info *wlc_cm); void brcms_c_channel_mgr_detach(struct brcms_cm_info *wlc_cm);
extern bool brcms_c_valid_chanspec_db(struct brcms_cm_info *wlc_cm, bool brcms_c_valid_chanspec_db(struct brcms_cm_info *wlc_cm, u16 chspec);
u16 chspec);
extern void brcms_c_channel_reg_limits(struct brcms_cm_info *wlc_cm, void brcms_c_channel_reg_limits(struct brcms_cm_info *wlc_cm, u16 chanspec,
u16 chanspec,
struct txpwr_limits *txpwr); struct txpwr_limits *txpwr);
extern void brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, void brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, u16 chanspec,
u16 chanspec,
u8 local_constraint_qdbm); u8 local_constraint_qdbm);
extern void brcms_c_regd_init(struct brcms_c_info *wlc); void brcms_c_regd_init(struct brcms_c_info *wlc);
#endif /* _WLC_CHANNEL_H */ #endif /* _WLC_CHANNEL_H */
...@@ -88,26 +88,26 @@ struct brcms_info { ...@@ -88,26 +88,26 @@ struct brcms_info {
}; };
/* misc callbacks */ /* misc callbacks */
extern void brcms_init(struct brcms_info *wl); void brcms_init(struct brcms_info *wl);
extern uint brcms_reset(struct brcms_info *wl); uint brcms_reset(struct brcms_info *wl);
extern void brcms_intrson(struct brcms_info *wl); void brcms_intrson(struct brcms_info *wl);
extern u32 brcms_intrsoff(struct brcms_info *wl); u32 brcms_intrsoff(struct brcms_info *wl);
extern void brcms_intrsrestore(struct brcms_info *wl, u32 macintmask); void brcms_intrsrestore(struct brcms_info *wl, u32 macintmask);
extern int brcms_up(struct brcms_info *wl); int brcms_up(struct brcms_info *wl);
extern void brcms_down(struct brcms_info *wl); void brcms_down(struct brcms_info *wl);
extern void brcms_txflowcontrol(struct brcms_info *wl, struct brcms_if *wlif, void brcms_txflowcontrol(struct brcms_info *wl, struct brcms_if *wlif,
bool state, int prio); bool state, int prio);
extern bool brcms_rfkill_set_hw_state(struct brcms_info *wl); bool brcms_rfkill_set_hw_state(struct brcms_info *wl);
/* timer functions */ /* timer functions */
extern struct brcms_timer *brcms_init_timer(struct brcms_info *wl, struct brcms_timer *brcms_init_timer(struct brcms_info *wl,
void (*fn) (void *arg), void *arg, void (*fn) (void *arg), void *arg,
const char *name); const char *name);
extern void brcms_free_timer(struct brcms_timer *timer); void brcms_free_timer(struct brcms_timer *timer);
extern void brcms_add_timer(struct brcms_timer *timer, uint ms, int periodic); void brcms_add_timer(struct brcms_timer *timer, uint ms, int periodic);
extern bool brcms_del_timer(struct brcms_timer *timer); bool brcms_del_timer(struct brcms_timer *timer);
extern void brcms_dpc(unsigned long data); void brcms_dpc(unsigned long data);
extern void brcms_timer(struct brcms_timer *t); void brcms_timer(struct brcms_timer *t);
extern void brcms_fatal_error(struct brcms_info *wl); void brcms_fatal_error(struct brcms_info *wl);
#endif /* _BRCM_MAC80211_IF_H_ */ #endif /* _BRCM_MAC80211_IF_H_ */
...@@ -616,66 +616,54 @@ struct brcms_bss_cfg { ...@@ -616,66 +616,54 @@ struct brcms_bss_cfg {
struct brcms_bss_info *current_bss; struct brcms_bss_info *current_bss;
}; };
extern int brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, int brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, struct sk_buff *p);
struct sk_buff *p); int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo,
extern int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo,
uint *blocks); uint *blocks);
extern int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config); int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config);
extern void brcms_c_mac_promisc(struct brcms_c_info *wlc, uint filter_flags); void brcms_c_mac_promisc(struct brcms_c_info *wlc, uint filter_flags);
extern u16 brcms_c_calc_lsig_len(struct brcms_c_info *wlc, u32 ratespec, u16 brcms_c_calc_lsig_len(struct brcms_c_info *wlc, u32 ratespec, uint mac_len);
uint mac_len); u32 brcms_c_rspec_to_rts_rspec(struct brcms_c_info *wlc, u32 rspec,
extern u32 brcms_c_rspec_to_rts_rspec(struct brcms_c_info *wlc,
u32 rspec,
bool use_rspec, u16 mimo_ctlchbw); bool use_rspec, u16 mimo_ctlchbw);
extern u16 brcms_c_compute_rtscts_dur(struct brcms_c_info *wlc, bool cts_only, u16 brcms_c_compute_rtscts_dur(struct brcms_c_info *wlc, bool cts_only,
u32 rts_rate, u32 rts_rate, u32 frame_rate,
u32 frame_rate, u8 rts_preamble_type, u8 frame_preamble_type,
u8 rts_preamble_type, uint frame_len, bool ba);
u8 frame_preamble_type, uint frame_len, void brcms_c_inval_dma_pkts(struct brcms_hardware *hw,
bool ba); struct ieee80211_sta *sta, void (*dma_callback_fn));
extern void brcms_c_inval_dma_pkts(struct brcms_hardware *hw, void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend);
struct ieee80211_sta *sta, int brcms_c_set_nmode(struct brcms_c_info *wlc);
void (*dma_callback_fn)); void brcms_c_beacon_phytxctl_txant_upd(struct brcms_c_info *wlc, u32 bcn_rate);
extern void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend); void brcms_b_antsel_type_set(struct brcms_hardware *wlc_hw, u8 antsel_type);
extern int brcms_c_set_nmode(struct brcms_c_info *wlc); void brcms_b_set_chanspec(struct brcms_hardware *wlc_hw, u16 chanspec,
extern void brcms_c_beacon_phytxctl_txant_upd(struct brcms_c_info *wlc,
u32 bcn_rate);
extern void brcms_b_antsel_type_set(struct brcms_hardware *wlc_hw,
u8 antsel_type);
extern void brcms_b_set_chanspec(struct brcms_hardware *wlc_hw,
u16 chanspec,
bool mute, struct txpwr_limits *txpwr); bool mute, struct txpwr_limits *txpwr);
extern void brcms_b_write_shm(struct brcms_hardware *wlc_hw, uint offset, void brcms_b_write_shm(struct brcms_hardware *wlc_hw, uint offset, u16 v);
u16 v); u16 brcms_b_read_shm(struct brcms_hardware *wlc_hw, uint offset);
extern u16 brcms_b_read_shm(struct brcms_hardware *wlc_hw, uint offset); void brcms_b_mhf(struct brcms_hardware *wlc_hw, u8 idx, u16 mask, u16 val,
extern void brcms_b_mhf(struct brcms_hardware *wlc_hw, u8 idx, u16 mask, int bands);
u16 val, int bands); void brcms_b_corereset(struct brcms_hardware *wlc_hw, u32 flags);
extern void brcms_b_corereset(struct brcms_hardware *wlc_hw, u32 flags); void brcms_b_mctrl(struct brcms_hardware *wlc_hw, u32 mask, u32 val);
extern void brcms_b_mctrl(struct brcms_hardware *wlc_hw, u32 mask, u32 val); void brcms_b_phy_reset(struct brcms_hardware *wlc_hw);
extern void brcms_b_phy_reset(struct brcms_hardware *wlc_hw); void brcms_b_bw_set(struct brcms_hardware *wlc_hw, u16 bw);
extern void brcms_b_bw_set(struct brcms_hardware *wlc_hw, u16 bw); void brcms_b_core_phypll_reset(struct brcms_hardware *wlc_hw);
extern void brcms_b_core_phypll_reset(struct brcms_hardware *wlc_hw); void brcms_c_ucode_wake_override_set(struct brcms_hardware *wlc_hw,
extern void brcms_c_ucode_wake_override_set(struct brcms_hardware *wlc_hw,
u32 override_bit); u32 override_bit);
extern void brcms_c_ucode_wake_override_clear(struct brcms_hardware *wlc_hw, void brcms_c_ucode_wake_override_clear(struct brcms_hardware *wlc_hw,
u32 override_bit); u32 override_bit);
extern void brcms_b_write_template_ram(struct brcms_hardware *wlc_hw, void brcms_b_write_template_ram(struct brcms_hardware *wlc_hw, int offset,
int offset, int len, void *buf); int len, void *buf);
extern u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate); u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate);
extern void brcms_b_copyto_objmem(struct brcms_hardware *wlc_hw, void brcms_b_copyto_objmem(struct brcms_hardware *wlc_hw, uint offset,
uint offset, const void *buf, int len, const void *buf, int len, u32 sel);
u32 sel); void brcms_b_copyfrom_objmem(struct brcms_hardware *wlc_hw, uint offset,
extern void brcms_b_copyfrom_objmem(struct brcms_hardware *wlc_hw, uint offset,
void *buf, int len, u32 sel); void *buf, int len, u32 sel);
extern void brcms_b_switch_macfreq(struct brcms_hardware *wlc_hw, u8 spurmode); void brcms_b_switch_macfreq(struct brcms_hardware *wlc_hw, u8 spurmode);
extern u16 brcms_b_get_txant(struct brcms_hardware *wlc_hw); u16 brcms_b_get_txant(struct brcms_hardware *wlc_hw);
extern void brcms_b_phyclk_fgc(struct brcms_hardware *wlc_hw, bool clk); void brcms_b_phyclk_fgc(struct brcms_hardware *wlc_hw, bool clk);
extern void brcms_b_macphyclk_set(struct brcms_hardware *wlc_hw, bool clk); void brcms_b_macphyclk_set(struct brcms_hardware *wlc_hw, bool clk);
extern void brcms_b_core_phypll_ctl(struct brcms_hardware *wlc_hw, bool on); void brcms_b_core_phypll_ctl(struct brcms_hardware *wlc_hw, bool on);
extern void brcms_b_txant_set(struct brcms_hardware *wlc_hw, u16 phytxant); void brcms_b_txant_set(struct brcms_hardware *wlc_hw, u16 phytxant);
extern void brcms_b_band_stf_ss_set(struct brcms_hardware *wlc_hw, void brcms_b_band_stf_ss_set(struct brcms_hardware *wlc_hw, u8 stf_mode);
u8 stf_mode); void brcms_c_init_scb(struct scb *scb);
extern void brcms_c_init_scb(struct scb *scb);
#endif /* _BRCM_MAIN_H_ */ #endif /* _BRCM_MAIN_H_ */
...@@ -124,56 +124,49 @@ ...@@ -124,56 +124,49 @@
struct brcms_phy; struct brcms_phy;
extern struct phy_shim_info *wlc_phy_shim_attach(struct brcms_hardware *wlc_hw, struct phy_shim_info *wlc_phy_shim_attach(struct brcms_hardware *wlc_hw,
struct brcms_info *wl, struct brcms_info *wl,
struct brcms_c_info *wlc); struct brcms_c_info *wlc);
extern void wlc_phy_shim_detach(struct phy_shim_info *physhim); void wlc_phy_shim_detach(struct phy_shim_info *physhim);
/* PHY to WL utility functions */ /* PHY to WL utility functions */
extern struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim, struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim,
void (*fn) (struct brcms_phy *pi), void (*fn)(struct brcms_phy *pi),
void *arg, const char *name); void *arg, const char *name);
extern void wlapi_free_timer(struct wlapi_timer *t); void wlapi_free_timer(struct wlapi_timer *t);
extern void wlapi_add_timer(struct wlapi_timer *t, uint ms, int periodic); void wlapi_add_timer(struct wlapi_timer *t, uint ms, int periodic);
extern bool wlapi_del_timer(struct wlapi_timer *t); bool wlapi_del_timer(struct wlapi_timer *t);
extern void wlapi_intrson(struct phy_shim_info *physhim); void wlapi_intrson(struct phy_shim_info *physhim);
extern u32 wlapi_intrsoff(struct phy_shim_info *physhim); u32 wlapi_intrsoff(struct phy_shim_info *physhim);
extern void wlapi_intrsrestore(struct phy_shim_info *physhim, void wlapi_intrsrestore(struct phy_shim_info *physhim, u32 macintmask);
u32 macintmask);
void wlapi_bmac_write_shm(struct phy_shim_info *physhim, uint offset, u16 v);
extern void wlapi_bmac_write_shm(struct phy_shim_info *physhim, uint offset, u16 wlapi_bmac_read_shm(struct phy_shim_info *physhim, uint offset);
u16 v); void wlapi_bmac_mhf(struct phy_shim_info *physhim, u8 idx, u16 mask, u16 val,
extern u16 wlapi_bmac_read_shm(struct phy_shim_info *physhim, uint offset); int bands);
extern void wlapi_bmac_mhf(struct phy_shim_info *physhim, u8 idx, void wlapi_bmac_corereset(struct phy_shim_info *physhim, u32 flags);
u16 mask, u16 val, int bands); void wlapi_suspend_mac_and_wait(struct phy_shim_info *physhim);
extern void wlapi_bmac_corereset(struct phy_shim_info *physhim, u32 flags); void wlapi_switch_macfreq(struct phy_shim_info *physhim, u8 spurmode);
extern void wlapi_suspend_mac_and_wait(struct phy_shim_info *physhim); void wlapi_enable_mac(struct phy_shim_info *physhim);
extern void wlapi_switch_macfreq(struct phy_shim_info *physhim, u8 spurmode); void wlapi_bmac_mctrl(struct phy_shim_info *physhim, u32 mask, u32 val);
extern void wlapi_enable_mac(struct phy_shim_info *physhim); void wlapi_bmac_phy_reset(struct phy_shim_info *physhim);
extern void wlapi_bmac_mctrl(struct phy_shim_info *physhim, u32 mask, void wlapi_bmac_bw_set(struct phy_shim_info *physhim, u16 bw);
u32 val); void wlapi_bmac_phyclk_fgc(struct phy_shim_info *physhim, bool clk);
extern void wlapi_bmac_phy_reset(struct phy_shim_info *physhim); void wlapi_bmac_macphyclk_set(struct phy_shim_info *physhim, bool clk);
extern void wlapi_bmac_bw_set(struct phy_shim_info *physhim, u16 bw); void wlapi_bmac_core_phypll_ctl(struct phy_shim_info *physhim, bool on);
extern void wlapi_bmac_phyclk_fgc(struct phy_shim_info *physhim, bool clk); void wlapi_bmac_core_phypll_reset(struct phy_shim_info *physhim);
extern void wlapi_bmac_macphyclk_set(struct phy_shim_info *physhim, bool clk); void wlapi_bmac_ucode_wake_override_phyreg_set(struct phy_shim_info *physhim);
extern void wlapi_bmac_core_phypll_ctl(struct phy_shim_info *physhim, bool on); void wlapi_bmac_ucode_wake_override_phyreg_clear(struct phy_shim_info *physhim);
extern void wlapi_bmac_core_phypll_reset(struct phy_shim_info *physhim); void wlapi_bmac_write_template_ram(struct phy_shim_info *physhim, int o,
extern void wlapi_bmac_ucode_wake_override_phyreg_set(struct phy_shim_info *
physhim);
extern void wlapi_bmac_ucode_wake_override_phyreg_clear(struct phy_shim_info *
physhim);
extern void wlapi_bmac_write_template_ram(struct phy_shim_info *physhim, int o,
int len, void *buf); int len, void *buf);
extern u16 wlapi_bmac_rate_shm_offset(struct phy_shim_info *physhim, u16 wlapi_bmac_rate_shm_offset(struct phy_shim_info *physhim, u8 rate);
u8 rate); void wlapi_ucode_sample_init(struct phy_shim_info *physhim);
extern void wlapi_ucode_sample_init(struct phy_shim_info *physhim); void wlapi_copyfrom_objmem(struct phy_shim_info *physhim, uint, void *buf,
extern void wlapi_copyfrom_objmem(struct phy_shim_info *physhim, uint, int, u32 sel);
void *buf, int, u32 sel); void wlapi_copyto_objmem(struct phy_shim_info *physhim, uint, const void *buf,
extern void wlapi_copyto_objmem(struct phy_shim_info *physhim, uint, int, u32);
const void *buf, int, u32);
void wlapi_high_update_phy_mode(struct phy_shim_info *physhim, u32 phy_mode);
extern void wlapi_high_update_phy_mode(struct phy_shim_info *physhim, u16 wlapi_bmac_get_txant(struct phy_shim_info *physhim);
u32 phy_mode);
extern u16 wlapi_bmac_get_txant(struct phy_shim_info *physhim);
#endif /* _BRCM_PHY_SHIM_H_ */ #endif /* _BRCM_PHY_SHIM_H_ */
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "types.h" #include "types.h"
extern u16 si_pmu_fast_pwrup_delay(struct si_pub *sih); u16 si_pmu_fast_pwrup_delay(struct si_pub *sih);
extern u32 si_pmu_measure_alpclk(struct si_pub *sih); u32 si_pmu_measure_alpclk(struct si_pub *sih);
#endif /* _BRCM_PMU_H_ */ #endif /* _BRCM_PMU_H_ */
...@@ -266,83 +266,76 @@ struct brcms_antselcfg { ...@@ -266,83 +266,76 @@ struct brcms_antselcfg {
}; };
/* common functions for every port */ /* common functions for every port */
extern struct brcms_c_info * struct brcms_c_info *brcms_c_attach(struct brcms_info *wl,
brcms_c_attach(struct brcms_info *wl, struct bcma_device *core, uint unit, struct bcma_device *core, uint unit,
bool piomode, uint *perr); bool piomode, uint *perr);
extern uint brcms_c_detach(struct brcms_c_info *wlc); uint brcms_c_detach(struct brcms_c_info *wlc);
extern int brcms_c_up(struct brcms_c_info *wlc); int brcms_c_up(struct brcms_c_info *wlc);
extern uint brcms_c_down(struct brcms_c_info *wlc); uint brcms_c_down(struct brcms_c_info *wlc);
extern bool brcms_c_chipmatch(struct bcma_device *core); bool brcms_c_chipmatch(struct bcma_device *core);
extern void brcms_c_init(struct brcms_c_info *wlc, bool mute_tx); void brcms_c_init(struct brcms_c_info *wlc, bool mute_tx);
extern void brcms_c_reset(struct brcms_c_info *wlc); void brcms_c_reset(struct brcms_c_info *wlc);
extern void brcms_c_intrson(struct brcms_c_info *wlc); void brcms_c_intrson(struct brcms_c_info *wlc);
extern u32 brcms_c_intrsoff(struct brcms_c_info *wlc); u32 brcms_c_intrsoff(struct brcms_c_info *wlc);
extern void brcms_c_intrsrestore(struct brcms_c_info *wlc, u32 macintmask); void brcms_c_intrsrestore(struct brcms_c_info *wlc, u32 macintmask);
extern bool brcms_c_intrsupd(struct brcms_c_info *wlc); bool brcms_c_intrsupd(struct brcms_c_info *wlc);
extern bool brcms_c_isr(struct brcms_c_info *wlc); bool brcms_c_isr(struct brcms_c_info *wlc);
extern bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded); bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded);
extern bool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, bool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu,
struct sk_buff *sdu,
struct ieee80211_hw *hw); struct ieee80211_hw *hw);
extern bool brcms_c_aggregatable(struct brcms_c_info *wlc, u8 tid); bool brcms_c_aggregatable(struct brcms_c_info *wlc, u8 tid);
extern void brcms_c_protection_upd(struct brcms_c_info *wlc, uint idx, void brcms_c_protection_upd(struct brcms_c_info *wlc, uint idx, int val);
int val); int brcms_c_get_header_len(void);
extern int brcms_c_get_header_len(void); void brcms_c_set_addrmatch(struct brcms_c_info *wlc, int match_reg_offset,
extern void brcms_c_set_addrmatch(struct brcms_c_info *wlc,
int match_reg_offset,
const u8 *addr); const u8 *addr);
extern void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci, void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
const struct ieee80211_tx_queue_params *arg, const struct ieee80211_tx_queue_params *arg,
bool suspend); bool suspend);
extern struct brcms_pub *brcms_c_pub(struct brcms_c_info *wlc); struct brcms_pub *brcms_c_pub(struct brcms_c_info *wlc);
extern void brcms_c_ampdu_flush(struct brcms_c_info *wlc, void brcms_c_ampdu_flush(struct brcms_c_info *wlc, struct ieee80211_sta *sta,
struct ieee80211_sta *sta, u16 tid); u16 tid);
extern void brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, void brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
u8 ba_wsize, uint max_rx_ampdu_bytes); u8 ba_wsize, uint max_rx_ampdu_bytes);
extern int brcms_c_module_register(struct brcms_pub *pub, int brcms_c_module_register(struct brcms_pub *pub, const char *name,
const char *name, struct brcms_info *hdl, struct brcms_info *hdl,
int (*down_fn)(void *handle)); int (*down_fn)(void *handle));
extern int brcms_c_module_unregister(struct brcms_pub *pub, const char *name, int brcms_c_module_unregister(struct brcms_pub *pub, const char *name,
struct brcms_info *hdl); struct brcms_info *hdl);
extern void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc); void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc);
extern void brcms_c_enable_mac(struct brcms_c_info *wlc); void brcms_c_enable_mac(struct brcms_c_info *wlc);
extern void brcms_c_associate_upd(struct brcms_c_info *wlc, bool state); void brcms_c_associate_upd(struct brcms_c_info *wlc, bool state);
extern void brcms_c_scan_start(struct brcms_c_info *wlc); void brcms_c_scan_start(struct brcms_c_info *wlc);
extern void brcms_c_scan_stop(struct brcms_c_info *wlc); void brcms_c_scan_stop(struct brcms_c_info *wlc);
extern int brcms_c_get_curband(struct brcms_c_info *wlc); int brcms_c_get_curband(struct brcms_c_info *wlc);
extern int brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel); int brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel);
extern int brcms_c_set_rate_limit(struct brcms_c_info *wlc, u16 srl, u16 lrl); int brcms_c_set_rate_limit(struct brcms_c_info *wlc, u16 srl, u16 lrl);
extern void brcms_c_get_current_rateset(struct brcms_c_info *wlc, void brcms_c_get_current_rateset(struct brcms_c_info *wlc,
struct brcm_rateset *currs); struct brcm_rateset *currs);
extern int brcms_c_set_rateset(struct brcms_c_info *wlc, int brcms_c_set_rateset(struct brcms_c_info *wlc, struct brcm_rateset *rs);
struct brcm_rateset *rs); int brcms_c_set_beacon_period(struct brcms_c_info *wlc, u16 period);
extern int brcms_c_set_beacon_period(struct brcms_c_info *wlc, u16 period); u16 brcms_c_get_phy_type(struct brcms_c_info *wlc, int phyidx);
extern u16 brcms_c_get_phy_type(struct brcms_c_info *wlc, int phyidx); void brcms_c_set_shortslot_override(struct brcms_c_info *wlc,
extern void brcms_c_set_shortslot_override(struct brcms_c_info *wlc,
s8 sslot_override); s8 sslot_override);
extern void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval);
u8 interval); u64 brcms_c_tsf_get(struct brcms_c_info *wlc);
extern u64 brcms_c_tsf_get(struct brcms_c_info *wlc); void brcms_c_tsf_set(struct brcms_c_info *wlc, u64 tsf);
extern void brcms_c_tsf_set(struct brcms_c_info *wlc, u64 tsf); int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr);
extern int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr); int brcms_c_get_tx_power(struct brcms_c_info *wlc);
extern int brcms_c_get_tx_power(struct brcms_c_info *wlc); bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc);
extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); void brcms_c_mute(struct brcms_c_info *wlc, bool on);
extern void brcms_c_mute(struct brcms_c_info *wlc, bool on); bool brcms_c_tx_flush_completed(struct brcms_c_info *wlc);
extern bool brcms_c_tx_flush_completed(struct brcms_c_info *wlc); void brcms_c_start_station(struct brcms_c_info *wlc, u8 *addr);
extern void brcms_c_start_station(struct brcms_c_info *wlc, u8 *addr); void brcms_c_start_ap(struct brcms_c_info *wlc, u8 *addr, const u8 *bssid,
extern void brcms_c_start_ap(struct brcms_c_info *wlc, u8 *addr, u8 *ssid, size_t ssid_len);
const u8 *bssid, u8 *ssid, size_t ssid_len); void brcms_c_start_adhoc(struct brcms_c_info *wlc, u8 *addr);
extern void brcms_c_start_adhoc(struct brcms_c_info *wlc, u8 *addr); void brcms_c_update_beacon(struct brcms_c_info *wlc);
extern void brcms_c_update_beacon(struct brcms_c_info *wlc); void brcms_c_set_new_beacon(struct brcms_c_info *wlc, struct sk_buff *beacon,
extern void brcms_c_set_new_beacon(struct brcms_c_info *wlc, u16 tim_offset, u16 dtim_period);
struct sk_buff *beacon, u16 tim_offset, void brcms_c_set_new_probe_resp(struct brcms_c_info *wlc,
u16 dtim_period);
extern void brcms_c_set_new_probe_resp(struct brcms_c_info *wlc,
struct sk_buff *probe_resp); struct sk_buff *probe_resp);
extern void brcms_c_enable_probe_resp(struct brcms_c_info *wlc, bool enable); void brcms_c_enable_probe_resp(struct brcms_c_info *wlc, bool enable);
extern void brcms_c_set_ssid(struct brcms_c_info *wlc, u8 *ssid, void brcms_c_set_ssid(struct brcms_c_info *wlc, u8 *ssid, size_t ssid_len);
size_t ssid_len);
#endif /* _BRCM_PUB_H_ */ #endif /* _BRCM_PUB_H_ */
...@@ -216,34 +216,30 @@ static inline u8 cck_phy2mac_rate(u8 signal) ...@@ -216,34 +216,30 @@ static inline u8 cck_phy2mac_rate(u8 signal)
/* sanitize, and sort a rateset with the basic bit(s) preserved, validate /* sanitize, and sort a rateset with the basic bit(s) preserved, validate
* rateset */ * rateset */
extern bool bool brcms_c_rate_hwrs_filter_sort_validate(struct brcms_c_rateset *rs,
brcms_c_rate_hwrs_filter_sort_validate(struct brcms_c_rateset *rs,
const struct brcms_c_rateset *hw_rs, const struct brcms_c_rateset *hw_rs,
bool check_brate, u8 txstreams); bool check_brate, u8 txstreams);
/* copy rateset src to dst as-is (no masking or sorting) */ /* copy rateset src to dst as-is (no masking or sorting) */
extern void brcms_c_rateset_copy(const struct brcms_c_rateset *src, void brcms_c_rateset_copy(const struct brcms_c_rateset *src,
struct brcms_c_rateset *dst); struct brcms_c_rateset *dst);
/* would be nice to have these documented ... */ /* would be nice to have these documented ... */
extern u32 brcms_c_compute_rspec(struct d11rxhdr *rxh, u8 *plcp); u32 brcms_c_compute_rspec(struct d11rxhdr *rxh, u8 *plcp);
extern void brcms_c_rateset_filter(struct brcms_c_rateset *src, void brcms_c_rateset_filter(struct brcms_c_rateset *src,
struct brcms_c_rateset *dst, bool basic_only, u8 rates, uint xmask, struct brcms_c_rateset *dst, bool basic_only,
bool mcsallow); u8 rates, uint xmask, bool mcsallow);
extern void void brcms_c_rateset_default(struct brcms_c_rateset *rs_tgt,
brcms_c_rateset_default(struct brcms_c_rateset *rs_tgt,
const struct brcms_c_rateset *rs_hw, uint phy_type, const struct brcms_c_rateset *rs_hw, uint phy_type,
int bandtype, bool cck_only, uint rate_mask, int bandtype, bool cck_only, uint rate_mask,
bool mcsallow, u8 bw, u8 txstreams); bool mcsallow, u8 bw, u8 txstreams);
extern s16 brcms_c_rate_legacy_phyctl(uint rate); s16 brcms_c_rate_legacy_phyctl(uint rate);
extern void brcms_c_rateset_mcs_upd(struct brcms_c_rateset *rs, u8 txstreams); void brcms_c_rateset_mcs_upd(struct brcms_c_rateset *rs, u8 txstreams);
extern void brcms_c_rateset_mcs_clear(struct brcms_c_rateset *rateset); void brcms_c_rateset_mcs_clear(struct brcms_c_rateset *rateset);
extern void brcms_c_rateset_mcs_build(struct brcms_c_rateset *rateset, void brcms_c_rateset_mcs_build(struct brcms_c_rateset *rateset, u8 txstreams);
u8 txstreams); void brcms_c_rateset_bw_mcs_filter(struct brcms_c_rateset *rateset, u8 bw);
extern void brcms_c_rateset_bw_mcs_filter(struct brcms_c_rateset *rateset,
u8 bw);
#endif /* _BRCM_RATE_H_ */ #endif /* _BRCM_RATE_H_ */
...@@ -19,24 +19,19 @@ ...@@ -19,24 +19,19 @@
#include "types.h" #include "types.h"
extern int brcms_c_stf_attach(struct brcms_c_info *wlc); int brcms_c_stf_attach(struct brcms_c_info *wlc);
extern void brcms_c_stf_detach(struct brcms_c_info *wlc); void brcms_c_stf_detach(struct brcms_c_info *wlc);
extern void brcms_c_tempsense_upd(struct brcms_c_info *wlc); void brcms_c_tempsense_upd(struct brcms_c_info *wlc);
extern void brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc, void brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc,
u16 *ss_algo_channel, u16 *ss_algo_channel, u16 chanspec);
u16 chanspec); int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band);
extern int brcms_c_stf_ss_update(struct brcms_c_info *wlc, void brcms_c_stf_phy_txant_upd(struct brcms_c_info *wlc);
struct brcms_band *band); int brcms_c_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val, bool force);
extern void brcms_c_stf_phy_txant_upd(struct brcms_c_info *wlc); bool brcms_c_stf_stbc_rx_set(struct brcms_c_info *wlc, s32 int_val);
extern int brcms_c_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val, void brcms_c_stf_phy_txant_upd(struct brcms_c_info *wlc);
bool force); void brcms_c_stf_phy_chain_calc(struct brcms_c_info *wlc);
extern bool brcms_c_stf_stbc_rx_set(struct brcms_c_info *wlc, s32 int_val); u16 brcms_c_stf_phytxchain_sel(struct brcms_c_info *wlc, u32 rspec);
extern void brcms_c_stf_phy_txant_upd(struct brcms_c_info *wlc); u16 brcms_c_stf_d11hdrs_phyctl_txant(struct brcms_c_info *wlc, u32 rspec);
extern void brcms_c_stf_phy_chain_calc(struct brcms_c_info *wlc);
extern u16 brcms_c_stf_phytxchain_sel(struct brcms_c_info *wlc,
u32 rspec);
extern u16 brcms_c_stf_d11hdrs_phyctl_txant(struct brcms_c_info *wlc,
u32 rspec);
#endif /* _BRCM_STF_H_ */ #endif /* _BRCM_STF_H_ */
...@@ -43,16 +43,14 @@ struct brcms_ucode { ...@@ -43,16 +43,14 @@ struct brcms_ucode {
u32 *bcm43xx_bomminor; u32 *bcm43xx_bomminor;
}; };
extern int int brcms_ucode_data_init(struct brcms_info *wl, struct brcms_ucode *ucode);
brcms_ucode_data_init(struct brcms_info *wl, struct brcms_ucode *ucode);
extern void brcms_ucode_data_free(struct brcms_ucode *ucode); void brcms_ucode_data_free(struct brcms_ucode *ucode);
extern int brcms_ucode_init_buf(struct brcms_info *wl, void **pbuf, int brcms_ucode_init_buf(struct brcms_info *wl, void **pbuf, unsigned int idx);
int brcms_ucode_init_uint(struct brcms_info *wl, size_t *n_bytes,
unsigned int idx); unsigned int idx);
extern int brcms_ucode_init_uint(struct brcms_info *wl, size_t *n_bytes, void brcms_ucode_free_buf(void *);
unsigned int idx); int brcms_check_firmwares(struct brcms_info *wl);
extern void brcms_ucode_free_buf(void *);
extern int brcms_check_firmwares(struct brcms_info *wl);
#endif /* _BRCM_UCODE_H_ */ #endif /* _BRCM_UCODE_H_ */
...@@ -140,6 +140,6 @@ struct brcmu_d11inf { ...@@ -140,6 +140,6 @@ struct brcmu_d11inf {
void (*decchspec)(struct brcmu_chan *ch); void (*decchspec)(struct brcmu_chan *ch);
}; };
extern void brcmu_d11_attach(struct brcmu_d11inf *d11inf); void brcmu_d11_attach(struct brcmu_d11inf *d11inf);
#endif /* _BRCMU_CHANNELS_H_ */ #endif /* _BRCMU_CHANNELS_H_ */
...@@ -114,31 +114,29 @@ static inline struct sk_buff *pktq_ppeek_tail(struct pktq *pq, int prec) ...@@ -114,31 +114,29 @@ static inline struct sk_buff *pktq_ppeek_tail(struct pktq *pq, int prec)
return skb_peek_tail(&pq->q[prec].skblist); return skb_peek_tail(&pq->q[prec].skblist);
} }
extern struct sk_buff *brcmu_pktq_penq(struct pktq *pq, int prec, struct sk_buff *brcmu_pktq_penq(struct pktq *pq, int prec, struct sk_buff *p);
struct sk_buff *brcmu_pktq_penq_head(struct pktq *pq, int prec,
struct sk_buff *p); struct sk_buff *p);
extern struct sk_buff *brcmu_pktq_penq_head(struct pktq *pq, int prec, struct sk_buff *brcmu_pktq_pdeq(struct pktq *pq, int prec);
struct sk_buff *p); struct sk_buff *brcmu_pktq_pdeq_tail(struct pktq *pq, int prec);
extern struct sk_buff *brcmu_pktq_pdeq(struct pktq *pq, int prec); struct sk_buff *brcmu_pktq_pdeq_match(struct pktq *pq, int prec,
extern struct sk_buff *brcmu_pktq_pdeq_tail(struct pktq *pq, int prec);
extern struct sk_buff *brcmu_pktq_pdeq_match(struct pktq *pq, int prec,
bool (*match_fn)(struct sk_buff *p, bool (*match_fn)(struct sk_buff *p,
void *arg), void *arg),
void *arg); void *arg);
/* packet primitives */ /* packet primitives */
extern struct sk_buff *brcmu_pkt_buf_get_skb(uint len); struct sk_buff *brcmu_pkt_buf_get_skb(uint len);
extern void brcmu_pkt_buf_free_skb(struct sk_buff *skb); void brcmu_pkt_buf_free_skb(struct sk_buff *skb);
/* Empty the queue at particular precedence level */ /* Empty the queue at particular precedence level */
/* callback function fn(pkt, arg) returns true if pkt belongs to if */ /* callback function fn(pkt, arg) returns true if pkt belongs to if */
extern void brcmu_pktq_pflush(struct pktq *pq, int prec, void brcmu_pktq_pflush(struct pktq *pq, int prec, bool dir,
bool dir, bool (*fn)(struct sk_buff *, void *), void *arg); bool (*fn)(struct sk_buff *, void *), void *arg);
/* operations on a set of precedences in packet queue */ /* operations on a set of precedences in packet queue */
extern int brcmu_pktq_mlen(struct pktq *pq, uint prec_bmp); int brcmu_pktq_mlen(struct pktq *pq, uint prec_bmp);
extern struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp, struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out);
int *prec_out);
/* operations on packet queue as a whole */ /* operations on packet queue as a whole */
...@@ -167,10 +165,10 @@ static inline bool pktq_empty(struct pktq *pq) ...@@ -167,10 +165,10 @@ static inline bool pktq_empty(struct pktq *pq)
return pq->len == 0; return pq->len == 0;
} }
extern void brcmu_pktq_init(struct pktq *pq, int num_prec, int max_len); void brcmu_pktq_init(struct pktq *pq, int num_prec, int max_len);
/* prec_out may be NULL if caller is not interested in return value */ /* prec_out may be NULL if caller is not interested in return value */
extern struct sk_buff *brcmu_pktq_peek_tail(struct pktq *pq, int *prec_out); struct sk_buff *brcmu_pktq_peek_tail(struct pktq *pq, int *prec_out);
extern void brcmu_pktq_flush(struct pktq *pq, bool dir, void brcmu_pktq_flush(struct pktq *pq, bool dir,
bool (*fn)(struct sk_buff *, void *), void *arg); bool (*fn)(struct sk_buff *, void *), void *arg);
/* externs */ /* externs */
...@@ -204,13 +202,13 @@ static inline u16 brcmu_maskget16(u16 var, u16 mask, u8 shift) ...@@ -204,13 +202,13 @@ static inline u16 brcmu_maskget16(u16 var, u16 mask, u8 shift)
/* externs */ /* externs */
/* format/print */ /* format/print */
#ifdef DEBUG #ifdef DEBUG
extern void brcmu_prpkt(const char *msg, struct sk_buff *p0); void brcmu_prpkt(const char *msg, struct sk_buff *p0);
#else #else
#define brcmu_prpkt(a, b) #define brcmu_prpkt(a, b)
#endif /* DEBUG */ #endif /* DEBUG */
#ifdef DEBUG #ifdef DEBUG
extern __printf(3, 4) __printf(3, 4)
void brcmu_dbg_hex_dump(const void *data, size_t size, const char *fmt, ...); void brcmu_dbg_hex_dump(const void *data, size_t size, const char *fmt, ...);
#else #else
__printf(3, 4) __printf(3, 4)
......
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