Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next-2.6] e1000: don't enable dma receives until after dma address has been setup
From: Andy Gospodarek @ 2011-09-16  1:50 UTC (permalink / raw)
  To: Jesse Brandeburg
  Cc: Michael S. Tsirkin, e1000-devel, netdev@vger.kernel.org,
	Dean Nelson, Andy Gospodarek
In-Reply-To: <20110915102112.0000146b@unknown>

On Thu, Sep 15, 2011 at 10:21:12AM -0700, Jesse Brandeburg wrote:
> On Wed, 14 Sep 2011 17:31:38 -0700
> Dean Nelson <dnelson@redhat.com> wrote:
> 
> > Doing an 'ifconfig ethN down' followed by an 'ifconfig ethN up' on a
> > qemu-kvm guest system configured with two e1000 NICs can result in an
> > 'unable to handle kernel paging request at 0000000100000000' or 'bad
> > page map in process ...' or something similar.
> 
> <snip>
> 
> > The corruption appears to result from the following...
> > 
> >  . An 'ifconfig ethN down' gets us into e1000_close(), which through
> > a number of subfunctions results in:
> >      1. E1000_RCTL_EN being cleared in RCTL register.  [e1000_down()]
> >      2. dma_free_coherent() being called.  [e1000_free_rx_resources()]
> > 
> >  . An 'ifconfig ethN up' gets us into e1000_open(), which through a
> > number of subfunctions results in:
> >      1. dma_alloc_coherent() being called.
> > [e1000_setup_rx_resources()] 2. E1000_RCTL_EN being set in RCTL
> > register.  [e1000_setup_rctl()] 3. E1000_RCTL_EN being cleared in
> > RCTL register.  [e1000_configure_rx()] 4. RDLEN, RDBAH and RDBAL
> > registers being set to reflect the dma page allocated in step 1.
> > [e1000_configure_rx()] 5. E1000_RCTL_EN being set in RCTL register.
> > [e1000_configure_rx()]
> > 
> > During the 'ifconfig ethN up' there is a window opened, starting in
> > step 2 where the receives are enabled up until they are disabled in
> > step 3, in which the address of the receive descriptor dma page known
> > by the NIC is still the previous one which was freed during the
> > 'ifconfig ethN down'. If this memory has been reallocated for some
> > other use and the NIC feels so inclined, it will write to that former
> > dma page with predictably unpleasant results.
> > 
> > I realize that in the guest, we're dealing with an e1000 NIC that is
> > software emulated by qemu-kvm. The problem doesn't appear to occur on
> > bare-metal. Andy suspects that this is because in the emulator
> > link-up is essentially instant and traffic can start flowing
> > immediately. Whereas on bare-metal, link-up usually seems to take at
> > least a few milliseconds. And this might be enough to prevent traffic
> > from flowing into the device inside the window where E1000_RCTL_EN is
> > set.
> 
> nice analysis dean, yes, we shouldn't enable rx before we have the
> hardware all ready.
> 
> You didn't mention however that the hardware is reset in e1000_down,
> which will clear the RDBAL/RDBAH in real hardware.
> 
> > 
> > So perhaps a modification needs to be made to the qemu-kvm e1000 NIC
> > emulator to delay the link-up. But in defense of the emulator, it
> > seems like a bad idea to enable dma operations before the address of
> > the memory to be involved has been made known.
> 
> the hardware reset code in kvm should also reset to default many
> registers (almost all of them in fact) which may also end up solving
> the problem.
> 
> > 
> > The following patch no longer enables receives in e1000_setup_rctl()
> > but leaves them however they were. It only enables receives in
> > e1000_configure_rx(), and only after the dma address has been made
> > known to the hardware.
> 
> I still like your patch better as it is more correct.  We could also
> correct the kvm virtual hardware driver.
> 

I agree that the virtual hardware drivers should be fixed.  I took a
quick look at the emulation code and despite the fact that there is some
reset code that clears out registers and sets them back to default
values, I don't see it getting called when the E1000_CTRL_RST is set in
the CTRL register.

The patch below might do the trick.  This is totally untested, but it
seems appropriate based on my quick audit of that code and the driver's
expectations.

diff --git a/hw/e1000.c b/hw/e1000.c
index a6d12c5..e74dbf3 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -192,9 +192,14 @@ rxbufsize(uint32_t v)
     return 2048;
 }
 
+static void e1000_reset(void *opaque);
+
 static void
 set_ctrl(E1000State *s, int index, uint32_t val)
 {
+    /* reset the hardware registers */
+    if (val & E1000_CTRL_RST)
+       e1000_reset(s);
     /* RST is self clearing */
     s->mac_reg[CTRL] = val & ~E1000_CTRL_RST;
 }


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related

* 群发软件+买家搜索机+109届广交会买家、海关数据,B2B询盘买家500万。
From: 仅10元每天 @ 2011-09-16  0:22 UTC (permalink / raw)


群发软件+109届广交会买家、海关数据、搜索引擎买家,B2B询盘买家共500万,仅10元每天。 
保证每天都有买家回复。
保证每天都有买家回复。


1、群发软件: 操作简单,功能强大,模仿人工操作模式,到达率高,日发送5万封以上。 
2、500万买家资源: 赠送的500万买家资源库,每月更新 。 
3、超级海外买家Email搜索机: 每天能搜索1-2万以上买家真实EMAIL,成单率高。 
 

要的抓紧联系QQ: 1339625218   或者立即回复邮箱: 1339625218@qq.com
要的抓紧联系QQ: 1339625218   或者立即回复邮箱: 1339625218@qq.com
要的抓紧联系QQ: 1339625218   或者立即回复邮箱: 1339625218@qq.com

免费赠送:
一共8个包(数据是全行业的,按照行业分好类,并且可以按照关键词查询的): 
1,2011春季109届广交会买家现场询盘数据库新鲜出炉,超级新鲜买家,新鲜数据,容易成单! 
2,购买后可以免费更新2011秋季广交会+2012春季广交会买家数据。太超值了。
3,最新全球买家库,共451660条数据。 (最新更新日期 2011-05-16日)
4,2008年,2009年,2010年 春季+秋季广交会买家名录,103 104 105 106 107 108 共六届 共120.6万数据。
5,2010年国际促销协会(PPAI)成员名单 PPAI Members Directory,非常重要的大买家。
6,2010年到香港采购的国外客人名录(香港贸发局提供),共7.2万数据,超级重要的买家。
7,48.68万条最新买家询盘,购买后每月更新 1-2万条,包括2部分,1,最新的询盘 2,最新的展会买家。免费更新36个月。
8,2009年海关提单数据piers版数据 1千万。


诚信为本,支持支付宝担保交易 (先发货并安装设置群发软件,然后付款) 彻底打消您的 顾虑。

 


 

精准数据-成单率极高
精准数据-成单率极高
精准数据-成单率极高
精准数据-成单率极高
精准数据-成单率极高

^ permalink raw reply

* RE: Very confused about broute DROP
From: Christian Benvenuti (benve) @ 2011-09-15 23:08 UTC (permalink / raw)
  To: Greg Scott, netdev; +Cc: Graham Parenteau
In-Reply-To: <925A849792280C4E80C5461017A4B8A2A04438@mail733.InfraSupportEtc.com>

How about ARP? You need it too ...

> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Greg Scott
> Sent: Thursday, September 15, 2011 3:48 PM
> To: netdev@vger.kernel.org
> Cc: Graham Parenteau
> Subject: Very confused about broute DROP
> 
> I don't get this.  Why does:
> 
> ebtables -t broute -A BROUTING -j DROP
> 
> completely knock a Linux host offline?
> 
> This is what the man page for ebtables says:
> 
> The targets DROP and ACCEPT have a special meaning in the broute table
> (these names are used instead of more descriptive  names  to  keep the
> implementation  generic).   DROP  actually means the frame has to be
> routed, while ACCEPT means the frame has to be bridged. The BROUTING
> chain is traversed very early. However, it is  only  traversed  by
> frames  entering  on  a bridge port that is in forwarding state.
> Normally those frames would be bridged, but you can decide otherwise
> here. The redirect target is very handy here.
> 
> So based on the above paragraph, I should be able to do something like
> this:
> 
> # Here is what to bridge
> ebtables -t broute -A BROUTING -p IPv4 --ip-destination $PUBLIC_IP1 -j
> ACCEPT
> ebtables -t broute -A BROUTING -p IPv4 --ip-destination $PUBLIC_IP2 -j
> ACCEPT
> 
> # Route everything else
> ebtables -t broute -A BROUTING -j DROP
> 
> So I tried above and knocked that box completely offline.  I'm missing
> something.
> 
> Here is what the paragraph about redirect in the ebtables man pages
> says:
> 
> The  redirect target will change the MAC target address to that of the
> bridge device the frame arrived on. This target can only be used in
the
> BROUTING chain of the broute table and the PREROUTING chain of  the
> nat
> table.  In  the  BROUTING  chain,  the MAC address of the bridge port
> is
> used as destination address, in the PREROUTING chain, the MAC address
> of
> the bridge is used.
> 
> OK - so this target MAC address - is this the MAC Address of an ethnn
> port that's part of the bridge, or the MAC Address of another node?  I
> was thinking it was the MAC Address of another node, but maybe it's
> just
> the MAC Address of a port on this bridge?
> 
> And there are some examples here:
> http://ebtables.sourceforge.net/examples/basic.html#ex_redirect
> 
> that I really don't get.  So instead of trial and error guessing, I
> figured I would ask.
> 
> If anyone can help me understand this, I'll take a stab at writing it
> up
> as clearly as I know how for use in future versions of man pages.
> 
> Thanks
> 
> - Greg Scott
> --
> 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

^ permalink raw reply

* Very confused about broute DROP
From: Greg Scott @ 2011-09-15 22:48 UTC (permalink / raw)
  To: netdev; +Cc: Graham Parenteau
In-Reply-To: <925A849792280C4E80C5461017A4B8A2A0414B@mail733.InfraSupportEtc.com>

I don't get this.  Why does:

ebtables -t broute -A BROUTING -j DROP

completely knock a Linux host offline?

This is what the man page for ebtables says:

The targets DROP and ACCEPT have a special meaning in the broute table
(these names are used instead of more descriptive  names  to  keep the
implementation  generic).   DROP  actually means the frame has to be
routed, while ACCEPT means the frame has to be bridged. The BROUTING
chain is traversed very early. However, it is  only  traversed  by
frames  entering  on  a bridge port that is in forwarding state.
Normally those frames would be bridged, but you can decide otherwise
here. The redirect target is very handy here.

So based on the above paragraph, I should be able to do something like
this:

# Here is what to bridge
ebtables -t broute -A BROUTING -p IPv4 --ip-destination $PUBLIC_IP1 -j
ACCEPT
ebtables -t broute -A BROUTING -p IPv4 --ip-destination $PUBLIC_IP2 -j
ACCEPT

# Route everything else
ebtables -t broute -A BROUTING -j DROP

So I tried above and knocked that box completely offline.  I'm missing
something.

Here is what the paragraph about redirect in the ebtables man pages
says: 

The  redirect target will change the MAC target address to that of the
bridge device the frame arrived on. This target can only be used in the
BROUTING chain of the broute table and the PREROUTING chain of  the  nat
table.  In  the  BROUTING  chain,  the MAC address of the bridge port is
used as destination address, in the PREROUTING chain, the MAC address of
the bridge is used.

OK - so this target MAC address - is this the MAC Address of an ethnn
port that's part of the bridge, or the MAC Address of another node?  I
was thinking it was the MAC Address of another node, but maybe it's just
the MAC Address of a port on this bridge?  

And there are some examples here:
http://ebtables.sourceforge.net/examples/basic.html#ex_redirect

that I really don't get.  So instead of trial and error guessing, I
figured I would ask.  

If anyone can help me understand this, I'll take a stab at writing it up
as clearly as I know how for use in future versions of man pages.  

Thanks

- Greg Scott

^ permalink raw reply

* macvtap mode private - IFF_PROMISC flag visibility for userspace
From: Christian Benvenuti (benve) @ 2011-09-15 21:56 UTC (permalink / raw)
  To: netdev; +Cc: mst, Roopa Prabhu (roprabhu), David Wang (dwang2)

When you use/create a macvtap interface in passthrou mode, the lowerdev
is put
into promiscuous mode (NOTE: this may change if/once Roopa's rx_filter
changes
get merged - http://www.spinics.net/lists/netdev/msg174245.html).

However, macvtap also puts the lowerdev into promiscuous mode when
- mode is "macvtap private"
AND
- the lowerdev does not support ndo_set_rx_mode

This would be the codepath in the latter case:

macvlan_open
|
+--> dev_uc_add
     |
     +--> __dev_set_rx_mode
         |
         +--> if (!ndo_set_rx_mode)
                __dev_set_promiscuity

The difference between the two cases above (passthru vs private) however
is that the status of IFF_PROMISC is not exported the same way to user
space:
In the second case (private) dev_get_flags does not return the
IFF_PROMISC flag.
This means that, for example, neither 'ifconfig' nor 'ip link' show that
the
lowerdev is in promisc mode. This does not help throubleshooting.

Yes, the kernel generates a log message when it changes the promiscuity
mode
of the card, but...

Yes, you can check whether IFF_PROMISC is set or not by looking at

  /sys/class/net/<dev_name>/flags

but I can't see why dev_get_flags should not return it too.
Right now dev_get_flags returns IFF_PROMISC only if it set in
dev->gflags, ie it
ignores dev->flags & IFF_PROMISC.
Is this the expected behavior by design?

/Chris

^ permalink raw reply

* Re: [patch net-next-2.6] net: consolidate and fix ethtool_ops->get_settings calling
From: David Miller @ 2011-09-15 21:33 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, ralf, fubar, andy, kaber, bprakash, JBottomley,
	robert.w.love, shemminger, decot, bhutchings, mirq-linux,
	alexander.h.duyck, amit.salecha, eric.dumazet, therbert, paulmck,
	laijs, xiaosuo, greearb, loke.chetan, linux-mips, linux-scsi,
	devel, bridge
In-Reply-To: <1314905304-16485-1-git-send-email-jpirko@redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Thu,  1 Sep 2011 21:28:24 +0200

> This patch does several things:
> - introduces __ethtool_get_settings which is called from ethtool code and
>   from dev_ethtool_get_settings() as well.
> - dev_ethtool_get_settings() becomes rtnl wrapper for
>   __ethtool_get_settings()
> - changes calling in drivers so rtnl locking is respected. In
>   iboe_get_rate was previously ->get_settings() called unlocked. This
>   fixes it
> - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
>   so bnx2fc_if_create() and fcoe_if_create() are called locked as they
>   are from other places.
> - prb_calc_retire_blk_tmo() in af_packet.c was not calling get_settings
>   with rtnl_lock. So use dev_ethtool_get_settings here.
> - use __ethtool_get_settings() in bonding code
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH 3/3] pch_gbe: support ML7831 IOH
From: David Miller @ 2011-09-15 21:26 UTC (permalink / raw)
  To: toshiharu-linux
  Cc: netdev, linux-kernel, eric.dumazet, qi.wang, yong.y.wang,
	joel.clark, kok.howg.ewe, tomoya-linux
In-Reply-To: <1314922809-4041-3-git-send-email-toshiharu-linux@dsn.okisemi.com>

From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Date: Fri,  2 Sep 2011 09:20:09 +0900

> Support new device OKI SEMICONDUCTOR ML7831 IOH(Input/Output Hub)
> 
> ML7831 is for general purpose use.
> ML7831 is companion chip for Intel Atom E6xx series.
> ML7831 is completely compatible for Intel EG20T PCH.
> 
> Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/3] pch_gbe: added the process of FIFO over run error
From: David Miller @ 2011-09-15 21:26 UTC (permalink / raw)
  To: toshiharu-linux
  Cc: netdev, linux-kernel, eric.dumazet, qi.wang, yong.y.wang,
	joel.clark, kok.howg.ewe, tomoya-linux
In-Reply-To: <1314922809-4041-2-git-send-email-toshiharu-linux@dsn.okisemi.com>

From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Date: Fri,  2 Sep 2011 09:20:08 +0900

> This patch added the processing which should be done to hardware,
> when a FIFO over run error occurred.
> 
> Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/3] pch_gbe: fixed the issue which receives an unnecessary packet.
From: David Miller @ 2011-09-15 21:25 UTC (permalink / raw)
  To: toshiharu-linux
  Cc: netdev, linux-kernel, eric.dumazet, qi.wang, yong.y.wang,
	joel.clark, kok.howg.ewe, tomoya-linux
In-Reply-To: <1314922809-4041-1-git-send-email-toshiharu-linux@dsn.okisemi.com>

From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Date: Fri,  2 Sep 2011 09:20:07 +0900

> This patch fixed the issue which receives an unnecessary packet before link
> 
> When using PHY of GMII, an unnecessary packet is received,
> And it becomes impossible to receive a packet after link up.
> 
> Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 2/2] sfc: Use 64-bit writes for TX push where possible
From: David Miller @ 2011-09-15 21:25 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev, linux-net-drivers
In-Reply-To: <1314915000.2733.16.camel@bwh-desktop>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 01 Sep 2011 23:09:59 +0100

> This was originally done as part of commit
> 65f0b417dee94f779ce9b77102b7d73c93723b39 ("sfc: Use write-combining to
> reduce TX latency"), but that had to be reverted.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 1/2] Revert "sfc: Use write-combining to reduce TX latency" and follow-ups
From: David Miller @ 2011-09-15 21:25 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev, linux-net-drivers
In-Reply-To: <1314914969.2733.15.camel@bwh-desktop>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 01 Sep 2011 23:09:29 +0100

> This reverts commits 65f0b417dee94f779ce9b77102b7d73c93723b39,
> d88d6b05fee3cc78e5b0273eb58c31201dcc6b76,
> fcfa060468a4edcf776f0c1211d826d5de1668c1,
> 747df2258b1b9a2e25929ef496262c339c380009 and
> 867955f5682f7157fdafe8670804b9f8ea077bc7.
> 
> Depending on the processor model, write-combining may result in
> reordering that the NIC will not tolerate.  This typically results
> in a DMA error event and reset by the driver, logged as:
> 
> sfc 0000:0e:00.0: eth2: TX DMA Q reports TX_EV_PKT_ERR.
> sfc 0000:0e:00.0: eth2: resetting (ALL)
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> Please queue this for 3.0.y as well.

Applied and queued.

^ permalink raw reply

* Re: [PATCH 0/3] net/irda: sh_irda: add PM support
From: David Miller @ 2011-09-15 21:19 UTC (permalink / raw)
  To: kuninori.morimoto.gx; +Cc: magnus.damm, netdev
In-Reply-To: <8739ggdcie.wl%kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Date: Wed, 31 Aug 2011 23:04:29 -0700 (PDT)

> These are tidyup and PM supoort patches for sh_irda
> 
> Kuninori Morimoto (3):
>       net/irda: sh_irda: add sh_irda_ index to all functions
>       net/irda: sh_irda: update author's email address
>       net/irda: sh_irda: add PM support

Applied to net-next, thank you.

^ permalink raw reply

* Re: pull request: wireless 2011-09-15
From: David Miller @ 2011-09-15 21:13 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20110915194814.GC24589@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Thu, 15 Sep 2011 15:48:15 -0400

> Here is a batch of fixes intended for 3.1.  Included is a calibration
> fix for ath9k that avoids a hang, a couple of rtlwifi fixes for
> connection failures, a mac80211 locking fix, a couple of iwlagn fixes
> (including a corruption fix), an ath9k oops fix, an initialization
> fix for AR9330 hardware in ath9k, and a patch to avoid a needless
> BUG_ON in iwlegacy.
> 
> Please let me know if there are problems!

Pulled, thanks John.

^ permalink raw reply

* Re: [PATCH 26/27] Initconst section fixes for net
From: David Miller @ 2011-09-15 21:12 UTC (permalink / raw)
  To: andi; +Cc: linux-kernel, ak, netdev
In-Reply-To: <1316117394-21666-27-git-send-email-andi@firstfloor.org>

From: Andi Kleen <andi@firstfloor.org>
Date: Thu, 15 Sep 2011 13:09:53 -0700

> From: Andi Kleen <ak@linux.intel.com>
> 
> Cc: davem@davemloft.net
> Cc: netdev@vger.kernel.org
> Signed-off-by: Andi Kleen <ak@linux.intel.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: [PATCH 19/27] Initconst section fixes for drivers/net
From: David Miller @ 2011-09-15 21:12 UTC (permalink / raw)
  To: andi; +Cc: linux-kernel, ak, netdev
In-Reply-To: <1316117394-21666-20-git-send-email-andi@firstfloor.org>

From: Andi Kleen <andi@firstfloor.org>
Date: Thu, 15 Sep 2011 13:09:46 -0700

> From: Andi Kleen <ak@linux.intel.com>
> 
> Cc: davem@davemloft.net
> Cc: netdev@vger.kernel.org
> Signed-off-by: Andi Kleen <ak@linux.intel.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* [PATCH 26/27] Initconst section fixes for net
From: Andi Kleen @ 2011-09-15 20:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andi Kleen, davem, netdev
In-Reply-To: <1316117394-21666-1-git-send-email-andi@firstfloor.org>

From: Andi Kleen <ak@linux.intel.com>

Cc: davem@davemloft.net
Cc: netdev@vger.kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 include/net/net_namespace.h |    2 ++
 net/can/af_can.c            |    2 +-
 net/can/bcm.c               |    2 +-
 net/can/raw.c               |    2 +-
 net/decnet/dn_rules.c       |    2 +-
 net/ipv4/fib_rules.c        |    2 +-
 net/ipv4/ipmr.c             |    2 +-
 net/ipv6/addrlabel.c        |    2 +-
 net/ipv6/fib6_rules.c       |    2 +-
 net/ipv6/ip6mr.c            |    2 +-
 10 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 3bb6fa0..0d7e8ac 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -240,10 +240,12 @@ static inline struct net *read_pnet(struct net * const *pnet)
 #define __net_init
 #define __net_exit
 #define __net_initdata
+#define __net_initconst
 #else
 #define __net_init	__init
 #define __net_exit	__exit_refok
 #define __net_initdata	__initdata
+#define __net_initconst	__initconst
 #endif
 
 struct pernet_operations {
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 8ce926d..22e94a3 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -64,7 +64,7 @@
 
 #include "af_can.h"
 
-static __initdata const char banner[] = KERN_INFO
+static __initconst const char banner[] = KERN_INFO
 	"can: controller area network core (" CAN_VERSION_STRING ")\n";
 
 MODULE_DESCRIPTION("Controller Area Network PF_CAN core");
diff --git a/net/can/bcm.c b/net/can/bcm.c
index d6c8ae5..0cacb79 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -79,7 +79,7 @@
 		     (CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG))
 
 #define CAN_BCM_VERSION CAN_VERSION
-static __initdata const char banner[] = KERN_INFO
+static __initconst const char banner[] = KERN_INFO
 	"can: broadcast manager protocol (rev " CAN_BCM_VERSION " t)\n";
 
 MODULE_DESCRIPTION("PF_CAN broadcast manager protocol");
diff --git a/net/can/raw.c b/net/can/raw.c
index dea99a6..89a1e4b 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -57,7 +57,7 @@
 #include <net/net_namespace.h>
 
 #define CAN_RAW_VERSION CAN_VERSION
-static __initdata const char banner[] =
+static __initconst const char banner[] =
 	KERN_INFO "can: raw protocol (rev " CAN_RAW_VERSION ")\n";
 
 MODULE_DESCRIPTION("PF_CAN raw protocol");
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index f0efb0c..4d3c275 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -219,7 +219,7 @@ static void dn_fib_rule_flush_cache(struct fib_rules_ops *ops)
 	dn_rt_cache_flush(-1);
 }
 
-static const struct fib_rules_ops __net_initdata dn_fib_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst dn_fib_rules_ops_template = {
 	.family		= AF_DECnet,
 	.rule_size	= sizeof(struct dn_fib_rule),
 	.addr_size	= sizeof(u16),
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index a53bb1b..1362927 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -247,7 +247,7 @@ static void fib4_rule_flush_cache(struct fib_rules_ops *ops)
 	rt_cache_flush(ops->fro_net, -1);
 }
 
-static const struct fib_rules_ops __net_initdata fib4_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst fib4_rules_ops_template = {
 	.family		= AF_INET,
 	.rule_size	= sizeof(struct fib4_rule),
 	.addr_size	= sizeof(u32),
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 58e8791..64f14be 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -218,7 +218,7 @@ static int ipmr_rule_fill(struct fib_rule *rule, struct sk_buff *skb,
 	return 0;
 }
 
-static const struct fib_rules_ops __net_initdata ipmr_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst ipmr_rules_ops_template = {
 	.family		= RTNL_FAMILY_IPMR,
 	.rule_size	= sizeof(struct ipmr_rule),
 	.addr_size	= sizeof(u32),
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index 2d8ddba..df6e555 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -75,7 +75,7 @@ struct net *ip6addrlbl_net(const struct ip6addrlbl_entry *lbl)
 
 #define IPV6_ADDR_LABEL_DEFAULT	0xffffffffUL
 
-static const __net_initdata struct ip6addrlbl_init_table
+static const __net_initconst struct ip6addrlbl_init_table
 {
 	const struct in6_addr *prefix;
 	int prefixlen;
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 34d244d..c33c00a 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -239,7 +239,7 @@ static size_t fib6_rule_nlmsg_payload(struct fib_rule *rule)
 	       + nla_total_size(16); /* src */
 }
 
-static const struct fib_rules_ops __net_initdata fib6_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst fib6_rules_ops_template = {
 	.family			= AF_INET6,
 	.rule_size		= sizeof(struct fib6_rule),
 	.addr_size		= sizeof(struct in6_addr),
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 705c828..c37cb9e 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -205,7 +205,7 @@ static int ip6mr_rule_fill(struct fib_rule *rule, struct sk_buff *skb,
 	return 0;
 }
 
-static const struct fib_rules_ops __net_initdata ip6mr_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst ip6mr_rules_ops_template = {
 	.family		= RTNL_FAMILY_IP6MR,
 	.rule_size	= sizeof(struct ip6mr_rule),
 	.addr_size	= sizeof(struct in6_addr),
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 19/27] Initconst section fixes for drivers/net
From: Andi Kleen @ 2011-09-15 20:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andi Kleen, davem, netdev
In-Reply-To: <1316117394-21666-1-git-send-email-andi@firstfloor.org>

From: Andi Kleen <ak@linux.intel.com>

Cc: davem@davemloft.net
Cc: netdev@vger.kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 drivers/net/8139too.c           |    2 +-
 drivers/net/atlx/atl2.c         |    2 +-
 drivers/net/can/slcan.c         |    2 +-
 drivers/net/can/vcan.c          |    2 +-
 drivers/net/fealnx.c            |    2 +-
 drivers/net/hamradio/6pack.c    |    6 +++---
 drivers/net/hamradio/bpqether.c |    2 +-
 drivers/net/hamradio/mkiss.c    |    6 +++---
 drivers/net/hamradio/scc.c      |    2 +-
 drivers/net/hamradio/yam.c      |    2 +-
 drivers/net/ne3210.c            |    2 +-
 drivers/net/qlcnic/qlcnic_hw.c  |    2 +-
 drivers/net/sis190.c            |    2 +-
 drivers/net/starfire.c          |    2 +-
 drivers/net/sundance.c          |    2 +-
 drivers/net/tokenring/smctr.c   |    2 +-
 drivers/net/tulip/eeprom.c      |    2 +-
 drivers/net/tulip/winbond-840.c |    2 +-
 drivers/net/wan/z85230.c        |    2 +-
 19 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index c2672c6..f6e9974 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -228,7 +228,7 @@ typedef enum {
 static const struct {
 	const char *name;
 	u32 hw_flags;
-} board_info[] __devinitdata = {
+} board_info[] __devinitconst = {
 	{ "RealTek RTL8139", RTL8139_CAPS },
 	{ "RealTek RTL8129", RTL8129_CAPS },
 };
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index d4f7dda..d627d46 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -2857,7 +2857,7 @@ static void atl2_force_ps(struct atl2_hw *hw)
  */
 
 #define ATL2_PARAM(X, desc) \
-    static const int __devinitdata X[ATL2_MAX_NIC + 1] = ATL2_PARAM_INIT; \
+    static const int __devinitconst X[ATL2_MAX_NIC + 1] = ATL2_PARAM_INIT; \
     MODULE_PARM(X, "1-" __MODULE_STRING(ATL2_MAX_NIC) "i"); \
     MODULE_PARM_DESC(X, desc);
 #else
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index 4b70b7e..775c0fd 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -59,7 +59,7 @@
 #include <linux/kernel.h>
 #include <linux/can.h>
 
-static __initdata const char banner[] =
+static __initconst const char banner[] =
 	KERN_INFO "slcan: serial line CAN interface driver\n";
 
 MODULE_ALIAS_LDISC(N_SLCAN);
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index a30b8f4..b477728 100644
--- a/drivers/net/can/vcan.c
+++ b/drivers/net/can/vcan.c
@@ -51,7 +51,7 @@
 #include <linux/slab.h>
 #include <net/rtnetlink.h>
 
-static __initdata const char banner[] =
+static __initconst const char banner[] =
 	KERN_INFO "vcan: Virtual CAN interface driver\n";
 
 MODULE_DESCRIPTION("virtual CAN interface");
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index fa8677c..196356f 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -150,7 +150,7 @@ struct chip_info {
 	int flags;
 };
 
-static const struct chip_info skel_netdrv_tbl[] __devinitdata = {
+static const struct chip_info skel_netdrv_tbl[] __devinitconst = {
  	{ "100/10M Ethernet PCI Adapter",	HAS_MII_XCVR },
 	{ "100/10M Ethernet PCI Adapter",	HAS_CHIP_XCVR },
 	{ "1000/100/10M Ethernet PCI Adapter",	HAS_MII_XCVR },
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 2a5a34d..c0e4ac6 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -812,9 +812,9 @@ static struct tty_ldisc_ops sp_ldisc = {
 
 /* Initialize 6pack control device -- register 6pack line discipline */
 
-static const char msg_banner[]  __initdata = KERN_INFO \
+static const char msg_banner[]  __initconst = KERN_INFO \
 	"AX.25: 6pack driver, " SIXPACK_VERSION "\n";
-static const char msg_regfail[] __initdata = KERN_ERR  \
+static const char msg_regfail[] __initconst = KERN_ERR  \
 	"6pack: can't register line discipline (err = %d)\n";
 
 static int __init sixpack_init_driver(void)
@@ -830,7 +830,7 @@ static int __init sixpack_init_driver(void)
 	return status;
 }
 
-static const char msg_unregfail[] __exitdata = KERN_ERR \
+static char msg_unregfail[] __exitdata = KERN_ERR \
 	"6pack: can't unregister line discipline (err = %d)\n";
 
 static void __exit sixpack_exit_driver(void)
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 18d8aff..ddb8d52 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -88,7 +88,7 @@
 
 #include <linux/bpqether.h>
 
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
 	"AX.25: bpqether driver version 004\n";
 
 static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index bc02968..f94ed24 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -998,9 +998,9 @@ static struct tty_ldisc_ops ax_ldisc = {
 	.write_wakeup	= mkiss_write_wakeup
 };
 
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
 	"mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n";
-static const char msg_regfail[] __initdata = KERN_ERR \
+static const char msg_regfail[] __initconst = KERN_ERR \
 	"mkiss: can't register line discipline (err = %d)\n";
 
 static int __init mkiss_init_driver(void)
@@ -1016,7 +1016,7 @@ static int __init mkiss_init_driver(void)
 	return status;
 }
 
-static const char msg_unregfail[] __exitdata = KERN_ERR \
+static char msg_unregfail[] __exitdata = KERN_ERR \
 	"mkiss: can't unregister line discipline (err = %d)\n";
 
 static void __exit mkiss_exit_driver(void)
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 3365581..bdda73e 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -183,7 +183,7 @@
 
 #include "z8530.h"
 
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
 	"AX.25: Z8530 SCC driver version "VERSION".dl1bke\n";
 
 static void t_dwait(unsigned long);
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 96a98d2..856ce96 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -77,7 +77,7 @@
 /* --------------------------------------------------------------------- */
 
 static const char yam_drvname[] = "yam";
-static const char yam_drvinfo[] __initdata = KERN_INFO \
+static const char yam_drvinfo[] __initconst = KERN_INFO \
 	"YAM driver version 0.8 by F1OAT/F6FBB\n";
 
 /* --------------------------------------------------------------------- */
diff --git a/drivers/net/ne3210.c b/drivers/net/ne3210.c
index 243ed2a..34a89dd 100644
--- a/drivers/net/ne3210.c
+++ b/drivers/net/ne3210.c
@@ -82,7 +82,7 @@ static void ne3210_block_output(struct net_device *dev, int count, const unsigne
 
 static unsigned char irq_map[] __initdata = {15, 12, 11, 10, 9, 7, 5, 3};
 static unsigned int shmem_map[] __initdata = {0xff0, 0xfe0, 0xfff0, 0xd8, 0xffe0, 0xffc0, 0xd0, 0x0};
-static const char *ifmap[] __initdata = {"UTP", "?", "BNC", "AUI"};
+static const char * const ifmap[] __initconst = {"UTP", "?", "BNC", "AUI"};
 static int ifmap_val[] __initdata = {
 		IF_PORT_10BASET,
 		IF_PORT_UNKNOWN,
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
index 4055c21..c12edb9 100644
--- a/drivers/net/qlcnic/qlcnic_hw.c
+++ b/drivers/net/qlcnic/qlcnic_hw.c
@@ -38,7 +38,7 @@ static inline void writeq(u64 val, void __iomem *addr)
 }
 #endif
 
-static const struct crb_128M_2M_block_map
+static struct crb_128M_2M_block_map
 crb_128M_2M_map[64] __cacheline_aligned_in_smp = {
     {{{0, 0,         0,         0} } },		/* 0: PCI */
     {{{1, 0x0100000, 0x0102000, 0x120000},	/* 1: PCIE */
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 3c0f131..17f8b02 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1624,7 +1624,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
 static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
 						  struct net_device *dev)
 {
-	static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
+	static const u16 __devinitconst ids[] = { 0x0965, 0x0966, 0x0968 };
 	struct sis190_private *tp = netdev_priv(dev);
 	struct pci_dev *isa_bridge;
 	u8 reg, tmp8;
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index 7ae1f99..e77819d 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -308,7 +308,7 @@ MODULE_DEVICE_TABLE(pci, starfire_pci_tbl);
 static const struct chip_info {
 	const char *name;
 	int drv_flags;
-} netdrv_tbl[] __devinitdata = {
+} netdrv_tbl[] __devinitconst = {
 	{ "Adaptec Starfire 6915", CanHaveMII },
 };
 
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 4793df8..44c9849 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -218,7 +218,7 @@ enum {
 struct pci_id_info {
         const char *name;
 };
-static const struct pci_id_info pci_id_tbl[] __devinitdata = {
+static const struct pci_id_info pci_id_tbl[] __devinitconst = {
 	{"D-Link DFE-550TX FAST Ethernet Adapter"},
 	{"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"},
 	{"D-Link DFE-580TX 4 port Server Adapter"},
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index d9044ab..d83ee07 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -60,7 +60,7 @@
 
 #include "smctr.h"               /* Our Stuff */
 
-static const char version[] __initdata =
+static const char version[] __initconst =
 	KERN_INFO "smctr.c: v1.4 7/12/00 by jschlst@samba.org\n";
 static const char cardname[] = "smctr";
 
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c
index fa5eee9..1f222f4 100644
--- a/drivers/net/tulip/eeprom.c
+++ b/drivers/net/tulip/eeprom.c
@@ -81,7 +81,7 @@ static struct eeprom_fixup eeprom_fixups[] __devinitdata = {
   {NULL}};
 
 
-static const char *block_name[] __devinitdata = {
+static const char *const block_name[] __devinitconst = {
 	"21140 non-MII",
 	"21140 MII PHY",
 	"21142 Serial PHY",
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index 862eadf..3eee1e6 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -236,7 +236,7 @@ struct pci_id_info {
         int drv_flags;		/* Driver use, intended as capability flags. */
 };
 
-static const struct pci_id_info pci_id_tbl[] __devinitdata = {
+static const struct pci_id_info pci_id_tbl[] __devinitconst = {
 	{ 				/* Sometime a Level-One switch card. */
 	  "Winbond W89c840",	CanHaveMII | HasBrokenTx | FDXOnNoMII},
 	{ "Winbond W89c840",	CanHaveMII | HasBrokenTx},
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
index 0e57690..feacc3b 100644
--- a/drivers/net/wan/z85230.c
+++ b/drivers/net/wan/z85230.c
@@ -1775,7 +1775,7 @@ EXPORT_SYMBOL(z8530_queue_xmit);
 /*
  *	Module support
  */
-static const char banner[] __initdata =
+static const char banner[] __initconst =
 	KERN_INFO "Generic Z85C30/Z85230 interface driver v0.02\n";
 
 static int __init z85230_init_driver(void)
-- 
1.7.4.4

^ permalink raw reply related

* pull request: wireless 2011-09-15
From: John W. Linville @ 2011-09-15 19:48 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev, linux-kernel

Dave,

Here is a batch of fixes intended for 3.1.  Included is a calibration
fix for ath9k that avoids a hang, a couple of rtlwifi fixes for
connection failures, a mac80211 locking fix, a couple of iwlagn fixes
(including a corruption fix), an ath9k oops fix, an initialization
fix for AR9330 hardware in ath9k, and a patch to avoid a needless
BUG_ON in iwlegacy.

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit 31dda0ae933bb9fea9cfe000b698c41af0417cac:

  net: don't clear IFF_XMIT_DST_RELEASE in ether_setup (2011-09-15 14:49:44 -0400)

are available in the git repository at:
  git://git.infradead.org/users/linville/wireless.git for-davem

Felix Fietkau (1):
      ath9k_hw: fix calibration on 5 ghz

George (2):
      rtlwifi: rtl8192su: Fix problem connecting to HT-enabled AP
      rtlwifi: Fix problem when switching connections

Johannes Berg (3):
      mac80211: fix missing sta_lock in __sta_info_destroy
      iwlagn: fix stack corruption
      iwlagn: fix command queue timeout

John W. Linville (1):
      Merge branch 'master' of git://git.infradead.org/users/linville/wireless into for-davem

Mohammed Shafi Shajakhan (1):
      ath9k: Fix kernel panic on unplugging the device

Rajkumar Manoharan (1):
      ath9k_hw: Fix init mode register regression

Stanislaw Gruszka (1):
      iwlegacy: fix BUG_ON(info->control.rates[0].idx < 0)

 drivers/net/wireless/ath/ath9k/ar9002_calib.c    |    3 ++-
 drivers/net/wireless/ath/ath9k/ar9003_phy.c      |    2 +-
 drivers/net/wireless/ath/ath9k/main.c            |    6 ++++++
 drivers/net/wireless/iwlegacy/iwl-3945-rs.c      |   13 ++++++++-----
 drivers/net/wireless/iwlwifi/iwl-agn-ucode.c     |    2 +-
 drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c |    2 ++
 drivers/net/wireless/rtlwifi/core.c              |    8 ++++++++
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.c     |   11 ++++++-----
 net/mac80211/sta_info.c                          |    2 +-
 9 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
index 2d4c091..2d394af 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
@@ -41,7 +41,8 @@ static bool ar9002_hw_is_cal_supported(struct ath_hw *ah,
 	case ADC_DC_CAL:
 		/* Run ADC Gain Cal for non-CCK & non 2GHz-HT20 only */
 		if (!IS_CHAN_B(chan) &&
-		    !(IS_CHAN_2GHZ(chan) && IS_CHAN_HT20(chan)))
+		    !((IS_CHAN_2GHZ(chan) || IS_CHAN_A_FAST_CLOCK(ah, chan)) &&
+		      IS_CHAN_HT20(chan)))
 			supported = true;
 		break;
 	}
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 1baca8e..fcafec0 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -671,7 +671,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
 		REG_WRITE_ARRAY(&ah->iniModesAdditional,
 				modesIndex, regWrites);
 
-	if (AR_SREV_9300(ah))
+	if (AR_SREV_9330(ah))
 		REG_WRITE_ARRAY(&ah->iniModesAdditional, 1, regWrites);
 
 	if (AR_SREV_9340(ah) && !ah->is_clk_25mhz)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6530694..722967b 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2303,6 +2303,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
 	mutex_lock(&sc->mutex);
 	cancel_delayed_work_sync(&sc->tx_complete_work);
 
+	if (ah->ah_flags & AH_UNPLUGGED) {
+		ath_dbg(common, ATH_DBG_ANY, "Device has been unplugged!\n");
+		mutex_unlock(&sc->mutex);
+		return;
+	}
+
 	if (sc->sc_flags & SC_OP_INVALID) {
 		ath_dbg(common, ATH_DBG_ANY, "Device not present\n");
 		mutex_unlock(&sc->mutex);
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c
index 977bd24..164bcae 100644
--- a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c
@@ -822,12 +822,15 @@ static void iwl3945_rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
 
  out:
 
-	rs_sta->last_txrate_idx = index;
-	if (sband->band == IEEE80211_BAND_5GHZ)
-		info->control.rates[0].idx = rs_sta->last_txrate_idx -
-				IWL_FIRST_OFDM_RATE;
-	else
+	if (sband->band == IEEE80211_BAND_5GHZ) {
+		if (WARN_ON_ONCE(index < IWL_FIRST_OFDM_RATE))
+			index = IWL_FIRST_OFDM_RATE;
+		rs_sta->last_txrate_idx = index;
+		info->control.rates[0].idx = index - IWL_FIRST_OFDM_RATE;
+	} else {
+		rs_sta->last_txrate_idx = index;
 		info->control.rates[0].idx = rs_sta->last_txrate_idx;
+	}
 
 	IWL_DEBUG_RATE(priv, "leave: %d\n", index);
 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
index a895a09..5621100 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
@@ -167,7 +167,7 @@ static int iwlagn_set_temperature_offset_calib(struct iwl_priv *priv)
 
 	memset(&cmd, 0, sizeof(cmd));
 	iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_TEMP_OFFSET_CMD);
-	memcpy(&cmd.radio_sensor_offset, offset_calib, sizeof(offset_calib));
+	memcpy(&cmd.radio_sensor_offset, offset_calib, sizeof(*offset_calib));
 	if (!(cmd.radio_sensor_offset))
 		cmd.radio_sensor_offset = DEFAULT_RADIO_SENSOR_OFFSET;
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
index a6b2b1d..222d410 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
@@ -771,6 +771,8 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
 	cmd = txq->cmd[cmd_index];
 	meta = &txq->meta[cmd_index];
 
+	txq->time_stamp = jiffies;
+
 	iwlagn_unmap_tfd(priv, meta, &txq->tfds[index], DMA_BIDIRECTIONAL);
 
 	/* Input error checking is done when commands are added to queue. */
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 1bdc1aa..04c4e9e 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -610,6 +610,11 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 
 			mac->link_state = MAC80211_NOLINK;
 			memset(mac->bssid, 0, 6);
+
+			/* reset sec info */
+			rtl_cam_reset_sec_info(hw);
+
+			rtl_cam_reset_all_entry(hw);
 			mac->vendor = PEER_UNKNOWN;
 
 			RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG,
@@ -1063,6 +1068,9 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 		 *or clear all entry here.
 		 */
 		rtl_cam_delete_one_entry(hw, mac_addr, key_idx);
+
+		rtl_cam_reset_sec_info(hw);
+
 		break;
 	default:
 		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
index 906e7aa..3e52a54 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
@@ -549,15 +549,16 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			       (tcb_desc->rts_use_shortpreamble ? 1 : 0)
 			       : (tcb_desc->rts_use_shortgi ? 1 : 0)));
 	if (mac->bw_40) {
-		if (tcb_desc->packet_bw) {
+		if (rate_flag & IEEE80211_TX_RC_DUP_DATA) {
 			SET_TX_DESC_DATA_BW(txdesc, 1);
 			SET_TX_DESC_DATA_SC(txdesc, 3);
+		} else if(rate_flag & IEEE80211_TX_RC_40_MHZ_WIDTH){
+			SET_TX_DESC_DATA_BW(txdesc, 1);
+			SET_TX_DESC_DATA_SC(txdesc, mac->cur_40_prime_sc);
 		} else {
 			SET_TX_DESC_DATA_BW(txdesc, 0);
-				if (rate_flag & IEEE80211_TX_RC_DUP_DATA)
-					SET_TX_DESC_DATA_SC(txdesc,
-							  mac->cur_40_prime_sc);
-			}
+			SET_TX_DESC_DATA_SC(txdesc, 0);
+		}
 	} else {
 		SET_TX_DESC_DATA_BW(txdesc, 0);
 		SET_TX_DESC_DATA_SC(txdesc, 0);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 3db78b6..21070e9 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -665,7 +665,7 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
 		BUG_ON(!sdata->bss);
 
 		atomic_dec(&sdata->bss->num_sta_ps);
-		__sta_info_clear_tim_bit(sdata->bss, sta);
+		sta_info_clear_tim_bit(sta);
 	}
 
 	local->num_sta--;
-- 
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 net-next 0/8] tg3: Odds and ends
From: David Miller @ 2011-09-15 19:57 UTC (permalink / raw)
  To: mcarlson; +Cc: netdev
In-Reply-To: <1314827094-29714-1-git-send-email-mcarlson@broadcom.com>

From: "Matt Carlson" <mcarlson@broadcom.com>
Date: Wed, 31 Aug 2011 14:44:46 -0700

> This patchset applies a few minor changes and cleans up some
> unnecessary function prototypes.

Applied, but as Joe Perches stated patch #8 claimed it just was
"code movement" but a test in the code was changed.  Please don't
do that again.

^ permalink raw reply

* Re: [PATCH net v2 0/6] bnx2x: Few link fixes
From: David Miller @ 2011-09-15 19:53 UTC (permalink / raw)
  To: yanivr; +Cc: eilong, netdev
In-Reply-To: <1315392464.27750.21.camel@lb-tlvb-dmitry>

From: "Yaniv Rosner" <yanivr@broadcom.com>
Date: Wed, 7 Sep 2011 13:47:44 +0300

> Following Ben's suggestion, I'm resending the following patch series
> describing some link fixes.  Please consider applying it to net.

I originally said that I'd want these targetted for net-next instead,
but I've changed my mind and decided to indeed apply these changes to
the net GIT tree, thanks.

^ permalink raw reply

* Re: [net-next] MII: fix Kconfig dependencies for MII
From: David Miller @ 2011-09-15 19:49 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo
In-Reply-To: <1316071394-18195-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 15 Sep 2011 00:23:14 -0700

> MII Kconfig option is apart of the core networking drivers and
> by default NET_CORE is enabled so drivers selecting MII will
> have MII enabled as well.  It was found using the randconfig
> option during testing, MII would be selected but NET_CORE
> could be disabled.  This caused a dependency error.
> 
> Resolved the dependency by selecting NET_CORE when MII is
> selected.
> 
> Reported-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Tested-by: Aaron Brown <aaron.f.brown@intel.com>

Applied, thanks Jeff.

^ permalink raw reply

* Re: [PATCH 0/9] update the stmmac to the version Aug_2011 (v3)
From: David Miller @ 2011-09-15 19:45 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev, bhutchings
In-Reply-To: <1314949903-26137-1-git-send-email-peppe.cavallaro@st.com>

From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Fri,  2 Sep 2011 09:51:34 +0200

> These patches update the driver adding new supports:
> MMC (HW management counters), HW feature register and
> debugfs support.
> 
> MMC counters are exposed via ethtool.
> 
> These also update the documentation adding a new section
> for the debugging.

Series applied.

^ permalink raw reply

* Re: [patch net-next-2.6] br: remove redundant check and init
From: David Miller @ 2011-09-15 19:43 UTC (permalink / raw)
  To: jpirko; +Cc: netdev, eric.dumazet, shemminger, bridge
In-Reply-To: <1314883778-2706-1-git-send-email-jpirko@redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Thu,  1 Sep 2011 15:29:38 +0200

> Since these checks and initialization are done in
> dev_ethtool_get_settings called later on, remove this redundancy.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/2] [TRIVIAL] mii: Convert spaces to tabs in mii.h
From: David Miller @ 2011-09-15 19:45 UTC (permalink / raw)
  To: mark.einon; +Cc: netdev, bhutchings
In-Reply-To: <1314868937-2536-1-git-send-email-mark.einon@gmail.com>

From: Mark Einon <mark.einon@gmail.com>
Date: Thu,  1 Sep 2011 10:22:16 +0100

> Whitespace changes - spaces converted to tabs after each define name and value
> 
> Signed-off-by: Mark Einon <mark.einon@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] mii: Remove references to DP83840 PHY in mii.h
From: David Miller @ 2011-09-15 19:44 UTC (permalink / raw)
  To: mark.einon; +Cc: netdev
In-Reply-To: <1314804928-7353-1-git-send-email-mark.einon@gmail.com>

From: Mark Einon <mark.einon@gmail.com>
Date: Wed, 31 Aug 2011 16:35:28 +0100

> There are references to this PHY chip in the generic mii.h header, so removing them.
> 
> Signed-off-by: Mark Einon <mark.einon@gmail.com>

Applied.

^ 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