diff options
author | Hante Meuleman <meuleman@broadcom.com> | 2016-02-17 11:27:02 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-03-07 14:14:56 +0200 |
commit | d84d99e007770b4dd9b9e8be99da043c6555e274 (patch) | |
tree | 0bebb01f51beb7c10e7f57b0d848f042b80033cb /drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | |
parent | e9217b4b62a7296b5c008fd607579dbaf40bd754 (diff) |
brcmfmac: move module init and exit to common
In preparation of module parameters for all devices the module init
and exit routines are moved to the common file.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index 8199862c7cdb..b8dc68db708f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -28,6 +28,10 @@ #include "tracepoint.h" #include "common.h" +MODULE_AUTHOR("Broadcom Corporation"); +MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver."); +MODULE_LICENSE("Dual BSD/GPL"); + const u8 ALLFFMAC[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; #define BRCMF_DEFAULT_SCAN_CHANNEL_TIME 40 @@ -221,7 +225,7 @@ void __brcmf_dbg(u32 level, const char *func, const char *fmt, ...) } #endif -void brcmf_mp_attach(void) +static void brcmf_mp_attach(void) { strlcpy(brcmf_mp_global.firmware_path, brcmf_firmware_path, BRCMF_FW_ALTPATH_LEN); @@ -249,3 +253,33 @@ void brcmf_mp_device_detach(struct brcmf_pub *drvr) kfree(drvr->settings); } +static int __init brcmfmac_module_init(void) +{ + int err; + + /* Initialize debug system first */ + brcmf_debugfs_init(); + +#ifdef CONFIG_BRCMFMAC_SDIO + brcmf_sdio_init(); +#endif + /* Initialize global module paramaters */ + brcmf_mp_attach(); + + /* Continue the initialization by registering the different busses */ + err = brcmf_core_init(); + if (err) + brcmf_debugfs_exit(); + + return err; +} + +static void __exit brcmfmac_module_exit(void) +{ + brcmf_core_exit(); + brcmf_debugfs_exit(); +} + +module_init(brcmfmac_module_init); +module_exit(brcmfmac_module_exit); + |