Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 2.6.17-rc5] pcnet32:  remove incorrect pcnet32_free_ring
From: Jeff Garzik @ 2006-05-27  1:33 UTC (permalink / raw)
  To: Don Fry; +Cc: tsbogend, netdev
In-Reply-To: <20060525232240.GA30918@us.ibm.com>

Don Fry wrote:
> During a code scan for another change I discovered that this call to
> pcnet32_free_ring must be removed.  If the open fails due to a lack of
> memory all the ring structures are removed via the call to free_ring
> and a subsequent call to open will dereference a null pointer in
> pcnet32_init_ring.
> 
> Please apply to 2.6.17.
> 
> Signed-off-by:  Don Fry <brazilnut@us.ibm.com>

applied



^ permalink raw reply

* Re: e1000: add WoL fix for 2.6.17rc
From: Jeff Garzik @ 2006-05-27  1:32 UTC (permalink / raw)
  To: Auke Kok; +Cc: netdev, Jesse Brandeburg, Kok, Auke
In-Reply-To: <44761DB2.8050806@intel.com>

Auke Kok wrote:
> 
> Jeff,
> 
> Please queue the 'e1000: add shutdown handler back for WoL' for 
> 2.6.17rc's. Since this fix is already committed to 
> jgarzik/netdev-2.6#upstream, you can cherrypick it into #upstream-fixes:
> 
> $ git-cherry-pick c653e6351e371b33b29871e5eedf610ffb3be037

perfect, done, thanks.

	Jeff




^ permalink raw reply

* ofrecemos trabajo bien pagado
From: Rationalized M. Marquez @ 2006-05-26 23:48 UTC (permalink / raw)
  To: Netdev

Buenos dias!
Nuestra compania se llama Magnat Trading Group. 
Nuestra especializacion es ayudar a empresarios a vender o comprar el articulo en la subasta mundial Ebay. Como un resultado del trabajo
intenso la compania en 4 anos pudo lograr el nivel mundial y segun los expertos ser una de las 20 mas influyentes companias, que proponen
los servicios de comercio. En Espana empezamos a trabajar recientemente  y en relacion con eso tenemos una vacancia de manager financiero
supernumerariom, quien va a ser representante de nuestra compania en Espana. Los requerimientos basicos son los siguientes:
-       computador, internet, e-mail, telefono
-       la cuenta bancaria en Espana
Por buen cumplimiento del deber prometemos alto nivel de beneficio, tiempo de trabajo flexible.
El pago se comete sin retraso. Le pagamos a Usted 150-500 euro por cada operacion .
Si esta Usted interesado en nuestra proposicion, puede recibir mas detalles por e-mail: magnat_group@km.ru

Gracias por la atencion a nuestra proposicion, 
La adminisracion de  Magnat Trading Group


^ permalink raw reply

* Re: Please pull 'upstream-fixes' branch of wireless-2.6
From: Jeff Garzik @ 2006-05-27  1:26 UTC (permalink / raw)
  To: jeff, netdev
In-Reply-To: <20060526203722.GE32487@tuxdriver.com>

John W. Linville wrote:
> The following changes since commit 705af309505681f197f81618440954d10f120dc0:
>   Martin Schwidefsky:
>         s390: fix typo in stop_hz_timer.
> 
> are found in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-fixes

pulled



^ permalink raw reply

* Re: [PATCH 0/9] ixgb: driver update to 1.0.109-k2
From: Jeff Garzik @ 2006-05-27  1:23 UTC (permalink / raw)
  To: Kok, Auke; +Cc: netdev, Brandeburg, Jesse, Kok, Auke
In-Reply-To: <20060526165124.30514.78477.stgit@gitlost.site>

Kok, Auke wrote:
> Hi,
> 
> Here are the ixgb driver updates for 1.0.109-k2. This corresponds with
> the release of 1.0.109 on e1000.sf.net, and fixes several issues.
> 
> e1000 update will come soon...
> 
> 
> Summary:
> 
> [1] fix smp polling race condition
> [2] fix interface losing macaddr on ifdn/up
> [3] revert an unwanted fix regarding tso/descriptors
> [4] allocate only buffersize needed
> [5] remove lock access in the fast path
> [6] remove inlines, allow compiler to choose
> [7] replace netdev->priv with netdev_priv()
> [8] remove changelog
> [9] update version, dates
> 
> 
> These changes are available through git.
> 
> git pull git://lost.foo-projects.org/~ahkok/git/netdev-2.6 ixgb-1.0.109-k2

pulled



^ permalink raw reply

* Re: [PATCH 2.6.18 3/3] tg3: update version and reldate
From: David Miller @ 2006-05-27  0:49 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1148684596.3930.10.camel@rh4>

From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 26 May 2006 16:03:16 -0700

> Update version to 3.59.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Also applied, thanks a lot Michael.

^ permalink raw reply

* Re: [PATCH 2.6.18 2/3] tg3: Add recovery logic when MMIOs are re-ordered
From: David Miller @ 2006-05-27  0:48 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1148684587.3930.9.camel@rh4>

From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 26 May 2006 16:03:07 -0700

> Add recovery logic when we suspect that the system is re-ordering
> MMIOs. Re-ordered MMIOs to the send mailbox can cause bogus tx
> completions and hit BUG_ON() in the tx completion path.
 ...
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Looks good, applied.


^ permalink raw reply

* Re: [PATCH 2.6.18 1/3] tg3: Add 5786 PCI ID
From: David Miller @ 2006-05-27  0:45 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1148684123.3930.8.camel@rh4>

From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 26 May 2006 15:55:23 -0700

> Add PCI ID for BCM5786 which is a variant of 5787.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Simple enough, applied to net-2.6.18

Thanks.

^ permalink raw reply

* [PATCH 2.6.18 3/3] tg3: update version and reldate
From: Michael Chan @ 2006-05-26 23:03 UTC (permalink / raw)
  To: davem; +Cc: netdev

Update version to 3.59.

Signed-off-by: Michael Chan <mchan@broadcom.com>


diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index b01499c..db3f769 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -69,8 +69,8 @@
 
 #define DRV_MODULE_NAME		"tg3"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"3.58"
-#define DRV_MODULE_RELDATE	"May 22, 2006"
+#define DRV_MODULE_VERSION	"3.59"
+#define DRV_MODULE_RELDATE	"May 26, 2006"
 
 #define TG3_DEF_MAC_MODE	0
 #define TG3_DEF_RX_MODE		0



^ permalink raw reply related

* [PATCH 2.6.18 2/3] tg3: Add recovery logic when MMIOs are re-ordered
From: Michael Chan @ 2006-05-26 23:03 UTC (permalink / raw)
  To: davem; +Cc: netdev

Add recovery logic when we suspect that the system is re-ordering
MMIOs. Re-ordered MMIOs to the send mailbox can cause bogus tx
completions and hit BUG_ON() in the tx completion path.

tg3 already has logic to handle re-ordered MMIOs by flushing the
MMIOs that must be strictly ordered (such as the send mailbox).
Determining when to enable the flush is currently a manual process
of adding known chipsets to a list.

The new code replaces the BUG_ON() in the tx completion path with the
call to tg3_tx_recover(). It will set the TG3_FLAG_MBOX_WRITE_REORDER
flag and reset the chip later in the workqueue to recover and start
flushing MMIOs to the mailbox.

A message to report the problem will be printed. We will then decide
whether or not to add the host bridge to the list of chipsets that do
re-ordering.

We may add some additional code later to print the host bridge's ID
so that the user can report it more easily.

The assumption that re-ordering can only happen on x86 systems is also
removed.

Signed-off-by: Michael Chan <mchan@broadcom.com>


diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 3de5a62..bc3f884 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -2967,6 +2967,29 @@ static int tg3_setup_phy(struct tg3 *tp,
 	return err;
 }
 
+/* This is called whenever we suspect that the system chipset is re-
+ * ordering the sequence of MMIO to the tx send mailbox. The symptom
+ * is bogus tx completions. We try to recover by setting the
+ * TG3_FLAG_MBOX_WRITE_REORDER flag and resetting the chip later
+ * in the workqueue.
+ */
+static void tg3_tx_recover(struct tg3 *tp)
+{
+	BUG_ON((tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER) ||
+	       tp->write32_tx_mbox == tg3_write_indirect_mbox);
+
+	printk(KERN_WARNING PFX "%s: The system may be re-ordering memory-"
+	       "mapped I/O cycles to the network device, attempting to "
+	       "recover. Please report the problem to the driver maintainer "
+	       "and include system chipset information.\n", tp->dev->name);
+
+	spin_lock(&tp->lock);
+	spin_lock(&tp->tx_lock);
+	tp->tg3_flags |= TG3_FLAG_TX_RECOVERY_PENDING;
+	spin_unlock(&tp->tx_lock);
+	spin_unlock(&tp->lock);
+}
+
 /* Tigon3 never reports partial packet sends.  So we do not
  * need special logic to handle SKBs that have not had all
  * of their frags sent yet, like SunGEM does.
@@ -2979,9 +3002,13 @@ static void tg3_tx(struct tg3 *tp)
 	while (sw_idx != hw_idx) {
 		struct tx_ring_info *ri = &tp->tx_buffers[sw_idx];
 		struct sk_buff *skb = ri->skb;
-		int i;
+		int i, tx_bug = 0;
+
+		if (unlikely(skb == NULL)) {
+			tg3_tx_recover(tp);
+			return;
+		}
 
-		BUG_ON(skb == NULL);
 		pci_unmap_single(tp->pdev,
 				 pci_unmap_addr(ri, mapping),
 				 skb_headlen(skb),
@@ -2992,10 +3019,9 @@ static void tg3_tx(struct tg3 *tp)
 		sw_idx = NEXT_TX(sw_idx);
 
 		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
-			BUG_ON(sw_idx == hw_idx);
-
 			ri = &tp->tx_buffers[sw_idx];
-			BUG_ON(ri->skb != NULL);
+			if (unlikely(ri->skb != NULL || sw_idx == hw_idx))
+				tx_bug = 1;
 
 			pci_unmap_page(tp->pdev,
 				       pci_unmap_addr(ri, mapping),
@@ -3006,6 +3032,11 @@ static void tg3_tx(struct tg3 *tp)
 		}
 
 		dev_kfree_skb(skb);
+
+		if (unlikely(tx_bug)) {
+			tg3_tx_recover(tp);
+			return;
+		}
 	}
 
 	tp->tx_cons = sw_idx;
@@ -3333,6 +3364,11 @@ static int tg3_poll(struct net_device *n
 	/* run TX completion thread */
 	if (sblk->idx[0].tx_consumer != tp->tx_cons) {
 		tg3_tx(tp);
+		if (unlikely(tp->tg3_flags & TG3_FLAG_TX_RECOVERY_PENDING)) {
+			netif_rx_complete(netdev);
+			schedule_work(&tp->reset_task);
+			return 0;
+		}
 	}
 
 	/* run RX thread, within the bounds set by NAPI.
@@ -3581,6 +3617,13 @@ static void tg3_reset_task(void *_data)
 	restart_timer = tp->tg3_flags2 & TG3_FLG2_RESTART_TIMER;
 	tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER;
 
+	if (tp->tg3_flags & TG3_FLAG_TX_RECOVERY_PENDING) {
+		tp->write32_tx_mbox = tg3_write32_tx_mbox;
+		tp->write32_rx_mbox = tg3_write_flush_reg32;
+		tp->tg3_flags |= TG3_FLAG_MBOX_WRITE_REORDER;
+		tp->tg3_flags &= ~TG3_FLAG_TX_RECOVERY_PENDING;
+	}
+
 	tg3_halt(tp, RESET_KIND_SHUTDOWN, 0);
 	tg3_init_hw(tp, 1);
 
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 0e29b88..7f22559 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -2155,11 +2155,7 @@ struct tg3 {
 #define TG3_FLAG_ENABLE_ASF		0x00000020
 #define TG3_FLAG_5701_REG_WRITE_BUG	0x00000040
 #define TG3_FLAG_POLL_SERDES		0x00000080
-#if defined(CONFIG_X86)
 #define TG3_FLAG_MBOX_WRITE_REORDER	0x00000100
-#else
-#define TG3_FLAG_MBOX_WRITE_REORDER	0	/* disables code too */
-#endif
 #define TG3_FLAG_PCIX_TARGET_HWBUG	0x00000200
 #define TG3_FLAG_WOL_SPEED_100MB	0x00000400
 #define TG3_FLAG_WOL_ENABLE		0x00000800
@@ -2172,6 +2168,7 @@ struct tg3 {
 #define TG3_FLAG_PCI_HIGH_SPEED		0x00040000
 #define TG3_FLAG_PCI_32BIT		0x00080000
 #define TG3_FLAG_SRAM_USE_CONFIG	0x00100000
+#define TG3_FLAG_TX_RECOVERY_PENDING	0x00200000
 #define TG3_FLAG_SERDES_WOL_CAP		0x00400000
 #define TG3_FLAG_JUMBO_RING_ENABLE	0x00800000
 #define TG3_FLAG_10_100_ONLY		0x01000000



^ permalink raw reply related

* [PATCH 2.6.18 1/3] tg3: Add 5786 PCI ID
From: Michael Chan @ 2006-05-26 22:55 UTC (permalink / raw)
  To: davem; +Cc: netdev

Add PCI ID for BCM5786 which is a variant of 5787.

Signed-off-by: Michael Chan <mchan@broadcom.com>


diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 49ad60b..3de5a62 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -229,6 +229,8 @@ static struct pci_device_id tg3_pci_tbl[
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5755M,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5786,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787M,
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d6fe048..bef7ea1 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1886,6 +1886,7 @@
 #define PCI_DEVICE_ID_TIGON3_5751F	0x167e
 #define PCI_DEVICE_ID_TIGON3_5787M	0x1693
 #define PCI_DEVICE_ID_TIGON3_5782	0x1696
+#define PCI_DEVICE_ID_TIGON3_5786	0x169a
 #define PCI_DEVICE_ID_TIGON3_5787	0x169b
 #define PCI_DEVICE_ID_TIGON3_5788	0x169c
 #define PCI_DEVICE_ID_TIGON3_5789	0x169d



^ permalink raw reply related

* Re: Refactor Netlink connector?
From: Patrick McHardy @ 2006-05-26 23:06 UTC (permalink / raw)
  To: James Morris; +Cc: netdev, Evgeniy Polyakov, David S. Miller
In-Reply-To: <Pine.LNX.4.64.0605261552570.4856@d.namei>

James Morris wrote:
> I've been looking through the kernel for new subsytems which might need 
> LSM hooks, and we've got a proliferation of Netlink abstractions: generic 
> Netlink, nfnetlink, connector and kobject_uevent.
> 
> I think we should look at consolidating some of these schemes, and if 
> possible, into a unififed Netlink API.
> 
> As a first step, what would it take to adapt the single user of 
> connector (the w1 driver) to use generic Netlink?
> 
> I suspect that some of the nfnetlink infrastructure can be used more 
> generically, and that a simple API for the common case of kernel->user 
> event notifications could be also be provided.
> 
> Thoughts?


No great thoughts at this point, but I agree 100%. In my
opinion netlink subsystems should be usable in a uniform way
(at least netlink specific parts like dump/query/set, ACKs,
attribute encoding and similar low-level stuff) without
implementation specific details. I guess from a SELinux point
of view having a single spot to place hooks with well defined
semantics is what counts, but it comes down to the same, there
is too much diversion among netlink users. I'll look into the
nfnetlink bits for a start, but I fear because of use of
network byteorder in lots of places it will not be able to
fully convert to generic netlink.


^ permalink raw reply

* Re: [RFC] new qla3xxx NIC Driver v2.02.00k29 (repost)
From: Stephen Hemminger @ 2006-05-26 22:33 UTC (permalink / raw)
  To: Ron Mercer; +Cc: netdev, linux-driver
In-Reply-To: <0BB3E5E7462EEA4295BC02D49691DC070D372D@AVEXCH1.qlogic.org>

Fixes:
1. Remove code has to unregister net device before doing any hardware
   tear down.  This ensures that packets won't get queued etc..

2. Need to unmap PCI request before reference in eth_type_trans

3. call free_netdev not kfree to free net_device
   see Documentation/networking/netdevices.txt

Improvements:

4. indentation. Lots of funny line breaks in your source.

5. use const if you can 

6. ethtool get_link reports carrier state

7. don't need to do multicast list comparisons?
   kernel already have to deal with multicast hash collision from drivers, 
   so if your hardware can't do it. walking the list of addresses seems like 
   unnecessary work.
   (if you want to keep this code, consider using compare_ether_addr)

7. prefetching the data before passing up is almost always a cache win
   since the first thing that happens is looking at the data.

My changes might have broken stuff, not tested (no hardware).

Next time please post in standard kernel patch format.
(ie Documentation/SubmittingPatches)

I.e as part of a kernel build tree:
	drivers/net/ql3_xxx.c
	drivers/net/ql3_def.h
and delta's for drivers/net/Kconfig and drivers/net/Makefile

--- ql3_xxx.c.orig	2006-05-24 15:41:42.000000000 -0700
+++ ql3_xxx.c	2006-05-26 15:32:39.000000000 -0700
@@ -9,10 +9,10 @@
 #define DRV_NAME  	"qla3xxx"
 #define DRV_STRING 	"QLogic ISP3XXX Network Driver"
 #define DRV_VERSION	"v2.02.00-k29"
-#define PFX			DRV_NAME " "
+#define PFX		DRV_NAME " "
 
-static char ql3xxx_driver_name[] = DRV_NAME;
-static char ql3xxx_driver_version[] = DRV_VERSION;
+static const char ql3xxx_driver_name[] = DRV_NAME;
+static const char ql3xxx_driver_version[] = DRV_VERSION;
 
 MODULE_AUTHOR("QLogic Corporation");
 MODULE_DESCRIPTION("QLogic ISP3XXX Network Driver " DRV_VERSION " ");
@@ -485,7 +485,7 @@ static int ql_get_nvram_params(struct ql
 	return checksum;
 }
 
-static u32 PHYAddr[2] = {
+static const u32 PHYAddr[2] = {
 	PORT0_PHY_ADDRESS, PORT1_PHY_ADDRESS
 };
 
@@ -1504,9 +1504,12 @@ static void ql_set_msglevel(struct net_d
 }
 
 static struct ethtool_ops ql3xxx_ethtool_ops = {
-	.get_settings = ql_get_settings,.get_drvinfo = ql_get_drvinfo,
+	.get_settings = ql_get_settings,
+	.get_drvinfo = ql_get_drvinfo,
 	.get_perm_addr = ethtool_op_get_perm_addr,
-	.get_msglevel = ql_get_msglevel,.set_msglevel = ql_set_msglevel,
+	.get_link = ethtool_op_get_link,
+	.get_msglevel = ql_get_msglevel,
+	.set_msglevel = ql_set_msglevel,
 };
 
 static struct ql_tx_buf_cb *ql_alloc_txbuf(struct ql3_adapter *qdev)
@@ -1760,9 +1763,6 @@ static void ql_process_mac_rx_intr(struc
 	u32 *curr_ial_ptr;
 	struct sk_buff *skb;
 	struct net_device *ndev = qdev->ndev;
-	int send_packet = 1;
-	struct dev_mc_list *mc_list = ndev->mc_list;
-	struct ethhdr *eth_hdr;
 	u16 length = le16_to_cpu(ib_mac_rsp_ptr->length);
 
 	/*
@@ -1799,59 +1799,27 @@ static void ql_process_mac_rx_intr(struc
 		qdev->lrg_buf_index = 0;
 	}
 	skb = lrg_buf_cb2->skb;
-	eth_hdr = (struct ethhdr *)skb->data;
-
-	if (ib_mac_rsp_ptr->flags & IB_MAC_IOCB_RSP_B) {
-		if (!(ndev->flags & (IFF_BROADCAST | IFF_PROMISC))) {
-			send_packet = 0;
-		}
-	} else if (ib_mac_rsp_ptr->flags & IB_MAC_IOCB_RSP_M) {
-		/* We received a multicast packet. Scan the list of multicast addresses 
-		 * and see if there is a match otherwise discard packet */
-		send_packet = 0;
-		if (ndev->flags & (IFF_ALLMULTI | IFF_PROMISC)) {
-			send_packet = 1;
-		} else if ((ndev->flags & IFF_MULTICAST)) {
-			while (mc_list) {
-				if ((mc_list->dmi_addr[0] == eth_hdr->h_dest[0])
-				    && (mc_list->dmi_addr[1] ==
-					eth_hdr->h_dest[1])
-				    && (mc_list->dmi_addr[2] ==
-					eth_hdr->h_dest[2])
-				    && (mc_list->dmi_addr[3] ==
-					eth_hdr->h_dest[3])
-				    && (mc_list->dmi_addr[4] ==
-					eth_hdr->h_dest[4])
-				    && (mc_list->dmi_addr[5] ==
-					eth_hdr->h_dest[5])) {
-					send_packet = 1;
-					break;
-				}
-				mc_list = mc_list->next;
-			}
-		}
-	}
 
 	qdev->stats.rx_packets++;
 	qdev->stats.rx_bytes += length;
 
-	if (send_packet) {
-		skb_put(skb, length);
-		skb->dev = qdev->ndev;
-		skb->ip_summed = CHECKSUM_NONE;
-		skb->protocol = eth_type_trans(skb, qdev->ndev);
-		pci_unmap_single(qdev->pdev,
-				 pci_unmap_addr(lrg_buf_cb2, mapaddr),
-				 pci_unmap_len(lrg_buf_cb2, maplen),
-				 PCI_DMA_FROMDEVICE);
+	skb_put(skb, length);
+	pci_unmap_single(qdev->pdev,
+			 pci_unmap_addr(lrg_buf_cb2, mapaddr),
+			 pci_unmap_len(lrg_buf_cb2, maplen),
+			 PCI_DMA_FROMDEVICE);
+	prefetch(skb->data);
+	skb->dev = qdev->ndev;
+	skb->ip_summed = CHECKSUM_NONE;
+	skb->protocol = eth_type_trans(skb, qdev->ndev);
+
 #ifdef CONFIG_QL3XXX_NAPI
-		netif_receive_skb(skb);
+	netif_receive_skb(skb);
 #else
-		netif_rx(skb);
+	netif_rx(skb);
 #endif
-		qdev->ndev->last_rx = jiffies;
-		lrg_buf_cb2->skb = NULL;
-	}
+	qdev->ndev->last_rx = jiffies;
+	lrg_buf_cb2->skb = NULL;
 
 	ql_release_to_lrg_buf_free_list(qdev, lrg_buf_cb1);
 	ql_release_to_lrg_buf_free_list(qdev, lrg_buf_cb2);
@@ -1867,9 +1835,6 @@ static void ql_process_macip_rx_intr(str
 	u32 *curr_ial_ptr;
 	struct sk_buff *skb1, *skb2;
 	struct net_device *ndev = qdev->ndev;
-	struct dev_mc_list *mc_list = ndev->mc_list;
-	int send_packet = 1;
-	struct ethhdr *eth_hdr;
 	u16 length = le16_to_cpu(ib_ip_rsp_ptr->length);
 	u16 size = 0;
 
@@ -1906,70 +1871,38 @@ static void ql_process_macip_rx_intr(str
 		qdev->lrg_buf_index = 0;
 	}
 
-	if (ib_ip_rsp_ptr->flags & IB_IP_IOCB_RSP_B) {
-		if (!(ndev->flags & (IFF_BROADCAST | IFF_PROMISC))) {
-			send_packet = 0;
-		}
-	} else if (ib_ip_rsp_ptr->flags & IB_IP_IOCB_RSP_M) {
-		/* 
-		 * We received a multicast packet. Scan the list of multicast addresses 
-		 * and see if there is a match otherwise discard packet 
-		 */
-		send_packet = 0;
-		if (ndev->flags & (IFF_ALLMULTI | IFF_PROMISC)) {
-			send_packet = 1;
-		} else if ((ndev->flags & IFF_MULTICAST)) {
-			eth_hdr = (struct ethhdr *)skb1->data + VLAN_ID_LEN;
-			while (mc_list) {
-				if ((mc_list->dmi_addr[0] == eth_hdr->h_dest[0])
-				    && (mc_list->dmi_addr[1] ==
-					eth_hdr->h_dest[1])
-				    && (mc_list->dmi_addr[2] ==
-					eth_hdr->h_dest[2])
-				    && (mc_list->dmi_addr[3] ==
-					eth_hdr->h_dest[3])
-				    && (mc_list->dmi_addr[4] ==
-					eth_hdr->h_dest[4])
-				    && (mc_list->dmi_addr[5] ==
-					eth_hdr->h_dest[5])) {
-					send_packet = 1;
-					break;
-				}
-				mc_list = mc_list->next;
-			}
-		}
-	}
-
 	qdev->stats.rx_packets++;
 	qdev->stats.rx_bytes += length;
 
-	if (send_packet) {
-		/*
-		 * Copy the ethhdr from first buffer to second. This
-		 * is necessary for IP completions.
-		 */
-		if (*((u16 *) skb1->data) != 0xFFFF) {
-			size = VLAN_ETH_HLEN;
-		} else {
-			size = ETH_HLEN;
-		}
-		skb_put(skb2, length);	/* Just the second buffer length here. */
-		memcpy(skb_push(skb2, size), skb1->data + VLAN_ID_LEN, size);
-		skb2->dev = qdev->ndev;
-		skb2->ip_summed = CHECKSUM_NONE;
-		skb2->protocol = eth_type_trans(skb2, qdev->ndev);
-		pci_unmap_single(qdev->pdev,
-				 pci_unmap_addr(lrg_buf_cb2, mapaddr),
-				 pci_unmap_len(lrg_buf_cb2, maplen),
-				 PCI_DMA_FROMDEVICE);
+	/*
+	 * Copy the ethhdr from first buffer to second. This
+	 * is necessary for IP completions.
+	 */
+	if (*((u16 *) skb1->data) != 0xFFFF) {
+		size = VLAN_ETH_HLEN;
+	} else {
+		size = ETH_HLEN;
+	}
+
+	skb_put(skb2, length);	/* Just the second buffer length here. */
+	pci_unmap_single(qdev->pdev,
+			 pci_unmap_addr(lrg_buf_cb2, mapaddr),
+			 pci_unmap_len(lrg_buf_cb2, maplen),
+			 PCI_DMA_FROMDEVICE);
+	prefetch(skb2->data);
+
+	memcpy(skb_push(skb2, size), skb1->data + VLAN_ID_LEN, size);
+	skb2->dev = qdev->ndev;
+	skb2->ip_summed = CHECKSUM_NONE;
+	skb2->protocol = eth_type_trans(skb2, qdev->ndev);
+
 #ifdef CONFIG_QL3XXX_NAPI
-		netif_receive_skb(skb2);
+	netif_receive_skb(skb2);
 #else
-		netif_rx(skb2);
+	netif_rx(skb2);
 #endif
-		ndev->last_rx = jiffies;
-		lrg_buf_cb2->skb = NULL;
-	}
+	ndev->last_rx = jiffies;
+	lrg_buf_cb2->skb = NULL;
 
 	ql_release_to_lrg_buf_free_list(qdev, lrg_buf_cb1);
 	ql_release_to_lrg_buf_free_list(qdev, lrg_buf_cb2);
@@ -2876,20 +2809,17 @@ static int ql_adapter_initialize(struct 
 	ql_write_page0_reg(qdev, &port_regs->macAddrIndirectPtrReg,
 			   (MAC_ADDR_INDIRECT_PTR_REG_RP_MASK << 16));
 	ql_write_page0_reg(qdev, &port_regs->macAddrDataReg,
-			   ((qdev->ndev->dev_addr[2] << 24) | (qdev->ndev->
-							       dev_addr[3] <<
-							       16) | (qdev->
-								      ndev->
-								      dev_addr
-								      [4] << 8)
+			   ((qdev->ndev->dev_addr[2] << 24) 
+			    | (qdev->ndev->dev_addr[3] << 16)
+			    | (qdev->ndev->dev_addr[4] << 8)
 			    | qdev->ndev->dev_addr[5]));
 
 	/* Program top 16 bits of the MAC address */
 	ql_write_page0_reg(qdev, &port_regs->macAddrIndirectPtrReg,
 			   ((MAC_ADDR_INDIRECT_PTR_REG_RP_MASK << 16) | 1));
 	ql_write_page0_reg(qdev, &port_regs->macAddrDataReg,
-			   ((qdev->ndev->dev_addr[0] << 8) | qdev->ndev->
-			    dev_addr[1]));
+			   ((qdev->ndev->dev_addr[0] << 8)
+			    | qdev->ndev->dev_addr[1]));
 
 	/* Enable Primary MAC */
 	ql_write_page0_reg(qdev, &port_regs->macAddrIndirectPtrReg,
@@ -3247,6 +3177,7 @@ static int ql3xxx_close(struct net_devic
 {
 	struct ql3_adapter *qdev = netdev_priv(ndev);
 	int status;
+
 	while (!(qdev->flags & QL_ADAPTER_UP)) {
 		msleep(50);
 	}
@@ -3415,10 +3346,9 @@ static void ql_reset_work(struct ql3_ada
 		 */
 		max_wait_time = 10;
 		do {
-			value =
-			    ql_read_common_reg(qdev,
-					       &port_regs->CommonRegs.
-					       ispControlStatus);
+			value = ql_read_common_reg(qdev,
+						   &port_regs->CommonRegs.
+						   ispControlStatus);
 			if ((value & ISP_CONTROL_SR) == 0) {
 				printk(KERN_DEBUG PFX
 				       "%s: %s: reset completed.\n",
@@ -3666,7 +3596,6 @@ static int __devinit ql3xxx_probe(struct
 
 	/* Turn off support for multicasting */
 	ndev->flags &= ~IFF_MULTICAST;
-	ndev->flags |= IFF_NOTRAILERS;
 
 	/* Record PCI bus information. */
 	ql_get_board_info(qdev);
@@ -3718,7 +3647,7 @@ static int __devinit ql3xxx_probe(struct
 	return err;
 }
 
-static void ql3xxx_remove(struct pci_dev *pdev)
+static void __devexit ql3xxx_remove(struct pci_dev *pdev)
 {
 	struct net_device *ndev = pci_get_drvdata(pdev);
 	struct ql3_adapter *qdev;
@@ -3729,6 +3658,7 @@ static void ql3xxx_remove(struct pci_dev
 		return;
 	}
 
+	unregister_netdev(ndev);
 	qdev = netdev_priv(ndev);
 	if (qdev == NULL) {
 		printk(KERN_ERR PFX "%s: %s: qdev == NULL, leaving.\n",
@@ -3742,8 +3672,7 @@ static void ql3xxx_remove(struct pci_dev
 	/*
 	 * Wait for any resets to complete...
 	 */
-	while (qdev->
-	       flags & (QL_RESET_ACTIVE | QL_RESET_START | QL_RESET_PER_SCSI)) {
+	while (qdev->flags & (QL_RESET_ACTIVE | QL_RESET_START | QL_RESET_PER_SCSI)) {
 		msleep(1000);
 	}
 
@@ -3755,12 +3684,13 @@ static void ql3xxx_remove(struct pci_dev
 		qdev->workqueue = NULL;
 	}
 
-	unregister_netdev(ndev);
 	iounmap((void *)qdev->mmap_virt_base);
 	pci_release_regions(pdev);
 	pci_set_drvdata(pdev, NULL);
-	kfree(ndev);
-} static struct pci_driver ql3xxx_driver = {
+	free_netdev(ndev);
+}
+
+static struct pci_driver ql3xxx_driver = {
 
 	.name = DRV_NAME,
 	.id_table = ql3xxx_pci_tbl,

^ permalink raw reply

* Re: Wireless patches to push for 2.6.18?
From: Michael Buesch @ 2006-05-26 22:17 UTC (permalink / raw)
  To: John W. Linville; +Cc: netdev
In-Reply-To: <20060526195855.GD32487@tuxdriver.com>

On Friday 26 May 2006 21:59, John W. Linville wrote:
> As David M. so recently reminded us, 2.6.17 is likely to be blessed soon.
> That will open a short merge window for non-"fixes" to go into 2.6.18.
> 
> Along w/ the patches currently on the 'upstream' branch, I'd like to
> see some of the the drivers hanging-out only on the 'master' branch
> of wireless-2.6 to get polished-up and pushed-out.  What do you think
> are the best candidates?
> 
> 	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/master/
> 
> Anyone have anything else they are holding-back for 2.6.18? 

Yes, we would like to merge the big tx-power-rewrite (aka get 4318
working) into the bcm43xx driver, but it is only 90% completed atm.
I guess we still have 1 to 1.5 weeks left, before the window closes?

^ permalink raw reply

* Re: reminder, 2.6.18 window...
From: Rick Jones @ 2006-05-26 22:06 UTC (permalink / raw)
  To: Rick Jones; +Cc: hadi, Jeff Garzik, David Miller, netdev, Phil Dibowitz
In-Reply-To: <4475DEA2.3090201@hp.com>

>> Can you ask internally on how openview would handle this? It carriers 
>> the major chunk of management tools market so it may provide good 
>> insight.
> 
> 
> I've asked the question in an internal, informal communications channel. 
>  No guarantees it will reach any OpenView types, but if it does I'll try 
> to provide the gist of the replies.

While the question of the patch itself appears to be laid to rest for 
the time being, since I took an "action item" I figured it would be good 
to complete it.

Here was one response:

> If the stats are being gathered via SNMP, most management systems do
> one of two things:
> 
> - treat it as a discontinuity: in this case, the handling is similar
>   to that for a device reboot; that is, delta calculation starts anew.
> 
> - treat it as a wrap-around (especially for 32-bit counters): the smarter
>   ones have logic to detect whether this is a "feasible" wrap-around (e.g.,
>   old measurement was "near" overflow, etc.) and appropriately adjust
>   the delta.
> 
> In your case, it looks like you want to treat this as a discontinuity.
> The interface table in IF-MIB has an attribute called ifLastChange; if
> you reset the counter, you may want to set it to the sysUpTime value.
> This way, a "proper" implementation could determine that a
> discontinuity has occurred.

And then a more detailed response with an associated, and very long URL:

<excerpt>

http://openview.hp.com/ecare/getsupportdoc?docid=OV-EN012963&urlN=http%3A%2F%2Fsupport.openview.hp.com%2Fselfsolve%2Fdo%2Fadvanced-search&fromOV
=false&urlB=http%3A%2F%2Fsupport.openview.hp.com%2Fselfsolve%2Fdo%2Fadvanced-search%3Faction%3Dresults&f=ss&hl=true

QUOTE:

This problem can be caused by the SNMP MIB counter wrap.  NNM 6.01 or
later has logic to detect collected MIB counter wrap.

If NNM detects that a MIB counter is wrapped, then it is considered as
one of the following two cases:

The counter reached its maximum value and wrapped.
The counter reset occurred due to the SNMP agent restart.
In the case of (1), snmpCollect takes the counter wrap into account and
adjusts the value taking the maximum value of the counter into
consideration.  However, in the case of (2), NNM cancels the measurement
of this period because it considers that the previous value that was
used for calculation is no longer valid.

If the value of the counter increases too fast, NNM may consider that
the detected counter wrap is due to the agent restart even though the
counter just wrapped.  In this case, the data of the measurement period
gets dropped.

There are two approaches available to avoid this situation:

Use counters that have a larger maximum size.  For example, use
IfHCInOctets/IfHCOutOctets(64bit - counter64) in IF_MIB instead of
IfInOctets/IfOutOctets(32bit - counter).
Shorten the period of measurement, so that the amount of the counter
increase is potentially short enough to let NNM detect the counter wrap
correctly.

Note:
It may be necessary to upgrade the operating system of some network
devices to gain access to 64-bit counters. Note also, that counter64 is
a SNMPv2 data type, the agent must support SNMPv2. If trying to access
the values using snmpwalk  use the parameter-v2c to ensure that the
variables can be accessed.

</excerpt>

rick jones

^ permalink raw reply

* Please pull 'upstream-fixes' branch of wireless-2.6
From: John W. Linville @ 2006-05-26 20:37 UTC (permalink / raw)
  To: jeff; +Cc: netdev

The following changes since commit 705af309505681f197f81618440954d10f120dc0:
  Martin Schwidefsky:
        s390: fix typo in stop_hz_timer.

are found in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-fixes

Randy Dunlap:
      wavelan: fix section mismatch
      arlan: fix section mismatch warnings

 drivers/net/wireless/arlan-main.c |    4 ++--
 drivers/net/wireless/wavelan.c    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
index 0e1ac33..bed6823 100644
--- a/drivers/net/wireless/arlan-main.c
+++ b/drivers/net/wireless/arlan-main.c
@@ -1838,7 +1838,7 @@ struct net_device * __init arlan_probe(i
 }
 
 #ifdef  MODULE
-int init_module(void)
+int __init init_module(void)
 {
 	int i = 0;
 
@@ -1860,7 +1860,7 @@ int init_module(void)
 }
 
 
-void cleanup_module(void)
+void __exit cleanup_module(void)
 {
 	int i = 0;
 	struct net_device *dev;
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index ff192e9..dade4b9 100644
--- a/drivers/net/wireless/wavelan.c
+++ b/drivers/net/wireless/wavelan.c
@@ -4306,7 +4306,7 @@ #ifdef	MODULE
  * Insertion of the module
  * I'm now quite proud of the multi-device support.
  */
-int init_module(void)
+int __init init_module(void)
 {
 	int ret = -EIO;		/* Return error if no cards found */
 	int i;
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply related

* Re: [PATCH] network dev.c comment cleanups
From: David Miller @ 2006-05-26 20:25 UTC (permalink / raw)
  To: shemminger; +Cc: netdev
In-Reply-To: <20060526104248.3ad9d526@localhost.localdomain>

From: Stephen Hemminger <shemminger@osdl.org>
Date: Fri, 26 May 2006 10:42:48 -0700

> Noticed that dev_alloc_name() comment was incorrect, and more spellung errors.
> 
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

Applied, thanks Stephen.

^ permalink raw reply

* Re: [PATCH] [IPV6] ROUTE: Don't try less preferred routes for on-link routes.
From: David Miller @ 2006-05-26 20:24 UTC (permalink / raw)
  To: yoshfuji; +Cc: mroos, netdev
In-Reply-To: <20060526.200156.83522671.yoshfuji@linux-ipv6.org>

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Fri, 26 May 2006 20:01:56 +0900 (JST)

> In article <Pine.SOC.4.61.0605261344340.26383@math.ut.ee> (at Fri, 26 May 2006 13:44:59 +0300 (EEST)), Meelis Roos <mroos@linux.ee> says:
> 
> > >> The unreachable route works now but LAN routing still does not work.
> > >> Locally generated ICMPv6 packets that should go to LAN interface still
> > >> go to tun6to4.
> > >
> > > Please try this.
> > 
> > This works for both unreachable and LAN routes, thanks!
> 
> Please push this to 2.6.17-final.

Applied, thank you very much.

^ permalink raw reply

* usb wifi: zd1201 cleanups
From: Pavel Machek @ 2006-05-26 20:07 UTC (permalink / raw)
  To: pe1rxq, kernel list, Andrew Morton, netdev

Hi!

I am trying to get zd1201 to work on ARM. It works okay on i386, but
not on ARM -- I get no results from iwlist wlan0 scan. Anyway, here
are some cleanups.

Line of ~280 characters, full of whitespace really got me. Please
apply,

---

Cleanup coding style and other small stuff in zd1201. No real code
changes.

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c
index 9b1e4ed..aef02c4 100644
--- a/drivers/usb/net/zd1201.c
+++ b/drivers/usb/net/zd1201.c
@@ -33,7 +33,7 @@ static struct usb_device_id zd1201_table
 	{}
 };
 
-static int ap = 0;	/* Are we an AP or a normal station? */
+static int ap;	/* Are we an AP or a normal station? */
 
 #define ZD1201_VERSION	"0.15"
 
@@ -49,7 +49,7 @@ MODULE_DEVICE_TABLE(usb, zd1201_table);
 static int zd1201_fw_upload(struct usb_device *dev, int apfw)
 {
 	const struct firmware *fw_entry;
-	char* data;
+	char *data;
 	unsigned long len;
 	int err;
 	unsigned char ret;
@@ -65,7 +65,7 @@ static int zd1201_fw_upload(struct usb_d
 	if (err) {
 		dev_err(&dev->dev, "Failed to load %s firmware file!\n", fwfile);
 		dev_err(&dev->dev, "Make sure the hotplug firmware loader is installed.\n");
-		dev_err(&dev->dev, "Goto http://linux-lc100020.sourceforge.net for more info\n");
+		dev_err(&dev->dev, "Goto http://linux-lc100020.sourceforge.net for more info.\n");
 		return err;
 	}
 
@@ -94,12 +94,12 @@ static int zd1201_fw_upload(struct usb_d
 	    USB_DIR_OUT | 0x40, 0, 0, NULL, 0, ZD1201_FW_TIMEOUT);
 	if (err < 0)
 		goto exit;
-                                                                                                                                                                
+
 	err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4,
 	    USB_DIR_IN | 0x40, 0,0, &ret, sizeof(ret), ZD1201_FW_TIMEOUT);
 	if (err < 0)
 		goto exit;
-                                                                                                                                                                                                                                                                                        
+
 	if (ret & 0x80) {
 		err = -EIO;
 		goto exit;
@@ -166,13 +166,13 @@ static int zd1201_docmd(struct zd1201 *z
 		return -ENOMEM;
 	}
 	usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb, zd->endp_out2),
-	     command, 16, zd1201_usbfree, zd);
+			  command, 16, zd1201_usbfree, zd);
 	ret = usb_submit_urb(urb, GFP_ATOMIC);
 	if (ret) {
 		kfree(command);
 		usb_free_urb(urb);
 	}
-	
+
 	return ret;
 }
 
@@ -316,7 +316,7 @@ static void zd1201_usbrx(struct urb *urb
 		fc = le16_to_cpu(*(__le16 *)&data[datalen-16]);
 		seq = le16_to_cpu(*(__le16 *)&data[datalen-24]);
 
-		if(zd->monitor) {
+		if (zd->monitor) {
 			if (datalen < 24)
 				goto resubmit;
 			if (!(skb = dev_alloc_skb(datalen+24)))
@@ -364,7 +364,7 @@ static void zd1201_usbrx(struct urb *urb
 				goto resubmit;
 			}
 			hlist_for_each_entry(frag, node, &zd->fraglist, fnode)
-				if(frag->seq == (seq&IEEE80211_SCTL_SEQ))
+				if (frag->seq == (seq&IEEE80211_SCTL_SEQ))
 					break;
 			if (!frag)
 				goto resubmit;
@@ -376,7 +376,6 @@ static void zd1201_usbrx(struct urb *urb
 				goto resubmit;
 			hlist_del_init(&frag->fnode);
 			kfree(frag);
-			/* Fallthrough */
 		} else {
 			if (datalen<14)
 				goto resubmit;
@@ -422,7 +421,7 @@ static int zd1201_getconfig(struct zd120
 	int rid_fid;
 	int length;
 	unsigned char *pdata;
-	
+
 	zd->rxdatas = 0;
 	err = zd1201_docmd(zd, ZD1201_CMDCODE_ACCESS, rid, 0, 0);
 	if (err)
@@ -471,11 +470,11 @@ static int zd1201_getconfig(struct zd120
 	length = zd->rxlen;
 
 	do {
-		int  actual_length;
+		int actual_length;
 
 		actual_length = (length > 64) ? 64 : length;
 
-		if(pdata[0] != 0x3) {
+		if (pdata[0] != 0x3) {
 			dev_dbg(&zd->usb->dev, "Rx Resource packet type error: %02X\n",
 			    pdata[0]);
 			return -EINVAL;
@@ -487,11 +486,10 @@ static int zd1201_getconfig(struct zd120
 		}
 
 		/* Skip the 4 bytes header (RID length and RID) */
-		if(i == 0) {
+		if (i == 0) {
 			pdata += 8;
 			actual_length -= 8;
-		}
-		else {
+		} else {
 			pdata += 4;
 			actual_length -= 4;
 		}
@@ -620,7 +618,7 @@ static int zd1201_drvr_start(struct zd12
 	short max;
 	__le16 zdmax;
 	unsigned char *buffer;
-	
+
 	buffer = kzalloc(ZD1201_RXSIZE, GFP_KERNEL);
 	if (!buffer)
 		return -ENOMEM;
@@ -632,7 +630,7 @@ static int zd1201_drvr_start(struct zd12
 	err = usb_submit_urb(zd->rx_urb, GFP_KERNEL);
 	if (err)
 		goto err_buffer;
-	
+
 	err = zd1201_docmd(zd, ZD1201_CMDCODE_INIT, 0, 0, 0);
 	if (err)
 		goto err_urb;
@@ -684,7 +682,7 @@ static int zd1201_enable(struct zd1201 *
 static int zd1201_disable(struct zd1201 *zd)
 {
 	int err;
-	
+
 	if (!zd->mac_enabled)
 		return 0;
 	if (zd->monitor) {
@@ -764,7 +762,6 @@ static int zd1201_net_open(struct net_de
 static int zd1201_net_stop(struct net_device *dev)
 {
 	netif_stop_queue(dev);
-	
 	return 0;
 }
 
@@ -915,7 +912,6 @@ static int zd1201_get_name(struct net_de
     struct iw_request_info *info, char *name, char *extra)
 {
 	strcpy(name, "IEEE 802.11b");
-
 	return 0;
 }
 
@@ -1013,11 +1009,10 @@ static int zd1201_set_mode(struct net_de
 			if (err)
 				return err;
 	}
-	zd->monitor=monitor;
+	zd->monitor = monitor;
 	/* If monitor mode is set we don't actually turn it on here since it
 	 * is done during mac reset anyway (see zd1201_mac_enable).
 	 */
-
 	zd1201_mac_reset(zd);
 
 	return 0;
@@ -1117,7 +1112,7 @@ static int zd1201_get_wap(struct net_dev
 		zd->iwstats.qual.updated = 2;
 	}
 
-	return zd1201_getconfig(zd,ZD1201_RID_CURRENTBSSID,ap_addr->sa_data,6);
+	return zd1201_getconfig(zd, ZD1201_RID_CURRENTBSSID, ap_addr->sa_data, 6);
 }
 
 static int zd1201_set_scan(struct net_device *dev,
@@ -1275,7 +1270,7 @@ static int zd1201_set_rate(struct net_de
 	if (!rrq->fixed) { /* Also enable all lower bitrates */
 		rate |= rate-1;
 	}
-	
+
 	err = zd1201_setconfig16(zd, ZD1201_RID_TXRATECNTL, rate);
 	if (err)
 		return err;
@@ -1486,7 +1481,7 @@ static int zd1201_get_encode(struct net_
 		return -EINVAL;
 
 	erq->flags |= i+1;
-	
+
 	erq->length = zd->encode_keylen[i];
 	memcpy(key, zd->encode_keys[i], erq->length);
 
@@ -1529,11 +1524,7 @@ static int zd1201_set_power(struct net_d
 		return -EINVAL;
 	}
 out:
-	err = zd1201_setconfig16(zd, ZD1201_RID_CNFPMENABLED, enabled);
-	if (err)
-		return err;
-
-	return 0;
+	return zd1201_setconfig16(zd, ZD1201_RID_CNFPMENABLED, enabled);
 }
 
 static int zd1201_get_power(struct net_device *dev,
@@ -1627,15 +1618,11 @@ static int zd1201_set_hostauth(struct ne
     struct iw_request_info *info, struct iw_param *rrq, char *extra)
 {
 	struct zd1201 *zd = (struct zd1201 *)dev->priv;
-	int err;
 
 	if (!zd->ap)
 		return -EOPNOTSUPP;
 
-	err = zd1201_setconfig16(zd, ZD1201_RID_CNFHOSTAUTH, rrq->value);
-	if (err)
-		return err;
-	return 0;
+	return zd1201_setconfig16(zd, ZD1201_RID_CNFHOSTAUTH, rrq->value);
 }
 
 static int zd1201_get_hostauth(struct net_device *dev,
@@ -1744,7 +1731,7 @@ static int zd1201_probe(struct usb_inter
 {
 	struct zd1201 *zd;
 	struct usb_device *usb;
-	int i, err;
+	int err;
 	short porttype;
 	char buf[IW_ESSID_MAX_SIZE+2];
 
@@ -1773,9 +1760,7 @@ static int zd1201_probe(struct usb_inter
 	if (!zd->rx_urb || !zd->tx_urb)
 		goto err_zd;
 
-	for(i = 0; i<100; i++)
-		udelay(1000);
-
+	mdelay(100);
 	err = zd1201_drvr_start(zd);
 	if (err)
 		goto err_zd;
@@ -1833,7 +1818,7 @@ static int zd1201_probe(struct usb_inter
 		goto err_net;
 	dev_info(&usb->dev, "%s: ZD1201 USB Wireless interface\n",
 	    zd->dev->name);
-	
+
 	usb_set_intfdata(interface, zd);
 	return 0;
 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related

* Refactor Netlink connector?
From: James Morris @ 2006-05-26 20:04 UTC (permalink / raw)
  To: netdev; +Cc: Evgeniy Polyakov, David S. Miller

I've been looking through the kernel for new subsytems which might need 
LSM hooks, and we've got a proliferation of Netlink abstractions: generic 
Netlink, nfnetlink, connector and kobject_uevent.

I think we should look at consolidating some of these schemes, and if 
possible, into a unififed Netlink API.

As a first step, what would it take to adapt the single user of 
connector (the w1 driver) to use generic Netlink?

I suspect that some of the nfnetlink infrastructure can be used more 
generically, and that a simple API for the common case of kernel->user 
event notifications could be also be provided.

Thoughts?


- James
-- 
James Morris
<jmorris@namei.org>

^ permalink raw reply

* Re: [PATCH 0/9] Resending NetXen 1G/10G NIC driver patch
From: Roland Dreier @ 2006-05-26 20:02 UTC (permalink / raw)
  To: Amit S. Kale; +Cc: Stephen Hemminger, netdev, sanjeev, unmproj
In-Reply-To: <200605261116.50176.amitkale@linsyssoft.com>

    Amit> We'll implement the minor changes rightaway and post an
    Amit> update. We are also thinking about what's the best way to
    Amit> incorporate the data structure changes you have
    Amit> suggested. Will post a reply on that too soon.

By the way, my suggestion to the original posting still stands: use a
descriptive subject line and include a changelog entry for each patch
that you expect to be merged.

 - R.

^ permalink raw reply

* Wireless patches to push for 2.6.18?
From: John W. Linville @ 2006-05-26 19:59 UTC (permalink / raw)
  To: netdev

As David M. so recently reminded us, 2.6.17 is likely to be blessed soon.
That will open a short merge window for non-"fixes" to go into 2.6.18.

Along w/ the patches currently on the 'upstream' branch, I'd like to
see some of the the drivers hanging-out only on the 'master' branch
of wireless-2.6 to get polished-up and pushed-out.  What do you think
are the best candidates?

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/master/

Anyone have anything else they are holding-back for 2.6.18?  What about
the wireless button infrastructure Ivo posted yesterday?  Is that
useful for any of the drivers currently in wireless-2.6?

I was caught a bit 'flat-footed' for the 2.6.17 merge window.
I'd like to be prepared for this one... :-)

Thanks!

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply

* [RFC] new qla3xxx NIC Driver v2.02.00k29 (repost)
From: Ron Mercer @ 2006-05-26 19:46 UTC (permalink / raw)
  To: netdev; +Cc: linux-driver

Reposted with corrected URL.

All,

Third submission for the upstream inclusion of the qla3xxx Ethernet
driver. This is a complementary network driver for our ISP4XXX parts.
There is a concurrent effort underway to get the iSCSI driver (qla4xxx)
integrated upstream as well.

The following files are included and have been posted to the link below:

qla3xxxsrc-v2.02.00k29.tgz

ftp://ftp.qlogic.com/outgoing/linux/network/upstream/20.02.00k29/

Second submission:
http://marc.theaimsgroup.com/?l=linux-netdev&m=114780280407707&w=2

Comments from second submission:
http://marc.theaimsgroup.com/?l=linux-netdev&m=114782208808695&w=2



Changes in this release:
- Reordered code to remove forward declarations.
- Removed typedefs.
- Changed inter-driver hardware lock to use wait_event().
- Removed macros defined inside structure definitions.
- Removed volatile usage.
- Removed wrapper RD_REG_READ/WRITE macros for readl/writel
- Bug fix for msi logic.
- Removed unused debug print functions.
- probe now propagates error codes from api to caller.
- Removed internal send queue and lock dependency.


Looking forward to any and all feedback.

Regards,

Ron Mercer
Qlogic Corporation

^ permalink raw reply

* [PATCH] Fixup struct ip_mc_list::multiaddr type
From: Alexey Dobriyan @ 2006-05-26 19:30 UTC (permalink / raw)
  To: netdev

All users except two expect 32-bit big-endian value. One is of

	->multiaddr = ->multiaddr

variety. And last one is "%08lX".

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/igmp.h |    2 +-
 net/ipv4/igmp.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -2361,7 +2361,7 @@ static int igmp_mc_seq_show(struct seq_f
 		}
 
 		seq_printf(seq,
-			   "\t\t\t\t%08lX %5d %d:%08lX\t\t%d\n",
+			   "\t\t\t\t%08X %5d %d:%08lX\t\t%d\n",
 			   im->multiaddr, im->users,
 			   im->tm_running, im->tm_running ?
 			   jiffies_to_clock_t(im->timer.expires-jiffies) : 0,
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -169,7 +169,7 @@ struct ip_sf_list
 struct ip_mc_list
 {
 	struct in_device	*interface;
-	unsigned long		multiaddr;
+	__be32			multiaddr;
 	struct ip_sf_list	*sources;
 	struct ip_sf_list	*tomb;
 	unsigned int		sfmode;


^ permalink raw reply

* Re: [PATCH, 2.6.17-rc4-git10] ieee80211softmac_io.c: fix warning "defined but not used"
From: John W. Linville @ 2006-05-26 19:24 UTC (permalink / raw)
  To: Toralf Förster; +Cc: netdev, linuxppc-dev
In-Reply-To: <200605231549.43430.toralf.foerster@gmx.de>

On Tue, May 23, 2006 at 03:49:40PM +0200, Toralf Förster wrote:
> Got this compiler warning today and Johannes Berg <johannes@sipsolutions.net> wrote:
> 
> Yeah, known 'bug', we have that code there but never use it. Feel free
> to submit a patch (to John Linville, CC netdev and softmac-dev) to
> remove it.
> 
> Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de>

This patch is whitespace-damaged.  Please teach your mailer not to
convert tabs to spaces and resubmit.

Thanks!

John

> --- linux-2.6.17-rc4-git10-pcie-rme9652/net/ieee80211/softmac/ieee80211softmac_io.c.old 2006-05-12 09:44:47.000000000 +0200
> +++ linux-2.6.17-rc4-git10-pcie-rme9652/net/ieee80211/softmac/ieee80211softmac_io.c     2006-05-23 15:16:38.000000000 +0200
> @@ -456,31 +456,3 @@
>         return IEEE80211_2ADDR_LEN;
>  }
> 
> -
> -/* Sends a control packet */
> -static int
> -ieee80211softmac_send_ctl_frame(struct ieee80211softmac_device *mac,
> -       struct ieee80211softmac_network *net, u32 type, u32 arg)
> -{
> -       void *pkt = NULL;
> -       u32 pkt_size = 0;

<snip>

-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox