Skip to content

Commit

Permalink
ath6kl: create ath6kl_core.ko
Browse files Browse the repository at this point in the history
Now ath6kl is ready for splitting core code to ath6kl_core.ko module.
This also makes it possible to link both sdio and usb code to kernel
at the same time, which earlier failed miserably.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Kalle Valo committed Jan 18, 2012
1 parent 3b1b7d0 commit d6a434d
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 13 deletions.
28 changes: 15 additions & 13 deletions drivers/net/wireless/ath/ath6kl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@
# Author(s): ="Atheros"
#------------------------------------------------------------------------------

obj-$(CONFIG_ATH6KL) := ath6kl.o
ath6kl-y += debug.o
ath6kl-y += hif.o
ath6kl-y += htc.o
ath6kl-y += bmi.o
ath6kl-y += cfg80211.o
ath6kl-y += init.o
ath6kl-y += main.o
ath6kl-y += txrx.o
ath6kl-y += wmi.o
ath6kl-y += core.o
ath6kl-y += sdio.o
ath6kl-$(CONFIG_NL80211_TESTMODE) += testmode.o
obj-$(CONFIG_ATH6KL) += ath6kl_core.o
ath6kl_core-y += debug.o
ath6kl_core-y += hif.o
ath6kl_core-y += htc.o
ath6kl_core-y += bmi.o
ath6kl_core-y += cfg80211.o
ath6kl_core-y += init.o
ath6kl_core-y += main.o
ath6kl_core-y += txrx.o
ath6kl_core-y += wmi.o
ath6kl_core-y += core.o
ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o

obj-$(CONFIG_ATH6KL_SDIO) += ath6kl_sdio.o
ath6kl_sdio-y += sdio.o
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <linux/moduleparam.h>
#include <linux/inetdevice.h>
#include <linux/export.h>

#include "core.h"
#include "cfg80211.h"
Expand Down Expand Up @@ -1935,6 +1936,7 @@ int ath6kl_cfg80211_suspend(struct ath6kl *ar,

return 0;
}
EXPORT_SYMBOL(ath6kl_cfg80211_suspend);

int ath6kl_cfg80211_resume(struct ath6kl *ar)
{
Expand Down Expand Up @@ -1986,6 +1988,7 @@ int ath6kl_cfg80211_resume(struct ath6kl *ar)

return 0;
}
EXPORT_SYMBOL(ath6kl_cfg80211_resume);

#ifdef CONFIG_PM

Expand Down
9 changes: 9 additions & 0 deletions drivers/net/wireless/ath/ath6kl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

#include "core.h"

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/export.h>

#include "debug.h"
#include "hif-ops.h"
Expand Down Expand Up @@ -203,6 +205,7 @@ int ath6kl_core_init(struct ath6kl *ar)

return ret;
}
EXPORT_SYMBOL(ath6kl_core_init);

struct ath6kl *ath6kl_core_create(struct device *dev)
{
Expand Down Expand Up @@ -258,6 +261,7 @@ struct ath6kl *ath6kl_core_create(struct device *dev)

return ar;
}
EXPORT_SYMBOL(ath6kl_core_create);

void ath6kl_core_cleanup(struct ath6kl *ar)
{
Expand All @@ -284,9 +288,14 @@ void ath6kl_core_cleanup(struct ath6kl *ar)

ath6kl_cfg80211_cleanup(ar);
}
EXPORT_SYMBOL(ath6kl_core_cleanup);

void ath6kl_core_destroy(struct ath6kl *ar)
{
ath6kl_cfg80211_destroy(ar);
}
EXPORT_SYMBOL(ath6kl_core_destroy);

MODULE_AUTHOR("Qualcomm Atheros");
MODULE_DESCRIPTION("Core module for AR600x SDIO and USB devices.");
MODULE_LICENSE("Dual BSD/GPL");
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath6kl/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ int ath6kl_printk(const char *level, const char *fmt, ...)

return rtn;
}
EXPORT_SYMBOL(ath6kl_printk);

#ifdef CONFIG_ATH6KL_DEBUG

Expand All @@ -74,6 +75,7 @@ void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...)

va_end(args);
}
EXPORT_SYMBOL(ath6kl_dbg);

void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
const char *msg, const char *prefix,
Expand All @@ -86,6 +88,7 @@ void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len);
}
}
EXPORT_SYMBOL(ath6kl_dbg_dump);

#define REG_OUTPUT_LEN_PER_LINE 25
#define REGTYPE_STR_LEN 100
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/wireless/ath/ath6kl/hif.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
#include "hif.h"

#include <linux/export.h>

#include "core.h"
#include "target.h"
#include "hif-ops.h"
Expand Down Expand Up @@ -59,6 +61,8 @@ int ath6kl_hif_rw_comp_handler(void *context, int status)

return 0;
}
EXPORT_SYMBOL(ath6kl_hif_rw_comp_handler);

#define REG_DUMP_COUNT_AR6003 60
#define REGISTER_DUMP_LEN_MAX 60

Expand Down Expand Up @@ -560,6 +564,7 @@ int ath6kl_hif_intr_bh_handler(struct ath6kl *ar)

return status;
}
EXPORT_SYMBOL(ath6kl_hif_intr_bh_handler);

static int ath6kl_hif_enable_intrs(struct ath6kl_device *dev)
{
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@

#include <linux/moduleparam.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/of.h>
#include <linux/mmc/sdio_func.h>

#include "core.h"
#include "cfg80211.h"
#include "target.h"
Expand Down Expand Up @@ -1707,3 +1709,4 @@ void ath6kl_stop_txrx(struct ath6kl *ar)

clear_bit(WLAN_ENABLED, &ar->flag);
}
EXPORT_SYMBOL(ath6kl_stop_txrx);

0 comments on commit d6a434d

Please sign in to comment.