From patchwork Thu Jul 9 11:08:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 6754951 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 98CC2C05AC for ; Thu, 9 Jul 2015 11:08:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5C9C2069E for ; Thu, 9 Jul 2015 11:08:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CAC732069B for ; Thu, 9 Jul 2015 11:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751261AbbGILIx (ORCPT ); Thu, 9 Jul 2015 07:08:53 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:35654 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985AbbGILIu (ORCPT ); Thu, 9 Jul 2015 07:08:50 -0400 Received: by labgy5 with SMTP id gy5so91690473lab.2 for ; Thu, 09 Jul 2015 04:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2fQ5AiRgedqzG046YWPPuSzUlVfP/jfjFgUHEoPacrA=; b=CpiwWCKVGwd8FJLU9urBih98gpzvWPr9m3SmTRW/forEjQC48jJ5KarDm4bXTBM8us g0gnl2Nwn6PYQwb80QEmOEasukf7QvnyCbODRs1bR/Bb2lED5vKs01FigdVGlgnfd/Ew m8Jw2pC01x7bJ0j2WQ6U1Hpsar2hHv8yHRayg= 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=2fQ5AiRgedqzG046YWPPuSzUlVfP/jfjFgUHEoPacrA=; b=MgBP8mRcduEH41yOQfPaWFMDVh+U6XrhVw+v/Lo6bDvn/amMupXlIdQg2insckFK4r SVJjai6Gh7ZKphzDoKbVevFSD5xHCUlfyxO9qtfHtcshi+qrTJJ4Kl6Mcah/hAD/qHQm vRxbk8FTCmgUaqgFBaF0jx28goW/ct3y9j2P27cC3zRCsLqgnXUQfPVUVjjA063FLPIw i/u/Ox/j3iBft2FGchoiY/ocHQYhLYriogaSpgZrGMV/Fzjl79qBQTgJ+bB/AvL4pEpt 8CD1EMKUaPUsNYFAXgqY1oF1FIzWfJ43hbC9h4k8DE+qyIfuQr1NLDWNB91HcRby/FFy 1DYQ== X-Gm-Message-State: ALoCoQm2LskihtcbpuPwRNLmI769fIx8f/8YPvP8/n7QTAnrfZa+msngnwpBcUqOu3Yv8SPiHE+PwKgmjJEi9QUSTkcLLe+DEEHaybsYtmEXnlh6S7AZI6fEfzYXiQ8pLKO+Pq9o0H6i X-Received: by 10.112.35.229 with SMTP id l5mr14454572lbj.0.1436440129143; Thu, 09 Jul 2015 04:08:49 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id t15sm1433507lbk.0.2015.07.09.04.08.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 04:08:48 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior Subject: [PATCH 2/6] ath10k: limit multi-vif ps more aggresivelly Date: Thu, 9 Jul 2015 13:08:35 +0200 Message-Id: <1436440119-30231-3-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436440119-30231-1-git-send-email-michal.kazior@tieto.com> References: <1436440119-30231-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.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=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RCVD_IN_SBL_CSS,RP_MATCHES_RCVD,T_DKIM_INVALID, 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 Further testing proved that multi-channel AP+STA on QCA6174 with RM.2.0-00088 should have powersave force-disabled to avoid beacon misses/skipping on either side which in turn could disrupt communication. Since AP never has arvif->ps don't even bother checking it. Other combinations may be broken as well so disallow powersave with multivif outright unless firmware advertises otherwise. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 63c59593494e..115889cb0ff6 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1668,7 +1668,7 @@ static int ath10k_mac_vif_recalc_ps_poll_count(struct ath10k_vif *arvif) return 0; } -static int ath10k_mac_ps_vif_count(struct ath10k *ar) +static int ath10k_mac_num_vifs_started(struct ath10k *ar) { struct ath10k_vif *arvif; int num = 0; @@ -1676,7 +1676,7 @@ static int ath10k_mac_ps_vif_count(struct ath10k *ar) lockdep_assert_held(&ar->conf_mutex); list_for_each_entry(arvif, &ar->arvifs, list) - if (arvif->ps) + if (arvif->is_started) num++; return num; @@ -1700,7 +1700,7 @@ static int ath10k_mac_vif_setup_ps(struct ath10k_vif *arvif) enable_ps = arvif->ps; - if (enable_ps && ath10k_mac_ps_vif_count(ar) > 1 && + if (enable_ps && ath10k_mac_num_vifs_started(ar) > 1 && !test_bit(ATH10K_FW_FEATURE_MULTI_VIF_PS_SUPPORT, ar->fw_features)) { ath10k_warn(ar, "refusing to enable ps on vdev %i: not supported by fw\n",