linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@web.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Ivo van Doorn <ivdoorn@gmail.com>,
	Tomas Winkler <tomasw@gmail.com>,
	"Luis R. Rodriguez" <mcgrof@gmail.com>,
	Nick Kossifidis <mickflemm@gmail.com>,
	Bob Copeland <me@bobcopeland.com>, Michael Buesch <mb@bu3sch.de>,
	Sujith Manoharan <Sujith.Manoharan@atheros.com>,
	Kalle Valo <kalle.valo@nokia.com>
Subject: Re: [RFT] mac80211: clean up set_key callback
Date: Tue, 9 Dec 2008 13:36:31 +0100	[thread overview]
Message-ID: <200812091336.31889.chunkeey@web.de> (raw)
In-Reply-To: <1228757035.22164.94.camel@johannes.berg>

On Monday 08 December 2008 18:23:55 Johannes Berg wrote:
> The set_key callback now seems rather odd, passing a MAC address
> instead of a station struct, and a local address instead of a
> vif struct. Change that.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
Acked-by: Christian Lamparter <chunkeey@web.de>

> --- everything.orig/drivers/net/wireless/p54/p54common.c	2008-12-08 17:47:11.000000000 +0100
> +++ everything/drivers/net/wireless/p54/p54common.c	2008-12-08 17:53:09.000000000 +0100
> @@ -1938,7 +1938,7 @@ static void p54_bss_info_changed(struct 
>  }
>  
>  static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
> -		       const u8 *local_address, const u8 *address,
> +		       struct ieee80211_vif *vif, struct ieee80211_sta *sta,
>  		       struct ieee80211_key_conf *key)
>  {
>  	struct p54_common *priv = dev->priv;
> @@ -2002,8 +2002,8 @@ static int p54_set_key(struct ieee80211_
>  	rxkey->entry = key->keyidx;
>  	rxkey->key_id = key->keyidx;
>  	rxkey->key_type = algo;
> -	if (address)
> -		memcpy(rxkey->mac, address, ETH_ALEN);
> +	if (sta)
> +		memcpy(rxkey->mac, sta->addr, ETH_ALEN);
>  	else
>  		memset(rxkey->mac, ~0, ETH_ALEN);
>  	if (key->alg != ALG_TKIP) {

      parent reply	other threads:[~2008-12-09 12:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 17:23 [RFT] mac80211: clean up set_key callback Johannes Berg
2008-12-08 20:11 ` Michael Buesch
2008-12-08 20:13   ` Johannes Berg
2008-12-08 22:53 ` Ivo van Doorn
2008-12-08 23:01   ` Johannes Berg
2008-12-09  1:01 ` Bob Copeland
2008-12-09  1:07   ` Johannes Berg
2008-12-09 10:23 ` Kalle Valo
2008-12-09 10:38 ` Samuel Ortiz
2008-12-09 12:36 ` Christian Lamparter [this message]

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=200812091336.31889.chunkeey@web.de \
    --to=chunkeey@web.de \
    --cc=Sujith.Manoharan@atheros.com \
    --cc=ivdoorn@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=kalle.valo@nokia.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=mcgrof@gmail.com \
    --cc=me@bobcopeland.com \
    --cc=mickflemm@gmail.com \
    --cc=tomasw@gmail.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).