public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, stable@kernel.org
Subject: [PATCH v2] mac80211: send association event on IBSS create
Date: Tue, 03 Jun 2008 23:39:55 -0400	[thread overview]
Message-ID: <1212550795.11852.1.camel@localhost.localdomain> (raw)
In-Reply-To: <1212543981.4237.19.camel@localhost.localdomain>

=EF=BB=BFOtherwise userspace has no idea the IBSS creation succeeded.

Signed-off-by: Dan Williams <dcbw@redhat.com>
-------------

John, please apply to 2.6.26 and later.

Stable: applicable to 2.6.24 and 2.6.25 as well.  File used to be calle=
d
net/mac80211/ieee80211_sta.c and diff should still apply with minor
fixup to the second hunk.

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c220bed..73c66e0 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2348,6 +2348,7 @@ static int ieee80211_sta_join_ibss(struct net_dev=
ice *dev,
 	u8 *pos;
 	struct ieee80211_sub_if_data *sdata;
 	struct ieee80211_supported_band *sband;
+	union iwreq_data wrqu;
=20
 	sband =3D local->hw.wiphy->bands[local->hw.conf.channel->band];
=20
@@ -2491,6 +2492,10 @@ static int ieee80211_sta_join_ibss(struct net_de=
vice *dev,
 	ifsta->state =3D IEEE80211_IBSS_JOINED;
 	mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL);
=20
+	memset(&wrqu, 0, sizeof(wrqu));
+	memcpy(wrqu.ap_addr.sa_data, bss->bssid, ETH_ALEN);
+	wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
+
 	return res;
 }
=20

--
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:[~2008-06-04  3:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04  1:46 [PATCH] mac80211: send association event on IBSS create Dan Williams
2008-06-04  3:39 ` Dan Williams [this message]
2008-06-04  6:10   ` [PATCH v2] " Johannes Berg
2008-06-09 20:24 ` [stable] [PATCH] " Chris Wright

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=1212550795.11852.1.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=stable@kernel.org \
    /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