* Re: [PATCH] ieee80211_rx_any: filter out packets, call ieee80211_rx or ieee80211_rx_mgt
From: Denis Vlasenko @ 2006-01-22 12:08 UTC (permalink / raw)
To: John W. Linville
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, jbenc-AlSwsSmVLrQ,
softmac-dev-cdvu00un1VgdHxzADdlk8Q,
bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w
In-Reply-To: <200601221359.31482.vda-BN/BzeNzsW2SlH3FCl+8hg@public.gmane.org>
On Sunday 22 January 2006 13:59, Denis Vlasenko wrote:
> bcm43xx_rx() contains code to filter out packets from
> foreign BSSes and decide whether to call ieee80211_rx
> or ieee80211_rx_mgt. This is not bcm specific.
>
> Patch adapts that code and adds it to softmac
> as ieee80211_rx_any() function.
>
> Diffed against wireless-2.6.git
>
> Signed-off-by: Denis Vlasenko <vda-BN/BzeNzsW2SlH3FCl+8hg@public.gmane.org>
> --
> vda
Please ignore this one. This is not good:
+ return ieee80211_rx_mgt(ieee, hdr, stats);
Use corrected patch in my another email with
"Date: Sun, 22 Jan 2006 14:04:52 +0200"
--
vda
^ permalink raw reply
* Re: [Bcm43xx-dev] Re: [PATCH] ieee80211_rx_any: filter out packets, call ieee80211_rx or ieee80211_rx_mgt
From: Michael Buesch @ 2006-01-22 12:25 UTC (permalink / raw)
To: Denis Vlasenko
Cc: bcm43xx-dev, John W. Linville, netdev, linux-kernel, jbenc,
softmac-dev, bcm43xx-dev
In-Reply-To: <200601221408.45486.vda@ilport.com.ua>
[-- Attachment #1: Type: text/plain, Size: 885 bytes --]
On Sunday 22 January 2006 13:08, Denis Vlasenko wrote:
> On Sunday 22 January 2006 13:59, Denis Vlasenko wrote:
> > bcm43xx_rx() contains code to filter out packets from
> > foreign BSSes and decide whether to call ieee80211_rx
> > or ieee80211_rx_mgt. This is not bcm specific.
> >
> > Patch adapts that code and adds it to softmac
> > as ieee80211_rx_any() function.
> >
> > Diffed against wireless-2.6.git
> >
> > Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>
> > --
> > vda
>
> Please ignore this one. This is not good:
>
> + return ieee80211_rx_mgt(ieee, hdr, stats);
>
> Use corrected patch in my another email with
> "Date: Sun, 22 Jan 2006 14:04:52 +0200"
> --
> vda
I would say, please also move the
static inline int is_mcast_or_bcast_ether_addr(const u8 *addr)
function into linux/etherdevice.h
--
Greetings Michael.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* [PATCH] add acx driver to wireless-2.6.git
From: Denis Vlasenko @ 2006-01-22 12:56 UTC (permalink / raw)
To: John W. Linville; +Cc: netdev, linux-kernel, softmac-dev, acx100-devel
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
This patch adds acx "softmac" driver to the wireless-2.6.git
tree.
Standalone (not softmac'ified) acx driver is in -mm for some
time and seems to work well. It contains homegrown 802.11
implementation which even supports AP mode. I think it's pointless
to debug/improve it further, we (acx developers) should concentrate
on improving generic softmac instead.
This patch has much of that code #ifdef'ed out, but not yet
removed.
Driver compiles cleanly and can be modprobed, but won't actually
work yet.
Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>
--
vda
[-- Attachment #2: acx.patch.bz2 --]
[-- Type: application/x-bzip2, Size: 120532 bytes --]
^ permalink raw reply
* Re: [PATCH] ieee80211_rx_any: filter out packets, call ieee80211_rx or ieee80211_rx_mgt
From: Patrick McHardy @ 2006-01-22 13:32 UTC (permalink / raw)
To: Denis Vlasenko
Cc: John W. Linville, netdev, linux-kernel, jbenc, softmac-dev,
bcm43xx-dev
In-Reply-To: <200601221404.52757.vda@ilport.com.ua>
Denis Vlasenko wrote:
> bcm43xx_rx() contains code to filter out packets from
> foreign BSSes and decide whether to call ieee80211_rx
> or ieee80211_rx_mgt. This is not bcm specific.
>
> +/* Kernel doesn't have it, why? */
> +static inline int is_mcast_or_bcast_ether_addr(const u8 *addr)
> +{
> + return (0x01 & addr[0]);
> +}
The same function exists in include/linux/etherdevice.h:
static inline int is_multicast_ether_addr(const u8 *addr)
{
return (0x01 & addr[0]);
}
^ permalink raw reply
* Re: ip_finish_output2: No header cache and no neighbour! in 2.6.15-git7
From: Patrick McHardy @ 2006-01-22 14:07 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Netfilter Development Mailinglist, ak, herbert
In-Reply-To: <20060119.235114.41595062.davem@davemloft.net>
David S. Miller wrote:
> From: Andi Kleen <ak@suse.de>
> Date: Fri, 20 Jan 2006 08:15:39 +0100
>
>>Sorry for the delay in testing. Looks good so far. I'm running with SNAT
>>and the patch and the messages haven't appeared. Will keep it running
>>for longer, but previously they would have started already, so it's probably
>>ok now.
>
>
> Thanks for testing Andi.
>
> Patrick, please send me the final version of the fix you want me to
> put in when you get a chance.
I need to rethink this, my patch breaks SNAT to non-local IPs because
the NAT code will throw the packet away if ip_route_me_harder fails.
^ permalink raw reply
* [2.6 patch] move some code to net/ipx/af_ipx.c
From: Adrian Bunk @ 2006-01-22 17:10 UTC (permalink / raw)
To: acme; +Cc: linux-kernel, netdev
This patch moves some code only used in this file to net/ipx/af_ipx.c .
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 14 Jan 2006
include/net/p8022.h | 13 -----
net/802/Makefile | 14 ++---
net/802/p8022.c | 66 ---------------------------
net/802/p8023.c | 61 -------------------------
net/8021q/vlan.c | 1
net/8021q/vlan_dev.c | 1
net/ethernet/Makefile | 2
net/ethernet/pe2.c | 39 ----------------
net/ipx/af_ipx.c | 102 ++++++++++++++++++++++++++++++++++++++++--
9 files changed, 106 insertions(+), 193 deletions(-)
--- linux-2.6.15-rc1-mm1-full/net/ethernet/Makefile.old 2005-11-18 02:15:17.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/net/ethernet/Makefile 2005-11-18 02:15:22.000000000 +0100
@@ -4,5 +4,3 @@
obj-y += eth.o
obj-$(CONFIG_SYSCTL) += sysctl_net_ether.o
-obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o
-obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o
--- linux-2.6.15-rc1-mm1-full/net/8021q/vlan.c.old 2005-11-18 02:19:40.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/net/8021q/vlan.c 2005-11-18 02:19:46.000000000 +0100
@@ -26,7 +26,6 @@
#include <linux/mm.h>
#include <linux/in.h>
#include <linux/init.h>
-#include <net/p8022.h>
#include <net/arp.h>
#include <linux/rtnetlink.h>
#include <linux/notifier.h>
--- linux-2.6.15-rc1-mm1-full/net/8021q/vlan_dev.c.old 2005-11-18 02:19:55.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/net/8021q/vlan_dev.c 2005-11-18 02:19:58.000000000 +0100
@@ -29,7 +29,6 @@
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <net/datalink.h>
-#include <net/p8022.h>
#include <net/arp.h>
#include "vlan.h"
--- linux-2.6.15-rc1-mm1-full/net/ipx/af_ipx.c.old 2005-11-18 02:17:00.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/net/ipx/af_ipx.c 2005-11-18 02:26:01.000000000 +0100
@@ -48,10 +48,10 @@
#include <linux/termios.h>
#include <net/ipx.h>
-#include <net/p8022.h>
#include <net/psnap.h>
#include <net/sock.h>
#include <net/tcp_states.h>
+#include <net/llc.h>
#include <asm/uaccess.h>
@@ -1939,8 +1939,104 @@
.notifier_call = ipxitf_device_event,
};
-extern struct datalink_proto *make_EII_client(void);
-extern void destroy_EII_client(struct datalink_proto *);
+static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb,
+ unsigned char *dest)
+{
+ llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap);
+ return 0;
+}
+
+static struct datalink_proto *register_8022_client(unsigned char type,
+ int (*func)(struct sk_buff *skb,
+ struct net_device *dev,
+ struct packet_type *pt,
+ struct net_device *orig_dev))
+{
+ struct datalink_proto *proto;
+
+ proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
+ if (proto) {
+ proto->type[0] = type;
+ proto->header_length = 3;
+ proto->request = p8022_request;
+ proto->sap = llc_sap_open(type, func);
+ if (!proto->sap) {
+ kfree(proto);
+ proto = NULL;
+ }
+ }
+ return proto;
+}
+
+static void unregister_8022_client(struct datalink_proto *proto)
+{
+ llc_sap_put(proto->sap);
+ kfree(proto);
+}
+
+/*
+ * Place an 802.3 header on a packet. The driver will do the mac
+ * addresses, we just need to give it the buffer length.
+ */
+static int p8023_request(struct datalink_proto *dl,
+ struct sk_buff *skb, unsigned char *dest_node)
+{
+ struct net_device *dev = skb->dev;
+
+ dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len);
+ return dev_queue_xmit(skb);
+}
+
+/*
+ * Create an 802.3 client. Note there can be only one 802.3 client
+ */
+static struct datalink_proto *make_8023_client(void)
+{
+ struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
+
+ if (proto) {
+ proto->header_length = 0;
+ proto->request = p8023_request;
+ }
+ return proto;
+}
+
+/*
+ * Destroy the 802.3 client.
+ */
+static void destroy_8023_client(struct datalink_proto *dl)
+{
+ kfree(dl);
+}
+
+static int pEII_request(struct datalink_proto *dl,
+ struct sk_buff *skb, unsigned char *dest_node)
+{
+ struct net_device *dev = skb->dev;
+
+ skb->protocol = htons(ETH_P_IPX);
+ if (dev->hard_header)
+ dev->hard_header(skb, dev, ETH_P_IPX,
+ dest_node, NULL, skb->len);
+ return dev_queue_xmit(skb);
+}
+
+static struct datalink_proto *make_EII_client(void)
+{
+ struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
+
+ if (proto) {
+ proto->header_length = 0;
+ proto->request = pEII_request;
+ }
+
+ return proto;
+}
+
+static void destroy_EII_client(struct datalink_proto *dl)
+{
+ kfree(dl);
+}
static unsigned char ipx_8022_type = 0xE0;
static unsigned char ipx_snap_id[5] = { 0x0, 0x0, 0x0, 0x81, 0x37 };
--- linux-2.6.15-rc1-mm1-full/include/net/p8022.h 2005-10-28 02:02:08.000000000 +0200
+++ /dev/null 2005-11-08 19:07:57.000000000 +0100
@@ -1,13 +0,0 @@
-#ifndef _NET_P8022_H
-#define _NET_P8022_H
-extern struct datalink_proto *
- register_8022_client(unsigned char type,
- int (*func)(struct sk_buff *skb,
- struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev));
-extern void unregister_8022_client(struct datalink_proto *proto);
-
-extern struct datalink_proto *make_8023_client(void);
-extern void destroy_8023_client(struct datalink_proto *dl);
-#endif
--- linux-2.6.15-rc1-mm1-full/net/ethernet/pe2.c 2005-11-17 21:30:56.000000000 +0100
+++ /dev/null 2005-11-08 19:07:57.000000000 +0100
@@ -1,39 +0,0 @@
-#include <linux/in.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-
-#include <net/datalink.h>
-
-static int pEII_request(struct datalink_proto *dl,
- struct sk_buff *skb, unsigned char *dest_node)
-{
- struct net_device *dev = skb->dev;
-
- skb->protocol = htons(ETH_P_IPX);
- if (dev->hard_header)
- dev->hard_header(skb, dev, ETH_P_IPX,
- dest_node, NULL, skb->len);
- return dev_queue_xmit(skb);
-}
-
-struct datalink_proto *make_EII_client(void)
-{
- struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
-
- if (proto) {
- proto->header_length = 0;
- proto->request = pEII_request;
- }
-
- return proto;
-}
-
-void destroy_EII_client(struct datalink_proto *dl)
-{
- kfree(dl);
-}
-
-EXPORT_SYMBOL(destroy_EII_client);
-EXPORT_SYMBOL(make_EII_client);
--- linux-2.6.15-rc1-mm1-full/net/802/p8022.c 2005-10-28 02:02:08.000000000 +0200
+++ /dev/null 2005-11-08 19:07:57.000000000 +0100
@@ -1,66 +0,0 @@
-/*
- * NET3: Support for 802.2 demultiplexing off Ethernet (Token ring
- * is kept separate see p8022tr.c)
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Demultiplex 802.2 encoded protocols. We match the entry by the
- * SSAP/DSAP pair and then deliver to the registered datalink that
- * matches. The control byte is ignored and handling of such items
- * is up to the routine passed the frame.
- *
- * Unlike the 802.3 datalink we have a list of 802.2 entries as
- * there are multiple protocols to demux. The list is currently
- * short (3 or 4 entries at most). The current demux assumes this.
- */
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-#include <net/datalink.h>
-#include <linux/mm.h>
-#include <linux/in.h>
-#include <linux/init.h>
-#include <net/llc.h>
-#include <net/p8022.h>
-
-static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb,
- unsigned char *dest)
-{
- llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap);
- return 0;
-}
-
-struct datalink_proto *register_8022_client(unsigned char type,
- int (*func)(struct sk_buff *skb,
- struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev))
-{
- struct datalink_proto *proto;
-
- proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
- if (proto) {
- proto->type[0] = type;
- proto->header_length = 3;
- proto->request = p8022_request;
- proto->sap = llc_sap_open(type, func);
- if (!proto->sap) {
- kfree(proto);
- proto = NULL;
- }
- }
- return proto;
-}
-
-void unregister_8022_client(struct datalink_proto *proto)
-{
- llc_sap_put(proto->sap);
- kfree(proto);
-}
-
-EXPORT_SYMBOL(register_8022_client);
-EXPORT_SYMBOL(unregister_8022_client);
-
-MODULE_LICENSE("GPL");
--- linux-2.6.15-rc1-mm1-full/net/802/p8023.c 2005-11-17 21:30:55.000000000 +0100
+++ /dev/null 2005-11-08 19:07:57.000000000 +0100
@@ -1,61 +0,0 @@
-/*
- * NET3: 802.3 data link hooks used for IPX 802.3
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * 802.3 isn't really a protocol data link layer. Some old IPX stuff
- * uses it however. Note that there is only one 802.3 protocol layer
- * in the system. We don't currently support different protocols
- * running raw 802.3 on different devices. Thankfully nobody else
- * has done anything like the old IPX.
- */
-
-#include <linux/in.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-
-#include <net/datalink.h>
-#include <net/p8022.h>
-
-/*
- * Place an 802.3 header on a packet. The driver will do the mac
- * addresses, we just need to give it the buffer length.
- */
-static int p8023_request(struct datalink_proto *dl,
- struct sk_buff *skb, unsigned char *dest_node)
-{
- struct net_device *dev = skb->dev;
-
- dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len);
- return dev_queue_xmit(skb);
-}
-
-/*
- * Create an 802.3 client. Note there can be only one 802.3 client
- */
-struct datalink_proto *make_8023_client(void)
-{
- struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
-
- if (proto) {
- proto->header_length = 0;
- proto->request = p8023_request;
- }
- return proto;
-}
-
-/*
- * Destroy the 802.3 client.
- */
-void destroy_8023_client(struct datalink_proto *dl)
-{
- kfree(dl);
-}
-
-EXPORT_SYMBOL(destroy_8023_client);
-EXPORT_SYMBOL(make_8023_client);
--- linux-2.6.15-mm3-full/net/802/Makefile.old 2006-01-14 02:55:28.000000000 +0100
+++ linux-2.6.15-mm3-full/net/802/Makefile 2006-01-14 02:55:50.000000000 +0100
@@ -4,10 +4,10 @@
# Check the p8022 selections against net/core/Makefile.
obj-$(CONFIG_SYSCTL) += sysctl_net_802.o
-obj-$(CONFIG_LLC) += p8022.o psnap.o
-obj-$(CONFIG_TR) += p8022.o psnap.o tr.o sysctl_net_802.o
-obj-$(CONFIG_NET_FC) += fc.o
-obj-$(CONFIG_FDDI) += fddi.o
-obj-$(CONFIG_HIPPI) += hippi.o
-obj-$(CONFIG_IPX) += p8022.o psnap.o p8023.o
-obj-$(CONFIG_ATALK) += p8022.o psnap.o
+obj-$(CONFIG_LLC) += psnap.o
+obj-$(CONFIG_TR) += psnap.o tr.o sysctl_net_802.o
+obj-$(CONFIG_NET_FC) += fc.o
+obj-$(CONFIG_FDDI) += fddi.o
+obj-$(CONFIG_HIPPI) += hippi.o
+obj-$(CONFIG_IPX) += psnap.o
+obj-$(CONFIG_ATALK) += psnap.o
^ permalink raw reply
* [-mm patch] drivers/net/wireless/tiacx/: remove code for WIRELESS_EXT < 18
From: Adrian Bunk @ 2006-01-22 17:11 UTC (permalink / raw)
To: Denis Vlasenko; +Cc: John W. Linville, jgarzik, netdev, linux-kernel
WIRELESS_EXT < 18 will never be true in the kernel.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 14 Jan 2006
drivers/net/wireless/tiacx/acx_struct.h | 5
drivers/net/wireless/tiacx/common.c | 4
drivers/net/wireless/tiacx/conv.c | 2
drivers/net/wireless/tiacx/ioctl.c | 436 -----------------------
drivers/net/wireless/tiacx/pci.c | 8
drivers/net/wireless/tiacx/usb.c | 6
drivers/net/wireless/tiacx/wlan.c | 2
drivers/net/wireless/tiacx/wlan_compat.h | 10
8 files changed, 1 insertion(+), 472 deletions(-)
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/acx_struct.h.old 2005-12-03 02:58:36.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/acx_struct.h 2005-12-03 02:59:36.000000000 +0100
@@ -1053,9 +1053,8 @@
* the struct net_device. */
/*** Device statistics ***/
struct net_device_stats stats; /* net device statistics */
-#ifdef WIRELESS_EXT
struct iw_statistics wstats; /* wireless statistics */
-#endif
+
/*** Power managment ***/
struct pm_dev *pm; /* PM crap */
@@ -1103,9 +1102,7 @@
u8 scan_rate;
u16 scan_duration;
u16 scan_probe_delay;
-#if WIRELESS_EXT > 15
struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
-#endif
/*** Wireless network settings ***/
/* copy of the device address (ifconfig hw ether) that we actually use
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/common.c.old 2005-12-03 02:59:47.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/common.c 2005-12-03 03:00:04.000000000 +0100
@@ -46,9 +46,7 @@
#include <linux/wireless.h>
#include <linux/pm.h>
#include <linux/vmalloc.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif /* WE >= 13 */
#include "acx.h"
@@ -2707,7 +2705,6 @@
acxlog(L_ASSOC, "%s(%d):%s\n",
__func__, new_status, acx_get_status_name(new_status));
-#if WIRELESS_EXT > 13 /* wireless_send_event() and SIOCGIWSCAN */
/* wireless_send_event never sleeps */
if (ACX_STATUS_4_ASSOCIATED == new_status) {
union iwreq_data wrqu;
@@ -2729,7 +2726,6 @@
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->netdev, SIOCGIWAP, &wrqu, NULL);
}
-#endif
priv->status = new_status;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/conv.c.old 2005-12-03 03:00:17.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/conv.c 2005-12-03 03:00:26.000000000 +0100
@@ -36,9 +36,7 @@
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include "acx.h"
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/pci.c.old 2005-12-03 03:02:16.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/pci.c 2005-12-03 03:02:30.000000000 +0100
@@ -45,9 +45,7 @@
#include <linux/if_arp.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include <linux/netdevice.h>
#include <linux/ioport.h>
#include <linux/pci.h>
@@ -1820,11 +1818,7 @@
dev->hard_start_xmit = &acx_i_start_xmit;
dev->get_stats = &acx_e_get_stats;
dev->get_wireless_stats = &acx_e_get_wireless_stats;
-#if WIRELESS_EXT >= 13
dev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
-#else
- dev->do_ioctl = &acx_e_ioctl_old;
-#endif
dev->set_multicast_list = &acxpci_i_set_multicast_list;
dev->tx_timeout = &acxpci_i_tx_timeout;
dev->change_mtu = &acx_e_change_mtu;
@@ -3842,7 +3836,6 @@
r100 = txdesc->u.r1.rate;
r111 = txdesc->u.r2.rate111;
-#if WIRELESS_EXT > 13 /* wireless_send_event() and IWEVTXDROP are WE13 */
/* need to check for certain error conditions before we
* clean the descriptor: we still need valid descr data here */
if (unlikely(0x30 & error)) {
@@ -3857,7 +3850,6 @@
MAC_COPY(wrqu.addr.sa_data, hdr->a1);
wireless_send_event(priv->netdev, IWEVTXDROP, &wrqu, NULL);
}
-#endif
/* ...and free the desc */
txdesc->error = 0;
txdesc->ack_failures = 0;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan.c.old 2005-12-03 03:02:58.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan.c 2005-12-03 03:03:02.000000000 +0100
@@ -43,9 +43,7 @@
#include <linux/types.h>
#include <linux/if_arp.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include "acx.h"
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan_compat.h.old 2005-12-03 03:03:11.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan_compat.h 2005-12-03 03:03:19.000000000 +0100
@@ -228,15 +228,6 @@
typedef struct net_device netdevice_t;
#endif
-#ifdef WIRELESS_EXT
-#if (WIRELESS_EXT < 13)
-struct iw_request_info {
- __u16 cmd; /* Wireless Extension command */
- __u16 flags; /* More to come ;-) */
-};
-#endif
-#endif
-
/* Interrupt handler backwards compatibility stuff */
#ifndef IRQ_NONE
#define IRQ_NONE
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--- linux-2.6.15-mm3-full/drivers/net/wireless/tiacx/ioctl.c.old 2006-01-14 15:56:54.000000000 +0100
+++ linux-2.6.15-mm3-full/drivers/net/wireless/tiacx/ioctl.c 2006-01-14 15:59:12.000000000 +0100
@@ -39,9 +39,7 @@
#include <linux/if_arp.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif /* WE >= 13 */
#include "acx.h"
@@ -330,11 +328,9 @@
case IW_MODE_AUTO:
priv->mode = ACX_MODE_OFF;
break;
-#if WIRELESS_EXT > 14
case IW_MODE_MONITOR:
priv->mode = ACX_MODE_MONITOR;
break;
-#endif /* WIRELESS_EXT > 14 */
case IW_MODE_ADHOC:
priv->mode = ACX_MODE_0_ADHOC;
break;
@@ -382,10 +378,8 @@
switch (priv->mode) {
case ACX_MODE_OFF:
*uwrq = IW_MODE_AUTO; break;
-#if WIRELESS_EXT > 14
case ACX_MODE_MONITOR:
*uwrq = IW_MODE_MONITOR; break;
-#endif /* WIRELESS_EXT > 14 */
case ACX_MODE_0_ADHOC:
*uwrq = IW_MODE_ADHOC; break;
case ACX_MODE_2_STA:
@@ -617,7 +611,6 @@
}
-#if WIRELESS_EXT > 13
/***********************************************************************
** acx_s_scan_add_station
*/
@@ -772,7 +765,6 @@
FN_EXIT1(result);
return result;
}
-#endif /* WIRELESS_EXT > 13 */
/*----------------------------------------------------------------
@@ -1486,39 +1478,6 @@
/***********************************************************************
-** Private functions
-*/
-
-#if WIRELESS_EXT < 13
-/***********************************************************************
-** acx_ioctl_get_iw_priv
-**
-** I added the monitor mode and changed the stuff below
-** to look more like the orinoco driver
-*/
-static int
-acx_ioctl_get_iw_priv(struct iwreq *iwr)
-{
- int result = -EINVAL;
-
- if (!iwr->u.data.pointer)
- return -EINVAL;
- result = verify_area(VERIFY_WRITE, iwr->u.data.pointer,
- sizeof(acx_ioctl_private_args));
- if (result)
- return result;
-
- iwr->u.data.length = VEC_SIZE(acx_ioctl_private_args);
- if (copy_to_user(iwr->u.data.pointer,
- acx_ioctl_private_args, sizeof(acx_ioctl_private_args)) != 0)
- result = -EFAULT;
-
- return result;
-}
-#endif
-
-
-/***********************************************************************
** acx_ioctl_get_nick
*/
static inline int
@@ -2585,7 +2544,6 @@
/***********************************************************************
*/
-#if WIRELESS_EXT >= 13
static const iw_handler acx_ioctl_handler[] =
{
(iw_handler) acx_ioctl_commit, /* SIOCSIWCOMMIT */
@@ -2624,13 +2582,8 @@
(iw_handler) acx_ioctl_get_ap, /* SIOCGIWAP */
(iw_handler) NULL, /* [nothing] */
(iw_handler) acx_ioctl_get_aplist, /* SIOCGIWAPLIST */
-#if WIRELESS_EXT > 13
(iw_handler) acx_ioctl_set_scan, /* SIOCSIWSCAN */
(iw_handler) acx_ioctl_get_scan, /* SIOCGIWSCAN */
-#else /* WE > 13 */
- (iw_handler) NULL, /* SIOCSIWSCAN */
- (iw_handler) NULL, /* SIOCGIWSCAN */
-#endif /* WE > 13 */
(iw_handler) acx_ioctl_set_essid, /* SIOCSIWESSID */
(iw_handler) acx_ioctl_get_essid, /* SIOCGIWESSID */
(iw_handler) acx_ioctl_set_nick, /* SIOCSIWNICKN */
@@ -2694,392 +2647,3 @@
.private_args = (struct iw_priv_args *) acx_ioctl_private_args,
};
-#endif /* WE >= 13 */
-
-
-#if WIRELESS_EXT < 13
-/***********************************************************************
-** Main function
-**
-** acx_e_ioctl_old
-**
-** This is the *OLD* ioctl handler.
-** Make sure to not only place your additions here, but instead mainly
-** in the new one (acx_ioctl_handler[])!
-*/
-int
-acx_e_ioctl_old(netdevice_t *dev, struct ifreq *ifr, int cmd)
-{
- wlandevice_t *priv = netdev_priv(dev);
- int result = 0;
- struct iwreq *iwr = (struct iwreq *)ifr;
-
- log(L_IOCTL, "%s cmd = 0x%04X\n", __func__, cmd);
-
- /* This is the way it is done in the orinoco driver.
- * Check to see if device is present.
- */
- if (0 == netif_device_present(dev)) {
- return -ENODEV;
- }
-
- switch (cmd) {
-/* WE 13 and higher will use acx_ioctl_handler_def */
- case SIOCGIWNAME:
- /* get name == wireless protocol */
- result = acx_ioctl_get_name(dev, NULL,
- (char *)&(iwr->u.name), NULL);
- break;
-
- case SIOCSIWNWID: /* pre-802.11, */
- case SIOCGIWNWID: /* not supported. */
- result = -EOPNOTSUPP;
- break;
-
- case SIOCSIWFREQ:
- /* set channel/frequency (Hz)
- data can be frequency or channel :
- 0-1000 = channel
- > 1000 = frequency in Hz */
- result = acx_ioctl_set_freq(dev, NULL, &(iwr->u.freq), NULL);
- break;
-
- case SIOCGIWFREQ:
- /* get channel/frequency (Hz) */
- result = acx_ioctl_get_freq(dev, NULL, &(iwr->u.freq), NULL);
- break;
-
- case SIOCSIWMODE:
- /* set operation mode */
- result = acx_ioctl_set_mode(dev, NULL, &(iwr->u.mode), NULL);
- break;
-
- case SIOCGIWMODE:
- /* get operation mode */
- result = acx_ioctl_get_mode(dev, NULL, &(iwr->u.mode), NULL);
- break;
-
- case SIOCSIWSENS:
- /* Set sensitivity */
- result = acx_ioctl_set_sens(dev, NULL, &(iwr->u.sens), NULL);
- break;
-
- case SIOCGIWSENS:
- /* Get sensitivity */
- result = acx_ioctl_get_sens(dev, NULL, &(iwr->u.sens), NULL);
- break;
-
-#if WIRELESS_EXT > 10
- case SIOCGIWRANGE:
- /* Get range of parameters */
- {
- struct iw_range range;
- result = acx_ioctl_get_range(dev, NULL,
- &(iwr->u.data), (char *)&range);
- if (copy_to_user(iwr->u.data.pointer, &range,
- sizeof(struct iw_range)))
- result = -EFAULT;
- }
- break;
-#endif
-
- case SIOCGIWPRIV:
- result = acx_ioctl_get_iw_priv(iwr);
- break;
-
- /* case SIOCSIWSPY: */
- /* case SIOCGIWSPY: */
- /* case SIOCSIWTHRSPY: */
- /* case SIOCGIWTHRSPY: */
-
- case SIOCSIWAP:
- /* set access point by MAC address */
- result = acx_ioctl_set_ap(dev, NULL, &(iwr->u.ap_addr),
- NULL);
- break;
-
- case SIOCGIWAP:
- /* get access point MAC address */
- result = acx_ioctl_get_ap(dev, NULL, &(iwr->u.ap_addr),
- NULL);
- break;
-
- case SIOCGIWAPLIST:
- /* get list of access points in range */
- result = acx_ioctl_get_aplist(dev, NULL, &(iwr->u.data),
- NULL);
- break;
-
-#if NOT_FINISHED_YET
- case SIOCSIWSCAN:
- /* start a station scan */
- result = acx_ioctl_set_scan(iwr, priv);
- break;
-
- case SIOCGIWSCAN:
- /* get list of stations found during scan */
- result = acx_ioctl_get_scan(iwr, priv);
- break;
-#endif
-
- case SIOCSIWESSID:
- /* set ESSID (network name) */
- {
- char essid[IW_ESSID_MAX_SIZE+1];
-
- if (iwr->u.essid.length > IW_ESSID_MAX_SIZE)
- {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(essid, iwr->u.essid.pointer,
- iwr->u.essid.length))
- {
- result = -EFAULT;
- break;
- }
- result = acx_ioctl_set_essid(dev, NULL,
- &(iwr->u.essid), essid);
- }
- break;
-
- case SIOCGIWESSID:
- /* get ESSID */
- {
- char essid[IW_ESSID_MAX_SIZE+1];
- if (iwr->u.essid.pointer)
- result = acx_ioctl_get_essid(dev, NULL,
- &(iwr->u.essid), essid);
- if (copy_to_user(iwr->u.essid.pointer, essid,
- iwr->u.essid.length))
- result = -EFAULT;
- }
- break;
-
- case SIOCSIWNICKN:
- /* set nick */
- {
- char nick[IW_ESSID_MAX_SIZE+1];
-
- if (iwr->u.data.length > IW_ESSID_MAX_SIZE)
- {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(nick, iwr->u.data.pointer,
- iwr->u.data.length))
- {
- result = -EFAULT;
- break;
- }
- result = acx_ioctl_set_nick(dev, NULL,
- &(iwr->u.data), nick);
- }
- break;
-
- case SIOCGIWNICKN:
- /* get nick */
- {
- char nick[IW_ESSID_MAX_SIZE+1];
- if (iwr->u.data.pointer)
- result = acx_ioctl_get_nick(dev, NULL,
- &(iwr->u.data), nick);
- if (copy_to_user(iwr->u.data.pointer, nick,
- iwr->u.data.length))
- result = -EFAULT;
- }
- break;
-
- case SIOCSIWRATE:
- /* set default bit rate (bps) */
- result = acx_ioctl_set_rate(dev, NULL, &(iwr->u.bitrate),
- NULL);
- break;
-
- case SIOCGIWRATE:
- /* get default bit rate (bps) */
- result = acx_ioctl_get_rate(dev, NULL, &(iwr->u.bitrate),
- NULL);
- break;
-
- case SIOCSIWRTS:
- /* set RTS threshold value */
- result = acx_ioctl_set_rts(dev, NULL, &(iwr->u.rts), NULL);
- break;
- case SIOCGIWRTS:
- /* get RTS threshold value */
- result = acx_ioctl_get_rts(dev, NULL, &(iwr->u.rts), NULL);
- break;
-
- /* case SIOCSIWFRAG: */
- /* case SIOCGIWFRAG: */
-
-#if WIRELESS_EXT > 9
- case SIOCGIWTXPOW:
- /* get tx power */
- result = acx_ioctl_get_txpow(dev, NULL, &(iwr->u.txpower),
- NULL);
- break;
-
- case SIOCSIWTXPOW:
- /* set tx power */
- result = acx_ioctl_set_txpow(dev, NULL, &(iwr->u.txpower),
- NULL);
- break;
-#endif
-
- case SIOCSIWRETRY:
- result = acx_ioctl_set_retry(dev, NULL, &(iwr->u.retry), NULL);
- break;
-
- case SIOCGIWRETRY:
- result = acx_ioctl_get_retry(dev, NULL, &(iwr->u.retry), NULL);
- break;
-
- case SIOCSIWENCODE:
- {
- /* set encoding token & mode */
- u8 key[29];
- if (iwr->u.encoding.pointer) {
- if (iwr->u.encoding.length > 29) {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(key, iwr->u.encoding.pointer,
- iwr->u.encoding.length)) {
- result = -EFAULT;
- break;
- }
- }
- else
- if (iwr->u.encoding.length) {
- result = -EINVAL;
- break;
- }
- result = acx_ioctl_set_encode(dev, NULL,
- &(iwr->u.encoding), key);
- }
- break;
-
- case SIOCGIWENCODE:
- {
- /* get encoding token & mode */
- u8 key[29];
-
- result = acx_ioctl_get_encode(dev, NULL,
- &(iwr->u.encoding), key);
- if (iwr->u.encoding.pointer) {
- if (copy_to_user(iwr->u.encoding.pointer,
- key, iwr->u.encoding.length))
- result = -EFAULT;
- }
- }
- break;
-
- /******************** iwpriv ioctls below ********************/
-#if ACX_DEBUG
- case ACX100_IOCTL_DEBUG:
- acx_ioctl_set_debug(dev, NULL, NULL, iwr->u.name);
- break;
-#endif
-
- case ACX100_IOCTL_SET_PLED:
- acx100_ioctl_set_led_power(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_PLED:
- acx100_ioctl_get_led_power(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_LIST_DOM:
- acx_ioctl_list_reg_domain(dev, NULL, NULL, NULL);
- break;
-
- case ACX100_IOCTL_SET_DOM:
- acx_ioctl_set_reg_domain(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_DOM:
- acx_ioctl_get_reg_domain(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_SCAN_PARAMS:
- acx_ioctl_set_scan_params(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_SCAN_PARAMS:
- acx_ioctl_get_scan_params(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_PREAMB:
- acx_ioctl_set_short_preamble(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_PREAMB:
- acx_ioctl_get_short_preamble(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_ANT:
- acx_ioctl_set_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_ANT:
- acx_ioctl_get_antenna(dev, NULL, NULL, NULL);
- break;
-
- case ACX100_IOCTL_RX_ANT:
- acx_ioctl_set_rx_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_TX_ANT:
- acx_ioctl_set_tx_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_ED:
- acx_ioctl_set_ed_threshold(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_CCA:
- acx_ioctl_set_cca(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_MONITOR: /* set sniff (monitor) mode */
- log(L_IOCTL, "%s: IWPRIV monitor\n", dev->name);
-
- /* can only be done by admin */
- if (!capable(CAP_NET_ADMIN)) {
- result = -EPERM;
- break;
- }
- result = acx_ioctl_wlansniff(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_TEST:
- acx_ioctl_unknown11(dev, NULL, NULL, NULL);
- break;
-
- case ACX111_IOCTL_INFO:
- acx111_ioctl_info(dev, NULL, NULL, NULL);
- break;
-
- default:
- log(L_IOCTL, "wireless ioctl 0x%04X queried "
- "but not implemented yet\n", cmd);
- result = -EOPNOTSUPP;
- break;
- }
-
- if ((priv->dev_state_mask & ACX_STATE_IFACE_UP) && priv->set_mask) {
- acx_sem_lock(priv);
- acx_s_update_card_settings(priv);
- acx_sem_unlock(priv);
- }
-
- /* older WEs don't have a commit handler,
- * so we need to fix return code in this case */
- if (-EINPROGRESS == result)
- result = 0;
-
- return result;
-}
-#endif /* WE < 13 */
--- linux-2.6.15-mm3-full/drivers/net/wireless/tiacx/usb.c.old 2006-01-14 15:57:02.000000000 +0100
+++ linux-2.6.15-mm3-full/drivers/net/wireless/tiacx/usb.c 2006-01-14 15:57:31.000000000 +0100
@@ -57,9 +57,7 @@
#include <linux/rtnetlink.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include <linux/vmalloc.h>
#include "acx.h"
@@ -622,11 +620,7 @@
dev->hard_start_xmit = (void *)&acx_i_start_xmit;
dev->get_stats = (void *)&acx_e_get_stats;
dev->get_wireless_stats = (void *)&acx_e_get_wireless_stats;
-#if WIRELESS_EXT >= 13
dev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
-#else
- dev->do_ioctl = (void *)&acx_e_ioctl_old;
-#endif
dev->set_multicast_list = (void *)&acxusb_i_set_rx_mode;
#ifdef HAVE_TX_TIMEOUT
dev->tx_timeout = &acxusb_i_tx_timeout;
^ permalink raw reply
* Re: [2.6 patch] schedule SHAPER for removal
From: Benjamin LaHaise @ 2006-01-22 17:47 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Andrew Morton, Alan Cox, jgarzik, netdev, linux-kernel
In-Reply-To: <20060121004848.GM31803@stusta.de>
On Sat, Jan 21, 2006 at 01:48:48AM +0100, Adrian Bunk wrote:
> Do we really have to wait the three years between stable Debian releases
> for removing an obsolete driver that has always been marked as
> EXPERIMENTAL?
>
> Please be serious.
I am completely serious. The traditional cycle of obsolete code that works
and is not causing a maintenence burden is 2 major releases -- one release
during which the obsolete feature spews warnings on use, and another
development cycle until it is actually removed. That's at least 3 years,
which is still pretty short compared to distro cycles.
There seems to be a lot of this disease of removing code for the sake of
removal lately, and it's getting to the point of being really annoying. If
the maintainer of the code in question isn't pushing for its removal, I see
no need to rush the process too much, especially when the affected users
aren't even likely to see the feature being marked obsolete since they don't
troll the source code looking for things that break setups.
-ben
^ permalink raw reply
* Re: [2.6 patch] schedule SHAPER for removal
From: Adrian Bunk @ 2006-01-22 18:20 UTC (permalink / raw)
To: Benjamin LaHaise; +Cc: Andrew Morton, Alan Cox, jgarzik, netdev, linux-kernel
In-Reply-To: <20060122174707.GC1008@kvack.org>
On Sun, Jan 22, 2006 at 12:47:07PM -0500, Benjamin LaHaise wrote:
> On Sat, Jan 21, 2006 at 01:48:48AM +0100, Adrian Bunk wrote:
> > Do we really have to wait the three years between stable Debian releases
> > for removing an obsolete driver that has always been marked as
> > EXPERIMENTAL?
> >
> > Please be serious.
>
> I am completely serious. The traditional cycle of obsolete code that works
> and is not causing a maintenence burden is 2 major releases -- one release
> during which the obsolete feature spews warnings on use, and another
> development cycle until it is actually removed. That's at least 3 years,
> which is still pretty short compared to distro cycles.
>
> There seems to be a lot of this disease of removing code for the sake of
> removal lately, and it's getting to the point of being really annoying. If
> the maintainer of the code in question isn't pushing for its removal, I see
> no need to rush the process too much, especially when the affected users
> aren't even likely to see the feature being marked obsolete since they don't
> troll the source code looking for things that break setups.
The only supported combinations are distributions with the kernels they
ship.
E.g. running Debian stable with any kernel > 2.6.8 is simply not
supported.
The only point where users are supposed to see such changes are upgrades
to new releases of their distribution - and this is anyways a point
where you have to double-check whether it hadn't broken anything.
And the kernel isn't the main thing where things break during
distribution upgrades - userspace breakages are much more common.
As an example, not so long ago an upgrade of the hdparm package on my
Debian unstable system broke one local boot script I'm using because
upstream removed the short form of an option.
And GNU make 3.81 will contain some backwards incompatible changes for
being more POSIX compliant.
And many more changes I do not remember.
Distributions can document usespace-visible changes, but avoiding them
is simply not possible.
> -ben
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* Re: [2.6 patch] schedule SHAPER for removal
From: Arjan van de Ven @ 2006-01-22 18:32 UTC (permalink / raw)
To: Adrian Bunk
Cc: Benjamin LaHaise, Andrew Morton, Alan Cox, jgarzik, netdev,
linux-kernel
In-Reply-To: <20060122182034.GG10003@stusta.de>
On Sun, 2006-01-22 at 19:20 +0100, Adrian Bunk wrote:
> On Sun, Jan 22, 2006 at 12:47:07PM -0500, Benjamin LaHaise wrote:
> > On Sat, Jan 21, 2006 at 01:48:48AM +0100, Adrian Bunk wrote:
> > > Do we really have to wait the three years between stable Debian releases
> > > for removing an obsolete driver that has always been marked as
> > > EXPERIMENTAL?
> > >
> > > Please be serious.
> >
> > I am completely serious. The traditional cycle of obsolete code that works
> > and is not causing a maintenence burden is 2 major releases -- one release
> > during which the obsolete feature spews warnings on use, and another
> > development cycle until it is actually removed. That's at least 3 years,
> > which is still pretty short compared to distro cycles.
> >
> > There seems to be a lot of this disease of removing code for the sake of
> > removal lately, and it's getting to the point of being really annoying. If
> > the maintainer of the code in question isn't pushing for its removal, I see
> > no need to rush the process too much, especially when the affected users
> > aren't even likely to see the feature being marked obsolete since they don't
> > troll the source code looking for things that break setups.
>
> The only supported combinations are distributions with the kernels they
> ship.
I think you're being unreasonable here.
Removing unused code from the kernel, I'm all for that. Really.
But this is userspace visible functionality, and more care needs to be
taken than just adding a few lines to an obscure file in the kernel.
I agree with Ben that the kernel needs to printk a stern warning *AT USE
OF THE FEATURE* for at least a year before such a feature can be
removed. In addition I think that in case such a feature isn't actually
harmful of further development (for example, it could be because it's
fundamentally broken locking wise, or holding back major improvements)
then a longer period of warnings should be no problem. Together with
that should probably be something to ask distros to stop enabling the
feature asap, or at least communicate it as deprecated in their
respective release notes.
^ permalink raw reply
* Re: Fw: [Bugme-new] [Bug 5936] New: Openswan tunnels + netfilter problem
From: Patrick McHardy @ 2006-01-22 20:56 UTC (permalink / raw)
To: webmaster; +Cc: Andrew Morton, netdev, Netfilter Development Mailinglist
In-Reply-To: <20060122121301.033997ca.akpm@osdl.org>
Andrew Morton wrote:
>
> Begin forwarded message:
>
> Date: Sun, 22 Jan 2006 12:02:22 -0800
> From: bugme-daemon@bugzilla.kernel.org
> To: bugme-new@lists.osdl.org
> Subject: [Bugme-new] [Bug 5936] New: Openswan tunnels + netfilter problem
>
>
> http://bugzilla.kernel.org/show_bug.cgi?id=5936
>
> Summary: Openswan tunnels + netfilter problem
> Kernel Version: 2.6.16-rc1
> Status: NEW
> Severity: high
> Owner: laforge@gnumonks.org
> Submitter: webmaster@elnportal.it
>
>
> Jan 22 20:23:17 router kernel: Unable to handle kernel NULL pointer
> dereference at 000000000000009c RIP:
> Jan 22 20:23:17 router kernel: <ffffffff80345195>{xfrm4_output_finish+293}
> Jan 22 20:23:17 router kernel: PGD 35377067 PUD 0
> Jan 22 20:23:17 router kernel: Oops: 0000 [6]
> Jan 22 20:23:17 router kernel: CPU 0
> Jan 22 20:23:17 router kernel: Modules linked in: af_key deflate
> zlib_deflate twofish serpent blowfish sha256 crypto_null ae$
Please post your iptables rules and the full list of loaded modules.
^ permalink raw reply
* Re: [2.6 patch] schedule SHAPER for removal
From: Dave Jones @ 2006-01-22 21:21 UTC (permalink / raw)
To: Arjan van de Ven
Cc: Adrian Bunk, Benjamin LaHaise, Andrew Morton, Alan Cox, jgarzik,
netdev, linux-kernel
In-Reply-To: <1137954776.3328.31.camel@laptopd505.fenrus.org>
On Sun, Jan 22, 2006 at 07:32:56PM +0100, Arjan van de Ven wrote:
> > The only supported combinations are distributions with the kernels they
> > ship.
>
> I think you're being unreasonable here.
Absolutely. The statement is also completely false.
Fedora rebases to a new point release shortly after they become available
(in reality usually just after the .1 -stable release).
At least part of the reason is that with 3-4000 changes going in upstream
per release, the amount of work backporting fixes is just totally impractical.
I just looked over feature-removal-schedule.txt for things that are probably
going to impact us due to our rebasing.
The only thing there that could cause major heartburn for FC4 users is
Dominik's proposal to remove PCMCIA control ioctl (scheduled for Last November).
Migrating already working setups from pcmcia-cs to pcmcia-utils when an
update kernel gets pushed out gives me the creeps, especially as we're still
not at a state where 'everything works' in our FC5-development branch.
(I'd feel more comfortable retrofitting this after its been through a stable
distro release and got a lot of exposure).
So if the old pcmcia code got ripped out in 2.6.17, chances are I'd carry
a 'revert this bunch of changes' patch for future FC4 updates.
Not that big a deal, but probably a days work to build & test,
plus ongoing maintainence to rediff the patch on future updates.
Pretty much everything else there is either only of impact to out-of-tree
modules, for which I couldn't really care less, or they're bits of functionality
that we have moved off already, or have disabled. (Though I'm not entirely
sure everything has moved off of V4L1 yet without going and checking)
> In addition I think that in case such a feature isn't actually
> harmful of further development (for example, it could be because it's
> fundamentally broken locking wise, or holding back major improvements)
> then a longer period of warnings should be no problem. Together with
> that should probably be something to ask distros to stop enabling the
> feature asap, or at least communicate it as deprecated in their
> respective release notes.
Sounds very practical, and something I'd be totally open to doing for Fedora.
Dave
^ permalink raw reply
* RE: My vote against eepro* removal
From: kus Kusche Klaus @ 2006-01-23 11:01 UTC (permalink / raw)
To: John Ronciak, Lee Revell
Cc: Evgeniy Polyakov, Adrian Bunk, linux-kernel, john.ronciak,
ganesh.venkatesan, jesse.brandeburg, netdev, Steven Rostedt
From: John Ronciak
> Can we try a couple of things? 1) just comment out all the check for
> link code in the e100 driver and give that a try and 2) just comment
> out the update stats call and see if that works. These seem to be the
> differences and we need to know which one is causing the problem.
First of all, I am still unable to get any traces of this in the
latency tracer. Moreover, as I told before, removing parts of the
watchdog usually made my eth0 nonfunctional (which is bad - this
is an embedded system with ssh access).
Hence, I explicitely instrumented the watchdog function with tsc.
Output of the timings is done by a background thread, so the
timings should not increase the runtime of the watchdog.
Here are my results:
If the watchdog doesn't get interrupted, preempted, or whatever,
it spends 340 us in its body:
* 303 us in the mii code
* 36 us in the following code up to e100_adjust_adaptive_ifs
* 1 us in the remaining code (I think my chip doesn't need any
of those chip-specific fixups)
The 303 us in the mii code are divided in the following way:
* 101 us in mii_ethtool_gset
* 135 us in the whole if
* 67 us in mii_check_link
This is with the udelay(2) instead of udelay(20) hack applied.
With udelay(20), the mii times are 128 + 170 + 85 us,
i.e. 383 us instead of 303 us, or >= 420 us for the whole watchdog.
As the RTC runs with 8192 Hz during my tests, the watchdog is hit
by 2-3 interrupts, which adds another 75 - 110 us to its total
execution time, i.e. the time it blocks other rtprio 1 threads.
--
Klaus Kusche (Software Development - Control Systems)
KEBA AG Gewerbepark Urfahr, A-4041 Linz, Austria (Europe)
Tel: +43 / 732 / 7090-3120 Fax: +43 / 732 / 7090-6301
E-Mail: kus@keba.com WWW: www.keba.com
^ permalink raw reply
* Re: [softmac-dev] [PATCH] ieee80211_rx_any: filter out packets, call ieee80211_rx or ieee80211_rx_mgt
From: Johannes Berg @ 2006-01-23 14:32 UTC (permalink / raw)
To: Denis Vlasenko
Cc: John W. Linville, jbenc, netdev, softmac-dev, linux-kernel,
bcm43xx-dev
In-Reply-To: <200601221404.52757.vda@ilport.com.ua>
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
On Sun, 2006-01-22 at 14:04 +0200, Denis Vlasenko wrote:
> + hdr = (struct ieee80211_hdr_4addr *)skb->data;:
> + fc = le16_to_cpu(hdr->frame_ctl);:
> +:
> + switch (fc & IEEE80211_FCTL_FTYPE) {:
> + case IEEE80211_FTYPE_MGMT:
> + ieee80211_rx_mgt(ieee, hdr, stats);:
> + return 0;:
Shouldn't you BSS-filter management packets too?
> + is_packet_for_us = 0;:
> + switch (ieee->iw_mode) {:
> + case IW_MODE_ADHOC:
> + /* promisc: get all */
> + if (ieee->dev->flags & IFF_PROMISC):
> + is_packet_for_us = 1;
And I still think BSS-filtering is correct even in the promisc case. Any
other opinions why either way is right or not? [I think we should filter
because upper layers won't know the packet wasn't for us if it was
broadcast in another BSSID]
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply
* [PATCH 00/00] pktgen: refinements and small fixes.
From: Luiz Fernando Capitulino @ 2006-01-23 15:41 UTC (permalink / raw)
To: davem; +Cc: lkml, netdev, robert.olsson
Hi!
I have the following patches for pktgen:
[PATCH 00/01] pktgen: Lindent run.
[PATCH 00/02] pktgen: Ports thread list to Kernel list implementation.
[PATCH 00/03] pktgen: Fix kernel_thread() fail leak.
[PATCH 00/04] pktgen: Fix Initialization fail leak.
All the patches were tested with QEMU, emulating a machine with 4 CPUs
and 4 ethernet cards.
There is more work I'd like to do for pktgen, it includes:
1. pg_cleanup() should freed the memory of the tasks it just terminated
(there's a leak there I think)
2. Port the interface list to the kernel linked list implementation
3. Review pktgen's debug printk()s
But I'm sending these patches first, just to know if I'm doing something
wrong.
Thank you
--
Luiz Fernando N. Capitulino
^ permalink raw reply
* [PATCH 00/01] pktgen: Lindent run.
From: Luiz Fernando Capitulino @ 2006-01-23 15:44 UTC (permalink / raw)
To: davem; +Cc: lkml, netdev, robert.olsson
This patch is not in-lined because it's 120K bytes long, you can found it at:
http://www.cpu.eti.br/patches/pktgen_lindent_1.patch
--
Luiz Fernando N. Capitulino
^ permalink raw reply
* [PATCH 00/02] pktgen: Ports thread list to Kernel list implementation.
From: Luiz Fernando Capitulino @ 2006-01-23 15:45 UTC (permalink / raw)
To: davem; +Cc: lkml, netdev, robert.olsson
Ports the thread list to use the Linux Kernel linked list implementation.
The final result is a simpler and smaller code.
Note that I'm adding a new member in the struct pktgen_thread called
'removed'. The reason is that I didn't find a better wait condition to be
used in the place of the replaced one. Suggestions are very welcome.
Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
net/core/pktgen.c | 96 +++++++++++++++++++++++-------------------------------
1 file changed, 41 insertions(+), 55 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index c6be6cd..ee26c69 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -125,6 +125,7 @@
#include <linux/capability.h>
#include <linux/delay.h>
#include <linux/timer.h>
+#include <linux/list.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
@@ -327,7 +328,8 @@ struct pktgen_hdr {
struct pktgen_thread {
spinlock_t if_lock;
struct pktgen_dev *if_list; /* All device here */
- struct pktgen_thread *next;
+ struct list_head th_list;
+ int removed;
char name[32];
char result[512];
u32 max_before_softirq; /* We'll call do_softirq to prevent starvation. */
@@ -489,7 +491,7 @@ static int pg_clone_skb_d;
static int debug;
static DECLARE_MUTEX(pktgen_sem);
-static struct pktgen_thread *pktgen_threads = NULL;
+static LIST_HEAD(pktgen_threads);
static struct notifier_block pktgen_notifier_block = {
.notifier_call = pktgen_device_event,
@@ -1521,9 +1523,7 @@ static struct pktgen_dev *__pktgen_NN_th
struct pktgen_thread *t;
struct pktgen_dev *pkt_dev = NULL;
- t = pktgen_threads;
-
- while (t) {
+ list_for_each_entry(t, &pktgen_threads, th_list) {
pkt_dev = pktgen_find_dev(t, ifname);
if (pkt_dev) {
if (remove) {
@@ -1533,7 +1533,6 @@ static struct pktgen_dev *__pktgen_NN_th
}
break;
}
- t = t->next;
}
return pkt_dev;
}
@@ -2421,15 +2420,15 @@ static void pktgen_run(struct pktgen_thr
static void pktgen_stop_all_threads_ifs(void)
{
- struct pktgen_thread *t = pktgen_threads;
+ struct pktgen_thread *t;
PG_DEBUG(printk("pktgen: entering pktgen_stop_all_threads.\n"));
thread_lock();
- while (t) {
+
+ list_for_each_entry(t, &pktgen_threads, th_list)
pktgen_stop(t);
- t = t->next;
- }
+
thread_unlock();
}
@@ -2469,40 +2468,36 @@ static int pktgen_wait_thread_run(struct
static int pktgen_wait_all_threads_run(void)
{
- struct pktgen_thread *t = pktgen_threads;
+ struct pktgen_thread *t;
int sig = 1;
- while (t) {
+ thread_lock();
+
+ list_for_each_entry(t, &pktgen_threads, th_list) {
sig = pktgen_wait_thread_run(t);
if (sig == 0)
break;
- thread_lock();
- t = t->next;
- thread_unlock();
}
- if (sig == 0) {
- thread_lock();
- while (t) {
+
+ if (sig == 0)
+ list_for_each_entry(t, &pktgen_threads, th_list)
t->control |= (T_STOP);
- t = t->next;
- }
- thread_unlock();
- }
+
+ thread_unlock();
return sig;
}
static void pktgen_run_all_threads(void)
{
- struct pktgen_thread *t = pktgen_threads;
+ struct pktgen_thread *t;
PG_DEBUG(printk("pktgen: entering pktgen_run_all_threads.\n"));
thread_lock();
- while (t) {
+ list_for_each_entry(t, &pktgen_threads, th_list)
t->control |= (T_RUN);
- t = t->next;
- }
+
thread_unlock();
schedule_timeout_interruptible(msecs_to_jiffies(125)); /* Propagate thread->control */
@@ -2622,24 +2617,12 @@ static void pktgen_rem_thread(struct pkt
{
/* Remove from the thread list */
- struct pktgen_thread *tmp = pktgen_threads;
-
remove_proc_entry(t->name, pg_proc_dir);
thread_lock();
- if (tmp == t)
- pktgen_threads = tmp->next;
- else {
- while (tmp) {
- if (tmp->next == t) {
- tmp->next = t->next;
- t->next = NULL;
- break;
- }
- tmp = tmp->next;
- }
- }
+ list_del(&t->th_list);
+
thread_unlock();
}
@@ -2886,6 +2869,8 @@ static void pktgen_thread_worker(struct
PG_DEBUG(printk("pktgen: %s removing thread.\n", t->name));
pktgen_rem_thread(t);
+
+ t->removed = 1;
}
static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t,
@@ -2997,19 +2982,18 @@ static int pktgen_add_device(struct pktg
static struct pktgen_thread *__init pktgen_find_thread(const char *name)
{
- struct pktgen_thread *t = NULL;
+ struct pktgen_thread *t;
thread_lock();
- t = pktgen_threads;
- while (t) {
- if (strcmp(t->name, name) == 0)
- break;
+ list_for_each_entry(t, &pktgen_threads, th_list)
+ if (strcmp(t->name, name) == 0) {
+ thread_unlock();
+ return t;
+ }
- t = t->next;
- }
thread_unlock();
- return t;
+ return NULL;
}
static int __init pktgen_create_thread(const char *name, int cpu)
@@ -3048,8 +3032,9 @@ static int __init pktgen_create_thread(c
pe->proc_fops = &pktgen_thread_fops;
pe->data = t;
- t->next = pktgen_threads;
- pktgen_threads = t;
+ list_add_tail(&t->th_list, &pktgen_threads);
+
+ t->removed = 0;
if (kernel_thread((void *)pktgen_thread_worker, (void *)t,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND) < 0)
@@ -3150,17 +3135,18 @@ static int __init pg_init(void)
static void __exit pg_cleanup(void)
{
+ struct pktgen_thread *t;
+ struct list_head *q, *n;
wait_queue_head_t queue;
init_waitqueue_head(&queue);
/* Stop all interfaces & threads */
- while (pktgen_threads) {
- struct pktgen_thread *t = pktgen_threads;
- pktgen_threads->control |= (T_TERMINATE);
+ list_for_each_safe(q, n, &pktgen_threads) {
+ t = list_entry(q, struct pktgen_thread, th_list);
+ t->control |= (T_TERMINATE);
- wait_event_interruptible_timeout(queue, (t != pktgen_threads),
- HZ);
+ wait_event_interruptible_timeout(queue, (t->removed == 1), HZ);
}
/* Un-register us from receiving netdevice events */
--
Luiz Fernando N. Capitulino
^ permalink raw reply related
* [PATCH 00/03] pktgen: Fix kernel_thread() fail leak.
From: Luiz Fernando Capitulino @ 2006-01-23 15:46 UTC (permalink / raw)
To: davem; +Cc: lkml, netdev, robert.olsson
Leak fix: free all the alocated resources if kernel_thread() call fails.
Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
net/core/pktgen.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index ee26c69..ccffcbb 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2998,6 +2998,7 @@ static struct pktgen_thread *__init pktg
static int __init pktgen_create_thread(const char *name, int cpu)
{
+ int err;
struct pktgen_thread *t = NULL;
struct proc_dir_entry *pe;
@@ -3036,9 +3037,15 @@ static int __init pktgen_create_thread(c
t->removed = 0;
- if (kernel_thread((void *)pktgen_thread_worker, (void *)t,
- CLONE_FS | CLONE_FILES | CLONE_SIGHAND) < 0)
+ err = kernel_thread((void *)pktgen_thread_worker, (void *)t,
+ CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
+ if (err < 0) {
printk("pktgen: kernel_thread() failed for cpu %d\n", t->cpu);
+ remove_proc_entry(t->name, pg_proc_dir);
+ list_del(&t->th_list);
+ kfree(t);
+ return err;
+ }
return 0;
}
--
Luiz Fernando N. Capitulino
^ permalink raw reply related
* [PATCH 00/04] pktgen: Fix Initialization fail leak.
From: Luiz Fernando Capitulino @ 2006-01-23 15:47 UTC (permalink / raw)
To: davem; +Cc: lkml, netdev, robert.olsson
Even if pktgen's thread initialization fails for all CPUs, the module
will be successfully loaded.
This patch changes that behaivor, by returning error on module load time,
and also freeing all the resources allocated. It also prints a warning if a
thread initialization has failed.
Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
net/core/pktgen.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index ccffcbb..83d875b 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3132,11 +3132,24 @@ static int __init pg_init(void)
register_netdevice_notifier(&pktgen_notifier_block);
for_each_online_cpu(cpu) {
+ int err;
char buf[30];
sprintf(buf, "kpktgend_%i", cpu);
- pktgen_create_thread(buf, cpu);
+ err = pktgen_create_thread(buf, cpu);
+ if (err)
+ printk("pktgen: WARNING: Cannot create thread for cpu %d (%d)\n",
+ cpu, err);
}
+
+ if (list_empty(&pktgen_threads)) {
+ printk("pktgen: ERROR: Initialization failed for all threads\n");
+ unregister_netdevice_notifier(&pktgen_notifier_block);
+ remove_proc_entry(PGCTRL, pg_proc_dir);
+ proc_net_remove(PG_PROC_DIR);
+ return -ENODEV;
+ }
+
return 0;
}
--
Luiz Fernando N. Capitulino
^ permalink raw reply related
* proper way to deal with a sparse warning (fwd)
From: Kumar Gala @ 2006-01-23 16:21 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
I wasn't getting much of a response on lkml to this, so maybe netdev will
be more helpful :)
thanks
- kumar
---------- Forwarded message ----------
Date: Thu, 19 Jan 2006 00:19:47 -0600
From: Kumar Gala <galak@kernel.crashing.org>
To: LKML List <linux-kernel@vger.kernel.org>
Subject: proper way to deal with a sparse warning
I'm getting the following sparse warning:
drivers/net/gianfar_mii.c:165:16: warning: incorrect type in
assignment (different address spaces)
drivers/net/gianfar_mii.c:165:16: expected void *priv
drivers/net/gianfar_mii.c:165:16: got struct gfar_mii [noderef] *
[assigned] regs<asn:2>
This is line 165 of gianfar_mii.c:
new_bus->priv = regs;
new_bus->priv is of type void *. regs is of type struct gfar_mii
__iomem *.
Is it acceptable to do the following:
new_bus->priv = (void __force *)regs;
- kumar
^ permalink raw reply
* [PATCH 00/00] pktgen: refinements and small fixes.
From: Robert Olsson @ 2006-01-23 17:00 UTC (permalink / raw)
To: Luiz Fernando Capitulino; +Cc: davem, lkml, netdev, robert.olsson
In-Reply-To: <20060123134140.b04ad994.lcapitulino@mandriva.com.br>
Luiz Fernando Capitulino writes:
> [PATCH 00/02] pktgen: Ports thread list to Kernel list implementation.
> [PATCH 00/03] pktgen: Fix kernel_thread() fail leak.
> [PATCH 00/04] pktgen: Fix Initialization fail leak.
>
> But I'm sending these patches first, just to know if I'm doing something
> wrong.
Thanks!
Looks interesting. Yes of course better to use kernel list functions. I'll
patch my lab version and run through some tests.
Yes keep on hacking...
Cheers.
--ro
^ permalink raw reply
* Re: [BUG] sky2 broken for Yukon PCI-E Gigabit Ethernet Controller 11ab:4362 (rev 19)
From: Stephen Hemminger @ 2006-01-23 18:15 UTC (permalink / raw)
To: Knut Petersen; +Cc: linux-kernel, netdev
In-Reply-To: <43D1C99E.2000506@t-online.de>
O
>
> It seems that the SuSE Firewall locked something ....
>
> I started with kernel 2.6.15-git7, tried 2.6.15.1 and 2.6.16-rc1*.
> At the moment I do use a kernel 2.6.15-git7 patched with an updated sky2
> (v.013).
> I could not find a single working sky2 configuration.
>
Are you using the full kernel.org kernel, or are you putting sky2 driver into
the SUSE kernel? There are a number of bug fixes related to hardware checksumming
that are in the kernel.org kernel (2.6.15 or later). There was one in ICMP.
These fixes relate to places in the code where a protocol decides to trim a
packet by removing bytes. I am not familiar with the SuSE Firewall. Is it just
standard netfilter modules or additional code?
--
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger
^ permalink raw reply
* Re: [softmac-dev] [PATCH] ieee80211_rx_any: filter out packets, call ieee80211_rx or ieee80211_rx_mgt
From: Stefan Rompf @ 2006-01-23 19:00 UTC (permalink / raw)
To: Johannes Berg
Cc: Denis Vlasenko, John W. Linville, jbenc, netdev, softmac-dev,
linux-kernel, bcm43xx-dev
In-Reply-To: <1138026752.3957.98.camel@localhost>
Am Montag 23 Januar 2006 15:32 schrieb Johannes Berg:
> Shouldn't you BSS-filter management packets too?
no, management packets are used to populate f.e. scanning results.
Stefan
^ permalink raw reply
* Re: [BUG] sky2 broken for Yukon PCI-E Gigabit Ethernet Controller 11ab:4362 (rev 19)
From: Knut Petersen @ 2006-01-23 19:20 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: linux-kernel, netdev
In-Reply-To: <20060123101538.14d21bf4@dxpl.pdx.osdl.net>
Stephen Hemminger wrote:
>O
>
>
>>It seems that the SuSE Firewall locked something ....
>>
>>I started with kernel 2.6.15-git7, tried 2.6.15.1 and 2.6.16-rc1*.
>>At the moment I do use a kernel 2.6.15-git7 patched with an updated sky2
>>(v.013).
>>I could not find a single working sky2 configuration.
>>
>>
>>
>
>Are you using the full kernel.org kernel, or are you putting sky2 driver into
>the SUSE kernel?
>
No SuSE kernels here. I started with kernel.org kernel 2.6.15-git7 and
had those problems. Then I tried 2.6.16-rc3-git3, the most recent kernel
at the time of my original writing. As I had some other problems with
that kernel I had a look at the git tree of Linus and applied all sky2
related
patches to the otherwise unchanged 2.6.15-git7. 2.6.15.1 also was no
solution as sky2 seems to be not available there.
> There are a number of bug fixes related to hardware checksumming
>that are in the kernel.org kernel (2.6.15 or later). There was one in ICMP.
>These fixes relate to places in the code where a protocol decides to trim a
>packet by removing bytes. I am not familiar with the SuSE Firewall. Is it just
>standard netfilter modules or additional code?
>
>
I have to admit that I don´t know enough about the network layers
of the kernel, so here is a list of the network modules loaded (sky2
compiled into the kernel). SuSEFirewall is just standard netfiltering
using those modules.
ipt_MASQUERADE 3968 1
pppoe 15360 2
pppox 4616 1 pppoe
af_packet 23240 2
ppp_generic 30740 6 pppoe,pppox
slhc 7040 1 ppp_generic
ipt_TOS 2816 28
ipt_TCPMSS 4800 2
ipt_LOG 7232 77
ipt_limit 2880 77
ipt_pkttype 1984 2
ipt_state 2240 45
ip6t_REJECT 5824 3
ipt_REJECT 5952 3
iptable_mangle 3200 1
iptable_nat 8836 1
iptable_filter 3264 1
ip6table_mangle 2752 0
ip_nat_ftp 3776 0
ip_nat 18284 3 ipt_MASQUERADE,iptable_nat,ip_nat_ftp
ip_conntrack_ftp 8240 1 ip_nat_ftp
ip_conntrack 51020 6
ipt_MASQUERADE,ipt_state,iptable_nat,ip_nat_ftp,ip_nat,ip_conntrack_ftp
ip_tables 24088 11
ipt_MASQUERADE,ipt_TOS,ipt_TCPMSS,ipt_LOG,ipt_limit,ipt_pkttype,ipt_state,ipt_REJECT,iptable_mangle,iptable_nat,iptable_filter
ip6table_filter 3136 1
ip6_tables 25624 3 ip6t_REJECT,ip6table_mangle,ip6table_filter
ipv6 271712 14 ip6t_REJECT
As said before, rtl8139 does work perfectly well, the same is true
for an identical system with a Via Rhine adapter.
cu,
Knut
^ permalink raw reply
* RE: My vote against eepro* removal
From: Jesse Brandeburg @ 2006-01-23 20:23 UTC (permalink / raw)
To: kus Kusche Klaus
Cc: Lee Revell, Evgeniy Polyakov, Adrian Bunk, linux-kernel,
Ronciak, John, Brandeburg, Jesse, netdev, Steven Rostedt
In-Reply-To: <AAD6DA242BC63C488511C611BD51F367323329@MAILIT.keba.co.at>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3497 bytes --]
On Mon, 23 Jan 2006, kus Kusche Klaus wrote:
> From: John Ronciak
> > Can we try a couple of things? 1) just comment out all the check for
> > link code in the e100 driver and give that a try and 2) just comment
> > out the update stats call and see if that works. These seem to be the
> > differences and we need to know which one is causing the problem.
>
> First of all, I am still unable to get any traces of this in the
> latency tracer. Moreover, as I told before, removing parts of the
> watchdog usually made my eth0 nonfunctional (which is bad - this
> is an embedded system with ssh access).
>
> Hence, I explicitely instrumented the watchdog function with tsc.
> Output of the timings is done by a background thread, so the
> timings should not increase the runtime of the watchdog.
>
> Here are my results:
>
> If the watchdog doesn't get interrupted, preempted, or whatever,
> it spends 340 us in its body:
> * 303 us in the mii code
> * 36 us in the following code up to e100_adjust_adaptive_ifs
> * 1 us in the remaining code (I think my chip doesn't need any
> of those chip-specific fixups)
>
> The 303 us in the mii code are divided in the following way:
> * 101 us in mii_ethtool_gset
> * 135 us in the whole if
> * 67 us in mii_check_link
>
> This is with the udelay(2) instead of udelay(20) hack applied.
> With udelay(20), the mii times are 128 + 170 + 85 us,
> i.e. 383 us instead of 303 us, or >= 420 us for the whole watchdog.
>
> As the RTC runs with 8192 Hz during my tests, the watchdog is hit
> by 2-3 interrupts, which adds another 75 - 110 us to its total
> execution time, i.e. the time it blocks other rtprio 1 threads.
Thank you very much for that detailed analysis! okay, so calls to mii.c
take too long, but those depend on mmio_read in e100 to do the work, so
this patch attempts to minimize the latency.
This patch is against linus-2.6.git, I compile and ssh/ping tested it.
Would you be willing to send your instrumentation patches? I could then
test any fixes easier.
e100: attempt a shorter delay for mdio reads
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Simply reorder our write/read sequence for mdio reads to minimize latency
as well as delay a shorter interval for each loop.
---
drivers/net/e100.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -891,23 +891,25 @@ static u16 mdio_ctrl(struct nic *nic, u3
* procedure it should be done under lock.
*/
spin_lock_irqsave(&nic->mdio_lock, flags);
- for (i = 100; i; --i) {
+ for (i = 1000; i; --i) {
if (readl(&nic->csr->mdi_ctrl) & mdi_ready)
break;
- udelay(20);
+ udelay(2);
}
if (unlikely(!i)) {
- printk("e100.mdio_ctrl(%s) won't go Ready\n",
+ DPRINTK(PROBE, ERR, "e100.mdio_ctrl(%s) won't go Ready\n",
nic->netdev->name );
spin_unlock_irqrestore(&nic->mdio_lock, flags);
return 0; /* No way to indicate timeout error */
}
writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl);
- for (i = 0; i < 100; i++) {
- udelay(20);
+ /* to avoid latency, read to flush the write, then delay, and only
+ * delay 2us per loop, manual says read should complete in < 64us */
+ for (i = 0; i < 1000; i++) {
if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready)
break;
+ udelay(2);
}
spin_unlock_irqrestore(&nic->mdio_lock, flags);
DPRINTK(HW, DEBUG,
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox