All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-11  9:19 Stanislaw Gruszka
  2013-01-11 10:51 ` Johannes Berg
  2013-01-11 20:00 ` Ben Hutchings
  0 siblings, 2 replies; 13+ messages in thread
From: Stanislaw Gruszka @ 2013-01-11  9:19 UTC (permalink / raw)
  To: netdev, David S. Miller
  Cc: Eric Dumazet, Ben Greear, Bjørn Mork, linux-wireless,
	Ben Hutchings, Michał Mirosław, Johannes Berg

Since:

commit 2c60db037034d27f8c636403355d52872da92f81
Author: Eric Dumazet <edumazet@google.com>
Date:   Sun Sep 16 09:17:26 2012 +0000

    net: provide a default dev->ethtool_ops

wireless core does not correctly assign ethtool_ops.

After alloc_netdev*() call, some cfg80211 drivers provide they own
ethtool_ops, but some do not. For them, wireless core provide generic
cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call:

        if (!dev->ethtool_ops)
                dev->ethtool_ops = &cfg80211_ethtool_ops;

But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
drivers without custom ethtool_ops), but points to &default_ethtool_ops.

In order to fix the problem, provide function which will overwrite
default_ethtool_ops and use it by wireless core.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
v1 -> v2: change order of default_ethtool_ops initialization to avoid
the problem. Change the subject accordingly.

v2 -> v3: provide function to overwrite default_ethtool_ops, describe
problem a bit more detailed in the changelog

 include/linux/netdevice.h |    3 +++
 net/core/dev.c            |    8 ++++++++
 net/wireless/core.c       |    3 +--
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c599e47..9ef07d0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -60,6 +60,9 @@ struct wireless_dev;
 #define SET_ETHTOOL_OPS(netdev,ops) \
 	( (netdev)->ethtool_ops = (ops) )
 
+extern void netdev_set_default_ethtool_ops(struct net_device *dev,
+					   const struct ethtool_ops *ops);
+
 /* hardware address assignment types */
 #define NET_ADDR_PERM		0	/* address is permanent (default) */
 #define NET_ADDR_RANDOM		1	/* address is generated randomly */
diff --git a/net/core/dev.c b/net/core/dev.c
index 515473e..f64e439 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6121,6 +6121,14 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev)
 
 static const struct ethtool_ops default_ethtool_ops;
 
+void netdev_set_default_ethtool_ops(struct net_device *dev,
+				    const struct ethtool_ops *ops)
+{
+	if (dev->ethtool_ops == &default_ethtool_ops)
+		dev->ethtool_ops = ops;
+}
+EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops);
+
 /**
  *	alloc_netdev_mqs - allocate network device
  *	@sizeof_priv:	size of private data to allocate space for
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 747dd93..7cbd3bf 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -858,8 +858,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
 		/* allow mac80211 to determine the timeout */
 		wdev->ps_timeout = -1;
 
-		if (!dev->ethtool_ops)
-			dev->ethtool_ops = &cfg80211_ethtool_ops;
+		netdev_set_default_ethtool_ops(dev, &cfg80211_ethtool_ops);
 
 		if ((wdev->iftype == NL80211_IFTYPE_STATION ||
 		     wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
  2013-01-11  9:19 [PATCH v3] net, wireless: overwrite default_ethtool_ops Stanislaw Gruszka
@ 2013-01-11 10:51 ` Johannes Berg
  2013-01-11 20:00 ` Ben Hutchings
  1 sibling, 0 replies; 13+ messages in thread
From: Johannes Berg @ 2013-01-11 10:51 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: netdev, David S. Miller, Eric Dumazet, Ben Greear,
	Bjørn Mork, linux-wireless, Ben Hutchings,
	Michał Mirosław

On Fri, 2013-01-11 at 10:19 +0100, Stanislaw Gruszka wrote:
> Since:
> 
> commit 2c60db037034d27f8c636403355d52872da92f81
> Author: Eric Dumazet <edumazet@google.com>
> Date:   Sun Sep 16 09:17:26 2012 +0000
> 
>     net: provide a default dev->ethtool_ops
> 
> wireless core does not correctly assign ethtool_ops.
> 
> After alloc_netdev*() call, some cfg80211 drivers provide they own
> ethtool_ops, but some do not. For them, wireless core provide generic
> cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call:
> 
>         if (!dev->ethtool_ops)
>                 dev->ethtool_ops = &cfg80211_ethtool_ops;
> 
> But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
> drivers without custom ethtool_ops), but points to &default_ethtool_ops.
> 
> In order to fix the problem, provide function which will overwrite
> default_ethtool_ops and use it by wireless core.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Acked-by: Johannes Berg <johannes@sipsolutions.net>

This will work nicely, clearly I didn't understand davem's suggestion :)

johannes


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
  2013-01-11  9:19 [PATCH v3] net, wireless: overwrite default_ethtool_ops Stanislaw Gruszka
  2013-01-11 10:51 ` Johannes Berg
@ 2013-01-11 20:00 ` Ben Hutchings
  2013-01-11 23:59     ` David Miller
  1 sibling, 1 reply; 13+ messages in thread
From: Ben Hutchings @ 2013-01-11 20:00 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: netdev, David S. Miller, Eric Dumazet, Ben Greear,
	Bjørn Mork, linux-wireless, Michał Mirosław,
	Johannes Berg

On Fri, 2013-01-11 at 10:19 +0100, Stanislaw Gruszka wrote:
> Since:
> 
> commit 2c60db037034d27f8c636403355d52872da92f81
> Author: Eric Dumazet <edumazet@google.com>
> Date:   Sun Sep 16 09:17:26 2012 +0000
> 
>     net: provide a default dev->ethtool_ops
> 
> wireless core does not correctly assign ethtool_ops.
> 
> After alloc_netdev*() call, some cfg80211 drivers provide they own
> ethtool_ops, but some do not. For them, wireless core provide generic
> cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call:
> 
>         if (!dev->ethtool_ops)
>                 dev->ethtool_ops = &cfg80211_ethtool_ops;
> 
> But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
> drivers without custom ethtool_ops), but points to &default_ethtool_ops.
> 
> In order to fix the problem, provide function which will overwrite
> default_ethtool_ops and use it by wireless core.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
[...]

Acked-by: Ben Hutchings <bhutchings@solarflare.com>

-- 
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	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-11 23:59     ` David Miller
  0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2013-01-11 23:59 UTC (permalink / raw)
  To: bhutchings
  Cc: sgruszka, netdev, edumazet, greearb, bjorn, linux-wireless,
	mirqus, johannes

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 11 Jan 2013 20:00:32 +0000

> On Fri, 2013-01-11 at 10:19 +0100, Stanislaw Gruszka wrote:
>> Since:
>> 
>> commit 2c60db037034d27f8c636403355d52872da92f81
>> Author: Eric Dumazet <edumazet@google.com>
>> Date:   Sun Sep 16 09:17:26 2012 +0000
>> 
>>     net: provide a default dev->ethtool_ops
>> 
>> wireless core does not correctly assign ethtool_ops.
>> 
>> After alloc_netdev*() call, some cfg80211 drivers provide they own
>> ethtool_ops, but some do not. For them, wireless core provide generic
>> cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call:
>> 
>>         if (!dev->ethtool_ops)
>>                 dev->ethtool_ops = &cfg80211_ethtool_ops;
>> 
>> But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
>> drivers without custom ethtool_ops), but points to &default_ethtool_ops.
>> 
>> In order to fix the problem, provide function which will overwrite
>> default_ethtool_ops and use it by wireless core.
>> 
>> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> [...]
> 
> Acked-by: Ben Hutchings <bhutchings@solarflare.com>

Applied.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-11 23:59     ` David Miller
  0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2013-01-11 23:59 UTC (permalink / raw)
  To: bhutchings-s/n/eUQHGBpZroRs9YW3xA
  Cc: sgruszka-H+wXaHxf7aLQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA,
	edumazet-hpIqsD4AKlfQT0dZR+AlfA, greearb-my8/4N5VtI7c+919tysfdA,
	bjorn-yOkvZcmFvRU, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	mirqus-Re5JQEeQqe8AvxtiuMwx3w, johannes-cdvu00un1VgdHxzADdlk8Q

From: Ben Hutchings <bhutchings-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
Date: Fri, 11 Jan 2013 20:00:32 +0000

> On Fri, 2013-01-11 at 10:19 +0100, Stanislaw Gruszka wrote:
>> Since:
>> 
>> commit 2c60db037034d27f8c636403355d52872da92f81
>> Author: Eric Dumazet <edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>> Date:   Sun Sep 16 09:17:26 2012 +0000
>> 
>>     net: provide a default dev->ethtool_ops
>> 
>> wireless core does not correctly assign ethtool_ops.
>> 
>> After alloc_netdev*() call, some cfg80211 drivers provide they own
>> ethtool_ops, but some do not. For them, wireless core provide generic
>> cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call:
>> 
>>         if (!dev->ethtool_ops)
>>                 dev->ethtool_ops = &cfg80211_ethtool_ops;
>> 
>> But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
>> drivers without custom ethtool_ops), but points to &default_ethtool_ops.
>> 
>> In order to fix the problem, provide function which will overwrite
>> default_ethtool_ops and use it by wireless core.
>> 
>> Signed-off-by: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> [...]
> 
> Acked-by: Ben Hutchings <bhutchings-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
  2013-01-11 23:59     ` David Miller
  (?)
@ 2013-01-21 20:52     ` Luis R. Rodriguez
  2013-01-21 21:04       ` David Miller
  -1 siblings, 1 reply; 13+ messages in thread
From: Luis R. Rodriguez @ 2013-01-21 20:52 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: bhutchings, netdev, edumazet, greearb, bjorn, linux-wireless,
	mirqus, johannes, David Miller

On Fri, Jan 11, 2013 at 3:59 PM, David Miller <davem@davemloft.net> wrote:
> From: Ben Hutchings <bhutchings@solarflare.com>
> Date: Fri, 11 Jan 2013 20:00:32 +0000
>
>> On Fri, 2013-01-11 at 10:19 +0100, Stanislaw Gruszka wrote:
>>> Since:
>>>
>>> commit 2c60db037034d27f8c636403355d52872da92f81
>>> Author: Eric Dumazet <edumazet@google.com>
>>> Date:   Sun Sep 16 09:17:26 2012 +0000
>>>
>>>     net: provide a default dev->ethtool_ops
>>>
>>> wireless core does not correctly assign ethtool_ops.
>>>
>>> After alloc_netdev*() call, some cfg80211 drivers provide they own
>>> ethtool_ops, but some do not. For them, wireless core provide generic
>>> cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call:
>>>
>>>         if (!dev->ethtool_ops)
>>>                 dev->ethtool_ops = &cfg80211_ethtool_ops;
>>>
>>> But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
>>> drivers without custom ethtool_ops), but points to &default_ethtool_ops.
>>>
>>> In order to fix the problem, provide function which will overwrite
>>> default_ethtool_ops and use it by wireless core.
>>>
>>> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
>> [...]
>>
>> Acked-by: Ben Hutchings <bhutchings@solarflare.com>
>
> Applied.

Stanislaw, I see Eric's patch went in on v3.7-rc1 as such I suspect
this needs to be submitted as a stable fix for v3.7.5. Its already on
v3.8-rc4.

mcgrof@frijol ~/linux-stable (git::linux-3.7.y)$ git describe
--contains 2c60db037034d27f8c636403355d52872da92f81
v3.7-rc1~145^2~142

  Luis

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
  2013-01-21 20:52     ` Luis R. Rodriguez
@ 2013-01-21 21:04       ` David Miller
  2013-01-21 21:47           ` Luis R. Rodriguez
  2013-01-22 10:56           ` Stanislaw Gruszka
  0 siblings, 2 replies; 13+ messages in thread
From: David Miller @ 2013-01-21 21:04 UTC (permalink / raw)
  To: mcgrof
  Cc: sgruszka, bhutchings, netdev, edumazet, greearb, bjorn,
	linux-wireless, mirqus, johannes


It's queued up for -stable already as is clearly seen at:

http://patchwork.ozlabs.org/user/bundle/2566/?state=*

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-21 21:47           ` Luis R. Rodriguez
  0 siblings, 0 replies; 13+ messages in thread
From: Luis R. Rodriguez @ 2013-01-21 21:47 UTC (permalink / raw)
  To: David Miller
  Cc: mcgrof, sgruszka, bhutchings, netdev, edumazet, greearb, bjorn,
	linux-wireless, mirqus, johannes

On Mon, Jan 21, 2013 at 04:04:04PM -0500, David Miller wrote:
> 
> It's queued up for -stable already as is clearly seen at:
> 
> http://patchwork.ozlabs.org/user/bundle/2566/?state=*

Thanks, I was not aware of this bundle. In this case assuming
this goes into v3.7.5 this is being backported with special handling
between 3.7.0 and 3.7.5 as follows onto compat.

From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Subject: [PATCH] compat: backport netdev_set_default_ethtool_ops()

Stanislaw found that due to commit 2c60db03 by Eric Dumazet
the wireless core was not assigning driver specific ethtool_ops.
This was fixed by Stanislaw's commit d07d7507 which added
netdev_set_default_ethtool_ops(). Since Eric's commit 2c60db03
is on v3.7-rc1 Stanislaw's fix is required down to v3.7 as well.
The d07d7507 commit is currently present on v3.8-rc4 and is on
its way to what we think may be v3.7.5. Because of this kernels
older than v3.7.5 will require the full implementation while
older kernels than v3.7.0 will require just assigning the ops
passed only if netdev has no ops already set just as we used
to have it implemented on cfg80211.

mcgrof@frijol ~/linux-stable (git::linux-3.8.y)$ git describe --contains 2c60db
v3.7-rc1~145^2~142

mcgrof@frijol ~/linux-stable (git::linux-3.8.y)$ git describe --contains d07d75
v3.8-rc4~29^2~4

ckmake results:

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.50              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.33              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.17              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.5               [  OK  ]
24  3.7.0               [  OK  ]

real    0m34.791s
user    11m38.572s
sys     3m56.927s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 compat/compat-3.8.c        |   22 ++++++++++++++++++++++
 include/linux/compat-3.8.h |    6 ++++++
 2 files changed, 28 insertions(+)

diff --git a/compat/compat-3.8.c b/compat/compat-3.8.c
index 034dd77..1867258 100644
--- a/compat/compat-3.8.c
+++ b/compat/compat-3.8.c
@@ -16,6 +16,28 @@
 #include <linux/hid.h>
 #include <linux/module.h>
 #include "hid-ids.h"
+#include <linux/netdevice.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5))
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+void netdev_set_default_ethtool_ops(struct net_device *dev,
+				    const struct ethtool_ops *ops)
+{
+	if (!dev->ethtool_ops)
+		dev->ethtool_ops = ops;
+}
+#else /* kernel is between 3.7.0 and 3.7.4 */;
+void netdev_set_default_ethtool_ops(struct net_device *dev,
+				    const struct ethtool_ops *ops)
+{
+	if (dev->ethtool_ops == &default_ethtool_ops)
+		dev->ethtool_ops = ops;
+}
+#endif
+
+EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops);
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5) */
 
 /* a list of devices that shouldn't be handled by HID core at all */
 static const struct hid_device_id hid_ignore_list[] = {
diff --git a/include/linux/compat-3.8.h b/include/linux/compat-3.8.h
index 052de95..942b4cb 100644
--- a/include/linux/compat-3.8.h
+++ b/include/linux/compat-3.8.h
@@ -6,6 +6,12 @@
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
 
 #include <linux/hid.h>
+#include <linux/netdevice.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5))
+extern void netdev_set_default_ethtool_ops(struct net_device *dev,
+					   const struct ethtool_ops *ops);
+#endif
 
 #define HID_BUS_ANY                            0xffff
 #define HID_GROUP_ANY                          0x0000
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-21 21:47           ` Luis R. Rodriguez
  0 siblings, 0 replies; 13+ messages in thread
From: Luis R. Rodriguez @ 2013-01-21 21:47 UTC (permalink / raw)
  To: David Miller
  Cc: mcgrof-3uybbJdB1yH774rrrx3eTA, sgruszka-H+wXaHxf7aLQT0dZR+AlfA,
	bhutchings-s/n/eUQHGBpZroRs9YW3xA, netdev-u79uwXL29TY76Z2rM5mHXA,
	edumazet-hpIqsD4AKlfQT0dZR+AlfA, greearb-my8/4N5VtI7c+919tysfdA,
	bjorn-yOkvZcmFvRU, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	mirqus-Re5JQEeQqe8AvxtiuMwx3w, johannes-cdvu00un1VgdHxzADdlk8Q

On Mon, Jan 21, 2013 at 04:04:04PM -0500, David Miller wrote:
> 
> It's queued up for -stable already as is clearly seen at:
> 
> http://patchwork.ozlabs.org/user/bundle/2566/?state=*

Thanks, I was not aware of this bundle. In this case assuming
this goes into v3.7.5 this is being backported with special handling
between 3.7.0 and 3.7.5 as follows onto compat.

From: "Luis R. Rodriguez" <mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org>
Subject: [PATCH] compat: backport netdev_set_default_ethtool_ops()

Stanislaw found that due to commit 2c60db03 by Eric Dumazet
the wireless core was not assigning driver specific ethtool_ops.
This was fixed by Stanislaw's commit d07d7507 which added
netdev_set_default_ethtool_ops(). Since Eric's commit 2c60db03
is on v3.7-rc1 Stanislaw's fix is required down to v3.7 as well.
The d07d7507 commit is currently present on v3.8-rc4 and is on
its way to what we think may be v3.7.5. Because of this kernels
older than v3.7.5 will require the full implementation while
older kernels than v3.7.0 will require just assigning the ops
passed only if netdev has no ops already set just as we used
to have it implemented on cfg80211.

mcgrof@frijol ~/linux-stable (git::linux-3.8.y)$ git describe --contains 2c60db
v3.7-rc1~145^2~142

mcgrof@frijol ~/linux-stable (git::linux-3.8.y)$ git describe --contains d07d75
v3.8-rc4~29^2~4

ckmake results:

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.50              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.33              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.17              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.5               [  OK  ]
24  3.7.0               [  OK  ]

real    0m34.791s
user    11m38.572s
sys     3m56.927s

Signed-off-by: Luis R. Rodriguez <mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org>
---
 compat/compat-3.8.c        |   22 ++++++++++++++++++++++
 include/linux/compat-3.8.h |    6 ++++++
 2 files changed, 28 insertions(+)

diff --git a/compat/compat-3.8.c b/compat/compat-3.8.c
index 034dd77..1867258 100644
--- a/compat/compat-3.8.c
+++ b/compat/compat-3.8.c
@@ -16,6 +16,28 @@
 #include <linux/hid.h>
 #include <linux/module.h>
 #include "hid-ids.h"
+#include <linux/netdevice.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5))
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+void netdev_set_default_ethtool_ops(struct net_device *dev,
+				    const struct ethtool_ops *ops)
+{
+	if (!dev->ethtool_ops)
+		dev->ethtool_ops = ops;
+}
+#else /* kernel is between 3.7.0 and 3.7.4 */;
+void netdev_set_default_ethtool_ops(struct net_device *dev,
+				    const struct ethtool_ops *ops)
+{
+	if (dev->ethtool_ops == &default_ethtool_ops)
+		dev->ethtool_ops = ops;
+}
+#endif
+
+EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops);
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5) */
 
 /* a list of devices that shouldn't be handled by HID core at all */
 static const struct hid_device_id hid_ignore_list[] = {
diff --git a/include/linux/compat-3.8.h b/include/linux/compat-3.8.h
index 052de95..942b4cb 100644
--- a/include/linux/compat-3.8.h
+++ b/include/linux/compat-3.8.h
@@ -6,6 +6,12 @@
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
 
 #include <linux/hid.h>
+#include <linux/netdevice.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,5))
+extern void netdev_set_default_ethtool_ops(struct net_device *dev,
+					   const struct ethtool_ops *ops);
+#endif
 
 #define HID_BUS_ANY                            0xffff
 #define HID_GROUP_ANY                          0x0000
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-22 10:56           ` Stanislaw Gruszka
  0 siblings, 0 replies; 13+ messages in thread
From: Stanislaw Gruszka @ 2013-01-22 10:56 UTC (permalink / raw)
  To: David Miller
  Cc: mcgrof, bhutchings, netdev, edumazet, greearb, bjorn,
	linux-wireless, mirqus, johannes

On Mon, Jan 21, 2013 at 04:04:04PM -0500, David Miller wrote:
> 
> It's queued up for -stable already as is clearly seen at:
> 
> http://patchwork.ozlabs.org/user/bundle/2566/?state=*

Hmm, this link does not work for me (need user/password).

Anyway, I marked cc -stable in v2 patch, but forgot that in v3.
Committed patch does not include the mark, so I'll post patch
to stable just in case.

Thanks
Stanislaw 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-22 10:56           ` Stanislaw Gruszka
  0 siblings, 0 replies; 13+ messages in thread
From: Stanislaw Gruszka @ 2013-01-22 10:56 UTC (permalink / raw)
  To: David Miller
  Cc: mcgrof-3uybbJdB1yH774rrrx3eTA, bhutchings-s/n/eUQHGBpZroRs9YW3xA,
	netdev-u79uwXL29TY76Z2rM5mHXA, edumazet-hpIqsD4AKlfQT0dZR+AlfA,
	greearb-my8/4N5VtI7c+919tysfdA, bjorn-yOkvZcmFvRU,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	mirqus-Re5JQEeQqe8AvxtiuMwx3w, johannes-cdvu00un1VgdHxzADdlk8Q

On Mon, Jan 21, 2013 at 04:04:04PM -0500, David Miller wrote:
> 
> It's queued up for -stable already as is clearly seen at:
> 
> http://patchwork.ozlabs.org/user/bundle/2566/?state=*

Hmm, this link does not work for me (need user/password).

Anyway, I marked cc -stable in v2 patch, but forgot that in v3.
Committed patch does not include the mark, so I'll post patch
to stable just in case.

Thanks
Stanislaw 
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-22 19:06             ` David Miller
  0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2013-01-22 19:06 UTC (permalink / raw)
  To: sgruszka
  Cc: mcgrof, bhutchings, netdev, edumazet, greearb, bjorn,
	linux-wireless, mirqus, johannes

From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Tue, 22 Jan 2013 11:56:19 +0100

> On Mon, Jan 21, 2013 at 04:04:04PM -0500, David Miller wrote:
>> 
>> It's queued up for -stable already as is clearly seen at:
>> 
>> http://patchwork.ozlabs.org/user/bundle/2566/?state=*
> 
> Hmm, this link does not work for me (need user/password).

You just need to make a patchwork login, it's visible to any
registered user.

> Anyway, I marked cc -stable in v2 patch, but forgot that in v3.
> Committed patch does not include the mark, so I'll post patch
> to stable just in case.

Do NOT DO THIS, I do the submissions myself, by hand.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] net, wireless: overwrite default_ethtool_ops
@ 2013-01-22 19:06             ` David Miller
  0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2013-01-22 19:06 UTC (permalink / raw)
  To: sgruszka-H+wXaHxf7aLQT0dZR+AlfA
  Cc: mcgrof-3uybbJdB1yH774rrrx3eTA, bhutchings-s/n/eUQHGBpZroRs9YW3xA,
	netdev-u79uwXL29TY76Z2rM5mHXA, edumazet-hpIqsD4AKlfQT0dZR+AlfA,
	greearb-my8/4N5VtI7c+919tysfdA, bjorn-yOkvZcmFvRU,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	mirqus-Re5JQEeQqe8AvxtiuMwx3w, johannes-cdvu00un1VgdHxzADdlk8Q

From: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date: Tue, 22 Jan 2013 11:56:19 +0100

> On Mon, Jan 21, 2013 at 04:04:04PM -0500, David Miller wrote:
>> 
>> It's queued up for -stable already as is clearly seen at:
>> 
>> http://patchwork.ozlabs.org/user/bundle/2566/?state=*
> 
> Hmm, this link does not work for me (need user/password).

You just need to make a patchwork login, it's visible to any
registered user.

> Anyway, I marked cc -stable in v2 patch, but forgot that in v3.
> Committed patch does not include the mark, so I'll post patch
> to stable just in case.

Do NOT DO THIS, I do the submissions myself, by hand.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-01-22 19:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11  9:19 [PATCH v3] net, wireless: overwrite default_ethtool_ops Stanislaw Gruszka
2013-01-11 10:51 ` Johannes Berg
2013-01-11 20:00 ` Ben Hutchings
2013-01-11 23:59   ` David Miller
2013-01-11 23:59     ` David Miller
2013-01-21 20:52     ` Luis R. Rodriguez
2013-01-21 21:04       ` David Miller
2013-01-21 21:47         ` Luis R. Rodriguez
2013-01-21 21:47           ` Luis R. Rodriguez
2013-01-22 10:56         ` Stanislaw Gruszka
2013-01-22 10:56           ` Stanislaw Gruszka
2013-01-22 19:06           ` David Miller
2013-01-22 19:06             ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.