From patchwork Mon Dec 16 22:00:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 3357071 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AD7799F314 for ; Mon, 16 Dec 2013 22:01:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B970120158 for ; Mon, 16 Dec 2013 22:01:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D225C20122 for ; Mon, 16 Dec 2013 22:01:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751941Ab3LPWBO (ORCPT ); Mon, 16 Dec 2013 17:01:14 -0500 Received: from mail-oa0-f48.google.com ([209.85.219.48]:41228 "EHLO mail-oa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751885Ab3LPWBK (ORCPT ); Mon, 16 Dec 2013 17:01:10 -0500 Received: by mail-oa0-f48.google.com with SMTP id l6so5687102oag.21 for ; Mon, 16 Dec 2013 14:01:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iiQuqQGNSzdlGLvIH+juWPSnPcuf7YBuByxRisSMsgA=; b=e7ixTFpSXdAhyvVIrluDLl7TVPclGuNGPwOam9fEH5QwTZ8CQ1VcVz3JTTsm5U5pXz nUgvgJIES7S7Sv8SVLQsItiJqigSA8DuUpYYI1LOgBhetQLT/dmC0NKha+n9iBdZfIZ9 drq9aAKy975HHQ/Qx8b1w3gsKWbJAkHdiA6Phe9PzyuDrpfbwKwLXLcbEnoWaQr/Wq/G tJx985zE6WxTFy93hFBHab56nBBju1VAN6dru8Sn0OuRgqIv5gnl24dPVXGp2iNvUz8i qDFU2ZUy5MKKO87980XLfkYUPXijzH9mZykpl7ZbT7wHArKfRnvv3OsWcWPvcejAH9O/ vqBA== X-Gm-Message-State: ALoCoQmUIfKGq3NV4QWPDJsfr2xYRaLRMeG1SOokIRFDBgktD3iQhcJb4EWdB+vaemHAm9YWiAyz X-Received: by 10.182.113.195 with SMTP id ja3mr13699308obb.46.1387231270247; Mon, 16 Dec 2013 14:01:10 -0800 (PST) Received: from localhost (64-126-112-59.dyn.everestkc.net. [64.126.112.59]) by mx.google.com with ESMTPSA id oo13sm27916531oeb.0.2013.12.16.14.01.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 16 Dec 2013 14:01:09 -0800 (PST) From: Seth Forshee To: Johannes Berg Cc: linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list@broadcom.com, "John W. Linville" , Stefano Brivio , Arend van Spriel , Seth Forshee Subject: [RFC PATCH 5/8] mac80211: Don't start dynamic PS timer when leaving off-channel if still scanning Date: Mon, 16 Dec 2013 16:00:57 -0600 Message-Id: <1387231260-2849-6-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387231260-2849-1-git-send-email-seth.forshee@canonical.com> References: <1387231260-2849-1-git-send-email-seth.forshee@canonical.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most of mac80211 does not update the dynamic PS timer during scans, but ieee80211_offchannel_ps_disable() will still restart it if a scan is in progress. It doesn't make sense to do this if no other code is updating the timer, so update this function to only restart the timer if not scanning. Signed-off-by: Seth Forshee --- net/mac80211/offchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 5802c00..1744886 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -72,7 +72,7 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata) ieee80211_vif_set_ps_mode(sdata, mode); if (mode == IEEE80211_VIF_PS_AWAKE) { ieee80211_send_nullfunc(local, sdata, 0); - if (sdata->vif.dynamic_ps_active) + if (sdata->vif.dynamic_ps_active && !local->scanning) mod_timer(&ifmgd->dynamic_ps_timer, jiffies + msecs_to_jiffies(sdata->vif.dynamic_ps_timeout)); }