Netdev List
 help / color / mirror / Atom feed
* [GIT] Networking
From: David Miller @ 2010-05-25 23:59 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


1) dev_get_valid_name can create conditions wherein it becomes impossible
   to rename a device, fixed by Daniel Lezcano.

2) CAIF protocol bug fixes from Sjur Braendeland:

   a) wait_ev*_timeout return value accidently stored in 'int' instead
      of 'long'
   b) By-hand list implementation buggy, use standard kernel lists.
   c) Memory allocation failures not handled correctly.
   d) poll() erroneously returns POLLHUP when connecting
   e) missing spin_unlock in cfmuxl_remove_uplayer()
   f) receive needs to set MSG_TRUNC when user buf size is insufficient

3) Cleanup accidently introduced uninitialized variable in pppoe_flush_dev().
   Fix from Dan Carpenter.

4) ISDN fixes from Tilman Schmidt.
   a) ->reset_ctr() op is marked optional, but code doesn't actually
      check for NULL
   b) Dummy stubs for ->reset_ctr() and ->load_firmware() are erroneous
      and cause hangs, delete.

5) Blackfin SIR IRDA device is not harmed by the UART unit bug, so don't
   adjust clock values using the bug workaround adjustment.  From
   Graf Yang.

6) Networking control group is severely limited because it tries to sample
   the task control group at the time of packet transmission.  This really
   can't be done reliably, especially when packets are sent async from
   another context.

   Fix by storing the cgroupid in the socket, sampling it at I/O call
   points (sendmsg, recvmsg, splice_read, sendpage), then use this
   value when we classify via the skb->sk socket.

   Handle special cases like TUN (which call netif_rx() to inject packets)
   directly.

   All of this work done by Herbert Xu.

7) DCCP stores error codes in a u8, which is insufficient for MIPS which
   needs a u16, fix from Yoichi Yuasa.

8) BE2NET bug fixes from Sarveshwar Bandi:
   a) Must PHY reset after FW init.
   b) FW upgrade can take a while, use completions instead of polling
      with softirqs disabled.

9) proc_dointvec change that came in via the networking tree for port
   range specifications introduced a regression for procfs files, accidently
   disallowing write("1\n").  Fix from J. R. Okajima.

10) Use after free in Phone socket close, fix from Rémi Denis-Courmont.

11) Memory leak in macvlan, from Jiri Pirko.

12) Initial GRO fraglist element's ->gso_size can be bogus, if packet
    hits device not TSO capable but fraglist capable.  Fix from Herbert
    Xu.

13) Add support for some new IXGBE device IDs.

14) Memory leak and alloc failure fixes from Denis Kirjaniv.
    a) sh_mdio_release() leaks memory
    b) check for kzalloc() return value in ieee802154.
    c) bfin_mac leaks miibus->irq memory

15) sja1000.c missing spin_lock_init() on priv->cmdreg_lock, fix from
    Oliver Hartkopp.

16) The batched dequeuing of input_pkt_queue introduced this merge window
    added some problems.  Inaccurate packet counting can occur which defeats
    the schemes that RFS uses to prevent out-of-order packet processing when
    we want to modify the the target RX cpu for a flow.

    Fix from Tom Herbert.

17) Several wireless fixes via John Linville and the wireless crew.

18) ENIC bug fixes from Scott Feldman.
    a) Fix UUID fmt'ing array type.
    b) port-profile assosciation happens before we have a MAC address
       assigned, use a random one instead of garbage

19) qdisc_notify() can OOPS, because tc_fill_qdisc() can accidently be
    called for a builtin qdisc.  Fix from Eric Dumazet.

20) do_setlink() had some error handling bugs introduced this cycle
    (failure to initialize 'err' in some error paths), fix from David
    Howells.

21) ethoc_probe can deref a NULL pointer, fix from Thomas Chou.


22) netif_vdbg() definition is garbage when VERBOSE_DEBUG is defined.
    Fix from Ben Hutchings.

23) Netfilter fixes via Patrick McHardy:
    a) nf_ct_sip doesn't handle nonlinear packets, but it needs to
    b) __nf_conntrack_confirm() races with nf_ct_get_next_corpse()

24) Fix race in i2400m_rx_edata() resulting in an OOPS on i2400m->rx_roq,
    from Inaky Perez-Gonzalez.

Please pull, thanks a lot!

The following changes since commit ec96e2fe954c23a54bfdf2673437a39e193a1822:
  Linus Torvalds (1):
        Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm

are available in the git repository at:

  master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master

Baruch Siach (1):
      fec: add support for PHY interface platform data

Ben Hutchings (1):
      net: Fix definition of netif_vdbg() when VERBOSE_DEBUG is not defined

Bruno Randolf (1):
      ath5k: consistently use rx_bufsize for RX DMA

Dan Carpenter (4):
      pppoe: uninitialized variable in pppoe_flush_dev()
      ath9k_htc: dereferencing before check in hif_usb_tx_cb()
      ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
      iwlwifi: testing the wrong variable in iwl_add_bssid_station()

Daniel Lezcano (1):
      net-2.6 : V2 - fix dev_get_valid_name

David Howells (1):
      rtnetlink: Fix error handling in do_setlink()

David S. Miller (4):
      Merge branch 'master' of git://git.kernel.org/.../kaber/nf-next-2.6
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
      Merge branch 'wimax-2.6.35.y' of git://git.kernel.org/.../inaky/wimax
      drivers/net/usb/asix.c: Fix pointer cast.

Denis Kirjanov (3):
      sh_eth: Fix memleak in sh_mdio_release
      ieee802154: Fix possible NULL pointer dereference in wpan_phy_alloc
      bfin_mac: fix memleak in mii_bus{probe|remove}

Eric Dumazet (1):
      net_sched: Fix qdisc_notify()

Felix Fietkau (3):
      cfg80211: fix crash in cfg80211_set_freq()
      ath9k: change beacon allocation to prefer the first beacon slot
      ath9k: remove VEOL support for ad-hoc

Filip Aben (1):
      hso: add support for new products

Gertjan van Wingerde (2):
      rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
      rt2x00: Fix rt2800usb TX descriptor writing.

Graf Yang (1):
      net/irda: bfin_sir: IRDA is not affected by anomaly 05000230

Helmut Schaa (1):
      rt2x00: don't use to_pci_dev in rt2x00pci_uninitialize

Herbert Xu (4):
      gro: Fix bogus gso_size on the first fraglist entry
      cls_cgroup: Store classid in struct sock
      tun: Update classid on packet injection
      cls_cgroup: Fix build error when built-in

Inaky Perez-Gonzalez (1):
      wimax/i2400m: fix bad race condition check in RX path

J. R. Okajima (1):
      proc_dointvec: write a single value

Jiri Pirko (1):
      macvlan: do proper cleanup in macvlan_common_newlink() V2

Joerg Marx (1):
      netfilter: nf_conntrack: fix a race in __nf_conntrack_confirm against nf_ct_get_next_corpse()

Johannes Berg (1):
      cfg80211: add missing braces

John W. Linville (1):
      Revert "ath9k: Group Key fix for VAPs"

Jussi Kivilinna (1):
      rndis_wlan: replace wireless_send_event with cfg80211_disconnected

Juuso Oikarinen (1):
      wl1271: Fix RX data path frame lengths

Luciano Coelho (1):
      netfilter: fix description of expected checkentry return code on xt_target

Luis R. Rodriguez (1):
      ath9k: remove AR9003 from PCI IDs for now

Mallikarjuna R Chilakala (1):
      ixgbe:add support for a new 82599 10G Base-T device

Mike Frysinger (1):
      net-caif: drop redundant Kconfig entries

Oliver Hartkopp (1):
      can: SJA1000 add missing spin_lock_init()

Patrick McHardy (1):
      netfilter: nf_ct_sip: handle non-linear skbs

Randy Dunlap (3):
      wireless: fix mac80211.h kernel-doc warnings
      wireless: fix sta_info.h kernel-doc warnings
      sock.h: fix kernel-doc warning

Reinette Chatre (1):
      iwlwifi: fix internal scan race

Rémi Denis-Courmont (1):
      Phonet: fix potential use-after-free in pep_sock_close()

Sarveshwar Bandi (2):
      be2net: Bug fix in init code in probe
      be2net: Bug fix to avoid disabling bottom half during firmware upgrade.

Scott Feldman (2):
      enic: bug fix: sprintf UUID to string as u8[] rather than u16[] array
      enic: Use random mac addr when associating port-profile

Sjur Braendeland (6):
      caif: Bugfix - wait_ev*_timeout returns long.
      caif: Bugfix - use standard Linux lists
      caif: Bugfix - handle mem-allocation failures
      caif: Bugfix - Poll can't return POLLHUP while connecting.
      caif: Bugfix - missing spin_unlock
      caif: Bugfix - use MSG_TRUNC in receive

Sujith (1):
      cfg80211: Fix signal_type comparison

Tejun Heo (1):
      wireless: update gfp/slab.h includes

Thomas Chou (1):
      ethoc: fix null dereference in ethoc_probe

Tilman Schmidt (2):
      isdn/capi: make reset_ctr op truly optional
      isdn/gigaset: remove dummy CAPI method implementations

Tom Herbert (1):
      net: fix problem in dequeuing from input_pkt_queue

Vasanthakumar Thiagarajan (1):
      ath9k: Fix rx of mcast/bcast frames in PS mode with auto sleep

Yoichi Yuasa (1):
      net/dccp: expansion of error code size

 drivers/isdn/capi/kcapi.c                  |    6 ++
 drivers/isdn/gigaset/capi.c                |   28 +--------
 drivers/net/benet/be.h                     |    2 +
 drivers/net/benet/be_cmds.c                |   19 +++++-
 drivers/net/benet/be_main.c                |   11 ++-
 drivers/net/bfin_mac.c                     |    2 +
 drivers/net/can/sja1000/sja1000.c          |    2 +
 drivers/net/enic/enic_main.c               |   29 ++++++---
 drivers/net/ethoc.c                        |   34 +++++++++-
 drivers/net/fec.c                          |   22 +++++++
 drivers/net/fec.h                          |    2 +
 drivers/net/irda/bfin_sir.c                |    8 ++-
 drivers/net/ixgbe/ixgbe.h                  |    3 +
 drivers/net/ixgbe/ixgbe_82598.c            |    1 +
 drivers/net/ixgbe/ixgbe_82599.c            |    1 +
 drivers/net/ixgbe/ixgbe_main.c             |   69 +++++++++++++++++++++
 drivers/net/ixgbe/ixgbe_phy.c              |   30 +++++++++
 drivers/net/ixgbe/ixgbe_phy.h              |    3 +
 drivers/net/ixgbe/ixgbe_type.h             |    4 +
 drivers/net/macvlan.c                      |    9 +++-
 drivers/net/pppoe.c                        |    1 +
 drivers/net/sh_eth.c                       |    3 +
 drivers/net/tun.c                          |    2 +
 drivers/net/usb/asix.c                     |    4 +-
 drivers/net/usb/hso.c                      |    3 +
 drivers/net/wimax/i2400m/rx.c              |    4 +-
 drivers/net/wireless/ath/ath5k/base.c      |    7 +-
 drivers/net/wireless/ath/ath9k/beacon.c    |   75 ++++-------------------
 drivers/net/wireless/ath/ath9k/hif_usb.c   |   10 +++-
 drivers/net/wireless/ath/ath9k/htc.h       |    1 +
 drivers/net/wireless/ath/ath9k/main.c      |   28 +--------
 drivers/net/wireless/ath/ath9k/pci.c       |    1 -
 drivers/net/wireless/ath/ath9k/recv.c      |   17 ++++--
 drivers/net/wireless/iwlwifi/iwl-agn-ict.c |    1 +
 drivers/net/wireless/iwlwifi/iwl-scan.c    |   21 ++++++-
 drivers/net/wireless/iwlwifi/iwl-sta.c     |    2 +-
 drivers/net/wireless/rndis_wlan.c          |   16 +++--
 drivers/net/wireless/rt2x00/rt2400pci.c    |    9 ++-
 drivers/net/wireless/rt2x00/rt2500pci.c    |    9 ++-
 drivers/net/wireless/rt2x00/rt2800usb.c    |    2 +-
 drivers/net/wireless/rt2x00/rt2x00pci.c    |    2 +-
 drivers/net/wireless/rt2x00/rt61pci.c      |    7 +-
 drivers/net/wireless/rt2x00/rt73usb.c      |    7 +-
 drivers/net/wireless/wl12xx/wl1271_rx.c    |    2 +
 include/linux/fec.h                        |   21 ++++++
 include/linux/netdevice.h                  |   16 ++++-
 include/linux/netfilter/x_tables.h         |    2 +-
 include/net/caif/cfctrl.h                  |    4 +-
 include/net/cls_cgroup.h                   |   63 +++++++++++++++++++
 include/net/mac80211.h                     |    4 +-
 include/net/netfilter/nf_conntrack_core.h  |    2 +-
 include/net/sock.h                         |   12 +++-
 kernel/sysctl.c                            |    4 +-
 net/caif/Kconfig                           |    5 +-
 net/caif/caif_socket.c                     |   91 +++++++++++-----------------
 net/caif/cfctrl.c                          |   92 ++++++++--------------------
 net/caif/cfmuxl.c                          |    3 +-
 net/caif/cfpkt_skbuff.c                    |   25 +++++---
 net/caif/cfserl.c                          |    3 +-
 net/caif/cfsrvl.c                          |    6 ++
 net/core/dev.c                             |   48 ++++++++------
 net/core/rtnetlink.c                       |    4 +-
 net/core/skbuff.c                          |    1 +
 net/core/sock.c                            |   19 ++++++
 net/dccp/input.c                           |    6 +-
 net/ieee802154/wpan-class.c                |    7 ++-
 net/mac80211/key.c                         |    1 -
 net/mac80211/sta_info.h                    |    2 +-
 net/netfilter/nf_conntrack_core.c          |   10 +++
 net/netfilter/nf_conntrack_sip.c           |   12 +---
 net/phonet/pep.c                           |    2 +
 net/sched/cls_cgroup.c                     |   50 ++++++++++-----
 net/sched/sch_api.c                        |   14 ++--
 net/socket.c                               |    9 +++
 net/wireless/chan.c                        |    2 +-
 net/wireless/nl80211.c                     |    6 +-
 net/wireless/scan.c                        |    4 +-
 77 files changed, 682 insertions(+), 387 deletions(-)
 create mode 100644 include/linux/fec.h
 create mode 100644 include/net/cls_cgroup.h

^ permalink raw reply

* Re: linux-next: build warning in Linus' tree
From: David Miller @ 2010-05-25 23:24 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, NeilJay
In-Reply-To: <20100525.161929.112591425.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 25 May 2010 16:19:29 -0700 (PDT)

> Here is how I fixed this:
> 
> --------------------
> drivers/net/usb/asix.c: Fix pointer cast.

Sorry, that only took care of one of the two warnings :-)

This patch is better.

--------------------
drivers/net/usb/asix.c: Fix pointer cast.

Stephen Rothwell reports the following new warning:

drivers/net/usb/asix.c: In function 'asix_rx_fixup':
drivers/net/usb/asix.c:325: warning: cast from pointer to integer of different size
drivers/net/usb/asix.c:354: warning: cast from pointer to integer of different size

The code just cares about the low alignment bits, so use
an "unsigned long" cast instead of one to "u32".

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/usb/asix.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 31b7331..1f802e9 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -322,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 		size = (u16) (header & 0x0000ffff);
 
 		if ((skb->len) - ((size + 1) & 0xfffe) == 0) {
-			u8 alignment = (u32)skb->data & 0x3;
+			u8 alignment = (unsigned long)skb->data & 0x3;
 			if (alignment != 0x2) {
 				/*
 				 * not 16bit aligned so use the room provided by
@@ -351,7 +351,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 		}
 		ax_skb = skb_clone(skb, GFP_ATOMIC);
 		if (ax_skb) {
-			u8 alignment = (u32)packet & 0x3;
+			u8 alignment = (unsigned long)packet & 0x3;
 			ax_skb->len = size;
 
 			if (alignment != 0x2) {
-- 
1.7.0.4

^ permalink raw reply related

* Re: linux-next: build warning in Linus' tree
From: David Miller @ 2010-05-25 23:19 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, NeilJay
In-Reply-To: <20100524.215822.13254177.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Mon, 24 May 2010 21:58:22 -0700 (PDT)

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 25 May 2010 11:46:14 +1000
> 
>> Hi Dave,
>> 
>> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>> 
>> drivers/net/usb/asix.c: In function 'asix_rx_fixup':
>> drivers/net/usb/asix.c:325: warning: cast from pointer to integer of different size
>> drivers/net/usb/asix.c:354: warning: cast from pointer to integer of different size
>> 
>> Introduced by commit 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9
>> ("drivers/net/usb/asix.c: Fix unaligned accesses").  This commit casts
>> skb->data to u32.
> 
> Thanks I'll look into this.

Here is how I fixed this:

--------------------
drivers/net/usb/asix.c: Fix pointer cast.

Stephen Rothwell reports the following new warning:

drivers/net/usb/asix.c: In function 'asix_rx_fixup':
drivers/net/usb/asix.c:325: warning: cast from pointer to integer of different size
drivers/net/usb/asix.c:354: warning: cast from pointer to integer of different size

The code just cares about the low alignment bits, so use
an "unsigned long" cast instead of one to "u32".

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/usb/asix.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 31b7331..ea75f47 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -322,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 		size = (u16) (header & 0x0000ffff);
 
 		if ((skb->len) - ((size + 1) & 0xfffe) == 0) {
-			u8 alignment = (u32)skb->data & 0x3;
+			u8 alignment = (unsigned long)skb->data & 0x3;
 			if (alignment != 0x2) {
 				/*
 				 * not 16bit aligned so use the room provided by
-- 
1.7.0.4

^ permalink raw reply related

* Re: [PATCH net-2.6] be2net: Bug fix to avoid disabling bottom half during firmware upgrade.
From: David Miller @ 2010-05-25 23:16 UTC (permalink / raw)
  To: sarveshwarb; +Cc: netdev
In-Reply-To: <20100525081514.GA5695@serverengines.com>

From: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Date: Tue, 25 May 2010 13:45:24 +0530

> Certain firmware commands/operations to upgrade firmware could take several
> seconds to complete. The code presently disables bottom half during these
> operations which could lead to unpredictable behaviour in certain cases. This
> patch now does all firmware upgrade operations asynchronously using a
> completion variable.
> 
> Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] r8169: Add counters tx_bytes and rx_bytes for ethtool
From: David Miller @ 2010-05-25 23:15 UTC (permalink / raw)
  To: junchangwang; +Cc: romieu, netdev
In-Reply-To: <AANLkTimRwNqPYh1MgXPhh3hHep7Koc3OJCCroEj_scqg@mail.gmail.com>

From: Junchang Wang <junchangwang@gmail.com>
Date: Tue, 25 May 2010 22:19:46 +0800

> Traffic stats counters (rx_bytes and tx_bytes) in net_device are
> "unsigned long". On 32-bit systems, they wrap around every few
> minutes, giving out wrong answers to the amount of traffic. To get the
> right message, another available approach is "ethtool -S". However,
> r8169 didn't support those two counters so far.
> 
> Add traffic counters tx_bytes and rx_bytes with 64-bit width for
> ethtool. On 32-bit systems, gcc treats each one as two 32-bit
> variables, making the increment not "atomic". But there is no sync
> issue since the updates to the counters are serialized by driver logic
> in any case. Results provided by ethtool maybe slightly biased if the
> read and update operations are interleaved. But the results are much
> better than the original ones that always fall into the range from 0
> to 4GiB.
> 
> Signed-off-by: Junchang Wang <junchangwang@gmail.com>

I absolutely do not want to see drivers start doing this, so right
off the bat I am not going to apply this patch.

If the problem is that people want 64-bit counters available for core
statistics on 32-bit systems, we do not fix that problem by hacking
every single driver to provide them side-band via ethtool.

First of all, we now have "struct rtnl_link_stats64" in
linux/if_link.h, it's there to start combating this problem
generically, for every device, rather than the way you are trying
handle it only for one specific driver at a time.

So that's the area where you should start looking to solve these kinds
of problem.

^ permalink raw reply

* Re: Question about an assignment in handle_ing()
From: Herbert Xu @ 2010-05-25 23:13 UTC (permalink / raw)
  To: jamal; +Cc: Jiri Pirko, netdev, davem, kaber
In-Reply-To: <1274793216.3878.947.camel@bigi>

On Tue, May 25, 2010 at 09:13:36AM -0400, jamal wrote:
> On Tue, 2010-05-25 at 22:46 +1000, Herbert Xu wrote:
> 
> > That's not very surprising as you're not checking whether the
> > skb is cloned in act_pedit.c:
> 
> I meant the test "if (skb_cloned(skb))" failed in such cases;-> So you
> couldnt reliably use it. 
> If it turns out it is unnecessary, what you describe is what i had in
> mind as well.

If it did happen like you said then it would be a serious bug
in our stack as everything else (including the TCP stack) relies
on this.

You can't just make up your own rules :)
 
> It is not the responsibility of the action to drop packets in a pipeline
> rather the responsibility is that of the caller (ref: rule #3 in
> Documentation/networking/tc-actions-env-rules.txt). What to do on a
> failure such as above is programmable by the action user/admin.

But how can the caller make that decision when you return exactly
the same value in the error case as the normal case?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: [PATCH] hso: add support for new products
From: David Miller @ 2010-05-25 23:09 UTC (permalink / raw)
  To: f.aben; +Cc: gregkh, linux-usb, netdev, j.dumon
In-Reply-To: <alpine.DEB.2.00.1005251402310.2667@filip-linux>

From: f.aben@option.com
Date: Tue, 25 May 2010 14:33:01 +0200 (CEST)

> This patch adds a few new product id's for the hso driver.
> 
> Signed-off-by: Filip Aben <f.aben@option.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net] Phonet: fix potential use-after-free in pep_sock_close()
From: David Miller @ 2010-05-25 23:08 UTC (permalink / raw)
  To: remi.denis-courmont; +Cc: netdev
In-Reply-To: <1274796709-29988-1-git-send-email-remi.denis-courmont@nokia.com>

From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Date: Tue, 25 May 2010 17:11:49 +0300

> sk_common_release() might destroy our last reference to the socket.
> So an extra temporary reference is needed during cleanup.
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Patch applied, thank you.

^ permalink raw reply

* Re: [PATCH RFC] netfilter: iptables target SYNPROXY
From: Changli Gao @ 2010-05-25 22:52 UTC (permalink / raw)
  To: Jozsef Kadlecsik
  Cc: Patrick McHardy, David S. Miller, Alexey Kuznetsov, James Morris,
	netfilter-devel, netdev
In-Reply-To: <alpine.DEB.2.00.1005252100500.21791@blackhole.kfki.hu>

On Wed, May 26, 2010 at 3:03 AM, Jozsef Kadlecsik
<kadlec@blackhole.kfki.hu> wrote:
>>
>> Yea. Only MSS option is  supported. But it is better than being DoSed.
>> And you can set a threshold for SYNPROXY with limit match, then there
>> isn't any difference if there isn't any SYN-flood attack.
>
> If I (have to) limit SYNPROXY, why shouldn't I better limit the SYN
> packets directly instead?
>

Without SYNPROXY, you have to drop the over limit SYN packets, and
maybe normal SYN packets are dropped.

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Question regarding IP_TOS and SO_PRIORITY
From: Holger Freyther @ 2010-05-25 21:19 UTC (permalink / raw)
  To: netdev

Hi all,

I have a minor question regarding the IP_TOS and SO_PRIORITY socket
options. I was reading the man page for ip(7) and it pointed me to
socket(7) to look at the SO_PRIORITY. My man page claims that setting
the SO_PRIORITY will also set the tos on the outgoing IP header.

The problem is that I couldn't see the TOS set in my outgoing packets
and I was not able to find the code propagating the sk_priority into the
tos. On the other hand I could find that setting the IP_TOS will also
set the sk_priority.

Is this a documentation bug? Or did it work once? Or is it working and
my code was just broken and I'm too blind to find it?

z.



^ permalink raw reply

* Re: [PATCH] mlx4_en: show device's port used
From: Roland Dreier @ 2010-05-25 21:32 UTC (permalink / raw)
  To: Eli Cohen
  Cc: Eli Cohen, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	netdev-u79uwXL29TY76Z2rM5mHXA, Linux RDMA list,
	yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
In-Reply-To: <20100525174214.GA14745-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>

 > I don't think there are many devices out there which have more than
 > one port.

??

http://developer.intel.com/network/connectivity/solutions/gigabit.htm
http://www.broadcom.com/products/Ethernet-Controllers/Enterprise-Server/BCM5704C

etc

 > So this will require changing all the drivers to put some value there
 > or we would need to use a default value of 1 for drivers that don't
 > explicitly set a value.

Yes, just set a default value.

 > > and export it to userspace in generic code (so everyone
 > > does it the same way).

 > Something like ethtool? But we still need an entry under
 > /sys/class/net/ethx/, right?

It could be ethtool or a sysfs attr.

 - R.
-- 
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: pull request: wireless-2.6 2010-05-25
From: Gertjan van Wingerde @ 2010-05-25 21:18 UTC (permalink / raw)
  To: John W. Linville; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <20100525204235.GA27002@tuxdriver.com>

On 05/25/10 22:42, John W. Linville wrote:
> On Tue, May 25, 2010 at 10:29:14PM +0200, Gertjan van Wingerde wrote:
>> On 05/25/10 19:04, John W. Linville wrote:
> 
>>> Gertjan van Wingerde (2):
>>>       rt2x00: Fix rt2800usb TX descriptor writing.
>>
>> The patch causing the breakage this patch fixes wasn't actually upstream yet. So, 
>> applying this patch only is now introducing a bug in 2.6.35. I guess it is better
>> to revert this patch for 2.6.35.
> 
> Hmmm...OK.  Which patch introduces the bug this was intended to fix?
> 

It's this one: 

http://marc.info/?l=linux-wireless&m=127374343617025&w=2

But that patch depends on a number of other unapplied patches :-(, namely:

http://marc.info/?l=linux-wireless&m=127374940425538&w=2
http://marc.info/?l=linux-wireless&m=127374344617058&w=2
and
http://marc.info/?l=linux-wireless&m=127374343217011&w=2

---
Gertjan.

^ permalink raw reply

* Re: pull request: wireless-2.6 2010-05-25
From: reinette chatre @ 2010-05-25 21:08 UTC (permalink / raw)
  To: Thomas Backlund
  Cc: sedat.dilek@gmail.com, Sedat Dilek, John W. Linville,
	davem@davemloft.net, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <4BFC2677.7050509@mandriva.org>

On Tue, 2010-05-25 at 12:35 -0700, Thomas Backlund wrote:
> 25.05.2010 22:23, Sedat Dilek skrev:
> > "[1/2] iwlwifi: fix internal scan race" [1] is in this pull request.
> > Isn't "[2/2] iwlagn: work around rate scaling reset delay" [2] missing?
> > IIRC, both fixes were sent as a double-patch.
> >
> 
> It's already upstream:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3bce6066263efb5733ee2141ac8b56684fb3b0a7

Yes, thank you, [2] was sent upstream (targeting 2.6.35) a while ago but
was later determined to be needed in 2.6.34 also. That is why it was
sent together with another fix targeting 2.6.34 ... both were sent
before 2.6.34 was released in the hopes that they will make it into
2.6.34. Unfortunately these patches did not make it into 2.6.34 and with
[2] already in 2.6.35 only [1] needed to be added there. 

We will now have to send these patches to stable to get them into
2.6.34.

Reinette



^ permalink raw reply

* Re: [patch 2.6.35] WiMAX pull request
From: David Miller @ 2010-05-25 21:05 UTC (permalink / raw)
  To: inaky; +Cc: netdev, wimax, inaky.perez-gonzalez
In-Reply-To: <cover.1274809476.git.inaky.perez-gonzalez@intel.com>

From: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Date: Tue, 25 May 2010 10:45:12 -0700

> The following changes since commit 0fb0a4f00aaf5de9f328273d7a46e3aa27dab496:
>   Inaky Perez-Gonzalez (1):
>         wimax/i2400m: driver defaults to firmware v1.5 for i6x60 devices
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax.git wimax-2.6.35.y
> 
> Patches follow for reviewing convenience.

Pulled, thank you.

^ permalink raw reply

* Re: pull request: wireless-2.6 2010-05-25
From: John W. Linville @ 2010-05-25 20:42 UTC (permalink / raw)
  To: Gertjan van Wingerde; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <4BFC331A.9030606@gmail.com>

On Tue, May 25, 2010 at 10:29:14PM +0200, Gertjan van Wingerde wrote:
> On 05/25/10 19:04, John W. Linville wrote:

> > Gertjan van Wingerde (2):
> >       rt2x00: Fix rt2800usb TX descriptor writing.
> 
> The patch causing the breakage this patch fixes wasn't actually upstream yet. So, 
> applying this patch only is now introducing a bug in 2.6.35. I guess it is better
> to revert this patch for 2.6.35.

Hmmm...OK.  Which patch introduces the bug this was intended to fix?

John
-- 
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: wireless-2.6 2010-05-25
From: Gertjan van Wingerde @ 2010-05-25 20:29 UTC (permalink / raw)
  To: John W. Linville; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <20100525170401.GE31753@tuxdriver.com>

John,

On 05/25/10 19:04, John W. Linville wrote:
> Dave,
> 
> Here are a number of fixes intended for 2.6.35.  Included are some
> warning fixes from Randy, some smatch-identified fixes from Dan, some
> fixes for using ath9k and IBSS mode, the removal of a PCI ID that was
> optimistically added to ath9k, and a smattering of other driver fixes.
> This also includes a revert of "ath9k: Group Key fix for VAPs" which
> was reported to cause regressions due to a mac80211 change inside it
> that snuck past us... :-(
> 
> Anyway, these are mostly small(ish) and obvious.  Please let me know
> if there are problems!
> 
> Thanks,
> 
> John
> 
> ---
> 
> The following changes since commit acfbe96a3035639619a6533e04d88ed4ef9ccb61:

<snip>
> 
> Gertjan van Wingerde (2):
>       rt2x00: Fix rt2800usb TX descriptor writing.

The patch causing the breakage this patch fixes wasn't actually upstream yet. So, 
applying this patch only is now introducing a bug in 2.6.35. I guess it is better
to revert this patch for 2.6.35.

Sorry for not being clearer about it when sending the patch to you.

---
Gertjan.

^ permalink raw reply

* Re: [stable] [stable-2.6.32 PATCH] ixgbe: backport bug fix for tx panic
From: Greg KH @ 2010-05-25 20:18 UTC (permalink / raw)
  To: Brandeburg, Jesse
  Cc: Jeff Kirsher, linux-kernel@vger.kernel.org, stable@kernel.org,
	Brandon, netdev@vger.kernel.org, davem@davemloft.net
In-Reply-To: <alpine.WNT.2.00.1005250926320.2708@jbrandeb-desk1.amr.corp.intel.com>

On Tue, May 25, 2010 at 09:27:25AM -0700, Brandeburg, Jesse wrote:
> 
> 
> On Tue, 25 May 2010, Jeff Kirsher wrote:
> 
> > On Mon, May 10, 2010 at 17:46, Jeff Kirsher <jeffrey.t.kirsher@intel.com> wrote:
> > > From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> > >
> > > backporting this commit:
> > >
> > > commit fdd3d631cddad20ad9d3e1eb7dbf26825a8a121f
> > > Author: Krishna Kumar <krkumar2@in.ibm.com>
> > > Date:   Wed Feb 3 13:13:10 2010 +0000
> > >
> > >    ixgbe: Fix return of invalid txq
> > >
> > >    a developer had complained of getting lots of warnings:
> > >
> > >    "eth16 selects TX queue 98, but real number of TX queues is 64"
> > >
> > >    http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg02200.html
> > >
> > >    As there was no follow up on that bug, I am submitting this
> > >    patch assuming that the other return points will not return
> > >    invalid txq's, and also that this fixes the bug (not tested).
> > >
> > >    Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
> > >    Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> > >    Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> > >    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > >    Signed-off-by: David S. Miller <davem@davemloft.net>
> > >
> > > CC: Brandon <brandon@ifup.org>
> > > Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> > > ---
> > >
> > >  drivers/net/ixgbe/ixgbe_main.c |    8 ++++++--
> > >  1 files changed, 6 insertions(+), 2 deletions(-)
> > >
> > 
> > Greg - status?  Did you queue this patch for the stable release and I missed it?
> 
> Maybe we didn't say (and we should have) that this fixes a panic on 
> machines with > 64 cores.  Please apply to -stable 32.

I'll get to it for the next release after this one, if that's ok.

thanks,

greg k-h

^ permalink raw reply

* Re: pull request: wireless-2.6 2010-05-25
From: David Miller @ 2010-05-25 20:15 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20100525170401.GE31753@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Tue, 25 May 2010 13:04:02 -0400

> git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master

Pulled, thanks John.

^ permalink raw reply

* [PATCH net-next-2.6] [PPP] cleanup: remove MIN_FRAG_SIZE definition.
From: Rami Rosen @ 2010-05-25 20:00 UTC (permalink / raw)
  To: davem, netdev

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

Hi,
 - This patch removes MIN_FRAG_SIZE definition in
drivers/net/ppp_generic.c as it is unneeded.


Regards,
Rami Rosen


Signed-off-by: Rami Rosen <ramirose@gmail.com>

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 400 bytes --]

diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 35f1953..a214835 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -69,7 +69,6 @@
 
 #define MPHDRLEN	6	/* multilink protocol header length */
 #define MPHDRLEN_SSN	4	/* ditto with short sequence numbers */
-#define MIN_FRAG_SIZE	64
 
 /*
  * An instance of /dev/ppp can be associated with either a ppp

^ permalink raw reply related

* Re: [PATCH] r8169: Add counters tx_bytes and rx_bytes for ethtool
From: Francois Romieu @ 2010-05-25 19:56 UTC (permalink / raw)
  To: Junchang Wang; +Cc: netdev
In-Reply-To: <AANLkTimRwNqPYh1MgXPhh3hHep7Koc3OJCCroEj_scqg@mail.gmail.com>

Junchang Wang <junchangwang@gmail.com> :
> Traffic stats counters (rx_bytes and tx_bytes) in net_device are
> "unsigned long". On 32-bit systems, they wrap around every few
> minutes, giving out wrong answers to the amount of traffic. To get the
> right message, another available approach is "ethtool -S". However,
> r8169 didn't support those two counters so far.

ethtool is - imvho - biased toward hardware, not toward software
emulation.

If the packets are short enough, replace "_bytes" by "_packets", "_minutes"
by "_hours" or "_every_day" and the same kind of problem appear.

You can fix the application at zero cost in the kernel: poll < 34 s and
update the application counters with the kernel counters increment.

-- 
Ueimor

^ permalink raw reply

* Re: pull request: wireless-2.6 2010-05-25
From: Thomas Backlund @ 2010-05-25 19:35 UTC (permalink / raw)
  To: sedat.dilek
  Cc: Sedat Dilek, John W. Linville, davem, linux-wireless, netdev,
	linux-kernel
In-Reply-To: <AANLkTilMYGSprjMnmRHlZPMvk1KLd1Yeqd_l26yyVRT6@mail.gmail.com>

25.05.2010 22:23, Sedat Dilek skrev:
> "[1/2] iwlwifi: fix internal scan race" [1] is in this pull request.
> Isn't "[2/2] iwlagn: work around rate scaling reset delay" [2] missing?
> IIRC, both fixes were sent as a double-patch.
>

It's already upstream:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3bce6066263efb5733ee2141ac8b56684fb3b0a7

> - Sedat -
>
> [1] https://patchwork.kernel.org/patch/99439/
> [2] https://patchwork.kernel.org/patch/99438/
>

--
Thomas

^ permalink raw reply

* Re: pull request: wireless-2.6 2010-05-25
From: Sedat Dilek @ 2010-05-25 19:23 UTC (permalink / raw)
  To: John W. Linville; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <20100525170401.GE31753@tuxdriver.com>

"[1/2] iwlwifi: fix internal scan race" [1] is in this pull request.
Isn't "[2/2] iwlagn: work around rate scaling reset delay" [2] missing?
IIRC, both fixes were sent as a double-patch.

- Sedat -

[1] https://patchwork.kernel.org/patch/99439/
[2] https://patchwork.kernel.org/patch/99438/

On Tue, May 25, 2010 at 7:04 PM, John W. Linville
<linville@tuxdriver.com> wrote:
> Dave,
>
> Here are a number of fixes intended for 2.6.35.  Included are some
> warning fixes from Randy, some smatch-identified fixes from Dan, some
> fixes for using ath9k and IBSS mode, the removal of a PCI ID that was
> optimistically added to ath9k, and a smattering of other driver fixes.
> This also includes a revert of "ath9k: Group Key fix for VAPs" which
> was reported to cause regressions due to a mac80211 change inside it
> that snuck past us... :-(
>
> Anyway, these are mostly small(ish) and obvious.  Please let me know
> if there are problems!
>
> Thanks,
>
> John
>
> ---
>
> The following changes since commit acfbe96a3035639619a6533e04d88ed4ef9ccb61:
>  Randy Dunlap (1):
>        sock.h: fix kernel-doc warning
>
> are available in the git repository at:
>
>  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
>
> Bruno Randolf (1):
>      ath5k: consistently use rx_bufsize for RX DMA
>
> Dan Carpenter (3):
>      ath9k_htc: dereferencing before check in hif_usb_tx_cb()
>      ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
>      iwlwifi: testing the wrong variable in iwl_add_bssid_station()
>
> Felix Fietkau (3):
>      cfg80211: fix crash in cfg80211_set_freq()
>      ath9k: change beacon allocation to prefer the first beacon slot
>      ath9k: remove VEOL support for ad-hoc
>
> Gertjan van Wingerde (2):
>      rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>      rt2x00: Fix rt2800usb TX descriptor writing.
>
> Helmut Schaa (1):
>      rt2x00: don't use to_pci_dev in rt2x00pci_uninitialize
>
> Johannes Berg (1):
>      cfg80211: add missing braces
>
> John W. Linville (1):
>      Revert "ath9k: Group Key fix for VAPs"
>
> Jussi Kivilinna (1):
>      rndis_wlan: replace wireless_send_event with cfg80211_disconnected
>
> Juuso Oikarinen (1):
>      wl1271: Fix RX data path frame lengths
>
> Luis R. Rodriguez (1):
>      ath9k: remove AR9003 from PCI IDs for now
>
> Randy Dunlap (2):
>      wireless: fix mac80211.h kernel-doc warnings
>      wireless: fix sta_info.h kernel-doc warnings
>
> Reinette Chatre (1):
>      iwlwifi: fix internal scan race
>
> Sujith (1):
>      cfg80211: Fix signal_type comparison
>
> Tejun Heo (1):
>      wireless: update gfp/slab.h includes
>
> Vasanthakumar Thiagarajan (1):
>      ath9k: Fix rx of mcast/bcast frames in PS mode with auto sleep
>
>  drivers/net/wireless/ath/ath5k/base.c      |    7 ++-
>  drivers/net/wireless/ath/ath9k/beacon.c    |   75 +++++-----------------------
>  drivers/net/wireless/ath/ath9k/hif_usb.c   |   10 +++-
>  drivers/net/wireless/ath/ath9k/htc.h       |    1 +
>  drivers/net/wireless/ath/ath9k/main.c      |   28 +---------
>  drivers/net/wireless/ath/ath9k/pci.c       |    1 -
>  drivers/net/wireless/ath/ath9k/recv.c      |   17 +++++--
>  drivers/net/wireless/iwlwifi/iwl-agn-ict.c |    1 +
>  drivers/net/wireless/iwlwifi/iwl-scan.c    |   21 +++++++-
>  drivers/net/wireless/iwlwifi/iwl-sta.c     |    2 +-
>  drivers/net/wireless/rndis_wlan.c          |   16 ++++--
>  drivers/net/wireless/rt2x00/rt2400pci.c    |    9 ++--
>  drivers/net/wireless/rt2x00/rt2500pci.c    |    9 ++--
>  drivers/net/wireless/rt2x00/rt2800usb.c    |    2 +-
>  drivers/net/wireless/rt2x00/rt2x00pci.c    |    2 +-
>  drivers/net/wireless/rt2x00/rt61pci.c      |    7 ++-
>  drivers/net/wireless/rt2x00/rt73usb.c      |    7 ++-
>  drivers/net/wireless/wl12xx/wl1271_rx.c    |    2 +
>  include/net/mac80211.h                     |    4 +-
>  net/mac80211/key.c                         |    1 -
>  net/mac80211/sta_info.h                    |    2 +-
>  net/wireless/chan.c                        |    2 +-
>  net/wireless/nl80211.c                     |    6 ++-
>  net/wireless/scan.c                        |    4 +-
>  24 files changed, 104 insertions(+), 132 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 5f04cf3..cc6d41d 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -1214,6 +1214,7 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
>        struct ath5k_hw *ah = sc->ah;
>        struct sk_buff *skb = bf->skb;
>        struct ath5k_desc *ds;
> +       int ret;
>
>        if (!skb) {
>                skb = ath5k_rx_skb_alloc(sc, &bf->skbaddr);
> @@ -1240,9 +1241,9 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
>        ds = bf->desc;
>        ds->ds_link = bf->daddr;        /* link to self */
>        ds->ds_data = bf->skbaddr;
> -       ah->ah_setup_rx_desc(ah, ds,
> -               skb_tailroom(skb),      /* buffer size */
> -               0);
> +       ret = ah->ah_setup_rx_desc(ah, ds, ah->common.rx_bufsize, 0);
> +       if (ret)
> +               return ret;
>
>        if (sc->rxlink != NULL)
>                *sc->rxlink = bf->daddr;
> diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
> index c8a4558..f43d85a 100644
> --- a/drivers/net/wireless/ath/ath9k/beacon.c
> +++ b/drivers/net/wireless/ath/ath9k/beacon.c
> @@ -76,22 +76,13 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,
>        ds = bf->bf_desc;
>        flags = ATH9K_TXDESC_NOACK;
>
> -       if (((sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) ||
> -            (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) &&
> -           (ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) {
> -               ds->ds_link = bf->bf_daddr; /* self-linked */
> -               flags |= ATH9K_TXDESC_VEOL;
> -               /* Let hardware handle antenna switching. */
> -               antenna = 0;
> -       } else {
> -               ds->ds_link = 0;
> -               /*
> -                * Switch antenna every beacon.
> -                * Should only switch every beacon period, not for every SWBA
> -                * XXX assumes two antennae
> -                */
> -               antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1);
> -       }
> +       ds->ds_link = 0;
> +       /*
> +        * Switch antenna every beacon.
> +        * Should only switch every beacon period, not for every SWBA
> +        * XXX assumes two antennae
> +        */
> +       antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1);
>
>        sband = &sc->sbands[common->hw->conf.channel->band];
>        rate = sband->bitrates[rateidx].hw_value;
> @@ -215,36 +206,6 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,
>        return bf;
>  }
>
> -/*
> - * Startup beacon transmission for adhoc mode when they are sent entirely
> - * by the hardware using the self-linked descriptor + veol trick.
> -*/
> -static void ath_beacon_start_adhoc(struct ath_softc *sc,
> -                                  struct ieee80211_vif *vif)
> -{
> -       struct ath_hw *ah = sc->sc_ah;
> -       struct ath_common *common = ath9k_hw_common(ah);
> -       struct ath_buf *bf;
> -       struct ath_vif *avp;
> -       struct sk_buff *skb;
> -
> -       avp = (void *)vif->drv_priv;
> -
> -       if (avp->av_bcbuf == NULL)
> -               return;
> -
> -       bf = avp->av_bcbuf;
> -       skb = bf->bf_mpdu;
> -
> -       ath_beacon_setup(sc, avp, bf, 0);
> -
> -       /* NB: caller is known to have already stopped tx dma */
> -       ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bf->bf_daddr);
> -       ath9k_hw_txstart(ah, sc->beacon.beaconq);
> -       ath_print(common, ATH_DBG_BEACON, "TXDP%u = %llx (%p)\n",
> -                 sc->beacon.beaconq, ito64(bf->bf_daddr), bf->bf_desc);
> -}
> -
>  int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)
>  {
>        struct ath_softc *sc = aphy->sc;
> @@ -265,7 +226,8 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)
>                list_del(&avp->av_bcbuf->list);
>
>                if (sc->sc_ah->opmode == NL80211_IFTYPE_AP ||
> -                   !(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) {
> +                   sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC ||
> +                   sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT) {
>                        int slot;
>                        /*
>                         * Assign the vif to a beacon xmit slot. As
> @@ -274,17 +236,11 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)
>                        avp->av_bslot = 0;
>                        for (slot = 0; slot < ATH_BCBUF; slot++)
>                                if (sc->beacon.bslot[slot] == NULL) {
> -                                       /*
> -                                        * XXX hack, space out slots to better
> -                                        * deal with misses
> -                                        */
> -                                       if (slot+1 < ATH_BCBUF &&
> -                                           sc->beacon.bslot[slot+1] == NULL) {
> -                                               avp->av_bslot = slot+1;
> -                                               break;
> -                                       }
>                                        avp->av_bslot = slot;
> +
>                                        /* NB: keep looking for a double slot */
> +                                       if (slot == 0 || !sc->beacon.bslot[slot-1])
> +                                               break;
>                                }
>                        BUG_ON(sc->beacon.bslot[avp->av_bslot] != NULL);
>                        sc->beacon.bslot[avp->av_bslot] = vif;
> @@ -721,8 +677,7 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
>         * self-linked tx descriptor and let the hardware deal with things.
>         */
>        intval |= ATH9K_BEACON_ENA;
> -       if (!(ah->caps.hw_caps & ATH9K_HW_CAP_VEOL))
> -               ah->imask |= ATH9K_INT_SWBA;
> +       ah->imask |= ATH9K_INT_SWBA;
>
>        ath_beaconq_config(sc);
>
> @@ -732,10 +687,6 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
>        ath9k_beacon_init(sc, nexttbtt, intval);
>        sc->beacon.bmisscnt = 0;
>        ath9k_hw_set_interrupts(ah, ah->imask);
> -
> -       /* FIXME: Handle properly when vif is NULL */
> -       if (vif && ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)
> -               ath_beacon_start_adhoc(sc, vif);
>  }
>
>  void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index 46dc41a..77b3591 100644
> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> @@ -107,12 +107,14 @@ static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev,
>  static void hif_usb_tx_cb(struct urb *urb)
>  {
>        struct tx_buf *tx_buf = (struct tx_buf *) urb->context;
> -       struct hif_device_usb *hif_dev = tx_buf->hif_dev;
> +       struct hif_device_usb *hif_dev;
>        struct sk_buff *skb;
>
> -       if (!hif_dev || !tx_buf)
> +       if (!tx_buf || !tx_buf->hif_dev)
>                return;
>
> +       hif_dev = tx_buf->hif_dev;
> +
>        switch (urb->status) {
>        case 0:
>                break;
> @@ -607,6 +609,10 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)
>
>        return 0;
>  err:
> +       if (tx_buf) {
> +               kfree(tx_buf->buf);
> +               kfree(tx_buf);
> +       }
>        ath9k_hif_usb_dealloc_tx_urbs(hif_dev);
>        return -ENOMEM;
>  }
> diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
> index ad556aa..c251603 100644
> --- a/drivers/net/wireless/ath/ath9k/htc.h
> +++ b/drivers/net/wireless/ath/ath9k/htc.h
> @@ -23,6 +23,7 @@
>  #include <linux/skbuff.h>
>  #include <linux/netdevice.h>
>  #include <linux/leds.h>
> +#include <linux/slab.h>
>  #include <net/mac80211.h>
>
>  #include "common.h"
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index 893b552..abfa049 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -752,7 +752,6 @@ static int ath_key_config(struct ath_common *common,
>        struct ath_hw *ah = common->ah;
>        struct ath9k_keyval hk;
>        const u8 *mac = NULL;
> -       u8 gmac[ETH_ALEN];
>        int ret = 0;
>        int idx;
>
> @@ -776,30 +775,9 @@ static int ath_key_config(struct ath_common *common,
>        memcpy(hk.kv_val, key->key, key->keylen);
>
>        if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
> -
> -               if (key->ap_addr) {
> -                       /*
> -                        * Group keys on hardware that supports multicast frame
> -                        * key search use a mac that is the sender's address with
> -                        * the high bit set instead of the app-specified address.
> -                        */
> -                       memcpy(gmac, key->ap_addr, ETH_ALEN);
> -                       gmac[0] |= 0x80;
> -                       mac = gmac;
> -
> -                       if (key->alg == ALG_TKIP)
> -                               idx = ath_reserve_key_cache_slot_tkip(common);
> -                       else
> -                               idx = ath_reserve_key_cache_slot(common);
> -                       if (idx < 0)
> -                               mac = NULL; /* no free key cache entries */
> -               }
> -
> -               if (!mac) {
> -                       /* For now, use the default keys for broadcast keys. This may
> -                        * need to change with virtual interfaces. */
> -                       idx = key->keyidx;
> -               }
> +               /* For now, use the default keys for broadcast keys. This may
> +                * need to change with virtual interfaces. */
> +               idx = key->keyidx;
>        } else if (key->keyidx) {
>                if (WARN_ON(!sta))
>                        return -EOPNOTSUPP;
> diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
> index 257b10b..1ec836c 100644
> --- a/drivers/net/wireless/ath/ath9k/pci.c
> +++ b/drivers/net/wireless/ath/ath9k/pci.c
> @@ -28,7 +28,6 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
>        { PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */
>        { PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI   */
>        { PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
> -       { PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E  AR9300 */
>        { 0 }
>  };
>
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index ba13913..ca6065b 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -19,6 +19,12 @@
>
>  #define SKB_CB_ATHBUF(__skb)   (*((struct ath_buf **)__skb->cb))
>
> +static inline bool ath9k_check_auto_sleep(struct ath_softc *sc)
> +{
> +       return sc->ps_enabled &&
> +              (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP);
> +}
> +
>  static struct ieee80211_hw * ath_get_virt_hw(struct ath_softc *sc,
>                                             struct ieee80211_hdr *hdr)
>  {
> @@ -616,8 +622,8 @@ static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb)
>        hdr = (struct ieee80211_hdr *)skb->data;
>
>        /* Process Beacon and CAB receive in PS state */
> -       if ((sc->ps_flags & PS_WAIT_FOR_BEACON) &&
> -           ieee80211_is_beacon(hdr->frame_control))
> +       if (((sc->ps_flags & PS_WAIT_FOR_BEACON) || ath9k_check_auto_sleep(sc))
> +           && ieee80211_is_beacon(hdr->frame_control))
>                ath_rx_ps_beacon(sc, skb);
>        else if ((sc->ps_flags & PS_WAIT_FOR_CAB) &&
>                 (ieee80211_is_data(hdr->frame_control) ||
> @@ -932,9 +938,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
>                        sc->rx.rxotherant = 0;
>                }
>
> -               if (unlikely(sc->ps_flags & (PS_WAIT_FOR_BEACON |
> -                                            PS_WAIT_FOR_CAB |
> -                                            PS_WAIT_FOR_PSPOLL_DATA)))
> +               if (unlikely(ath9k_check_auto_sleep(sc) ||
> +                            (sc->ps_flags & (PS_WAIT_FOR_BEACON |
> +                                             PS_WAIT_FOR_CAB |
> +                                             PS_WAIT_FOR_PSPOLL_DATA))))
>                        ath_rx_ps(sc, skb);
>
>                ath_rx_send_to_mac80211(hw, sc, skb, rxs);
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
> index a273e37..c92b2c0 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
> @@ -30,6 +30,7 @@
>  #include <linux/module.h>
>  #include <linux/etherdevice.h>
>  #include <linux/sched.h>
> +#include <linux/gfp.h>
>  #include <net/mac80211.h>
>
>  #include "iwl-dev.h"
> diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
> index 107e173..5d3f51f 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-scan.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
> @@ -376,6 +376,11 @@ void iwl_bg_start_internal_scan(struct work_struct *work)
>
>        mutex_lock(&priv->mutex);
>
> +       if (priv->is_internal_short_scan == true) {
> +               IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n");
> +               goto unlock;
> +       }
> +
>        if (!iwl_is_ready_rf(priv)) {
>                IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");
>                goto unlock;
> @@ -497,17 +502,27 @@ void iwl_bg_scan_completed(struct work_struct *work)
>  {
>        struct iwl_priv *priv =
>            container_of(work, struct iwl_priv, scan_completed);
> +       bool internal = false;
>
>        IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");
>
>        cancel_delayed_work(&priv->scan_check);
>
> -       if (!priv->is_internal_short_scan)
> -               ieee80211_scan_completed(priv->hw, false);
> -       else {
> +       mutex_lock(&priv->mutex);
> +       if (priv->is_internal_short_scan) {
>                priv->is_internal_short_scan = false;
>                IWL_DEBUG_SCAN(priv, "internal short scan completed\n");
> +               internal = true;
>        }
> +       mutex_unlock(&priv->mutex);
> +
> +       /*
> +        * Do not hold mutex here since this will cause mac80211 to call
> +        * into driver again into functions that will attempt to take
> +        * mutex.
> +        */
> +       if (!internal)
> +               ieee80211_scan_completed(priv->hw, false);
>
>        if (test_bit(STATUS_EXIT_PENDING, &priv->status))
>                return;
> diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
> index 85ed235..83a2636 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-sta.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
> @@ -431,7 +431,7 @@ int iwl_add_bssid_station(struct iwl_priv *priv, const u8 *addr, bool init_rs,
>        struct iwl_link_quality_cmd *link_cmd;
>        unsigned long flags;
>
> -       if (*sta_id_r)
> +       if (sta_id_r)
>                *sta_id_r = IWL_INVALID_STATION;
>
>        ret = iwl_add_station_common(priv, addr, 0, NULL, &sta_id);
> diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
> index 2d28908..4bd61ee 100644
> --- a/drivers/net/wireless/rndis_wlan.c
> +++ b/drivers/net/wireless/rndis_wlan.c
> @@ -2572,14 +2572,18 @@ static void rndis_wlan_do_link_up_work(struct usbnet *usbdev)
>
>  static void rndis_wlan_do_link_down_work(struct usbnet *usbdev)
>  {
> -       union iwreq_data evt;
> +       struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
>
> -       netif_carrier_off(usbdev->net);
> +       if (priv->connected) {
> +               priv->connected = false;
> +               memset(priv->bssid, 0, ETH_ALEN);
> +
> +               deauthenticate(usbdev);
>
> -       evt.data.flags = 0;
> -       evt.data.length = 0;
> -       memset(evt.ap_addr.sa_data, 0, ETH_ALEN);
> -       wireless_send_event(usbdev->net, SIOCGIWAP, &evt, NULL);
> +               cfg80211_disconnected(usbdev->net, 0, NULL, 0, GFP_KERNEL);
> +       }
> +
> +       netif_carrier_off(usbdev->net);
>  }
>
>  static void rndis_wlan_worker(struct work_struct *work)
> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
> index 4ba7b03..ad2c98a 100644
> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
> @@ -926,7 +926,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>  static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>                               enum dev_state state)
>  {
> -       u32 reg;
> +       u32 reg, reg2;
>        unsigned int i;
>        char put_to_sleep;
>        char bbp_state;
> @@ -947,11 +947,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>         * device has entered the correct state.
>         */
>        for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
> -               rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg);
> -               bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
> -               rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
> +               rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg2);
> +               bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
> +               rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>                if (bbp_state == state && rf_state == state)
>                        return 0;
> +               rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>                msleep(10);
>        }
>
> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
> index 89d132d..41da3d2 100644
> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>  static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>                               enum dev_state state)
>  {
> -       u32 reg;
> +       u32 reg, reg2;
>        unsigned int i;
>        char put_to_sleep;
>        char bbp_state;
> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>         * device has entered the correct state.
>         */
>        for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
> -               rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg);
> -               bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
> -               rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
> +               rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg2);
> +               bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
> +               rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>                if (bbp_state == state && rf_state == state)
>                        return 0;
> +               rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>                msleep(10);
>        }
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index 0f8b84b..6991613 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -413,7 +413,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
>         */
>        rt2x00_desc_read(txi, 0, &word);
>        rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN,
> -                          skb->len + TXWI_DESC_SIZE);
> +                          skb->len - TXINFO_DESC_SIZE);
>        rt2x00_set_field32(&word, TXINFO_W0_WIV,
>                           !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags));
>        rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2);
> diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
> index a016f7c..f71eee6 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
> @@ -206,7 +206,7 @@ void rt2x00pci_uninitialize(struct rt2x00_dev *rt2x00dev)
>        /*
>         * Free irq line.
>         */
> -       free_irq(to_pci_dev(rt2x00dev->dev)->irq, rt2x00dev);
> +       free_irq(rt2x00dev->irq, rt2x00dev);
>
>        /*
>         * Free DMA
> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
> index 2e3076f..6a74baf 100644
> --- a/drivers/net/wireless/rt2x00/rt61pci.c
> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
> @@ -1689,7 +1689,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>
>  static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>  {
> -       u32 reg;
> +       u32 reg, reg2;
>        unsigned int i;
>        char put_to_sleep;
>
> @@ -1706,10 +1706,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>         * device has entered the correct state.
>         */
>        for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
> -               rt2x00pci_register_read(rt2x00dev, MAC_CSR12, &reg);
> -               state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
> +               rt2x00pci_register_read(rt2x00dev, MAC_CSR12, &reg2);
> +               state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>                if (state == !put_to_sleep)
>                        return 0;
> +               rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>                msleep(10);
>        }
>
> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
> index e35bd19..6e0d82e 100644
> --- a/drivers/net/wireless/rt2x00/rt73usb.c
> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
> @@ -1366,7 +1366,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>
>  static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>  {
> -       u32 reg;
> +       u32 reg, reg2;
>        unsigned int i;
>        char put_to_sleep;
>
> @@ -1383,10 +1383,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>         * device has entered the correct state.
>         */
>        for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
> -               rt2x00usb_register_read(rt2x00dev, MAC_CSR12, &reg);
> -               state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
> +               rt2x00usb_register_read(rt2x00dev, MAC_CSR12, &reg2);
> +               state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>                if (state == !put_to_sleep)
>                        return 0;
> +               rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>                msleep(10);
>        }
>
> diff --git a/drivers/net/wireless/wl12xx/wl1271_rx.c b/drivers/net/wireless/wl12xx/wl1271_rx.c
> index 57f4bfd..b98fb64 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_rx.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_rx.c
> @@ -113,6 +113,8 @@ static void wl1271_rx_handle_data(struct wl1271 *wl, u32 length)
>        wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb, skb->len,
>                     beacon ? "beacon" : "");
>
> +       skb_trim(skb, skb->len - desc->pad_len);
> +
>        memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
>        ieee80211_rx_ni(wl->hw, skb);
>  }
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index 5be900d..de22cbf 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -815,6 +815,7 @@ enum ieee80211_key_flags {
>  *     encrypted in hardware.
>  * @alg: The key algorithm.
>  * @flags: key flags, see &enum ieee80211_key_flags.
> + * @ap_addr: AP's MAC address
>  * @keyidx: the key index (0-3)
>  * @keylen: key material length
>  * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte)
> @@ -831,7 +832,6 @@ struct ieee80211_key_conf {
>        u8 iv_len;
>        u8 hw_key_idx;
>        u8 flags;
> -       u8 *ap_addr;
>        s8 keyidx;
>        u8 keylen;
>        u8 key[0];
> @@ -1638,6 +1638,8 @@ enum ieee80211_ampdu_mlme_action {
>  *     Returns a negative error code on failure.
>  *     The callback must be atomic.
>  *
> + * @get_survey: Return per-channel survey information
> + *
>  * @rfkill_poll: Poll rfkill hardware state. If you need this, you also
>  *     need to set wiphy->rfkill_poll to %true before registration,
>  *     and need to call wiphy_rfkill_set_hw_state() in the callback.
> diff --git a/net/mac80211/key.c b/net/mac80211/key.c
> index 8d4b417..e8f6e3b 100644
> --- a/net/mac80211/key.c
> +++ b/net/mac80211/key.c
> @@ -140,7 +140,6 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
>                                     struct ieee80211_sub_if_data,
>                                     u.ap);
>
> -       key->conf.ap_addr = sdata->dev->dev_addr;
>        ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf);
>
>        if (!ret) {
> diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
> index 48a5e80..df9d455 100644
> --- a/net/mac80211/sta_info.h
> +++ b/net/mac80211/sta_info.h
> @@ -145,7 +145,7 @@ enum plink_state {
>  /**
>  * struct sta_ampdu_mlme - STA aggregation information.
>  *
> - * @tid_state_rx: TID's state in Rx session state machine.
> + * @tid_active_rx: TID's state in Rx session state machine.
>  * @tid_rx: aggregation info for Rx per TID
>  * @tid_state_tx: TID's state in Tx session state machine.
>  * @tid_tx: aggregation info for Tx per TID
> diff --git a/net/wireless/chan.c b/net/wireless/chan.c
> index d92d088..b01a6f6 100644
> --- a/net/wireless/chan.c
> +++ b/net/wireless/chan.c
> @@ -50,7 +50,7 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
>        struct ieee80211_channel *chan;
>        int result;
>
> -       if (wdev->iftype == NL80211_IFTYPE_MONITOR)
> +       if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
>                wdev = NULL;
>
>        if (wdev) {
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index aaa1aad..db71150 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -4443,9 +4443,10 @@ static int nl80211_remain_on_channel(struct sk_buff *skb,
>                if (channel_type != NL80211_CHAN_NO_HT &&
>                    channel_type != NL80211_CHAN_HT20 &&
>                    channel_type != NL80211_CHAN_HT40PLUS &&
> -                   channel_type != NL80211_CHAN_HT40MINUS)
> +                   channel_type != NL80211_CHAN_HT40MINUS) {
>                        err = -EINVAL;
>                        goto out;
> +               }
>        }
>
>        freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
> @@ -4717,9 +4718,10 @@ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
>                if (channel_type != NL80211_CHAN_NO_HT &&
>                    channel_type != NL80211_CHAN_HT20 &&
>                    channel_type != NL80211_CHAN_HT40PLUS &&
> -                   channel_type != NL80211_CHAN_HT40MINUS)
> +                   channel_type != NL80211_CHAN_HT40MINUS) {
>                        err = -EINVAL;
>                        goto out;
> +               }
>        }
>
>        freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
> diff --git a/net/wireless/scan.c b/net/wireless/scan.c
> index a026c6d..58401d2 100644
> --- a/net/wireless/scan.c
> +++ b/net/wireless/scan.c
> @@ -515,7 +515,7 @@ cfg80211_inform_bss(struct wiphy *wiphy,
>
>        privsz = wiphy->bss_priv_size;
>
> -       if (WARN_ON(wiphy->signal_type == NL80211_BSS_SIGNAL_UNSPEC &&
> +       if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC &&
>                        (signal < 0 || signal > 100)))
>                return NULL;
>
> @@ -571,7 +571,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
>                                      u.probe_resp.variable);
>        size_t privsz = wiphy->bss_priv_size;
>
> -       if (WARN_ON(wiphy->signal_type == NL80211_BSS_SIGNAL_UNSPEC &&
> +       if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC &&
>                    (signal < 0 || signal > 100)))
>                return NULL;
>
> --
> John W. Linville                Someday the world will need a hero, and you
> linville@tuxdriver.com                  might be all we have.  Be ready.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply

* Re: [PATCH RFC] netfilter: iptables target SYNPROXY
From: Jozsef Kadlecsik @ 2010-05-25 19:03 UTC (permalink / raw)
  To: Changli Gao
  Cc: Patrick McHardy, David S. Miller, Alexey Kuznetsov, James Morris,
	netfilter-devel, netdev
In-Reply-To: <AANLkTilbZ4PE7c6pep4bYvAx7ydx78qb4tKJi0vCjD52@mail.gmail.com>

Hi,

On Tue, 25 May 2010, Changli Gao wrote:

> On Tue, May 25, 2010 at 8:17 PM, Jozsef Kadlecsik
> <kadlec@blackhole.kfki.hu> wrote:
>
> > On Tue, 25 May 2010, Changli Gao wrote:
> >
> >> iptables target SYNPROXY.
> >>
> >> This patch implements an iptables target SYNPROXY, which works in the raw table
> >> of the PREROUTING chain, before conntracking system. Syncookies is used, so no
> >> new state is introduced into the conntracking system. In fact, until the first
> >> connection is established, conntracking system doesn't see any packets. So when
> >> there is a SYN-flood attack, conntracking system won't be busy on finding and
> >> deleting the un-assured ct.
> >
> > My main problem with your target is that by using it, important and useful
> > TCP options are lost: timestamp and SACK. That pushes back TCP by almost
> > twenty years.
> 
> Yea. Only MSS option is  supported. But it is better than being DoSed.
> And you can set a threshold for SYNPROXY with limit match, then there
> isn't any difference if there isn't any SYN-flood attack.

If I (have to) limit SYNPROXY, why shouldn't I better limit the SYN 
packets directly instead?

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary

^ permalink raw reply

* Re: [PATCH net-next] ixgbe: make macvlan on PF working when SRIOV is enabled
From: Jeff Kirsher @ 2010-05-25 18:37 UTC (permalink / raw)
  To: Shirley Ma
  Cc: gregory.v.rose, davem@davemloft.net, kvm@vger.kernel.org,
	netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net
In-Reply-To: <1274806509.18023.58.camel@localhost.localdomain>

On Tue, May 25, 2010 at 09:55, Shirley Ma <mashirle@us.ibm.com> wrote:
> When SRIOV is enabled, if we create macvlan on PF and load the VF driver in host
> domain, when macvlan/PF and VF interfaces are all up, the macvlan incoming network
> traffics are directed to VF interface not PF interface. This patch has fixed this
> issue.
>
> Signed-off-by: Shirley Ma <xma@us.ibm.com>
> ---
>  drivers/net/ixgbe/ixgbe_common.c |   26 ++++++++++++++++----------
>  1 files changed, 16 insertions(+), 10 deletions(-)
>

Thanks, I have added the patch to my queue.

-- 
Cheers,
Jeff

^ permalink raw reply

* Re: [PATCH 1/3] cgroups: Add an API to attach a task to current task's cgroup
From: Paul Menage @ 2010-05-25 18:34 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Sridhar Samudrala, netdev, kvm@vger.kernel.org, lkml, containers,
	lizf
In-Reply-To: <20100525165334.GA27307@redhat.com>

On Tue, May 25, 2010 at 9:53 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Thu, May 20, 2010 at 03:22:15PM -0700, Paul Menage wrote:
>> On Tue, May 18, 2010 at 5:04 PM, Sridhar Samudrala
>> <samudrala.sridhar@gmail.com> wrote:
>> > Add a new kernel API to attach a task to current task's cgroup
>> > in all the active hierarchies.
>> >
>> > Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
>>
>> Reviewed-by: Paul Menage <menage@google.com>
>>
>> It would be more efficient to just attach directly to current->cgroups
>> rather than potentially creating/destroying one css_set for each
>> hierarchy until we've completely converged on current->cgroups - but
>> that would require a bunch of refactoring of the guts of
>> cgroup_attach_task() to ensure that the right can_attach()/attach()
>> callbacks are made. That doesn't really seem worthwhile right now for
>> the initial use, that I imagine isn't going to be
>> performance-sensitive.
>>
>> Paul
>
> Is this patch suitable for 2.6.35?

Should be OK, yes.

Paul

^ 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