From patchwork Fri Jun 25 07:33:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Stewart X-Patchwork-Id: 108006 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5P7XBRi021824 for ; Fri, 25 Jun 2010 07:33:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751955Ab0FYHdJ (ORCPT ); Fri, 25 Jun 2010 03:33:09 -0400 Received: from smtp-out.google.com ([74.125.121.35]:53328 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734Ab0FYHdI (ORCPT ); Fri, 25 Jun 2010 03:33:08 -0400 Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id o5P7X6Zu002457 for ; Fri, 25 Jun 2010 00:33:06 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1277451186; bh=7x8SZAXe5l/j+Lmk9LO6Wj7Eyx4=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=V3y0bUNhSym/heKA9KVaA+qvB5GW32+GxJw5K1V0IYsAjJvJPZTP9MiP44ee3nWNG IvboK/G7TS5OY3z3HUWAw== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:date:message-id:subject:from:to:content-type:x-system-of-record; b=qzzQ5Qo1+T2I1GIthBVrVDbrQNWAai1he7SkJXaOnqD8Rdjq8XLFgIMy3wsVkypck haQjz8X8cYVkH2WlAfEkg== Received: from iwn3 (iwn3.prod.google.com [10.241.68.67]) by wpaz24.hot.corp.google.com with ESMTP id o5P7WO7b028080 for ; Fri, 25 Jun 2010 00:33:05 -0700 Received: by iwn3 with SMTP id 3so3130075iwn.41 for ; Fri, 25 Jun 2010 00:33:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.114.144 with SMTP id e16mr291042ibq.188.1277451184888; Fri, 25 Jun 2010 00:33:04 -0700 (PDT) Received: by 10.231.44.131 with HTTP; Fri, 25 Jun 2010 00:33:04 -0700 (PDT) Date: Fri, 25 Jun 2010 00:33:04 -0700 Message-ID: Subject: [PATCH] mac80211: auth retries if AP sends temporary deauth From: Paul Stewart To: linux-wireless@vger.kernel.org X-System-Of-Record: true Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 25 Jun 2010 07:33:11 +0000 (UTC) --- a/compat-wireless/net/mac80211/work.c +++ b/compat-wireless/net/mac80211/work.c @@ -1030,6 +1030,23 @@ ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata, skb_queue_tail(&local->work_skb_queue, skb); ieee80211_queue_work(&local->hw, &local->work_work); return RX_QUEUED; + case IEEE80211_STYPE_DEAUTH: + /* + * If we get sent a DEAUTH while we are + * actively trying to authenticate to this + * station, we shoot ourselves in the foot if + * we fall through using RX_CONTINUE and allow + * the bss context to disappear + * (ieee80211_sta_rx_mgmt()). This is + * especially true if the reason for the + * DEAUTH was a negative but temporary direct + * response to an AUTH attempt. Let the retry + * mechanism run its course instead. + */ + if (wk->type == IEEE80211_WORK_AUTH) { + return RX_DROP_MONITOR; + } + break; } }