Return-path: Received: from mail-px0-f182.google.com ([209.85.216.182]:45634 "EHLO mail-px0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755670Ab0A0SBU (ORCPT ); Wed, 27 Jan 2010 13:01:20 -0500 Received: by pxi12 with SMTP id 12so4581082pxi.33 for ; Wed, 27 Jan 2010 10:01:20 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1264511993.25642.9.camel@johannes.local> References: <1264511993.25642.9.camel@johannes.local> From: "Luis R. Rodriguez" Date: Wed, 27 Jan 2010 10:01:00 -0800 Message-ID: <43e72e891001271001r2cc39da4ka00a3eef06f6e139@mail.gmail.com> Subject: Re: [PATCH] mac80211: wait for beacon before enabling powersave To: Johannes Berg Cc: linville@tuxdriver.com, kalle.valo@iki.fi, linux-wireless@vger.kernel.org, j@w1.fi, buytenh@wantstofly.org, wey-yi.w.guy@intel.com Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: T24gVHVlLCBKYW4gMjYsIDIwMTAgYXQgNToxOSBBTSwgSm9oYW5uZXMgQmVyZwo8am9oYW5uZXNA c2lwc29sdXRpb25zLm5ldD4gd3JvdGU6Cj4gQmVjYXVzZSBEVElNIGluZm9ybWF0aW9uIGlzIHJl cXVpcmVkIGZvciBwb3dlcnNhdmUKPiBidXQgaXMgb25seSBjb252ZXllZCBpbiBiZWFjb25zLCB3 YWl0IGZvciBhIGJlYWNvbgo+IGJlZm9yZSBlbmFibGluZyBwb3dlcnNhdmUsIGFuZCBjaGFuZ2Ug dGhlIHdheSB0aGUKPiBpbmZvcm1hdGlvbiBpcyBjb252ZXllZCB0byB0aGUgZHJpdmVyIGFjY29y ZGluZ2x5Lgo+Cj4gbXdsOGsgZG9lc24ndCBjdXJyZW50bHkgc2VlbSB0byBpbXBsZW1lbnQgUFMg YnV0Cj4gcmVxdWlyZXMgdGhlIERUSU0gcGVyaW9kIGluIGEgZGlmZmVyZW50IHdheTsgYWZ0ZXIK PiB0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