linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Alina Friedrichsen <x-alina@gmx.net>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH] mac80211: Implement commit in wireless extensions
Date: Wed, 25 Feb 2009 23:27:01 +0100	[thread overview]
Message-ID: <d38edefd935f0aa5c8cca9aee1cf1d7b@localhost> (raw)
In-Reply-To: <20090225215631.289250@gmx.net> (sfid-20090225_225703_350502_23B11EFA)


On Wed, 25 Feb 2009 22:56:31 +0100, "Alina Friedrichsen" <x-alina@gmx.net>
wrote:
> This implements commit in wireless extensions for completeness and maybe
it
> could be useful for debugging to initiate a new rejoining process without
> changing the config.

I don't think that we should do this -- "completeness" for wext is a bad
argument and for debugging you can also do the other things.

> I not so familiar with nl80211 at the moment, so I want add it to nl80211
> in a second patch.

No, you won't. nl80211 shall not require such hacks.

johannes

> Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
> ---
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index ecbc8e0..7f00c70 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -920,6 +920,7 @@ static inline int ieee80211_bssid_match(const u8
> *raddr, const u8 *addr)
>  
>  int ieee80211_hw_config(struct ieee80211_local *local, u32 changed);
>  int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32
changed);
> +int ieee80211_commit(struct ieee80211_sub_if_data *sdata);
>  void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx);
>  void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data
*sdata,
>  				      u32 changed);
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index f38db4d..1b2d598 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -294,6 +294,20 @@ int ieee80211_hw_config(struct ieee80211_local
*local,
> u32 changed)
>  	return ret;
>  }
>  
> +void ieee80211_commit(struct ieee80211_sub_if_data *sdata)
> +{
> +	switch (sdata->vif.type) {
> +	case NL80211_IFTYPE_ADHOC:
> +		ieee80211_ibss_commit(sdata);
> +		break;
> +	case NL80211_IFTYPE_STATION:
> +		ieee80211_sta_commit(sdata);
> +		break;
> +	default:
> +		break;
> +	}
> +}
> +
>  void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data
*sdata,
>  				      u32 changed)
>  {
> diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
> index f6924fc..1ac0516 100644
> --- a/net/mac80211/wext.c
> +++ b/net/mac80211/wext.c
> @@ -121,6 +121,15 @@ static int ieee80211_set_encryption(struct
> ieee80211_sub_if_data *sdata, u8 *sta
>  	return err;
>  }
>  
> +static int ieee80211_ioctl_commit(struct net_device *dev,
> +				  struct iw_request_info *info,
> +				  struct iw_point *data, char *extra)
> +{
> +	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> +	ieee80211_commit(sdata);
> +	return 0;
> +}
> +
>  static int ieee80211_ioctl_siwgenie(struct net_device *dev,
>  				    struct iw_request_info *info,
>  				    struct iw_point *data, char *extra)
> @@ -1035,7 +1044,7 @@ static int ieee80211_ioctl_siwencodeext(struct
> net_device *dev,
>  
>  static const iw_handler ieee80211_handler[] =
>  {
> -	(iw_handler) NULL,				/* SIOCSIWCOMMIT */
> +	(iw_handler) ieee80211_ioctl_commit,		/* SIOCSIWCOMMIT */
>  	(iw_handler) cfg80211_wext_giwname,		/* SIOCGIWNAME */
>  	(iw_handler) NULL,				/* SIOCSIWNWID */
>  	(iw_handler) NULL,				/* SIOCGIWNWID */

  reply	other threads:[~2009-02-25 22:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25 21:56 [PATCH] mac80211: Implement commit in wireless extensions Alina Friedrichsen
2009-02-25 22:27 ` Johannes Berg [this message]
2009-02-25 22:44   ` Alina Friedrichsen
2009-02-25 22:59     ` 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=d38edefd935f0aa5c8cca9aee1cf1d7b@localhost \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=x-alina@gmx.net \
    /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).