linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Tomas Winkler <tomasw@gmail.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH 1/6] mac80211 ibss: flush only stations belonging to current interface
Date: Mon, 31 Mar 2008 19:22:59 +0200	[thread overview]
Message-ID: <20080331172433.692925000@sipsolutions.net> (raw)
In-Reply-To: 20080331172258.541914000@sipsolutions.net

When joining a new IBSS, all old stations are flushed, but currently
all stations belonging to all virtual interfaces are flushed, which
is wrong. This patch fixes it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/ieee80211_sta.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- everything.orig/net/mac80211/ieee80211_sta.c	2008-03-31 18:21:58.000000000 +0200
+++ everything/net/mac80211/ieee80211_sta.c	2008-03-31 18:22:23.000000000 +0200
@@ -2231,8 +2231,10 @@ static int ieee80211_sta_join_ibss(struc
 
 	sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
 
+	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+
 	/* Remove possible STA entries from other IBSS networks. */
-	sta_info_flush(local, NULL);
+	sta_info_flush(local, sdata);
 
 	if (local->ops->reset_tsf) {
 		/* Reset own TSF to allow time synchronization work. */
@@ -2245,7 +2247,6 @@ static int ieee80211_sta_join_ibss(struc
 
 	local->hw.conf.beacon_int = bss->beacon_int >= 10 ? bss->beacon_int : 10;
 
-	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	sdata->drop_unencrypted = bss->capability &
 		WLAN_CAPABILITY_PRIVACY ? 1 : 0;
 

-- 


  reply	other threads:[~2008-04-01 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 17:22 [PATCH 0/6] sta-info fixes, especially destroy() Johannes Berg
2008-03-31 17:22 ` Johannes Berg [this message]
2008-03-31 17:23 ` [PATCH 2/6] mac80211: fix sta_info_destroy(NULL) Johannes Berg
2008-03-31 17:23 ` [PATCH 3/6] mac80211: automatically free sta struct when insertion fails Johannes Berg
2008-04-01 13:21   ` [PATCH 3/6 v2] " Johannes Berg
2008-03-31 17:23 ` [PATCH 4/6] mac80211: clean up sta_info_destroy() users wrt. RCU/locking Johannes Berg
2008-03-31 17:23 ` [PATCH 5/6] mac80211: sta_info_flush() fixes Johannes Berg
2008-03-31 17:23 ` [PATCH 6/6] mac80211: fix sparse complaint in ieee80211_sta_def_wmm_params Johannes Berg
2008-04-01 21:06 ` [PATCH 0/6] sta-info fixes, especially destroy() Tomas Winkler

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=20080331172433.692925000@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=tomasw@gmail.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).