From: Ben Greear <greearb@candelatech.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: ath9k: /proc/net/wireless always shows status of 0
Date: Mon, 26 Jul 2010 16:36:43 -0700 [thread overview]
Message-ID: <4C4E1C0B.9040608@candelatech.com> (raw)
In-Reply-To: <AANLkTimnZ9pSfVLsEPgiDPyc=_eUnyLj89RHCC6rsaX8@mail.gmail.com>
On 07/26/2010 04:30 PM, Luis R. Rodriguez wrote:
> On Mon, Jul 26, 2010 at 4:17 PM, Ben Greear<greearb@candelatech.com> wrote:
>> On 07/26/2010 03:54 PM, Luis R. Rodriguez wrote:
>>>
>>> On Mon, Jul 26, 2010 at 3:00 PM, Ben Greear<greearb@candelatech.com>
>>> wrote:
>>>>
>>>> On 07/26/2010 12:49 PM, Ben Greear wrote:
>>>>>
>>>>> This is with today's wireless-testing (with no extra hacks)
>>>>
>>>> Maybe a better question: In 2.6.31 you could mount debugfs at /debug
>>>> and get the state with:
>>>> cat /debug/ieee80211/sta0/state
>>>
>>> debugfs is not static API. In fact that's a big reason why we use it.
>>> I considered defining a filesystem API for 802.11 using configfs but
>>> our priority is to first get nl80211 feature-complete with respect to
>>> wext, which we have completed now. But anyway, debugfs is *not* API
>>> and you should not rely on it, if you want to define API consider
>>> configfs.
>>>
>>>> It seems in .34 there is only phy0 info in debugfs. Or, am I
>>>> just not looking in the right place?
>>>>
>>>> I don't mind hacking code, but I'd appreciate a pointer to the
>>>> right part of the code if anyone has suggestions.
>>>
>>> The other thing you pointed out with wext, you should stop using wext
>>> and instead rely on nl80211. It is true that if you see something on
>>> /proc/net/wireless/ that was there before but not there now it is a
>>> regression and it should be addressed. Not sure where the status crap
>>> comes from on wext.
>>
>> I really don't care what API I end up using..I am just looking for some
>> way to report to users whether the STA is in the various states that
>> used to be defined as something similar to:
>>
>> enum ieee80211_state {
>> IEEE80211_UNINITIALIZED = 0,
>> IEEE80211_INITIALIZED,
>> IEEE80211_ASSOCIATING,
>> IEEE80211_ASSOCIATED,
>> IEEE80211_AUTHENTICATING,
>> IEEE80211_AUTHENTICATED,
>> IEEE80211_SHUTDOWN
>> };
>>
>> I have been reading the net/wireless code, but so far I don't see
>> any state machine type logic where this state might be kept. Maybe
>> it would have to be inferred from something else?
>
> You can use nl28011 and register for netlink multicast messages which
> broadcast device state changes like the ones you mentioned. These come
> in on iw via event.c, see print_event() and see the case statements
> for NL80211_CMD_ASSOCIATE, NL80211_CMD_DEAUTHENTICATE,
> NL80211_CMD_DISASSOCIATE, etc, you even get reason codes parsed for
> you too.
Ahhh, that is the kind of thing I'm looking for. I'll check out that
code in detail tomorrow.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2010-07-26 23:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 19:49 ath9k: /proc/net/wireless always shows status of 0 Ben Greear
2010-07-26 22:00 ` Ben Greear
2010-07-26 22:54 ` Luis R. Rodriguez
2010-07-26 23:17 ` Ben Greear
2010-07-26 23:30 ` Luis R. Rodriguez
2010-07-26 23:36 ` Ben Greear [this message]
2010-07-26 23:51 ` Luis R. Rodriguez
2010-07-27 6:48 ` Johannes Berg
2010-07-27 6:54 ` Luis R. Rodriguez
2010-07-27 16:20 ` Ben Greear
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=4C4E1C0B.9040608@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.