Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7905e357 authored by David S. Miller's avatar David S. Miller
Browse files
parents 083ba279 76232ebf
Loading
Loading
Loading
Loading
+17 −18
Original line number Original line Diff line number Diff line
@@ -2279,26 +2279,25 @@ void gelic_wl_interrupt(struct net_device *netdev, u64 status)
/*
/*
 * driver helpers
 * driver helpers
 */
 */
#define IW_IOCTL(n) [(n) - SIOCSIWCOMMIT]
static const iw_handler gelic_wl_wext_handler[] =
static const iw_handler gelic_wl_wext_handler[] =
{
{
	IW_IOCTL(SIOCGIWNAME)		= gelic_wl_get_name,
	IW_HANDLER(SIOCGIWNAME, gelic_wl_get_name),
	IW_IOCTL(SIOCGIWRANGE)		= gelic_wl_get_range,
	IW_HANDLER(SIOCGIWRANGE, gelic_wl_get_range),
	IW_IOCTL(SIOCSIWSCAN)		= gelic_wl_set_scan,
	IW_HANDLER(SIOCSIWSCAN, gelic_wl_set_scan),
	IW_IOCTL(SIOCGIWSCAN)		= gelic_wl_get_scan,
	IW_HANDLER(SIOCGIWSCAN, gelic_wl_get_scan),
	IW_IOCTL(SIOCSIWAUTH)		= gelic_wl_set_auth,
	IW_HANDLER(SIOCSIWAUTH, gelic_wl_set_auth),
	IW_IOCTL(SIOCGIWAUTH)		= gelic_wl_get_auth,
	IW_HANDLER(SIOCGIWAUTH, gelic_wl_get_auth),
	IW_IOCTL(SIOCSIWESSID)		= gelic_wl_set_essid,
	IW_HANDLER(SIOCSIWESSID, gelic_wl_set_essid),
	IW_IOCTL(SIOCGIWESSID)		= gelic_wl_get_essid,
	IW_HANDLER(SIOCGIWESSID, gelic_wl_get_essid),
	IW_IOCTL(SIOCSIWENCODE)		= gelic_wl_set_encode,
	IW_HANDLER(SIOCSIWENCODE, gelic_wl_set_encode),
	IW_IOCTL(SIOCGIWENCODE)		= gelic_wl_get_encode,
	IW_HANDLER(SIOCGIWENCODE, gelic_wl_get_encode),
	IW_IOCTL(SIOCSIWAP)		= gelic_wl_set_ap,
	IW_HANDLER(SIOCSIWAP, gelic_wl_set_ap),
	IW_IOCTL(SIOCGIWAP)		= gelic_wl_get_ap,
	IW_HANDLER(SIOCGIWAP, gelic_wl_get_ap),
	IW_IOCTL(SIOCSIWENCODEEXT)	= gelic_wl_set_encodeext,
	IW_HANDLER(SIOCSIWENCODEEXT, gelic_wl_set_encodeext),
	IW_IOCTL(SIOCGIWENCODEEXT)	= gelic_wl_get_encodeext,
	IW_HANDLER(SIOCGIWENCODEEXT, gelic_wl_get_encodeext),
	IW_IOCTL(SIOCSIWMODE)		= gelic_wl_set_mode,
	IW_HANDLER(SIOCSIWMODE, gelic_wl_set_mode),
	IW_IOCTL(SIOCGIWMODE)		= gelic_wl_get_mode,
	IW_HANDLER(SIOCGIWMODE, gelic_wl_get_mode),
	IW_IOCTL(SIOCGIWNICKN)		= gelic_wl_get_nick,
	IW_HANDLER(SIOCGIWNICKN, gelic_wl_get_nick),
};
};


static const struct iw_handler_def gelic_wl_wext_handler_def = {
static const struct iw_handler_def gelic_wl_wext_handler_def = {
+1 −1
Original line number Original line Diff line number Diff line
@@ -3,7 +3,7 @@ menuconfig ATH_COMMON
	depends on CFG80211
	depends on CFG80211
	---help---
	---help---
	  This will enable the support for the Atheros wireless drivers.
	  This will enable the support for the Atheros wireless drivers.
	  ath5k, ath9k and ar9170 drivers share some common code, this option
	  ath5k, ath9k, ath9k_htc and ar9170 drivers share some common code, this option
	  enables the common ath.ko module which shares common helpers.
	  enables the common ath.ko module which shares common helpers.


	  For more information and documentation on this module you can visit:
	  For more information and documentation on this module you can visit:
+21 −0
Original line number Original line Diff line number Diff line
@@ -32,3 +32,24 @@ config ATH9K_DEBUGFS


	  Also required for changing debug message flags at run time.
	  Also required for changing debug message flags at run time.


config ATH9K_HTC
       tristate "Atheros HTC based wireless cards support"
       depends on USB && MAC80211
       select ATH9K_HW
       select MAC80211_LEDS
       select LEDS_CLASS
       select NEW_LEDS
       select ATH9K_COMMON
       ---help---
	 Support for Atheros HTC based cards.
	 Chipsets supported: AR9271

	 For more information: http://wireless.kernel.org/en/users/Drivers/ath9k_htc

	 The built module will be ath9k_htc.

config ATH9K_HTC_DEBUGFS
	bool "Atheros ath9k_htc debugging"
	depends on ATH9K_HTC && DEBUG_FS
	---help---
	  Say Y, if you need access to ath9k_htc's statistics.
+10 −0
Original line number Original line Diff line number Diff line
@@ -28,3 +28,13 @@ obj-$(CONFIG_ATH9K_HW) += ath9k_hw.o


obj-$(CONFIG_ATH9K_COMMON) += ath9k_common.o
obj-$(CONFIG_ATH9K_COMMON) += ath9k_common.o
ath9k_common-y:=	common.o
ath9k_common-y:=	common.o

ath9k_htc-y +=	htc_hst.o \
		hif_usb.o \
		wmi.o \
		htc_drv_txrx.o \
		htc_drv_main.o \
		htc_drv_beacon.o \
		htc_drv_init.o

obj-$(CONFIG_ATH9K_HTC) += ath9k_htc.o
+18 −7
Original line number Original line Diff line number Diff line
@@ -101,9 +101,13 @@ static void ath9k_hw_do_getnf(struct ath_hw *ah,
		nf = 0 - ((nf ^ 0x1ff) + 1);
		nf = 0 - ((nf ^ 0x1ff) + 1);
	ath_print(common, ATH_DBG_CALIBRATE,
	ath_print(common, ATH_DBG_CALIBRATE,
		  "NF calibrated [ctl] [chain 0] is %d\n", nf);
		  "NF calibrated [ctl] [chain 0] is %d\n", nf);

	if (AR_SREV_9271(ah) && (nf >= -114))
		nf = -116;

	nfarray[0] = nf;
	nfarray[0] = nf;


	if (!AR_SREV_9285(ah)) {
	if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
		if (AR_SREV_9280_10_OR_LATER(ah))
		if (AR_SREV_9280_10_OR_LATER(ah))
			nf = MS(REG_READ(ah, AR_PHY_CH1_CCA),
			nf = MS(REG_READ(ah, AR_PHY_CH1_CCA),
					AR9280_PHY_CH1_MINCCA_PWR);
					AR9280_PHY_CH1_MINCCA_PWR);
@@ -139,9 +143,13 @@ static void ath9k_hw_do_getnf(struct ath_hw *ah,
		nf = 0 - ((nf ^ 0x1ff) + 1);
		nf = 0 - ((nf ^ 0x1ff) + 1);
	ath_print(common, ATH_DBG_CALIBRATE,
	ath_print(common, ATH_DBG_CALIBRATE,
		  "NF calibrated [ext] [chain 0] is %d\n", nf);
		  "NF calibrated [ext] [chain 0] is %d\n", nf);

	if (AR_SREV_9271(ah) && (nf >= -114))
		nf = -116;

	nfarray[3] = nf;
	nfarray[3] = nf;


	if (!AR_SREV_9285(ah)) {
	if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
		if (AR_SREV_9280_10_OR_LATER(ah))
		if (AR_SREV_9280_10_OR_LATER(ah))
			nf = MS(REG_READ(ah, AR_PHY_CH1_EXT_CCA),
			nf = MS(REG_READ(ah, AR_PHY_CH1_EXT_CCA),
					AR9280_PHY_CH1_EXT_MINCCA_PWR);
					AR9280_PHY_CH1_EXT_MINCCA_PWR);
@@ -621,7 +629,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
	u8 chainmask, rx_chain_status;
	u8 chainmask, rx_chain_status;


	rx_chain_status = REG_READ(ah, AR_PHY_RX_CHAINMASK);
	rx_chain_status = REG_READ(ah, AR_PHY_RX_CHAINMASK);
	if (AR_SREV_9285(ah))
	if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
		chainmask = 0x9;
		chainmask = 0x9;
	else if (AR_SREV_9280(ah) || AR_SREV_9287(ah)) {
	else if (AR_SREV_9280(ah) || AR_SREV_9287(ah)) {
		if ((rx_chain_status & 0x2) || (rx_chain_status & 0x4))
		if ((rx_chain_status & 0x2) || (rx_chain_status & 0x4))
@@ -715,7 +723,7 @@ void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah)


	if (AR_SREV_9280(ah))
	if (AR_SREV_9280(ah))
		noise_floor = AR_PHY_CCA_MAX_AR9280_GOOD_VALUE;
		noise_floor = AR_PHY_CCA_MAX_AR9280_GOOD_VALUE;
	else if (AR_SREV_9285(ah))
	else if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
		noise_floor = AR_PHY_CCA_MAX_AR9285_GOOD_VALUE;
		noise_floor = AR_PHY_CCA_MAX_AR9285_GOOD_VALUE;
	else if (AR_SREV_9287(ah))
	else if (AR_SREV_9287(ah))
		noise_floor = AR_PHY_CCA_MAX_AR9287_GOOD_VALUE;
		noise_floor = AR_PHY_CCA_MAX_AR9287_GOOD_VALUE;
@@ -1051,9 +1059,12 @@ bool ath9k_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
	/* Do NF cal only at longer intervals */
	/* Do NF cal only at longer intervals */
	if (longcal) {
	if (longcal) {
		/* Do periodic PAOffset Cal */
		/* Do periodic PAOffset Cal */
		if (AR_SREV_9271(ah))
		if (AR_SREV_9271(ah)) {
			if (!ah->pacal_info.skipcount)
				ath9k_hw_9271_pa_cal(ah, false);
				ath9k_hw_9271_pa_cal(ah, false);
		else if (AR_SREV_9285_11_OR_LATER(ah)) {
			else
				ah->pacal_info.skipcount--;
		} else if (AR_SREV_9285_11_OR_LATER(ah)) {
			if (!ah->pacal_info.skipcount)
			if (!ah->pacal_info.skipcount)
				ath9k_hw_9285_pa_cal(ah, false);
				ath9k_hw_9285_pa_cal(ah, false);
			else
			else
Loading