From patchwork Fri Jul 21 04:24:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9856031 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.web.codeaurora.org (Postfix) with ESMTP id 2ABE1601C0 for ; Fri, 21 Jul 2017 04:25:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11AF428734 for ; Fri, 21 Jul 2017 04:25:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06A7128751; Fri, 21 Jul 2017 04:25:00 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 9B8CF28734 for ; Fri, 21 Jul 2017 04:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750784AbdGUEYy (ORCPT ); Fri, 21 Jul 2017 00:24:54 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:34420 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbdGUEYw (ORCPT ); Fri, 21 Jul 2017 00:24:52 -0400 Received: by mail-oi0-f68.google.com with SMTP id v11so2343168oif.1 for ; Thu, 20 Jul 2017 21:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=76JuCzqg1qw0RJGQYvtxtjzfTOjbJm4bzinKvmksZVg=; b=sizxYlFRULdVDL7pFYQ7X0e91sjT2beko4TRB+Wm/3Z3Qh3nSF4TJI27AtkrgDTGL4 Za/eIVU9GOFT4xQTKLvN9HQFysx+DaTZEnr+8trbDF6lezX1viYzZtEJfxiqHaQTmsF4 Mo83l7fYaU+QsbAFfHUq6Hfe7SXWG6HTaP7uM/nz8Kr0wg5kOqovJ3mNSA1xfmC0OnZU Hf53OkP50BLkjNJCJwVgppht3OHxxXqJMVFylUHTlOiKdeq+mBLkOvcy1wQHDVvCVn+L L0J7mYWjLCZdEVZQaK/BnjAIzQQ3g+9GXUGBGmvnn8Ly6tb+TnqrcBDx2gxpEpFBG7EW 1gQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=76JuCzqg1qw0RJGQYvtxtjzfTOjbJm4bzinKvmksZVg=; b=CPQldO15RwispklnfzRETWfkTijIykprrxKS+Z/wPY21pOIMvUU3VaInivnY+ca6+b vkWHGjlVvbCyWXOA47kg3m5I026uSGFh86XTNYv+ijjFa5gS2GazbIVEZ4ZZyKqt1IBj 4aHGVKK85K0UVpUpfscvMed5HT/LvbxfZTEO82brYH0za5hKdAFCDbHE66guv1OLHQH3 8weeQoc8oGlUSwUXXu4DoNdFIuAsr/0SngaYQYJzDnK1aEIeKfbJCigUHg6iwO++xvrE xkXVoAqzBg82T9WW6cxwoWEMka9DSqvbogSnmxVS0x5Pj8zhVcHizP+9aHT2tCtKXANA 7bVg== X-Gm-Message-State: AIVw111EEcYpRfk9IBB877mTQpO6XSt6IkdaZd8kN0hWfwXOkaMucVFL SEdcDKV03hKG9A== X-Received: by 10.202.172.16 with SMTP id v16mr35286oie.293.1500611092435; Thu, 20 Jul 2017 21:24:52 -0700 (PDT) Received: from linux-4v1g.suse (cpe-24-31-249-175.kc.res.rr.com. [24.31.249.175]) by smtp.gmail.com with ESMTPSA id s69sm1832947ois.15.2017.07.20.21.24.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Jul 2017 21:24:52 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Ping-Ke Shih , Larry Finger , Yan-Hsuan Chuang , Birming Chiu , Shaofu , Steven Ting Subject: [PATCH 04/10] rtlwifi: Issue connection notification to phydm. Date: Thu, 20 Jul 2017 23:24:34 -0500 Message-Id: <20170721042440.15839-5-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170721042440.15839-1-Larry.Finger@lwfinger.net> References: <20170721042440.15839-1-Larry.Finger@lwfinger.net> 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: Ping-Ke Shih Phydm needs to know connection state, so we issue notification to indicate reset_dm, pause_dig, or add/del sta. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- drivers/net/wireless/realtek/rtlwifi/core.c | 13 +++++++++++++ drivers/net/wireless/realtek/rtlwifi/ps.c | 2 ++ 2 files changed, 15 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index bb1425c3dc96..dc233bc146b0 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -946,6 +946,9 @@ static int rtl_op_sta_add(struct ieee80211_hw *hw, RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, "Add sta addr is %pM\n", sta->addr); rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0, true); + + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_add_sta(rtlpriv, sta); } return 0; @@ -960,6 +963,10 @@ static int rtl_op_sta_remove(struct ieee80211_hw *hw, if (sta) { RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, "Remove sta addr is %pM\n", sta->addr); + + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_del_sta(rtlpriv, sta); + sta_entry = (struct rtl_sta_info *)sta->drv_priv; sta_entry->wireless_mode = 0; sta_entry->ratr_index = 0; @@ -1434,6 +1441,9 @@ static void rtl_op_sw_scan_start(struct ieee80211_hw *hw, return; } + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_pause_dig(rtlpriv, 1); + if (rtlpriv->cfg->ops->get_btc_status()) rtlpriv->btcoexist.btc_ops->btc_scan_notify(rtlpriv, 1); @@ -1491,6 +1501,9 @@ static void rtl_op_sw_scan_complete(struct ieee80211_hw *hw, rtlpriv->cfg->ops->scan_operation_backup(hw, SCAN_OPT_RESTORE); if (rtlpriv->cfg->ops->get_btc_status()) rtlpriv->btcoexist.btc_ops->btc_scan_notify(rtlpriv, 0); + + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_pause_dig(rtlpriv, 0); } static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c index 07ee3096f50e..c64544158516 100644 --- a/drivers/net/wireless/realtek/rtlwifi/ps.c +++ b/drivers/net/wireless/realtek/rtlwifi/ps.c @@ -301,6 +301,8 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw) ppsc->in_powersavemode = false; _rtl_ps_inactive_ps(hw); /* call after RF on */ + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_reset_dm(rtlpriv); if (rtlpriv->cfg->ops->get_btc_status()) rtlpriv->btcoexist.btc_ops->btc_ips_notify(rtlpriv, ppsc->inactive_pwrstate);