rpms/kernel/devel git-iwlwifi.patch, 1.8, 1.9 kernel-2.6.spec, 1.3141, 1.3142

John W. Linville (linville) fedora-extras-commits at redhat.com
Tue May 8 00:53:55 UTC 2007


Author: linville

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10028

Modified Files:
	git-iwlwifi.patch kernel-2.6.spec 
Log Message:
some iwl3945 rate control fixes

git-iwlwifi.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.8 -r 1.9 git-iwlwifi.patch
Index: git-iwlwifi.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/git-iwlwifi.patch,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- git-iwlwifi.patch	4 May 2007 01:34:39 -0000	1.8
+++ git-iwlwifi.patch	8 May 2007 00:53:17 -0000	1.9
@@ -1,15777 +1,16121 @@
 rsync://www.intellinuxwireless.org/repos/iwlwifi.git
 
-commit 25af3bfe1eceacadf811b09c9db7155f7b88be85
+commit 7e788a8559862f74c07054851beb9b99ba721b16
 
---- /dev/null	2007-04-17 21:17:54.747954992 -0400
-+++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/base.c	2007-05-03 16:58:50.000000000 -0400
-@@ -0,0 +1,12282 @@
-+/******************************************************************************
+--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/Makefile.orig	2007-05-07 20:17:13.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/Makefile	2007-05-07 20:17:18.000000000 -0400
+@@ -4,3 +4,4 @@
+ obj-$(CONFIG_P54_COMMON)	+= p54/
+ obj-$(CONFIG_ZD1211RW_MAC80211)	+= zd1211rw/
+ obj-$(CONFIG_RTL818X)		+= rtl818x/
++obj-$(CONFIG_IWLWIFI)		+= iwlwifi/
+--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/Kconfig.orig	2007-05-07 20:17:13.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/Kconfig	2007-05-07 20:17:18.000000000 -0400
+@@ -4,3 +4,4 @@
+ source "drivers/net/wireless/mac80211/p54/Kconfig"
+ source "drivers/net/wireless/mac80211/zd1211rw/Kconfig"
+ source "drivers/net/wireless/mac80211/rtl818x/Kconfig"
++source "drivers/net/wireless/mac80211/iwlwifi/Kconfig"
+--- /dev/null	2007-05-07 18:42:05.734656575 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/Makefile	2007-05-07 20:17:18.000000000 -0400
+@@ -0,0 +1,15 @@
++# NOTE:  We use common code from base.c to build driver
++# specific binaries based on the #define IWL -- the target
++# setup below creates a specific driver target from base.c
++#
++# -jpk
 +
-+  Copyright(c) 2003 - 2007 Intel Corporation. All rights reserved.
++obj-$(CONFIG_IWL3945)	+= iwl3945.o
++iwl3945-objs		= base-3945.o iwl-3945.o iwl-3945-rs.o
++CFLAGS_iwl-3945-rs.o	= -DIWL=3945
++CFLAGS_iwl-3945.o	= -DIWL=3945
++CFLAGS_base-3945.o	= -DIWL=3945 -D"KBUILD_MODNAME=KBUILD_STR(iwl3945)"
++$(obj)/base-3945.o: $(src)/base.c FORCE
++	$(call cmd,force_checksrc)
++	$(call if_changed_rule,cc_o_c)
 +
-+  Portions of this file are derived from the ipw3945 project, as well
-+  as portions of the ieee80211 subsystem header files.
+--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-eeprom.h.orig	2007-05-07 20:17:13.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-eeprom.h	2007-05-07 20:17:18.000000000 -0400
+@@ -0,0 +1,320 @@
++/*
++  This file is provided under a dual BSD/GPLv2 license.  When using or
++  redistributing this file, you may do so under either license.
 +
-+  This program is free software; you can redistribute it and/or modify it
-+  under the terms of version 2 of the GNU General Public License as
-+  published by the Free Software Foundation.
++  GPL LICENSE SUMMARY
 +
-+  This program is distributed in the hope that it will be useful, but WITHOUT
-+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+  more details.
++  Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved.
 +
-+  You should have received a copy of the GNU General Public License along with
-+  this program; if not, write to the Free Software Foundation, Inc.,
-+  51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
++  This program is free software; you can redistribute it and/or modify
++  it under the terms of version 2 of the GNU Geeral Public License as
++  published by the Free Software Foundation.
 +
-+  The full GNU General Public License is included in this distribution in the
-+  file called LICENSE.
++  This program is distributed in the hope that it will be useful, but
++  WITHOUT ANY WARRANTY; without even the implied warranty of
++  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++  General Public License for more details.
++
++  You should have received a copy of the GNU General Public License
++  along with this program; if not, write to the Free Software
++  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
++  USA
++
++  The full GNU General Public License is included in this distribution
++  in the file called LICENSE.GPL.
 +
 +  Contact Information:
 +  James P. Ketrenos <ipw2100-admin at linux.intel.com>
 +  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 +
-+******************************************************************************/
++  BSD LICENSE
 +
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/version.h>
-+#include <linux/init.h>
-+#include <linux/pci.h>
-+#include <linux/dma-mapping.h>
-+#include <linux/delay.h>
-+#include <linux/skbuff.h>
-+#include <linux/netdevice.h>
-+#include <linux/wireless.h>
-+#include <linux/firmware.h>
-+#include <net/iw_handler.h>
++  Copyright(c) 2005 - 2006 Intel Corporation. All rights reserved.
++  All rights reserved.
 +
-+#include <net/mac80211.h>
-+#include <net/ieee80211.h>
++  Redistribution and use in source and binary forms, with or without
++  modification, are permitted provided that the following conditions
++  are met:
++
++    * Redistributions of source code must retain the above copyright
++      notice, this list of conditions and the following disclaimer.
++    * Redistributions in binary form must reproduce the above copyright
++      notice, this list of conditions and the following disclaimer in
++      the documentation and/or other materials provided with the
++      distribution.
++    * Neither the name Intel Corporation nor the names of its
++      contributors may be used to endorse or promote products derived
++      from this software without specific prior written permission.
++
++  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 +
-+#include <../net/mac80211/ieee80211_rate.h>
++*/
++#ifndef __iwl_eeprom_h__
++#define __iwl_eeprom_h__
 +
-+#ifndef ETH_P_80211_RAW
-+#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
-+#endif
++/* EEPROM field values */
++#define ANTENNA_SWITCH_NORMAL     0
++#define ANTENNA_SWITCH_INVERSE    1
 +
-+#include <linux/if_arp.h>
-+#include <asm/div64.h>
++enum {
++	EEPROM_CHANNEL_VALID = (1 << 0),	/* usable for this SKU/geo */
++	EEPROM_CHANNEL_IBSS = (1 << 1),	/* usable as an IBSS channel */
++	/* Bit 2 Reserved */
++	EEPROM_CHANNEL_ACTIVE = (1 << 3),	/* active scanning allowed */
++	EEPROM_CHANNEL_RADAR = (1 << 4),	/* radar detection required */
++	EEPROM_CHANNEL_WIDE = (1 << 5),
++	EEPROM_CHANNEL_NARROW = (1 << 6),
++	EEPROM_CHANNEL_DFS = (1 << 7),	/* dynamic freq selection candidate */
++};
 +
-+#include "iwlwifi.h"
-+#include "iwl-3945-rs.h"
++/* EEPROM field lengths */
++#define EEPROM_BOARD_PBA_NUMBER_LENGTH                  11
++
++/* EEPROM field lengths */
++#define EEPROM_BOARD_PBA_NUMBER_LENGTH                  11
++#define EEPROM_REGULATORY_SKU_ID_LENGTH                 4
++#define EEPROM_REGULATORY_BAND1_CHANNELS_LENGTH         14
++#define EEPROM_REGULATORY_BAND2_CHANNELS_LENGTH         13
++#define EEPROM_REGULATORY_BAND3_CHANNELS_LENGTH         12
++#define EEPROM_REGULATORY_BAND4_CHANNELS_LENGTH         11
++#define EEPROM_REGULATORY_BAND5_CHANNELS_LENGTH         6
 +
 +#if IWL == 3945
-+#define DRV_DESCRIPTION	\
-+"Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux"
++#define EEPROM_REGULATORY_CHANNELS_LENGTH ( \
++        EEPROM_REGULATORY_BAND1_CHANNELS_LENGTH +\
++        EEPROM_REGULATORY_BAND2_CHANNELS_LENGTH +\
++        EEPROM_REGULATORY_BAND3_CHANNELS_LENGTH +\
++        EEPROM_REGULATORY_BAND4_CHANNELS_LENGTH +\
++        EEPROM_REGULATORY_BAND5_CHANNELS_LENGTH)
 +#elif IWL == 4965
-+#define DRV_DESCRIPTION	\
-+"Intel(R) Wireless WiFi Link 4965AGN driver for Linux"
-+#else
-+BUILD_BUG()
++#define EEPROM_REGULATORY_BAND_24_FAT_CHANNELS_LENGTH 7
++#define EEPROM_REGULATORY_BAND_52_FAT_CHANNELS_LENGTH 11
++#define EEPROM_REGULATORY_CHANNELS_LENGTH ( \
++        EEPROM_REGULATORY_BAND1_CHANNELS_LENGTH +\
[...29563 lines suppressed...]
 +
-+	if (likely(rs_priv->lq_mngr.next_lower_rate)) {
-+		low = index;
-+		while (low != IPW_INVALID_RATE) {
-+			low = rs_priv->lq_mngr.next_lower_rate[low];
-+			if (low == IPW_INVALID_RATE)
-+				break;
-+			if (rate_mask & (1 << low)) 
-+				break;
-+
-+			IPW_DEBUG_RATE("Skipping non supported low "
-+				       "rate %d\n", high);
-+		}
++	low = index;
++	while (low != IPW_RATE_INVALID) {
++		if (rs_priv->lq_mngr.tgg)
++			low = ipw_rates[low].prev_rs_tgg;
++		else
++			low = ipw_rates[low].prev_rs;
++		if (low == IPW_RATE_INVALID)
++			break;
++		if (rate_mask & (1 << low)) 
++			break;
++		IPW_DEBUG_RATE("Skipping masked lower rate: %d\n", low);
 +	}
 +
-+	if (likely(rs_priv->lq_mngr.next_higher_rate)) {
-+		high = index;
-+		while (high != IPW_INVALID_RATE) {
-+			high = rs_priv->lq_mngr.next_higher_rate[high];
-+			if (high == IPW_INVALID_RATE)
-+				break;
-+			if (rate_mask & (1 << high)) 
-+				break;
-+			
-+			IPW_DEBUG_RATE("Skipping non supported high "
-+				       "rate %d\n", high);
-+		}
++	high = index;
++	while (high != IPW_RATE_INVALID) {
++		if (rs_priv->lq_mngr.tgg)
++			high = ipw_rates[high].next_rs_tgg;
++		else
++			high = ipw_rates[high].next_rs;
++		if (high == IPW_RATE_INVALID)
++			break;
++		if (rate_mask & (1 << high)) 
++			break;
++		IPW_DEBUG_RATE("Skipping masked higher rate: %d\n", high);
 +	}
 +
 +	return (high << 8) | low;
 +}
 +
 +/*
-+  find the highest available rate for REPLY_TX command.
++ * find the highest available rate for REPLY_TX command.
 +*/
 +static struct ieee80211_rate *rs_get_rate(void *priv_rate,
 +					  struct net_device *dev,
 +					  struct sk_buff *skb,
 +					  struct rate_control_extra *extra)
 +{
-+	u8 low = IPW_INVALID_RATE;
-+	u8 high = IPW_INVALID_RATE;
++	u8 low = IPW_RATE_INVALID;
++	u8 high = IPW_RATE_INVALID;
 +	u16 high_low;
 +	int index;
 +	struct ipw_rate_scale_priv *rs_priv;
@@ -16599,25 +16956,23 @@
 +	}
 +
 +	rate_mask = sta->supp_rates;
-+	index = min(sta->txrate & 0xffff, IPW_MAX_RATES - 1);
++	index = min(sta->txrate & 0xffff, IPW_RATE_COUNT - 1);
 +	
 +	rs_priv = (void *)sta->rate_ctrl_priv;
 +
 +	spin_lock_irqsave(&rs_priv->lq_mngr.lock, flags);
 +
-+	if (rs_priv->start_rate != IPW_INVALID_RATE) {
++	if (rs_priv->start_rate != IPW_RATE_INVALID) {
 +		index = rs_priv->start_rate;
-+		rs_priv->start_rate = IPW_INVALID_RATE;
++		rs_priv->start_rate = IPW_RATE_INVALID;
 +	}
 +
 +	window = &(rs_priv->win[index]);
 +
 +	fail_count = window->counter - window->success_counter;
 +
-+	if (((fail_count <= IPW_RATE_SCALE_MIN_FAILURE_TH) &&
-+	     (window->success_counter < IPW_RATE_SCALE_MIN_SUCCESS_TH))
-+	    || (rs_priv->lq_mngr.expected_tpt == NULL)) {
-+
++	if (((fail_count <= IPW_RATE_MIN_FAILURE_TH) &&
++	     (window->success_counter < IPW_RATE_MIN_SUCCESS_TH))) {
 +		window->average_tpt = IPW_INVALID_VALUE;
 +		spin_unlock_irqrestore(&rs_priv->lq_mngr.lock, flags);
 +
@@ -16635,25 +16990,24 @@
 +	window->average_tpt = ((window->success_ratio *
 +				rs_priv->lq_mngr.
 +				expected_tpt[index] + 64) / 128);
++	current_tpt = window->average_tpt;
 +
 +	high_low = ipw_get_adjacent_rate(rs_priv, index, rate_mask, 
 +					 local->hw.conf.phymode);
 +	low = high_low & 0xff;
 +	high = (high_low >> 8) & 0xff;
 +
-+	current_tpt = window->average_tpt;
-+
-+	if (low  != IPW_INVALID_RATE) 
++	if (low  != IPW_RATE_INVALID) 
 +		low_tpt = rs_priv->win[low].average_tpt;
 +
-+	if (high != IPW_INVALID_RATE)
++	if (high != IPW_RATE_INVALID)
 +		high_tpt = rs_priv->win[high].average_tpt;
 +
 +	spin_unlock_irqrestore(&rs_priv->lq_mngr.lock, flags);
 +
 +	scale_action = 1;
 +
-+	if ((window->success_ratio < IPW_RATE_SCALE_DECREASE_TH) ||
++	if ((window->success_ratio < IPW_RATE_DECREASE_TH) ||
 +	    !current_tpt) {
 +		IPW_DEBUG_RATE("decrease rate because of low success_ratio\n");
 +		scale_action = -1;
@@ -16687,23 +17041,23 @@
 +		}
 +	}
 +
-+	if ((window->success_ratio > IPW_RATE_SCALE_HIGH_TH) ||
-+	    (current_tpt > (128 * window->average_tpt))) {
++	if ((window->success_ratio > IPW_RATE_HIGH_TH) ||
++	    (current_tpt > window->average_tpt)) {
 +		IPW_DEBUG_RATE("No action -- success_ratio [%d] > HIGH_TH or "
 +			       "current_tpt [%d] > average_tpt [%d]\n",
 +			       window->success_ratio,
-+			       current_tpt, 128 * window->average_tpt);
++			       current_tpt, window->average_tpt);
 +		scale_action = 0;
 +	}
 +
 +	switch (scale_action) {
 +	case -1:
-+		if (low != IPW_INVALID_RATE)
++		if (low != IPW_RATE_INVALID)
 +			index = low;
 +		break;
 +
 +	case 1:
-+		if (high != IPW_INVALID_RATE)
++		if (high != IPW_RATE_INVALID)
 +			index = high;
 +
 +		break;
@@ -16726,8 +17080,6 @@
 +	return &priv->ieee_rates[index];
 +}
 +
-+
-+static char* rs_name = "iwlwifi rate-scale";
 +extern void ipw_set_rate_scale_handlers(struct rate_control_ops *rs_ops)
 +{
 +	rs_ops->module = NULL;
@@ -16741,30 +17093,3 @@
 +	rs_ops->alloc_sta = rs_alloc_sta;
 +	rs_ops->free_sta = rs_free_sta;
 +}
---- linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-3945.c.orig	2007-05-03 16:59:03.000000000 -0400
-+++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-3945.c	2007-05-03 16:58:50.000000000 -0400
-@@ -0,0 +1,10 @@
-+/**
-+ * NOTE
-+ *
-+ * This file is a temporary place holder to get the build system working
-+ */
-+
-+void foo(void)
-+{
-+}
-+
---- linux-2.6.21.noarch/drivers/net/wireless/mac80211/Makefile.orig	2007-05-03 16:58:24.000000000 -0400
-+++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/Makefile	2007-05-03 16:58:32.000000000 -0400
-@@ -4,3 +4,4 @@ obj-$(CONFIG_ADM8211)		+= adm8211/
- obj-$(CONFIG_P54_COMMON)	+= p54/
- obj-$(CONFIG_ZD1211RW_MAC80211)	+= zd1211rw/
- obj-$(CONFIG_RTL818X)		+= rtl818x/
-+obj-$(CONFIG_IWLWIFI)		+= iwlwifi/
---- linux-2.6.21.noarch/drivers/net/wireless/mac80211/Kconfig.orig	2007-05-03 16:58:24.000000000 -0400
-+++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/Kconfig	2007-05-03 16:58:32.000000000 -0400
-@@ -4,3 +4,4 @@ source "drivers/net/wireless/mac80211/ad
- source "drivers/net/wireless/mac80211/p54/Kconfig"
- source "drivers/net/wireless/mac80211/zd1211rw/Kconfig"
- source "drivers/net/wireless/mac80211/rtl818x/Kconfig"
-+source "drivers/net/wireless/mac80211/iwlwifi/Kconfig"


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3141
retrieving revision 1.3142
diff -u -r1.3141 -r1.3142
--- kernel-2.6.spec	6 May 2007 00:20:56 -0000	1.3141
+++ kernel-2.6.spec	8 May 2007 00:53:17 -0000	1.3142
@@ -2306,6 +2306,9 @@
 %endif
 
 %changelog
+* Mon May 07 2007 John W. Linville <linville at tuxdriver.com>
+- Some iwl3945 updates related to rate control
+
 * Sat May 05 2007 John W. Linville <linville at tuxdriver.com>
 - Remove rt2x00 locking "fix" (which doesn't work)
 




More information about the fedora-extras-commits mailing list