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

Commit 8c2b418a authored by Nick Kossifidis's avatar Nick Kossifidis Committed by John W. Linville
Browse files

ath5k: Clean up turbo mode initvals/rfregs



 * Clean up what's left of turbo mode, since we handle all
 register modifications (rfbuffer comes next) on code there
 is no need to have duplicated arrays.

 * Rename change_channel to skip_pcu on initvals.c as we did
 on reset.c

 Signed-off-by: default avatarNick Kossifidis <micklfemm@gmail.com>

Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent acb091d6
Loading
Loading
Loading
Loading
+3 −14
Original line number Original line Diff line number Diff line
@@ -158,15 +158,6 @@
#define AR5K_INI_RFGAIN_5GHZ		0
#define AR5K_INI_RFGAIN_5GHZ		0
#define AR5K_INI_RFGAIN_2GHZ		1
#define AR5K_INI_RFGAIN_2GHZ		1


/* TODO: Clean this up */
#define AR5K_INI_VAL_11A		0
#define AR5K_INI_VAL_11A_TURBO		1
#define AR5K_INI_VAL_11B		2
#define AR5K_INI_VAL_11G		3
#define AR5K_INI_VAL_11G_TURBO		4
#define AR5K_INI_VAL_XR			0
#define AR5K_INI_VAL_MAX		5

/*
/*
 * Some tuneable values (these should be changeable by the user)
 * Some tuneable values (these should be changeable by the user)
 * TODO: Make use of them and add more options OR use debug/configfs
 * TODO: Make use of them and add more options OR use debug/configfs
@@ -429,12 +420,10 @@ struct ath5k_srev_name {


enum ath5k_driver_mode {
enum ath5k_driver_mode {
	AR5K_MODE_11A		=	0,
	AR5K_MODE_11A		=	0,
	AR5K_MODE_11A_TURBO	=	1,
	AR5K_MODE_11B		=	1,
	AR5K_MODE_11B		=	2,
	AR5K_MODE_11G		=	2,
	AR5K_MODE_11G		=	3,
	AR5K_MODE_11G_TURBO	=	4,
	AR5K_MODE_XR		=	0,
	AR5K_MODE_XR		=	0,
	AR5K_MODE_MAX		=	5
	AR5K_MODE_MAX		=	3
};
};


enum ath5k_ant_mode {
enum ath5k_ant_mode {
+0 −2
Original line number Original line Diff line number Diff line
@@ -328,14 +328,12 @@ ath5k_copy_channels(struct ath5k_hw *ah,


	switch (mode) {
	switch (mode) {
	case AR5K_MODE_11A:
	case AR5K_MODE_11A:
	case AR5K_MODE_11A_TURBO:
		/* 1..220, but 2GHz frequencies are filtered by check_channel */
		/* 1..220, but 2GHz frequencies are filtered by check_channel */
		size = 220 ;
		size = 220 ;
		chfreq = CHANNEL_5GHZ;
		chfreq = CHANNEL_5GHZ;
		break;
		break;
	case AR5K_MODE_11B:
	case AR5K_MODE_11B:
	case AR5K_MODE_11G:
	case AR5K_MODE_11G:
	case AR5K_MODE_11G_TURBO:
		size = 26;
		size = 26;
		chfreq = CHANNEL_2GHZ;
		chfreq = CHANNEL_2GHZ;
		break;
		break;
+0 −6
Original line number Original line Diff line number Diff line
@@ -49,7 +49,6 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah)


		/* Set supported modes */
		/* Set supported modes */
		__set_bit(AR5K_MODE_11A, ah->ah_capabilities.cap_mode);
		__set_bit(AR5K_MODE_11A, ah->ah_capabilities.cap_mode);
		__set_bit(AR5K_MODE_11A_TURBO, ah->ah_capabilities.cap_mode);
	} else {
	} else {
		/*
		/*
		 * XXX The tranceiver supports frequencies from 4920 to 6100GHz
		 * XXX The tranceiver supports frequencies from 4920 to 6100GHz
@@ -74,11 +73,6 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah)
			/* Set supported modes */
			/* Set supported modes */
			__set_bit(AR5K_MODE_11A,
			__set_bit(AR5K_MODE_11A,
					ah->ah_capabilities.cap_mode);
					ah->ah_capabilities.cap_mode);
			__set_bit(AR5K_MODE_11A_TURBO,
					ah->ah_capabilities.cap_mode);
			if (ah->ah_version == AR5K_AR5212)
				__set_bit(AR5K_MODE_11G_TURBO,
						ah->ah_capabilities.cap_mode);
		}
		}


		/* Enable  802.11b if a 2GHz capable radio (2111/5112) is
		/* Enable  802.11b if a 2GHz capable radio (2111/5112) is