linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Ben Greear <greearb@candelatech.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wireless:  Fix ethtool stats and other ops.
Date: Wed, 05 Dec 2012 18:57:21 +0100	[thread overview]
Message-ID: <87a9ts4c1q.fsf@nemi.mork.no> (raw)
In-Reply-To: <1354729192-22945-1-git-send-email-greearb@candelatech.com> (greearb-my8's message of "Wed, 5 Dec 2012 09:39:52 -0800")

Ben Greear <greearb@candelatech.com> writes:

> net/core/dev.c now assigns a default ethtool ops, so
> the net/wireless/core.c check for existing ops is always true
> so the wireless ops would never be assigned.
>
> Simply remove the check for existing ops and always assign
> the wireless ops.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>  net/wireless/core.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/net/wireless/core.c b/net/wireless/core.c
> index 4e6fe62..6309699 100644
> --- a/net/wireless/core.c
> +++ b/net/wireless/core.c
> @@ -863,8 +863,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;
> +		dev->ethtool_ops = &cfg80211_ethtool_ops;
>  
>  		if ((wdev->iftype == NL80211_IFTYPE_STATION ||
>  		     wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||


Won't this break drivers which for some reason have their own
ethtool_ops?

bjorn@nemi:/usr/local/src/git/linux$ git grep -- "->ethtool_ops" drivers/net/wireless/
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c:    ndev->ethtool_ops = &brcmf_ethtool_ops;
drivers/net/wireless/ipw2x00/ipw2100.c: dev->ethtool_ops = &ipw2100_ethtool_ops;
drivers/net/wireless/ipw2x00/ipw2200.c: net_dev->ethtool_ops = &ipw_ethtool_ops;
drivers/net/wireless/libertas/main.c:   dev->ethtool_ops = &lbs_ethtool_ops;
drivers/net/wireless/libertas/mesh.c:   mesh_dev->ethtool_ops = &lbs_ethtool_ops;
drivers/net/wireless/prism54/islpci_dev.c:      ndev->ethtool_ops = &islpci_ethtool_ops;



Bjørn

  reply	other threads:[~2012-12-05 17:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 17:39 [PATCH] wireless: Fix ethtool stats and other ops greearb
2012-12-05 17:57 ` Bjørn Mork [this message]
2012-12-05 18:02   ` Ben Greear
2012-12-06 12:25     ` Stanislaw Gruszka
2012-12-06 15:22       ` Vladimir Kondratiev
2012-12-06 20:15       ` Ben Greear
2012-12-07  9:50         ` Stanislaw Gruszka
2012-12-07 11:30           ` Bjørn Mork
2012-12-07 11:40             ` Stanislaw Gruszka
2012-12-07 12:16             ` [RFC] wireless: check against default_ethtool_ops Stanislaw Gruszka
2012-12-07 16:27               ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a9ts4c1q.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=greearb@candelatech.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).