Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] fix hostap registration order
From: David Miller @ 2010-12-10 17:47 UTC (permalink / raw)
  To: mroos; +Cc: j, netdev, linux-wireless
In-Reply-To: <alpine.SOC.1.00.1012100918300.15996@math.ut.ee>

From: Meelis Roos <mroos@linux.ee>
Date: Fri, 10 Dec 2010 09:19:51 +0200 (EET)

>> > In 2.6.37-rc4, hostap_pci init gives a WARNING with backtrace telling 
>> > that netif_stop_queue is called before register_netdev. Fix it by moving 
>> > this call after register_netdev. Removes the warning and seems to work, 
>> > but why is the call to netif_stop_queue needed at all after 
>> > register_netdev?
>> 
>> It should simply not touch the queue state at all at this point.
>> 
>> Your change would add a race.  At the moment the device is registered
>> it can be brought up, and then your code will eroneously modify
>> the queue state.
> 
> OK, I can make a simpler patch for that but I would like to understand 
> the original reasons for having netif_stop_queue there. Just a relict or 
> still somehow important?

I think it was neither.

The queue state is "don't care" at this point, and always has been,
and a lot of drivers had this unnecessary netif_stop_queue() call
there.

^ permalink raw reply

* Re: pull request: wireless-next-2.6 2010-12-08
From: David Miller @ 2010-12-10 18:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20101208210432.GH2423@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Wed, 8 Dec 2010 16:04:32 -0500

> Here is the latest batch of updates intended for 2.6.38.  It also
> includes my last wireless-2.6 pull request that you just added
> to net-2.6.
> 
> This includes the usual batch of drivers updates, with ath9k and
> iwlwifi as the usual standouts.  This also includes some mac80211
> documentation updates from Johannes, and a flurry of ath5k updates
> from Nick.  This also includes a collection of bluetooth updates by
> way of Gustavo, a couple of libertas updates, some more work on b43
> N-phy support, and a variety of other patches.

So I pulled this in.

Since I did the net-2.6 --> net-next-2.6 merge first, I ended up having
to deal with the ar9003_eeprom.c conflicts in the ath9k driver even
though you took care of that as well in this tree of your's.

But it was a good gut check since we both resolved the conflict pretty
much the same way, so I have confidence in the merge resolution :-)

Anyways, please take a look at net-next-2.6 and double-check what I
did.

Thanks!

^ permalink raw reply

* Re: Adding Support for SG,GSO,GRO
From: David Miller @ 2010-12-10 18:05 UTC (permalink / raw)
  To: bhutchings; +Cc: mirqus, equinox, srk, netdev, axboe
In-Reply-To: <1291998028.11673.6.camel@bwh-desktop>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 10 Dec 2010 16:20:28 +0000

> Now please stop wasting your own time and that of the networking
> maintainers, and remember to check for checksum offload next time you
> need to select a network controller.

Seriously, I'm incredibly glad someone other than me said this
because this is how I've felt since the first two postings in
this thread.

^ permalink raw reply

* Re: [PATCH] iproute2: ip: add wilcard support for device matching
From: Octavian Purdila @ 2010-12-10 18:06 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Stephen Hemminger, netdev, Lucian Adrian Grijincu, Vlad Dogaru
In-Reply-To: <1292002959.3580.321.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Friday 10 December 2010, 19:42:39

> Le vendredi 10 décembre 2010 à 19:32 +0200, Octavian Purdila a écrit :
> > Would allowing escaping it fix the issue? Like:
> > 
> > ip link add link bond0 "vlan\*" txqueuelen 100 type vlan id 999
> 
> Well, same compat problem ;)
> 
> $ ip link add link bond0 "vlan\*199" type vlan id 199
> $ ifconfig "vlan\*199"

:) Then use a special dev keyword like dev* ?

$ ip link set dev* dummy set

Or use a new flag to allow expansion?

$ ip -e link set dev dummy* set


Thanks,
tavi

^ permalink raw reply

* Re: [PATCH] Fix build system and configure script to use for cross build. Optional IPv6.
From: Pkun @ 2010-12-10 18:13 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20101210081452.360e2689@nehalam>

2010/12/10 Stephen Hemminger <shemminger@linux-foundation.org>:
> On Fri, 10 Dec 2010 18:34:31 +0300
> Serj Kalichev <serj.kalichev@gmail.com> wrote:
>
>> The Makefiles and configure script understand the external variables like
>> CC, CFLAGS, LDFLAGS etc. So it can be used for cross build easily. The
>> configure script use CC instead hardcoded gcc and search for the xtables
>> within specified SYSROOT but not on the host. Two checks were added. The
>> check for the IPv6 support and check for the Berkeley DB availability.
>> The iproute2 can be build without IPv6 now.
>>
>> Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
>
> IPv6 support should not be optional.
>
>
> --
>

Why? I don't need an IPv6. Who need it - will switch it on. No problem

Sorry for duplication. I have subscribed to netdev list.

^ permalink raw reply

* Re: pull request: wireless-next-2.6 2010-12-08
From: John W. Linville @ 2010-12-10 18:20 UTC (permalink / raw)
  To: David Miller; +Cc: linux-wireless, netdev
In-Reply-To: <20101210.100141.183065894.davem@davemloft.net>

On Fri, Dec 10, 2010 at 10:01:41AM -0800, David Miller wrote:
> From: "John W. Linville" <linville@tuxdriver.com>
> Date: Wed, 8 Dec 2010 16:04:32 -0500
> 
> > Here is the latest batch of updates intended for 2.6.38.  It also
> > includes my last wireless-2.6 pull request that you just added
> > to net-2.6.
> > 
> > This includes the usual batch of drivers updates, with ath9k and
> > iwlwifi as the usual standouts.  This also includes some mac80211
> > documentation updates from Johannes, and a flurry of ath5k updates
> > from Nick.  This also includes a collection of bluetooth updates by
> > way of Gustavo, a couple of libertas updates, some more work on b43
> > N-phy support, and a variety of other patches.
> 
> So I pulled this in.
> 
> Since I did the net-2.6 --> net-next-2.6 merge first, I ended up having
> to deal with the ar9003_eeprom.c conflicts in the ath9k driver even
> though you took care of that as well in this tree of your's.
> 
> But it was a good gut check since we both resolved the conflict pretty
> much the same way, so I have confidence in the merge resolution :-)
> 
> Anyways, please take a look at net-next-2.6 and double-check what I
> did.

Looks good to me...thanks!

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: pull request: sfc-next-2.6 2010-12-10
From: David Miller @ 2010-12-10 18:47 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev, linux-net-drivers
In-Reply-To: <1292002527.11673.14.camel@bwh-desktop>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 10 Dec 2010 17:35:27 +0000

> The following changes since commit defb3519a64141608725e2dac5a5aa9a3c644bae:
> 
>   net: Abstract away all dst_entry metrics accesses. (2010-12-09 10:46:36 -0800)
> 
> are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6.git for-davem

Pulled, thanks Ben.

Indeed TX push looks intersting.

^ permalink raw reply

* Re: [PATCH] Fix build system and configure script to use for cross build. Optional IPv6.
From: Stephen Hemminger @ 2010-12-10 18:55 UTC (permalink / raw)
  To: Pkun; +Cc: netdev
In-Reply-To: <AANLkTikFHoMWybK8LWoSKzPhWjVEk1TUSypVsNxEq7nd@mail.gmail.com>

On Fri, 10 Dec 2010 21:13:28 +0300
Pkun <serj.kalichev@gmail.com> wrote:

> 2010/12/10 Stephen Hemminger <shemminger@linux-foundation.org>:
> > On Fri, 10 Dec 2010 18:34:31 +0300
> > Serj Kalichev <serj.kalichev@gmail.com> wrote:
> >
> >> The Makefiles and configure script understand the external variables like
> >> CC, CFLAGS, LDFLAGS etc. So it can be used for cross build easily. The
> >> configure script use CC instead hardcoded gcc and search for the xtables
> >> within specified SYSROOT but not on the host. Two checks were added. The
> >> check for the IPv6 support and check for the Berkeley DB availability.
> >> The iproute2 can be build without IPv6 now.
> >>
> >> Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
> >
> > IPv6 support should not be optional.
> >
> >
> > --
> >
> 
> Why? I don't need an IPv6. Who need it - will switch it on. No problem
> 

Because I want iproute to be a complete tool, not a user configurable
nightmare. Just look at busybox to see what over configuration is.

^ permalink raw reply

* Re: [PATCH, post-2.6.36 regression fix] r8169: Fix runtime power management
From: David Miller @ 2010-12-10 19:09 UTC (permalink / raw)
  To: romieu; +Cc: rjw, mjg, netdev, linux-kernel, linux-pm
In-Reply-To: <20101209092804.GA4113@electric-eye.fr.zoreil.com>

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 9 Dec 2010 10:28:04 +0100

> Rafael J. Wysocki <rjw@sisk.pl> :
> [...]
>> I noticed that one of the post-2.6.36 patches broke runtime PM of the
>> r8169 on my MSI Wind test machine in such a way that the link was not
>> brought up after reconnecting the network cable.
>> 
>> In the process of debugging the issue I realized that we only should
>> invoke the runtime PM functions in rtl8169_check_link_status() when
>> link change is reported and if we do so, the problem goes away.
>> Moreover, this allows rtl8169_runtime_idle() to be simplified quite
>> a bit.
>> 
>> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Acked-by: Francois Romieu <romieu@fr.zoreil.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] Document the kernel_recvmsg() function
From: David Miller @ 2010-12-10 19:13 UTC (permalink / raw)
  To: mato; +Cc: netdev, sustrik
In-Reply-To: <20101210100404.GA28580@dezo.moloch.sk>

From: Martin Lucina <mato@kotelna.sk>
Date: Fri, 10 Dec 2010 11:04:05 +0100

> Subject: [PATCH] Document the kernel_recvmsg() function
> 
> Signed-off-by: Martin Lucina <mato@kotelna.sk>

Applied.

^ permalink raw reply

* Re: [PATCH net-next-2.6 v8 01/20] CAN : Add flow control processing.
From: David Miller @ 2010-12-10 19:17 UTC (permalink / raw)
  To: tomoya-linux-ECg8zkTtlr0C6LszWs/t0g
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA, yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w, wg-5Yr1BZd7O62+XT7JhA+gdA
In-Reply-To: <4CFE13E4.2020707-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>


Your subject lines need to be fixed.

You are not making changes to the CAN subsystem, you are making
changes to the "pch_can" device driver.

Also you should not put a space before the ":" character.  So
something like 

[PATCH net-next-2.6 v8 01/20] pch_can: Add flow control processing

Thanks.

^ permalink raw reply

* Re: net-next-2.6 [Patch 1/1] dccp: dead code elimination
From: David Miller @ 2010-12-10 19:23 UTC (permalink / raw)
  To: gerrit; +Cc: dccp, netdev
In-Reply-To: <1291982371-5666-1-git-send-email-gerrit@erg.abdn.ac.uk>

From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Date: Fri, 10 Dec 2010 12:59:30 +0100

> Dave,
> 
> can you please consider the attached patch - it removes indeed dead code.
> I have also placed this in into a fresh (today's) copy of net-next-2.6, on
> 
>     git://eden-feed.erg.abdn.ac.uk/net-next-2.6        [subtree 'dccp']

Pulled, thanks!

^ permalink raw reply

* RE: [net-next-2.6 25/27] e1000e: static analysis tools complain of a possible null ptr p dereference
From: Tantilov, Emil S @ 2010-12-10 19:35 UTC (permalink / raw)
  To: Joe Perches, Kirsher, Jeffrey T
  Cc: davem@davemloft.net, davem@davemleft.org, Allan, Bruce W,
	netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com
In-Reply-To: <1291985090.24978.17.camel@Joe-Laptop>

>-----Original Message-----
>From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On
>Behalf Of Joe Perches
>Sent: Friday, December 10, 2010 4:45 AM
>To: Kirsher, Jeffrey T
>Cc: davem@davemloft.net; davem@davemleft.org; Allan, Bruce W;
>netdev@vger.kernel.org; gospo@redhat.com; bphilips@novell.com
>Subject: Re: [net-next-2.6 25/27] e1000e: static analysis tools complain of
>a possible null ptr p dereference
>
>On Fri, 2010-12-10 at 02:06 -0800, Jeff Kirsher wrote:
>> diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
>[]
>> +		default:
>> +			data[i] = 0;
>> +			continue;
>> +			break;
>
>Using
>
>	continue;
>	break;
>
>is odd and unhelpful.
>Just continue; is sufficient and clear.

It's odd and without consequence but not necessarily "unhelpful" as it can protect from bugs in case someone was to add another case statement. While unlikely, bugs in switch statements due to missing breaks are not unheard of.

Looking at the kernel source there is no consistency as far as break in the default: case is concerned.

Dave, unless this is infringing on some coding style rule, I would request that the patch be applied as is.

Thanks,
Emil


^ permalink raw reply

* Re: [PATCH] iproute2: initialize the ll_map only once
From: Stephen Hemminger @ 2010-12-10 19:38 UTC (permalink / raw)
  To: Octavian Purdila; +Cc: netdev, Lucian Adrian Grijincu, Vlad Dogaru
In-Reply-To: <1291993190-8838-1-git-send-email-opurdila@ixiacom.com>

On Fri, 10 Dec 2010 16:59:50 +0200
Octavian Purdila <opurdila@ixiacom.com> wrote:

> Avoid initializing the LL map (which involves a costly RTNL dump)
> multiple times. This can happen when running in batch mode.
> 
> Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>

applied
-- 

^ permalink raw reply

* Re: unable to handle kernel NULL pointer dereference in skb_dequeue
From: Denys Fedoryshchenko @ 2010-12-10 19:51 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Andrej Ota, linux-kernel, gvs, Rami Rosen, netdev
In-Reply-To: <1291387595.2897.350.camel@edumazet-laptop>

On Friday 03 December 2010 16:46:35 Eric Dumazet wrote:
> Le vendredi 03 décembre 2010 à 15:37 +0100, Andrej Ota a écrit :
> > >> Patch that works for me is below. Now I only hope I haven't
> > >> (re)introduced a memory leak...
> > > 
> > > Problem comes from commit 55c95e738da85 (fix return value of
> > > __pppoe_xmit() method)
> > > 
> > > I am not sure patch is OK
> > 
> > Me neither. That's why I wrote "works for me". All I dare say is that it
> > works better than current code and is probably no worse than it was
> > before above mentioned commit. Apart from that, there is no point in
> > having return value for __pppoe_xmit if return value isn't needed.
> > 
> > Easiest way of triggering this BUG is by terminating PPPoE on the server
> > side, which then hits "if (!dev) { goto abort; }". This in turn calls
> > "kfree_skb(skb); return 0;" which returns to pppoe_rcv_core which then
> > goto-s to "abort_put" which again calls "kfree_skb(skb)". Voila the bug.
> > 
> > I don't know how to trigger "if (skb_cow_head(skb, ..." to see if I have
> > just caused another BUG. However, if I read file comments at the top, I
> > see a comment from 19/07/01 stating that I have to delete original skb
> > if code succeeds and never delete it on failure. About the skb copy
> > mentioned in the same comment, I don't know. 2001 was many commits ago.
> 
> Well, all I wanted to say was that _I_ was not sure, but probably other
> network guys have a better diagnostic.
> 
> Rami, could you re-explain the rationale of your patch ?
> 
> Thanks
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Is there any plans to queue any patch to stable?
pppoe is almost dead in 2.6.36.*

^ permalink raw reply

* RE: [net-next-2.6 25/27] e1000e: static analysis tools complain of a possible null ptr p dereference
From: Joe Perches @ 2010-12-10 19:58 UTC (permalink / raw)
  To: Tantilov, Emil S
  Cc: Kirsher, Jeffrey T, davem@davemloft.net, Allan, Bruce W,
	netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com,
	netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com
In-Reply-To: <EA929A9653AAE14F841771FB1DE5A136602D54FD2F@rrsmsx501.amr.corp.intel.com>

On Fri, 2010-12-10 at 12:35 -0700, Tantilov, Emil S wrote:
> >On Fri, 2010-12-10 at 02:06 -0800, Jeff Kirsher wrote:
> >> diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
> >[]
> >> +		default:
> >> +			data[i] = 0;
> >> +			continue;
> >> +			break;
> >Using
> >	continue;
> >	break;
> >is odd and unhelpful.
> >Just continue; is sufficient and clear.
> It's odd and without consequence but not necessarily "unhelpful" as it
> can protect from bugs in case someone was to add another case
> statement.

continue statements are not fall-through.

Adding another case statement in the switch below
this case label would work just fine.

> While unlikely, bugs in switch statements due to missing breaks are
> not unheard of.

True, but that's not this case.

> Looking at the kernel source there is no consistency as far as break
> in the default: case is concerned.

It's not the break, it's the break after continue that's odd.

Glancing through the source code using
	$ grep -rP --include=*.[ch] -B 3 "\bcontinue\s*;\s*break\s*;" *
this is a pretty unusual coding style.

Most all of the matches are like:
	if (condition)
		continue;
	break;

Your choice, your code.  I just think it's ugly
as well as odd and unhelpful.

cheers, Joe


^ permalink raw reply

* Re: [net-next-2.6 25/27] e1000e: static analysis tools complain of a possible null ptr p dereference
From: David Miller @ 2010-12-10 20:16 UTC (permalink / raw)
  To: emil.s.tantilov
  Cc: joe, jeffrey.t.kirsher, davem, bruce.w.allan, netdev, gospo,
	bphilips
In-Reply-To: <EA929A9653AAE14F841771FB1DE5A136602D54FD2F@rrsmsx501.amr.corp.intel.com>

From: "Tantilov, Emil S" <emil.s.tantilov@intel.com>
Date: Fri, 10 Dec 2010 12:35:45 -0700

> Dave, unless this is infringing on some coding style rule, I would request that the patch be applied as is.

I think Ben's request is more than reasonable.  Please make his requested
change.  "continue; break;" looks quite silly to me too.

^ permalink raw reply

* Re: unable to handle kernel NULL pointer dereference in skb_dequeue
From: David Miller @ 2010-12-10 20:18 UTC (permalink / raw)
  To: nuclearcat; +Cc: eric.dumazet, andrej, linux-kernel, gvs, ramirose, netdev
In-Reply-To: <201012102151.04983.nuclearcat@nuclearcat.com>

From: Denys Fedoryshchenko <nuclearcat@nuclearcat.com>
Date: Fri, 10 Dec 2010 21:51:04 +0200

> On Friday 03 December 2010 16:46:35 Eric Dumazet wrote:
>> Le vendredi 03 décembre 2010 à 15:37 +0100, Andrej Ota a écrit :
>> > >> Patch that works for me is below. Now I only hope I haven't
>> > >> (re)introduced a memory leak...
>> > > 
>> > > Problem comes from commit 55c95e738da85 (fix return value of
>> > > __pppoe_xmit() method)
>> > > 
>> > > I am not sure patch is OK
>> > 
>> > Me neither. That's why I wrote "works for me". All I dare say is that it
>> > works better than current code and is probably no worse than it was
>> > before above mentioned commit. Apart from that, there is no point in
>> > having return value for __pppoe_xmit if return value isn't needed.
>> > 
>> > Easiest way of triggering this BUG is by terminating PPPoE on the server
>> > side, which then hits "if (!dev) { goto abort; }". This in turn calls
>> > "kfree_skb(skb); return 0;" which returns to pppoe_rcv_core which then
>> > goto-s to "abort_put" which again calls "kfree_skb(skb)". Voila the bug.
>> > 
>> > I don't know how to trigger "if (skb_cow_head(skb, ..." to see if I have
>> > just caused another BUG. However, if I read file comments at the top, I
>> > see a comment from 19/07/01 stating that I have to delete original skb
>> > if code succeeds and never delete it on failure. About the skb copy
>> > mentioned in the same comment, I don't know. 2001 was many commits ago.
>> 
>> Well, all I wanted to say was that _I_ was not sure, but probably other
>> network guys have a better diagnostic.
>> 
>> Rami, could you re-explain the rationale of your patch ?
>> 
>> Thanks
>> 
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Is there any plans to queue any patch to stable?
> pppoe is almost dead in 2.6.36.*

I'll deal with it for -stable once I evaluate this patch for upstream,
which I haven't even gotten to yet.

When people bark about -stable this and -stable that, it just takes
more time away from me actually getting through all the patches.  If
it causes a crash, I know it should go to stable and I'll take care of
it.  So there is no need to make an explicit note or query about it.

Thanks.

^ permalink raw reply

* Re: [net-next-2.6 03/27] Documentation/networking/igb.txt: update documentation
From: David Miller @ 2010-12-10 20:21 UTC (permalink / raw)
  To: bhutchings; +Cc: jeffrey.t.kirsher, davem, netdev, gospo, bphilips
In-Reply-To: <1291996224.11673.2.camel@bwh-desktop>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 10 Dec 2010 15:50:24 +0000

> On Fri, 2010-12-10 at 01:50 -0800, Jeff Kirsher wrote:
>> Update Intel Wired LAN igb documentation.
>> 
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> ---
>>  Documentation/networking/igb.txt |   22 +++++++++++++++++++---
>>  1 files changed, 19 insertions(+), 3 deletions(-)
>> 
>> diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt
>> index ab2d718..393bdb7 100644
>> --- a/Documentation/networking/igb.txt
>> +++ b/Documentation/networking/igb.txt
>> @@ -36,6 +36,7 @@ Default Value: 0
>>  This parameter adds support for SR-IOV.  It causes the driver to spawn up to
>>  max_vfs worth of virtual function.
>>  
>> +
>>  Additional Configurations
>>  =========================
>>  
>> @@ -60,7 +61,8 @@ Additional Configurations
>>    Ethtool
>>    -------
>>    The driver utilizes the ethtool interface for driver configuration and
>> -  diagnostics, as well as displaying statistical information.
>> +  diagnostics, as well as displaying statistical information. The latest
>> +  version of Ethtool can be found at:
>>  
>>    http://sourceforge.net/projects/gkernel.
> 
> Please update this to:
> http://ftp.kernel.org/pub/software/network/ethtool/

Indeed.

Intel folks, please address all of Ben's feedback and respin this
pull request, thanks.

^ permalink raw reply

* Re: [PATCH] connector: add module alias
From: David Miller @ 2010-12-10 20:28 UTC (permalink / raw)
  To: zbr; +Cc: shemminger, netdev
In-Reply-To: <20101209184746.GA2476@ioremap.net>

From: Evgeniy Polyakov <zbr@ioremap.net>
Date: Thu, 9 Dec 2010 21:47:46 +0300

> On Thu, Dec 09, 2010 at 09:36:46AM -0800, Stephen Hemminger (shemminger@vyatta.com) wrote:
>> Since connector can be built as a module and uses netlink socket
>> to communicate. The module should have an alias to autoload when socket
>> of NETLINK_CONNECTOR type is requested.
> 
> Ack, thank you.

Please use formalized "Acked-by: " tags so that the automated tools do
all the work for me and I don't have to type it in by hand.

> David, please apply.

Done, thanks.

^ permalink raw reply

* pull request: wireless-2.6 2010-12-10
From: John W. Linville @ 2010-12-10 20:29 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev, linux-kernel

Dave,

Here is the latest round of wireless bits intended for 2.6.37...

Included are some orinoco fixes, one to avoid the crash in bug 23932 and
two others that render TKIP countermeasures ineffective (i.e. decreased
security).  Helmut has provided us a fix to avoid a BUG when using
shared skbs.  The ath9k team gives us a fix for failed resumes on
ath9k_htc, a fix for detecting broadcast frames with a MIC failure, a
fix for a null pointer access when generating beacons, and a DMA issue
that can lead to memory corruption.  Matteo Croce pitches-in with a fix
to prevent transmitting with too much power.  Finally,  Javier Cardona
provides a trio of ath5k fixes that restore mesh function on those
devices.

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit f19872575ff7819a3723154657a497d9bca66b33:

  tcp: protect sysctl_tcp_cookie_size reads (2010-12-08 12:34:09 -0800)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master

David Kilroy (3):
      orinoco: initialise priv->hw before assigning the interrupt
      orinoco: clear countermeasure setting on commit
      orinoco: fix TKIP countermeasure behaviour

Felix Fietkau (1):
      ath9k: fix a DMA related race condition on reset

Helmut Schaa (1):
      mac80211: Fix BUG in pskb_expand_head when transmitting shared skbs

Javier Cardona (3):
      ath5k: Fix beaconing in mesh mode
      ath5k: Prevent mesh interfaces from being counted as ad-hoc
      ath5k: Put the right tsf value in mesh beacons

Matteo Croce (1):
      ath9k: fix bug in tx power

Rajkumar Manoharan (1):
      ath9k: fix beacon resource related race condition

Senthil Balasubramanian (1):
      ath9k: Fix STA disconnect issue due to received MIC failed bcast frames

Sujith Manoharan (1):
      ath9k_htc: Fix suspend/resume

 drivers/net/wireless/ath/ath5k/base.c         |   13 +++++++----
 drivers/net/wireless/ath/ath9k/ath9k.h        |    2 +-
 drivers/net/wireless/ath/ath9k/eeprom_def.c   |   12 +++++++---
 drivers/net/wireless/ath/ath9k/hif_usb.c      |    7 ++++++
 drivers/net/wireless/ath/ath9k/htc.h          |    3 ++
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |    6 +++++
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |    4 +-
 drivers/net/wireless/ath/ath9k/mac.c          |    3 +-
 drivers/net/wireless/ath/ath9k/main.c         |   26 +++++++++---------------
 drivers/net/wireless/ath/ath9k/recv.c         |    9 +++++++-
 drivers/net/wireless/ath/ath9k/xmit.c         |   22 +++++---------------
 drivers/net/wireless/orinoco/main.c           |    6 +++++
 drivers/net/wireless/orinoco/orinoco_cs.c     |   14 ++++++------
 drivers/net/wireless/orinoco/spectrum_cs.c    |   14 ++++++------
 drivers/net/wireless/orinoco/wext.c           |    4 +-
 net/mac80211/tx.c                             |   21 +++++++++++++++++--
 16 files changed, 100 insertions(+), 66 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 8251946..42ed923 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1917,7 +1917,8 @@ ath5k_beacon_send(struct ath5k_softc *sc)
 		sc->bmisscount = 0;
 	}
 
-	if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) {
+	if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) ||
+			sc->opmode == NL80211_IFTYPE_MESH_POINT) {
 		u64 tsf = ath5k_hw_get_tsf64(ah);
 		u32 tsftu = TSF_TO_TU(tsf);
 		int slot = ((tsftu % sc->bintval) * ATH_BCBUF) / sc->bintval;
@@ -1949,8 +1950,9 @@ ath5k_beacon_send(struct ath5k_softc *sc)
 		/* NB: hw still stops DMA, so proceed */
 	}
 
-	/* refresh the beacon for AP mode */
-	if (sc->opmode == NL80211_IFTYPE_AP)
+	/* refresh the beacon for AP or MESH mode */
+	if (sc->opmode == NL80211_IFTYPE_AP ||
+			sc->opmode == NL80211_IFTYPE_MESH_POINT)
 		ath5k_beacon_update(sc->hw, vif);
 
 	ath5k_hw_set_txdp(ah, sc->bhalq, bf->daddr);
@@ -2851,7 +2853,8 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
 
 	/* Assign the vap/adhoc to a beacon xmit slot. */
 	if ((avf->opmode == NL80211_IFTYPE_AP) ||
-	    (avf->opmode == NL80211_IFTYPE_ADHOC)) {
+	    (avf->opmode == NL80211_IFTYPE_ADHOC) ||
+	    (avf->opmode == NL80211_IFTYPE_MESH_POINT)) {
 		int slot;
 
 		WARN_ON(list_empty(&sc->bcbuf));
@@ -2870,7 +2873,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
 		sc->bslot[avf->bslot] = vif;
 		if (avf->opmode == NL80211_IFTYPE_AP)
 			sc->num_ap_vifs++;
-		else
+		else if (avf->opmode == NL80211_IFTYPE_ADHOC)
 			sc->num_adhoc_vifs++;
 	}
 
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 0d0bec3..0963071 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -329,7 +329,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp);
 struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype);
 void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq);
 int ath_tx_setup(struct ath_softc *sc, int haltype);
-void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx);
+bool ath_drain_all_txq(struct ath_softc *sc, bool retry_tx);
 void ath_draintxq(struct ath_softc *sc,
 		     struct ath_txq *txq, bool retry_tx);
 void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an);
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 526d7c9..a3ccb1b 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -1063,15 +1063,19 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah,
 	case 1:
 		break;
 	case 2:
-		scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
+		if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN)
+			scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
+		else
+			scaledPower = 0;
 		break;
 	case 3:
-		scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
+		if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN)
+			scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
+		else
+			scaledPower = 0;
 		break;
 	}
 
-	scaledPower = max((u16)0, scaledPower);
-
 	if (IS_CHAN_2GHZ(chan)) {
 		numCtlModes = ARRAY_SIZE(ctlModesFor11g) -
 			SUB_NUM_CTL_MODES_AT_2G_40;
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index dfb6560..0de3c3d 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -1024,6 +1024,13 @@ static int ath9k_hif_usb_suspend(struct usb_interface *interface,
 	struct hif_device_usb *hif_dev =
 		(struct hif_device_usb *) usb_get_intfdata(interface);
 
+	/*
+	 * The device has to be set to FULLSLEEP mode in case no
+	 * interface is up.
+	 */
+	if (!(hif_dev->flags & HIF_USB_START))
+		ath9k_htc_suspend(hif_dev->htc_handle);
+
 	ath9k_hif_usb_dealloc_urbs(hif_dev);
 
 	return 0;
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 75ecf6a..c3b561d 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -455,6 +455,8 @@ u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv);
 void ath9k_htc_ps_wakeup(struct ath9k_htc_priv *priv);
 void ath9k_htc_ps_restore(struct ath9k_htc_priv *priv);
 void ath9k_ps_work(struct work_struct *work);
+bool ath9k_htc_setpower(struct ath9k_htc_priv *priv,
+			enum ath9k_power_mode mode);
 
 void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv);
 void ath9k_init_leds(struct ath9k_htc_priv *priv);
@@ -464,6 +466,7 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
 			   u16 devid, char *product);
 void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug);
 #ifdef CONFIG_PM
+void ath9k_htc_suspend(struct htc_target *htc_handle);
 int ath9k_htc_resume(struct htc_target *htc_handle);
 #endif
 #ifdef CONFIG_ATH9K_HTC_DEBUGFS
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 7c8a38d..8776f49 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -891,6 +891,12 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug)
 }
 
 #ifdef CONFIG_PM
+
+void ath9k_htc_suspend(struct htc_target *htc_handle)
+{
+	ath9k_htc_setpower(htc_handle->drv_priv, ATH9K_PM_FULL_SLEEP);
+}
+
 int ath9k_htc_resume(struct htc_target *htc_handle)
 {
 	int ret;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 9a3be8d..51977ca 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -63,8 +63,8 @@ static enum htc_phymode ath9k_htc_get_curmode(struct ath9k_htc_priv *priv,
 	return mode;
 }
 
-static bool ath9k_htc_setpower(struct ath9k_htc_priv *priv,
-			       enum ath9k_power_mode mode)
+bool ath9k_htc_setpower(struct ath9k_htc_priv *priv,
+			enum ath9k_power_mode mode)
 {
 	bool ret;
 
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 8c13479..c996963 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -703,8 +703,7 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
 			rs->rs_phyerr = phyerr;
 		} else if (ads.ds_rxstatus8 & AR_DecryptCRCErr)
 			rs->rs_status |= ATH9K_RXERR_DECRYPT;
-		else if ((ads.ds_rxstatus8 & AR_MichaelErr) &&
-		         rs->rs_keyix != ATH9K_RXKEYIX_INVALID)
+		else if (ads.ds_rxstatus8 & AR_MichaelErr)
 			rs->rs_status |= ATH9K_RXERR_MIC;
 		else if (ads.ds_rxstatus8 & AR_KeyMiss)
 			rs->rs_status |= ATH9K_RXERR_DECRYPT;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index dace215..c0c3464 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -244,11 +244,12 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
 	 * the relevant bits of the h/w.
 	 */
 	ath9k_hw_set_interrupts(ah, 0);
-	ath_drain_all_txq(sc, false);
+	stopped = ath_drain_all_txq(sc, false);
 
 	spin_lock_bh(&sc->rx.pcu_lock);
 
-	stopped = ath_stoprecv(sc);
+	if (!ath_stoprecv(sc))
+		stopped = false;
 
 	/* XXX: do not flush receive queue here. We don't want
 	 * to flush data frames already in queue because of
@@ -1519,8 +1520,6 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
 	struct ath_softc *sc = aphy->sc;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
 	struct ath_vif *avp = (void *)vif->drv_priv;
-	bool bs_valid = false;
-	int i;
 
 	ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n");
 
@@ -1534,26 +1533,21 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
 	if ((sc->sc_ah->opmode == NL80211_IFTYPE_AP) ||
 	    (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) ||
 	    (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) {
+		/* Disable SWBA interrupt */
+		sc->sc_ah->imask &= ~ATH9K_INT_SWBA;
 		ath9k_ps_wakeup(sc);
+		ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_ah->imask);
 		ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
 		ath9k_ps_restore(sc);
+		tasklet_kill(&sc->bcon_tasklet);
 	}
 
 	ath_beacon_return(sc, avp);
 	sc->sc_flags &= ~SC_OP_BEACONS;
 
-	for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) {
-		if (sc->beacon.bslot[i] == vif) {
-			printk(KERN_DEBUG "%s: vif had allocated beacon "
-			       "slot\n", __func__);
-			sc->beacon.bslot[i] = NULL;
-			sc->beacon.bslot_aphy[i] = NULL;
-		} else if (sc->beacon.bslot[i])
-			bs_valid = true;
-	}
-	if (!bs_valid && (sc->sc_ah->imask & ATH9K_INT_SWBA)) {
-		/* Disable SWBA interrupt */
-		sc->sc_ah->imask &= ~ATH9K_INT_SWBA;
+	if (sc->nbcnvifs) {
+		/* Re-enable SWBA interrupt */
+		sc->sc_ah->imask |= ATH9K_INT_SWBA;
 		ath9k_ps_wakeup(sc);
 		ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_ah->imask);
 		ath9k_ps_restore(sc);
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 1a62e35..fdc2ec5 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -838,6 +838,10 @@ static bool ath9k_rx_accept(struct ath_common *common,
 			    struct ath_rx_status *rx_stats,
 			    bool *decrypt_error)
 {
+#define is_mc_or_valid_tkip_keyix ((is_mc ||			\
+		(rx_stats->rs_keyix != ATH9K_RXKEYIX_INVALID && \
+		test_bit(rx_stats->rs_keyix, common->tkip_keymap))))
+
 	struct ath_hw *ah = common->ah;
 	__le16 fc;
 	u8 rx_status_len = ah->caps.rx_status_len;
@@ -879,15 +883,18 @@ static bool ath9k_rx_accept(struct ath_common *common,
 		if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) {
 			*decrypt_error = true;
 		} else if (rx_stats->rs_status & ATH9K_RXERR_MIC) {
+			bool is_mc;
 			/*
 			 * The MIC error bit is only valid if the frame
 			 * is not a control frame or fragment, and it was
 			 * decrypted using a valid TKIP key.
 			 */
+			is_mc = !!is_multicast_ether_addr(hdr->addr1);
+
 			if (!ieee80211_is_ctl(fc) &&
 			    !ieee80211_has_morefrags(fc) &&
 			    !(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) &&
-			    test_bit(rx_stats->rs_keyix, common->tkip_keymap))
+			    is_mc_or_valid_tkip_keyix)
 				rxs->flag |= RX_FLAG_MMIC_ERROR;
 			else
 				rx_stats->rs_status &= ~ATH9K_RXERR_MIC;
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index f2ade24..aff0478 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1120,7 +1120,7 @@ void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx)
 	}
 }
 
-void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
+bool ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
 {
 	struct ath_hw *ah = sc->sc_ah;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -1128,7 +1128,7 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
 	int i, npend = 0;
 
 	if (sc->sc_flags & SC_OP_INVALID)
-		return;
+		return true;
 
 	/* Stop beacon queue */
 	ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
@@ -1142,25 +1142,15 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
 		}
 	}
 
-	if (npend) {
-		int r;
-
-		ath_print(common, ATH_DBG_FATAL,
-			  "Failed to stop TX DMA. Resetting hardware!\n");
-
-		spin_lock_bh(&sc->sc_resetlock);
-		r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false);
-		if (r)
-			ath_print(common, ATH_DBG_FATAL,
-				  "Unable to reset hardware; reset status %d\n",
-				  r);
-		spin_unlock_bh(&sc->sc_resetlock);
-	}
+	if (npend)
+		ath_print(common, ATH_DBG_FATAL, "Failed to stop TX DMA!\n");
 
 	for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
 		if (ATH_TXQ_SETUP(sc, i))
 			ath_draintxq(sc, &sc->tx.txq[i], retry_tx);
 	}
+
+	return !npend;
 }
 
 void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index fa0cf74..f3d396e 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -1811,6 +1811,12 @@ static int __orinoco_commit(struct orinoco_private *priv)
 	struct net_device *dev = priv->ndev;
 	int err = 0;
 
+	/* If we've called commit, we are reconfiguring or bringing the
+	 * interface up. Maintaining countermeasures across this would
+	 * be confusing, so note that we've disabled them. The port will
+	 * be enabled later in orinoco_commit or __orinoco_up. */
+	priv->tkip_cm_active = 0;
+
 	err = orinoco_hw_program_rids(priv);
 
 	/* FIXME: what about netif_tx_lock */
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 71b3d68..32954c4 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -151,20 +151,20 @@ orinoco_cs_config(struct pcmcia_device *link)
 		goto failed;
 	}
 
-	ret = pcmcia_request_irq(link, orinoco_interrupt);
-	if (ret)
-		goto failed;
-
-	/* We initialize the hermes structure before completing PCMCIA
-	 * configuration just in case the interrupt handler gets
-	 * called. */
 	mem = ioport_map(link->resource[0]->start,
 			resource_size(link->resource[0]));
 	if (!mem)
 		goto failed;
 
+	/* We initialize the hermes structure before completing PCMCIA
+	 * configuration just in case the interrupt handler gets
+	 * called. */
 	hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
 
+	ret = pcmcia_request_irq(link, orinoco_interrupt);
+	if (ret)
+		goto failed;
+
 	ret = pcmcia_enable_device(link);
 	if (ret)
 		goto failed;
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index fb859a5..db34c28 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -214,21 +214,21 @@ spectrum_cs_config(struct pcmcia_device *link)
 		goto failed;
 	}
 
-	ret = pcmcia_request_irq(link, orinoco_interrupt);
-	if (ret)
-		goto failed;
-
-	/* We initialize the hermes structure before completing PCMCIA
-	 * configuration just in case the interrupt handler gets
-	 * called. */
 	mem = ioport_map(link->resource[0]->start,
 			resource_size(link->resource[0]));
 	if (!mem)
 		goto failed;
 
+	/* We initialize the hermes structure before completing PCMCIA
+	 * configuration just in case the interrupt handler gets
+	 * called. */
 	hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
 	hw->eeprom_pda = true;
 
+	ret = pcmcia_request_irq(link, orinoco_interrupt);
+	if (ret)
+		goto failed;
+
 	ret = pcmcia_enable_device(link);
 	if (ret)
 		goto failed;
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c
index 93505f9..e5afabe 100644
--- a/drivers/net/wireless/orinoco/wext.c
+++ b/drivers/net/wireless/orinoco/wext.c
@@ -911,10 +911,10 @@ static int orinoco_ioctl_set_auth(struct net_device *dev,
 		 */
 		if (param->value) {
 			priv->tkip_cm_active = 1;
-			ret = hermes_enable_port(hw, 0);
+			ret = hermes_disable_port(hw, 0);
 		} else {
 			priv->tkip_cm_active = 0;
-			ret = hermes_disable_port(hw, 0);
+			ret = hermes_enable_port(hw, 0);
 		}
 		break;
 
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index df6aac5..7a637b8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1737,15 +1737,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 	int nh_pos, h_pos;
 	struct sta_info *sta = NULL;
 	u32 sta_flags = 0;
+	struct sk_buff *tmp_skb;
 
 	if (unlikely(skb->len < ETH_HLEN)) {
 		ret = NETDEV_TX_OK;
 		goto fail;
 	}
 
-	nh_pos = skb_network_header(skb) - skb->data;
-	h_pos = skb_transport_header(skb) - skb->data;
-
 	/* convert Ethernet header to proper 802.11 header (based on
 	 * operation mode) */
 	ethertype = (skb->data[12] << 8) | skb->data[13];
@@ -1918,6 +1916,20 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 		goto fail;
 	}
 
+	/*
+	 * If the skb is shared we need to obtain our own copy.
+	 */
+	if (skb_shared(skb)) {
+		tmp_skb = skb;
+		skb = skb_copy(skb, GFP_ATOMIC);
+		kfree_skb(tmp_skb);
+
+		if (!skb) {
+			ret = NETDEV_TX_OK;
+			goto fail;
+		}
+	}
+
 	hdr.frame_control = fc;
 	hdr.duration_id = 0;
 	hdr.seq_ctrl = 0;
@@ -1936,6 +1948,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 		encaps_len = 0;
 	}
 
+	nh_pos = skb_network_header(skb) - skb->data;
+	h_pos = skb_transport_header(skb) - skb->data;
+
 	skb_pull(skb, skip_header_bytes);
 	nh_pos -= skip_header_bytes;
 	h_pos -= skip_header_bytes;
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply related

* Re: [PATCH v16 02/17]Add a new struct for device to manipulate external buffer.
From: David Miller @ 2010-12-10 20:36 UTC (permalink / raw)
  To: xiaohui.xin; +Cc: netdev, kvm, linux-kernel, mst, mingo, herbert, jdike
In-Reply-To: <38fbf05a450b34e939aa1b0f3a5126711990f0cc.1291187695.git.xiaohui.xin@intel.com>

From: xiaohui.xin@intel.com
Date: Wed,  1 Dec 2010 16:08:13 +0800

> From: Xin Xiaohui <xiaohui.xin@intel.com>
> 
>     Add a structure in structure net_device, the new field is
>     named as mp_port. It's for mediate passthru (zero-copy).
>     It contains the capability for the net device driver,
>     a socket, and an external buffer creator, external means
>     skb buffer belongs to the device may not be allocated from
>     kernel space.
> 
>     Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com>
>     Signed-off-by: Zhao Yu <yzhao81new@gmail.com>
>     Reviewed-by: Jeff Dike <jdike@linux.intel.com>

Please eliminate whatever is causing this indentation of your
commit messages.

There should be no special indentation of the commit message.

^ permalink raw reply

* Re: [PATCH v16 03/17] Add a ndo_mp_port_prep pointer to net_device_ops.
From: David Miller @ 2010-12-10 20:36 UTC (permalink / raw)
  To: xiaohui.xin; +Cc: netdev, kvm, linux-kernel, mst, mingo, herbert, jdike
In-Reply-To: <cd0686f2b8fc16a1d87ced228b2a90b93f008b94.1291187695.git.xiaohui.xin@intel.com>

From: xiaohui.xin@intel.com
Date: Wed,  1 Dec 2010 16:08:14 +0800

> +#if defined(CONFIG_MEDIATE_PASSTHRU) || defined(CONFIG_MEDIATE_PASSTHRU_MODULE)
> +	int			(*ndo_mp_port_prep)(struct net_device *dev,
> +						struct mp_port *port);
> +#endif

Please rename this config option so that it is clear, by name, that
this option is for a networking facility.

F.e. CONFIG_NET_MEDIATE_PASSTHRU

^ permalink raw reply

* Re: [PATCH] ipv6: slightly simplify keeping IPv6 addresses on link down
From: David Miller @ 2010-12-10 20:43 UTC (permalink / raw)
  To: shemminger; +Cc: lorenzo, netdev
In-Reply-To: <20101201130421.0ac08bcd@nehalam>

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 1 Dec 2010 13:04:21 -0800

> On Wed, 1 Dec 2010 12:52:42 -0800
> Lorenzo Colitti <lorenzo@google.com> wrote:
> 
>> No, wait... The loop is protected by idev->lock, and the code just
>> before it that clears the temporary address list is essentially
>> identical (except it looks over tempaddr_list instead). Wouldn't that
>> blow up as well?
> 
> The old code walked the list until it was empty. New code could
> get confused if list changed by other changes during the
> period when idev->lock is dropped and notifier is called.

I think Stephen has a point here.

You can't use a "_safe" list traversal if you are dropping the
lock in the middle of that traversal, which is what you code
will be doing.

Lorenzo you've already added serious bugs to this code with your
previous address handling changes (which had reference counting bugs),
so I'm going to heavily scrutinize any "cleanup" or other kind of
change you try to make here.

In fact I really wish you would just leave this code as-is instead
of trying to make such pointless tweaks to it.

Thanks.

^ permalink raw reply

* Re: [PATCH] connector: add module alias
From: Evgeniy Polyakov @ 2010-12-10 20:44 UTC (permalink / raw)
  To: David Miller; +Cc: shemminger, netdev
In-Reply-To: <20101210.122813.229758283.davem@davemloft.net>

On Fri, Dec 10, 2010 at 12:28:13PM -0800, David Miller (davem@davemloft.net) wrote:
> >> Since connector can be built as a module and uses netlink socket
> >> to communicate. The module should have an alias to autoload when socket
> >> of NETLINK_CONNECTOR type is requested.
> > 
> > Ack, thank you.
> 
> Please use formalized "Acked-by: " tags so that the automated tools do
> all the work for me and I don't have to type it in by hand.

Will do, thanks.

-- 
	Evgeniy Polyakov

^ 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