linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Replacement for: Implement commit in wireless extensions
@ 2009-02-27 18:43 Alina Friedrichsen
  2009-02-27 21:05 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Alina Friedrichsen @ 2009-02-27 18:43 UTC (permalink / raw)
  To: linux-wireless, linville, johannes

This patch _not_ implements commit in wireless extensions, but solves s=
ome dependencies needed by the other patches.

The maybe usage of this ioctl must discussed after the complete joining=
 process (STA and *IBSS*) in nl80211 defined.

I hope this is a compromise.

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 *r=
addr, const u8 *addr)
=20
 int ieee80211_hw_config(struct ieee80211_local *local, u32 changed);
 int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 chang=
ed);
+void 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 *sd=
ata,
 				      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 *lo=
cal, u32 changed)
 	return ret;
 }
=20
+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 *sd=
ata,
 				      u32 changed)
 {

--=20
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL
f=FCr nur 17,95 =BF/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T45=
69a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: Replacement for: Implement commit in wireless extensions
  2009-02-27 18:43 [PATCH] mac80211: Replacement for: Implement commit in wireless extensions Alina Friedrichsen
@ 2009-02-27 21:05 ` Johannes Berg
  2009-02-27 21:43   ` Alina Friedrichsen
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2009-02-27 21:05 UTC (permalink / raw)
  To: Alina Friedrichsen; +Cc: linux-wireless, linville

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

On Fri, 2009-02-27 at 19:43 +0100, Alina Friedrichsen wrote:
> This patch _not_ implements commit in wireless extensions, but solves some dependencies needed by the other patches.
> 
> The maybe usage of this ioctl must discussed after the complete joining process (STA and *IBSS*) in nl80211 defined.
> 
> I hope this is a compromise.
> 
> 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);
> +void 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;
> +	}

I don't really see a need for that, it's only called in what, two
places? And it makes things interdependent. At _least_ put it into a
more appropriate file like wext.c and open-code it in cfg.c

johannes

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: Replacement for: Implement commit in wireless extensions
  2009-02-27 21:05 ` Johannes Berg
@ 2009-02-27 21:43   ` Alina Friedrichsen
  0 siblings, 0 replies; 3+ messages in thread
From: Alina Friedrichsen @ 2009-02-27 21:43 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Hello Johannes!

> I don't really see a need for that, it's only called in what, two
> places? And it makes things interdependent.

One centralized function is in
every case easier to maintain.
=46or example if you add mesh mode to it.

> At _least_ put it into a
> more appropriate file like wext.c

This function is config interface independent,
so wext.c is not the right place for it.

> and open-code it in cfg.c

This would be a better place for it
if it should be added to
mac80211_config_ops. If not I think
main.c is the best place for it.

Regards
Alina

--=20
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL
f=FCr nur 17,95 =BF/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T45=
69a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-27 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 18:43 [PATCH] mac80211: Replacement for: Implement commit in wireless extensions Alina Friedrichsen
2009-02-27 21:05 ` Johannes Berg
2009-02-27 21:43   ` Alina Friedrichsen

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).