From patchwork Sun Jun 18 16:12:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9794919 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 DC596601C8 for ; Sun, 18 Jun 2017 16:13:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDF4827FAD for ; Sun, 18 Jun 2017 16:13:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C08EE2846B; Sun, 18 Jun 2017 16:13:15 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 390FE27FAD for ; Sun, 18 Jun 2017 16:13:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753243AbdFRQNH (ORCPT ); Sun, 18 Jun 2017 12:13:07 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:33435 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753223AbdFRQND (ORCPT ); Sun, 18 Jun 2017 12:13:03 -0400 Received: by mail-oi0-f65.google.com with SMTP id k145so7238478oih.0 for ; Sun, 18 Jun 2017 09:13:01 -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=b2EF7vtjFnscxD3h2ujZZSJuo+BysuF00vIcr27iZuI=; b=Lo46L6DwE0uc8cEuCcQUrFoDtyrbtfoa4Lp0n9Z0xC/40SfkVn2H38NZkFBnJ3+tu6 Gm1K7sEXDffY/TSIrnKeci8oGMAe+KO6uLFI+PAadRAec6nG0yi6EmV9Q9Z8O0Uq+p+O hYf8wA6vDNNtCGnIk6SUmXBaBsg9qeyISVszMeGSlixwyIvvE4ABhY8OcnOtYqMHSOnx gzXhCXONxJzzOrD8iPa5AD5yndczQY80Iw52h6gZKGJnyGYps1Y9+RjHs7s9NAe9hmya JAurHupHUPiQOR0ie9VmdneRx+HzUb7dPkLsPgMqGzqxnVpg3ZuartGNOUfOMC3FLKc2 xFYw== 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=b2EF7vtjFnscxD3h2ujZZSJuo+BysuF00vIcr27iZuI=; b=nuWwHUXocxCKpNkf3rm0NuWKau19YeI4rd+9vAfV5BhgQIGH55IarL7tzsJi67XJA3 8seEwVRSX5CdTxXHliz/AcPeoTU4UwxMAaloMuxw4EkYzNVsflDEZmK2H1T2RXjU+Akx wnz2ABqu5xYHIFlhhA8sv0gpMdpUdBwXVK52aMUoZZ1fycGZel/wUUzG4sHGfTSg7Vno dSuF+FgBUbWS/MAX6ePXIrNWk4qKia+GhilAfW0QobZvTwQ0hPKFovdRCDtcAp5Iuo40 YN/NZyJ2DxATs15oZiHTMinaOJOI29noJENxZ9isoI6p6BQbJU/fc0Tpa93y/lgSXNtF eBMQ== X-Gm-Message-State: AKS2vOzYP5+k98pojhqzv1EcqCIBv3y3grNqTacdvnB62suU19DecOIH ohwoolH4msjAbw== X-Received: by 10.202.64.11 with SMTP id n11mr8946351oia.124.1497802380751; Sun, 18 Jun 2017 09:13:00 -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 s41sm4473985ots.54.2017.06.18.09.12.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Jun 2017 09:13:00 -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 07/11] rtlwifi: Revise special packet notification to be readable format. Date: Sun, 18 Jun 2017 11:12:45 -0500 Message-Id: <20170618161249.6146-8-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170618161249.6146-1-Larry.Finger@lwfinger.net> References: <20170618161249.6146-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 We extend types of special packets to a enumeration from boolean value. 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/base.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c index f9d249f85177..897ec3cfa8c8 100644 --- a/drivers/net/wireless/realtek/rtlwifi/base.c +++ b/drivers/net/wireless/realtek/rtlwifi/base.c @@ -1313,14 +1313,15 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) } EXPORT_SYMBOL_GPL(rtl_action_proc); -static void setup_arp_tx(struct rtl_priv *rtlpriv, struct rtl_ps_ctl *ppsc) +static void setup_special_tx(struct rtl_priv *rtlpriv, struct rtl_ps_ctl *ppsc, + int type) { struct ieee80211_hw *hw = rtlpriv->hw; rtlpriv->ra.is_special_data = true; if (rtlpriv->cfg->ops->get_btc_status()) rtlpriv->btcoexist.btc_ops->btc_special_packet_notify( - rtlpriv, 1); + rtlpriv, type); rtl_lps_leave(hw); ppsc->last_delaylps_stamp_jiffies = jiffies; } @@ -1390,13 +1391,15 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx, (is_tx) ? "Tx" : "Rx"); if (is_tx) - setup_arp_tx(rtlpriv, ppsc); + setup_special_tx(rtlpriv, ppsc, + PACKET_DHCP); + return true; } } } else if (ETH_P_ARP == ether_type) { if (is_tx) - setup_arp_tx(rtlpriv, ppsc); + setup_special_tx(rtlpriv, ppsc, PACKET_ARP); return true; } else if (ETH_P_PAE == ether_type) { @@ -1407,6 +1410,8 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx, rtlpriv->ra.is_special_data = true; rtl_lps_leave(hw); ppsc->last_delaylps_stamp_jiffies = jiffies; + + setup_special_tx(rtlpriv, ppsc, PACKET_EAPOL); } return true;