Commit 7322fd19 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville
Browse files

ath9k: move hw code to its own module



hw code for Atheros 802.11n hardware is commmon between
different chipsets. This moves this code into a separate
module, the next expected user of this code will be
the ath9k_htc module.

The ath9k/ dir is now selected by ATH9K_HW, an option which
gets selected by either ath9k or ath9k_htc, but remains
invisible for user menuconfig configuration. If either
ath9k or ath9k_htc will be compiled into the kernel
ath9k_hw will also be compiled in.

Cc: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 475a6e4d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
obj-$(CONFIG_ATH5K)		+= ath5k/
obj-$(CONFIG_ATH9K)		+= ath9k/
obj-$(CONFIG_ATH9K_HW)		+= ath9k/
obj-$(CONFIG_AR9170_USB)        += ar9170/

obj-$(CONFIG_ATH_COMMON)	+= ath.o
+4 −0
Original line number Diff line number Diff line
config ATH9K_HW
	tristate

config ATH9K
	tristate "Atheros 802.11n wireless cards support"
	depends on PCI && MAC80211 && WLAN_80211
	select ATH9K_HW
	select MAC80211_LEDS
	select LEDS_CLASS
	select NEW_LEDS
+14 −13
Original line number Diff line number Diff line
ATH9K_HW +=	hw.o \
		eeprom.o \
		eeprom_def.o \
		eeprom_4k.o \
		eeprom_9287.o \
		calib.o \
		ani.o \
		phy.o \
		btcoex.o \
		mac.o \

ath9k-y +=	$(ATH9K_HW) \
		beacon.o \
ath9k-y +=	beacon.o \
		main.o \
		recv.o \
		xmit.o \
@@ -22,3 +10,16 @@ ath9k-$(CONFIG_ATHEROS_AR71XX) += ahb.o
ath9k-$(CONFIG_ATH9K_DEBUG) += debug.o

obj-$(CONFIG_ATH9K) += ath9k.o

ath9k_hw-y:=	hw.o \
		eeprom.o \
		eeprom_def.o \
		eeprom_4k.o \
		eeprom_9287.o \
		calib.o \
		ani.o \
		phy.o \
		btcoex.o \
		mac.o \

obj-$(CONFIG_ATH9K_HW) += ath9k_hw.o
+2 −0
Original line number Diff line number Diff line
@@ -629,6 +629,7 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah,
		}
	}
}
EXPORT_SYMBOL(ath9k_hw_ani_monitor);

void ath9k_enable_mib_counters(struct ath_hw *ah)
{
@@ -756,6 +757,7 @@ void ath9k_hw_procmibevent(struct ath_hw *ah)
		ath9k_ani_restart(ah);
	}
}
EXPORT_SYMBOL(ath9k_hw_procmibevent);

void ath9k_hw_ani_setup(struct ath_hw *ah)
{
+6 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum)
	for (i = 0; i < 32; i++)
		ah->hw_gen_timers.gen_timer_index[(debruijn32 << i) >> 27] = i;
}
EXPORT_SYMBOL(ath9k_hw_init_btcoex_hw);

void ath9k_hw_btcoex_init_2wire(struct ath_hw *ah)
{
@@ -116,6 +117,7 @@ void ath9k_hw_btcoex_init_2wire(struct ath_hw *ah)
	/* Configure the desired gpio port for input */
	ath9k_hw_cfg_gpio_input(ah, btcoex_hw->btactive_gpio);
}
EXPORT_SYMBOL(ath9k_hw_btcoex_init_2wire);

void ath9k_hw_btcoex_init_3wire(struct ath_hw *ah)
{
@@ -141,6 +143,7 @@ void ath9k_hw_btcoex_init_3wire(struct ath_hw *ah)
	ath9k_hw_cfg_gpio_input(ah, btcoex_hw->btactive_gpio);
	ath9k_hw_cfg_gpio_input(ah, btcoex_hw->btpriority_gpio);
}
EXPORT_SYMBOL(ath9k_hw_btcoex_init_3wire);

static void ath9k_hw_btcoex_enable_2wire(struct ath_hw *ah)
{
@@ -160,6 +163,7 @@ void ath9k_hw_btcoex_set_weight(struct ath_hw *ah,
	btcoex_hw->bt_coex_weights = SM(bt_weight, AR_BTCOEX_BT_WGHT) |
				     SM(wlan_weight, AR_BTCOEX_WL_WGHT);
}
EXPORT_SYMBOL(ath9k_hw_btcoex_set_weight);

static void ath9k_hw_btcoex_enable_3wire(struct ath_hw *ah)
{
@@ -201,6 +205,7 @@ void ath9k_hw_btcoex_enable(struct ath_hw *ah)

	ah->btcoex_hw.enabled = true;
}
EXPORT_SYMBOL(ath9k_hw_btcoex_enable);

void ath9k_hw_btcoex_disable(struct ath_hw *ah)
{
@@ -219,3 +224,4 @@ void ath9k_hw_btcoex_disable(struct ath_hw *ah)

	ah->btcoex_hw.enabled = false;
}
EXPORT_SYMBOL(ath9k_hw_btcoex_disable);
Loading