From patchwork Fri Aug 15 15:34:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 380299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 6B64914008C; Sat, 16 Aug 2014 01:34:49 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XIJWd-00027D-Nq; Fri, 15 Aug 2014 15:34:43 +0000 Received: from mail-oi0-f43.google.com ([209.85.218.43]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XIJWX-00026m-6L for kernel-team@lists.ubuntu.com; Fri, 15 Aug 2014 15:34:37 +0000 Received: by mail-oi0-f43.google.com with SMTP id u20so1788746oif.16 for ; Fri, 15 Aug 2014 08:34:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=VRK/GqyOU5T/Msr4adFlL2WqN8Qp42GBYqOcf8ykL/0=; b=E1ZZY4rQ3q66ZQiDFBzuCrXXia+FeijMxu2SsomWl1ERkrzuMlR7yKOD2ui+Q/6Sr0 mUzGKRUHZLqhwSB14ldYhVF5Ovg7EjiCJzrg3PJzskW/tzrRMW5QX4xMIgCtscULd0CB fLfMl5j8Cuvb8ro5SjjNmexg4y7fw/7KUbH+zNMTXIW6vp15dEtzeqYaNtLovzUCnShD jj/1sBhD47wDRuxjc7gebM+/bB7C5aaeBxgK/IrXwV87SiAq9QiALTq1EbhZ4xtPcKTx y9CPsF0nly9kghGcEE5rYWDqpB6SFPixit8eRfm8mKUDHva1qFl7CqbR1FAkwE7lSS5U 7vkw== X-Gm-Message-State: ALoCoQk1bKknErtMb88U0bh6GNOznvmysNXoN3NoBMuEVyWiCPN2wRmza0xb9DhlJ+U/QFhAVtXC X-Received: by 10.182.60.98 with SMTP id g2mr21255839obr.6.1408116876227; Fri, 15 Aug 2014 08:34:36 -0700 (PDT) Received: from localhost (199-87-125-144.dyn.kc.surewest.net. [199.87.125.144]) by mx.google.com with ESMTPSA id u5sm9139708obt.18.2014.08.15.08.34.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 15 Aug 2014 08:34:35 -0700 (PDT) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2][trusty] mac80211: reset probe_send_count also in HW_CONNECTION_MONITOR case Date: Fri, 15 Aug 2014 10:34:31 -0500 Message-Id: <1408116871-98697-3-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408116871-98697-1-git-send-email-seth.forshee@canonical.com> References: <1408116871-98697-1-git-send-email-seth.forshee@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Eliad Peller In case of beacon_loss with IEEE80211_HW_CONNECTION_MONITOR device, mac80211 probes the ap (and disconnects on timeout) but ignores the ack. If we already got an ack, there's no reason to continue disconnecting. this can help devices that supports IEEE80211_HW_CONNECTION_MONITOR only partially (e.g. take care of keep alives, but does not probe the ap. In case the device wants to disconnect without probing, it can just call ieee80211_connection_loss. Signed-off-by: Eliad Peller Signed-off-by: Johannes Berg (cherry picked from commit 448cd2e248732326632957e52ea9c44729affcb2) BugLink: http://bugs.launchpad.net/bugs/1349572 Signed-off-by: Seth Forshee --- include/net/mac80211.h | 2 -- net/mac80211/mlme.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 7ceed99..9520c80 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1459,8 +1459,6 @@ struct ieee80211_tx_control { * @IEEE80211_HW_CONNECTION_MONITOR: * The hardware performs its own connection monitoring, including * periodic keep-alives to the AP and probing the AP on beacon loss. - * When this flag is set, signaling beacon-loss will cause an immediate - * change to disassociated state. * * @IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC: * This device needs to get data from beacon before association (i.e. diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index fcdd5de..55aa910 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -131,13 +131,13 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata) if (unlikely(!sdata->u.mgd.associated)) return; + ifmgd->probe_send_count = 0; + if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) return; mod_timer(&sdata->u.mgd.conn_mon_timer, round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME)); - - ifmgd->probe_send_count = 0; } static int ecw2cw(int ecw)