linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alina Friedrichsen" <x-alina@gmx.net>
To: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
	johannes@sipsolutions.net
Subject: [PATCH v2] mac80211: Creating new IBSS with fixed BSSID
Date: Wed, 28 Jan 2009 16:30:12 +0100	[thread overview]
Message-ID: <20090128153012.138700@gmx.net> (raw)

This fixes a bug when creating a new IBSS network with a fixed BSSID. T=
he fixed BSSID situation is now with one of my last patches handled in =
ieee80211_sta_find_ibss() function.

It's more robust to test against (ifsta->flags & IEEE80211_STA_PREV_BSS=
ID_SET), because ifsta->state is not seted right in every situation and=
 so the creating of the new IBSS network sometimes hangs after the firs=
t try to scan for a network to merge.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
---
diff -urN wireless-testing.orig/net/mac80211/mlme.c wireless-testing/ne=
t/mac80211/mlme.c
--- wireless-testing.orig/net/mac80211/mlme.c	2009-01-27 05:12:43.00000=
0000 +0000
+++ wireless-testing/net/mac80211/mlme.c	2009-01-28 15:47:19.000000000 =
+0000
@@ -2720,9 +2720,8 @@
=20
 	if (sdata && sdata->vif.type =3D=3D NL80211_IFTYPE_ADHOC) {
 		ifsta =3D &sdata->u.sta;
-		if (!(ifsta->flags & IEEE80211_STA_BSSID_SET) ||
-		    (!(ifsta->state =3D=3D IEEE80211_STA_MLME_IBSS_JOINED) &&
-		    !ieee80211_sta_active_ibss(sdata)))
+		if ((!(ifsta->flags & IEEE80211_STA_PREV_BSSID_SET)) ||
+		    !ieee80211_sta_active_ibss(sdata))
 			ieee80211_sta_find_ibss(sdata, ifsta);
 	}
=20

--=20
Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all=
en: http://www.gmx.net/de/go/multimessenger
--
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

             reply	other threads:[~2009-01-28 15:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 15:30 Alina Friedrichsen [this message]
2009-01-28 17:00 ` [PATCH v2] mac80211: Creating new IBSS with fixed BSSID Kalle Valo
2009-01-28 18:26   ` John W. Linville

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=20090128153012.138700@gmx.net \
    --to=x-alina@gmx.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).