rpms/kernel/F-8 kernel.spec, 1.251.2.1, 1.251.2.2 linux-2.6-ath5k-fixes.patch, 1.4.2.1, 1.4.2.2 linux-2.6-ath5k.patch, 1.5.6.1, 1.5.6.2

John W. Linville (linville) fedora-extras-commits at redhat.com
Fri Nov 2 23:10:44 UTC 2007


Author: linville

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5077

Modified Files:
      Tag: private-linville-wl-f8-branch
	kernel.spec linux-2.6-ath5k-fixes.patch linux-2.6-ath5k.patch 
Log Message:
ath5k updates


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.251.2.1
retrieving revision 1.251.2.2
diff -u -r1.251.2.1 -r1.251.2.2
--- kernel.spec	31 Oct 2007 18:27:02 -0000	1.251.2.1
+++ kernel.spec	2 Nov 2007 23:10:05 -0000	1.251.2.2
@@ -13,7 +13,7 @@
 # by setting the define to ".local" or ".bz123456"
 #
 #% define buildid .local
-%define buildid 42.wl.1
+%define buildid 42.wl.2
 
 # fedora_build defines which build revision of this kernel version we're
 # building. Rather than incrementing forever, as with the prior versioning

linux-2.6-ath5k-fixes.patch:

Index: linux-2.6-ath5k-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/linux-2.6-ath5k-fixes.patch,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -r1.4.2.1 -r1.4.2.2
--- linux-2.6-ath5k-fixes.patch	31 Oct 2007 18:27:02 -0000	1.4.2.1
+++ linux-2.6-ath5k-fixes.patch	2 Nov 2007 23:10:05 -0000	1.4.2.2
@@ -21,13 +21,3 @@
  
  	/* Get rate tables */
  	switch (mode) {
-@@ -695,8 +705,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, 
- 
- 				/* Get rate table for this operation mode */
- 				rt = ath5k_hw_get_rate_table(ah,
--				    channel->val & CHANNEL_TURBO ?
--				    MODE_ATHEROS_TURBO : MODE_ATHEROS_TURBOG);
-+						MODE_IEEE80211G);
- 				if (!rt)
- 					return -EINVAL;
- 

linux-2.6-ath5k.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.5.6.1 -r 1.5.6.2 linux-2.6-ath5k.patch
Index: linux-2.6-ath5k.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/linux-2.6-ath5k.patch,v
retrieving revision 1.5.6.1
retrieving revision 1.5.6.2
diff -u -r1.5.6.1 -r1.5.6.2
--- linux-2.6-ath5k.patch	31 Oct 2007 18:27:02 -0000	1.5.6.1
+++ linux-2.6-ath5k.patch	2 Nov 2007 23:10:05 -0000	1.5.6.2
@@ -1,6 +1,6 @@
 diff -up linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.23.noarch/drivers/net/wireless/Kconfig
---- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig	2007-10-25 23:30:33.000000000 -0400
-+++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig	2007-10-25 23:31:22.000000000 -0400
+--- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig	2007-11-02 19:03:18.000000000 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig	2007-11-02 19:04:35.000000000 -0400
 @@ -598,6 +598,19 @@ config P54_PCI
  	tristate "Prism54 PCI support"
  	depends on P54_COMMON && PCI
@@ -22,17 +22,17 @@
  source "drivers/net/wireless/bcm43xx/Kconfig"
  source "drivers/net/wireless/b43/Kconfig"
 diff -up linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig linux-2.6.23.noarch/drivers/net/wireless/Makefile
---- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig	2007-10-25 23:30:33.000000000 -0400
-+++ linux-2.6.23.noarch/drivers/net/wireless/Makefile	2007-10-25 23:30:55.000000000 -0400
-@@ -62,3 +62,5 @@ obj-$(CONFIG_RT2X00)		+= rt2x00/
+--- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig	2007-11-02 19:03:18.000000000 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/Makefile	2007-11-02 19:03:56.000000000 -0400
+@@ -63,3 +63,5 @@ obj-$(CONFIG_RT2X00)		+= rt2x00/
  obj-$(CONFIG_P54_COMMON)	+= p54common.o
  obj-$(CONFIG_P54_USB)		+= p54usb.o
  obj-$(CONFIG_P54_PCI)		+= p54pci.o
 +
 +obj-$(CONFIG_ATH5K)	+= ath5k/
 diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/ath5k/initvals.c
---- /dev/null	2007-10-19 08:28:46.917288885 -0400
-+++ linux-2.6.23.noarch/drivers/net/wireless/ath5k/initvals.c	2007-10-25 23:30:55.000000000 -0400
+--- /dev/null	2007-10-26 17:27:29.928203379 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/ath5k/initvals.c	2007-11-02 19:03:56.000000000 -0400
 @@ -0,0 +1,1102 @@
 +/*
 + * Initial register settings functions
@@ -1137,9 +1137,9 @@
 +	return 0;
 +}
 diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/ath5k/hw.c
---- /dev/null	2007-10-19 08:28:46.917288885 -0400
-+++ linux-2.6.23.noarch/drivers/net/wireless/ath5k/hw.c	2007-10-25 23:30:55.000000000 -0400
-@@ -0,0 +1,4416 @@
+--- /dev/null	2007-10-26 17:27:29.928203379 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/ath5k/hw.c	2007-11-02 19:03:56.000000000 -0400
+@@ -0,0 +1,4376 @@
 + /*
 + * Copyright (c) 2004-2007 Reyk Floeter <reyk at openbsd.org>
 + * Copyright (c) 2006-2007 Nick Kossifidis <mickflemm at gmail.com>
@@ -1169,8 +1169,8 @@
 +#include <linux/pci.h>
 +#include <linux/delay.h>
 +
-+#include "ath5k.h"
 +#include "reg.h"
++#include "base.h"
 +
 +/*Rate tables*/
 +static const struct ath5k_rate_table ath5k_rt_11a = AR5K_RATES_11A;
@@ -1189,15 +1189,11 @@
 +static bool ath5k_hw_setup_xr_tx_desc(struct ath5k_hw *, struct ath5k_desc *,
 +	unsigned int, unsigned int, unsigned int, unsigned int, unsigned int,
 +	unsigned int);
-+static int ath5k_hw_fill_4word_tx_desc(struct ath5k_hw *, struct ath5k_desc *,
-+	unsigned int, bool, bool);
 +static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *, struct ath5k_desc *);
 +static int ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *, struct ath5k_desc *,
 +	unsigned int, unsigned int, enum ath5k_pkt_type, unsigned int,
 +	unsigned int, unsigned int, unsigned int, unsigned int, unsigned int,
 +	unsigned int, unsigned int);
-+static int ath5k_hw_fill_2word_tx_desc(struct ath5k_hw *, struct ath5k_desc *,
-+	unsigned int, bool, bool);
 +static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *, struct ath5k_desc *);
 +static int ath5k_hw_proc_new_rx_status(struct ath5k_hw *, struct ath5k_desc *);
 +static int ath5k_hw_proc_old_rx_status(struct ath5k_hw *, struct ath5k_desc *);
@@ -1220,76 +1216,6 @@
 +  General Functions
 +\*******************/
 +
-+
-+/*
-+ * Calculate transmition time of a frame
-+ * TODO: Left here for combatibility, change it in ath5k
-+ */
-+static u16 /*TODO: Is this really hardware dependent ?*/
-+ath5k_computetxtime(struct ath5k_hw *ah, const struct ath5k_rate_table *rates,
-+		u32 frame_length, u16 rate_index, bool short_preamble)
-+{
-+	const struct ath5k_rate *rate;
-+	u32 value;
-+
-+	AR5K_ASSERT_ENTRY(rate_index, rates->rate_count);
-+
-+	/*
-+	 * Get rate by index
-+	 */
-+	rate = &rates->rates[rate_index];
-+
-+	/*
-+	 * Calculate the transmission time by operation (PHY) mode
-+	 */
-+	switch (rate->modulation) {
-+	/* Standard rates */
-+	case IEEE80211_RATE_CCK:
-+		/*
-+		 * CCK / DS mode (802.11b)
-+		 */
-+		value = AR5K_CCK_TX_TIME(rate->rate_kbps, frame_length,
-+			short_preamble &&
-+			rate->modulation == IEEE80211_RATE_CCK_2);
-+		break;
-+
-+	case IEEE80211_RATE_OFDM:
-+		/*
-+		 * Orthogonal Frequency Division Multiplexing
-+		 */
-+		if (AR5K_OFDM_NUM_BITS_PER_SYM(rate->rate_kbps) == 0)
-+			return 0;
-+		value = AR5K_OFDM_TX_TIME(rate->rate_kbps, frame_length);
-+		break;
-+
-+	/* Vendor-specific rates */
-+	case MODULATION_TURBO:
-+		/*
-+		 * Orthogonal Frequency Division Multiplexing
-+		 * Atheros "Turbo Mode" (doubled rates)
-+		 */
-+		if (AR5K_TURBO_NUM_BITS_PER_SYM(rate->rate_kbps) == 0)
-+			return 0;
-+		value = AR5K_TURBO_TX_TIME(rate->rate_kbps, frame_length);
-+		break;
-+
-+	case MODULATION_XR:
-+		/*
-+		 * Orthogonal Frequency Division Multiplexing
-+		 * Atheros "eXtended Range" (XR)
-+		 */
-+		if (AR5K_XR_NUM_BITS_PER_SYM(rate->rate_kbps) == 0)
-+			return 0;
-+		value = AR5K_XR_TX_TIME(rate->rate_kbps, frame_length);
-+		break;
-+
-+	default:
-+		return 0;
-+	}
-+
-+	return value;
-+}
-+
 +/*
 + * Functions used internaly
 + */
@@ -1333,8 +1259,7 @@
 +/*
 + * Check if the device is supported and initialize the needed structs
 + */
-+struct ath5k_hw *ath5k_hw_attach(u16 device, u8 mac_version, void *sc,
-+		void __iomem *sh)
++struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
 +{
 +	struct ath5k_hw *ah;
 +	u8 mac[ETH_ALEN];
@@ -1350,7 +1275,7 @@
 +	}
 +
 +	ah->ah_sc = sc;
-+	ah->ah_sh = sh;
++	ah->ah_iobase = sc->iobase;
 +
 +	/*
 +	 * HW information
@@ -1371,23 +1296,6 @@
 +	ah->ah_software_retry = false;
 +	ah->ah_ant_diversity = AR5K_TUNE_ANT_DIVERSITY;
 +
-+	switch (device) {
-+	case PCI_DEVICE_ID_ATHEROS_AR2413:
-+	case PCI_DEVICE_ID_ATHEROS_AR5413:
-+	case PCI_DEVICE_ID_ATHEROS_AR5424:
-+		/*
-+		 * Known single chip solutions
-+		 */
-+		ah->ah_single_chip = true;
-+		break;
-+	default:
-+		/*
-+		 * Multi chip solutions
-+		 */
-+		ah->ah_single_chip = false;
-+		break;
-+	}
-+
 +	/*
 +	 * Set the mac revision based on the pci id
 +	 */
@@ -1402,12 +1310,10 @@
[...5432 lines suppressed...]
-+#define AR5K_CCK_PREAMBLE_BITS		144
-+#define AR5K_CCK_PLCP_BITS		48
-+
-+#define AR5K_OFDM_SIFS_TIME		16
-+#define AR5K_OFDM_PREAMBLE_TIME		20
-+#define AR5K_OFDM_PLCP_BITS		22
-+#define AR5K_OFDM_SYMBOL_TIME		4
-+
-+#define AR5K_TURBO_SIFS_TIME		8
-+#define AR5K_TURBO_PREAMBLE_TIME	14
-+#define AR5K_TURBO_PLCP_BITS		22
-+#define AR5K_TURBO_SYMBOL_TIME		4
-+
-+#define AR5K_XR_SIFS_TIME		16
-+#define AR5K_XR_PLCP_BITS		22
-+#define AR5K_XR_SYMBOL_TIME		4
-+
-+/* CCK */
-+#define AR5K_CCK_NUM_BITS(_frmlen) (_frmlen << 3)
-+
-+#define AR5K_CCK_PHY_TIME(_sp) (_sp ?					\
-+	((AR5K_CCK_PREAMBLE_BITS + AR5K_CCK_PLCP_BITS) >> 1) :		\
-+	(AR5K_CCK_PREAMBLE_BITS + AR5K_CCK_PLCP_BITS))
-+
-+#define AR5K_CCK_TX_TIME(_kbps, _frmlen, _sp)				\
-+	(AR5K_CCK_PHY_TIME(_sp) +					\
-+	((AR5K_CCK_NUM_BITS(_frmlen) * 1000) / _kbps) +			\
-+	AR5K_CCK_SIFS_TIME)
-+
-+/* OFDM */
-+#define AR5K_OFDM_NUM_BITS(_frmlen) (AR5K_OFDM_PLCP_BITS + (_frmlen << 3))
-+
-+#define AR5K_OFDM_NUM_BITS_PER_SYM(_kbps) ((_kbps *			\
-+	AR5K_OFDM_SYMBOL_TIME) / 1000)
-+
-+#define AR5K_OFDM_NUM_BITS(_frmlen) (AR5K_OFDM_PLCP_BITS + (_frmlen << 3))
-+
-+#define AR5K_OFDM_NUM_SYMBOLS(_kbps, _frmlen)				\
-+	DIV_ROUND_UP(AR5K_OFDM_NUM_BITS(_frmlen),			\
-+			AR5K_OFDM_NUM_BITS_PER_SYM(_kbps))
-+
-+#define AR5K_OFDM_TX_TIME(_kbps, _frmlen)				\
-+	(AR5K_OFDM_PREAMBLE_TIME + AR5K_OFDM_SIFS_TIME +		\
-+	(AR5K_OFDM_NUM_SYMBOLS(_kbps, _frmlen) * AR5K_OFDM_SYMBOL_TIME))
-+
-+/* TURBO */
-+#define AR5K_TURBO_NUM_BITS(_frmlen) (AR5K_TURBO_PLCP_BITS + (_frmlen << 3))
-+
-+#define AR5K_TURBO_NUM_BITS_PER_SYM(_kbps) (((_kbps << 1) *		\
-+	AR5K_TURBO_SYMBOL_TIME) / 1000)
-+
-+#define AR5K_TURBO_NUM_BITS(_frmlen) (AR5K_TURBO_PLCP_BITS + (_frmlen << 3))
-+
-+#define AR5K_TURBO_NUM_SYMBOLS(_kbps, _frmlen)				\
-+	DIV_ROUND_UP(AR5K_TURBO_NUM_BITS(_frmlen),			\
-+			AR5K_TURBO_NUM_BITS_PER_SYM(_kbps))
-+
-+#define AR5K_TURBO_TX_TIME(_kbps, _frmlen)				\
-+	(AR5K_TURBO_PREAMBLE_TIME + AR5K_TURBO_SIFS_TIME +		\
-+	(AR5K_TURBO_NUM_SYMBOLS(_kbps, _frmlen) * AR5K_TURBO_SYMBOL_TIME))
-+
-+/* eXtendent Range (?)*/
-+#define AR5K_XR_PREAMBLE_TIME(_kbps) (((_kbps) < 1000) ? 173 : 76)
-+
-+#define AR5K_XR_NUM_BITS_PER_SYM(_kbps) ((_kbps *			\
-+	AR5K_XR_SYMBOL_TIME) / 1000)
-+
-+#define AR5K_XR_NUM_BITS(_frmlen) (AR5K_XR_PLCP_BITS + (_frmlen << 3))
-+
-+#define AR5K_XR_NUM_SYMBOLS(_kbps, _frmlen)				\
-+	DIV_ROUND_UP(AR5K_XR_NUM_BITS(_frmlen), AR5K_XR_NUM_BITS_PER_SYM(_kbps))
-+
-+#define AR5K_XR_TX_TIME(_kbps, _frmlen)					\
-+	(AR5K_XR_PREAMBLE_TIME(_kbps) + AR5K_XR_SIFS_TIME +		\
-+	(AR5K_XR_NUM_SYMBOLS(_kbps, _frmlen) * AR5K_XR_SYMBOL_TIME))
-+
-+/*
 + * DMA size definitions (2^n+2)
 + */
 +enum ath5k_dmasize {
@@ -13878,17 +14071,60 @@
 + * 	 used by the rate control algorytm on MadWiFi.
 + */
 +
-+#define AR5K_MAX_RATES	32 /*max number of rates on the rate table*/
++/* Max number of rates on the rate table and what it seems
++ * Atheros hardware supports */
++#define AR5K_MAX_RATES 32
 +
++/**
++ * struct ath5k_rate - rate structure
++ * @valid: is this a valid rate for the current mode
++ * @modulation: respective mac80211 modulation
++ * @rate_kbps: rate in kbit/s
++ * @rate_code: hardware rate value, used in &struct ath5k_desc, on RX on
++ *     &struct ath5k_rx_status.rs_rate and on TX on
++ *     &struct ath5k_tx_status.ts_rate. Seems the ar5xxx harware supports
++ *     up to 32 rates, indexed by 1-32. This means we really only need
++ *     6 bits for the rate_code.
++ * @dot11_rate: respective IEEE-802.11 rate value
++ * @control_rate: index of rate assumed to be used to send control frames.
++ *     This can be used to set override the value on the rate duration
++ *     registers. This is only useful if we can override in the harware at
++ *     what rate we want to send control frames at. Note that IEEE-802.11
++ *     Ch. 9.6 (after IEEE 802.11g changes) defines the rate at which we
++ *     should send ACK/CTS, if we change this value we can be breaking
++ *     the spec.
++ *
++ * This structure is used to get the RX rate or set the TX rate on the
++ * hardware descriptors. It is also used for internal modulation control
++ * and settings.
++ *
++ * On RX after the &struct ath5k_desc is parsed by the appropriate
++ * ah_proc_rx_desc() the respective hardware rate value is set in
++ * &struct ath5k_rx_status.rs_rate. On TX the desired rate is set in
++ * &struct ath5k_tx_status.ts_rate which is later used to setup the
++ * &struct ath5k_desc correctly. This is the hardware rate map we are
++ * aware of:
++ *
++ * rate_code   1       2       3       4       5       6       7       8
++ * rate_kbps   3000    1000    ?       ?       ?       2000    500     48000
++ *
++ * rate_code   9       10      11      12      13      14      15      16
++ * rate_kbps   24000   12000   6000    54000   36000   18000   9000    ?
++ *
++ * rate_code   17      18      19      20      21      22      23      24
++ * rate_kbps   ?       ?       ?       ?       ?       ?       ?       11000
++ *
++ * rate_code   25      26      27      28      29      30      31      32
++ * rate_kbps   5500    2000    1000    ?       ?       ?       ?       ?
++ *
++ */
 +struct ath5k_rate {
-+	u8	valid;		/* Valid for rate control */
++	u8	valid;
 +	u32	modulation;
-+	u16	rate_kbps;	/* Rate in kbps used in computetxtime */
-+	u8	rate_code;	/* Rate mapping for h/w descriptors */
++	u16	rate_kbps;
++	u8	rate_code;
 +	u8	dot11_rate;
-+	u8	control_rate;	/* Rate for management frames -not used */
-+	u16	lp_ack_duration;/* long preamble ACK duration -not used */
-+	u16	sp_ack_duration;/* short preamble ACK duration -not used */
++	u8	control_rate;
 +};
 +
 +/* XXX: GRR all this stuff to get leds blinking ??? (check out setcurmode) */
@@ -14200,8 +14436,8 @@
 +struct ath5k_hw {
 +	u32			ah_magic;
 +
-+	void			*ah_sc;
-+	void __iomem		*ah_sh;
++	struct ath5k_softc	*ah_sc;
++	void __iomem		*ah_iobase;
 +
 +	enum ath5k_int		ah_imr;
 +
@@ -14288,8 +14524,6 @@
 +	bool (*ah_setup_xtx_desc)(struct ath5k_hw *, struct ath5k_desc *,
 +		unsigned int, unsigned int, unsigned int, unsigned int,
 +		unsigned int, unsigned int);
-+	int (*ah_fill_tx_desc)(struct ath5k_hw *, struct ath5k_desc *,
-+		unsigned int, bool, bool);
 +	int (*ah_proc_tx_desc)(struct ath5k_hw *, struct ath5k_desc *);
 +	int (*ah_proc_rx_desc)(struct ath5k_hw *, struct ath5k_desc *);
 +};
@@ -14301,7 +14535,7 @@
 +/* General Functions */
 +extern int ath5k_hw_register_timeout(struct ath5k_hw *ah, u32 reg, u32 flag, u32 val, bool is_set);
 +/* Attach/Detach Functions */
-+extern struct ath5k_hw *ath5k_hw_attach(u16 device, u8 mac_version, void *sc, void __iomem *sh);
++extern struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version);
 +extern const struct ath5k_rate_table *ath5k_hw_get_rate_table(struct ath5k_hw *ah, unsigned int mode);
 +extern void ath5k_hw_detach(struct ath5k_hw *ah);
 +/* Reset Functions */
@@ -14410,18 +14644,18 @@
 +
 +static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
 +{
-+	return ioread32(ah->ah_sh + reg);
++	return ioread32(ah->ah_iobase + reg);
 +}
 +
 +static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)
 +{
-+	iowrite32(val, ah->ah_sh + reg);
++	iowrite32(val, ah->ah_iobase + reg);
 +}
 +
 +#endif
 diff -up linux-2.6.23.noarch/MAINTAINERS.orig linux-2.6.23.noarch/MAINTAINERS
---- linux-2.6.23.noarch/MAINTAINERS.orig	2007-10-25 23:30:33.000000000 -0400
-+++ linux-2.6.23.noarch/MAINTAINERS	2007-10-25 23:30:55.000000000 -0400
+--- linux-2.6.23.noarch/MAINTAINERS.orig	2007-11-02 19:03:18.000000000 -0400
++++ linux-2.6.23.noarch/MAINTAINERS	2007-11-02 19:03:56.000000000 -0400
 @@ -642,6 +642,14 @@ M:	ecashin at coraid.com
  W:	http://www.coraid.com/support/linux
  S:	Supported




More information about the fedora-extras-commits mailing list