From patchwork Tue Feb 24 15:23:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 5873301 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 7BB74BF440 for ; Tue, 24 Feb 2015 15:23:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0E852037F for ; Tue, 24 Feb 2015 15:23:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B79612037E for ; Tue, 24 Feb 2015 15:23:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752177AbbBXPXP (ORCPT ); Tue, 24 Feb 2015 10:23:15 -0500 Received: from mail-oi0-f52.google.com ([209.85.218.52]:48847 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbbBXPXO (ORCPT ); Tue, 24 Feb 2015 10:23:14 -0500 Received: by mail-oi0-f52.google.com with SMTP id u20so19797811oif.11; Tue, 24 Feb 2015 07:23:13 -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; bh=0moAZCMjCFtEh62Kp+JQL/7tgY2v6wpOytJGS4Yz3Jg=; b=FCW6h2VAgD+ZJzD/egxmVNtZJXGsCyoZbJC9Kv1uLx6wRaImwaQB6E5/GFM3m6mQJQ MqFvfnGMrEJP0dzD3vT9bSVgoDlcdsDNTJd2rNPWn9GpQYofo9wkbn6VOPiwCqZzHINz 1s6/QAca6rdj1hc16ZTJpxDb+zMnVwGAur9U8Zh9Kl4a+QI9GImgGMGtR5ScUMZxY2Yz X984my5VkNYYRONhF0YP/9JyBjS+DDPpVEvpeuHwYfwav9W+14FcEzx6fQLDIe+7D1IO l1yJnwCumya13x8wz0Jtqs9dEtTipDqkm209cdP/AivqoTOwfNYC5QKOB50IJ7FLCCfc AyZg== X-Received: by 10.60.63.39 with SMTP id d7mr11398886oes.4.1424791393572; Tue, 24 Feb 2015 07:23:13 -0800 (PST) Received: from linux.site ([75.81.56.199]) by mx.google.com with ESMTPSA id co9sm346172obb.22.2015.02.24.07.23.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Feb 2015 07:23:12 -0800 (PST) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Larry Finger , netdev@vger.kernel.org, Stable , Alan Fisher Subject: [PATCH] rtlwifi: Improve handling of IPv6 packets Date: Tue, 24 Feb 2015 09:23:01 -0600 Message-Id: <1424791381-31863-1-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.4 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 Routine rtl_is_special_data() is supposed to identify packets that need to use a low bit rate so that the probability of successful transmission is high. The current version has a bug that causes all IPv6 packets to be labelled as special, with a corresponding low rate of transmission. A complete fix will be quite intrusive, but until that is available, all IPv6 packets are identified as regular. This patch also removes a magic number. Reported-and-tested-by: Alan Fisher Signed-off-by: Larry Finger Cc: Stable [3.18+] Cc: Alan Fisher --- drivers/net/wireless/rtlwifi/base.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index 1d46774..074f716 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c @@ -1386,8 +1386,11 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) } return true; - } else if (0x86DD == ether_type) { - return true; + } else if (ETH_P_IPV6 == ether_type) { + /* TODO: Handle any IPv6 cases that need special handling. + * For now, always return false + */ + goto end; } end: