From: Dan Williams <dcbw@redhat.com>
To: Sebastian Siewior <liber+tas@ml.breakpoint.cc>
Cc: linux-wireless@vger.kernel.org,
David Woodhouse <dwmw2@infradead.org>,
linville@tuxdriver.com, libertas-dev@lists.infradead.org
Subject: Re: [PATCH] [NET] libertas: check for mesh support before trying to use it
Date: Mon, 12 May 2008 12:34:16 -0400 [thread overview]
Message-ID: <1210610056.23717.3.camel@localhost.localdomain> (raw)
In-Reply-To: <20080510072428.GA1153@Chamillionaire.breakpoint.cc>
On Sat, 2008-05-10 at 09:24 +0200, Sebastian Siewior wrote:
> From: Sebastian Siewior <sebastian@breakpoint.cc>
>
> This will prevent the execution of lbs_ethtool_get_stats() via ethtool -S
> if there is no mesh support.
>
> Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
> ---
> Dan, this will test prevent the usage of ethtool -S in case there is no
> mesh support. If you fine with this than we could apply my or David's
> other patch to enable the function again and then worry about the error
> path.
> David: I saw your patch that is doing this in a other way but I thing
> that one looks better :)
>
> drivers/net/wireless/libertas/ethtool.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
> index dcfdb40..a79d698 100644
> --- a/drivers/net/wireless/libertas/ethtool.c
> +++ b/drivers/net/wireless/libertas/ethtool.c
> @@ -113,8 +113,14 @@ static void lbs_ethtool_get_stats(struct net_device * dev,
>
> static int lbs_ethtool_get_sset_count(struct net_device * dev, int sset)
> {
> + struct lbs_private *priv = dev->priv;
> +
> switch (sset) {
> case ETH_SS_STATS:
> +
> + if (!priv->mesh_tlv)
> +
We usually use
if (!priv->mesh_dev)
for checking whether mesh is open or not... Will that not work here?
Dan
> return -EOPNOTSUPP;
> +
> return MESH_STATS_NUM;
> default:
> return -EOPNOTSUPP;
next prev parent reply other threads:[~2008-05-12 16:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 16:13 [PATCH] libertas: Fix ethtool statistics David Woodhouse
2008-04-17 18:02 ` Dan Williams
2008-04-17 19:44 ` Sebastian Siewior
2008-04-18 11:09 ` David Woodhouse
2008-05-10 7:24 ` [PATCH] [NET] libertas: check for mesh support before trying to use it Sebastian Siewior
2008-05-12 16:34 ` Dan Williams [this message]
2008-05-12 20:51 ` Sebastian Siewior
2008-05-13 0:09 ` John W. Linville
2008-04-18 9:02 ` [PATCH] libertas: Fix ethtool statistics Holger Schurig
2008-04-18 9:11 ` David Woodhouse
2008-04-18 9:49 ` Holger Schurig
2008-04-18 11:15 ` David Woodhouse
2008-04-18 13:10 ` Holger Schurig
2008-04-20 8:41 ` Sebastian Siewior
2008-04-20 10:56 ` David Woodhouse
2008-04-20 19:10 ` Sebastian Siewior
2008-04-21 6:42 ` David Woodhouse
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=1210610056.23717.3.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=dwmw2@infradead.org \
--cc=liber+tas@ml.breakpoint.cc \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).