linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Jiri Benc <jbenc@suse.cz>, John Linville <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Export short-preamble bit to drivers
Date: Wed, 27 Jun 2007 16:37:05 +0200	[thread overview]
Message-ID: <200706271637.05587.mb@bu3sch.de> (raw)
In-Reply-To: <1182954627.4769.30.camel@johannes.berg>

On Wednesday 27 June 2007 16:30:27 Johannes Berg wrote:
> On Wed, 2007-06-27 at 15:08 +0200, Michael Buesch wrote:
> > On Wednesday 27 June 2007 10:55:00 Johannes Berg wrote:
> > > On Mon, 2007-06-25 at 16:28 +0200, Michael Buesch wrote:
> > > 
> > > >  	case PRISM2_PARAM_PREAMBLE:
> > > > -		local->short_preamble = value;
> > > > +		if (value)
> > > > +			local_to_hw(local)->conf.flags |= IEEE80211_CONF_SHORT_PREAMBLE;
> > > > +		else
> > > > +			local_to_hw(local)->conf.flags &= ~IEEE80211_CONF_SHORT_PREAMBLE;
> > > > +		if (ieee80211_hw_config(local))
> > > > +			ret = -EINVAL;
> > > 
> > > any reason not to return the actual error code from hw_config here? Not
> > > that it'll be any different from -EINVAL I expect...
> > 
> > The reason is copy&paste from other PRISM2 IOCTLs ;)
> > I'm OK with the real error code, too.
> 
> I don't really care either way.
> 
> > Though, the error code of hw_config is usually not useful _at all_.
> > As it might not be the SHORT_PRMBL flag that produced it, but some of the
> > other config settings.
> > I would probably vote for any code in mac80211 to ignore that return value,
> > except the places where a failure of hw_config would be fatal (init or
> > places like that).
> 
> Yeah, there's a todo item saying that we need a way to just commit the
> changed settings.

Well, sane drivers should basically already do that, as most information
is saved redundantly in the driver's structs. Especially for operations
that can fail.
So it's basically a TODO for drivers, rather than mac80211.

-- 
Greetings Michael.

  reply	other threads:[~2007-06-27 14:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-25 14:28 [PATCH] mac80211: Export short-preamble bit to drivers Michael Buesch
2007-06-27  8:55 ` Johannes Berg
2007-06-27 13:08   ` Michael Buesch
2007-06-27 14:30     ` Johannes Berg
2007-06-27 14:37       ` Michael Buesch [this message]
2007-06-27 13:33   ` Michael Buesch
2007-06-27 13:58     ` Johannes Berg
2007-06-28  1:40 ` Michael Wu
2007-06-28  8:35   ` Michael Buesch
2007-06-28  9:57   ` Johannes Berg
2007-06-29  6:01     ` Michael Wu
2007-06-29  6:07       ` Johannes Berg
2007-06-29  8:13       ` Michael Buesch
2007-06-29 22:39         ` Daniel Drake
2007-06-30 12:47           ` Michael Buesch

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=200706271637.05587.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=jbenc@suse.cz \
    --cc=johannes@sipsolutions.net \
    --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).