From patchwork Thu Dec 18 09:05:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 5511861 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EC2BBBEEA8 for ; Thu, 18 Dec 2014 09:07:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2FBDE209DD for ; Thu, 18 Dec 2014 09:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 53091209AF for ; Thu, 18 Dec 2014 09:07:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbaLRJHS (ORCPT ); Thu, 18 Dec 2014 04:07:18 -0500 Received: from mail-ob0-f175.google.com ([209.85.214.175]:48286 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512AbaLRJGC (ORCPT ); Thu, 18 Dec 2014 04:06:02 -0500 Received: by mail-ob0-f175.google.com with SMTP id wp4so2334248obc.6 for ; Thu, 18 Dec 2014 01:06:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=bEtSCDEeZGEyL1YR7aCN3C2Fk+HrHlyV5+qSsJYWSM0=; b=03MWc8UL++unkX2EpoZW720LoGoxdu6sHOYtUTAzcwNA/QZg22udA9GkxxXdkGHgJv 8vqSSVRCwdt+6URT0kQo9ZkvQre+H8i9GBPrARMVO40WcAxsyyVw7G+CXryZpdN2N8uE ddlnCcBrcXC8YIQf0twLzkwc4InTi6eNVpe3ljvsz9TcuTqAnNMxtmcCFydNIpYUw3Hu j6eH9TZqpfnVD6I0HiDrIPWuLIJrs8O+9TmrxEDFMEyaomZCclTi+dv4NuwZMy4PgemM BRjhbi0f/d9YV49SqQAQokA5K8/ArBeWOxJmQev2r70HaCMI0wrt9Jrh4/Q22HNK3KDA PDSA== X-Received: by 10.202.182.11 with SMTP id g11mr552730oif.13.1418893562471; Thu, 18 Dec 2014 01:06:02 -0800 (PST) Received: from linux.site ([69.76.245.152]) by mx.google.com with ESMTPSA id o93sm2962766oik.21.2014.12.18.01.06.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Dec 2014 01:06:01 -0800 (PST) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Larry Finger Subject: [PATCH 06/16] rtlwifi: rtl8192ce: Improve RF sleep routine Date: Thu, 18 Dec 2014 03:05:30 -0600 Message-Id: <1418893540-19944-7-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1418893540-19944-1-git-send-email-Larry.Finger@lwfinger.net> References: <1418893540-19944-1-git-send-email-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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 These changes match those of the latest vendor driver. Signed-off-by: Larry Finger --- drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c index bc5ca98..1ee5a6a 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c @@ -518,11 +518,12 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, } case ERFSLEEP:{ if (ppsc->rfpwr_state == ERFOFF) - return false; + break; for (queue_id = 0, i = 0; queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { ring = &pcipriv->dev.tx_ring[queue_id]; - if (skb_queue_len(&ring->queue) == 0) { + if (queue_id == BEACON_QUEUE || + skb_queue_len(&ring->queue) == 0) { queue_id++; continue; } else {