From: Will Hawkins Date: Tue, 19 Jun 2012 21:59:13 +0000 (-0400) Subject: mac80211: send auth in IBSS only if userspace isn't handling it X-Git-Tag: v3.6-rc1~125^2~57^2~1^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=452a6d22615bb8262a932b362f41fc5d89f03293;p=platform%2Fkernel%2Flinux-stable.git mac80211: send auth in IBSS only if userspace isn't handling it Check the auth frame registration count before sending "open system" authentication messages when a new station registers on a particular IBSS network. This stops us from sending out multiple authentication messages with different authentication algorithms. Signed-off-by: Will Hawkins [reword commit message a bit] Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 725cb4b..ff46ff4 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -279,7 +279,7 @@ static struct sta_info *ieee80211_ibss_finish_sta(struct sta_info *sta, /* If it fails, maybe we raced another insertion? */ if (sta_info_insert_rcu(sta)) return sta_info_get(sdata, addr); - if (auth) { + if (auth && !sdata->u.ibss.auth_frame_registrations) { ibss_vdbg("TX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=1)\n", sdata->vif.addr, sdata->u.ibss.bssid, addr); ieee80211_send_auth(sdata, 1, WLAN_AUTH_OPEN, NULL, 0,