linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Michael Wu <flamingice@sourmilk.net>
Cc: John Linville <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH 3/3] adm8211: Adapt to filter configuration API
Date: Wed, 19 Sep 2007 19:46:43 +0200	[thread overview]
Message-ID: <200709191946.43300.mb@bu3sch.de> (raw)
In-Reply-To: <200709181742.33948.flamingice@sourmilk.net>

On Tuesday 18 September 2007 23:42:33 Michael Wu wrote:
> From: Michael Wu <flamingice@sourmilk.net>
> 
> This makes adm8211 use the new filter configuration API in mac80211.
> 
> Signed-off-by: Michael Wu <flamingice@sourmilk.net>
> ---

>  static int adm8211_add_interface(struct ieee80211_hw *dev,
>  				 struct ieee80211_if_init_conf *conf)
>  {
>  	struct adm8211_priv *priv = dev->priv;
> -	/* NOTE: using IEEE80211_IF_TYPE_MGMT to indicate no mode selected */
> -	if (priv->mode != IEEE80211_IF_TYPE_MGMT)
> -		return -1;
> +	if (priv->mode != IEEE80211_IF_TYPE_MNTR)
> +		return -EOPNOTSUPP;
>  
>  	switch (conf->type) {
>  	case IEEE80211_IF_TYPE_STA:
> -	case IEEE80211_IF_TYPE_MNTR:
>  		priv->mode = conf->type;
>  		break;
>  	default:
>  		return -EOPNOTSUPP;
>  	}
>  
> -	priv->mac_addr = conf->mac_addr;
> +	ADM8211_IDLE();
> +
> +	ADM8211_CSR_WRITE(PAR0, *(u32 *)conf->mac_addr);
> +	ADM8211_CSR_WRITE(PAR1, *(u16 *)(conf->mac_addr + 4));

This is broken on BigEndian platforms.
use cpu_to_leX().
You can also replace the handcoded endianness conversion in
adm8211_set_bssid by cpu_to_leX().

> +	adm8211_update_mode(dev);
> +
> +	ADM8211_RESTORE();
>  
>  	return 0;
>  }


-- 
Greetings Michael.

  reply	other threads:[~2007-09-19 17:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070918213833.8850.90828.stgit@magic.sourmilk.net>
2007-09-18 21:42 ` [PATCH 2/3] rtl8187: Adapt to filter configuration API Michael Wu
2007-09-18 21:42 ` [PATCH 3/3] adm8211: " Michael Wu
2007-09-19 17:46   ` Michael Buesch [this message]
2007-09-19 21:03     ` Michael Wu
2007-09-20 13:02       ` Michael Buesch
2007-09-20  1:09   ` Johannes Berg

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=200709191946.43300.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=flamingice@sourmilk.net \
    --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).