]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rtlwifi: Improve handling of IPv6 packets
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 24 Feb 2015 15:23:01 +0000 (09:23 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2015 12:03:53 +0000 (14:03 +0200)
commit c8f0345586694a33f828bc6b177fb21eb1702325 upstream.

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 <acf@unixcube.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Alan Fisher <acf@unixcube.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rtlwifi/base.c

index 40b6d1d006d7ab7dc9076a967fedae75259dc1fd..af2486965782d4984c5ff70307c98ee84c34c31e 100644 (file)
@@ -1314,8 +1314,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: