From patchwork Fri Jan 25 06:29:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Rebbagondla X-Patchwork-Id: 10780613 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B93C01399 for ; Fri, 25 Jan 2019 06:30:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7B572F418 for ; Fri, 25 Jan 2019 06:30:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 991752F42F; Fri, 25 Jan 2019 06:30:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84F722F418 for ; Fri, 25 Jan 2019 06:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726573AbfAYGaU (ORCPT ); Fri, 25 Jan 2019 01:30:20 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34941 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbfAYGaU (ORCPT ); Fri, 25 Jan 2019 01:30:20 -0500 Received: by mail-pg1-f194.google.com with SMTP id s198so3795271pgs.2 for ; Thu, 24 Jan 2019 22:30:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=N962v1NYYO1siutE7EpJRXlUasnp8tyEzinNsSx9Z9I=; b=iATih+FEXvKzD3RJeQZ7TMooRFLYrg7ccPUgGK+xbqY6aYowUQPO+k6i5qCBVnT5Mr QLChBG+Tc1mCgbLDCOhghRceAO0e5z9KPsHSw5Pkjh2hlgcmMGjh6qBBrlg1GM0TFVTz qInm7HZNP2qCrgjVa2ZqOSCwDlk1reqWj8lK/oRWARVn/uqFnZgBn17buErWkSaQyCHe RfkCt0SdNbaJvPFkRK0E5NJRQbuvzNr5VvwAq997BwDOF4vpwhF6uzQB2I1x436ryRxn QanOTe0Y7nNrrHgyTRw3X1Cq8QmCSJwsaZKci+q6v/fTA9tiiBYxcqHMoZvill/4XIn/ RY2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=N962v1NYYO1siutE7EpJRXlUasnp8tyEzinNsSx9Z9I=; b=q3FUsWQLe4GNQTFV9IicxqEsQngkbjELjUpdp7sIpFBIODz2TrL7exBU+boRt7185i ClY0rXO9YD00vQMtMnEo3FXkM/HT2R1tdiUSCLJruylKvqCccgwemH0nka6gFH6KrBx5 SQMHJc6cVwo+z4dMzOsSzZVq46zrjMStSjUwGusGye67aubjmbRzN+tnZUow4JS6rZfj Ih5a5Yk2LnYlMGJDO+HVAa2xbMEldvdfi5CWVmbs47QIxGW7Qd8jv07TX9EfTuaqWzHs CQdb29+7Lox+WQBm52EYhWhSJSyfvLfQk6trtkg3PEWzgeh0N26Q7hsiedAAb/NfLOub +lJw== X-Gm-Message-State: AJcUukeBaMjznRkQS2b8WQMywIj2FF5VWeoJ0uIZk0+ws4RN8Acpf/9a MvEwlt6pKqcF252TbkIXFkz2Oa5OrMaA1g== X-Google-Smtp-Source: ALg8bN6Ez5FeHfDXObtBluIkQQ9Gp5AsUSvfED5+7DlsxT2/wkkJV6emq3Q3EnXXM32gPAM5BJWsbg== X-Received: by 2002:a62:710a:: with SMTP id m10mr9653084pfc.69.1548397819301; Thu, 24 Jan 2019 22:30:19 -0800 (PST) Received: from cpu459.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id x19sm37384793pfk.14.2019.01.24.22.30.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 22:30:18 -0800 (PST) From: Siva Rebbagondla To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Rishikesh Basu , Siva Rebbagondla , Ganapathiraju Kondraju , krishna.pedda@redpinesignals.com Subject: [PATCH 1/5] rsi: Add debug support for wowlan wakeup confirmation Date: Fri, 25 Jan 2019 11:59:58 +0530 Message-Id: <1548397802-12180-2-git-send-email-siva8118@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1548397802-12180-1-git-send-email-siva8118@gmail.com> References: <1548397802-12180-1-git-send-email-siva8118@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Siva Rebbagondla When a wowlan magic-packet has received to wake up the device, currently driver is not taking care of what kind of packet has received. This patch will add debug support for wakeup reason in driver. Signed-off-by: Siva Rebbagondla --- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index 4042414..4c2c776 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -2003,6 +2003,35 @@ int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg) return -1; rsi_send_beacon(common); break; + case WOWLAN_WAKEUP_REASON: + rsi_dbg(ERR_ZONE, "\n\nWakeup Type: %x\n", msg[15]); + switch (msg[15]) { + case RSI_UNICAST_MAGIC_PKT: + rsi_dbg(ERR_ZONE, + "*** Wakeup for Unicast magic packet ***\n"); + break; + case RSI_BROADCAST_MAGICPKT: + rsi_dbg(ERR_ZONE, + "*** Wakeup for Broadcast magic packet ***\n"); + break; + case RSI_EAPOL_PKT: + rsi_dbg(ERR_ZONE, + "*** Wakeup for GTK renewal ***\n"); + break; + case RSI_DISCONNECT_PKT: + rsi_dbg(ERR_ZONE, + "*** Wakeup for Disconnect ***\n"); + break; + case RSI_HW_BMISS_PKT: + rsi_dbg(ERR_ZONE, + "*** Wakeup for HW Beacon miss ***\n"); + break; + default: + rsi_dbg(ERR_ZONE, + "##### Un-intentional Wakeup #####\n"); + break; + } + break; case RX_DOT11_MGMT: return rsi_mgmt_pkt_to_core(common, msg, msg_len); default: From patchwork Fri Jan 25 06:29:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Rebbagondla X-Patchwork-Id: 10780615 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C5CC746 for ; Fri, 25 Jan 2019 06:30:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF0492F418 for ; Fri, 25 Jan 2019 06:30:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E39792F42F; Fri, 25 Jan 2019 06:30:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86BC92F418 for ; Fri, 25 Jan 2019 06:30:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726714AbfAYGaX (ORCPT ); Fri, 25 Jan 2019 01:30:23 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:40086 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbfAYGaX (ORCPT ); Fri, 25 Jan 2019 01:30:23 -0500 Received: by mail-pg1-f195.google.com with SMTP id z10so3784549pgp.7 for ; Thu, 24 Jan 2019 22:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bJuDtLb1pBeqzoK/fjWl+rfJQg+7dX50nVRNiyCbias=; b=CzvVPSbAG4X2OOjUUYFUT5LEsk4jRZtcFyTBHVCwoC1qJL+iNA0HsNMd3CS2ieGGAR aiILIDf/7dlpEcWcYKmr/labouePu0KXJ8PmNpyzRBzVBSgmkPgQDtQB/ImrK2hbNK8m N4s8HMNFGTbU9NsFbnm71jml2lv4fdALOQbeeEy49+p4pCohAFYschiGiNyAil1W1nFJ WGP8CooS285uyasDGH62xZPpM/YQaoQQxGWCrDSGGpj3v123xReitbW82eG+CC8UEHh2 YaIANTTMc6S86RwTi8OMKAWYSnTu+gY7mhYI+hyw8sNvqpRHI9Ts+BIKYek2iCopObh8 dz3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bJuDtLb1pBeqzoK/fjWl+rfJQg+7dX50nVRNiyCbias=; b=R+Tgto79/tx59YvTe1eOGbS5yWxBo/j3XJYjUvpENrcGu09593ZBAhePp6QXQt7paP OPmWf91UqGEwKQxFLMfC1D/75yN859Opd+B/YXsiO0b3ZGxJP+z5b53akdgS69wgi6Yu C4Mdb7nDKWLmReaNKvYnDJLoZpp8gTObEmcSlfLKozoE7KLHx1dCLAi32VXZOLALf5dW zpR9cBBCdOCUgWqEOCr5ElBxHv60E8a4FuP9ffOqoceWfpQYQ2nsUGUx4N0hpsW3y/P7 xft3s6kWBRkRDdPVPadQiVWpca5nwNCzvBtyj18vjldatGwKuZJI8xFwc7q1SSo8KUN1 pTAw== X-Gm-Message-State: AJcUukcB63/yFFvczUolpjzy4AN3nirYEiTTBSJ6lNuFAxtg9ql6j9Wn ul9y+/+Un3vio4hq2kN2UEE= X-Google-Smtp-Source: ALg8bN4zP5jo949JrRT93fHuEfTNeMkCtdB+5JGrLYkFKpCxAR+W+ILOMiHqI3LJ8dF1TRunv1sy4w== X-Received: by 2002:a63:658:: with SMTP id 85mr8785642pgg.373.1548397822057; Thu, 24 Jan 2019 22:30:22 -0800 (PST) Received: from cpu459.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id x19sm37384793pfk.14.2019.01.24.22.30.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 22:30:21 -0800 (PST) From: Siva Rebbagondla To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Rishikesh Basu , Siva Rebbagondla , Ganapathiraju Kondraju , krishna.pedda@redpinesignals.com Subject: [PATCH 2/5] rsi: add hci detach for hibernation and poweroff Date: Fri, 25 Jan 2019 11:59:59 +0530 Message-Id: <1548397802-12180-3-git-send-email-siva8118@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1548397802-12180-1-git-send-email-siva8118@gmail.com> References: <1548397802-12180-1-git-send-email-siva8118@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Siva Rebbagondla As we missed to detach HCI, while entering power off or hibernation, an extra hci interface gets created whenever system is woken up, to avoid this we added hci_detach() in rsi_disconnect(), rsi_freeze(), and rsi_shutdown() functions which are invoked for these tests. This patch fixes the issue Signed-off-by: Siva Rebbagondla --- drivers/net/wireless/rsi/rsi_91x_sdio.c | 21 +++++++++++++++++++-- drivers/net/wireless/rsi/rsi_91x_usb.c | 6 ++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index b412b65e..59ff778 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c @@ -1131,7 +1131,12 @@ static void rsi_disconnect(struct sdio_func *pfunction) rsi_mac80211_detach(adapter); mdelay(10); - +#ifdef CONFIG_RSI_COEX + if (adapter->priv->coex_mode > 1 && adapter->priv->bt_adapter) { + rsi_bt_ops.detach(adapter->priv->bt_adapter); + adapter->priv->bt_adapter = NULL; + } +#endif /* Reset Chip */ rsi_reset_chip(adapter); @@ -1308,6 +1313,13 @@ static int rsi_freeze(struct device *dev) rsi_dbg(ERR_ZONE, "##### Device can not wake up through WLAN\n"); +#ifdef CONFIG_RSI_COEX + if (common->coex_mode > 1 && common->bt_adapter) { + rsi_bt_ops.detach(common->bt_adapter); + common->bt_adapter = NULL; + } +#endif + ret = rsi_sdio_disable_interrupts(pfunction); if (sdev->write_fail) @@ -1354,7 +1366,12 @@ static void rsi_shutdown(struct device *dev) if (rsi_config_wowlan(adapter, wowlan)) rsi_dbg(ERR_ZONE, "Failed to configure WoWLAN\n"); - +#ifdef CONFIG_RSI_COEX + if (adapter->priv->coex_mode > 1 && adapter->priv->bt_adapter) { + rsi_bt_ops.detach(adapter->priv->bt_adapter); + adapter->priv->bt_adapter = NULL; + } +#endif rsi_sdio_disable_interrupts(sdev->pfunction); if (sdev->write_fail) diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c index f360690..be20fd1 100644 --- a/drivers/net/wireless/rsi/rsi_91x_usb.c +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c @@ -816,6 +816,12 @@ static void rsi_disconnect(struct usb_interface *pfunction) return; rsi_mac80211_detach(adapter); +#ifdef CONFIG_RSI_COEX + if (adapter->priv->coex_mode > 1 && adapter->priv->bt_adapter) { + rsi_bt_ops.detach(adapter->priv->bt_adapter); + adapter->priv->bt_adapter = NULL; + } +#endif rsi_reset_card(adapter); rsi_deinit_usb_interface(adapter); rsi_91x_deinit(adapter); From patchwork Fri Jan 25 06:30:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Rebbagondla X-Patchwork-Id: 10780617 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1CA04746 for ; Fri, 25 Jan 2019 06:30:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B3922F418 for ; Fri, 25 Jan 2019 06:30:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3F2D2F42F; Fri, 25 Jan 2019 06:30:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A01EE2F418 for ; Fri, 25 Jan 2019 06:30:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726817AbfAYGa0 (ORCPT ); Fri, 25 Jan 2019 01:30:26 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36933 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbfAYGaZ (ORCPT ); Fri, 25 Jan 2019 01:30:25 -0500 Received: by mail-pg1-f193.google.com with SMTP id c25so3789270pgb.4 for ; Thu, 24 Jan 2019 22:30:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wKLTsv8WQv34PB5hXhNvtyTRQ5sUzkKGfvWrDqTNJ50=; b=KIcVgE1K+pr7Z37teLi8EYv3vFwHmzgQTD1D1FKa5Aon8uMehexbLzNPxNuS5ZWttv XKocSsbu0jEghnGlQF9MbhHd20lV0K7dvWuoi1lFbATBMjwAoostsyM2g9V5R76fGlDa ElbnekffoqutRv/D9EoNVaXnVKM2z4vvCCoRU6LU4ZciP17Z5MllY4s1yX2/L2iJPcl5 GHQGqsyqKJ01DifQtcWJ+l6rYhk7bdJdLEQkROPbjH/JqujwKR5Zf01k8cxn9Bes61WZ wOOpvV8M66iQczXyxLP0Bvox5L+fk1CfhCwV8fCoHKgh4I2YBW8i/43SaCZI5cKj5VN4 aUcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wKLTsv8WQv34PB5hXhNvtyTRQ5sUzkKGfvWrDqTNJ50=; b=jX95m4jqExE20eXgxN69njKnF5BeVrNbIGhq//dBmzU4AObkF/sNMzfZ/+ESdC+KGv aBCbRCfvoWYoR72XfwY4Aliy0IavFE/GLWdBeveaTTa3llRLqyxb3qUHbv3YlORN/Sye 7nTqhy+nKO2kYayQiegRtu6T5eSlu8UQXe33/QvbN7GGeYjClw10Up83P/leB5Nz74f5 XUBTKlvCLWkWTU8MHeo76G4kTMjUqq5wc/wmycwYjYaL17zWV/sUJ3L+Sgrc2qfJRSPz 5lvcaZL0BgZQuBTaENdHP/AXapY+ihESufHt0Iai8Wq6ha0bJMeDwhX66FkNII+OtYC2 a5Kg== X-Gm-Message-State: AJcUukfEC03RlIx/bfM3HvEGD5c2DBo7iKdZwwNZfvd9rSxy24cSNcjF g7Sd+U0efL7l8XBn6p7Bog0= X-Google-Smtp-Source: ALg8bN4uh6N/vGnYj6e77ASQ156CDYfeDLH4RIGoxQMPKL63Za/IRg3PMiiLKbEG6yqPBgQgsVZfXQ== X-Received: by 2002:a63:6984:: with SMTP id e126mr8985881pgc.143.1548397824671; Thu, 24 Jan 2019 22:30:24 -0800 (PST) Received: from cpu459.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id x19sm37384793pfk.14.2019.01.24.22.30.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 22:30:24 -0800 (PST) From: Siva Rebbagondla To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Rishikesh Basu , Siva Rebbagondla , Ganapathiraju Kondraju , krishna.pedda@redpinesignals.com Subject: [PATCH 3/5] rsi: fix wowlan wakeup issue for hibernate(S4) Date: Fri, 25 Jan 2019 12:00:00 +0530 Message-Id: <1548397802-12180-4-git-send-email-siva8118@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1548397802-12180-1-git-send-email-siva8118@gmail.com> References: <1548397802-12180-1-git-send-email-siva8118@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Siva Rebbagondla At SDIO restore ieee80211_restart_hw() is getting called to restart all MAC operations. This step is not required. Returning 1 from mac80211_resume() will serve this purpose. Signed-off-by: Siva Rebbagondla --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 8 ++++++-- drivers/net/wireless/rsi/rsi_91x_sdio.c | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index aded1ae..8d1282f 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -1938,8 +1938,12 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw) rsi_dbg(INFO_ZONE, "%s: mac80211 resume\n", __func__); - if (common->hibernate_resume) - return 0; + if (common->hibernate_resume) { + /* Device need a complete restart of all MAC operations. + * returning 1 will serve this purpose. + */ + return 1; + } mutex_lock(&common->mutex); rsi_send_wowlan_request(common, 0, 0); diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index 59ff778..3375d64 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c @@ -1395,7 +1395,6 @@ static int rsi_restore(struct device *dev) common->iface_down = true; adapter->sc_nvifs = 0; - ieee80211_restart_hw(adapter->hw); common->wow_flags = 0; common->iface_down = false; From patchwork Fri Jan 25 06:30:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Rebbagondla X-Patchwork-Id: 10780619 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BBF181399 for ; Fri, 25 Jan 2019 06:30:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA68C2F42D for ; Fri, 25 Jan 2019 06:30:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9ECFC2F447; Fri, 25 Jan 2019 06:30:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E8FB2F42D for ; Fri, 25 Jan 2019 06:30:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbfAYGa2 (ORCPT ); Fri, 25 Jan 2019 01:30:28 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:42219 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbfAYGa2 (ORCPT ); Fri, 25 Jan 2019 01:30:28 -0500 Received: by mail-pl1-f195.google.com with SMTP id y1so4083867plp.9 for ; Thu, 24 Jan 2019 22:30:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qtkqNqaY/uO0ZZbknk5RaMtB52FCJSZoJtJOxtJ569c=; b=XpsEIOafjMBUwqHm6ErHDZkqMC/oXBtCc/roQSRUnAyEsV0AS1E2CvT0fBZ0BpNELN NyffFMSBWZXHuxX6bWGQtfbsmmsYy6wVA2hYasZbg7An0MqXeGhSneNAL6yOAYG9v4se YTzKsCLWEEVAZMRYvnDtBoLUlUwps3wEjdxLNCeLC5Eb/RyEb0Jn5svw/C8lc5sK69ez f1qGzav7u6uR60iPb4QRYhRARuT2VVweXbkVK60ldfSvCHEoZtzab8InzqCbDEGPX+im O4Dw4ierU9z7i7z5908jFhQBKg3pTJq8cQ/Slao9uohdZ/ODWVKxgZcMGwfOWp7CZMHl vLng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qtkqNqaY/uO0ZZbknk5RaMtB52FCJSZoJtJOxtJ569c=; b=GkE4voKgSjQ7lYiUKIFbQserXudSi1EFfIgmMzysmFaE+KhhOEaHw26/dEEg76P0lB qxymPJoWzxWyuYgk1uJ52SvsHymF0JDRR9nQbI/GobCXtAfDar7DhRdOLj3PM9cNGsgb kK8DkR1hA4PMWQQAnWCqClpTn24pxv28TMNVTshP3X/JHMnRI+t4jBVGQ1hoJHUQMxnU +PdoB6jCUozvF1aUxeXKSmJYMvr1gt1kdbAwn64WvNVz0/5ZryuP1eYFDaYVgfS0sPWs F8KsxHtpK4oMZgiNGMMBSIqvKXgQ7Oo5FhZnSZtPi1ICQ07gs0acdLZLs23CivMI4uKG Kx3g== X-Gm-Message-State: AJcUukf+uumROevHj7yb87LE3sWAJQRKTbYs0c745yPW4xDEI1LRED4y xKEfZA9qALSEqp3bxJu9IvM= X-Google-Smtp-Source: ALg8bN5oY4zwZUZD2Lo7SDGIfPmRrkBtBh329iZOMjrTd8j52J4Mypk1p5P6Vo9sSUcYLIOdMthWqA== X-Received: by 2002:a17:902:bb98:: with SMTP id m24mr9421310pls.71.1548397827289; Thu, 24 Jan 2019 22:30:27 -0800 (PST) Received: from cpu459.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id x19sm37384793pfk.14.2019.01.24.22.30.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 22:30:26 -0800 (PST) From: Siva Rebbagondla To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Rishikesh Basu , Siva Rebbagondla , Ganapathiraju Kondraju , krishna.pedda@redpinesignals.com Subject: [PATCH 4/5] rsi: resolve power save issue after S4 resume Date: Fri, 25 Jan 2019 12:00:01 +0530 Message-Id: <1548397802-12180-5-git-send-email-siva8118@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1548397802-12180-1-git-send-email-siva8118@gmail.com> References: <1548397802-12180-1-git-send-email-siva8118@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Siva Rebbagondla We are redownloading the firmware after S4 restore and observed in stress test that mac80211 sometimes gives power save request after resume which causes the firmware in bad state. mac_ops_resumed flag is added to skip that request until initialisation is done and Keeping power save state is NONE. Signed-off-by: Siva Rebbagondla --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 9 ++++++++- drivers/net/wireless/rsi/rsi_91x_sdio.c | 1 + drivers/net/wireless/rsi/rsi_main.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index 8d1282f..7bc8da6 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -239,6 +239,7 @@ static int rsi_mac80211_hw_scan_start(struct ieee80211_hw *hw, struct ieee80211_bss_conf *bss = &vif->bss_conf; rsi_dbg(INFO_ZONE, "***** Hardware scan start *****\n"); + common->mac_ops_resumed = false; if (common->fsm_state != FSM_MAC_INIT_DONE) return -ENODEV; @@ -370,6 +371,10 @@ static void rsi_mac80211_tx(struct ieee80211_hw *hw, { struct rsi_hw *adapter = hw->priv; struct rsi_common *common = adapter->priv; + struct ieee80211_hdr *wlh = (struct ieee80211_hdr *)skb->data; + + if (ieee80211_is_auth(wlh->frame_control)) + common->mac_ops_resumed = false; rsi_core_xmit(common, skb); } @@ -677,7 +682,8 @@ static int rsi_mac80211_config(struct ieee80211_hw *hw, } /* Power save parameters */ - if (changed & IEEE80211_CONF_CHANGE_PS) { + if ((changed & IEEE80211_CONF_CHANGE_PS) && + !common->mac_ops_resumed) { struct ieee80211_vif *vif, *sta_vif = NULL; unsigned long flags; int i, set_ps = 1; @@ -1939,6 +1945,7 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw) rsi_dbg(INFO_ZONE, "%s: mac80211 resume\n", __func__); if (common->hibernate_resume) { + common->mac_ops_resumed = true; /* Device need a complete restart of all MAC operations. * returning 1 will serve this purpose. */ diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index 3375d64..7e0edc7 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c @@ -1395,6 +1395,7 @@ static int rsi_restore(struct device *dev) common->iface_down = true; adapter->sc_nvifs = 0; + adapter->ps_state = PS_NONE; common->wow_flags = 0; common->iface_down = false; diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h index 4dc0c01..35d13f3 100644 --- a/drivers/net/wireless/rsi/rsi_main.h +++ b/drivers/net/wireless/rsi/rsi_main.h @@ -311,6 +311,7 @@ struct rsi_common { struct cfg80211_scan_request *hwscan; struct rsi_bgscan_params bgscan; u8 bgscan_en; + u8 mac_ops_resumed; }; struct eepromrw_info { From patchwork Fri Jan 25 06:30:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Rebbagondla X-Patchwork-Id: 10780621 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C7891399 for ; Fri, 25 Jan 2019 06:30:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04B0C2F42F for ; Fri, 25 Jan 2019 06:30:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED1452F458; Fri, 25 Jan 2019 06:30:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 812B72F42F for ; Fri, 25 Jan 2019 06:30:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727264AbfAYGaa (ORCPT ); Fri, 25 Jan 2019 01:30:30 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41975 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbfAYGaa (ORCPT ); Fri, 25 Jan 2019 01:30:30 -0500 Received: by mail-pl1-f196.google.com with SMTP id u6so4089417plm.8 for ; Thu, 24 Jan 2019 22:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9c5Qv3xKOnSbwK7hxSyqCi1So4hNP+y66JHHTtRgqGg=; b=EDTJrFoN0TQ7y0URn+ovhKr/gDoqaXiE0bkjCYOTsKhPuF2DyMhG+/x0SaWEiiqdmq h8RdHoj3NHJglWjWXn5o77D0vvdPkRIATsL2UOMX2OLQdRAcDhPiW4tBQkUKknrAT+7p vJJhyxvRohvSS/6595Wgq2rofXsNPtc+SoaCHHF8DKqLhAoNRv4KT++HPQJWLH1lNyJi D6Lret2d9qb6hRHg+7qV/AbBjpABhgNzqA1cvShGM8+8wHwOPbwqArMzvmv5fhUogyYB kJGs4fHbTjLWLQKEoTViG+PYuwt3YumMNg6JXF8Q+OJ87jhjeDO4Hs7AG6FHCsq6/Esg vlIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9c5Qv3xKOnSbwK7hxSyqCi1So4hNP+y66JHHTtRgqGg=; b=aj1HPK2zFtmIkHh0mZhlASR21U/m0w/MTpUzH+Nrwhcz+7aM+J2agiQn9+dK7M4Aop OOYoYKAf+0gVQsLbKrLeBFTMt+Rkbg9bQnk3+UyiyV7F0KQpWHrZxn/1MVoNi8hsje5t iCD67HyVqTg7Lzvo51H7XYslTE+renhbqk7tQ07G5FUsihovgY/Pq19l7J90s4DBTHIJ TfI/LuwYCIPwAMjXfw5gurh2+/IjJTCCeYFZbjQqKcf++Tt5TVWThilHAnqnWzDyWlR4 A0rHUDYAH56OWjQkDqj0Keo6MQv0jVdJ5Hm2Rvq6rJOdR3PQyHvjppwz6yeq1QuIe/YT 4+KA== X-Gm-Message-State: AJcUukeDgdgB/t0Q6t3oG1VSwq84F3bWic0VpDKDqP2MzT48auTRTqFH 19ewlpe8BQmQZ3C6/3cYA4I= X-Google-Smtp-Source: ALg8bN5Bmj8wNXWk3QY/xJcxXypspPXpMI7kZakIV4un0IXwR/lQ/ZZkdVgW7oGyLRXXn99Ea7M2iw== X-Received: by 2002:a17:902:e18c:: with SMTP id cd12mr9162761plb.279.1548397829963; Thu, 24 Jan 2019 22:30:29 -0800 (PST) Received: from cpu459.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id x19sm37384793pfk.14.2019.01.24.22.30.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 22:30:29 -0800 (PST) From: Siva Rebbagondla To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Rishikesh Basu , Siva Rebbagondla , Ganapathiraju Kondraju , krishna.pedda@redpinesignals.com Subject: [PATCH 5/5] rsi: fix for wowlan wakeup failure Date: Fri, 25 Jan 2019 12:00:02 +0530 Message-Id: <1548397802-12180-6-git-send-email-siva8118@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1548397802-12180-1-git-send-email-siva8118@gmail.com> References: <1548397802-12180-1-git-send-email-siva8118@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Siva Rebbagondla During wowlan regression tests, sometimes radio is not waking up for wowlan packet in coex mode. This is because of power save is enabled by default in case of coex mode greater than one. Hence, disable power save in coex mode to avoid radio loss. Signed-off-by: Siva Rebbagondla --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index 7bc8da6..3fd2571 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -1901,6 +1901,10 @@ int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan) return 0; } rsi_dbg(INFO_ZONE, "TRIGGERS %x\n", triggers); + + if (common->coex_mode > 1) + rsi_disable_ps(adapter, adapter->vifs[0]); + rsi_send_wowlan_request(common, triggers, 1); /**