[PATCH] Revert "nl80211: Use global netlink rtm event object"

Ben Greear greearb
Wed Nov 2 08:48:26 PDT 2011


On 11/02/2011 03:22 AM, Johannes Berg wrote:
> On Fri, 2011-10-28 at 09:09 -0700, Ben Greear wrote:
>> On 10/28/2011 08:37 AM, Johannes Berg wrote:
>>> From: Johannes Berg<johannes.berg at intel.com>
>>>
>>> This reverts commit 36d84860bbe09641f782fcc21b09e5a6952b4629.
>>>
>>> This commit completely broke P2P operation.
>>>
>>> ---
>>> I'm very unhappy now as I just spent a long time tracking this down.
>>>
>>> TEST YOUR PATCHES!
>>
>> I did test it, but not with p2p (and bundled with the other pending
>> global-netlink patches).  Any idea what is why
>> this breaks p2p?  Are there any directions anywhere for how
>> to set up a p2p environment for testing?
>
> I apologies for the rash email. I realise you can't possibly test every
> combination of things, it just seemed a very common thing to me though I
> guess you don't do P2P at all.
>
> I see Jouni has fixed this -- essentially what I found later is what
> broke it is we would before this patch not have listened to netlink
> events about that interface, now we did before and got a DOWN event
> while creating it.

No problem.  I certainly understand the frustration!

I've had similar issues with netlink in my own code, and my
solution was to have an explicit 'slurpNetlinkSocket()' call
that read all events.  So, you could do something like:

set interface down
slurp
set interface up

Then you can dodge a lot of the transient down/up events.  But, it's
still a mess (in my code at least)...

The socket is also slurped as part of the normal select/poll loop
as well of course.

Thanks,
Ben

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




More information about the Hostap mailing list