linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ignacy Gawedzki <i@lri.fr>
To: linux-wireless@vger.kernel.org
Subject: sta_find_ibss (active_ibss=1) in a loop?
Date: Fri, 3 Jun 2011 22:16:44 +0200	[thread overview]
Message-ID: <20110603201644.GA7836@zenon.in.qult.net> (raw)

Hi,

I'm still investigating on that problem but have such a hard time reproducing
it that I thought maybe someone here could help.

I have a testbed of three nodes in IBSS (using carl9170 from compat-wireless'
latest snapshot), that happen to go into suspend-to-ram quite often.
Sometimes it appears one of the nodes just can't "see" some other node.
Then tcpdump doesn't see it either, but another vif in monitor mode sees
everyone just fine.

I activated as much debug options as I could and I saw something quite strange
in the kernel messages (just after the node goes back from suspend-to-ram):

  [16226.464987] ieee80211 phy14: device no longer idle - in use
  [16226.465043] wlan1: sta_find_ibss (active_ibss=0)
  [16226.465055]    sta_find_ibss: selected 83:12:97:63:54:f2 current
  00:00:00:00:00:00
  [16226.465063] wlan1: Selected IBSS BSSID 83:12:97:63:54:f2 based on
  configured SSID
  [16226.632608] ieee80211 phy14: Adding new IBSS station 00:26:f2:ed:60:f9
  (dev=wlan1)
  [16226.632648] ieee80211 phy14: Allocated STA 00:26:f2:ed:60:f9
  [16226.633549] ieee80211 phy14: Added IBSS STA 00:26:f2:ed:60:f9
  [16226.633598] wlan1: No active IBSS STAs - trying to scan for other IBSS
  networks with same SSID (merge)
  [16226.633626] ieee80211 phy14: Finished adding IBSS STA 00:26:f2:ed:60:f9
  [16226.948957] ieee80211 phy14: Adding new IBSS station 00:24:b2:5c:bb:b5
  (dev=wlan1)
  [16226.949004] ieee80211 phy14: Allocated STA 00:24:b2:5c:bb:b5
  [16226.950495] ieee80211 phy14: Added IBSS STA 00:24:b2:5c:bb:b5
  [16226.950593] ieee80211 phy14: Finished adding IBSS STA 00:24:b2:5c:bb:b5
  [16228.050250] wlan1: updated supp_rates set for 00:24:b2:5c:bb:b5 based on
  beacon/probe_resp (0x1 -> 0xfff)
  [16229.180184] ieee80211 phy14: Removed STA 00:24:b2:5c:bb:b5
  [16229.180339] ieee80211 phy14: Destroyed STA 00:24:b2:5c:bb:b5
  [16229.196176] ieee80211 phy14: Removed STA 00:26:f2:ed:60:f9
  [16229.196322] ieee80211 phy14: Destroyed STA 00:26:f2:ed:60:f9
  [16229.199085] ieee80211 phy14: Adding new IBSS station 00:26:f2:ed:60:f9
  (dev=wlan1)
  [16229.199113] ieee80211 phy14: Allocated STA 00:26:f2:ed:60:f9
  [16229.199845] ieee80211 phy14: Added IBSS STA 00:26:f2:ed:60:f9
  [16229.212204] ieee80211 phy14: device now idle
  [16229.212222] ieee80211 phy14: Finished adding IBSS STA 00:26:f2:ed:60:f9
  [16229.212909] ieee80211 phy14: device no longer idle - in use
  [16229.212956] wlan1: sta_find_ibss (active_ibss=1)
  [16229.277675] wlan1: sta_find_ibss (active_ibss=1)
  [16229.311661] wlan1: sta_find_ibss (active_ibss=1)
  [16229.379920] wlan1: sta_find_ibss (active_ibss=1)
  [16229.414232] wlan1: sta_find_ibss (active_ibss=1)
  ...

the following is just a long stream of sta_find_ibss (active_ibss=1).

>From that point on, the interface sees 00:26:f2:ed:60:f9 but not
00:24:b2:5c:bb:b5.  BTW, why are both neighbors removed?  When this problem is
not appearing, both neighbors are still removed, but they're both added
immediately after that (and there's no stream of sta_find_ibss).  Here only
00:26:f2:ed:60:f9 is added back.

As I read the code in net/mac80211/ibss.c to try to understand how things
work, I noticed the following in ieee80211_sta_find_ibss().  Apparently the
function does nothing if the call to ieee80211_sta_active_ibss() returns
non-zero, i.e. the last received frame from a known station was too recent.

So I wonder, what happens if state somehow becomes IEEE80211_IBSS_MLME_SEARCH
and a neighbor station is sending plenty of frames.  Apparently we don't come
out of this state, since we don't get a chance to set it back to
IEEE80211_IBSS_MLME_JOINED.

Am I obviously missing something here?

I can't confirm right now that this is indeed what's happening, but I'll post
more information as soon as possible.  Besides, if anyone has any suggestion
regarding what additional debug info could be useful, please go ahead.

Thanks,

Ignacy

-- 
NO CARRIER

             reply	other threads:[~2011-06-03 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 20:16 Ignacy Gawedzki [this message]
2011-06-03 20:49 ` sta_find_ibss (active_ibss=1) in a loop? Ignacy Gawedzki
2011-06-06 11:04   ` Ignacy Gawedzki
2011-06-06 14:31     ` Johannes Berg
2011-06-06 16:01       ` Ignacy Gawedzki
2011-06-06 16:11         ` Johannes Berg
2011-06-08 11:13           ` Ignacy Gawedzki
2011-06-08 11:26             ` Johannes Berg

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=20110603201644.GA7836@zenon.in.qult.net \
    --to=i@lri.fr \
    --cc=linux-wireless@vger.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;
as well as URLs for NNTP newsgroup(s).