rpms/kernel/F-8 kernel.spec, 1.251.2.2, 1.251.2.3 linux-2.6-wireless-pending.patch, 1.11.2.3, 1.11.2.4

John W. Linville (linville) fedora-extras-commits at redhat.com
Tue Nov 6 00:51:31 UTC 2007


Author: linville

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

Modified Files:
      Tag: private-linville-wl-f8-branch
	kernel.spec linux-2.6-wireless-pending.patch 
Log Message:
driver updates


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.251.2.2
retrieving revision 1.251.2.3
diff -u -r1.251.2.2 -r1.251.2.3
--- kernel.spec	2 Nov 2007 23:10:05 -0000	1.251.2.2
+++ kernel.spec	6 Nov 2007 00:50:56 -0000	1.251.2.3
@@ -13,7 +13,7 @@
 # by setting the define to ".local" or ".bz123456"
 #
 #% define buildid .local
-%define buildid 42.wl.2
+%define buildid 42.wl.3
 
 # 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-wireless-pending.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.11.2.3 -r 1.11.2.4 linux-2.6-wireless-pending.patch
Index: linux-2.6-wireless-pending.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/Attic/linux-2.6-wireless-pending.patch,v
retrieving revision 1.11.2.3
retrieving revision 1.11.2.4
diff -u -r1.11.2.3 -r1.11.2.4
--- linux-2.6-wireless-pending.patch	29 Oct 2007 16:08:49 -0000	1.11.2.3
+++ linux-2.6-wireless-pending.patch	6 Nov 2007 00:50:56 -0000	1.11.2.4
@@ -1,6 +1,812 @@
+diff -up linux-2.6.23.noarch/drivers/net/wireless/atmel.c.orig linux-2.6.23.noarch/drivers/net/wireless/atmel.c
+--- linux-2.6.23.noarch/drivers/net/wireless/atmel.c.orig	2007-10-09 16:31:38.000000000 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/atmel.c	2007-11-05 19:34:43.000000000 -0500
+@@ -1761,7 +1761,7 @@ static int atmel_set_encode(struct net_d
+ 			priv->default_key = index;
+ 		} else
+ 			/* Don't complain if only change the mode */
+-			if (!dwrq->flags & IW_ENCODE_MODE) {
++			if (!(dwrq->flags & IW_ENCODE_MODE)) {
+ 				return -EINVAL;
+ 			}
+ 	}
+diff -up linux-2.6.23.noarch/drivers/net/wireless/p54pci.c.orig linux-2.6.23.noarch/drivers/net/wireless/p54pci.c
+--- linux-2.6.23.noarch/drivers/net/wireless/p54pci.c.orig	2007-11-05 19:31:54.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/p54pci.c	2007-11-05 19:34:43.000000000 -0500
+@@ -141,6 +141,7 @@ static irqreturn_t p54p_simple_interrupt
+ static int p54p_read_eeprom(struct ieee80211_hw *dev)
+ {
+ 	struct p54p_priv *priv = dev->priv;
++	struct p54p_ring_control *ring_control = priv->ring_control;
+ 	int err;
+ 	struct p54_control_hdr *hdr;
+ 	void *eeprom;
+@@ -164,7 +165,7 @@ static int p54p_read_eeprom(struct ieee8
+ 		goto out;
+ 	}
+ 
+-	memset(priv->ring_control, 0, sizeof(*priv->ring_control));
++	memset(ring_control, 0, sizeof(*ring_control));
+ 	P54P_WRITE(ring_control_base, priv->ring_control_dma);
+ 	P54P_READ(ring_control_base);
+ 	udelay(10);
+@@ -194,14 +195,14 @@ static int p54p_read_eeprom(struct ieee8
+ 	tx_mapping = pci_map_single(priv->pdev, (void *)hdr,
+ 				    EEPROM_READBACK_LEN, PCI_DMA_TODEVICE);
+ 
+-	priv->ring_control->rx_mgmt[0].host_addr = cpu_to_le32(rx_mapping);
+-	priv->ring_control->rx_mgmt[0].len = cpu_to_le16(0x2010);
+-	priv->ring_control->tx_data[0].host_addr = cpu_to_le32(tx_mapping);
+-	priv->ring_control->tx_data[0].device_addr = hdr->req_id;
+-	priv->ring_control->tx_data[0].len = cpu_to_le16(EEPROM_READBACK_LEN);
++	ring_control->rx_mgmt[0].host_addr = cpu_to_le32(rx_mapping);
++	ring_control->rx_mgmt[0].len = cpu_to_le16(0x2010);
++	ring_control->tx_data[0].host_addr = cpu_to_le32(tx_mapping);
++	ring_control->tx_data[0].device_addr = hdr->req_id;
++	ring_control->tx_data[0].len = cpu_to_le16(EEPROM_READBACK_LEN);
+ 
+-	priv->ring_control->host_idx[2] = cpu_to_le32(1);
+-	priv->ring_control->host_idx[1] = cpu_to_le32(1);
++	ring_control->host_idx[2] = cpu_to_le32(1);
++	ring_control->host_idx[1] = cpu_to_le32(1);
+ 
+ 	wmb();
+ 	mdelay(100);
+@@ -215,8 +216,8 @@ static int p54p_read_eeprom(struct ieee8
+ 	pci_unmap_single(priv->pdev, rx_mapping,
+ 			 0x2010, PCI_DMA_FROMDEVICE);
+ 
+-	alen = le16_to_cpu(priv->ring_control->rx_mgmt[0].len);
+-	if (le32_to_cpu(priv->ring_control->device_idx[2]) != 1 ||
++	alen = le16_to_cpu(ring_control->rx_mgmt[0].len);
++	if (le32_to_cpu(ring_control->device_idx[2]) != 1 ||
+ 	    alen < 0x10) {
+ 		printk(KERN_ERR "%s (prism54pci): Cannot read eeprom!\n",
+ 		       pci_name(priv->pdev));
+@@ -239,16 +240,17 @@ static int p54p_read_eeprom(struct ieee8
+ static void p54p_refill_rx_ring(struct ieee80211_hw *dev)
+ {
+ 	struct p54p_priv *priv = dev->priv;
++	struct p54p_ring_control *ring_control = priv->ring_control;
+ 	u32 limit, host_idx, idx;
+ 
+-	host_idx = le32_to_cpu(priv->ring_control->host_idx[0]);
++	host_idx = le32_to_cpu(ring_control->host_idx[0]);
+ 	limit = host_idx;
+-	limit -= le32_to_cpu(priv->ring_control->device_idx[0]);
+-	limit = ARRAY_SIZE(priv->ring_control->rx_data) - limit;
++	limit -= le32_to_cpu(ring_control->device_idx[0]);
++	limit = ARRAY_SIZE(ring_control->rx_data) - limit;
+ 
+-	idx = host_idx % ARRAY_SIZE(priv->ring_control->rx_data);
++	idx = host_idx % ARRAY_SIZE(ring_control->rx_data);
+ 	while (limit-- > 1) {
+-		struct p54p_desc *desc = &priv->ring_control->rx_data[idx];
++		struct p54p_desc *desc = &ring_control->rx_data[idx];
+ 
+ 		if (!desc->host_addr) {
+ 			struct sk_buff *skb;
+@@ -270,17 +272,18 @@ static void p54p_refill_rx_ring(struct i
+ 
+ 		idx++;
+ 		host_idx++;
+-		idx %= ARRAY_SIZE(priv->ring_control->rx_data);
++		idx %= ARRAY_SIZE(ring_control->rx_data);
+ 	}
+ 
+ 	wmb();
+-	priv->ring_control->host_idx[0] = cpu_to_le32(host_idx);
++	ring_control->host_idx[0] = cpu_to_le32(host_idx);
+ }
+ 
+ static irqreturn_t p54p_interrupt(int irq, void *dev_id)
+ {
+ 	struct ieee80211_hw *dev = dev_id;
+ 	struct p54p_priv *priv = dev->priv;
++	struct p54p_ring_control *ring_control = priv->ring_control;
+ 	__le32 reg;
+ 
+ 	spin_lock(&priv->lock);
+@@ -298,12 +301,12 @@ static irqreturn_t p54p_interrupt(int ir
+ 		struct p54p_desc *desc;
+ 		u32 idx, i;
+ 		i = priv->tx_idx;
+-		i %= ARRAY_SIZE(priv->ring_control->tx_data);
+-		priv->tx_idx = idx = le32_to_cpu(priv->ring_control->device_idx[1]);
+-		idx %= ARRAY_SIZE(priv->ring_control->tx_data);
++		i %= ARRAY_SIZE(ring_control->tx_data);
++		priv->tx_idx = idx = le32_to_cpu(ring_control->device_idx[1]);
++		idx %= ARRAY_SIZE(ring_control->tx_data);
+ 
+ 		while (i != idx) {
+-			desc = &priv->ring_control->tx_data[i];
++			desc = &ring_control->tx_data[i];
+ 			if (priv->tx_buf[i]) {
+ 				kfree(priv->tx_buf[i]);
+ 				priv->tx_buf[i] = NULL;
+@@ -318,17 +321,17 @@ static irqreturn_t p54p_interrupt(int ir
+ 			desc->flags = 0;
+ 
+ 			i++;
+-			i %= ARRAY_SIZE(priv->ring_control->tx_data);
++			i %= ARRAY_SIZE(ring_control->tx_data);
+ 		}
+ 
+ 		i = priv->rx_idx;
+-		i %= ARRAY_SIZE(priv->ring_control->rx_data);
+-		priv->rx_idx = idx = le32_to_cpu(priv->ring_control->device_idx[0]);
+-		idx %= ARRAY_SIZE(priv->ring_control->rx_data);
++		i %= ARRAY_SIZE(ring_control->rx_data);
++		priv->rx_idx = idx = le32_to_cpu(ring_control->device_idx[0]);
++		idx %= ARRAY_SIZE(ring_control->rx_data);
+ 		while (i != idx) {
+ 			u16 len;
+ 			struct sk_buff *skb;
+-			desc = &priv->ring_control->rx_data[i];
++			desc = &ring_control->rx_data[i];
+ 			len = le16_to_cpu(desc->len);
+ 			skb = priv->rx_buf[i];
+ 
+@@ -347,7 +350,7 @@ static irqreturn_t p54p_interrupt(int ir
+ 			}
+ 
+ 			i++;
+-			i %= ARRAY_SIZE(priv->ring_control->rx_data);
++			i %= ARRAY_SIZE(ring_control->rx_data);
+ 		}
+ 
+ 		p54p_refill_rx_ring(dev);
+@@ -366,6 +369,7 @@ static void p54p_tx(struct ieee80211_hw 
+ 		    size_t len, int free_on_tx)
+ {
+ 	struct p54p_priv *priv = dev->priv;
++	struct p54p_ring_control *ring_control = priv->ring_control;
+ 	unsigned long flags;
+ 	struct p54p_desc *desc;
+ 	dma_addr_t mapping;
+@@ -373,19 +377,19 @@ static void p54p_tx(struct ieee80211_hw 
+ 
+ 	spin_lock_irqsave(&priv->lock, flags);
+ 
+-	device_idx = le32_to_cpu(priv->ring_control->device_idx[1]);
+-	idx = le32_to_cpu(priv->ring_control->host_idx[1]);
+-	i = idx % ARRAY_SIZE(priv->ring_control->tx_data);
++	device_idx = le32_to_cpu(ring_control->device_idx[1]);
++	idx = le32_to_cpu(ring_control->host_idx[1]);
++	i = idx % ARRAY_SIZE(ring_control->tx_data);
+ 
+ 	mapping = pci_map_single(priv->pdev, data, len, PCI_DMA_TODEVICE);
+-	desc = &priv->ring_control->tx_data[i];
++	desc = &ring_control->tx_data[i];
+ 	desc->host_addr = cpu_to_le32(mapping);
+ 	desc->device_addr = data->req_id;
+ 	desc->len = cpu_to_le16(len);
+ 	desc->flags = 0;
+ 
+ 	wmb();
+-	priv->ring_control->host_idx[1] = cpu_to_le32(idx + 1);
++	ring_control->host_idx[1] = cpu_to_le32(idx + 1);
+ 
+ 	if (free_on_tx)
+ 		priv->tx_buf[i] = data;
[...4612 lines suppressed...]
++		iwe.u.data.flags = IW_ENCODE_DISABLED;
++	iwe.u.data.length = 0;
++	current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, bss->a.essid);
++
++	/* Add EXTRA: Age to display seconds since last beacon/probe response
++	 * for given network. */
++	iwe.cmd = IWEVCUSTOM;
++	p = custom;
++	p += snprintf(p, MAX_CUSTOM_LEN - (p - custom),
++		      " Last beacon: %dms ago",
++		      jiffies_to_msecs(jiffies - last_scanned));
++	iwe.u.data.length = p - custom;
++	if (iwe.u.data.length)
++		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom);
++
++	/* Bit rate is not available in Lucent/Agere firmwares */
++	if (priv->firmware_type != FIRMWARE_TYPE_AGERE) {
++		char *current_val = current_ev + IW_EV_LCP_LEN;
++		int i;
++		int step;
+ 
+-		/* Add encryption capability */
+-		iwe.cmd = SIOCGIWENCODE;
+-		if (capabilities & 0x10)
+-			iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
++		if (priv->firmware_type == FIRMWARE_TYPE_SYMBOL)
++			step = 2;
+ 		else
+-			iwe.u.data.flags = IW_ENCODE_DISABLED;
+-		iwe.u.data.length = 0;
+-		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, atom->a.essid);
+-
+-		/* Bit rate is not available in Lucent/Agere firmwares */
+-		if (priv->firmware_type != FIRMWARE_TYPE_AGERE) {
+-			char *	current_val = current_ev + IW_EV_LCP_LEN;
+-			int	i;
+-			int	step;
++			step = 1;
+ 
+-			if (priv->firmware_type == FIRMWARE_TYPE_SYMBOL)
+-				step = 2;
+-			else
+-				step = 1;
+-
+-			iwe.cmd = SIOCGIWRATE;
+-			/* Those two flags are ignored... */
+-			iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
+-			/* Max 10 values */
+-			for (i = 0; i < 10; i += step) {
+-				/* NULL terminated */
+-				if (atom->p.rates[i] == 0x0)
+-					break;
+-				/* Bit rate given in 500 kb/s units (+ 0x80) */
+-				iwe.u.bitrate.value = ((atom->p.rates[i] & 0x7f) * 500000);
+-				current_val = iwe_stream_add_value(current_ev, current_val,
+-								   end_buf, &iwe,
+-								   IW_EV_PARAM_LEN);
+-			}
+-			/* Check if we added any event */
+-			if ((current_val - current_ev) > IW_EV_LCP_LEN)
+-				current_ev = current_val;
+-		}
+-
+-		/* The other data in the scan result are not really
+-		 * interesting, so for now drop it - Jean II */
++		iwe.cmd = SIOCGIWRATE;
++		/* Those two flags are ignored... */
++		iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
++		/* Max 10 values */
++		for (i = 0; i < 10; i += step) {
++			/* NULL terminated */
++			if (bss->p.rates[i] == 0x0)
++				break;
++			/* Bit rate given in 500 kb/s units (+ 0x80) */
++			iwe.u.bitrate.value = ((bss->p.rates[i] & 0x7f) * 500000);
++			current_val = iwe_stream_add_value(current_ev, current_val,
++							   end_buf, &iwe,
++							   IW_EV_PARAM_LEN);
++		}
++		/* Check if we added any event */
++		if ((current_val - current_ev) > IW_EV_LCP_LEN)
++			current_ev = current_val;
+ 	}
+-	return current_ev - buffer;
++
++	return current_ev;
+ }
+ 
+ /* Return results of a scan */
+@@ -4078,68 +4166,45 @@ static int orinoco_ioctl_getscan(struct 
+ 				 char *extra)
+ {
+ 	struct orinoco_private *priv = netdev_priv(dev);
++	bss_element *bss;
+ 	int err = 0;
+ 	unsigned long flags;
++	char *current_ev = extra;
+ 
+ 	if (orinoco_lock(priv, &flags) != 0)
+ 		return -EBUSY;
+ 
+-	/* If no results yet, ask to try again later */
+-	if (priv->scan_result == NULL) {
+-		if (priv->scan_inprogress)
+-			/* Important note : we don't want to block the caller
+-			 * until results are ready for various reasons.
+-			 * First, managing wait queues is complex and racy.
+-			 * Second, we grab some rtnetlink lock before comming
+-			 * here (in dev_ioctl()).
+-			 * Third, we generate an Wireless Event, so the
+-			 * caller can wait itself on that - Jean II */
+-			err = -EAGAIN;
+-		else
+-			/* Client error, no scan results...
+-			 * The caller need to restart the scan. */
+-			err = -ENODATA;
+-	} else {
+-		/* We have some results to push back to user space */
+-
+-		/* Translate to WE format */
+-		int ret = orinoco_translate_scan(dev, extra,
+-						 priv->scan_result,
+-						 priv->scan_len);
+-
+-		if (ret < 0) {
+-			err = ret;
+-			kfree(priv->scan_result);
+-			priv->scan_result = NULL;
+-		} else {
+-			srq->length = ret;
+-
+-			/* Return flags */
+-			srq->flags = (__u16) priv->scan_mode;
+-
+-			/* In any case, Scan results will be cleaned up in the
+-			 * reset function and when exiting the driver.
+-			 * The person triggering the scanning may never come to
+-			 * pick the results, so we need to do it in those places.
+-			 * Jean II */
++	if (priv->scan_inprogress) {
++		/* Important note : we don't want to block the caller
++		 * until results are ready for various reasons.
++		 * First, managing wait queues is complex and racy.
++		 * Second, we grab some rtnetlink lock before comming
++		 * here (in dev_ioctl()).
++		 * Third, we generate an Wireless Event, so the
++		 * caller can wait itself on that - Jean II */
++		err = -EAGAIN;
++		goto out;
++	}
+ 
+-#ifdef SCAN_SINGLE_READ
+-			/* If you enable this option, only one client (the first
+-			 * one) will be able to read the result (and only one
+-			 * time). If there is multiple concurent clients that
+-			 * want to read scan results, this behavior is not
+-			 * advisable - Jean II */
+-			kfree(priv->scan_result);
+-			priv->scan_result = NULL;
+-#endif /* SCAN_SINGLE_READ */
+-			/* Here, if too much time has elapsed since last scan,
+-			 * we may want to clean up scan results... - Jean II */
++	list_for_each_entry(bss, &priv->bss_list, list) {
++		/* Translate to WE format this entry */
++		current_ev = orinoco_translate_scan(dev, current_ev,
++						    extra + srq->length,
++						    &bss->bss,
++						    bss->last_scanned);
++
++		/* Check if there is space for one more entry */
++		if ((extra + srq->length - current_ev) <= IW_EV_ADDR_LEN) {
++			/* Ask user space to try again with a bigger buffer */
++			err = -E2BIG;
++			goto out;
+ 		}
+-
+-		/* Scan is no longer in progress */
+-		priv->scan_inprogress = 0;
+ 	}
+-	  
++
++	srq->length = (current_ev - extra);
++	srq->flags = (__u16) priv->scan_mode;
++
++out:
+ 	orinoco_unlock(priv, &flags);
+ 	return err;
+ }
+diff -up linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c.orig linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c
+--- linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c.orig	2007-10-09 16:31:38.000000000 -0400
++++ linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c	2007-11-05 19:34:43.000000000 -0500
+@@ -708,7 +708,7 @@ int ieee80211_wx_get_encodeext(struct ie
+ 	} else
+ 		idx = ieee->tx_keyidx;
+ 
+-	if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY &&
++	if (!(ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) &&
+ 	    ext->alg != IW_ENCODE_ALG_WEP)
+ 		if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA)
+ 			return -EINVAL;




More information about the fedora-extras-commits mailing list