* Re: [Patch net-next] vxlan: revert "vxlan: Bypass encapsulation if the destination is local"
From: Sergei Shtylyov @ 2013-04-10 14:29 UTC (permalink / raw)
To: Sridhar Samudrala; +Cc: Cong Wang, netdev, David S. Miller
In-Reply-To: <1365530913.29336.50.camel@oc1677441337.ibm.com>
Hello.
On 09-04-2013 22:08, Sridhar Samudrala wrote:
>> From: Cong Wang <amwang@redhat.com>
>> This reverts commit 9dcc71e1fdbb7aa10d92a3d35e8a201adc84abd0.
>> It apparently breaks my vxlan tests between different namespaces.
> I haven't tried vxlan with network namespaces.
> This patch effects the following 2 code paths
> - when source and destination endpoints are on the same bridge and
> route short-circuiting is enabled. I guess you are not hitting
> this path as this is possible only if you specify 'rsc' flag when
> creating vxlan device.
> - when source and destination endpoints belonging to different vni's
> are on 2 different bridges on the same host. encap bypass is done
> in this scenario by checking if rt_flags has RTCF_LOCAL set. I think
> you must be hitting this path and the following patch should fix
> it by only doing bypass if the source and dest devices belong to
> the same net. Can you try it and see if it fixes your tests?
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 9a64715..d53d8cb 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -1012,12 +1012,15 @@ static netdev_tx_t vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
> goto tx_error;
> }
>
> - /* Bypass encapsulation if the destination is local */
> - if (rt->rt_flags & RTCF_LOCAL) {
> + /* Bypass encapsulation if the destination is local and in the same
> + network namespace.
> + */
Note that the preferred multi-line comment style in the networking code is:
/* bla
* bla
*/
WBR, Sergei
^ permalink raw reply
* Re: [PATCH 2/2 v4] sierra_net: keep status interrupt URB active
From: Dan Williams @ 2013-04-10 14:57 UTC (permalink / raw)
To: Oliver Neukum
Cc: Ming Lei, Elina Pasheva, Network Development, linux-usb,
Rory Filer, Phil Sutter
In-Reply-To: <4949544.d8fOCnDANj@linux-5eaq.site>
On Wed, 2013-04-10 at 09:15 +0200, Oliver Neukum wrote:
> On Tuesday 09 April 2013 18:05:51 Dan Williams wrote:
> > The driver and firmware sync up through SYNC messages, and the
> > firmware's affirmative reply to these SYNC messages appears to be the
> > "Reset" indication received via the status interrupt endpoint. Thus the
> > driver needs the status interrupt endpoint always active so that the
> > Reset indication can be received even if the netdev is closed, which is
> > the case right after device insertion.
>
> WHat about suspend/resume?
usbnet should take care of that transparently from the sub-drivers
through it's own suspend/resume logic to kill/resubmit the URB if
required. Though is there something I'm missing here?
Dan
^ permalink raw reply
* Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active
From: Dan Williams @ 2013-04-10 15:01 UTC (permalink / raw)
To: Oliver Neukum
Cc: Ming Lei, Elina Pasheva, Network Development, linux-usb,
Rory Filer, Phil Sutter
In-Reply-To: <21345916.cd7DzC6Ttz@linux-5eaq.site>
On Wed, 2013-04-10 at 15:58 +0200, Oliver Neukum wrote:
> On Wednesday 10 April 2013 08:54:43 Dan Williams wrote:
> > > The refcounting is very good. Just don't mess around with "force"
> >
> > That's easy to do if the helpers aren't used for suspend/resume, which
> > is what I had previously in my v2 patches until Ming suggested that I
> > use the helpers there. I can go back to that approach if you'd like, it
> > is a bit less complicated at the expense of sprinkling the interrupt urb
> > submit/kill code around more widely.
>
> If you introduce a third helper like "forcibly_stop_interrupt" or something,
> I'll be perfectly happy. Just don't use flags which completely alter behavior.
>
> Regards
> Oliver
Do you mean something more like this? If so, I'll go ahead and do the
formal submission. Thanks!
Dan
---
drivers/net/usb/usbnet.c | 79 ++++++++++++++++++++++++++++++++++++++++++----
include/linux/usb/usbnet.h | 5 +++
2 files changed, 77 insertions(+), 7 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 51f3192..f903beb 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -252,6 +252,70 @@ static int init_status (struct usbnet *dev, struct usb_interface *intf)
return 0;
}
+/* Submit the interrupt URB if not previously submitted, increasing refcount */
+int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags)
+{
+ int ret = 0;
+
+ WARN_ON_ONCE(dev->interrupt == NULL);
+ if (dev->interrupt) {
+ mutex_lock(&dev->interrupt_mutex);
+
+ if (++dev->interrupt_count == 1)
+ ret = usb_submit_urb(dev->interrupt, mem_flags);
+
+ dev_dbg(&dev->udev->dev, "incremented interrupt URB count to %d\n",
+ dev->interrupt_count);
+ mutex_unlock(&dev->interrupt_mutex);
+ }
+ return ret;
+}
+EXPORT_SYMBOL_GPL(usbnet_status_start);
+
+/* For resume; submit interrupt URB if previously submitted */
+static int __usbnet_status_start_force(struct usbnet *dev, gfp_t mem_flags)
+{
+ int ret = 0;
+
+ mutex_lock(&dev->interrupt_mutex);
+ if (dev->interrupt_count) {
+ ret = usb_submit_urb(dev->interrupt, mem_flags);
+ dev_dbg(&dev->udev->dev,
+ "submitted interrupt URB for resume\n");
+ }
+ mutex_unlock(&dev->interrupt_mutex);
+ return ret;
+}
+
+/* Kill the interrupt URB if all submitters want it killed */
+void usbnet_status_stop(struct usbnet *dev)
+{
+ if (dev->interrupt) {
+ mutex_lock(&dev->interrupt_mutex);
+ WARN_ON(dev->interrupt_count == 0);
+
+ if (dev->interrupt_count && --dev->interrupt_count == 0)
+ usb_kill_urb(dev->interrupt);
+
+ dev_dbg(&dev->udev->dev,
+ "decremented interrupt URB count to %d\n",
+ dev->interrupt_count);
+ mutex_unlock(&dev->interrupt_mutex);
+ }
+}
+EXPORT_SYMBOL_GPL(usbnet_status_stop);
+
+/* For suspend; always kill interrupt URB */
+static void __usbnet_status_stop_force(struct usbnet *dev)
+{
+ if (dev->interrupt) {
+ mutex_lock(&dev->interrupt_mutex);
+ usb_kill_urb(dev->interrupt);
+ dev_dbg(&dev->udev->dev, "killed interrupt URB for suspend\n");
+ mutex_unlock(&dev->interrupt_mutex);
+ }
+}
+
/* Passes this packet up the stack, updating its accounting.
* Some link protocols batch packets, so their rx_fixup paths
* can return clones as well as just modify the original skb.
@@ -725,7 +789,7 @@ int usbnet_stop (struct net_device *net)
if (!(info->flags & FLAG_AVOID_UNLINK_URBS))
usbnet_terminate_urbs(dev);
- usb_kill_urb(dev->interrupt);
+ usbnet_status_stop(dev);
usbnet_purge_paused_rxq(dev);
@@ -787,7 +851,7 @@ int usbnet_open (struct net_device *net)
/* start any status interrupt transfer */
if (dev->interrupt) {
- retval = usb_submit_urb (dev->interrupt, GFP_KERNEL);
+ retval = usbnet_status_start(dev, GFP_KERNEL);
if (retval < 0) {
netif_err(dev, ifup, dev->net,
"intr submit %d\n", retval);
@@ -1430,6 +1494,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
dev->delay.data = (unsigned long) dev;
init_timer (&dev->delay);
mutex_init (&dev->phy_mutex);
+ mutex_init(&dev->interrupt_mutex);
+ dev->interrupt_count = 0;
dev->net = net;
strcpy (net->name, "usb%d");
@@ -1565,7 +1631,7 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
*/
netif_device_detach (dev->net);
usbnet_terminate_urbs(dev);
- usb_kill_urb(dev->interrupt);
+ __usbnet_status_stop_force(dev);
/*
* reattach so runtime management can use and
@@ -1585,9 +1651,8 @@ int usbnet_resume (struct usb_interface *intf)
int retval;
if (!--dev->suspend_count) {
- /* resume interrupt URBs */
- if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags))
- usb_submit_urb(dev->interrupt, GFP_NOIO);
+ /* resume interrupt URB if it was previously submitted */
+ __usbnet_status_start_force(dev, GFP_NOIO);
spin_lock_irq(&dev->txq.lock);
while ((res = usb_get_from_anchor(&dev->deferred))) {
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 0e5ac93..d71f44c 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -56,6 +56,8 @@ struct usbnet {
struct sk_buff_head done;
struct sk_buff_head rxq_pause;
struct urb *interrupt;
+ unsigned interrupt_count;
+ struct mutex interrupt_mutex;
struct usb_anchor deferred;
struct tasklet_struct bh;
@@ -246,4 +248,7 @@ extern int usbnet_nway_reset(struct net_device *net);
extern int usbnet_manage_power(struct usbnet *, int);
+int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags);
+void usbnet_status_stop(struct usbnet *dev);
+
#endif /* __LINUX_USB_USBNET_H */
--
1.8.1.4
^ permalink raw reply related
* Re: [PATCH 2/2 v4] sierra_net: keep status interrupt URB active
From: Oliver Neukum @ 2013-04-10 15:01 UTC (permalink / raw)
To: Dan Williams
Cc: Ming Lei, Elina Pasheva, Network Development, linux-usb,
Rory Filer, Phil Sutter
In-Reply-To: <1365605870.28888.70.camel@dcbw.foobar.com>
On Wednesday 10 April 2013 09:57:50 Dan Williams wrote:
> On Wed, 2013-04-10 at 09:15 +0200, Oliver Neukum wrote:
> > On Tuesday 09 April 2013 18:05:51 Dan Williams wrote:
> > > The driver and firmware sync up through SYNC messages, and the
> > > firmware's affirmative reply to these SYNC messages appears to be the
> > > "Reset" indication received via the status interrupt endpoint. Thus the
> > > driver needs the status interrupt endpoint always active so that the
> > > Reset indication can be received even if the netdev is closed, which is
> > > the case right after device insertion.
> >
> > WHat about suspend/resume?
>
> usbnet should take care of that transparently from the sub-drivers
> through it's own suspend/resume logic to kill/resubmit the URB if
> required. Though is there something I'm missing here?
Sorry, I read mails in antichronological order.
Regards
Oliver
^ permalink raw reply
* Re: [PATCH 1/4] Add packet recirculation
From: Jesse Gross @ 2013-04-10 16:21 UTC (permalink / raw)
To: Simon Horman
Cc: dev@openvswitch.org, netdev, Ravi K, Isaku Yamahata, Ben Pfaff
In-Reply-To: <20130410091657.GA27777@verge.net.au>
On Wed, Apr 10, 2013 at 2:16 AM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Apr 09, 2013 at 08:44:02AM -0700, Jesse Gross wrote:
>> On Tue, Apr 9, 2013 at 12:50 AM, Simon Horman <horms@verge.net.au> wrote:
>> > On Mon, Apr 08, 2013 at 06:46:29PM -0700, Jesse Gross wrote:
>> >> On Sun, Apr 7, 2013 at 11:43 PM, Simon Horman <horms@verge.net.au> wrote:
>> >> > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
>> >> > index 47830c1..5129da1 100644
>> >> > --- a/ofproto/ofproto-dpif.c
>> >> > +++ b/ofproto/ofproto-dpif.c
>> >>
>> >> I'm still working on more detailed comments for this. However, I'm
>> >> concerned about whether the behavior for revalidation and stats is
>> >> correct.
>> >
>> > I am a little concerned about that too.
>> > Perhaps Ben could look over it?
>>
>> To rephrase, there are problems in both of those areas. Validation in
>> particular I don't think handles resubmitted facets and I believe that
>> stats on rules will be the sum of all resubmitted passes.
>
> Some questions:
> By resubmitted do you mean recirculated?
Yes.
> What is the stats behaviour that you would like?
A given rule should have byte and packet counts equal to the number of
times it is matched (i.e. the first time) even if we have to decompose
it into multiple passes internally.
> With regards to validation, I assume the area of concern
> is around facet_revalidate(). I will look into that.
Yes.
>> Both of these will likely significantly affect the data structures, so
>> please look into this before we go further.
>
> Sure. I was not planning to push (much) further until this series
> is reviewed properly.
I'm planning on waiting on further reviews of this file until you've
had a chance to look into validation and stats since I think that may
change some of the data structures.
^ permalink raw reply
* Re: [mac80211-next:wip 107/122] drivers/net/wireless/mac80211_hwsim.c:2198:17: warning: ignoring return value of 'driver_register', declared with attribute warn_unused_result
From: Martin Pitt @ 2013-04-10 16:38 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, netdev, John W. Linville
In-Reply-To: <51658900.3wb5UKoIEe45MUXS%fengguang.wu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
Hello Johannes,
kbuild test robot [2013-04-10 23:45 +0800]:
> drivers/net/wireless/mac80211_hwsim.c: In function 'init_mac80211_hwsim':
> >> drivers/net/wireless/mac80211_hwsim.c:2198:17: warning: ignoring return value of 'driver_register', declared with attribute warn_unused_result [-Wunused-result]
Argh, I wish I could see these warnings with the standard make
command, sorry about that. Sending a patch for this.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active
From: Bjørn Mork @ 2013-04-10 15:21 UTC (permalink / raw)
To: Dan Williams
Cc: Ming Lei, Oliver Neukum, Elina Pasheva, Network Development,
linux-usb, Rory Filer, Phil Sutter
In-Reply-To: <1365604263.28888.56.camel@dcbw.foobar.com>
Dan Williams <dcbw@redhat.com> writes:
> On Wed, 2013-04-10 at 15:25 +0200, Bjørn Mork wrote:
>> Dan Williams <dcbw@redhat.com> writes:
>>
>> > +int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags)
>> > +{
>> > + /* Only drivers that implement a status hook should call this */
>> > + BUG_ON(dev->interrupt == NULL);
>> >
>> I still don't think there is any reason to BUG out. See for example
>> http://article.gmane.org/gmane.linux.kernel/52102
>>
>> > +static void __usbnet_status_stop(struct usbnet *dev, bool force)
>> > +{
>> > + if (dev->interrupt) {
>> > + mutex_lock(&dev->interrupt_mutex);
>> > + if (!force)
>> > + BUG_ON(dev->interrupt_count == 0);
>>
>> Same here. You can deal with this just fine. Warn once, and go on
>> ignoring the problem. Why kill the machine because of some minor driver
>> issue?
>
> Actually in the stop case, no, we can't deal with it, because then (due
> to the buggy sub-driver) we'd go on to decrement 0 into UINT_MAX. It
> really is a bug if, *not* at suspend time, we're told to stop the
> interrupt URB when it's not yet submitted.
Sure it is a bug. All I'm saying is that you can deal with it. Warn
about the bug and give up. Or continue. But don't roll over and die.
Let the user unload the buggy driver and email the author instead.
> I'm happy to add another
> if() here though, which would end up looking like this:
>
> if (dev->interrupt_count && --dev->interrupt_count == 0)
> usb_kill_urb(dev->interrupt);
>
> which seems odd, but fine.
Yes, there are too many decision factors, so it does look odd. You
could also decide early that the bogus dev->interrupt_count means that
nothing needs to be done, because no interrupt URB was subitted. Like
static void __usbnet_status_stop(struct usbnet *dev, bool force)
{
if (dev->interrupt) {
mutex_lock(&dev->interrupt_mutex);
if (!force && dev->interrupt_count == 0) {
print loud warning blaming the minidriver author;
goto out;
}
if (force || --dev->interrupt_count == 0)
usb_kill_urb(dev->interrupt);
dev_dbg(&dev->udev->dev,
"decremented interrupt URB count to %d\n",
dev->interrupt_count);
out:
mutex_unlock(&dev->interrupt_mutex);
}
}
But it is pretty much the same. "force" makes a mess of it.
In any case, I believe any of those solutions are a lot nicer to any
unsuspecting user, who may not agree with you that a failing 3G modem is
important enough to kill the machine.
Bjørn
^ permalink raw reply
* mac80211_hwsim: Check return value of driver_register
From: Martin Pitt @ 2013-04-10 16:40 UTC (permalink / raw)
To: John W. Linville, linux-wireless; +Cc: netdev, linux-kernel, Johannes Berg
If driver_register() fails, properly exit with the same error code.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
---
drivers/net/wireless/mac80211_hwsim.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 57361c3..a2224b7 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2183,7 +2183,12 @@ static int __init init_mac80211_hwsim(void)
if (IS_ERR(hwsim_class))
return PTR_ERR(hwsim_class);
- driver_register(&mac80211_hwsim_driver);
+ err = driver_register(&mac80211_hwsim_driver);
+ if (err != 0) {
+ printk(KERN_DEBUG
+ "mac80211_hwsim: driver_register failed (%d)\n", err);
+ return err;
+ }
memset(addr, 0, ETH_ALEN);
addr[0] = 0x02;
--
1.7.2.5
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
^ permalink raw reply related
* Fw: [PATCH] xen-netback: use netdev_alloc_skb_ip_align
From: Stephen Hemminger @ 2013-04-10 16:41 UTC (permalink / raw)
To: netdev
Begin forwarded message:
Date: Wed, 10 Apr 2013 14:18:16 +0100
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] xen-netback: use netdev_alloc_skb_ip_align
On Wed, 2013-04-10 at 00:07 +0100, Stephen Hemminger wrote:
> On Tue, 9 Apr 2013 12:27:31 +0100
> Ian Campbell <Ian.Campbell@citrix.com> wrote:
>
> > (apologies for the late reply, I've been away)
> >
> > On Wed, 2013-03-20 at 19:21 +0000, Stephen Hemminger wrote:
> > > Use standard helper function to allocate and align received packet.
> > > Compile tested only
> > >
> > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > >
> > >
> > > --- a/drivers/net/xen-netback/netback.c 2013-03-07 18:12:52.825300956 -0800
> > > +++ b/drivers/net/xen-netback/netback.c 2013-03-20 12:09:09.052034865 -0700
> > > @@ -1357,8 +1357,8 @@ static unsigned xen_netbk_tx_build_gops(
> > > ret < MAX_SKB_FRAGS) ?
> > > PKT_PROT_LEN : txreq.size;
> > >
> > > - skb = alloc_skb(data_len + NET_SKB_PAD + NET_IP_ALIGN,
> > > - GFP_ATOMIC | __GFP_NOWARN);
> > > + skb = __netdev_alloc_skb_ip_align(vif->dev, data_len,
> > > + GFP_ATOMIC | __GFP_NOWARN);
> >
> > __netdev_alloc_skb_ip_align accounts for NET_IP_ALIGN but not
> > NET_SKB_PAD, is this aspect of the change intentional? (I'm not really
> > sure how much NET_SKB_PAD is worth in practice).
>
> __nedev_alloc_skb_ip_align(dev, length, gfp)
> calls __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp)
> calls __netdev_alloc_skb
>
> which adds padding here:
> struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
> unsigned int length, gfp_t gfp_mask)
> {
> struct sk_buff *skb = NULL;
> unsigned int fragsz = SKB_DATA_ALIGN(length + NET_SKB_PAD) +
> SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
Thanks for the explanation.
Acked-by: Ian Campbell <ian.campbell@citix.com>
I see this wasn't CCd to netdev -- do you want to resend or would you
like me to fwd to DaveM for you?
Ian.
^ permalink raw reply
* Re: [PATCH iproute2] vxlan: Allow setting unicast address to the group address
From: Stephen Hemminger @ 2013-04-10 16:46 UTC (permalink / raw)
To: Atzm Watanabe; +Cc: netdev
In-Reply-To: <87sj2yn4y2.wl%atzm@stratosphere.co.jp>
On Wed, 10 Apr 2013 17:52:05 +0900
Atzm Watanabe <atzm@stratosphere.co.jp> wrote:
> This patch allows setting unicast address to the VXLAN group address.
> It allows that VXLAN can be used as peer-to-peer tunnel without
> multicast.
>
> Signed-off-by: Atzm Watanabe <atzm@stratosphere.co.jp>
> ---
> ip/iplink_vxlan.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c
> index 1025326..cfe324c 100644
> --- a/ip/iplink_vxlan.c
> +++ b/ip/iplink_vxlan.c
> @@ -66,9 +66,6 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
> } else if (!matches(*argv, "group")) {
> NEXT_ARG();
> gaddr = get_addr32(*argv);
> -
> - if (!IN_MULTICAST(ntohl(gaddr)))
> - invarg("invald group address", *argv);
> } else if (!matches(*argv, "local")) {
> NEXT_ARG();
> if (strcmp(*argv, "any"))
Could you use another name or argument to express the different intended behavior.
^ permalink raw reply
* Re: [PATCH 1/3] if.h: add IFF_BRIDGE_RESTRICTED flag
From: Antonio Quartulli @ 2013-04-10 16:54 UTC (permalink / raw)
To: Jamal Hadi Salim
Cc: Stephen Hemminger, David S. Miller,
bridge@lists.linux-foundation.org, netdev@vger.kernel.org
In-Reply-To: <5164387D.8080700@mojatatu.com>
[-- Attachment #1: Type: text/plain, Size: 636 bytes --]
Hi Jamal, all,
On Tue, Apr 09, 2013 at 08:49:17 -0700, Jamal Hadi Salim wrote:
> On 13-04-09 09:51 AM, Antonio Quartulli wrote:
>
> >
> > Does this work at the bridge level? A packet entering a port and going out from
> > another one can be affected by tc/mark?
>
> Yes of course. And on any construct that looks like a netdev (tunnels etc).
>
Thanks for your hints. After having struggled a bit I found out how to do it
using ebtables and the mark target :)
Thanks a Lot!
These patches seem to be useless now
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: mac80211_hwsim: Check return value of driver_register
From: Johannes Berg @ 2013-04-10 17:05 UTC (permalink / raw)
To: Martin Pitt; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <20130410164027.GB2884@piware.de>
On Wed, 2013-04-10 at 18:40 +0200, Martin Pitt wrote:
> If driver_register() fails, properly exit with the same error code.
>
> Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
> ---
> drivers/net/wireless/mac80211_hwsim.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
> index 57361c3..a2224b7 100644
> --- a/drivers/net/wireless/mac80211_hwsim.c
> +++ b/drivers/net/wireless/mac80211_hwsim.c
> @@ -2183,7 +2183,12 @@ static int __init init_mac80211_hwsim(void)
> if (IS_ERR(hwsim_class))
> return PTR_ERR(hwsim_class);
>
> - driver_register(&mac80211_hwsim_driver);
> + err = driver_register(&mac80211_hwsim_driver);
> + if (err != 0) {
> + printk(KERN_DEBUG
> + "mac80211_hwsim: driver_register failed (%d)\n", err);
> + return err;
> + }
Except you just leaked the class... I have a different fix already
anyway:
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 9a0d526..b5117f5 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2191,11 +2191,15 @@ static int __init init_mac80211_hwsim(void)
spin_lock_init(&hwsim_radio_lock);
INIT_LIST_HEAD(&hwsim_radios);
- hwsim_class = class_create(THIS_MODULE, "mac80211_hwsim");
- if (IS_ERR(hwsim_class))
- return PTR_ERR(hwsim_class);
+ err = driver_register(&mac80211_hwsim_driver);
+ if (err)
+ return err;
- driver_register(&mac80211_hwsim_driver);
+ hwsim_class = class_create(THIS_MODULE, "mac80211_hwsim");
+ if (IS_ERR(hwsim_class)) {
+ err = PTR_ERR(hwsim_class);
+ goto failed_unregister_driver;
+ }
memset(addr, 0, ETH_ALEN);
addr[0] = 0x02;
@@ -2529,6 +2533,7 @@ failed_drvdata:
ieee80211_free_hw(hw);
failed:
mac80211_hwsim_free();
+failed_unregister_driver:
driver_unregister(&mac80211_hwsim_driver);
return err;
}
johannes
^ permalink raw reply related
* pull request: wireless-next 2013-04-10
From: John W. Linville @ 2013-04-10 17:18 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 36306 bytes --]
Dave,
Please accept this pull request for the 3.10 stream...
Regarding the mac80211 bits, Johannes says:
"Here I have a bunch of minstrel fixes from Felix, per-interface
multicast filtering from Alex, set_tim debouncing from Ilan,
per-interface debugfs cleanups from Stanislaw, an error return fix from
Wei and a number of small improvements and fixes that I made myself."
And for the iwlwifi bits, Johannes says:
"Andrei changed an instance of kmalloc+memdup to kmemdup, Stanislaw
removed the now unused 5ghz_disable module parameter. I also have a
number of fixes from Ilan, Emmanuel and myself, Emmanuel also continued
working on Bluetooth coexistence."
For the sizeable batch of Bluetooth bits, Gustavo says:
"This is our first batch of patches for 3.10. The biggest changes of this pull
request are from Johan Hedberg, he implemented a HCI request framework to make
life easier when we have to send many HCI commands and a block and wait for
all of the to finish, we were able to fix a few issues in stack with the
introduction of this framework.
Other than that Dean Jenkins did a good work cleaning the RFCOMM code, the
refcnt infrastructure was removed and now we use NULL pointer checks to know
when a object was freed or not. That code was buggy and now it looks a way
better.
The rest of changes are clean ups, fixes and small improvements all over the
Bluetooth subsystem."
Regarding the wl12xx bits, Luca says:
"Some patches intended for 3.10. Mostly bug fixes and other small
improvements."
On top of that, there are updates to brcmfmac, brcmsmac, b43, ssb and
bcma, as well as mwifiex, rt2x00, and ath9k and a few others. The most
notable bit is the addition of a new driver in the rtlwifi family.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 953c96e0d85615d1ab1f100e525d376053294dc2:
tg3: Use bool not int (2013-04-09 17:07:52 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem
for you to fetch changes up to d3641409a05dcb8e28116bb2ad638f5a42805d9d:
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem (2013-04-10 10:39:27 -0400)
----------------------------------------------------------------
Alexander Bondar (1):
mac80211: add driver callback for per-interface multicast filter
Alexandru Gheorghiu (2):
Bluetooth: Use PTR_RET function
Bluetooth: Replaced kzalloc and memcpy with kmemdup
Andre Guedes (7):
Bluetooth: Rename hci_acl_disconn
Bluetooth: Fix __hci_req_sync
Bluetooth: Return ENODATA in hci_req_run
Bluetooth: Check hci_req_run returning value in __hci_req_sync
Bluetooth: HCI request error handling
Bluetooth: Make hci_req_add returning void
Bluetooth: Check req->err in hci_req_add
Andreas Fenkart (4):
mwifiex: correct wrong list in list_empty check
mwifiex: remove unused tid_tbl_lock from mwifiex_tid_tbl
mwifiex: fix infinite loop by removing NO_PKT_PRIO_TID
mwifiex: hold proper locks when accessing ra_list / bss_prio lists
Andrei Epure (1):
iwlwifi: use kmemdup instead of kmalloc+memcpy
Arend van Spriel (37):
brcmfmac: correct success flag passed by brcmf_sdbrcm_txpkt()
brcmfmac: minor optimization of brcmf_sdbrcm_txpkt() function
brcmfmac: use skb_cow() in brcmf_sdbrcm_txpkt() to assure alignment
brcmfmac: hookup firmware signalling to firmware interface events
brcmfmac: handle firmware signal for updating mac descriptor info
brcmfmac: add handler for credit map firmware events
brcmfmac: add firmware-signalling cleanup function
brcmfmac: allow stopping netif queue for different reasons
brcmfmac: add definitions for handling sk_buff control buffer data
brcmfmac: perform filtered firmware-signalling cleanup upon DEL_IF
brcmfmac: add firmware-signalling hanger functions
brcmfmac: add optional bus callback definition for tx queue cleanup
brcmfmac: add flow-control mode to firmware signalling
brcmfmac: enable tx status signalling
brcmfmac: fix handling sk_buff cleanup upon bus tx failure
brcmfmac: avoid error output in receive path
brcmfmac: add dedicated log level for low-level sdio debugging
brcmfmac: initialize struct brcmf_fws_info fields before iovar
brcmfmac: correct specified length from FIFOCREDITBACK signal
brcmfmac: move brcmf_fws_{de,}init() functions
brcmfmac: only allocate firmware-signalling resources if required
brcmfmac: no flow-control tlv signals when fcmode is NONE
brcmfmac: enable sk_buff queueing when credits deplete
brcmfmac: fix unaligned access in TXSTATUS signal handling
brcmfmac: handle firmware signalling destination entry state
brcmfmac: handle firmware signals requesting for packets
brcmfmac: add hexadecimal trace of message payload
brcmfmac: add role attribute to struct brcmf_if_event definition
brcmfmac: remove condition for calling event handler
brcmfmac: remove use of unconditional access of struct wireless_dev::netdev
brcmfmac: use struct brcmf_if instance as parameter in brcmf_set_mpc()
brcmfmac: use struct brcmf_if instance iso netdevice in escan functions
brcmfmac: support creation of P2P_DEVICE through user-space
brcmfmac: wait for firmware event when creating P2P_DEVICE interface
brcmfmac: fix reception of P2P probe requests on P2P_DEVICE interface
brcmfmac: obtain wdev using vif object in action frame rx
brcmfmac: only use ifidx from BDC header in brcmf_rx_frames()
Arik Nemtsov (8):
wlcore: fix link count in single-link-PSM optimization
wlcore: don't risk using stale HLID during .sta_state callback
wlcore: consolidate tx_seq handling on recovery
wlcore: change warn on missing lock in wlcore_queue_xx funcs
wlcore: free AP global links properly on recovery
wlcore: AP-mode - recover security seq num for stations
wlcore: correctly check state before regdomain conf
wlcore: consider dummy packets when tx queues are empty
Artem Savkov (1):
cfg80211: sched_scan_mtx lock in cfg80211_conn_work()
Avinash Patil (5):
mwifiex: do not enable PCIe interrupt in Power Save sleep state
mwifiex: avoid waking up device in awake state
mwifiex: use fw_status register to wake up PCIe card
mwifiex: change default tx/rx win_size for BA setup
mwifiex: use separate AMPDU tx/rx window sizes in 11ac networks
Ben Greear (1):
ath: Let user know which keycache method is complaining.
Bing Zhao (2):
mwifiex: complete last internal scan
mwifiex: fix negative cmd_pending count
Chen, Chien-Chia (1):
rtlwifi: rtl8188ee: Fix wrong header patch
Christian Lamparter (1):
carl9170: remove fast channel change feature
David Herrmann (2):
Bluetooth: discard bt_sock_unregister() errors
Bluetooth: change bt_sock_unregister() to return void
Dean Jenkins (6):
Bluetooth: Avoid rfcomm_session_timeout using freed session
Bluetooth: Check rfcomm session and DLC exists on socket close
Bluetooth: Return RFCOMM session ptrs to avoid freed session
Bluetooth: Remove RFCOMM session refcnt
Bluetooth: Remove redundant call to rfcomm_send_disc
Bluetooth: Remove redundant RFCOMM BT_CLOSED settings
Emmanuel Grumbach (8):
iwlwifi: mvm: MVM op_mode is supported on 7000 only
iwlwifi: mvm: fix the {ack,cts}_kill_msk
iwlwifi: mvm: don't support multi-channel inhibition
iwlwifi: mvm: print the flags in ALIVE notification
iwlwifi: add debug message when a CMD is dropped in RFKILL
iwlwifi: mvm: take the radio type / step / dash from TLVs
iwlwifi: mvm: take the valid_{rx,tx}_ant from the TLV
iwlwifi: mvm: tune the move to static SMPS due to BT load
Eyal Shapira (1):
wlcore: don't attempt to roam in case of p2p
Felix Fietkau (3):
mac80211/minstrel_ht: improve rate selection stability
mac80211/minstrel_ht: avoid useless sampling of high-probability slower rates
mac80211/minstrel_ht: do not sample actively used rates
Franky Lin (1):
brcmfmac: do not proceed if fail to download nvram to dongle
Gabor Juhos (4):
rt2x00: introduce rt2x00_set_{rt,rf} helpers
rt2x00: rt2800lib: separate RT and RF chipset detection
rt2x00: rt2800lib: probe RT chipset earlier
rt2x00: rt2x00pci: fix build error on Ralink RT3x5x SoCs
Hante Meuleman (4):
brcmfmac: fix tkip mic tx/rx ap swap bug.
brcmfmac: fix stopping AP.
brcmfmac: fix returning cipher_suite for get_key operation.
brcmfmac: determine the wiphy->bands property correctly.
Hauke Mehrtens (28):
b43: use bcma_chipco_gpio_control()
ssb: fix sprom constant for ant_available_{bg,a}
ssb: read additional sprom v2 and v3 attributes.
b43: remove warning for LP-PHY with sprom < 8
b43: use constants
brcmsmac: implement ieee80211_ops get_tsf and set_tsf
brcmsmac: add interface type to brcms_bss_cfg
brcmsmac: remove brcms_bss_cfg->BSS
brcmsmac: remove brcms_bss_cfg->associated
brcmsmac: remove brcms_bss_cfg->enable
brcmsmac: remove brcms_bss_cfg->up
brcmsmac: remove brcms_bss_cfg->cur_etheraddr
brcmsmac: remove brcms_pub->bcmerr
brcmsmac: write beacon period to hardware
brcmsmac: add beacon template support
brcmsmac: react on changing SSID
brcmsmac: add support for probe response template
brcmsmac: deactivate ucode sending probe responses
brcmsmac: activate AP support
brcmsmac: add support for adhoc mode
bcma: mark eromptr as __iomem
bcma: use BCMA_CC_PMU_CTL_* constants
bcma: handle more devices in bcma_pmu_get_alp_clock()
bcma: export bcma_chipco_get_alp_clock()
bcma: export some gpio functions
brcmsmac: remove some pmu functions and use the bcma equivalents
b43: mark some functions and structs static
b43: make struct b2056_inittabs_pts const
Igal Chernobelsky (2):
wlcore: enter elp in force ps mode in 5ms
wlcore: set max num of Rx BA sessions per chip
Ilan Peer (6):
mac80211: Call drv_set_tim only if there is a change
iwlwifi: mvm: Add beacon notification handler
iwlwifi: mvm: Remove obsolete queue definitions
iwlwifi: mvm: Fix quota handling for monitor interface
iwlwifi: mvm: Increase the max remain on channel time
iwlwifi: mvm: Add support for different ROC types
Joe Perches (1):
brcmsmac: Remove unused macro SI_MSG
Johan Hedberg (38):
Bluetooth: Rename hci_request to hci_req_sync
Bluetooth: Fix __hci_req_sync() handling of empty requests
Bluetooth: Split HCI init sequence into three stages
Bluetooth: Add initial skeleton for asynchronous HCI requests
Bluetooth: Refactor HCI command skb creation
Bluetooth: Introduce new hci_req_add function
Bluetooth: Fix stand-alone HCI command handling
Bluetooth: Add request cmd_complete and cmd_status functions
Bluetooth: Use async requests internally in hci_req_sync
Bluetooth: Remove unused hdev->init_last_cmd
Bluetooth: Remove empty HCI event handlers
Bluetooth: Fix endianness handling of cmd_status/complete opcodes
Bluetooth: Move power on HCI command updates to their own function
Bluetooth: Update mgmt powered HCI commands to use async requests
Bluetooth: Wait for HCI command completion with mgmt_set_powered
Bluetooth: Fix busy condition testing for EIR and class updates
Bluetooth: Fix UUID/class mgmt command response synchronization
Bluetooth: Remove useless HCI_PENDING_CLASS flag
Bluetooth: Add a define for the HCI persistent flags mask
Bluetooth: Clear non-persistent flags when closing HCI device
Bluetooth: Fix clearing flags on power off before notifying mgmt
Bluetooth: Fix waiting for EIR update when setting local name
Bluetooth: Handle AD updating through an async request
Bluetooth: Fix local name setting for LE-only controllers
Bluetooth: Fix setting local name to the existing value
Bluetooth: Use an async request for mgmt_set_connectable
Bluetooth: Fix fast connectable response sending
Bluetooth: Limit fast connectable support to >= 1.2 controllers
Bluetooth: Fix error response for simultaneous fast connectable commands
Bluetooth: Add proper flag for fast connectable mode
Bluetooth: Refactor fast connectable HCI commands
Bluetooth: Disable fast connectable when disabling connectable
Bluetooth: Add reading of page scan parameters
Bluetooth: Update page scan parameters after successful write commands
Bluetooth: Fix updating page scan parameters when not necessary
Bluetooth: Fix fast connectable state when enabling page scan
Bluetooth: Simplify address parameters of user_pairing_resp()
Bluetooth: Fix PIN/Confirm/Passkey response parameters
Johannes Berg (14):
mac80211: provide race-free 64-bit traffic counters
mac80211: provide ieee80211_sta_eosp()
mac80211: clean up key freeing a bit
mac80211: remove underscores from some key functions
mac80211: batch key free synchronize_net()
mac80211: remove a few set but unused variables
mac80211: pass queue bitmap to flush operation
mac80211: stop queues temporarily for flushing
mac80211_hwsim: assign CAB queue properly on interface type change
iwlwifi: mvm: suppress key error messages in AP mode
cfg80211: fix potential connection work crash
iwlwifi: mvm: specify filter flags in monitor mode
iwlwifi: mvm: fix WoWLAN RF-kill bug
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
John W. Linville (8):
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth-next
Merge branch 'for-linville' of git://git.kernel.org/.../luca/wl12xx
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem
Jonas Gorski (1):
mwl8k: always apply configuration even when device is idle
Jussi Kivilinna (4):
rtlwifi: usb: use usb_alloc_coherent for RX buffers
rtlwifi: usb: remove extra skb copy on RX path
rtlwifi: usb: defer rx processing to tasklet
rtlwifi: usb: add NET_IP_ALIGN padding to RX skb when needed
Karl Relton (1):
Bluetooth: Make hidp_get_raw_report abort if the session is terminating
Larry Finger (11):
rtlwifi Modify existing bits to match vendor version 2013.02.07
rtlwifi: rtl8192se: Update driver to match vendor driver of 2013.02.07
rtlwifi: rtl8723ae: Update to vendor driver of 2013.02.07
rtlwifi: rtl8192c: rtl8192ce: Update to vendor driver of 2013.02.07
rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue
rtlwifi: rtl8188ee: Add new driver
rtlwifi: rtl8192c: rtl8192ce: rtl8192cu: rtl8192de: rtl8723ae: Add changes required by adding rtl81988ee
rtlwifi: rtl8188ee: Enable recognition of RTL8188EE
rtlwifi: rtl8188ee: Enable build of new driver
rtlwifi: rtl8188ee: Fix linker warnings
rtlwifi: rtl8188ee: Fix allyesconfig build failures
Li Fei (1):
wl1251: call pm_runtime_put_sync in pm_runtime_get_sync failed case
Lubomir Rintel (1):
bluetooth: btmrvl_sdio: look for sd8688 firmware in proper location
Luciano Coelho (3):
wlcore: use print_hex_dump_debug()
wlcore: move handling from hardirq to the irq thread function
Merge branch 'wl12xx-next' into for-linville
Nadim Zubidat (1):
wlcore: report rssi from roaming statistics
Piotr Haber (3):
brcmfmac: avoid error output on header only packet
brcmfmac: read firmware console without trap indication
brcmfmac: firmware shared data version fix
Rafał Miłecki (4):
ssb: extract board_type from SPROM
bcma: extract board_type from SPROM
ssb: define more board types
bcma: define board types
Robert Shade (2):
Show actual timeout value in failed calibration messages.
ath9k: Re-enable interrupts after a channel change failure
Samuel Ortiz (1):
Revert "NFC: microread: Fix MEI build failure"
Stanislaw Gruszka (3):
mac80211: move sdata debugfs dir to vif
mac80211: remove vif debugfs driver callbacks
iwlwifi: remove 5ghz_disable option
Tim Gardner (1):
rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
Victor Goldenshtein (1):
wl18xx: print chip info during boot
Wei Yongjun (2):
cfg80211: fix error return code in cfg80211_init()
Bluetooth: fix error return code in rfcomm_add_listener()
Yogesh Ashok Powar (1):
mwifiex: add support to configure VHT for AP mode
Zefir Kurtisi (4):
ath9k: trivial: change spectral relayfs buffering
ath9k: add interface combinations for DFS master
ath9k: add debugfs based DFS radar simulation
ath9k: add support for DFS master mode
Documentation/DocBook/80211.tmpl | 2 +-
drivers/bcma/driver_chipcommon.c | 5 +-
drivers/bcma/driver_chipcommon_pmu.c | 34 +-
drivers/bcma/scan.c | 16 +-
drivers/bcma/sprom.c | 1 +
drivers/bluetooth/btmrvl_sdio.c | 8 +-
drivers/net/wireless/ath/ar5523/ar5523.c | 2 +-
drivers/net/wireless/ath/ath9k/ar9002_calib.c | 9 +-
drivers/net/wireless/ath/ath9k/ar9003_calib.c | 3 +-
drivers/net/wireless/ath/ath9k/debug.c | 2 +-
drivers/net/wireless/ath/ath9k/dfs.c | 4 +-
drivers/net/wireless/ath/ath9k/dfs_debug.c | 20 +
drivers/net/wireless/ath/ath9k/hw.c | 3 +
drivers/net/wireless/ath/ath9k/init.c | 36 +-
drivers/net/wireless/ath/ath9k/main.c | 31 +-
drivers/net/wireless/ath/ath9k/recv.c | 7 +
drivers/net/wireless/ath/carl9170/carl9170.h | 8 +-
drivers/net/wireless/ath/carl9170/debug.c | 2 +-
drivers/net/wireless/ath/carl9170/main.c | 4 +-
drivers/net/wireless/ath/carl9170/phy.c | 81 +-
drivers/net/wireless/ath/key.c | 9 +-
drivers/net/wireless/b43/b43.h | 2 +
drivers/net/wireless/b43/main.c | 23 +-
drivers/net/wireless/b43/phy_lp.c | 12 +-
drivers/net/wireless/b43/phy_n.c | 6 +-
drivers/net/wireless/b43/radio_2056.c | 6 +-
drivers/net/wireless/b43/sdio.h | 4 +-
drivers/net/wireless/b43/tables_nphy.c | 4 +-
drivers/net/wireless/b43/tables_phy_lcn.c | 6 +-
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 30 +-
.../net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 60 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 33 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h | 13 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c | 4 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c | 50 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h | 21 +
.../net/wireless/brcm80211/brcmfmac/dhd_linux.c | 116 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 117 +-
drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 25 +-
drivers/net/wireless/brcm80211/brcmfmac/fweh.h | 6 +-
drivers/net/wireless/brcm80211/brcmfmac/fwil.c | 1 +
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 1805 +++++++++++++-
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.h | 8 +
drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 190 +-
.../net/wireless/brcm80211/brcmfmac/tracepoint.h | 14 +
.../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 495 ++--
.../net/wireless/brcm80211/brcmfmac/wl_cfg80211.h | 11 +-
drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | 6 -
drivers/net/wireless/brcm80211/brcmsmac/d11.h | 1 +
.../net/wireless/brcm80211/brcmsmac/mac80211_if.c | 87 +-
drivers/net/wireless/brcm80211/brcmsmac/main.c | 362 ++-
drivers/net/wireless/brcm80211/brcmsmac/main.h | 25 +-
.../net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c | 40 +-
.../net/wireless/brcm80211/brcmsmac/phy/phy_int.h | 1 -
.../net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 35 +-
.../net/wireless/brcm80211/brcmsmac/phy/phy_n.c | 14 +-
drivers/net/wireless/brcm80211/brcmsmac/pmu.c | 54 -
drivers/net/wireless/brcm80211/brcmsmac/pmu.h | 6 -
drivers/net/wireless/brcm80211/brcmsmac/pub.h | 17 +-
.../net/wireless/brcm80211/include/brcmu_wifi.h | 28 +-
drivers/net/wireless/iwlegacy/common.c | 3 +-
drivers/net/wireless/iwlegacy/common.h | 2 +-
drivers/net/wireless/iwlwifi/dvm/mac80211.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-drv.c | 4 -
drivers/net/wireless/iwlwifi/iwl-fw.h | 25 +
drivers/net/wireless/iwlwifi/iwl-modparams.h | 2 -
drivers/net/wireless/iwlwifi/iwl-test.c | 3 +-
drivers/net/wireless/iwlwifi/mvm/bt-coex.c | 21 +-
drivers/net/wireless/iwlwifi/mvm/d3.c | 10 +-
drivers/net/wireless/iwlwifi/mvm/fw-api-tx.h | 6 +
drivers/net/wireless/iwlwifi/mvm/fw-api.h | 38 +-
drivers/net/wireless/iwlwifi/mvm/fw.c | 23 +-
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 30 +-
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 29 +-
drivers/net/wireless/iwlwifi/mvm/mvm.h | 15 +-
drivers/net/wireless/iwlwifi/mvm/nvm.c | 136 +-
drivers/net/wireless/iwlwifi/mvm/ops.c | 36 +-
drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c | 7 +-
drivers/net/wireless/iwlwifi/mvm/quota.c | 3 +-
drivers/net/wireless/iwlwifi/mvm/scan.c | 4 +-
drivers/net/wireless/iwlwifi/mvm/time-event.c | 38 +-
drivers/net/wireless/iwlwifi/mvm/time-event.h | 3 +-
drivers/net/wireless/iwlwifi/mvm/tx.c | 10 +-
drivers/net/wireless/iwlwifi/pcie/tx.c | 5 +-
drivers/net/wireless/mac80211_hwsim.c | 8 +-
drivers/net/wireless/mwifiex/11ac.c | 41 +
drivers/net/wireless/mwifiex/11ac.h | 17 +
drivers/net/wireless/mwifiex/11n.c | 22 +
drivers/net/wireless/mwifiex/cfg80211.c | 12 +
drivers/net/wireless/mwifiex/cmdevt.c | 35 +-
drivers/net/wireless/mwifiex/decl.h | 11 +-
drivers/net/wireless/mwifiex/fw.h | 11 +
drivers/net/wireless/mwifiex/init.c | 6 +-
drivers/net/wireless/mwifiex/ioctl.h | 8 +
drivers/net/wireless/mwifiex/join.c | 23 +
drivers/net/wireless/mwifiex/main.h | 13 +-
drivers/net/wireless/mwifiex/pcie.c | 47 +-
drivers/net/wireless/mwifiex/scan.c | 11 +-
drivers/net/wireless/mwifiex/sta_cmd.c | 4 +
drivers/net/wireless/mwifiex/sta_cmdresp.c | 4 +-
drivers/net/wireless/mwifiex/sta_ioctl.c | 3 -
drivers/net/wireless/mwifiex/uap_cmd.c | 55 +
drivers/net/wireless/mwifiex/util.c | 1 -
drivers/net/wireless/mwifiex/wmm.c | 76 +-
drivers/net/wireless/mwl8k.c | 10 +-
drivers/net/wireless/p54/main.c | 2 +-
drivers/net/wireless/rt2x00/Kconfig | 7 +
drivers/net/wireless/rt2x00/Makefile | 1 +
drivers/net/wireless/rt2x00/rt2400pci.c | 1 +
drivers/net/wireless/rt2x00/rt2500pci.c | 1 +
drivers/net/wireless/rt2x00/rt2800lib.c | 92 +-
drivers/net/wireless/rt2x00/rt2800pci.c | 1 +
drivers/net/wireless/rt2x00/rt2x00.h | 19 +-
drivers/net/wireless/rt2x00/rt2x00mac.c | 2 +-
drivers/net/wireless/rt2x00/rt2x00mmio.c | 216 ++
drivers/net/wireless/rt2x00/rt2x00mmio.h | 119 +
drivers/net/wireless/rt2x00/rt2x00pci.c | 174 --
drivers/net/wireless/rt2x00/rt2x00pci.h | 88 -
drivers/net/wireless/rt2x00/rt61pci.c | 1 +
drivers/net/wireless/rtlwifi/Kconfig | 9 +
drivers/net/wireless/rtlwifi/Makefile | 1 +
drivers/net/wireless/rtlwifi/base.c | 379 ++-
drivers/net/wireless/rtlwifi/base.h | 14 +-
drivers/net/wireless/rtlwifi/core.c | 215 +-
drivers/net/wireless/rtlwifi/debug.c | 5 +-
drivers/net/wireless/rtlwifi/debug.h | 13 +-
drivers/net/wireless/rtlwifi/efuse.c | 53 +-
drivers/net/wireless/rtlwifi/efuse.h | 1 -
drivers/net/wireless/rtlwifi/pci.c | 150 +-
drivers/net/wireless/rtlwifi/pci.h | 2 +
drivers/net/wireless/rtlwifi/ps.c | 330 ++-
drivers/net/wireless/rtlwifi/ps.h | 2 +
drivers/net/wireless/rtlwifi/rtl8188ee/Makefile | 16 +
drivers/net/wireless/rtlwifi/rtl8188ee/def.h | 324 +++
drivers/net/wireless/rtlwifi/rtl8188ee/dm.c | 1794 ++++++++++++++
drivers/net/wireless/rtlwifi/rtl8188ee/dm.h | 326 +++
drivers/net/wireless/rtlwifi/rtl8188ee/fw.c | 830 +++++++
drivers/net/wireless/rtlwifi/rtl8188ee/fw.h | 301 +++
drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 2530 ++++++++++++++++++++
drivers/net/wireless/rtlwifi/rtl8188ee/hw.h | 68 +
drivers/net/wireless/rtlwifi/rtl8188ee/led.c | 157 ++
drivers/net/wireless/rtlwifi/rtl8188ee/led.h | 38 +
drivers/net/wireless/rtlwifi/rtl8188ee/phy.c | 2202 +++++++++++++++++
drivers/net/wireless/rtlwifi/rtl8188ee/phy.h | 236 ++
drivers/net/wireless/rtlwifi/rtl8188ee/pwrseq.c | 109 +
drivers/net/wireless/rtlwifi/rtl8188ee/pwrseq.h | 327 +++
drivers/net/wireless/rtlwifi/rtl8188ee/pwrseqcmd.c | 140 ++
drivers/net/wireless/rtlwifi/rtl8188ee/pwrseqcmd.h | 97 +
drivers/net/wireless/rtlwifi/rtl8188ee/reg.h | 2258 +++++++++++++++++
drivers/net/wireless/rtlwifi/rtl8188ee/rf.c | 467 ++++
drivers/net/wireless/rtlwifi/rtl8188ee/rf.h | 46 +
drivers/net/wireless/rtlwifi/rtl8188ee/sw.c | 400 ++++
drivers/net/wireless/rtlwifi/rtl8188ee/sw.h | 36 +
drivers/net/wireless/rtlwifi/rtl8188ee/table.c | 643 +++++
drivers/net/wireless/rtlwifi/rtl8188ee/table.h | 47 +
drivers/net/wireless/rtlwifi/rtl8188ee/trx.c | 817 +++++++
drivers/net/wireless/rtlwifi/rtl8188ee/trx.h | 795 ++++++
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 101 +-
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 99 +-
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.h | 4 +
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 118 +-
drivers/net/wireless/rtlwifi/rtl8192ce/hw.h | 4 +
drivers/net/wireless/rtlwifi/rtl8192ce/reg.h | 1 +
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 4 +-
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 324 +--
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 20 +-
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192de/dm.c | 32 +-
drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 40 +-
drivers/net/wireless/rtlwifi/rtl8192de/reg.h | 2 +-
drivers/net/wireless/rtlwifi/rtl8192de/sw.c | 6 +-
drivers/net/wireless/rtlwifi/rtl8192se/def.h | 7 -
drivers/net/wireless/rtlwifi/rtl8192se/dm.c | 49 +-
drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 150 +-
drivers/net/wireless/rtlwifi/rtl8192se/hw.h | 3 +-
drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 61 +-
drivers/net/wireless/rtlwifi/rtl8192se/phy.h | 1 +
drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 3 +-
drivers/net/wireless/rtlwifi/rtl8192se/trx.c | 296 +--
drivers/net/wireless/rtlwifi/rtl8723ae/dm.c | 88 +-
drivers/net/wireless/rtlwifi/rtl8723ae/dm.h | 6 +
drivers/net/wireless/rtlwifi/rtl8723ae/fw.c | 97 +-
drivers/net/wireless/rtlwifi/rtl8723ae/fw.h | 7 +-
drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 70 +-
drivers/net/wireless/rtlwifi/rtl8723ae/led.c | 22 +-
drivers/net/wireless/rtlwifi/rtl8723ae/sw.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c | 10 +-
drivers/net/wireless/rtlwifi/usb.c | 220 +-
drivers/net/wireless/rtlwifi/usb.h | 5 +-
drivers/net/wireless/rtlwifi/wifi.h | 221 +-
drivers/net/wireless/ti/wl1251/sdio.c | 4 +-
drivers/net/wireless/ti/wl12xx/main.c | 1 +
drivers/net/wireless/ti/wl12xx/wl12xx.h | 2 +
drivers/net/wireless/ti/wl18xx/main.c | 25 +-
drivers/net/wireless/ti/wl18xx/reg.h | 29 +
drivers/net/wireless/ti/wl18xx/wl18xx.h | 4 +-
drivers/net/wireless/ti/wlcore/acx.c | 29 +
drivers/net/wireless/ti/wlcore/acx.h | 16 +-
drivers/net/wireless/ti/wlcore/cmd.c | 32 +
drivers/net/wireless/ti/wlcore/debug.h | 33 +-
drivers/net/wireless/ti/wlcore/debugfs.c | 3 +-
drivers/net/wireless/ti/wlcore/event.c | 9 +-
drivers/net/wireless/ti/wlcore/main.c | 200 +-
drivers/net/wireless/ti/wlcore/ps.c | 4 +-
drivers/net/wireless/ti/wlcore/tx.c | 39 +-
drivers/net/wireless/ti/wlcore/wlcore.h | 3 +
drivers/net/wireless/ti/wlcore/wlcore_i.h | 29 +-
drivers/ssb/pci.c | 23 +-
include/linux/bcma/bcma.h | 54 +
include/linux/bcma/bcma_driver_chipcommon.h | 3 +
include/linux/ssb/ssb.h | 54 +-
include/linux/ssb/ssb_regs.h | 10 +-
include/net/bluetooth/bluetooth.h | 12 +-
include/net/bluetooth/hci.h | 21 +-
include/net/bluetooth/hci_core.h | 28 +-
include/net/bluetooth/rfcomm.h | 6 -
include/net/mac80211.h | 68 +-
net/bluetooth/a2mp.c | 6 +-
net/bluetooth/af_bluetooth.c | 15 +-
net/bluetooth/bnep/sock.c | 4 +-
net/bluetooth/cmtp/sock.c | 4 +-
net/bluetooth/hci_conn.c | 4 +-
net/bluetooth/hci_core.c | 727 +++++-
net/bluetooth/hci_event.c | 605 +----
net/bluetooth/hci_sock.c | 9 +-
net/bluetooth/hci_sysfs.c | 4 +-
net/bluetooth/hidp/core.c | 4 +
net/bluetooth/hidp/sock.c | 4 +-
net/bluetooth/l2cap_sock.c | 4 +-
net/bluetooth/mgmt.c | 680 ++++--
net/bluetooth/rfcomm/core.c | 167 +-
net/bluetooth/rfcomm/sock.c | 3 +-
net/bluetooth/sco.c | 3 +-
net/mac80211/cfg.c | 29 +-
net/mac80211/debugfs_key.c | 10 +-
net/mac80211/debugfs_netdev.c | 22 +-
net/mac80211/driver-ops.h | 60 +-
net/mac80211/ieee80211_i.h | 11 +-
net/mac80211/iface.c | 17 +-
net/mac80211/key.c | 129 +-
net/mac80211/key.h | 15 +-
net/mac80211/main.c | 22 +-
net/mac80211/mesh.c | 5 +-
net/mac80211/mlme.c | 12 +-
net/mac80211/offchannel.c | 8 +-
net/mac80211/pm.c | 6 +-
net/mac80211/rc80211_minstrel_ht.c | 24 +-
net/mac80211/scan.c | 7 +-
net/mac80211/sta_info.c | 54 +-
net/mac80211/sta_info.h | 9 +-
net/mac80211/trace.h | 35 +-
net/mac80211/tx.c | 8 +-
net/mac80211/util.c | 48 +-
net/wireless/core.c | 4 +-
net/wireless/core.h | 2 -
net/wireless/sme.c | 4 +-
258 files changed, 23446 insertions(+), 3958 deletions(-)
create mode 100644 drivers/net/wireless/rt2x00/rt2x00mmio.c
create mode 100644 drivers/net/wireless/rt2x00/rt2x00mmio.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/Makefile
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/def.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/dm.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/dm.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/fw.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/fw.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/led.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/led.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/phy.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/pwrseq.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/pwrseq.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/pwrseqcmd.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/pwrseqcmd.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/reg.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/rf.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/rf.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/sw.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/table.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/table.h
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/trx.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8188ee/trx.h
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] kernel: audit: beautify code, for extern function, better to check its parameters by itself
From: Eric Paris @ 2013-04-10 17:31 UTC (permalink / raw)
To: Chen Gang; +Cc: Al Viro, David Miller, linux-kernel, netdev
In-Reply-To: <5161347B.8090604@asianux.com>
----- Original Message -----
>
> __audit_socketcall is an extern function.
> better to check its parameters by itself.
>
> also can return error code, when fail (find invalid parameters).
> also use macro instead of real hard code number
> also give related comments for it.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> include/linux/audit.h | 12 ++++++++----
> kernel/auditsc.c | 9 ++++++---
> net/socket.c | 6 ++++--
> 3 files changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> @@ -354,7 +358,7 @@ static inline int audit_bprm(struct linux_binprm *bprm)
> {
> return 0;
> }
> -static inline void audit_socketcall(int nargs, unsigned long *args)
> +static inline int audit_socketcall(int nargs, unsigned long *args)
> { }
> static inline void audit_fd_pair(int fd1, int fd2)
> { }
This now returns a value but you forgot to return a value. Thus this would not even build... I fixed it up myself.
-Eric
^ permalink raw reply
* [PATCH] net: mvmdio: add clocks property to binding documentation
From: Sebastian Hesselbarth @ 2013-04-10 17:36 UTC (permalink / raw)
To: Sebastian Hesselbarth
Cc: Grant Likely, Rob Herring, Rob Landley, David S. Miller,
Florian Fainelli, Thomas Petazzoni, Greg Kroah-Hartman, netdev,
devicetree-discuss, linux-doc, linux-kernel
Patch "net: mvmdio: get and enable optional clock" was missing an
update of the corresponding device tree binding documentation. This
patch adds the clocks property to mvmdio binding documentation.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Rob Landley <rob@landley.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: netdev@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Documentation/devicetree/bindings/net/marvell-orion-mdio.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
index 052b5f2..9417e54 100644
--- a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
+++ b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
@@ -11,6 +11,7 @@ Required properties:
Optional properties:
- interrupts: interrupt line number for the SMI error/done interrupt
+- clocks: Phandle to the clock control device and gate bit
The child nodes of the MDIO driver are the individual PHY devices
connected to this MDIO bus. They must have a "reg" property given the
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH net-next] ptp: dynamic allocation of PHC char devices
From: Ben Hutchings @ 2013-04-10 17:37 UTC (permalink / raw)
To: Jiri Benc; +Cc: netdev, Richard Cochran
In-Reply-To: <4a1dcbcfb28ea2d18b09561a370efe7a4b0a2c5f.1365590805.git.jbenc@redhat.com>
On Wed, 2013-04-10 at 12:47 +0200, Jiri Benc wrote:
> As network adapters supporting PTP are becoming more common, machines with
> many NICs suddenly have many PHCs, too. The current limit of eight /dev/ptp*
> char devices (and thus, 8 network interfaces with PHC) is insufficient. Let
> the ptp driver allocate the char devices dynamically.
>
> The character devices are allocated in chunks. idr is used for tracking
> minor numbers allocation; the mapping from index to pointer is not used, as
> it is not needed for posix clocks.
[...]
I don't understand why you want to dynamically allocate chunks of minor
numbers, rather than the full range. Unused minors don't seem to cost
anything.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* [PATCH] net: mv643xx_eth: add shared clk and cleanup existing clk handling
From: Sebastian Hesselbarth @ 2013-04-10 17:37 UTC (permalink / raw)
To: Sebastian Hesselbarth
Cc: Grant Likely, Rob Herring, Rob Landley, Lennert Buytenhek,
Andrew Lunn, Jason Cooper, Florian Fainelli, devicetree-discuss,
linux-doc, linux-kernel, netdev
This patch adds an optional shared block clock to avoid lockups on
clock gated controllers. Besides the new clock, clock handling for
existing clocks is cleaned up and moved to devm_clk_get. Device
tree binding documentation is updated for the new clocks property.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Rob Landley <rob@landley.net>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
---
Documentation/devicetree/bindings/marvell.txt | 3 +++
drivers/net/ethernet/marvell/mv643xx_eth.c | 27 ++++++++++---------------
2 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/Documentation/devicetree/bindings/marvell.txt b/Documentation/devicetree/bindings/marvell.txt
index f1533d9..f7a0da6 100644
--- a/Documentation/devicetree/bindings/marvell.txt
+++ b/Documentation/devicetree/bindings/marvell.txt
@@ -115,6 +115,9 @@ prefixed with the string "marvell,", for Marvell Technology Group Ltd.
- compatible : "marvell,mv64360-eth-block"
- reg : Offset and length of the register set for this block
+ Optional properties:
+ - clocks : Phandle to the clock control device and gate bit
+
Example Discovery Ethernet block node:
ethernet-block@2000 {
#address-cells = <1>;
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index aedbd82..bbe6104 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -268,7 +268,7 @@ struct mv643xx_eth_shared_private {
int extended_rx_coal_limit;
int tx_bw_control;
int tx_csum_limit;
-
+ struct clk *clk;
};
#define TX_BW_CONTROL_ABSENT 0
@@ -410,9 +410,7 @@ struct mv643xx_eth_private {
/*
* Hardware-specific parameters.
*/
-#if defined(CONFIG_HAVE_CLK)
struct clk *clk;
-#endif
unsigned int t_clk;
};
@@ -2569,6 +2567,10 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
if (msp->base == NULL)
goto out_free;
+ msp->clk = devm_clk_get(&pdev->dev, NULL);
+ if (!IS_ERR(msp->clk))
+ clk_prepare_enable(msp->clk);
+
/*
* (Re-)program MBUS remapping windows if we are asked to.
*/
@@ -2595,6 +2597,8 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev)
struct mv643xx_eth_shared_private *msp = platform_get_drvdata(pdev);
iounmap(msp->base);
+ if (!IS_ERR(msp->clk))
+ clk_disable_unprepare(msp->clk);
kfree(msp);
return 0;
@@ -2801,13 +2805,12 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
* it to override the default.
*/
mp->t_clk = 133000000;
-#if defined(CONFIG_HAVE_CLK)
- mp->clk = clk_get(&pdev->dev, (pdev->id ? "1" : "0"));
+ mp->clk = devm_clk_get(&pdev->dev, NULL);
if (!IS_ERR(mp->clk)) {
clk_prepare_enable(mp->clk);
mp->t_clk = clk_get_rate(mp->clk);
}
-#endif
+
set_params(mp, pd);
netif_set_real_num_tx_queues(dev, mp->txq_count);
netif_set_real_num_rx_queues(dev, mp->rxq_count);
@@ -2889,12 +2892,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
return 0;
out:
-#if defined(CONFIG_HAVE_CLK)
- if (!IS_ERR(mp->clk)) {
+ if (!IS_ERR(mp->clk))
clk_disable_unprepare(mp->clk);
- clk_put(mp->clk);
- }
-#endif
free_netdev(dev);
return err;
@@ -2909,12 +2908,8 @@ static int mv643xx_eth_remove(struct platform_device *pdev)
phy_detach(mp->phy);
cancel_work_sync(&mp->tx_timeout_task);
-#if defined(CONFIG_HAVE_CLK)
- if (!IS_ERR(mp->clk)) {
+ if (!IS_ERR(mp->clk))
clk_disable_unprepare(mp->clk);
- clk_put(mp->clk);
- }
-#endif
free_netdev(mp->dev);
--
1.7.10.4
^ permalink raw reply related
* [PATCH] net: mv643xx_eth: use managed devm_kzalloc
From: Sebastian Hesselbarth @ 2013-04-10 17:38 UTC (permalink / raw)
To: Sebastian Hesselbarth
Cc: Lennert Buytenhek, Andrew Lunn, Jason Cooper, Florian Fainelli,
netdev, linux-kernel
This patch moves shared private data kzalloc to managed devm_kzalloc and
cleans now unneccessary kfree and error handling.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Note that there is also an ioremap call, that could be transferred to
devm_ioremap_resource. But as long as mv643xx_eth and mvmdio iomem
resources overlap, this will throw -EBUSY.
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/net/ethernet/marvell/mv643xx_eth.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index bbe6104..955baab 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2547,25 +2547,22 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
struct mv643xx_eth_shared_private *msp;
const struct mbus_dram_target_info *dram;
struct resource *res;
- int ret;
if (!mv643xx_eth_version_printed++)
pr_notice("MV-643xx 10/100/1000 ethernet driver version %s\n",
mv643xx_eth_driver_version);
- ret = -EINVAL;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res == NULL)
- goto out;
+ return -EINVAL;
- ret = -ENOMEM;
- msp = kzalloc(sizeof(*msp), GFP_KERNEL);
+ msp = devm_kzalloc(&pdev->dev, sizeof(*msp), GFP_KERNEL);
if (msp == NULL)
- goto out;
+ return -ENOMEM;
msp->base = ioremap(res->start, resource_size(res));
if (msp->base == NULL)
- goto out_free;
+ return -EADDRNOTAVAIL;
msp->clk = devm_clk_get(&pdev->dev, NULL);
if (!IS_ERR(msp->clk))
@@ -2585,11 +2582,6 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, msp);
return 0;
-
-out_free:
- kfree(msp);
-out:
- return ret;
}
static int mv643xx_eth_shared_remove(struct platform_device *pdev)
@@ -2599,7 +2591,6 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev)
iounmap(msp->base);
if (!IS_ERR(msp->clk))
clk_disable_unprepare(msp->clk);
- kfree(msp);
return 0;
}
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH net-next 04/11] tg3: Add a warning during link settings change if mgmt enabled
From: Nithin Nayak Sujir @ 2013-04-10 15:06 UTC (permalink / raw)
To: Ben Hutchings; +Cc: davem, netdev, mchan
In-Reply-To: <1365598609.2581.8.camel@bwh-desktop.uk.solarflarecom.com>
On 4/10/2013 5:56 AM, Ben Hutchings wrote:
> On Tue, 2013-04-09 at 11:48 -0700, Nithin Nayak Sujir wrote:
>> When the user executes certain ethtool commands such as -s, -A, -G, -L,
>> -r a phy reset or autonegotiate is performed which results in management
>> traffic being interrupted.
>>
>> Add a warning in these cases.
>
> It seems entirely obvious that PHY reconfiguration will break the link
> and stop all traffic until the link is re-established; this is nothing
> specific to this driver. Is it more disruptive to management traffic on
> these controllers? Unless it is, I think this is not a helpful warning.
This goes in conjunction with the Link Flap Avoidance feature introduced
in this patchset. For the LFA feature the driver skips the normal phy
resets and speed changes to maintain the link. The expectation now is
that mgmt traffic is never interrupted even if the interface is brought
down or the system rebooted/suspended etc.
Except, in these cases where the user forces a phy change we don't
prevent it. We let the user go ahead with the config change but it does
flap the link. It's useful to have this event logged to let the user
know the flap was intentional.
To simplify the conditional, we don't limit it to only LFA enabled
devices since it doesn't hurt to have it.
>
> Ben.
>
>> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
>> Signed-off-by: Michael Chan <mchan@broadcom.com>
>> ---
>> drivers/net/ethernet/broadcom/tg3.c | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
>> index 3f0d43f..a744998 100644
>> --- a/drivers/net/ethernet/broadcom/tg3.c
>> +++ b/drivers/net/ethernet/broadcom/tg3.c
>> @@ -2531,6 +2531,13 @@ static void tg3_carrier_off(struct tg3 *tp)
>> tp->link_up = false;
>> }
>>
>> +static void tg3_warn_mgmt_link_flap(struct tg3 *tp)
>> +{
>> + if (tg3_flag(tp, ENABLE_ASF))
>> + netdev_warn(tp->dev,
>> + "Management side-band traffic will be interrupted during phy settings change\n");
>> +}
>> +
>> /* This will reset the tigon3 PHY if there is no valid
>> * link unless the FORCE argument is non-zero.
>> */
>> @@ -11565,6 +11572,8 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
>> tp->link_config.duplex = cmd->duplex;
>> }
>>
>> + tg3_warn_mgmt_link_flap(tp);
>> +
>> if (netif_running(dev))
>> tg3_setup_phy(tp, 1);
>>
>> @@ -11643,6 +11652,8 @@ static int tg3_nway_reset(struct net_device *dev)
>> if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)
>> return -EINVAL;
>>
>> + tg3_warn_mgmt_link_flap(tp);
>> +
>> if (tg3_flag(tp, USE_PHYLIB)) {
>> if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED))
>> return -EAGAIN;
>> @@ -11755,6 +11766,9 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
>> struct tg3 *tp = netdev_priv(dev);
>> int err = 0;
>>
>> + if (tp->link_config.autoneg == AUTONEG_ENABLE)
>> + tg3_warn_mgmt_link_flap(tp);
>> +
>> if (tg3_flag(tp, USE_PHYLIB)) {
>> u32 newadv;
>> struct phy_device *phydev;
>
^ permalink raw reply
* Re: [PATCH net-next] ptp: dynamic allocation of PHC char devices
From: David Miller @ 2013-04-10 17:49 UTC (permalink / raw)
To: bhutchings; +Cc: jbenc, netdev, richardcochran
In-Reply-To: <1365615436.2581.15.camel@bwh-desktop.uk.solarflarecom.com>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 10 Apr 2013 18:37:16 +0100
> On Wed, 2013-04-10 at 12:47 +0200, Jiri Benc wrote:
>> As network adapters supporting PTP are becoming more common, machines with
>> many NICs suddenly have many PHCs, too. The current limit of eight /dev/ptp*
>> char devices (and thus, 8 network interfaces with PHC) is insufficient. Let
>> the ptp driver allocate the char devices dynamically.
>>
>> The character devices are allocated in chunks. idr is used for tracking
>> minor numbers allocation; the mapping from index to pointer is not used, as
>> it is not needed for posix clocks.
> [...]
>
> I don't understand why you want to dynamically allocate chunks of minor
> numbers, rather than the full range. Unused minors don't seem to cost
> anything.
Can't multiple (unrelated) devices carve out minor space in the same
major? Isn't that why it's designed this way?
^ permalink raw reply
* Jitter and latency benchmarks with netlink / nl80211
From: Luis R. Rodriguez @ 2013-04-10 17:55 UTC (permalink / raw)
To: linux-wireless
Cc: linux-kernel@vger.kernel.org, Ben Greear, netdev@vger.kernel.org
Curious if anyone has worked on latency and jitter benchmarks in using
netlink, specifically with nl80211. Has anyone benchmarked this? Ben,
have you? If not for nl80211 perhaps this has been done before for
other netlink families?
Luis
^ permalink raw reply
* Re: Jitter and latency benchmarks with netlink / nl80211
From: Ben Greear @ 2013-04-10 17:59 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: linux-wireless, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
In-Reply-To: <CAB=NE6XH8wGbFhmB54Y0BUB2N-PbzUBvN+arH5F_BAkEa=DjUw@mail.gmail.com>
On 04/10/2013 10:55 AM, Luis R. Rodriguez wrote:
> Curious if anyone has worked on latency and jitter benchmarks in using
> netlink, specifically with nl80211. Has anyone benchmarked this? Ben,
> have you? If not for nl80211 perhaps this has been done before for
> other netlink families?
You mean timing related to netlink configuration/report requests?
We have lots of ways to measure wifi packet throughput latencies
and jitter (to/from userspace and/or to/from pktgen), but it doesn't use
netlink....
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: Jitter and latency benchmarks with netlink / nl80211
From: Luis R. Rodriguez @ 2013-04-10 18:05 UTC (permalink / raw)
To: Ben Greear
Cc: linux-wireless, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
In-Reply-To: <5165A874.50804@candelatech.com>
On Wed, Apr 10, 2013 at 10:59 AM, Ben Greear <greearb@candelatech.com> wrote:
> On 04/10/2013 10:55 AM, Luis R. Rodriguez wrote:
>>
>> Curious if anyone has worked on latency and jitter benchmarks in using
>> netlink, specifically with nl80211. Has anyone benchmarked this? Ben,
>> have you? If not for nl80211 perhaps this has been done before for
>> other netlink families?
>
>
> You mean timing related to netlink configuration/report requests?
Yes.
> We have lots of ways to measure wifi packet throughput latencies
> and jitter (to/from userspace and/or to/from pktgen), but it doesn't use
> netlink....
Not looking for latency / jitter for 802.11, but for the core nl80211 messages.
Luis
^ permalink raw reply
* Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active
From: Oliver Neukum @ 2013-04-10 18:10 UTC (permalink / raw)
To: Dan Williams
Cc: Ming Lei, Elina Pasheva, Network Development, linux-usb,
Rory Filer, Phil Sutter
In-Reply-To: <1365606080.28888.72.camel@dcbw.foobar.com>
On Wednesday 10 April 2013 10:01:20 Dan Williams wrote:
> On Wed, 2013-04-10 at 15:58 +0200, Oliver Neukum wrote:
> > On Wednesday 10 April 2013 08:54:43 Dan Williams wrote:
> > > > The refcounting is very good. Just don't mess around with "force"
> > >
> > > That's easy to do if the helpers aren't used for suspend/resume, which
> > > is what I had previously in my v2 patches until Ming suggested that I
> > > use the helpers there. I can go back to that approach if you'd like, it
> > > is a bit less complicated at the expense of sprinkling the interrupt urb
> > > submit/kill code around more widely.
> >
> > If you introduce a third helper like "forcibly_stop_interrupt" or something,
> > I'll be perfectly happy. Just don't use flags which completely alter behavior.
> >
> > Regards
> > Oliver
>
> Do you mean something more like this? If so, I'll go ahead and do the
> formal submission. Thanks!
That looks good and ready.
Regards
Oliver
^ permalink raw reply
* Re: Jitter and latency benchmarks with netlink / nl80211
From: Ben Greear @ 2013-04-10 18:10 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: linux-wireless, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
In-Reply-To: <CAB=NE6U_0E+y8jc_0O3+9pmUyLXX9CuSMYMMWk__4Q8-+-AHTg@mail.gmail.com>
On 04/10/2013 11:05 AM, Luis R. Rodriguez wrote:
> On Wed, Apr 10, 2013 at 10:59 AM, Ben Greear <greearb@candelatech.com> wrote:
>> On 04/10/2013 10:55 AM, Luis R. Rodriguez wrote:
>>>
>>> Curious if anyone has worked on latency and jitter benchmarks in using
>>> netlink, specifically with nl80211. Has anyone benchmarked this? Ben,
>>> have you? If not for nl80211 perhaps this has been done before for
>>> other netlink families?
>>
>>
>> You mean timing related to netlink configuration/report requests?
>
> Yes.
No, I haven't bothered to do this... The way we use netlink is
mostly asynchronous..ie we just listen for events and process them
as they come in. Most of our configuration would be driven through 'iw',
'wpa_supplicant', 'ip', etc, and much of our stats gathering is through
the ethool get-stats API.
I would imagine any latency would be highly dependent on other applications
taking RTNL (for instance, creating/deleting lots of virtual stations,
mac-vlans, ip-address changes, etc).
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox