Netdev List
 help / color / mirror / Atom feed
* [PATCH 2.6.17 2/2] bnx2: Use kmalloc instead of array
From: Michael Chan @ 2006-05-22 17:02 UTC (permalink / raw)
  To: davem; +Cc: netdev

Use kmalloc() instead of a local array in bnx2_nvram_write().

Update version to 1.4.40.

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


diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 509f104..54161ae 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -55,8 +55,8 @@
 
 #define DRV_MODULE_NAME		"bnx2"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"1.4.39"
-#define DRV_MODULE_RELDATE	"March 22, 2006"
+#define DRV_MODULE_VERSION	"1.4.40"
+#define DRV_MODULE_RELDATE	"May 22, 2006"
 
 #define RUN_AT(x) (jiffies + (x))
 
@@ -2945,7 +2945,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 of
 		int buf_size)
 {
 	u32 written, offset32, len32;
-	u8 *buf, start[4], end[4];
+	u8 *buf, start[4], end[4], *flash_buffer = NULL;
 	int rc = 0;
 	int align_start, align_end;
 
@@ -2985,12 +2985,19 @@ bnx2_nvram_write(struct bnx2 *bp, u32 of
 		memcpy(buf + align_start, data_buf, buf_size);
 	}
 
+	if (bp->flash_info->buffered == 0) {
+		flash_buffer = kmalloc(264, GFP_KERNEL);
+		if (flash_buffer == NULL) {
+			rc = -ENOMEM;
+			goto nvram_write_end;
+		}
+	}
+
 	written = 0;
 	while ((written < len32) && (rc == 0)) {
 		u32 page_start, page_end, data_start, data_end;
 		u32 addr, cmd_flags;
 		int i;
-		u8 flash_buffer[264];
 
 	        /* Find the page_start addr */
 		page_start = offset32 + written;
@@ -3109,6 +3116,9 @@ bnx2_nvram_write(struct bnx2 *bp, u32 of
 	}
 
 nvram_write_end:
+	if (bp->flash_info->buffered == 0)
+		kfree(flash_buffer);
+
 	if (align_start || align_end)
 		kfree(buf);
 	return rc;



^ permalink raw reply related

* [PATCH 2.6.17 1/2] bnx2: Fix bug in bnx2_nvram_write()
From: Michael Chan @ 2006-05-22 17:01 UTC (permalink / raw)
  To: davem; +Cc: netdev

Fix a bug in bnx2_nvram_write() caused by a counter variable not
correctly incremented by 4.

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


diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 5ca99e2..509f104 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -3061,7 +3061,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 of
 		}
 
 		/* Loop to write the new data from data_start to data_end */
-		for (addr = data_start; addr < data_end; addr += 4, i++) {
+		for (addr = data_start; addr < data_end; addr += 4, i += 4) {
 			if ((addr == page_end - 4) ||
 				((bp->flash_info->buffered) &&
 				 (addr == data_end - 4))) {



^ permalink raw reply related

* Re: skge driver oops
From: Beschorner Daniel @ 2006-05-22 18:38 UTC (permalink / raw)
  To: 'Krzysztof Oledzki'
  Cc: netdev, 'Stephen Hemminger', 'david@mantara.com'

Thank you for the hint, Krzysztof!

But this switch doesn't help, the problem for the crash is in my case the rx
side.
I can send big files over the card, as soon as I start receiving the box
crashes with the oopses you can find in former postings.

Daniel


> On Wed, 17 May 2006, Beschorner Daniel wrote:

>> As David and me are using SMP systems when it's crashing, should I give a
>> non-SMP kernel a try, to see if it's some kind of race conditon?

> You may also try this, where ethX is your skge driven ethernet device:
>   /usr/sbin/ethtool -K ethX tx off

>This solved my simmilar problem.

> Best regards,

> 			Krzysztof Oledzki

^ permalink raw reply

* Re: netlink vs. debugfs (was Re: [Patch 0/6] statistics infrastructure)
From: Balbir Singh @ 2006-05-22 18:34 UTC (permalink / raw)
  To: Tim Bird; +Cc: Andrew Morton, Martin Peschke, linux-kernel, netdev
In-Reply-To: <4471FE52.8090107@am.sony.com>

On Mon, May 22, 2006 at 11:09:22AM -0700, Tim Bird wrote:
> Andrew Morton wrote:
> > Martin Peschke <mp3@de.ibm.com> wrote:
> >> My patch series is a proposal for a generic implementation of statistics.
> > 
> > This uses debugfs for the user interface, but the
> > per-task-delay-accounting-*.patch series from Balbir creates an extensible
> > netlink-based system for passing instrumentation results back to userspace.
> > 
> > Can this code be converted to use those netlink interfaces, or is Balbir's
> > approach unsuitable, or hasn't it even been considered, or what?
> 
> Can someone give me the 20-second elevator pitch on why
> netlink is preferred over debugfs?  I've heard of a
> number of debugfs/procfs users requested to switch over.
> 
> Thanks,
>  -- Tim
> 
> =============================
> Tim Bird
> Architecture Group Chair, CE Linux Forum
> Senior Staff Engineer, Sony Electronics
> =============================

Hi, Tim,

I am no debugfs expert, I hope I can do justice to the comparison.

Debugfs						Netlink/Genetlink

1. Filesystem based - requires creating		Several types of data can
   files for each type of data passed		be multiplexed over one netlink
   down						socket.
2. Hard to determine record format/data		Contains metadata including
						type of data and length
						with each record
3. Notifications are hard			Notifications are very easy
   I think they can be done using inotify	good library support for
						notifications. Data can
						either be broadcast or
						selectively mulitcast
4. Requires several open/read/write/close	A single socket can be
   operations					opened, data from kernel
						space can be multiplexed
						over it.

I don't think I did any justice to the advantages of debugfs. The only
one I can think of is that it uses relayfs. Relayfs is efficient in the
sense that it uses per-cpu buffers.

Anybody else want to take a shot in comparing the two?

	Balbir Singh,
	Linux Technology Center,
	IBM Software Labs

^ permalink raw reply

* [PATCH 2.6.17] tg3: Add some missing rx error counters
From: Michael Chan @ 2006-05-22 16:54 UTC (permalink / raw)
  To: davem; +Cc: netdev

Add some missing rx error counters for 5705 and newer chips.

Update version to 3.58.

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


diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e1b33a2..49ad60b 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.57"
-#define DRV_MODULE_RELDATE	"Apr 28, 2006"
+#define DRV_MODULE_VERSION	"3.58"
+#define DRV_MODULE_RELDATE	"May 22, 2006"
 
 #define TG3_DEF_MAC_MODE	0
 #define TG3_DEF_RX_MODE		0
@@ -6488,6 +6488,10 @@ static void tg3_periodic_fetch_stats(str
 	TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG);
 	TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS);
 	TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE);
+
+	TG3_STAT_ADD32(&sp->rxbds_empty, RCVLPC_NO_RCV_BD_CNT);
+	TG3_STAT_ADD32(&sp->rx_discards, RCVLPC_IN_DISCARDS_CNT);
+	TG3_STAT_ADD32(&sp->rx_errors, RCVLPC_IN_ERRORS_CNT);
 }
 
 static void tg3_timer(unsigned long __opaque)



^ permalink raw reply related

* Re: Was change to ip_push_pending_frames intended to break udp (more specifically, WCCP?)
From: Vlad Yasevich @ 2006-05-22 18:22 UTC (permalink / raw)
  To: Paul P Komkoff Jr; +Cc: linux-kernel, netdev
In-Reply-To: <20060520140434.2139c31b.akpm@osdl.org>

On Sat, 2006-05-20 at 14:04 -0700, Andrew Morton wrote:
> Paul P Komkoff Jr <i@stingr.net> wrote:
> >
> > Hello!
> > 
> > I have a userspace application, which talks WCCP2 with cisco routers.
> > It sends and receives UDP packets on port 2048. After I've updated my
> > server to 2.6.16, it stopped working.
> > 
> > Examining logs and packet dumps of previous (2.6.15 kernel) vs.
> > current, I found, that cisco will not understand packets generated by
> > 2.6.16. The only difference in that packets was IP id field, which was
> > increasing (1, 2, ...) with old kernel, and always 0 with 2.6.16.
> > 
> > Looking thru the changelog, I've found a suspect. It was this commit:
> > http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a55d57b107c3e06935763905dc0fb235214569d
> > 
> > Reverting this patch fixes my problems - the router understands
> > packets again.
> > 
> > I took a look through the code and ip_select_ident codepath but still
> > don't understand why it setting id to 0.

IP id is set to 0 on unconnected sockets when the DF bit is set (path
mtu discovery is enabled).  Try issuing a connect() in your application
and see if the ids are increasing again.

-vlad


^ permalink raw reply

* [Netchannel] Full TCP receiving support.
From: Evgeniy Polyakov @ 2006-05-22 16:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, kelly, rusty
In-Reply-To: <20060521.230617.64626468.davem@davemloft.net>

Hello, developers.

Attached patch implements full TCP input processing for netchannels [1].
It is based on socket processing code and is fairly hairy for now.
Main idea is to queue skbs into netchannels private queue in interrupt
time and then remove skbs and process them in process' context.
To make TCP works userspace procesing code should only perform several
simple steps similar to how backlog is processed in socket code.

Attached patch against previously posted netchannel patches which
mostly implements netchannel_copy_to_user_tcp() function which performs
TCP processing and copies dat ato userspace. As you can see it is quite
trivial.

Current state is quite proof-of-concept, since there are some ugliness
in the code and various uninteresting debugs, so I plan to clean this up
and run some tests to show if such approach works or not.

Full patch and userspace application are available from netchannel homepage [1].

Thank you.

1. Netchannel homepage.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=netchannel

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

diff --git a/net/core/netchannel.c b/net/core/netchannel.c
index a33ed60..7239a49 100644
--- a/net/core/netchannel.c
+++ b/net/core/netchannel.c
@@ -34,6 +34,7 @@
 #include <linux/in.h>
 #include <linux/ip.h>
 #include <linux/tcp.h>
+#include <net/tcp.h>
 #include <linux/udp.h>
 
 #include <linux/netdevice.h>
@@ -221,6 +222,13 @@ static int netchannel_convert_skb_ipv4(s
 	if (skb->len < len || len < (iph->ihl*4))
 		goto inhdr_error;
 
+	if (pskb_trim_rcsum(skb, len))
+		goto inhdr_error;
+	
+	if (iph->ihl > 5)
+		printk("netchannel: IP options: %u.%u.%u.%u -> %u.%u.%u.%u, ihl: %u.\n", 
+				NIPQUAD(iph->saddr), NIPQUAD(iph->daddr), iph->ihl);
+
 	unc->dst = iph->daddr;
 	unc->src = iph->saddr;
 	unc->proto = iph->protocol;
@@ -388,9 +396,12 @@ int netchannel_recv(struct sk_buff *skb)
 		goto unlock;
 	}
 
-	skb_queue_tail(&nc->recv_queue, skb);
 	nc->qlen += skb->len;
+	skb_queue_tail(&nc->recv_queue, skb);
 	wake_up(&nc->wait);
+	
+	if (nc->inode && SOCKET_I(nc->inode)->sk)
+		wake_up(SOCKET_I(nc->inode)->sk->sk_sleep);
 
 unlock:
 	rcu_read_unlock();
@@ -454,58 +465,75 @@ static int netchannel_copy_to_user_tcp(s
 	struct socket *sock;
 	struct sock *sk;
 	struct sk_buff *skb;
-
-	skb = netchannel_get_skb(nc, timeout, &err);
-	if (!skb)
-		return err;
+	struct iovec iov;
+	struct msghdr msg;
+	unsigned flags = MSG_DONTWAIT;
 
 	if (!nc->inode)
-		goto err_out_free;
+		goto err_out;
 	sock = SOCKET_I(nc->inode);
 	if (!sock || !sock->sk)
-		goto err_out_free;
+		goto err_out;
 
 	sk = sock->sk;
 
-	__skb_pull(skb, skb->nh.iph->ihl*4);
+	do {
+		msg.msg_control=NULL;
+		msg.msg_controllen=0;
+		msg.msg_iovlen=1;
+		msg.msg_iov=&iov;
+		msg.msg_name=NULL;
+		msg.msg_namelen=0;
+		msg.msg_flags = flags;
+		iov.iov_len=*len;
+		iov.iov_base=arg;
 
-	skb->h.raw = skb->data;
+		err = sock_recvmsg(sock, &msg, iov.iov_len, flags);
 
-	th = skb->h.th;
+		printk("netchannel: TCP: len: %u, err: %d.\n", *len, err);
 
-	printk("netchannel: TCP: syn: %u, fin: %u, rst: %u, psh: %u, ack: %u, urg: %u, ece: %u, cwr: %u, res1: %u, doff: %u.\n",
-			th->syn, th->fin, th->rst, th->psh, th->ack, th->urg, th->ece, th->cwr, th->res1, th->doff);
-	
-	if (sk->sk_state == TCP_ESTABLISHED) {
-		struct iovec to;
-		unsigned int copied;
-		
-		to.iov_base = arg;
-		to.iov_len = *len;
+		if (err > 0) {
+			*len = err;
+			return 0;
+		} else if (err && err != -EAGAIN)
+			return err;
 
-		copied = skb->len;
-		if (copied > *len)
-			copied = *len;
+		err = 0;
 
-		if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
-			err = skb_copy_datagram_iovec(skb, 0, &to, copied);
-		} else {
-			err = skb_copy_and_csum_datagram_iovec(skb,0, &to);
-		}
+		skb = netchannel_get_skb(nc, timeout, &err);
+		if (!skb)
+			return err;
+
+		__skb_pull(skb, skb->nh.iph->ihl*4);
+
+		skb->h.raw = skb->data;
+
+		th = skb->h.th;
+		TCP_SKB_CB(skb)->seq = ntohl(th->seq);
+		TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +
+					    skb->len - th->doff * 4);
+		TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq);
+		TCP_SKB_CB(skb)->when	 = 0;
+		TCP_SKB_CB(skb)->flags	 = skb->nh.iph->tos;
+		TCP_SKB_CB(skb)->sacked	 = 0;
 
-		*len = (err == 0)?copied:0;
-	}
-	
-	nc->qlen -= skb->len;
+		printk("netchannel: TCP: syn: %u, fin: %u, rst: %u, psh: %u, ack: %u, urg: %u, ece: %u, cwr: %u, res1: %u, doff: %u.\n",
+				th->syn, th->fin, th->rst, th->psh, th->ack, th->urg, th->ece, th->cwr, th->res1, th->doff);
+		
+		nc->qlen -= skb->len;
 
-	err = sk->sk_backlog_rcv(sk, skb);
-	printk("netchannel: TCP: sk_backlog_rcv() ret: %d.\n", err);
-	return err;
+		err = sk->sk_backlog_rcv(sk, skb);
+		
+		printk("netchannel: TCP: seq=%u, ack=%u, sk_state=%u, backlog_err: %d, sock_qlen: %u.\n", 
+				th->seq, th->ack_seq, sk->sk_state, err, skb_queue_len(&sk->sk_receive_queue));
+		
+		if (err)
+			return err;
+	} while (!err);
 
-err_out_free:
-	nc->qlen -= skb->len;
-	kfree_skb(skb);
+	return 0;
 
+err_out:
 	return err;
 }
 


-- 
	Evgeniy Polyakov

^ permalink raw reply related

* Re: How to submit a new module to linux kernel?
From: Erik Mouw @ 2006-05-22 16:06 UTC (permalink / raw)
  To: #ZHOU BIN#; +Cc: netdev
In-Reply-To: <A975FFC51622704CBEAB749E263D1799015540AA@mail01.student.main.ntu.edu.sg>

On Mon, May 22, 2006 at 03:18:12PM +0800, #ZHOU BIN# wrote:
> I'm new in this mailing list. I implemented a new TCP congestion
> control module for linux kernel 2.6.16.13.
> Does anybody know how to apply for the integration of it into the
> linux kernel? How long will this process take?

See Documentation/SubmittingPatches in your kernel tree.


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands

^ permalink raw reply

* Re: Routing header reversal in Linux kernel
From: Sérgio Gomes @ 2006-05-22 15:43 UTC (permalink / raw)
  To: netdev
In-Reply-To: <89fb8be00605220642l3730a60alf7015ee626b8ed69@mail.gmail.com>

OK, I've simplified the problem greatly, please ignore my previous post.

I am no longer using the backdoor and I am following the RFC by using
an authentication header between both machines.

This, in theory, should allow for routing header reversal, i.e., when
I send a packet from one machine with a routing header, the reply
should follow the same route, in the opposite direction. But alas, the
routing header is not being reversed in the 2nd machine, whether it be
on a listening or on an active socket.

I believe the implementation is therefore incorrect. However, I am by
no means an expert, and may be overlooking some detail, like a /proc
option or a later RFC that specifies the AH usage in more detail.
Would anyone care to comment on this?



On 5/22/06, Sérgio Gomes <sergiomdgomes@gmail.com> wrote:
> Greetings!
>
> I am a final year student in Instituto Superior Técnico, Lisbon,
> Portugal, and part of my final project requires the use of IPv6
> routing headers.
>
> In particular, I need the route reversal to work. Now, as it didn't, I
> began analysing the source code, and found a comment, stating that it
> was a known problem with the IPv6 standard (as I was aware) and that a
> way had been built around it via a constant, to avoid the whole AH
> mess the RFC imposes.
>
> So I was hoping someone could help me with something. The problem is
> that even if I remove that verification, it does not work --
> specifically, it looks as though the kernel is prepared to reverse
> routing headers on a listening socket (i.e., a passive one), but not
> on an active
> socket (that is, one making the connection). My terminology is
> probably wrong, but I hope you got my point.
>
> However, I have only looked into this now, so I barely understand the
> IPv6 implementation in the Linux kernel. I was hoping that you would
> be able to shed some light into the subject, namely: is it at all
> possible to have a TCP socket initiate a connection, receive a SYN+ACK
> from the remote socket that includes a routing header, and reverse
> this header for the remaining packets in the TCP connection?
>
> Thanks!
>
> Sérgio Gomes
>

^ permalink raw reply

* Routing header reversal in Linux kernel
From: Sérgio Gomes @ 2006-05-22 13:42 UTC (permalink / raw)
  To: netdev

Greetings!

I am a final year student in Instituto Superior Técnico, Lisbon,
Portugal, and part of my final project requires the use of IPv6
routing headers.

In particular, I need the route reversal to work. Now, as it didn't, I
began analysing the source code, and found a comment, stating that it
was a known problem with the IPv6 standard (as I was aware) and that a
way had been built around it via a constant, to avoid the whole AH
mess the RFC imposes.

So I was hoping someone could help me with something. The problem is
that even if I remove that verification, it does not work --
specifically, it looks as though the kernel is prepared to reverse
routing headers on a listening socket (i.e., a passive one), but not
on an active
socket (that is, one making the connection). My terminology is
probably wrong, but I hope you got my point.

However, I have only looked into this now, so I barely understand the
IPv6 implementation in the Linux kernel. I was hoping that you would
be able to shed some light into the subject, namely: is it at all
possible to have a TCP socket initiate a connection, receive a SYN+ACK
from the remote socket that includes a routing header, and reverse
this header for the remaining packets in the TCP connection?

Thanks!

Sérgio Gomes

^ permalink raw reply

* Re: How to submit a new module to linux kernel?
From: James Morris @ 2006-05-22 13:25 UTC (permalink / raw)
  To: #ZHOU BIN#; +Cc: netdev
In-Reply-To: <A975FFC51622704CBEAB749E263D1799015540AA@mail01.student.main.ntu.edu.sg>

On Mon, 22 May 2006, #ZHOU BIN# wrote:

> Hi all,
> 
> I'm new in this mailing list. I implemented a new TCP congestion control module for linux kernel 2.6.16.13.
> Does anybody know how to apply for the integration of it into the linux kernel? How long will this process take?

Read Documentation/SubmittingPatches, then send the patch here.

If it's a good patch, it could be integrated quickly.



-- 
James Morris
<jmorris@namei.org>

^ permalink raw reply

* Re: [git patches] net driver updates
From: Andi Kleen @ 2006-05-22 12:46 UTC (permalink / raw)
  To: Manfred Spraul
  Cc: Andrew Morton, Linus Torvalds, jeff, netdev, linux-kernel,
	Ayaz Abdulla
In-Reply-To: <44707F8E.8010506@colorfullife.com>


> I don't have any good ideas, please try to figure out what's wrong. Is 
> there a debug switch for the network layer that forces the network layer 
> to verify the CHECKSUM_UNNECESSARY blocks?
> 

Good news. The latest -git driver seems to fix the problem.

So maybe something got broken with the double request_irq.

-Andi

^ permalink raw reply

* Re: wireless-dev updated
From: Jiri Benc @ 2006-05-22 12:42 UTC (permalink / raw)
  To: John W. Linville; +Cc: netdev
In-Reply-To: <20060519191549.GF30177@tuxdriver.com>

On Fri, 19 May 2006 15:15:54 -0400, John W. Linville wrote:
> Jiri Benc:
>       d80211: switching management interface on/off

This patch is wrong, it uses incorrect ioctl number (collides with
userspace MLME).

As I discovered some bugs and I'm still working on some of them, I
haven't sent pull request yet. Bad idea, unfortunately.

>       d80211: use alloc_netdev
>       d80211: fix is_ieee80211_device

Would it be possible to drop these patches and pull from 'up' branch of
my tree?

If not, I will try to rebase my tree (I have another patches before
them) and send corrections to already applied patches as new patches.

---

git://git.kernel.org/pub/scm/linux/kernel/git/jbenc/dscape.git up

Jiri Benc:
      d80211: don't config uninitialized interface
      d80211: fix recursive locking
      d80211: switching management interface on/off
      d80211: use alloc_netdev
      d80211: fix is_ieee80211_device

Jouni Malinen:
      d80211: Add support for user space client MLME

Michael Wu:
      d80211: Don't discriminate against 802.11b drivers

 net/d80211/hostapd_ioctl.h   |    2 
 net/d80211/ieee80211.c       |  169 ++++++++++++++++++++-----------------------
 net/d80211/ieee80211_i.h     |   16 ++--
 net/d80211/ieee80211_iface.c |   94 ++++++++++++++++++-----
 net/d80211/ieee80211_ioctl.c |   66 ++++++++++++++--
 net/d80211/ieee80211_sta.c   |   10 +-
 6 files changed, 224 insertions(+), 133 deletions(-)

diff --git a/net/d80211/hostapd_ioctl.h b/net/d80211/hostapd_ioctl.h
index a462688..7c7305c 100644
--- a/net/d80211/hostapd_ioctl.h
+++ b/net/d80211/hostapd_ioctl.h
@@ -91,6 +91,8 @@ enum {
 	PRISM2_PARAM_KEY_MGMT = 1040,
 	PRISM2_PARAM_RADAR_DETECT = 1043,
 	PRISM2_PARAM_SPECTRUM_MGMT = 1044,
+	PRISM2_PARAM_USER_SPACE_MLME = 1045,
+	PRISM2_PARAM_MGMT_IF = 1046,
 	/* NOTE: Please try to coordinate with other active development
 	 * branches before allocating new param numbers so that each new param
 	 * will be unique within all branches and the allocated number will not
diff --git a/net/d80211/ieee80211.c b/net/d80211/ieee80211.c
index ffb7985..b850fb7 100644
--- a/net/d80211/ieee80211.c
+++ b/net/d80211/ieee80211.c
@@ -59,6 +59,8 @@ static int rate_control_initialize(struc
 
 static u8 * ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len);
 
+static int ieee80211_mgmt_start_xmit(struct sk_buff *skb,
+				     struct net_device *dev);
 
 struct ieee80211_key_conf *
 ieee80211_key_data2conf(struct ieee80211_local *local,
@@ -1097,7 +1099,8 @@ __ieee80211_tx_prepare(struct ieee80211_
 static int inline is_ieee80211_device(struct net_device *dev)
 {
 	return (dev->wireless_handlers ==
-		(struct iw_handler_def *) &ieee80211_iw_handler_def);
+		(struct iw_handler_def *) &ieee80211_iw_handler_def) ||
+	       (dev->hard_start_xmit == ieee80211_mgmt_start_xmit);
 }
 
 /* Device in tx->dev has a reference added; use dev_put(tx->dev) when
@@ -1754,7 +1757,7 @@ int ieee80211_if_config(struct net_devic
 	struct ieee80211_local *local = dev->priv;
 	struct ieee80211_if_conf conf;
 
-	if (!local->hw->config_interface)
+	if (!local->hw->config_interface || !netif_running(dev))
 		return 0;
 
 	memset(&conf, 0, sizeof(conf));
@@ -1954,8 +1957,6 @@ static inline int identical_mac_addr_all
 {
 	return (type1 == IEEE80211_IF_TYPE_MNTR ||
 		type2 == IEEE80211_IF_TYPE_MNTR ||
-		type1 == IEEE80211_IF_TYPE_MGMT ||
-		type2 == IEEE80211_IF_TYPE_MGMT ||
 		(type1 == IEEE80211_IF_TYPE_AP &&
 		 type2 == IEEE80211_IF_TYPE_WDS) ||
 		(type1 == IEEE80211_IF_TYPE_WDS &&
@@ -1990,6 +1991,20 @@ static int ieee80211_master_stop(struct 
 	return 0;
 }
 
+static int ieee80211_mgmt_open(struct net_device *dev)
+{
+	struct ieee80211_local *local = dev->priv;
+
+	if (!netif_running(local->mdev))
+		return -EOPNOTSUPP;
+	return 0;
+}
+
+static int ieee80211_mgmt_stop(struct net_device *dev)
+{
+	return 0;
+}
+
 /* Check if running monitor interfaces should go to a "soft monitor" mode
  * and switch them if necessary. */
 static inline void ieee80211_start_soft_monitor(struct ieee80211_local *local)
@@ -2032,7 +2047,6 @@ static int ieee80211_open(struct net_dev
 		struct net_device *ndev = nsdata->dev;
 
 		if (ndev != dev && ndev != local->mdev &&
-		    ndev != local->apdev &&
 		    netif_running(ndev) &&
 		    memcmp(dev->dev_addr, ndev->dev_addr, ETH_ALEN) == 0 &&
 		    !identical_mac_addr_allowed(sdata->type, nsdata->type)) {
@@ -2075,8 +2089,11 @@ static int ieee80211_open(struct net_dev
 			res = local->hw->open(sdata->master);
 		if (res == 0) {
 			res = dev_open(sdata->master);
-			if (res && local->hw->stop)
-				local->hw->stop(sdata->master);
+			if (res) {
+				if (local->hw->stop)
+					local->hw->stop(sdata->master);
+			} else if (local->apdev)
+				dev_open(local->apdev);
 		}
 		if (res) {
 			if (local->hw->remove_interface)
@@ -2089,6 +2106,8 @@ static int ieee80211_open(struct net_dev
 
 	if (sdata->type == IEEE80211_IF_TYPE_MNTR)
 		local->monitors++;
+	else
+		ieee80211_if_config(dev);
 
 	netif_start_queue(dev);
 	return 0;
@@ -2119,6 +2138,8 @@ static int ieee80211_stop(struct net_dev
         if (local->open_count == 0) {
 		ieee80211_stop_scan(sdata->master);
 		dev_close(sdata->master);
+		if (local->apdev)
+			dev_close(local->apdev);
 		if (local->hw->stop)
 			local->hw->stop(sdata->master);
         }
@@ -2367,6 +2388,10 @@ ieee80211_rx_mgmt(struct net_device *dev
 
 	if (msg_type != ieee80211_msg_monitor)
 		dev = local->apdev;
+	if (!dev) {
+		dev_kfree_skb(skb);
+		return;
+	}
         skb->dev = dev;
 
         sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -3116,8 +3141,9 @@ ieee80211_rx_h_mgmt(struct ieee80211_txr
 {
         struct ieee80211_sub_if_data *sdata;
 	sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
-	if (sdata->type == IEEE80211_IF_TYPE_STA ||
-	    sdata->type == IEEE80211_IF_TYPE_IBSS) {
+	if ((sdata->type == IEEE80211_IF_TYPE_STA ||
+	     sdata->type == IEEE80211_IF_TYPE_IBSS) &&
+	    !rx->local->user_space_mlme) {
 		ieee80211_sta_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status);
 	} else {
 		/* Management frames are sent to hostapd for processing */
@@ -3998,15 +4024,31 @@ void ieee80211_if_setup(struct net_devic
 	dev->destructor = ieee80211_if_free;
 }
 
+void ieee80211_if_mgmt_setup(struct net_device *dev)
+{
+	ether_setup(dev);
+	dev->hard_start_xmit = ieee80211_mgmt_start_xmit;
+	dev->change_mtu = ieee80211_change_mtu_apdev;
+	dev->get_stats = ieee80211_get_stats;
+	dev->open = ieee80211_mgmt_open;
+	dev->stop = ieee80211_mgmt_stop;
+	dev->type = ARPHRD_IEEE80211_PRISM;
+	dev->hard_header_parse = header_parse_80211;
+	dev->tx_queue_len = 0;
+	dev->destructor = ieee80211_if_free;
+}
 
-static void ieee80211_precalc_rates(struct ieee80211_hw *hw)
+static void ieee80211_precalc_modes(struct ieee80211_hw *hw,
+				    struct ieee80211_local *local)
 {
 	struct ieee80211_hw_modes *mode;
 	struct ieee80211_rate *rate;
 	int m, r;
 
+	local->hw_modes = 0;
 	for (m = 0; m < hw->num_modes; m++) {
 		mode = &hw->modes[m];
+		local->hw_modes |= 1 << mode->mode;
 		for (r = 0; r < mode->num_rates; r++) {
 			rate = &mode->rates[r];
 			rate->rate_inv = CHAN_UTIL_RATE_LCM / rate->rate;
@@ -4018,57 +4060,43 @@ static void ieee80211_precalc_rates(stru
 struct net_device *ieee80211_alloc_hw(size_t priv_data_len,
 				      void (*setup)(struct net_device *))
 {
-	struct net_device *apdev, *mdev;
+	struct net_device *mdev;
         struct ieee80211_local *local;
         struct ieee80211_sub_if_data *sdata;
-	int alloc_size;
+	int priv_size;
 
-	/* Ensure 32-bit alignment of our private data and hw private data.
-	 * Each net_device is followed by a sub_if_data which which is used
-	 * for wds/vlan information; it is aligned as well.
+	/* Ensure 32-byte alignment of our private data and hw private data.
+	 * Each net_device is followed by a sub_if_data which is used for
+	 * interface specific information.
 	 *
          * Sample memory map looks something like:
          *
          * 0000 *****************
          *      * net_dev       *
-         * 015c *****************
+	 * 0160 *****************
          *      * sub_if        *
-         * 017c *****************
+	 * 0180 *****************
          *      * local         *
-         * 0b84 *****************
+	 * 0b80 *****************
          *      * hw_priv       *
          * 1664 *****************
-         *      * ap net_dev    *
-         * 17c0 *****************
-         *      * sub_if        *
-	 *      *****************
          */
-        alloc_size = sizeof(struct net_device) +
-                sizeof(struct ieee80211_sub_if_data) + 3 +
-                sizeof(struct ieee80211_local) + 3 +
-                priv_data_len + 3 +
-                sizeof(struct net_device) + 3 +
-		sizeof(struct ieee80211_sub_if_data) + 3 +
-		4096;
-        mdev = (struct net_device *) kzalloc(alloc_size, GFP_KERNEL);
+	priv_size = ((sizeof(struct ieee80211_sub_if_data) +
+		      NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST) +
+		    ((sizeof(struct ieee80211_local) +
+		      NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST) +
+		    priv_data_len;
+	mdev = alloc_netdev(priv_size, "wmaster%d", ether_setup);
 	if (mdev == NULL)
 		return NULL;
 
-        mdev->priv = (struct net_device *)
-		((char *) mdev +
-		 ((sizeof(struct net_device) + 3) & ~3) +
-		 ((sizeof(struct ieee80211_sub_if_data) + 3) & ~3));
+	mdev->priv = (char *)netdev_priv(mdev) +
+		     ((sizeof(struct ieee80211_sub_if_data) +
+		       NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST);
 	local = mdev->priv;
-	local->hw_priv = (void *)
-		((char *) local + ((sizeof(struct ieee80211_local) + 3) & ~3));
-	apdev = (struct net_device *)
-		((char *) local->hw_priv + ((priv_data_len + 3) & ~3));
-
-	ether_setup(mdev);
-	memcpy(mdev->name, "wmaster%d", 10);
-
-	if (strlen(mdev->name) + 2 >= sizeof(mdev->name))
-		goto fail;
+	local->hw_priv = (char *)local +
+			 ((sizeof(struct ieee80211_local) +
+			   NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST);
 
 	local->dev_index = -1;
 	local->mdev = mdev;
@@ -4087,7 +4115,7 @@ struct net_device *ieee80211_alloc_hw(si
 	local->rate_ctrl_num_down = RATE_CONTROL_NUM_DOWN;
 
         local->scan.in_scan = 0;
-	local->hw_modes = (unsigned int) -1;
+	local->enabled_modes = (unsigned int) -1;
 
         init_timer(&local->scan.timer); /* clear it out */
 
@@ -4104,28 +4132,6 @@ struct net_device *ieee80211_alloc_hw(si
 
         ieee80211_if_init(mdev);
 
-        apdev = (struct net_device *)
-		((char *) local->hw_priv + ((priv_data_len + 3) & ~3));
-        local->apdev = apdev;
-	ether_setup(apdev);
-	apdev->priv = local;
-	apdev->hard_start_xmit = ieee80211_mgmt_start_xmit;
-	apdev->change_mtu = ieee80211_change_mtu_apdev;
-	apdev->get_stats = ieee80211_get_stats;
-        apdev->open = ieee80211_open;
-        apdev->stop = ieee80211_stop;
-	apdev->type = ARPHRD_IEEE80211_PRISM;
-        apdev->hard_header_parse = header_parse_80211;
-	apdev->tx_queue_len = 0;
-	sprintf(apdev->name, "%sap", mdev->name);
-
-        sdata = IEEE80211_DEV_TO_SUB_IF(apdev);
-        sdata->type = IEEE80211_IF_TYPE_MGMT;
-        sdata->dev = apdev;
-        sdata->master = mdev;
-        sdata->local = local;
-        list_add_tail(&sdata->list, &local->sub_if_list);
-
 	mdev->hard_start_xmit = ieee80211_master_start_xmit;
 	mdev->wireless_handlers =
 		(struct iw_handler_def *) &ieee80211_iw_handler_def;
@@ -4155,10 +4161,6 @@ struct net_device *ieee80211_alloc_hw(si
 		setup(mdev);
 
 	return mdev;
-
- fail:
-	ieee80211_free_hw(mdev);
-	return NULL;
 }
 
 
@@ -4193,15 +4195,11 @@ int ieee80211_register_hw(struct net_dev
 
 	sta_info_start(local);
 
-	result = register_netdev(local->apdev);
-	if (result < 0)
-		goto fail_1st_dev;
-
 	if (hw->fraglist)
 		dev->features |= NETIF_F_FRAGLIST;
 	result = register_netdev(dev);
 	if (result < 0)
-		goto fail_2nd_dev;
+		goto fail_dev;
 
 	if (rate_control_initialize(local) < 0) {
 		printk(KERN_DEBUG "%s: Failed to initialize rate control "
@@ -4226,9 +4224,7 @@ int ieee80211_register_hw(struct net_dev
 
 fail_rate:
 	unregister_netdev(dev);
-fail_2nd_dev:
-	unregister_netdev(local->apdev);
-fail_1st_dev:
+fail_dev:
 	sta_info_stop(local);
 	ieee80211_unregister_sysfs(local);
 fail_sysfs:
@@ -4247,17 +4243,11 @@ int ieee80211_update_hw(struct net_devic
 	if (hw->queues == 0)
 		hw->queues = 1;
 
-	memcpy(local->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
-	local->apdev->base_addr = dev->base_addr;
-	local->apdev->irq = dev->irq;
-	local->apdev->mem_start = dev->mem_start;
-	local->apdev->mem_end = dev->mem_end;
-
 	if (!hw->modes || !hw->modes->channels || !hw->modes->rates ||
 	    !hw->modes->num_channels || !hw->modes->num_rates)
 		return -1;
 
-	ieee80211_precalc_rates(hw);
+	ieee80211_precalc_modes(hw, local);
 	local->conf.phymode = hw->modes[0].mode;
 	local->curr_rates = hw->modes[0].rates;
 	local->num_curr_rates = hw->modes[0].num_rates;
@@ -4291,6 +4281,9 @@ void ieee80211_unregister_hw(struct net_
 		del_timer_sync(&local->scan_timer);
 	ieee80211_rx_bss_list_deinit(dev);
 
+	if (local->apdev)
+		ieee80211_if_del(local->apdev);
+
 	list_for_each_safe(ptr, n, &local->sub_if_list) {
 		struct ieee80211_sub_if_data *sdata =
 			list_entry(ptr, struct ieee80211_sub_if_data, list);
@@ -4323,7 +4316,7 @@ void ieee80211_unregister_hw(struct net_
 
 void ieee80211_free_hw(struct net_device *dev)
 {
-	kfree(dev);
+	free_netdev(dev);
 }
 
 
diff --git a/net/d80211/ieee80211_i.h b/net/d80211/ieee80211_i.h
index ee0b399..94e151d 100644
--- a/net/d80211/ieee80211_i.h
+++ b/net/d80211/ieee80211_i.h
@@ -307,11 +307,7 @@ #define NUM_DEFAULT_KEYS 4
         int channel_use_raw;
 };
 
-#define IEEE80211_DEV_TO_SUB_IF(dev) ((struct ieee80211_sub_if_data *) \
-		((char *)(dev) + ((sizeof(struct net_device) + 3) & ~3)))
-#define IEEE80211_SUB_IF_TO_DEV(sub_if) ((struct net_device *) \
-		((char *)(sub_if) - ((sizeof(struct net_device) + 3) & ~3)))
-
+#define IEEE80211_DEV_TO_SUB_IF(dev) netdev_priv(dev)
 
 struct ieee80211_local {
 	struct ieee80211_hw *hw;
@@ -409,7 +405,6 @@ #define IEEE80211_IRQSAFE_QUEUE_LIMIT 12
 	int scan_oper_antenna_max;
 	u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
 	size_t scan_ssid_len;
-	int scan_skip_11b;
 	struct list_head sta_bss_list;
 	struct ieee80211_sta_bss *sta_bss_hash[STA_HASH_SIZE];
 	spinlock_t sta_bss_lock;
@@ -500,8 +495,12 @@ #endif /* CONFIG_D80211_DEBUG_COUNTERS *
 	int wifi_wme_noack_test;
 	unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
 
-	unsigned int hw_modes; /* bitfield of allowed hardware modes;
+	unsigned int enabled_modes; /* bitfield of allowed modes;
+				      * (1 << MODE_*) */
+	unsigned int hw_modes; /* bitfield of supported hardware modes;
 				* (1 << MODE_*) */
+
+	int user_space_mlme;
 };
 
 
@@ -518,6 +517,7 @@ void ieee80211_prepare_rates(struct net_
 void ieee80211_tx_set_iswep(struct ieee80211_txrx_data *tx);
 int ieee80211_if_update_wds(struct net_device *dev, u8 *remote_addr);
 void ieee80211_if_setup(struct net_device *dev);
+void ieee80211_if_mgmt_setup(struct net_device *dev);
 
 /* ieee80211_ioctl.c */
 int ieee80211_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
@@ -595,6 +595,8 @@ int ieee80211_if_remove(struct net_devic
 void ieee80211_if_free(struct net_device *dev);
 void ieee80211_if_flush(struct net_device *dev);
 void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata);
+int ieee80211_if_add_mgmt(struct net_device *dev);
+void ieee80211_if_del_mgmt(struct net_device *dev);
 
 /* ieee80211_sysfs.c */
 int ieee80211_register_sysfs(struct ieee80211_local *local);
diff --git a/net/d80211/ieee80211_iface.c b/net/d80211/ieee80211_iface.c
index f3ce45f..6631738 100644
--- a/net/d80211/ieee80211_iface.c
+++ b/net/d80211/ieee80211_iface.c
@@ -31,16 +31,12 @@ int ieee80211_if_add(struct net_device *
 	struct net_device *ndev, *tmp_dev;
 	struct ieee80211_local *local = dev->priv;
 	struct ieee80211_sub_if_data *sdata = NULL, *sdata_parent;
-	int alloc_size;
 	int ret;
 	int i;
 
 	ASSERT_RTNL();
-	/* ensure 32-bit alignment of our private data and hw private data */
-	alloc_size = sizeof(struct net_device) + 3 +
-		sizeof(struct ieee80211_sub_if_data) + 3;
-
-	ndev = *new_dev = (struct net_device *) kzalloc(alloc_size, GFP_KERNEL);
+	ndev = *new_dev = alloc_netdev(sizeof(struct ieee80211_sub_if_data),
+				       "", ieee80211_if_setup);
 	if (ndev == NULL)
 		return -ENOMEM;
 
@@ -68,7 +64,6 @@ int ieee80211_if_add(struct net_device *
 	ndev->mem_start = dev->mem_start;
 	ndev->mem_end = dev->mem_end;
 	ndev->flags = dev->flags & IFF_MULTICAST;
-	ieee80211_if_setup(ndev);
 
 	sdata = IEEE80211_DEV_TO_SUB_IF(ndev);
 	sdata->type = IEEE80211_IF_TYPE_AP;
@@ -88,11 +83,66 @@ int ieee80211_if_add(struct net_device *
 	return 0;
 
 fail:
-	kfree(ndev);
+	free_netdev(ndev);
 	*new_dev = NULL;
 	return ret;
 }
 
+int ieee80211_if_add_mgmt(struct net_device *dev)
+{
+	struct net_device *ndev;
+	struct ieee80211_local *local = dev->priv;
+	struct ieee80211_sub_if_data *sdata, *nsdata;
+	int ret;
+
+	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	ASSERT_RTNL();
+
+	ndev = alloc_netdev(sizeof(struct ieee80211_sub_if_data), "",
+			    ieee80211_if_mgmt_setup);
+	if (ndev == NULL)
+		return -ENOMEM;
+	ret = dev_alloc_name(ndev, "wmgmt%d");
+	if (ret)
+		goto fail;
+
+	ndev->priv = local;
+	memcpy(ndev->dev_addr, dev->dev_addr, ETH_ALEN);
+	ndev->base_addr = dev->base_addr;
+	ndev->irq = dev->irq;
+	ndev->mem_start = dev->mem_start;
+	ndev->mem_end = dev->mem_end;
+
+	nsdata = IEEE80211_DEV_TO_SUB_IF(ndev);
+	nsdata->type = IEEE80211_IF_TYPE_MGMT;
+	nsdata->master = local->mdev;
+	nsdata->dev = ndev;
+	nsdata->local = local;
+	ieee80211_if_sdata_init(nsdata);
+
+	ret = register_netdevice(ndev);
+	if (ret)
+		goto fail;
+	if (local->open_count > 0)
+		dev_open(ndev);
+	local->apdev = ndev;
+	return 0;
+fail:
+	free_netdev(ndev);
+	return ret;
+}
+
+void ieee80211_if_del_mgmt(struct net_device *dev)
+{
+	struct ieee80211_local *local = dev->priv;
+	struct net_device *apdev;
+
+	ASSERT_RTNL();
+	apdev = local->apdev;
+	local->apdev = NULL;
+	unregister_netdevice(apdev);
+}
+
 void ieee80211_if_set_type(struct net_device *dev, int type)
 {
 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -244,9 +294,8 @@ void __ieee80211_if_del(struct ieee80211
 	list_del(&sdata->list);
 	ieee80211_proc_deinit_virtual(dev);
 	unregister_netdevice(dev);
-	/* Default data device and management device are allocated with the
-	 * master device. All other devices are separately allocated and will
-	 * be freed by net_device->destructor (i. e. ieee80211_if_free). */
+	/* Except master interface, the net_device will be freed by
+	 * net_device->destructor (i. e. ieee80211_if_free). */
 }
 
 /* Must be called with rtnl lock held. */
@@ -263,8 +312,7 @@ int ieee80211_if_remove(struct net_devic
 	list_for_each_entry_safe(sdata, n, &local->sub_if_list, list) {
 		if ((sdata->type == id || id == -1) &&
 		    strcmp(name, sdata->dev->name) == 0 &&
-		    sdata->dev != local->mdev &&
-		    sdata->dev != local->apdev) {
+		    sdata->dev != local->mdev) {
 			__ieee80211_if_del(local, sdata);
 			return 0;
 		}
@@ -277,7 +325,7 @@ void ieee80211_if_free(struct net_device
 	struct ieee80211_local *local = dev->priv;
 
 	BUG_ON(dev == local->mdev || dev == local->apdev);
-	kfree(dev);
+	free_netdev(dev);
 }
 
 /* Must be called with rtnl lock held. */
@@ -298,6 +346,9 @@ void ieee80211_if_del(struct net_device 
 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
 	rtnl_lock();
-	__ieee80211_if_del(local, sdata);
+	if (sdata->type == IEEE80211_IF_TYPE_MGMT)
+		ieee80211_if_del_mgmt(local->mdev);
+	else
+		__ieee80211_if_del(local, sdata);
 	rtnl_unlock();
 }
diff --git a/net/d80211/ieee80211_ioctl.c b/net/d80211/ieee80211_ioctl.c
index 5d31a8f..30dfc76 100644
--- a/net/d80211/ieee80211_ioctl.c
+++ b/net/d80211/ieee80211_ioctl.c
@@ -937,7 +937,8 @@ static int ieee80211_ioctl_add_if(struct
 		ieee80211_if_set_type(new_dev, IEEE80211_IF_TYPE_WDS);
 		res = ieee80211_if_update_wds(new_dev, wds->remote_addr);
 		if (res)
-			ieee80211_if_del(new_dev);
+			__ieee80211_if_del(dev->priv,
+					   IEEE80211_DEV_TO_SUB_IF(new_dev));
 		return res;
 	} else if (param->u.if_info.type == HOSTAP_IF_VLAN) {
 		if (left < sizeof(struct hostapd_if_vlan))
@@ -950,7 +951,8 @@ static int ieee80211_ioctl_add_if(struct
 #if 0
 		res = ieee80211_if_update_vlan(new_dev, vlan->id);
 		if (res)
-			ieee80211_if_del(new_dev);
+			__ieee80211_if_del(dev->priv,
+					   IEEE80211_DEV_TO_SUB_IF(new_dev));
 #endif
 		return res;
         } else if (param->u.if_info.type == HOSTAP_IF_BSS) {
@@ -1048,10 +1050,14 @@ static int ieee80211_ioctl_scan_req(stru
 				    struct prism2_hostapd_param *param,
 				    int param_len)
 {
+	struct ieee80211_local *local = dev->priv;
 	u8 *pos = param->u.scan_req.ssid;
 	int left = param_len - ((u8 *) pos - (u8 *) param);
 	int len = param->u.scan_req.ssid_len;
 
+	if (local->user_space_mlme)
+		return -EOPNOTSUPP;
+
 	if (left < len || len > IEEE80211_MAX_SSID_LEN)
 		return -EINVAL;
 
@@ -1076,8 +1082,12 @@ static int ieee80211_ioctl_sta_get_state
 static int ieee80211_ioctl_mlme(struct net_device *dev,
 				struct prism2_hostapd_param *param)
 {
+	struct ieee80211_local *local = dev->priv;
 	struct ieee80211_sub_if_data *sdata;
 
+	if (local->user_space_mlme)
+		return -EOPNOTSUPP;
+
 	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	if (sdata->type != IEEE80211_IF_TYPE_STA &&
 	    sdata->type != IEEE80211_IF_TYPE_IBSS)
@@ -1136,6 +1146,10 @@ #endif
 static int ieee80211_set_gen_ie(struct net_device *dev, u8 *ie, size_t len)
 {
 	struct ieee80211_sub_if_data *sdata;
+	struct ieee80211_local *local = dev->priv;
+
+	if (local->user_space_mlme)
+		return -EOPNOTSUPP;
 
 	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	if (sdata->type == IEEE80211_IF_TYPE_STA ||
@@ -1699,7 +1713,7 @@ int ieee80211_ioctl_siwfreq(struct net_d
 			if (chan->flag & IEEE80211_CHAN_W_SCAN &&
 			    ((freq->e == 0 && chan->chan == freq->m) ||
 			     (freq->e > 0 && nfreq == chan->freq)) &&
-			    (local->hw_modes & (1 << mode->mode))) {
+			    (local->enabled_modes & (1 << mode->mode))) {
 				/* Use next_mode as the mode preference to
 				 * resolve non-unique channel numbers. */
 				if (set && mode->mode != local->next_mode)
@@ -1745,6 +1759,7 @@ static int ieee80211_ioctl_siwessid(stru
 				    struct iw_request_info *info,
 				    struct iw_point *data, char *ssid)
 {
+	struct ieee80211_local *local = dev->priv;
 	struct ieee80211_sub_if_data *sdata;
         size_t len = data->length;
 
@@ -1754,8 +1769,16 @@ static int ieee80211_ioctl_siwessid(stru
 
 	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	if (sdata->type == IEEE80211_IF_TYPE_STA ||
-	    sdata->type == IEEE80211_IF_TYPE_IBSS)
+	    sdata->type == IEEE80211_IF_TYPE_IBSS) {
+		if (local->user_space_mlme) {
+			if (len > IEEE80211_MAX_SSID_LEN)
+				return -EINVAL;
+			memcpy(sdata->u.sta.ssid, ssid, len);
+			sdata->u.sta.ssid_len = len;
+			return 0;
+		}
 		return ieee80211_sta_set_ssid(dev, ssid, len);
+	}
 
 	if (sdata->type == IEEE80211_IF_TYPE_AP) {
 		memcpy(sdata->u.ap.ssid, ssid, len);
@@ -1804,11 +1827,17 @@ static int ieee80211_ioctl_siwap(struct 
 				 struct iw_request_info *info,
 				 struct sockaddr *ap_addr, char *extra)
 {
+	struct ieee80211_local *local = dev->priv;
 	struct ieee80211_sub_if_data *sdata;
 
 	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	if (sdata->type == IEEE80211_IF_TYPE_STA ||
 	    sdata->type == IEEE80211_IF_TYPE_IBSS) {
+		if (local->user_space_mlme) {
+			memcpy(sdata->u.sta.bssid, (u8 *) &ap_addr->sa_data,
+			       ETH_ALEN);
+			return 0;
+		}
 		return ieee80211_sta_set_bssid(dev, (u8 *) &ap_addr->sa_data);
 	} else if (sdata->type == IEEE80211_IF_TYPE_WDS) {
 		if (memcmp(sdata->u.wds.remote_addr, (u8 *) &ap_addr->sa_data,
@@ -2447,7 +2476,7 @@ static int ieee80211_ioctl_prism2_param(
 		break;
 
 	case PRISM2_PARAM_HW_MODES:
-		local->hw_modes = value;
+		local->enabled_modes = value;
 		break;
 
 	case PRISM2_PARAM_CREATE_IBSS:
@@ -2469,6 +2498,19 @@ static int ieee80211_ioctl_prism2_param(
 	case PRISM2_PARAM_SPECTRUM_MGMT:
 		local->conf.spect_mgmt = value;
 		break;
+	case PRISM2_PARAM_MGMT_IF:
+		if (value == 1) {
+			if (local->apdev == NULL)
+				ret = ieee80211_if_add_mgmt(local->mdev);
+		} else if (value == 0) {
+			if (local->apdev)
+				ieee80211_if_del_mgmt(local->mdev);
+		} else
+			ret = -EINVAL;
+		break;
+	case PRISM2_PARAM_USER_SPACE_MLME:
+		local->user_space_mlme = value;
+		break;
 	default:
 		ret = -EOPNOTSUPP;
 		break;
@@ -2620,7 +2662,7 @@ static int ieee80211_ioctl_get_prism2_pa
 		break;
 
 	case PRISM2_PARAM_HW_MODES:
-		*param = local->hw_modes;
+		*param = local->enabled_modes;
 		break;
 
 	case PRISM2_PARAM_CREATE_IBSS:
@@ -2651,6 +2693,15 @@ static int ieee80211_ioctl_get_prism2_pa
 		else
 			*param = !!sdata->u.sta.wmm_enabled;
 		break;
+	case PRISM2_PARAM_MGMT_IF:
+		if (local->apdev)
+			*param = local->apdev->ifindex;
+		else
+			ret = -ENOENT;
+		break;
+	case PRISM2_PARAM_USER_SPACE_MLME:
+		*param = local->user_space_mlme;
+		break;
 
 	default:
 		ret = -EOPNOTSUPP;
diff --git a/net/d80211/ieee80211_sta.c b/net/d80211/ieee80211_sta.c
index 2720f1d..af58013 100644
--- a/net/d80211/ieee80211_sta.c
+++ b/net/d80211/ieee80211_sta.c
@@ -2462,13 +2462,13 @@ static void ieee80211_sta_scan_timer(uns
 			}
 			return;
 		}
-		skip = !(local->hw_modes & (1 << mode->mode));
+		skip = !(local->enabled_modes & (1 << mode->mode));
 		chan = &mode->channels[local->scan_channel_idx];
 		if (!(chan->flag & IEEE80211_CHAN_W_SCAN) ||
 		    (sdata->type == IEEE80211_IF_TYPE_IBSS &&
 		     !(chan->flag & IEEE80211_CHAN_W_IBSS)) ||
-		    (local->hw_modes & (1 << MODE_IEEE80211G) &&
-		     mode->mode == MODE_IEEE80211B && local->scan_skip_11b))
+		    (local->hw_modes & local->enabled_modes &
+		     (1 << MODE_IEEE80211G) && mode->mode == MODE_IEEE80211B))
 			skip = 1;
 
 		if (!skip) {
@@ -2566,7 +2566,6 @@ int ieee80211_sta_req_scan(struct net_de
 		memcpy(local->scan_ssid, ssid, ssid_len);
 	} else
 		local->scan_ssid_len = 0;
-	local->scan_skip_11b = 1; /* FIX: clear this is 11g is not supported */
 	local->scan_state = SCAN_SET_CHANNEL;
 	local->scan_hw_mode_idx = 0;
 	local->scan_channel_idx = 0;
@@ -2592,7 +2591,7 @@ ieee80211_sta_scan_result(struct net_dev
 		       bss->last_update + IEEE80211_SCAN_RESULT_EXPIRE))
 		return current_ev;
 
-	if (!(local->hw_modes & (1 << bss->hw_mode)))
+	if (!(local->enabled_modes & (1 << bss->hw_mode)))
 		return current_ev;
 
 	if (local->scan_flags & IEEE80211_SCAN_WPA_ONLY &&




-- 
Jiri Benc
SUSE Labs

^ permalink raw reply related

* How to submit a new module to linux kernel?
From: #ZHOU BIN# @ 2006-05-22  7:18 UTC (permalink / raw)
  To: netdev

Hi all,

I'm new in this mailing list. I implemented a new TCP congestion control module for linux kernel 2.6.16.13.
Does anybody know how to apply for the integration of it into the linux kernel? How long will this process take?

Thank you very much.

Best Regards,
Zhou Bin

^ permalink raw reply

* Re: Netchannel subsystem update.
From: David S. Miller @ 2006-05-22  6:06 UTC (permalink / raw)
  To: johnpol; +Cc: netdev, kelly, rusty
In-Reply-To: <20060520155202.GA31923@2ka.mipt.ru>

From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Date: Sat, 20 May 2006 19:52:02 +0400

> While developing first apporoach I've found that input TCP processing 
> sometimes refers to dst_entry which can only be obtained through the input
> routing code. You can find appropriate changes in attached incremental patch.

It would be no trouble to cache the input route in the socket
when netchannel is enabled.

^ permalink raw reply

* [CFT] CONFIG_IP_ROUTE_MULTIPATH_CACHED [was Re: [PATCH] Disable multipath cache routing ]
From: Ravikiran G Thirumalai @ 2006-05-22  4:55 UTC (permalink / raw)
  To: Chris Wedgwood
  Cc: pravin b shelar, Suresh Bhogavilli, Julian Anastasov,
	Ilia Sotnikov, netdev, Einar Lueck, lkml, Herbert Xu
In-Reply-To: <20060520205145.GB32010@taniwha.stupidest.org>

On Sat, May 20, 2006 at 01:51:45PM -0700, Chris Wedgwood wrote:
> ...
> Anyhow, the code as-is hasn't been maintained for a long time except
> for a few minor blips (I'm using hg's annotate to find those and have
> included those people on the cc' list as presumably there are using
> these features and might have useful input).

We are interested in keeping CONFIG_IP_ROUTE_MULTIPATH_CACHED,
as this enables us to do node aware multipathing
	http://lkml.org/lkml/2006/3/22/13
Hence, we are also interested in stabilizing MULTIPATH_CACHED.  Please send
bug reports with the test case scenario to myself and Pravin at 
kiran@scalex86.org and pravin.shelar@calsoftinc.com

Thanks,
Kiran

^ permalink raw reply

* [PATCH] secmark: disable new controls for SELinux by default
From: James Morris @ 2006-05-22  4:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David S. Miller, Patrick McHardy, Stephen Smalley, netdev,
	Karl MacMillan
In-Reply-To: <Pine.LNX.4.64.0605212308240.20759@d.namei>

This should address the issue of people tripping over the new secmark 
controls when upgrading their kernel before the userland components are 
available.

With this patch, the new secmark controls for SElinux are now disabled by 
default, so existing behavior is entirely preserved, and the user is not 
affected at all.

It also provides a config option to enable the secmark controls by default 
(which can always be overridden at boot and runtime).  It is also noted in 
the kconfig help that the user will need updated userspace if enabling 
secmark controls for SELinux and that they'll probably need the SECMARK 
and CONNMARK targets, and conntrack protocol helpers, although such 
decisions are beyond the scope of kernel configuration.

Please review an apply if ok.

Signed-off-by: James Morris <jmorris@namei.org>

---

 security/selinux/Kconfig     |   31 ++++++++++++++++++++++++++++++-
 security/selinux/selinuxfs.c |    9 ++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)

diff -purN -X dontdiff linux-2.6.17-rc4-mm2.p/security/selinux/Kconfig linux-2.6.17-rc4-mm2.w/security/selinux/Kconfig
--- linux-2.6.17-rc4-mm2.p/security/selinux/Kconfig	2006-05-20 19:46:38.000000000 -0400
+++ linux-2.6.17-rc4-mm2.w/security/selinux/Kconfig	2006-05-22 00:06:23.000000000 -0400
@@ -1,6 +1,7 @@
 config SECURITY_SELINUX
 	bool "NSA SELinux Support"
-	depends on SECURITY_NETWORK && AUDIT && NET && INET && NETWORK_SECMARK
+	depends on SECURITY_NETWORK && AUDIT && NET && INET
+	select NETWORK_SECMARK
 	default n
 	help
 	  This selects NSA Security-Enhanced Linux (SELinux).
@@ -95,3 +96,31 @@ config SECURITY_SELINUX_CHECKREQPROT_VAL
 	  via /selinux/checkreqprot if authorized by policy.
 
 	  If you are unsure how to answer this question, answer 1.
+
+config SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT
+	bool "NSA SELinux enable new secmark network controls by default"
+	depends on SECURITY_SELINUX
+	default n
+	help
+	  This option determines whether the new secmark-based network
+	  controls will be enabled by default.  If not, the old internal
+	  per-packet controls will be enabled by default, preserving
+	  old behavior.
+	  
+	  If you enable the new controls, you will need updated 
+	  SELinux userspace libraries, tools and policy.  Typically,
+	  your distribution will provide these and enable the new controls
+	  in the kernel they also distribute.
+	  
+	  Note that this option can be overriden at boot with the
+	  selinux_compat_net parameter, and after boot via
+	  /selinux/compat_net.  See Documentation/kernel-parameters.txt
+	  for details on this parameter.
+	  
+	  If you enable the new network controls, you will likely
+	  also require the SECMARK and CONNSECMARK targets, as
+	  well as any conntrack helpers for protocols which you 
+	  wish to control.
+
+	  If you are unsure what do do here, select N.
+
diff -purN -X dontdiff linux-2.6.17-rc4-mm2.p/security/selinux/selinuxfs.c linux-2.6.17-rc4-mm2.w/security/selinux/selinuxfs.c
--- linux-2.6.17-rc4-mm2.p/security/selinux/selinuxfs.c	2006-05-20 19:46:38.000000000 -0400
+++ linux-2.6.17-rc4-mm2.w/security/selinux/selinuxfs.c	2006-05-22 00:23:00.000000000 -0400
@@ -37,7 +37,14 @@
 #include "conditional.h"
 
 unsigned int selinux_checkreqprot = CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE;
-int selinux_compat_net;
+
+#ifdef CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT
+#define SELINUX_COMPAT_NET_VALUE 0
+#else
+#define SELINUX_COMPAT_NET_VALUE 1
+#endif
+
+int selinux_compat_net = SELINUX_COMPAT_NET_VALUE;
 
 static int __init checkreqprot_setup(char *str)
 {








^ permalink raw reply

* Re: [PATCH 2/2] ipg: redundancy with mii.h
From: jesse\(建興\) @ 2006-05-22  3:22 UTC (permalink / raw)
  To: Francois Romieu, David Vrabel; +Cc: Pekka Enberg, linux-kernel, netdev, david
In-Reply-To: <20060521101620.GA28210@electric-eye.fr.zoreil.com>

Hi Francois:

Thanks for your help.
I will try this patch and test it.
http://www.fr.zoreil.com/people/francois/misc/20060521-2.6.17-rc4-git-ip1000-test.patch

Jesse

----- Original Message ----- 
From: "Francois Romieu" <romieu@fr.zoreil.com>
To: "David Vrabel" <dvrabel@cantab.net>
Cc: "Pekka Enberg" <penberg@cs.helsinki.fi>; <linux-kernel@vger.kernel.org>;
<netdev@vger.kernel.org>; <david@pleyades.net>; <jesse@icplus.com.tw>
Sent: Sunday, May 21, 2006 6:16 PM
Subject: Re: [PATCH 2/2] ipg: redundancy with mii.h


David Vrabel <dvrabel@cantab.net> :
[...]
> 0007-ipg-plug-leaks-in-the-error-path-of-ipg_nic_open.txt broke receive
> since it was skipping the initialization of the Rx buffers.  Patch
attached.

Oops. Applied to branch netdev-ipg of
git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6.git

(please include the '-p' option in future invocation of diff)

I have put an updated patch against 2.6.17-rc4 for the whole driver at
http://www.fr.zoreil.com/people/francois/misc/20060521-2.6.17-rc4-git-ip1000-test.patch

-- 
Ueimor


^ permalink raw reply

* Re: [PATCHSET 0/7] SECMARK 2.0
From: James Morris @ 2006-05-22  3:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: davem, kaber, sds, netdev, kmacmillan
In-Reply-To: <Pine.LNX.4.64.0605212237160.20595@d.namei>

On Sun, 21 May 2006, James Morris wrote:

> > And I'd agree with the other commenters: if these features are compulsory
> > for SELinux then we might as well just `select' them.  Right now it's way
> > too hard.
> 
> Ok, I'll look into selecting them.

There are several problems with this.  Because SELinux can only be 
selected as Y, using select for the secmark modules would force them also 
be be built statically into the kernel.  Another issue is the presence of 
new and old Netfilter infrastructure, and there's no way the SELinux 
config can know whether to enable the new generic NF conntrack system or 
the old IP conntrack one.  Then, there's the issue of forcing a specific 
configuration on the user: perhaps they don't want connection tracking at 
all and just want static controls (i.e. only use the SECMARK target, not 
CONNSECMARK).  And how far do you go?  Force the selection of FTP 
connection tracking?  What about new conntrack targets?

The only reasonable solution is to allow the user to configure what they 
need, with the simplest case being that only NETWORK_SECMARK is enabled as 
a minimum requirement for SELinux, which will result in all traffic 
carying the default 'unlabeled_t' marking, which thye user then needs to 
have an appropriate policy for.

I was planning on posting detailed documentation on the new secmark scheme 
once it was in -mm, and having selinux_compat_net=1 as a stopgap until 
people either know what to configure or their distro userland is updated.  
(Support for secmark controls cannot be rolled out into distros until the 
kernel infrastructure is in an upstream kernel such as -mm).


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

^ permalink raw reply

* Via Velocity minimum MTU size
From: Jay Cliburn @ 2006-05-22  2:56 UTC (permalink / raw)
  To: netdev

Hello, 

I was advised by someone on the fedora-devel-list to post my question
here.

I'm trying to set the MTU size on my Via Velocity 6122 Gbit adapter from
the default of 1500 down to 1492, but I keep getting this error:

[root@osprey ~]# ifconfig eth0 mtu 1492
SIOCSIFMTU: Invalid argument

Turns out that via-velocity.h defines the minimum MTU at 1500 bytes.

#define VELOCITY_MIN_MTU    (1514-14)
#define VELOCITY_MAX_MTU    (9000)


And via-velocity.c enforces the limit.

    if ((new_mtu < VELOCITY_MIN_MTU) || new_mtu > (VELOCITY_MAX_MTU)) {
         VELOCITY_PRT(MSG_LEVEL_ERR, KERN_NOTICE "%s: Invalid MTU.\n",
                                vptr->dev->name);
         return -EINVAL;
    }

This is an Abit AV8 motherboard with an Athlon64 3000+ cpu running
Fedora Core 5, kernel 2.6.16-1.2111_FC5 x86_64.

Can someone please explain why the driver might constrain the NIC to a
minimum MTU size of 1500?

Thanks,
Jay



^ permalink raw reply

* Re: [PATCHSET 0/7] SECMARK 2.0
From: James Morris @ 2006-05-22  2:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: davem, kaber, sds, netdev, kmacmillan
In-Reply-To: <20060521165435.7cafbc7c.akpm@osdl.org>

On Sun, 21 May 2006, Andrew Morton wrote:

> Well as discussed off-list, I'm not able to get this stuff to work.  I get
> a pile of these:
> 
> security_compute_av:  unrecognized class 57

This is because the userspace components have not been updated yet -- the 
patch just went into -mm.

The workaround is to enable the old networking controls via the kernel 
parameter selinux_compat_net=1.  Once the distro packages have been 
updated, this will not be necessary.  All that's needed to start with in 
fact is a change to the startup scripts to do this at boot, depending on 
the package version.  This is a brief temporary issue in -mm.

> And I'd agree with the other commenters: if these features are compulsory
> for SELinux then we might as well just `select' them.  Right now it's way
> too hard.

Ok, I'll look into selecting them.

> Even if we do that, the chances of people actually going off and finding
> all the other random secmark Kconfig options and turning on the appropriate
> ones seem pretty small.  Needs a rethink.  Perhaps a standalone secmark
> menu, or just selecting everything..
> 
> And maybe just remove all the various netfilter secmark CONFIG options
> altogether and make all the new code dependent upon the top-level
> CONFIG_SECMARK.

I'm not sure what you mean here.  The top level secmark just enables the 
skb->secmark field without adding any mechanism to use it.  Then, two 
mechanisms which have been provided (the SECMARK and CONNSECMARK) targets 
can be independently enabled.  These are not the only possible ways of 
utilizing skb->secmark, so these components are configurable separately.



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

^ permalink raw reply

* RE: [PATCH] Gianfar SKB Recycling Support
From: Haruki Dai-r35557 @ 2006-05-22  1:38 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Fleming Andy-afleming, Kumar Gala, linuxppc-dev

> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@osdl.org] 
> Sent: Saturday, May 20, 2006 2:48 AM
> To: Haruki Dai-r35557
> Cc: netdev@vger.kernel.org; Fleming Andy-afleming; Kumar 
> Gala; Haruki Dai-r35557
> Subject: Re: [PATCH] Gianfar SKB Recycling Support
> 
> On Wed, 17 May 2006 15:45:14 -0700
> "Haruki Dai-r35557" <Dai.Haruki@freescale.com> wrote:
> 
> > This patch improves the IP forwarding throughput of
> > the Freescale TSEC/eTSEC Gianfar driver. By recycling
> > the Socket buffer and Data buffer, reduce the unnecessary
> > memory allocation and de-allocation in the forwarding
> > processing chain.
> > 
> > Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
> > Signed-off-by: Andy Fleming <afleming@freescale.com>
> > 
> 
> In case the general impression wasn't clear from the earlier comments.
> This patch is an interesting benchmark tweak, but unlikely to ever
> make it into the mainline kernel. The kernel needs to be a general
> purpose system and deal with multiple types of hardware and resource
> control.
> 
> But don't give up looking at performance. If you can find ways to
> speed up the overall socket buffer handling without breaking existing
> semantics; then the patches would be positively received.
>

I admit the explanation of the implementation is indeed unclear. I will
put the recycling mechanism explanation. Is it better put as the
driver's comment? Or, the separate document like, say,
Document/net/skb_recycling.txt?

Just in case, I need to confirm that the patch is rejected even though
the expalanation is added? 

I will surely work for making this mechanism more generic to the other
interface. I want to make sure that this patch is not the purpose of
benchmark tweak. This recycling mechanism makes the Linux's position in
the packet forwarding application better compare to the other
proprietary OS/Stack in terms of the throughput performance. 
 
 For the gianfar user, this patch also improves interrupt response under
the situation when previous gianfar tied up with the a lot of TX hw
interrupt even under NAPI (current gianfar NAPI implementation only help
Rx side since we have separate interrupt line). I will separate the
gianfar specific improvement, and post to this list again.



- Dai

^ permalink raw reply

* Re: [PATCHSET 0/7] SECMARK 2.0
From: Andrew Morton @ 2006-05-21 23:54 UTC (permalink / raw)
  To: James Morris; +Cc: davem, kaber, sds, netdev, kmacmillan
In-Reply-To: <Pine.LNX.4.64.0605180458130.569@d.namei>

James Morris <jmorris@namei.org> wrote:
>
> The following patchset is an updated version of secmark, which I'd like to 
>  propose for inclusion in either Dave or Andrew's tree for subsequent merge 
>  into mainline during the 2.6.18 merge window.

Well as discussed off-list, I'm not able to get this stuff to work.  I get
a pile of these:

security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57
security_compute_av:  unrecognized class 57

coming out and networking is dead.

And I'd agree with the other commenters: if these features are compulsory
for SELinux then we might as well just `select' them.  Right now it's way
too hard.

Even if we do that, the chances of people actually going off and finding
all the other random secmark Kconfig options and turning on the appropriate
ones seem pretty small.  Needs a rethink.  Perhaps a standalone secmark
menu, or just selecting everything..

And maybe just remove all the various netfilter secmark CONFIG options
altogether and make all the new code dependent upon the top-level
CONFIG_SECMARK.

^ permalink raw reply

* Re: [git patches] net driver updates
From: Manfred Spraul @ 2006-05-21 14:56 UTC (permalink / raw)
  To: Andreas Kleen
  Cc: Andrew Morton, Linus Torvalds, jeff, netdev, linux-kernel,
	Ayaz Abdulla
In-Reply-To: <4579880.1148217864672.SLOX.WebMail.wwwrun@imap-dhs.suse.de>

Andreas Kleen wrote:

>>No idea, but unlikely. The fix removes a duplicate request_irq call.
>>Is
>>it possible that the both instances run concurrently?
>>    
>>
>
>The system has two Forcedeth ports, but only one has a cable connected.
>I don't think there is any parallelism. Just one connection with a lot
>of data. It didn't happen with 2.6.16.
>
>  
>
You misunderstood me:
Due to a broken patch, the driver did
    request_irq(irqnum, handler,...)
twice. Thus the irq handler was registered twice. The rx synchronization 
assumes that the irq handler doesn't run concurrently. I'm not sure what 
happens if the irq handler is registered twice: is it possible that it 
runs twice at the same time, i.e. is the synchronization in the irq 
subsystem irq number or registration call based?

>If you don't have any other good ideas I will try to track it down.
>
>  
>
I don't have any good ideas, please try to figure out what's wrong. Is 
there a debug switch for the network layer that forces the network layer 
to verify the CHECKSUM_UNNECESSARY blocks?

--
    Manfred

^ permalink raw reply

* Re: [git patches] net driver updates
From: Andreas Kleen @ 2006-05-21 13:24 UTC (permalink / raw)
  To: Manfred Spraul
  Cc: Andrew Morton, Linus Torvalds, jeff, netdev, linux-kernel,
	Ayaz Abdulla
In-Reply-To: <447012B2.9050207@colorfullife.com>


> No idea, but unlikely. The fix removes a duplicate request_irq call.
> Is
> it possible that the both instances run concurrently?

The system has two Forcedeth ports, but only one has a cable connected.
I don't think there is any parallelism. Just one connection with a lot
of data. It didn't happen with 2.6.16.

If you don't have any other good ideas I will try to track it down.

-Andi


^ 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