Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <j@w1.fi>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] nl80211: New command for adding extra IE(s) into management frames
Date: Tue, 13 Jan 2009 14:55:47 +0100	[thread overview]
Message-ID: <1231854947.3671.33.camel@johannes> (raw)
In-Reply-To: <20090113134948.GA16694@jm.kir.nu>

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

On Tue, 2009-01-13 at 15:49 +0200, Jouni Malinen wrote:
> On Tue, Jan 13, 2009 at 02:38:57PM +0100, Johannes Berg wrote:
> 
> > kmemdup? Might also make sense to not try the allocation if we're going
> > to refuse it anyway, but that might be complicated to do and probably
> > doesn't matter.
> 
> I did not know there is such a thing as kmemdup (apparently not that
> many other people, either, taken into account it is not used anywhere in
> the generic wireless code). Anyway, yes, it would work here.

Heh. Yeah, I think it's a fairly recent addition to the API, maybe two
years old or so.

> Moving the allocation to be done for each subtype separately would add
> quite a bit of extra code and error paths. Doing it once resulted in
> simpler implementation. The array version was much simpler on this area,
> but with separate variables for each subtype, I think it is better to
> just allocate (and deal with NULL) once even if we will immediately
> after this need to free the buffer in the case the request is going to
> be refused.

Good point. The only other solution I could come up with was having
set_mgmt_extra_ie_sta return a u8 ** and size_t * that are assigned, but
that seems too ugly.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2009-01-13 13:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13 11:51 [PATCH] nl80211: New command for adding extra IE(s) into management frames Jouni Malinen
2009-01-13 13:38 ` Johannes Berg
2009-01-13 13:49   ` Jouni Malinen
2009-01-13 13:55     ` Johannes Berg [this message]
2009-01-13 14:03   ` [PATCHv2] " Jouni Malinen

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=1231854947.3671.33.camel@johannes \
    --to=johannes@sipsolutions.net \
    --cc=j@w1.fi \
    --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