Search Linux Wireless

Re: RTL8187 bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/03/2013 03:21 PM, Nikita N. wrote:

After rewriting your patch a bit (see attached copy), I got the following:

usb 1-5: new high-speed USB device number 5 using ehci-pci
rtl8187: inconsistency between id with OEM info!
-- regulatory rules --
ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'
ieee80211 phy3: hwaddr 00:11:6b:3e:c4:0a, RTL8187BvB(early) V0 + rtl8225z2, rfkill mask 2
rtl8187: Customer ID is 0x00
rtl8187: wireless switch is on
usbcore: registered new interface driver rtl8187
systemd-udevd[5366]: renamed network interface wlan1 to wlp0s2f1u5
rtl8187_configure_filter
IN>changed_flags=0x0 ,total_flags=0x80000000 ,multicast=0x1 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
rtl8187_configure_filter
IN>changed_flags=0x2 ,total_flags=0x80000000 ,multicast=0x1 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
IPv6: ADDRCONF(NETDEV_UP): wlp0s2f1u5: link is not ready
rtl8187_configure_filter
IN>changed_flags=0x2 ,total_flags=0x80000000 ,multicast=0x2 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
rtl8187_configure_filter
IN>changed_flags=0x12 ,total_flags=0x80000010 ,multicast=0x2 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
rtl8187_configure_filter
IN>changed_flags=0x2 ,total_flags=0x80000000 ,multicast=0x2 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
rtl8187_configure_filter
IN>changed_flags=0x12 ,total_flags=0x80000010 ,multicast=0x2 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
wlp0s2f1u5: authenticate with 20:e5:2a:01:f7:ea
rtl8187_configure_filter
IN>changed_flags=0x2 ,total_flags=0x80000000 ,multicast=0x2 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
wlp0s2f1u5: send auth to 20:e5:2a:01:f7:ea (try 1/3)
wlp0s2f1u5: authenticated
wlp0s2f1u5: associate with 20:e5:2a:01:f7:ea (try 1/3)
wlp0s2f1u5: RX AssocResp from 20:e5:2a:01:f7:ea (capab=0x411 status=0 aid=7)
wlp0s2f1u5: associated
IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s2f1u5: link becomes ready
rtl8187_configure_filter
IN>changed_flags=0x2 ,total_flags=0x80000000 ,multicast=0x3 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
rtl8187_configure_filter
IN>changed_flags=0x2 ,total_flags=0x80000000 ,multicast=0x4 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
rtl8187_configure_filter
IN>changed_flags=0x2 ,total_flags=0x80000000 ,multicast=0x5 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e
rtl8187_configure_filter
IN>changed_flags=0x12 ,total_flags=0x80000010 ,multicast=0x5 ,priv->rx_conf=0x9094fc0e
>FIF_ALLMULTI
OUT>total_flags=0x2 ,priv->rx_conf=0x9094fc0e

Some comments on your patch:

1. The routine can be gotten from ("%s\n", __func__). That is a lot easier than hand coding the routine name.

2. Every printk should be terminated with \n (new line).

3. You can print multi-byte values with 0x%x. No need to split out the bytes the way you did.

I do not have aircrack running on my system, thus I cannot issue exactly the same command that you did.

The "daemon" that keeps calling rtl8187_configure_filter() is the transmit packet process of the kernel. You get one call for every packet out.

Larry

Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187/dev.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -1306,17 +1306,30 @@ static void rtl8187_configure_filter(str
 				     u64 multicast)
 {
 	struct rtl8187_priv *priv = dev->priv;
+//nikita
+	printk(KERN_WARNING "%s\n", __func__);
+	printk(KERN_WARNING "IN>changed_flags=0x%x ,total_flags=0x%x ,multicast=0x%x ,priv->rx_conf=0x%x\n",
+	       changed_flags, *total_flags, (unsigned int)multicast, priv->rx_conf);
 
-	if (changed_flags & FIF_FCSFAIL)
+	if (changed_flags & FIF_FCSFAIL) {
 		priv->rx_conf ^= RTL818X_RX_CONF_FCS;
-	if (changed_flags & FIF_CONTROL)
+		printk(KERN_WARNING ">FIF_FCSFAIL\n");
+	}
+	if (changed_flags & FIF_CONTROL) {
 		priv->rx_conf ^= RTL818X_RX_CONF_CTRL;
-	if (changed_flags & FIF_OTHER_BSS)
+		printk(KERN_WARNING ">FIF_CONTROL\n");
+	}
+	if (changed_flags & FIF_OTHER_BSS) {
 		priv->rx_conf ^= RTL818X_RX_CONF_MONITOR;
-	if (*total_flags & FIF_ALLMULTI || multicast > 0)
+		printk(KERN_WARNING ">FIF_OTHER_BSS\n");
+	}
+	if (*total_flags & FIF_ALLMULTI || multicast > 0) {
 		priv->rx_conf |= RTL818X_RX_CONF_MULTICAST;
-	else
+		printk(KERN_WARNING ">FIF_ALLMULTI\n");
+	} else {
 		priv->rx_conf &= ~RTL818X_RX_CONF_MULTICAST;
+		printk(KERN_WARNING ">not FIF_ALLMULTI\n");
+	}
 
 	*total_flags = 0;
 
@@ -1330,6 +1343,8 @@ static void rtl8187_configure_filter(str
 		*total_flags |= FIF_ALLMULTI;
 
 	rtl818x_iowrite32_async(priv, &priv->map->RX_CONF, priv->rx_conf);
+//nikita
+	printk(KERN_WARNING "OUT>total_flags=0x%x ,priv->rx_conf=0x%x\n", *total_flags, priv->rx_conf);
 }
 
 static int rtl8187_conf_tx(struct ieee80211_hw *dev,

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux