From patchwork Wed Jul 18 12:13:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 1210711 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3FAF93FD4F for ; Wed, 18 Jul 2012 12:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753652Ab2GRMN7 (ORCPT ); Wed, 18 Jul 2012 08:13:59 -0400 Received: from na3sys009aog132.obsmtp.com ([74.125.149.250]:49239 "EHLO na3sys009aog132.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753344Ab2GRMNy (ORCPT ); Wed, 18 Jul 2012 08:13:54 -0400 Received: from mail-lb0-f175.google.com ([209.85.217.175]) (using TLSv1) by na3sys009aob132.postini.com ([74.125.148.12]) with SMTP ID DSNKUAaogb5xbZuC80acW1YobR7YPN/gut5/@postini.com; Wed, 18 Jul 2012 05:13:54 PDT Received: by lbol5 with SMTP id l5so2178808lbo.34 for ; Wed, 18 Jul 2012 05:13:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=rv0tr0PzmWeWaNB2Er0nLykkcaZPokzq+PXeHAH1b6w=; b=fUfQNhhAfCC6tI/6p2510aPylpDwni2o5BESCxmMtSNC0AdQgBHt98b2pmZ9aWN0oN loK0c3N/Z/SbOAvZWMyJzpx/rcJmj1QDzCu9Rrn+ne0yLgmmspwV22cucOB0hCv383UU xXrj/oBhzEo48/FZ5ZJ/wKY/8HAQnMedpxEj/zG0fbtz2KPFIm78SY1hUisE/9+n4tmq KAR0LN5gQyq5aeVEEynLW6PYDRg9fkSojQQN8yDG4lGdwPr2z3kKym2YdCp/QEP9sEgD V7MX7LlpYG0X4WXECRkhL51AbeK1/GRDcRodg/oLvWjxNYKRtP/rFmeoq6Xyz/qWb7wy d+Qg== Received: by 10.152.122.9 with SMTP id lo9mr3172640lab.41.1342613631803; Wed, 18 Jul 2012 05:13:51 -0700 (PDT) Received: from cumari.Elisa (a88-113-65-16.elisa-laajakaista.fi. [88.113.65.16]) by mx.google.com with ESMTPS id gv8sm21679270lab.14.2012.07.18.05.13.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jul 2012 05:13:51 -0700 (PDT) From: Luciano Coelho To: linux-wireless@vger.kernel.org Cc: coelho@ti.com, arik@wizery.com Subject: [PATCH 06/14] wlcore: don't issue SLEEP_AUTH command during recovery Date: Wed, 18 Jul 2012 15:13:25 +0300 Message-Id: <1342613613-917-7-git-send-email-coelho@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1342613613-917-1-git-send-email-coelho@ti.com> References: <1342613613-917-1-git-send-email-coelho@ti.com> X-Gm-Message-State: ALoCoQmnMQjQc/A1ryDEpv8A0pcMUryX8U476TqKaCqOyEzTbdQculnXJ6rEUreEtOSV3tqL3hMM Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Arik Nemtsov During interface removal, don't adjust sleep_auth if we are during recovery. Since the FW is potentially dead we shouldn't talk to it. Reported-by: Yossi Wortzel Signed-off-by: Arik Nemtsov Signed-off-by: Luciano Coelho --- drivers/net/wireless/ti/wlcore/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index d486eea..05c3912 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -2377,7 +2377,14 @@ deinit: else wl->sta_count--; - /* Last AP, have more stations. Configure according to STA. */ + /* + * Last AP, have more stations. Configure sleep auth according to STA. + * Don't do thin on unintended recovery. + */ + if (test_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags) && + !test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags)) + goto unlock; + if (wl->ap_count == 0 && is_ap && wl->sta_count) { u8 sta_auth = wl->conf.conn.sta_sleep_auth; /* Configure for power according to debugfs */ @@ -2391,6 +2398,7 @@ deinit: wl1271_acx_sleep_auth(wl, WL1271_PSM_ELP); } +unlock: mutex_unlock(&wl->mutex); del_timer_sync(&wlvif->rx_streaming_timer);