* Re: [PATCH] net: use the macros defined for the members of flowi
From: Eric Dumazet @ 2010-11-15 21:57 UTC (permalink / raw)
To: Brian Haley; +Cc: Changli Gao, David S. Miller, netdev
In-Reply-To: <1289857126.3364.14.camel@edumazet-laptop>
Le lundi 15 novembre 2010 à 22:38 +0100, Eric Dumazet a écrit :
> Same question on lkml few hours ago. I think gcc does the assignement to
> zero, even on automatic variables (at least done on x86), but could not
> find a doc on it.
Oh well, for sure fields that are not mentioned are set to 0, thanks to
C99.
My question on lkml was about padding holes (security related)
^ permalink raw reply
* Re: pull request: wireless-next-2.6 2010-11-15
From: Rafał Miłecki @ 2010-11-15 21:55 UTC (permalink / raw)
To: John W. Linville
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20101115212520.GD2297-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2010/11/15 John W. Linville <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>:
> Here is the traditional first huge pull request intended for the 2.6.38!
>
> Included are the usual batch of updates to various wireless drivers.
> For good measure, Luis also gives us a few wireless regulatory control
> patches as well.
>
> Please let me know if there are problems!
Nothing that should postpone this pull, but could you check for
following patches?
[PATCH] ssb: workarounds: be verbose about hacking SPROM revision,
don't duplicate code
[PATCH] ssb: return -ENOMEM on alloc fail (instead of CRC check's result)
[PATCH] ssb: fail registration for unknown SPROM revision
It looks like you missed them. All 3 were sent on 3.11.2010
--
Rafał
--
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
* Re: the future of ethtool
From: Ben Hutchings @ 2010-11-15 21:52 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Jeff Garzik, NetDev, David Miller
In-Reply-To: <20101115131453.16958d68@nehalam>
On Mon, 2010-11-15 at 13:14 -0800, Stephen Hemminger wrote:
> On Mon, 15 Nov 2010 21:14:02 +0000
> Ben Hutchings <bhutchings@solarflare.com> wrote:
>
> > On Mon, 2010-11-15 at 12:44 -0800, Stephen Hemminger wrote:
> > [...]
> > > My views are simple:
> > >
> > > Ethtool needs to be an extension of existing netlink API for interfaces.
> > > - handles multiple values per transaction
> > > - extensible
> > [...]
> >
> > Are you suggesting to send and receive the existing ethtool command and
> > result structures (with some wrapping) through netlink? Or some larger
> > change to the API?
>
> The existing ioctl base API should be kept as legacy and something
> better developed.
So you're saying: expose all new operations through netlink (and only
netlink) while keeping the old operations exposed only through ioctl?
That's hardly an improvement as it means ethtool or any other
configuration utility will have to support both APIs indefinitely.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
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
* Re: [PATCH] Reduce number of pointer dereferences in IPv6 netfilter LOG module function dump_packet()
From: Jesper Juhl @ 2010-11-15 21:50 UTC (permalink / raw)
To: Eric Dumazet
Cc: Netfilter Core Team, Jan Rekorajski, David S. Miller,
netfilter-devel, netfilter, netdev, linux-kernel
In-Reply-To: <alpine.LNX.2.00.1011152246050.20408@swampdragon.chaosbits.net>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1630 bytes --]
On Mon, 15 Nov 2010, Jesper Juhl wrote:
> On Mon, 15 Nov 2010, Eric Dumazet wrote:
>
> > Le dimanche 14 novembre 2010 à 22:47 +0100, Jesper Juhl a écrit :
> > > By adding two pointer variables to
> > > net/ipv6/netfilter/ip6t_LOG.c::dump_packet() we can save 19 bytes of .text
> > > and many pointer dereferences.
> > >
> > > before:
> > > text data bss dec hex filename
> > > 6258 600 3088 9946 26da net/ipv6/netfilter/ip6t_LOG.o
> > >
> > > after:
> > > text data bss dec hex filename
> > > 6239 600 3088 9927 26c7 net/ipv6/netfilter/ip6t_LOG.o
> > >
> > >
> > > Please Cc me on replies.
> > >
> > >
> > > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > > ---
> > > ip6t_LOG.c | 16 ++++++++++------
> > > 1 file changed, 10 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
> > > index 09c8889..51d10a5 100644
> > > --- a/net/ipv6/netfilter/ip6t_LOG.c
> > > +++ b/net/ipv6/netfilter/ip6t_LOG.c
> [...]
> >
> > Same comment than previous patch, you add a NULL dereference.
> >
> Hopefully this is beter (same as change done to the other (ipv4) patch).
>
>
>
> Fewer pointer derefs and smaller .text size for
> net/ipv4/netfilter/ipt_LOG.c::dump_packet()
>
I'm an idiot, that should of course read
"net/ipv6/netfilter/ip6t_LOG.c::dump_packet()"
That'll teach me not to cut'n'paste descriptions :-(
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply
* Re: [PATCH] Reduce number of pointer dereferences in IPv6 netfilter LOG module function dump_packet()
From: Jesper Juhl @ 2010-11-15 21:49 UTC (permalink / raw)
To: Eric Dumazet
Cc: Netfilter Core Team, Jan Rekorajski, David S. Miller,
netfilter-devel, netfilter, netdev, linux-kernel
In-Reply-To: <1289782215.2743.167.camel@edumazet-laptop>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2613 bytes --]
On Mon, 15 Nov 2010, Eric Dumazet wrote:
> Le dimanche 14 novembre 2010 à 22:47 +0100, Jesper Juhl a écrit :
> > By adding two pointer variables to
> > net/ipv6/netfilter/ip6t_LOG.c::dump_packet() we can save 19 bytes of .text
> > and many pointer dereferences.
> >
> > before:
> > text data bss dec hex filename
> > 6258 600 3088 9946 26da net/ipv6/netfilter/ip6t_LOG.o
> >
> > after:
> > text data bss dec hex filename
> > 6239 600 3088 9927 26c7 net/ipv6/netfilter/ip6t_LOG.o
> >
> >
> > Please Cc me on replies.
> >
> >
> > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > ---
> > ip6t_LOG.c | 16 ++++++++++------
> > 1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
> > index 09c8889..51d10a5 100644
> > --- a/net/ipv6/netfilter/ip6t_LOG.c
> > +++ b/net/ipv6/netfilter/ip6t_LOG.c
[...]
>
> Same comment than previous patch, you add a NULL dereference.
>
Hopefully this is beter (same as change done to the other (ipv4) patch).
Fewer pointer derefs and smaller .text size for
net/ipv4/netfilter/ipt_LOG.c::dump_packet()
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
ip6t_LOG.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index 09c8889..de15b14 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -46,6 +46,7 @@ static void dump_packet(struct sbuff *m,
unsigned int ptr;
unsigned int hdrlen = 0;
unsigned int logflags;
+ struct sock *sk;
if (info->type == NF_LOG_TYPE_LOG)
logflags = info->u.log.logflags;
@@ -359,12 +360,13 @@ static void dump_packet(struct sbuff *m,
/* Max length: 15 "UID=4294967295 " */
if ((logflags & IP6T_LOG_UID) && recurse && skb->sk) {
- read_lock_bh(&skb->sk->sk_callback_lock);
- if (skb->sk->sk_socket && skb->sk->sk_socket->file)
+ sk = skb->sk;
+ read_lock_bh(&sk->sk_callback_lock);
+ if (sk->sk_socket && sk->sk_socket->file)
sb_add(m, "UID=%u GID=%u ",
- skb->sk->sk_socket->file->f_cred->fsuid,
- skb->sk->sk_socket->file->f_cred->fsgid);
- read_unlock_bh(&skb->sk->sk_callback_lock);
+ sk->sk_socket->file->f_cred->fsuid,
+ sk->sk_socket->file->f_cred->fsgid);
+ read_unlock_bh(&sk->sk_callback_lock);
}
/* Max length: 16 "MARK=0xFFFFFFFF " */
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* Re: [PATCH] Reduce number of pointer dereferences in IPv4 netfilter LOG module function dump_packet()
From: Jesper Juhl @ 2010-11-15 21:48 UTC (permalink / raw)
To: Eric Dumazet
Cc: Netfilter Core Team, netdev, linux-kernel, netfilter,
netfilter-devel, David S. Miller, Rusty Russell
In-Reply-To: <1289782180.2743.166.camel@edumazet-laptop>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4069 bytes --]
On Mon, 15 Nov 2010, Eric Dumazet wrote:
> Le dimanche 14 novembre 2010 à 22:35 +0100, Jesper Juhl a écrit :
> > By adding two pointer variables to
> > net/ipv4/netfilter/ipt_LOG.c::dump_packet() we can save 16 bytes of .text
> > and 9 pointer dereferences.
> >
> > before this patch we did 20 pointer dereferences and had this object file
> > size:
> > text data bss dec hex filename
> > 6233 600 3080 9913 26b9 net/ipv4/netfilter/ipt_LOG.o
> >
> > after this patch we do just 11 pointer dereferences and have this object
> > file size:
> > text data bss dec hex filename
> > 6217 600 3080 9897 26a9 net/ipv4/netfilter/ipt_LOG.o
> >
> >
> > Please Cc me on replies.
> >
> >
> > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > ---
> > ipt_LOG.c | 16 ++++++++++------
> > 1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
> > index 72ffc8f..02a92de 100644
> > --- a/net/ipv4/netfilter/ipt_LOG.c
> > +++ b/net/ipv4/netfilter/ipt_LOG.c
[...]
> > - if ((logflags & IPT_LOG_UID) && !iphoff && skb->sk) {
> > - read_lock_bh(&skb->sk->sk_callback_lock);
> > - if (skb->sk->sk_socket && skb->sk->sk_socket->file)
> > + sk = skb->sk;
> > + sk_socket = sk->sk_socket;
>
> Really ? sk can be NULL, so you add a NULL dereference.
>
Arrgh, yes, you are right. How could I miss that "&& skb->sk" test? I even
modified that bit without thinking about it (I guess that's the problem,
not thinking about it and it being late and me having had too much
coffee and then not testing enough)...
Sorry about that.
[...]
> > - skb->sk->sk_socket->file->f_cred->fsuid,
> > - skb->sk->sk_socket->file->f_cred->fsgid);
> > - read_unlock_bh(&skb->sk->sk_callback_lock);
> > + sk_socket->file->f_cred->fsuid,
> > + sk_socket->file->f_cred->fsgid);
> > + read_unlock_bh(&sk->sk_callback_lock);
> > }
> >
> > /* Max length: 16 "MARK=0xFFFFFFFF " */
> >
> >
> >
>
> Most of these "dereferences" are compiler optimized.
>
> You added a bug in your patch, and make ipt_LOG slower if rule is not
> asking for IPT_LOG_UID
>
Yes, I see that now. Thank you for pointing it out.
How about the following instead? It still manages to save 16 bytes of
.text and a number of pointer derefs and it doesn't deref potentially NULL
pointers and it doesn't do any extra work if IPT_LOG_UID is not asked for.
And this time I didn't just compile test it but booted and ran a kernel
with the patch as well.
Fewer pointer derefs and smaller .text size for
net/ipv4/netfilter/ipt_LOG.c::dump_packet()
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
ipt_LOG.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 72ffc8f..539dce3 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -39,6 +39,7 @@ static void dump_packet(struct sbuff *m,
struct iphdr _iph;
const struct iphdr *ih;
unsigned int logflags;
+ struct sock *sk;
if (info->type == NF_LOG_TYPE_LOG)
logflags = info->u.log.logflags;
@@ -336,12 +337,13 @@ static void dump_packet(struct sbuff *m,
/* Max length: 15 "UID=4294967295 " */
if ((logflags & IPT_LOG_UID) && !iphoff && skb->sk) {
- read_lock_bh(&skb->sk->sk_callback_lock);
- if (skb->sk->sk_socket && skb->sk->sk_socket->file)
+ sk = skb->sk;
+ read_lock_bh(&sk->sk_callback_lock);
+ if (sk->sk_socket && sk->sk_socket->file)
sb_add(m, "UID=%u GID=%u ",
- skb->sk->sk_socket->file->f_cred->fsuid,
- skb->sk->sk_socket->file->f_cred->fsgid);
- read_unlock_bh(&skb->sk->sk_callback_lock);
+ sk->sk_socket->file->f_cred->fsuid,
+ sk->sk_socket->file->f_cred->fsgid);
+ read_unlock_bh(&sk->sk_callback_lock);
}
/* Max length: 16 "MARK=0xFFFFFFFF " */
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* Re: [PATCH] net: use the macros defined for the members of flowi
From: Eric Dumazet @ 2010-11-15 21:38 UTC (permalink / raw)
To: Brian Haley; +Cc: Changli Gao, David S. Miller, netdev
In-Reply-To: <4CE1A710.9040603@hp.com>
Le lundi 15 novembre 2010 à 16:33 -0500, Brian Haley a écrit :
> On 11/12/2010 11:43 PM, Changli Gao wrote:
> > Use the macros defined for the members of flowi to clean the code up.
> >
> > diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
> > index 865fd76..36cd0b7 100644
> > --- a/net/bridge/br_netfilter.c
> > +++ b/net/bridge/br_netfilter.c
> > @@ -412,13 +412,8 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
> > if (dnat_took_place(skb)) {
> > if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) {
> > struct flowi fl = {
> > - .nl_u = {
> > - .ip4_u = {
> > - .daddr = iph->daddr,
> > - .saddr = 0,
> > - .tos = RT_TOS(iph->tos) },
> > - },
> > - .proto = 0,
> > + .fl4_dst = iph->daddr,
> > + .fl4_tos = RT_TOS(iph->tos),
> > };
>
> Are these actually equivalent? You dropped two assignments to zero.
> I always thought things on the stack weren't.
Same question on lkml few hours ago. I think gcc does the assignement to
zero, even on automatic variables (at least done on x86), but could not
find a doc on it.
^ permalink raw reply
* Re: [PATCH] net: use the macros defined for the members of flowi
From: Brian Haley @ 2010-11-15 21:33 UTC (permalink / raw)
To: Changli Gao; +Cc: David S. Miller, netdev
In-Reply-To: <1289623435-22713-1-git-send-email-xiaosuo@gmail.com>
On 11/12/2010 11:43 PM, Changli Gao wrote:
> Use the macros defined for the members of flowi to clean the code up.
>
> diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
> index 865fd76..36cd0b7 100644
> --- a/net/bridge/br_netfilter.c
> +++ b/net/bridge/br_netfilter.c
> @@ -412,13 +412,8 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
> if (dnat_took_place(skb)) {
> if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) {
> struct flowi fl = {
> - .nl_u = {
> - .ip4_u = {
> - .daddr = iph->daddr,
> - .saddr = 0,
> - .tos = RT_TOS(iph->tos) },
> - },
> - .proto = 0,
> + .fl4_dst = iph->daddr,
> + .fl4_tos = RT_TOS(iph->tos),
> };
Are these actually equivalent? You dropped two assignments to zero.
I always thought things on the stack weren't.
Thanks,
-Brian
^ permalink raw reply
* pull request: wireless-next-2.6 2010-11-15
From: John W. Linville @ 2010-11-15 21:25 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
Dave,
Here is the traditional first huge pull request intended for the 2.6.38!
Included are the usual batch of updates to various wireless drivers.
For good measure, Luis also gives us a few wireless regulatory control
patches as well.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 1f4f067f99cbb2af7af7a67bd025a9fb58b5156c:
enic: Fix build warnings (2010-11-15 11:13:19 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master
Andreas Herrmann (1):
bitops: Provide generic sign_extend32 function
Ben Greear (1):
ath5k: Print stats as unsigned ints.
Blaise Gassend (1):
mac80211_hwsim: Incorporate txpower into rssi
Bruno Randolf (2):
ath5k: Optimize descriptor alignment
ath5k: Add channel time to survey data
Christian Lamparter (7):
carl9170: import hw/fw header updates
carl9170: initialize HW aMPDU parameters properly
carl9170: fix spurious restart due to high latency
carl9170: stop stale uplink BA sessions
carl9170: configurable beacon rates
carl9170: tx path review
carl9170: use generic sign_extend32
Eliad Peller (5):
mac80211: refactor debugfs function generation code
wl1271: set wl->vif only if add_interface succeeded.
wl1271: refactor debugfs function generation code
wl1271: handle HW watchdog interrupt
wl1271: add recover testmode command
Felix Fietkau (13):
ath9k_hw: optimize interrupt mask changes
ath9k_hw: small optimization in ar9002_hw_get_isr
ath9k_hw: optimize tx status descriptor processing
ath9k: optimize/fix ANI RSSI processing
ath9k: remove a redundant call to ath9k_hw_gettsf32
ath9k_hw: make ath9k_hw_gettsf32 static
ath9k_hw: optimize all descriptor access functions
ath9k_hw: initialize regulatory->max_power_level in set_txpower for AR9003
ath9k_hw: extend ath9k_hw_set_txpowerlimit to test channel txpower
ath9k: initialize per-channel tx power limits instead of hardcoding them
ath9k_hw: fix potential spurious tx error bit interpretation
mac80211: minstrel_ht - reduce the overhead of rate sampling
ath9k: rework tx queue selection and fix queue stopping/waking
Gery Kahn (1):
wl1271: ref_clock cosmetic changes
Grazvydas Ignotas (3):
wl1251: add power callback to wl1251_if_operations
wl1251: add runtime PM support for SDIO
wl1251: use wl12xx_platform_data to pass data
Hauke Mehrtens (1):
carl9170: fix typos
Helmut Schaa (6):
rt2x00: Add TXOP_CTRL_CFG register definition
rt2x00: Sync Tx and RX ring sizes with legacy drivers
rt2x00: Wait up to one second on rt2800 for WPDMA to be ready
rt2x00: Reduce tx descriptor size
rt2x00: Optimize rt2x00debug_dump_frame when frame dumping is not active
rt2x00: Fix hw crypto in AP mode for some devices
Herton Ronaldo Krzesinski (9):
rtl8187: remove redundant initialization of ARFR
rtl8187: remove setting of beacon/atim registers from initialization
rtl8187: fix wrong register initialization in 8187B
rtl8187: avoid redundant write to register FF72 (RFSW_CTRL)
rtl8187: move pll reset at start out of ANAPARAM write
rtl8187: don't set RTL818X_CONFIG3_GNT_SELECT flag on 8187B
rtl8187: consolidate anaparam on/off write sequences
rtl8187: remove uneeded setting of anaparam write
rtl8187: restore anaparam registers after reset with 8187B
Ido Yariv (4):
wl1271: TX aggregation optimization
wl1271: Fix TX starvation
wl1271: Allocate TX descriptors more efficiently
wl1271: Fix TX queue low watermark handling
Ivo van Doorn (9):
rt2x00: Rename rt2x00queue_timeout
rt2x00: Remove failsave from rt2x00usb_watchdog_tx_dma
rt2x00: Implement flush callback
rt2x00: Fix MCU_SLEEP arguments
rt2x00: Fix crash on USB unplug
rt2x00: Rename queue->lock to queue->index_lock
rt2x00: Fix rt2x00queue_kick_tx_queue arguments
rt2x00: Remove rt2x00lib_toggle_rx
rt2x00: Add watchdog functions for HW queue
Jesper Juhl (1):
mac80211: Remove redundant checks for NULL before calls to crypto_free_cipher()
Johannes Berg (10):
iwlwifi: make mac80211 ops a device config
iwlagn: don't resend RXON timing
iwlagn: new RXON processing for modern devices
iwlwifi: fix IBSS beaconing
iwlwifi: implement switching iftype while up
iwlagn: fix non-5000+ build
iwlagn: fix needed chains calculation
iwlagn: fix RXON issues
iwlagn: re-enable calibration
iwlagn: fix RXON HT
John W. Linville (3):
b43: remove extraneous code in free_ringmemory
rt2x00pci: do not use GFP_DMA
iwlwifi: Convert to new PCI PM framework
Juuso Oikarinen (3):
wl1271: Fix RX path stall
wl1271: Fix scan failure detection
wl1271: Check interface state in op_* functions
Lalith Suresh (1):
rt2x00: Fix comments in rt73usb.h and rt61pci.h
Larry Finger (1):
ssb: Clear RETRY_TIMEOUT in PCI Configuration for normal devices
Luciano Coelho (1):
wl1271: exit ELP mode when setting enabled rates in tx
Luis R. Rodriguez (16):
ath9k: fix sparse complaint on aphy for debugfs
ath: make ath_hw_keysetmac() static
ath: make ath_hw_set_keycache_entry() static
ath5k: make ath5k_update_bssid_mask_and_opmode() static
cfg80211: pass the reg hint initiator to helpers
cfg80211: fix allowing country IEs for WIPHY_FLAG_STRICT_REGULATORY
cfg80211: fix disabling channels based on hints
cfg80211: add debug prints for when we ignore regulatory hints
cfg80211: add debug print when disabling a channel on a custom regd
cfg80211: add debug print when processing a channel
cfg80211: prefix REG_DBG_PRINT() with cfg80211
ath: add a ATH_DBG_WARN()
ath9k: add a debug warning when we cannot stop RX
ath9k: simplify hw reset locking
ath9k: move the PCU lock to the sc structure
ath9k: content DMA start / stop through the PCU lock
Mark Einon (14):
rt2x00: checkpatch.pl error fixes for rt2400pci.h
rt2x00: checkpatch.pl error fixes for rt2500pci.h
rt2x00: checkpatch.pl error fixes for rt2500usb.c
rt2x00: checkpatch.pl error fixes for rt2800.h
rt2x00: checkpatch.pl error fixes for rt2800lib.c
rt2x00: checkpatch.pl error fixes for rt2800pci.h
rt2x00: checkpatch.pl error fixes for rt2800usb.c
rt2x00: checkpatch.pl error fixes for rt2800usb.h
rt2x00: checkpatch.pl error fixes for rt2x00config.c
rt2x00: checkpatch.pl error fixes for rt2x00dev.c
rt2x00: checkpatch.pl error fixes for rt2x00lib.h
rt2x00: checkpatch.pl error fixes for rt2x00link.c
rt2x00: checkpatch.pl error fixes for rt2x00queue.c
rt2x00: checkpatch.pl error fixes for rt73usb.c
Mohammed Shafi Shajakhan (2):
ath9k: Remove the median function in rate control
ath9k: Properly assign boolean types
Nicolas Kaiser (1):
wireless/wl1271: remove redundant if-statement v2
Nishant Sarmukadam (1):
mwl8k: force AP mode to use non-AMPDU frames
Rafael J. Wysocki (1):
ath9k: Convert to new PCI PM framework
Rafał Miłecki (8):
b43: N-PHY: define channel table struct for rev3+ devices
b43: N-PHY: define registers names for 2056 radio
b43: N-PHY: define registers names for 2056 radio
b43: N-PHY: fix 2055 radio init
b43: define known SPROM boardflags2 bits
b43: N-PHY: determine usage of radio regulatory workaround correctly
b43: N-PHY: improve 2055 radio initialization
b43legacy: rfkill: use status register based on core revision (not PHY's)
Rajkumar Manoharan (1):
ath9k_htc: Handle monitor mode properly for HTC devices
Shahar Levi (3):
wl1271: 11n Support, Add Definitions
wl1271: 11n Support, ACX Commands
wl1271: 11n Support, functionality and configuration ability
Shanyu Zhao (2):
iwlwifi: seperate disconnected antenna function
iwlwifi: disable disconnected antenna for advanced bt coex
Stanislaw Gruszka (7):
iwlwifi: warn when send tx power settings during scan
iwlwifi: send tx_power_cmd synchronously
iwlwifi: fix set_tx_power vs scan
iwlwifi: avoid commit rxon during scan in iwlagn_configure_filter
iwlwifi: avoid commit rxon during scan in iwlagn_bt_traffic_change_work
iwlwifi: defer update power mode while scan
iwlwifi: avoid commit rxon during scan in iwl_set_no_assoc
Stephen Hemminger (1):
rfkill: remove dead code
Teemu Paasikivi (1):
wl1271: Fix warning about unsupported RX rate
Thadeu Lima de Souza Cascardo (1):
rtl8187b: do not do per packet TX AGC
Wey-Yi Guy (11):
iwlagn: turn dynamic smps on while BT is on
iwlwifi: add new devices to Kconfig
iwlagn: use 6000g2b uCode for 130 series devices
iwlagn: update PCI ID for 6000g2b series devices
iwlagn: update PCI ID for 6000g2a series devices
iwlagn: update PCI ID for 100 series devices
iwlwifi: Legacy isr only used by legacy devices
iwlwifi: put all the isr related function under ops
iwlwifi: legacy tx_cmd_protection function
iwlwifi: resending QoS command when HT changes
iwlagn: enable shadow register
Winkler, Tomas (1):
iwlwlifi: update rx write pointer w/o request mac access in the CAM mode
maximilian attems (2):
zd1211rw: add 2 missing usb id's
zd1201: Add missing id
arch/arm/mach-omap2/board-omap3pandora.c | 32 +-
drivers/net/wireless/ath/ath5k/base.c | 24 +-
drivers/net/wireless/ath/ath5k/debug.c | 30 +-
drivers/net/wireless/ath/ath5k/desc.h | 18 +-
drivers/net/wireless/ath/ath5k/phy.c | 8 +-
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 14 +-
drivers/net/wireless/ath/ath9k/ar9002_mac.c | 123 ++--
drivers/net/wireless/ath/ath9k/ar9002_phy.c | 8 +-
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 20 +-
drivers/net/wireless/ath/ath9k/ar9003_mac.c | 69 +-
drivers/net/wireless/ath/ath9k/ar9003_mac.h | 6 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 14 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 14 +-
drivers/net/wireless/ath/ath9k/beacon.c | 12 +-
drivers/net/wireless/ath/ath9k/common.c | 15 +-
drivers/net/wireless/ath/ath9k/common.h | 14 +-
drivers/net/wireless/ath/ath9k/debug.c | 48 +-
drivers/net/wireless/ath/ath9k/debug.h | 5 +-
drivers/net/wireless/ath/ath9k/eeprom.h | 3 +-
drivers/net/wireless/ath/ath9k/eeprom_4k.c | 9 +-
drivers/net/wireless/ath/ath9k/eeprom_9287.c | 27 +-
drivers/net/wireless/ath/ath9k/eeprom_def.c | 62 +-
drivers/net/wireless/ath/ath9k/gpio.c | 10 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 70 +--
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 9 +-
drivers/net/wireless/ath/ath9k/hw.c | 9 +-
drivers/net/wireless/ath/ath9k/hw.h | 16 +-
drivers/net/wireless/ath/ath9k/init.c | 88 +-
drivers/net/wireless/ath/ath9k/mac.c | 86 ++-
drivers/net/wireless/ath/ath9k/mac.h | 13 +-
drivers/net/wireless/ath/ath9k/main.c | 167 ++---
drivers/net/wireless/ath/ath9k/pci.c | 40 +-
drivers/net/wireless/ath/ath9k/rc.c | 31 +-
drivers/net/wireless/ath/ath9k/recv.c | 42 +-
drivers/net/wireless/ath/ath9k/virtual.c | 3 +-
drivers/net/wireless/ath/ath9k/xmit.c | 102 +--
drivers/net/wireless/ath/carl9170/carl9170.h | 5 +-
drivers/net/wireless/ath/carl9170/fwcmd.h | 13 +-
drivers/net/wireless/ath/carl9170/hw.h | 7 +-
drivers/net/wireless/ath/carl9170/mac.c | 56 +-
drivers/net/wireless/ath/carl9170/main.c | 19 +-
drivers/net/wireless/ath/carl9170/phy.c | 17 +-
drivers/net/wireless/ath/carl9170/phy.h | 24 +-
drivers/net/wireless/ath/carl9170/tx.c | 80 ++-
drivers/net/wireless/ath/carl9170/usb.c | 2 +-
drivers/net/wireless/ath/carl9170/version.h | 6 +-
drivers/net/wireless/ath/debug.h | 2 +
drivers/net/wireless/ath/key.c | 9 +-
drivers/net/wireless/b43/b43.h | 13 +
drivers/net/wireless/b43/dma.c | 5 -
drivers/net/wireless/b43/phy_n.c | 14 +-
drivers/net/wireless/b43/radio_2055.c | 8 +-
drivers/net/wireless/b43/radio_2056.c | 51 ++
drivers/net/wireless/b43/radio_2056.h | 1081 +++++++++++++++++++++++-
drivers/net/wireless/b43legacy/rfkill.c | 2 +-
drivers/net/wireless/iwlwifi/Kconfig | 3 +
drivers/net/wireless/iwlwifi/Makefile | 7 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 13 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 22 +-
drivers/net/wireless/iwlwifi/iwl-3945.h | 8 +-
drivers/net/wireless/iwlwifi/iwl-4965.c | 352 +++++++-
drivers/net/wireless/iwlwifi/iwl-5000.c | 26 +-
drivers/net/wireless/iwlwifi/iwl-6000.c | 46 +-
drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 230 +++---
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 53 +-
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 619 ++++++++++++++
drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 32 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 493 ++---------
drivers/net/wireless/iwlwifi/iwl-agn.h | 41 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 841 ++++---------------
drivers/net/wireless/iwlwifi/iwl-core.h | 70 +-
drivers/net/wireless/iwlwifi/iwl-csr.h | 2 +
drivers/net/wireless/iwlwifi/iwl-dev.h | 3 +
drivers/net/wireless/iwlwifi/iwl-led.c | 2 +
drivers/net/wireless/iwlwifi/iwl-legacy.c | 662 +++++++++++++++
drivers/net/wireless/iwlwifi/iwl-legacy.h | 79 ++
drivers/net/wireless/iwlwifi/iwl-power.c | 95 ++-
drivers/net/wireless/iwlwifi/iwl-power.h | 3 +
drivers/net/wireless/iwlwifi/iwl-rx.c | 47 +-
drivers/net/wireless/iwlwifi/iwl-scan.c | 11 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 49 +-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 49 +-
drivers/net/wireless/mac80211_hwsim.c | 5 +-
drivers/net/wireless/mwl8k.c | 7 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 14 +-
drivers/net/wireless/rt2x00/rt2400pci.h | 6 +-
drivers/net/wireless/rt2x00/rt2500pci.c | 20 +-
drivers/net/wireless/rt2x00/rt2500pci.h | 4 +-
drivers/net/wireless/rt2x00/rt2500usb.c | 22 +-
drivers/net/wireless/rt2x00/rt2800.h | 61 ++-
drivers/net/wireless/rt2x00/rt2800lib.c | 43 +-
drivers/net/wireless/rt2x00/rt2800pci.c | 16 +-
drivers/net/wireless/rt2x00/rt2800pci.h | 12 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 66 ++-
drivers/net/wireless/rt2x00/rt2800usb.h | 4 +-
drivers/net/wireless/rt2x00/rt2x00.h | 1 +
drivers/net/wireless/rt2x00/rt2x00config.c | 8 +-
drivers/net/wireless/rt2x00/rt2x00debug.c | 10 +-
drivers/net/wireless/rt2x00/rt2x00dev.c | 37 +-
drivers/net/wireless/rt2x00/rt2x00lib.h | 3 +-
drivers/net/wireless/rt2x00/rt2x00link.c | 2 +-
drivers/net/wireless/rt2x00/rt2x00mac.c | 52 +-
drivers/net/wireless/rt2x00/rt2x00pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2x00queue.c | 39 +-
drivers/net/wireless/rt2x00/rt2x00queue.h | 33 +-
drivers/net/wireless/rt2x00/rt2x00reg.h | 2 -
drivers/net/wireless/rt2x00/rt2x00usb.c | 25 +-
drivers/net/wireless/rt2x00/rt61pci.c | 28 +-
drivers/net/wireless/rt2x00/rt61pci.h | 2 +-
drivers/net/wireless/rt2x00/rt73usb.c | 22 +-
drivers/net/wireless/rt2x00/rt73usb.h | 2 +-
drivers/net/wireless/rtl818x/rtl8187_dev.c | 140 ++--
drivers/net/wireless/rtl818x/rtl8187_rtl8225.c | 22 -
drivers/net/wireless/wl1251/main.c | 15 +-
drivers/net/wireless/wl1251/sdio.c | 101 ++-
drivers/net/wireless/wl1251/spi.c | 9 +
drivers/net/wireless/wl1251/wl1251.h | 1 +
drivers/net/wireless/wl12xx/Kconfig | 12 +-
drivers/net/wireless/wl12xx/wl1271.h | 13 +-
drivers/net/wireless/wl12xx/wl1271_acx.c | 83 ++
drivers/net/wireless/wl12xx/wl1271_acx.h | 89 ++-
drivers/net/wireless/wl12xx/wl1271_boot.c | 10 +-
drivers/net/wireless/wl12xx/wl1271_debugfs.c | 215 +++---
drivers/net/wireless/wl12xx/wl1271_event.c | 2 -
drivers/net/wireless/wl12xx/wl1271_main.c | 220 ++++-
drivers/net/wireless/wl12xx/wl1271_rx.c | 28 +-
drivers/net/wireless/wl12xx/wl1271_rx.h | 2 +-
drivers/net/wireless/wl12xx/wl1271_scan.c | 5 +-
drivers/net/wireless/wl12xx/wl1271_testmode.c | 12 +
drivers/net/wireless/wl12xx/wl1271_tx.c | 132 ++-
drivers/net/wireless/wl12xx/wl1271_tx.h | 3 +-
drivers/net/wireless/zd1201.c | 1 +
drivers/net/wireless/zd1211rw/zd_usb.c | 2 +
drivers/ssb/pcihost_wrapper.c | 7 +
include/linux/bitops.h | 11 +
include/linux/nl80211.h | 6 +-
include/linux/rfkill.h | 31 -
include/linux/wl12xx.h | 8 +
include/net/cfg80211.h | 15 +-
net/mac80211/aes_ccm.c | 3 +-
net/mac80211/aes_cmac.c | 3 +-
net/mac80211/debugfs.c | 60 +-
net/mac80211/debugfs.h | 2 +
net/mac80211/debugfs_key.c | 19 +-
net/mac80211/debugfs_sta.c | 26 +-
net/mac80211/rc80211_minstrel_ht.c | 16 +-
net/rfkill/core.c | 14 -
net/wireless/reg.c | 134 +++-
148 files changed, 5604 insertions(+), 2949 deletions(-)
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-legacy.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-legacy.h
Omnibus patch is available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-11-15.patch.bz2
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: the future of ethtool
From: Stephen Hemminger @ 2010-11-15 21:14 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Jeff Garzik, NetDev, David Miller
In-Reply-To: <1289855642.2586.38.camel@bwh-desktop>
On Mon, 15 Nov 2010 21:14:02 +0000
Ben Hutchings <bhutchings@solarflare.com> wrote:
> On Mon, 2010-11-15 at 12:44 -0800, Stephen Hemminger wrote:
> [...]
> > My views are simple:
> >
> > Ethtool needs to be an extension of existing netlink API for interfaces.
> > - handles multiple values per transaction
> > - extensible
> [...]
>
> Are you suggesting to send and receive the existing ethtool command and
> result structures (with some wrapping) through netlink? Or some larger
> change to the API?
The existing ioctl base API should be kept as legacy and something
better developed.
^ permalink raw reply
* Re: the future of ethtool
From: Ben Hutchings @ 2010-11-15 21:14 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Jeff Garzik, NetDev, David Miller
In-Reply-To: <20101115124428.7b857ccb@nehalam>
On Mon, 2010-11-15 at 12:44 -0800, Stephen Hemminger wrote:
[...]
> My views are simple:
>
> Ethtool needs to be an extension of existing netlink API for interfaces.
> - handles multiple values per transaction
> - extensible
[...]
Are you suggesting to send and receive the existing ethtool command and
result structures (with some wrapping) through netlink? Or some larger
change to the API?
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
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 08/10] drivers/net: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Paul Gortmaker, Yoshinori Sato, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ax88796.c | 8 ++++----
drivers/net/dm9000.c | 2 +-
drivers/net/iseries_veth.c | 2 +-
drivers/net/lib8390.c | 24 ++++++++++++------------
drivers/net/ne-h8300.c | 12 ++++++------
drivers/net/xilinx_emaclite.c | 20 ++++++++++----------
6 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c
index b6da4cf..4bebff3 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -325,7 +325,7 @@ static void ax_block_output(struct net_device *dev, int count,
static void
ax_mii_ei_outbits(struct net_device *dev, unsigned int bits, int len)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
void __iomem *memr_addr = (void __iomem *)dev->base_addr + AX_MEMR;
unsigned int memr;
@@ -364,7 +364,7 @@ ax_mii_ei_outbits(struct net_device *dev, unsigned int bits, int len)
static unsigned int
ax_phy_ei_inbits(struct net_device *dev, int no)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
void __iomem *memr_addr = (void __iomem *)dev->base_addr + AX_MEMR;
unsigned int memr;
unsigned int result = 0;
@@ -412,7 +412,7 @@ ax_phy_issueaddr(struct net_device *dev, int phy_addr, int reg, int opc)
static int
ax_phy_read(struct net_device *dev, int phy_addr, int reg)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long flags;
unsigned int result;
@@ -435,7 +435,7 @@ ax_phy_read(struct net_device *dev, int phy_addr, int reg)
static void
ax_phy_write(struct net_device *dev, int phy_addr, int reg, int value)
{
- struct ei_device *ei = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei = netdev_priv(dev);
struct ax_device *ax = to_ax_dev(dev);
unsigned long flags;
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 9f6aeef..2d4c4fc 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -1675,7 +1675,7 @@ dm9000_drv_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
unregister_netdev(ndev);
- dm9000_release_board(pdev, (board_info_t *) netdev_priv(ndev));
+ dm9000_release_board(pdev, netdev_priv(ndev));
free_netdev(ndev); /* free device structure */
dev_dbg(&pdev->dev, "released and freed device\n");
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index 8df645e..38e15be 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -1605,7 +1605,7 @@ static int veth_probe(struct vio_dev *vdev, const struct vio_device_id *id)
}
veth_dev[i] = dev;
- port = (struct veth_port*)netdev_priv(dev);
+ port = netdev_priv(dev);
/* Start the state machine on each connection on this vlan. If we're
* the first dev to do so this will commence link negotiation */
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index e7030ce..da74db4 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -203,7 +203,7 @@ static void __NS8390_init(struct net_device *dev, int startp);
static int __ei_open(struct net_device *dev)
{
unsigned long flags;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (dev->watchdog_timeo <= 0)
dev->watchdog_timeo = TX_TIMEOUT;
@@ -231,7 +231,7 @@ static int __ei_open(struct net_device *dev)
*/
static int __ei_close(struct net_device *dev)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long flags;
/*
@@ -256,7 +256,7 @@ static int __ei_close(struct net_device *dev)
static void __ei_tx_timeout(struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int txsr, isr, tickssofar = jiffies - dev_trans_start(dev);
unsigned long flags;
@@ -303,7 +303,7 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int send_length = skb->len, output_page;
unsigned long flags;
char buf[ETH_ZLEN];
@@ -592,7 +592,7 @@ static void ei_tx_err(struct net_device *dev)
static void ei_tx_intr(struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int status = ei_inb(e8390_base + EN0_TSR);
ei_outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */
@@ -675,7 +675,7 @@ static void ei_tx_intr(struct net_device *dev)
static void ei_receive(struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned char rxing_page, this_frame, next_frame;
unsigned short current_offset;
int rx_pkt_count = 0;
@@ -879,7 +879,7 @@ static void ei_rx_overrun(struct net_device *dev)
static struct net_device_stats *__ei_get_stats(struct net_device *dev)
{
unsigned long ioaddr = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long flags;
/* If the card is stopped, just return the present stats. */
@@ -927,7 +927,7 @@ static void do_set_multicast_list(struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
int i;
- struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
{
@@ -981,7 +981,7 @@ static void do_set_multicast_list(struct net_device *dev)
static void __ei_set_multicast_list(struct net_device *dev)
{
unsigned long flags;
- struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
spin_lock_irqsave(&ei_local->page_lock, flags);
do_set_multicast_list(dev);
@@ -998,7 +998,7 @@ static void __ei_set_multicast_list(struct net_device *dev)
static void ethdev_setup(struct net_device *dev)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (ei_debug > 1)
printk(version);
@@ -1036,7 +1036,7 @@ static struct net_device *____alloc_ei_netdev(int size)
static void __NS8390_init(struct net_device *dev, int startp)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int i;
int endcfg = ei_local->word16
? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0))
@@ -1099,7 +1099,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
int start_page)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);
ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c
index e0b0ef1..30be8c6 100644
--- a/drivers/net/ne-h8300.c
+++ b/drivers/net/ne-h8300.c
@@ -86,7 +86,7 @@ static u32 reg_offset[16];
static int __init init_reg_offset(struct net_device *dev,unsigned long base_addr)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int i;
unsigned char bus_width;
@@ -218,7 +218,7 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
int start_page, stop_page;
int reg0, ret;
static unsigned version_printed;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned char bus_width;
if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME))
@@ -371,7 +371,7 @@ static int ne_close(struct net_device *dev)
static void ne_reset_8390(struct net_device *dev)
{
unsigned long reset_start_time = jiffies;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (ei_debug > 1)
printk(KERN_DEBUG "resetting the 8390 t=%ld...", jiffies);
@@ -397,7 +397,7 @@ static void ne_reset_8390(struct net_device *dev)
static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
/* This *shouldn't* happen. If it does, it's the last thing you'll see */
if (ei_status.dmaing)
@@ -437,7 +437,7 @@ static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, i
static void ne_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
#ifdef NE_SANITY_CHECK
int xfer_count = count;
#endif
@@ -507,7 +507,7 @@ static void ne_block_input(struct net_device *dev, int count, struct sk_buff *sk
static void ne_block_output(struct net_device *dev, int count,
const unsigned char *buf, const int start_page)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long dma_start;
#ifdef NE_SANITY_CHECK
int retries = 0;
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 14f0955..2de52d1 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -515,7 +515,7 @@ static void xemaclite_update_address(struct net_local *drvdata,
*/
static int xemaclite_set_mac_address(struct net_device *dev, void *address)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
struct sockaddr *addr = address;
if (netif_running(dev))
@@ -534,7 +534,7 @@ static int xemaclite_set_mac_address(struct net_device *dev, void *address)
*/
static void xemaclite_tx_timeout(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
unsigned long flags;
dev_err(&lp->ndev->dev, "Exceeded transmit timeout of %lu ms\n",
@@ -578,7 +578,7 @@ static void xemaclite_tx_timeout(struct net_device *dev)
*/
static void xemaclite_tx_handler(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
dev->stats.tx_packets++;
if (lp->deferred_skb) {
@@ -605,7 +605,7 @@ static void xemaclite_tx_handler(struct net_device *dev)
*/
static void xemaclite_rx_handler(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
struct sk_buff *skb;
unsigned int align;
u32 len;
@@ -661,7 +661,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
{
bool tx_complete = 0;
struct net_device *dev = dev_id;
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
void __iomem *base_addr = lp->base_addr;
u32 tx_status;
@@ -918,7 +918,7 @@ void xemaclite_adjust_link(struct net_device *ndev)
*/
static int xemaclite_open(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
int retval;
/* Just to be safe, stop the device first */
@@ -987,7 +987,7 @@ static int xemaclite_open(struct net_device *dev)
*/
static int xemaclite_close(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
netif_stop_queue(dev);
xemaclite_disable_interrupts(lp);
@@ -1031,7 +1031,7 @@ static struct net_device_stats *xemaclite_get_stats(struct net_device *dev)
*/
static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
struct sk_buff *new_skb;
unsigned int len;
unsigned long flags;
@@ -1068,7 +1068,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
static void xemaclite_remove_ndev(struct net_device *ndev)
{
if (ndev) {
- struct net_local *lp = (struct net_local *) netdev_priv(ndev);
+ struct net_local *lp = netdev_priv(ndev);
if (lp->base_addr)
iounmap((void __iomem __force *) (lp->base_addr));
@@ -1245,7 +1245,7 @@ static int __devexit xemaclite_of_remove(struct platform_device *of_dev)
struct device *dev = &of_dev->dev;
struct net_device *ndev = dev_get_drvdata(dev);
- struct net_local *lp = (struct net_local *) netdev_priv(ndev);
+ struct net_local *lp = netdev_priv(ndev);
/* Un-register the mii_bus, if configured */
if (lp->has_mdio) {
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 07/10] drivers/net/vxge: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina
Cc: Ramkrishna Vepa, Sivakumar Subramani, Sreenivasa Honnur,
Jon Mason, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/vxge/vxge-ethtool.c | 26 +++++++++++++-------------
drivers/net/vxge/vxge-main.c | 26 +++++++++++++-------------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/net/vxge/vxge-ethtool.c b/drivers/net/vxge/vxge-ethtool.c
index 09f721e..bc9bd10 100644
--- a/drivers/net/vxge/vxge-ethtool.c
+++ b/drivers/net/vxge/vxge-ethtool.c
@@ -80,7 +80,7 @@ static int vxge_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)
static void vxge_ethtool_gdrvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
strlcpy(info->driver, VXGE_DRIVER_NAME, sizeof(VXGE_DRIVER_NAME));
strlcpy(info->version, DRV_VERSION, sizeof(DRV_VERSION));
strlcpy(info->fw_version, vdev->fw_version, VXGE_HW_FW_STRLEN);
@@ -108,7 +108,7 @@ static void vxge_ethtool_gregs(struct net_device *dev,
enum vxge_hw_status status;
u64 reg;
u64 *reg_space = (u64 *)space;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
regs->len = sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath;
@@ -144,7 +144,7 @@ static void vxge_ethtool_gregs(struct net_device *dev,
*/
static int vxge_ethtool_idnic(struct net_device *dev, u32 data)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON);
@@ -166,7 +166,7 @@ static int vxge_ethtool_idnic(struct net_device *dev, u32 data)
static void vxge_ethtool_getpause_data(struct net_device *dev,
struct ethtool_pauseparam *ep)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
vxge_hw_device_getpause_data(hldev, 0, &ep->tx_pause, &ep->rx_pause);
@@ -185,7 +185,7 @@ static void vxge_ethtool_getpause_data(struct net_device *dev,
static int vxge_ethtool_setpause_data(struct net_device *dev,
struct ethtool_pauseparam *ep)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
vxge_hw_device_setpause_data(hldev, 0, ep->tx_pause, ep->rx_pause);
@@ -203,7 +203,7 @@ static void vxge_get_ethtool_stats(struct net_device *dev,
enum vxge_hw_status status;
enum vxge_hw_status swstatus;
struct vxge_vpath *vpath = NULL;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
struct vxge_hw_xmac_stats *xmac_stats;
struct vxge_hw_device_stats_sw_info *sw_stats;
@@ -572,7 +572,7 @@ static void vxge_ethtool_get_strings(struct net_device *dev, u32 stringset,
{
int stat_size = 0;
int i, j;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
switch (stringset) {
case ETH_SS_STATS:
vxge_add_string("VPATH STATISTICS%s\t\t\t",
@@ -1059,21 +1059,21 @@ static void vxge_ethtool_get_strings(struct net_device *dev, u32 stringset,
static int vxge_ethtool_get_regs_len(struct net_device *dev)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
return sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath;
}
static u32 vxge_get_rx_csum(struct net_device *dev)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
return vdev->rx_csum;
}
static int vxge_set_rx_csum(struct net_device *dev, u32 data)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
if (data)
vdev->rx_csum = 1;
@@ -1095,7 +1095,7 @@ static int vxge_ethtool_op_set_tso(struct net_device *dev, u32 data)
static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
switch (sset) {
case ETH_SS_STATS:
@@ -1114,7 +1114,7 @@ static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset)
static int vxge_set_flags(struct net_device *dev, u32 data)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
enum vxge_hw_status status;
if (data & ~ETH_FLAG_RXHASH)
@@ -1148,7 +1148,7 @@ static int vxge_set_flags(struct net_device *dev, u32 data)
static int vxge_fw_flash(struct net_device *dev, struct ethtool_flash *parms)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
if (vdev->max_vpath_supported != VXGE_HW_MAX_VIRTUAL_PATHS) {
printk(KERN_INFO "Single Function Mode is required to flash the"
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 22c7d79..5cba4a6 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -153,7 +153,7 @@ static void
vxge_callback_link_up(struct __vxge_hw_device *hldev)
{
struct net_device *dev = hldev->ndev;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d",
vdev->ndev->name, __func__, __LINE__);
@@ -177,7 +177,7 @@ static void
vxge_callback_link_down(struct __vxge_hw_device *hldev)
{
struct net_device *dev = hldev->ndev;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
vxge_debug_entryexit(VXGE_TRACE,
"%s: %s:%d", vdev->ndev->name, __func__, __LINE__);
@@ -787,7 +787,7 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK;
}
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
if (unlikely(!is_vxge_card_up(vdev))) {
vxge_debug_tx(VXGE_ERR,
@@ -1052,7 +1052,7 @@ static void vxge_set_multicast(struct net_device *dev)
vxge_debug_entryexit(VXGE_TRACE,
"%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = (struct __vxge_hw_device *)vdev->devh;
if (unlikely(!is_vxge_card_up(vdev)))
@@ -1209,7 +1209,7 @@ static int vxge_set_mac_addr(struct net_device *dev, void *p)
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = vdev->devh;
if (!is_valid_ether_addr(addr->sa_data))
@@ -1671,7 +1671,7 @@ static void vxge_netpoll(struct net_device *dev)
struct __vxge_hw_device *hldev;
struct vxgedev *vdev;
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = pci_get_drvdata(vdev->pdev);
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
@@ -2581,7 +2581,7 @@ vxge_open(struct net_device *dev)
vxge_debug_entryexit(VXGE_TRACE,
"%s: %s:%d", dev->name, __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = pci_get_drvdata(vdev->pdev);
function_mode = vdev->config.device_hw_info.function_mode;
@@ -2809,7 +2809,7 @@ static int do_vxge_close(struct net_device *dev, int do_io)
vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d",
dev->name, __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = pci_get_drvdata(vdev->pdev);
if (unlikely(!is_vxge_card_up(vdev)))
@@ -3138,7 +3138,7 @@ vxge_tx_watchdog(struct net_device *dev)
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
vdev->cric_err_event = VXGE_HW_EVENT_RESET_START;
@@ -3166,7 +3166,7 @@ vxge_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
vpath = &vdev->vpaths[0];
if ((NULL == grp) && (vpath->is_open)) {
@@ -3215,7 +3215,7 @@ vxge_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
struct vxge_vpath *vpath;
int vp_id;
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
/* Add these vlan to the vid table */
for (vp_id = 0; vp_id < vdev->no_of_vpath; vp_id++) {
@@ -3242,7 +3242,7 @@ vxge_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
vlan_group_set_device(vdev->vlgrp, vid, NULL);
@@ -3475,7 +3475,7 @@ vxge_callback_crit_err(struct __vxge_hw_device *hldev,
enum vxge_hw_event type, u64 vp_id)
{
struct net_device *dev = hldev->ndev;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct vxge_vpath *vpath = NULL;
int vpath_idx;
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 03/10] drivers/net/pcmcia: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/pcmcia/axnet_cs.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index d2e166e..c65c9e1 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -865,7 +865,7 @@ static void do_set_multicast_list(struct net_device *dev);
static int ax_open(struct net_device *dev)
{
unsigned long flags;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
/*
* Grab the page lock so we own the register set, then call
@@ -916,7 +916,7 @@ static int ax_close(struct net_device *dev)
static void axnet_tx_timeout(struct net_device *dev)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int txsr, isr, tickssofar = jiffies - dev_trans_start(dev);
unsigned long flags;
@@ -963,7 +963,7 @@ static netdev_tx_t axnet_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int length, send_length, output_page;
unsigned long flags;
u8 packet[ETH_ZLEN];
@@ -1260,7 +1260,7 @@ static void ei_tx_err(struct net_device *dev)
static void ei_tx_intr(struct net_device *dev)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int status = inb(e8390_base + EN0_TSR);
/*
@@ -1344,7 +1344,7 @@ static void ei_tx_intr(struct net_device *dev)
static void ei_receive(struct net_device *dev)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned char rxing_page, this_frame, next_frame;
unsigned short current_offset;
int rx_pkt_count = 0;
@@ -1529,7 +1529,7 @@ static void ei_rx_overrun(struct net_device *dev)
static struct net_device_stats *get_stats(struct net_device *dev)
{
long ioaddr = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long flags;
/* If the card is stopped, just return the present stats. */
@@ -1578,7 +1578,7 @@ static void do_set_multicast_list(struct net_device *dev)
{
long e8390_base = dev->base_addr;
int i;
- struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) {
memset(ei_local->mcfilter, 0, 8);
@@ -1636,7 +1636,7 @@ static void AX88190_init(struct net_device *dev, int startp)
{
axnet_dev_t *info = PRIV(dev);
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int i;
int endcfg = ei_local->word16 ? (0x48 | ENDCFG_WTS) : 0x48;
@@ -1702,7 +1702,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
int start_page)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);
if (inb_p(e8390_base) & E8390_TRANS)
{
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 10/10] net/atm: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: David S. Miller, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
net/atm/br2684.c | 2 +-
net/atm/lec.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index ad2b232..fce2eae 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -97,7 +97,7 @@ static LIST_HEAD(br2684_devs);
static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev)
{
- return (struct br2684_dev *)netdev_priv(net_dev);
+ return netdev_priv(net_dev);
}
static inline struct net_device *list_entry_brdev(const struct list_head *le)
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 181d70c..179e04b 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -816,8 +816,7 @@ static int lec_mcast_attach(struct atm_vcc *vcc, int arg)
if (arg < 0 || arg >= MAX_LEC_ITF || !dev_lec[arg])
return -EINVAL;
vcc->proto_data = dev_lec[arg];
- return lec_mcast_make((struct lec_priv *)netdev_priv(dev_lec[arg]),
- vcc);
+ return lec_mcast_make(netdev_priv(dev_lec[arg]), vcc);
}
/* Initialize device. */
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 06/10] drivers/net/usb: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina
Cc: Petko Manolov, Greg Kroah-Hartman,
linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <cover.1289855436.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
---
drivers/net/usb/pegasus.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 6710f093..ef36676 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -359,7 +359,7 @@ fail:
static int mdio_read(struct net_device *dev, int phy_id, int loc)
{
- pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev);
+ pegasus_t *pegasus = netdev_priv(dev);
u16 res;
read_mii_word(pegasus, phy_id, loc, &res);
@@ -397,7 +397,7 @@ fail:
static void mdio_write(struct net_device *dev, int phy_id, int loc, int val)
{
- pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev);
+ pegasus_t *pegasus = netdev_priv(dev);
write_mii_word(pegasus, phy_id, loc, val);
}
--
1.7.3.1.g432b3.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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
* [PATCH 05/10] drivers/net/qlge: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Ron Mercer, linux-driver, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/qlge/qlge_main.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index c30e0fe..d9a7626 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -3844,7 +3844,7 @@ static int ql_adapter_reset(struct ql_adapter *qdev)
static void ql_display_dev_info(struct net_device *ndev)
{
- struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
+ struct ql_adapter *qdev = netdev_priv(ndev);
netif_info(qdev, probe, qdev->ndev,
"Function #%d, Port %d, NIC Roll %d, NIC Rev = %d, "
@@ -4264,7 +4264,7 @@ static struct net_device_stats *qlge_get_stats(struct net_device
static void qlge_set_multicast_list(struct net_device *ndev)
{
- struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
+ struct ql_adapter *qdev = netdev_priv(ndev);
struct netdev_hw_addr *ha;
int i, status;
@@ -4354,7 +4354,7 @@ exit:
static int qlge_set_mac_address(struct net_device *ndev, void *p)
{
- struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
+ struct ql_adapter *qdev = netdev_priv(ndev);
struct sockaddr *addr = p;
int status;
@@ -4377,7 +4377,7 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
static void qlge_tx_timeout(struct net_device *ndev)
{
- struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
+ struct ql_adapter *qdev = netdev_priv(ndev);
ql_queue_asic_error(qdev);
}
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 04/10] drivers/net/qla3xxx.c: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Ron Mercer, linux-driver, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/qla3xxx.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 7496ed2..1a3584e 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -2467,7 +2467,7 @@ map_error:
static netdev_tx_t ql3xxx_send(struct sk_buff *skb,
struct net_device *ndev)
{
- struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
+ struct ql3_adapter *qdev = netdev_priv(ndev);
struct ql3xxx_port_registers __iomem *port_regs =
qdev->mem_map_registers;
struct ql_tx_buf_cb *tx_cb;
@@ -3390,7 +3390,7 @@ static void ql_set_mac_info(struct ql3_adapter *qdev)
static void ql_display_dev_info(struct net_device *ndev)
{
- struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
+ struct ql3_adapter *qdev = netdev_priv(ndev);
struct pci_dev *pdev = qdev->pdev;
netdev_info(ndev,
@@ -3573,7 +3573,7 @@ static int ql3xxx_open(struct net_device *ndev)
static int ql3xxx_set_mac_address(struct net_device *ndev, void *p)
{
- struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
+ struct ql3_adapter *qdev = netdev_priv(ndev);
struct ql3xxx_port_registers __iomem *port_regs =
qdev->mem_map_registers;
struct sockaddr *addr = p;
@@ -3608,7 +3608,7 @@ static int ql3xxx_set_mac_address(struct net_device *ndev, void *p)
static void ql3xxx_tx_timeout(struct net_device *ndev)
{
- struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
+ struct ql3_adapter *qdev = netdev_priv(ndev);
netdev_err(ndev, "Resetting...\n");
/*
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 02/10] drivers/net/bonding: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Jay Vosburgh, bonding-devel, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/bonding/bond_3ad.c | 3 +--
drivers/net/bonding/bonding.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 106718c..171782e 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2474,8 +2474,7 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac
goto out;
read_lock(&bond->lock);
- slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev),
- orig_dev);
+ slave = bond_get_slave_by_dev(netdev_priv(dev), orig_dev);
if (!slave)
goto out_unlock;
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 4eedb12..ad3ae46 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -286,7 +286,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
return NULL;
}
- return (struct bonding *)netdev_priv(slave->dev->master);
+ return netdev_priv(slave->dev->master);
}
static inline bool bond_is_lb(const struct bonding *bond)
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 01/10] drivers/isdn/i4l: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Karsten Keil, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/isdn/i4l/isdn_concap.c | 2 +-
drivers/isdn/i4l/isdn_net.c | 20 ++++++++++----------
drivers/isdn/i4l/isdn_ppp.c | 12 ++++++------
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/isdn/i4l/isdn_concap.c b/drivers/isdn/i4l/isdn_concap.c
index 46048e5..d568689 100644
--- a/drivers/isdn/i4l/isdn_concap.c
+++ b/drivers/isdn/i4l/isdn_concap.c
@@ -61,7 +61,7 @@ static int isdn_concap_dl_data_req(struct concap_proto *concap, struct sk_buff *
static int isdn_concap_dl_connect_req(struct concap_proto *concap)
{
struct net_device *ndev = concap -> net_dev;
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
int ret;
IX25DEBUG( "isdn_concap_dl_connect_req: %s \n", ndev -> name);
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index 26d44c3..afeede7 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -827,7 +827,7 @@ isdn_net_dial(void)
void
isdn_net_hangup(struct net_device *d)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(d);
+ isdn_net_local *lp = netdev_priv(d);
isdn_ctrl cmd;
#ifdef CONFIG_ISDN_X25
struct concap_proto *cprot = lp->netdev->cprot;
@@ -1052,7 +1052,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
{
isdn_net_dev *nd;
isdn_net_local *slp;
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
int retv = NETDEV_TX_OK;
if (((isdn_net_local *) netdev_priv(ndev))->master) {
@@ -1116,7 +1116,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
static void
isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
if (!skb)
return;
if (lp->p_encap == ISDN_NET_ENCAP_ETHER) {
@@ -1131,7 +1131,7 @@ isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
static void isdn_net_tx_timeout(struct net_device * ndev)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
printk(KERN_WARNING "isdn_tx_timeout dev %s dialstate %d\n", ndev->name, lp->dialstate);
if (!lp->dialstate){
@@ -1165,7 +1165,7 @@ static void isdn_net_tx_timeout(struct net_device * ndev)
static netdev_tx_t
isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
#ifdef CONFIG_ISDN_X25
struct concap_proto * cprot = lp -> netdev -> cprot;
/* At this point hard_start_xmit() passes control to the encapsulation
@@ -1347,7 +1347,7 @@ isdn_net_close(struct net_device *dev)
static struct net_device_stats *
isdn_net_get_stats(struct net_device *dev)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
return &lp->stats;
}
@@ -1426,7 +1426,7 @@ isdn_net_ciscohdlck_alloc_skb(isdn_net_local *lp, int len)
static int
isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
unsigned long len = 0;
unsigned long expires = 0;
int tmp = 0;
@@ -1493,7 +1493,7 @@ isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static int isdn_net_ioctl(struct net_device *dev,
struct ifreq *ifr, int cmd)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
switch (lp->p_encap) {
#ifdef CONFIG_ISDN_PPP
@@ -1786,7 +1786,7 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb)
static void
isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
isdn_net_local *olp = lp; /* original 'lp' */
#ifdef CONFIG_ISDN_X25
struct concap_proto *cprot = lp -> netdev -> cprot;
@@ -1800,7 +1800,7 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
* handle master's statistics and hangup-timeout
*/
ndev = lp->master;
- lp = (isdn_net_local *) netdev_priv(ndev);
+ lp = netdev_priv(ndev);
lp->stats.rx_packets++;
lp->stats.rx_bytes += skb->len;
}
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index fe824e0..97c5cc2 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -1221,7 +1221,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
struct ippp_struct *ipt,*ipts;
int slot, retval = NETDEV_TX_OK;
- mlp = (isdn_net_local *) netdev_priv(netdev);
+ mlp = netdev_priv(netdev);
nd = mlp->netdev; /* get master lp */
slot = mlp->ppp_slot;
@@ -1985,7 +1985,7 @@ isdn_ppp_dev_ioctl_stats(int slot, struct ifreq *ifr, struct net_device *dev)
{
struct ppp_stats __user *res = ifr->ifr_data;
struct ppp_stats t;
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats)))
return -EFAULT;
@@ -2024,7 +2024,7 @@ isdn_ppp_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
int error=0;
int len;
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP)
@@ -2091,7 +2091,7 @@ isdn_ppp_dial_slave(char *name)
sdev = lp->slave;
while (sdev) {
- isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev);
+ isdn_net_local *mlp = netdev_priv(sdev);
if (!(mlp->flags & ISDN_NET_CONNECTED))
break;
sdev = mlp->slave;
@@ -2099,7 +2099,7 @@ isdn_ppp_dial_slave(char *name)
if (!sdev)
return 2;
- isdn_net_dial_req((isdn_net_local *) netdev_priv(sdev));
+ isdn_net_dial_req(netdev_priv(sdev));
return 0;
#else
return -1;
@@ -2122,7 +2122,7 @@ isdn_ppp_hangup_slave(char *name)
sdev = lp->slave;
while (sdev) {
- isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev);
+ isdn_net_local *mlp = netdev_priv(sdev);
if (mlp->slave) { /* find last connected link in chain */
isdn_net_local *nlp = ISDN_SLAVE_PRIV(mlp);
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 00/10] Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: devel, netdev, linux-usb, linux-kernel, bonding-devel
Joe Perches (10):
drivers/isdn/i4l: Remove unnecessary casts of netdev_priv
drivers/net/bonding: Remove unnecessary casts of netdev_priv
drivers/net/pcmcia: Remove unnecessary casts of netdev_priv
drivers/net/qla3xxx.c: Remove unnecessary casts of netdev_priv
drivers/net/qlge: Remove unnecessary casts of netdev_priv
drivers/net/usb: Remove unnecessary casts of netdev_priv
drivers/net/vxge: Remove unnecessary casts of netdev_priv
drivers/net: Remove unnecessary casts of netdev_priv
drivers/staging: Remove unnecessary casts of netdev_priv
net/atm: Remove unnecessary casts of netdev_priv
drivers/isdn/i4l/isdn_concap.c | 2 +-
drivers/isdn/i4l/isdn_net.c | 20 ++++----
drivers/isdn/i4l/isdn_ppp.c | 12 ++--
drivers/net/ax88796.c | 8 ++--
drivers/net/bonding/bond_3ad.c | 3 +-
drivers/net/bonding/bonding.h | 2 +-
drivers/net/dm9000.c | 2 +-
drivers/net/iseries_veth.c | 2 +-
drivers/net/lib8390.c | 24 ++++----
drivers/net/ne-h8300.c | 12 ++--
drivers/net/pcmcia/axnet_cs.c | 18 +++---
drivers/net/qla3xxx.c | 8 ++--
drivers/net/qlge/qlge_main.c | 8 ++--
drivers/net/usb/pegasus.c | 4 +-
drivers/net/vxge/vxge-ethtool.c | 26 +++++-----
drivers/net/vxge/vxge-main.c | 26 +++++-----
drivers/net/xilinx_emaclite.c | 20 ++++----
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 54 ++++++++++----------
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c | 8 ++--
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 8 ++--
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 16 +++---
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 6 +-
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 2 +-
drivers/staging/rtl8712/usb_intf.c | 2 +-
net/atm/br2684.c | 2 +-
net/atm/lec.c | 3 +-
26 files changed, 148 insertions(+), 150 deletions(-)
--
1.7.3.1.g432b3.dirty
^ permalink raw reply
* Re: [PATCH 0/2] net: Changes in queue allocation and freeing
From: Tom Herbert @ 2010-11-15 21:04 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20101115.105822.233710935.davem@davemloft.net>
On Mon, Nov 15, 2010 at 10:58 AM, David Miller <davem@davemloft.net> wrote:
> From: Tom Herbert <therbert@google.com>
> Date: Tue, 9 Nov 2010 12:47:26 -0800 (PST)
>
>> Changes to both RX and TX queue allocation. In both cases allocate
>> in alloc_netdev_mq and free in free_netdev. For RX the reference
>> couting also changed, the device reference count can now be used.
>
> Both applied, with the comment removal added as promised.
>
Thanks.
> I assume you'll spin a new version of the XPS patches
> against this?
>
Yes, those will be forthcoming.
> Thanks!
>
^ permalink raw reply
* Re: the future of ethtool
From: Jeff Garzik @ 2010-11-15 21:03 UTC (permalink / raw)
To: Ben Hutchings; +Cc: NetDev, David Miller
In-Reply-To: <1289852326.2586.32.camel@bwh-desktop>
On 11/15/2010 03:18 PM, Ben Hutchings wrote:
> On Mon, 2010-11-15 at 14:41 -0500, Jeff Garzik wrote:
>> Thanks for accepting ethtool maintainership.
>>
>> There are two key unresolved issues with ethtool that are worth noting
>> to the next maintainer. Both of these come from years of user and
>> customer complaints.
>>
>> 1) ethtool command line interface.
>>
>> For 1,001 minor reasons of user taste and expectation, people tend to
>> complain about the command line interface. Due to script usage it is
>> set in stone, and has been since before my tenure. But users
>> continually request something more flexible, often, in particular,
>> wanting to set multiple settings in one execution, or wanting to apply
>> the same setting to multiple interface in one execution.
>>
>> Obviously one can script this, but, it is probably the #1 user request.
>
> Thinking further along those lines, it would be useful to have ethtool
> API bindings for Perl/Python/whatever, though those belong outside of
> the current ethtool package. I tried doing that for use in my own
> scripts and it looks reasonably practical, though I'm not volunteering
> to maintain such bindings.
I agree. FWIW, python-ethtool exists out there in the wild.
There is
git://git.kernel.org/pub/scm/linux/kernel/git/acme/python-ethtool.git
but I'm pretty sure acme handed off maintainership to someone else. If
you have the energy, integrating that into the official ethtool package
would probably be welcomed by all parties.
>> My thought was to create "nictool", a new tool with more flexible
>> command line interface, using the same old ethtool ioctls currently in
>> use today. ('nictool' also solves a minor naming complaint from
>> wireless and other people, who use ethtool on non-ethernet network
>> interfaces)
>
> I agree, some of the ethtool operations are very Ethernet-specific but
> enough of them are applicable to other media that this makes sense.
>
> I've recently been looking at FreeBSD where the sort of configuration we
> do through ethtool is invoked through ifconfig, but then ifconfig is
> effectively deprecated on Linux...
FreeBSD is back in the stone ages, when it comes to this sort of thing, IMO.
Though, I do understand users' desire for a single tool that configures
both generic network interface parameters and hardware-specific,
vendor-specific interface parameters.
>> 2) multiple settings and the ethtool kernel interface
>>
>> Another common complaint is related to multiple settings, and associated
>> hardware NIC resets.
>>
>> Many ethtool driver implementations look like this:
>>
>> ethtool_op_do_something()
>> stop RX/TX
>> apply settings
>> perform full NIC reset, consuming much time
>> start RX/TX
>>
>> The problem arises when the user wishes to change multiple hardware
>> attributes at the same time. A user wishing to change 4 attributes
>> could wind up with 4 ethtool(1) invocations, with 4 accompanying
>> hardware NIC resets. Time consuming, inefficient, and unnecessary.
>
> Right. In fact the begin() and complete() operations look like they
> were meant to support this sort of optimisation. Is that the case?
Somewhat...
->begin() and ->complete() were initially for reducing internal code
duplication. You would put stop-RXTX in begin(), and
nic-reset/start-RXTX in complete().
Fundamentally, the ioctl interface itself is still fine-grained. You
don't have ETHTOOL_BEGIN and ETHTOOL_COMPLETE ioctls. And even if you
did, such operations would be fundamentally race-prone.
AFAICS, the only race-free way to implement would be to have userspace
issue a single ioctl that contains a list of operations to perform. eg.
A new ETHTOOL_MULTI_OP ioctl would contain
op SSET + payload
op SSG + payload
op SGSO + payload
and the kernel would handle that internally by calling
->begin()
->set_settings()
->set_sg()
->set_gso()
->complete()
So the kernel API is largely already there, while the userspace ABI
constrains us mightily.
Jeff
^ permalink raw reply
* Re: [PATCH] r8169: fix checksum broken
From: Francois Romieu @ 2010-11-15 21:01 UTC (permalink / raw)
To: Shan Wei; +Cc: David Miller, netdev@vger.kernel.org, jgarzik
In-Reply-To: <4CE0A994.4080606@cn.fujitsu.com>
Shan Wei <shanwei@cn.fujitsu.com> :
[...]
> If these are right, driver will set ip_summed with CHECKSUM_UNNECESSARY for other
> upper protocol, e.g. sctp, igmp protocol. This will cause protocol stack ignores
> checksum check for packets with invalid checksum.
The documentation of these bits is identical for the 8139c+ and the 8169.
--
Ueimor
^ permalink raw reply
* [PATCH] gianfar: fix signedness issue
From: Nicolas Kaiser @ 2010-11-15 20:59 UTC (permalink / raw)
To: Kumar Gala; +Cc: netdev, kernel-janitors, linux-kernel
irq_of_parse_and_map() has an unsigned return type.
Testing for a negative error value doesn't work here.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
I see that in numerous places the return value is tested
for NO_IRQ. I hope it's the right thing to do here as well?
drivers/net/gianfar.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 49e4ce1..d1bec62 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -577,11 +577,10 @@ static int gfar_parse_group(struct device_node *np,
irq_of_parse_and_map(np, 1);
priv->gfargrp[priv->num_grps].interruptError =
irq_of_parse_and_map(np,2);
- if (priv->gfargrp[priv->num_grps].interruptTransmit < 0 ||
- priv->gfargrp[priv->num_grps].interruptReceive < 0 ||
- priv->gfargrp[priv->num_grps].interruptError < 0) {
+ if (priv->gfargrp[priv->num_grps].interruptTransmit == NO_IRQ ||
+ priv->gfargrp[priv->num_grps].interruptReceive == NO_IRQ ||
+ priv->gfargrp[priv->num_grps].interruptError == NO_IRQ)
return -EINVAL;
- }
}
priv->gfargrp[priv->num_grps].grp_id = priv->num_grps;
--
1.7.2.2
^ permalink raw reply related
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