linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Given an interface, how to tell if it's associated?
@ 2010-09-27 23:17 Ben Greear
  2010-09-28  7:23 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Greear @ 2010-09-27 23:17 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org

I need to iterate through all local->interfaces and
if they are stations, figure out if they are associated
or not.

I tried checking for existence of sdata->u.mgd.associated,
but it is always null (I'm using non-encrypted links
currently, in case that matters.)

I'd also like to know if any are authenticated.

I cannot figure out a clean way to do this..any suggestions?

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Given an interface, how to tell if it's associated?
  2010-09-27 23:17 Given an interface, how to tell if it's associated? Ben Greear
@ 2010-09-28  7:23 ` Johannes Berg
  2010-09-28 13:40   ` Ben Greear
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2010-09-28  7:23 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless@vger.kernel.org

On Mon, 2010-09-27 at 16:17 -0700, Ben Greear wrote:
> I need to iterate through all local->interfaces and
> if they are stations, figure out if they are associated
> or not.
> 
> I tried checking for existence of sdata->u.mgd.associated,
> but it is always null (I'm using non-encrypted links
> currently, in case that matters.)

That's correct, if it's always NULL then you're not associated properly
I guess?

johannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Given an interface, how to tell if it's associated?
  2010-09-28  7:23 ` Johannes Berg
@ 2010-09-28 13:40   ` Ben Greear
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Greear @ 2010-09-28 13:40 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org

On 09/28/2010 12:23 AM, Johannes Berg wrote:
> On Mon, 2010-09-27 at 16:17 -0700, Ben Greear wrote:
>> I need to iterate through all local->interfaces and
>> if they are stations, figure out if they are associated
>> or not.
>>
>> I tried checking for existence of sdata->u.mgd.associated,
>> but it is always null (I'm using non-encrypted links
>> currently, in case that matters.)
>
> That's correct, if it's always NULL then you're not associated properly
> I guess?

Well, it seemed to work and passed traffic fine, so I'm at a loss.  Perhaps
it just wasn't associated while one of the stations was scanning.

Either way, I added logic to iterate through all stas and check it's
flags, and that seems to work (see the can_scan_one patch logic I posted).

Thanks,
Ben


>
> johannes


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-28 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 23:17 Given an interface, how to tell if it's associated? Ben Greear
2010-09-28  7:23 ` Johannes Berg
2010-09-28 13:40   ` Ben Greear

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).