All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
       [not found] <51A77433.2060702@lwfinger.net>
@ 2013-06-26 11:30 ` shiki.biomernok
  2013-06-26 16:14   ` Larry Finger
  0 siblings, 1 reply; 13+ messages in thread
From: shiki.biomernok @ 2013-06-26 11:30 UTC (permalink / raw)
  To: linux-wireless, Larry.Finger

Hello everyone!

CC'ing my original message that I sent to Larry.
It's been a while, but I've been busy and I couldn't fiddle with the 
wireless device.

Basically it's a 8192cu device. Larry suspected it's not, but I think he 
saw the advertisement displayed on top of the TP-Link page.
I even mailed TP-Link, and here is the reply:

    The chipset is Realtek RTL8192CU and you can download the driver
    from
    http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true.
    Thank you.

Tested with many kernels, but none of them worked.
Ubuntu 13.04 (both stock + updated), Fedora (Schrodinger-1), Fedora Beta 
(Schrodinger), openSUSE (normal+tumbleweed).
I even tried the latest kernels since 3.10-rc4. (latest I tried is -rc7)

Basically this device *should* work with the 8192cu driver, but it just 
won't.
If you just plug it in, nothing happens.
You have to first:
$ modprobe 8192cu
$ echo 2357 0100 > /sys/bus/usb/drivers/rtl8192cu/new_id

Then it lights up, it shows up in NM-Applet. But it won't work.
I tried enabling the realtek debug option at the kernel driver, but it 
didn't help.
Even with that, I only see the authentication failed messages.

Dmesg shows the errors: http://pastebin.com/QCfXYCZ1


Hope you guys can come up with some tips/ideas.
Ps.: I hope you don't mind the CC Larry.

Best regards,


-------- Original Message --------
Subject: 	Re: TP-Link 8200ND - rtl8192cu module not loading / working
Date: 	Thu, 30 May 2013 10:45:55 -0500
From: 	Larry Finger <Larry.Finger@lwfinger.net>
To: 	Me <shiki.biomernok@gmail.com>
CC: 	wlanfae@realtek.com



On 05/29/2013 02:21 PM, I wrote:
> Dear Realtek!
>
> I just bought a TP-Link 8200ND wireless USB device, that uses the Realtek
> rtl8192cu driver. The driver is included in every recent kernel, but I can't use it.
>
> Things I tried:
> - Plug it in: It only shows a blank string at "lsusb".
> - Loading the module by hand: "lsusb" is still empty, but "dmesg" shows the
> module is loaded, and I can mess around under /sys/bus/usb/drivers/8192cu/
> - Adding a new ID from the Debian wiki for known devices.
> This works as far as "dmesg" is concerned. It will say I connected a new device,
> like a Realtek wifi USB device. BUT I still don't have anything in my network
> manager/ifconfig/rfkill. Nothing.
>
> This is what I see in lsusb:
> Bus 002 Device 002: ID 2357:0100
>
>
> I would be more than willing to help you guys out with this.
> Can even set up my laptop with SSH so you could debug/develop/reboot whatever
> you need.

In the future, I will refuse to answer your e-mails regarding wireless devices
*UNLESS* you also Cc a wireless mailing list. The "best" option would be
linux-wireless@vger.kernel.org. If you have any questions about why I insist on
this, please read the following two links as to why emailing a single person
directly is usually not a good thing, and causes extra work on a single person:
     http://www.arm.linux.org.uk/news/?newsitem=11
     http://www.eyrie.org/~eagle/faqs/questions.html

I cannot add you to the list as that would expose your email address on a public
forum, and I will not create a second breach of etiquette just because you
already did one.

Your device is *NOT* an RTL8192CU device. I wondered when I saw the 300 Mbps,
but I was certain when I saw it was a dual-band device.

I have a driver for your device, but I will not tell you how to get it until you
place a proper request on some mailing list!

Larry




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-26 11:30 ` Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working shiki.biomernok
@ 2013-06-26 16:14   ` Larry Finger
  2013-06-26 17:29     ` shiki.biomernok
  0 siblings, 1 reply; 13+ messages in thread
From: Larry Finger @ 2013-06-26 16:14 UTC (permalink / raw)
  To: shiki.biomernok; +Cc: linux-wireless

On 06/26/2013 06:30 AM, shiki.biomernok wrote:
> Hello everyone!
>
> CC'ing my original message that I sent to Larry.
> It's been a while, but I've been busy and I couldn't fiddle with the wireless
> device.
>
> Basically it's a 8192cu device. Larry suspected it's not, but I think he saw the
> advertisement displayed on top of the TP-Link page.
> I even mailed TP-Link, and here is the reply:
>
>     The chipset is Realtek RTL8192CU and you can download the driver
>     from
>
> http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true.
>
>     Thank you.
>
> Tested with many kernels, but none of them worked.
> Ubuntu 13.04 (both stock + updated), Fedora (Schrodinger-1), Fedora Beta
> (Schrodinger), openSUSE (normal+tumbleweed).
> I even tried the latest kernels since 3.10-rc4. (latest I tried is -rc7)
>
> Basically this device *should* work with the 8192cu driver, but it just won't.
> If you just plug it in, nothing happens.
> You have to first:
> $ modprobe 8192cu
> $ echo 2357 0100 > /sys/bus/usb/drivers/rtl8192cu/new_id
>
> Then it lights up, it shows up in NM-Applet. But it won't work.
> I tried enabling the realtek debug option at the kernel driver, but it didn't help.
> Even with that, I only see the authentication failed messages.
>
> Dmesg shows the errors: http://pastebin.com/QCfXYCZ1
>
>
> Hope you guys can come up with some tips/ideas.
> Ps.: I hope you don't mind the CC Larry.

No, that is what I told you to do.

A patch has been submitted to add that device to the USB_DEVICE table. It is 
included in the wireless-testing git tree, but it is not in the mainline code 
(yet). After that patch was applied, the device worked for that reported.

I noticed that you are getting an oops from iwlwifi, and an ehci-hcd error. Are 
you also exploring these problems?

If possible, could you use the wireless-testing repo? That will get you the 
latest code for all wireless drivers, and the USB code will match mainline.

Larry



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-26 16:14   ` Larry Finger
@ 2013-06-26 17:29     ` shiki.biomernok
  2013-06-26 20:25       ` Larry Finger
  0 siblings, 1 reply; 13+ messages in thread
From: shiki.biomernok @ 2013-06-26 17:29 UTC (permalink / raw)
  To: Larry Finger, linux-wireless

Hello Larry/Mailing list!

I have compiled and installed the new wireless-testing kernel from git.
I'm sure I used the new kernel, as the device lighted up as soon as I 
plugged in. (And I got some new atheros ac module at "make oldconfig".)
There was no need for manual echo or modprobe.

Yet, the device is not working. It dies at the very same step.
Here is the dmesg: http://pastebin.com/C1MNdFiw

Please, let me know if I can help with anything.
Any debug option, patch or things like that.

My offer is still there Larry, I'm willing to give you a full SSH access 
to the machine with this stuff plugged in.
Besides that, I have no other idea.


! My router runs OpenWRT (latest stable), so I could also gather info 
from there. If it's possible.
(I checked dmesg but there is nothing. Only some non-crucial info about 
the generic eth ports and such.)

Thank you for the help.

(By the way if the chip is rare (no other people will benefit), then I 
can just get it back and ask for a refund. But if others use it as well, 
then it's not a waste of time... I guess.)

On 2013-06-26 18:14, Larry Finger wrote:
> On 06/26/2013 06:30 AM, shiki.biomernok wrote:
>> Hello everyone!
>>
>> CC'ing my original message that I sent to Larry.
>> It's been a while, but I've been busy and I couldn't fiddle with the 
>> wireless
>> device.
>>
>> Basically it's a 8192cu device. Larry suspected it's not, but I think 
>> he saw the
>> advertisement displayed on top of the TP-Link page.
>> I even mailed TP-Link, and here is the reply:
>>
>>     The chipset is Realtek RTL8192CU and you can download the driver
>>     from
>>
>> http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true. 
>>
>>
>>     Thank you.
>>
>> Tested with many kernels, but none of them worked.
>> Ubuntu 13.04 (both stock + updated), Fedora (Schrodinger-1), Fedora Beta
>> (Schrodinger), openSUSE (normal+tumbleweed).
>> I even tried the latest kernels since 3.10-rc4. (latest I tried is -rc7)
>>
>> Basically this device *should* work with the 8192cu driver, but it 
>> just won't.
>> If you just plug it in, nothing happens.
>> You have to first:
>> $ modprobe 8192cu
>> $ echo 2357 0100 > /sys/bus/usb/drivers/rtl8192cu/new_id
>>
>> Then it lights up, it shows up in NM-Applet. But it won't work.
>> I tried enabling the realtek debug option at the kernel driver, but 
>> it didn't help.
>> Even with that, I only see the authentication failed messages.
>>
>> Dmesg shows the errors: http://pastebin.com/QCfXYCZ1
>>
>>
>> Hope you guys can come up with some tips/ideas.
>> Ps.: I hope you don't mind the CC Larry.
>
> No, that is what I told you to do.
>
> A patch has been submitted to add that device to the USB_DEVICE table. 
> It is included in the wireless-testing git tree, but it is not in the 
> mainline code (yet). After that patch was applied, the device worked 
> for that reported.
>
> I noticed that you are getting an oops from iwlwifi, and an ehci-hcd 
> error. Are you also exploring these problems?
>
> If possible, could you use the wireless-testing repo? That will get 
> you the latest code for all wireless drivers, and the USB code will 
> match mainline.
>
> Larry
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-26 17:29     ` shiki.biomernok
@ 2013-06-26 20:25       ` Larry Finger
  2013-06-27  9:58         ` shiki.biomernok
  2013-06-27 10:08         ` shiki.biomernok
  0 siblings, 2 replies; 13+ messages in thread
From: Larry Finger @ 2013-06-26 20:25 UTC (permalink / raw)
  To: shiki.biomernok; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 2752 bytes --]

On 06/26/2013 12:29 PM, shiki.biomernok wrote:
> Hello Larry/Mailing list!
>
> I have compiled and installed the new wireless-testing kernel from git.
> I'm sure I used the new kernel, as the device lighted up as soon as I plugged
> in. (And I got some new atheros ac module at "make oldconfig".)
> There was no need for manual echo or modprobe.
>
> Yet, the device is not working. It dies at the very same step.
> Here is the dmesg: http://pastebin.com/C1MNdFiw
>
> Please, let me know if I can help with anything.
> Any debug option, patch or things like that.
>
> My offer is still there Larry, I'm willing to give you a full SSH access to the
> machine with this stuff plugged in.
> Besides that, I have no other idea.
>
>
> ! My router runs OpenWRT (latest stable), so I could also gather info from
> there. If it's possible.
> (I checked dmesg but there is nothing. Only some non-crucial info about the
> generic eth ports and such.)
>
> Thank you for the help.
>
> (By the way if the chip is rare (no other people will benefit), then I can just
> get it back and ask for a refund. But if others use it as well, then it's not a
> waste of time... I guess.)

I think the TP-Link 8200ND is relatively new. You have version 0x11 for your 
chip, and mine is 0x10. That could be a difference.

Whay are you forcing the module loading? As indicated by the (F) in the 
traceback, it looks as if all of them are being forced.

[   13.111932] BUG: unable to handle kernel NULL pointer dereference at 
0000000000000005
[   13.111943] IP: [<ffffffffa03196c7>] iwl_dbgfs_register+0x27/0x70 [iwldvm]
[   13.111944] PGD 0
[   13.111945] Oops: 0000 [#1] PREEMPT SMP
[   13.111964] Modules linked in: arc4(F) snd_hda_codec(F) snd_hwdep(F) 
snd_pcm(F) iwldvm(F+) snd_page_alloc(F) thinkpad_acpi(F) nvram(F) mac80211(F) 
snd_seq_midi(F) i915(F+) snd_seq_midi_event(F) drm_kms_helper(F) snd_rawmidi(F) 
drm(F) snd_seq(F) snd_timer(F) coretemp(F) snd_seq_device(F) r592(F) 
i2c_algo_bit(F) snd(F) iwlwifi(F) soundcore(F) tpm_tis(F) memstick(F) btusb(F) 
microcode(F) psmouse(F) bluetooth(F) serio_raw(F) wmi(F) cfg80211(F) video(F) 
lpc_ich(F) hid_generic(F) usbhid(F) hid(F) sdhci_pci(F) sdhci(F) ahci(F) 
libahci(F) e1000e(F) ptp(F) pps_core(F)
[   13.111967] CPU: 1 PID: 741 Comm: modprobe Tainted: GF 
3.10.0-rc7-wl-x1-1000hz-wifitesting #1
[   13.111968] Hardware name: LENOVO 208252G/208252G, BIOS 6FET92WW (3.22 ) 
12/14/2011
[   13.111969] task: ffff8801a3f5d640 ti: ffff8801a1b9e000 task.ti: ffff8801a1b9e000
[   13.111975] RIP: 0010:[<ffffffffa03196c7>]  [<ffffffffa03196c7>] 
iwl_dbgfs_register+0x27/0x70 [iwldvm]

To help us debug this matter, the attached patch will let you compile the vendor 
driver that you downloaded from the vendor site.

Larry



[-- Attachment #2: compile_warnings --]
[-- Type: text/plain, Size: 8899 bytes --]

Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/core/rtw_mlme_ext.c
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/core/rtw_mlme_ext.c
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/core/rtw_mlme_ext.c
@@ -1053,8 +1053,8 @@ unsigned int OnAuth(_adapter *padapter,
 	sa = GetAddr2Ptr(pframe);
 	
 	auth_mode = psecuritypriv->dot11AuthAlgrthm;
-	seq = cpu_to_le16(*(unsigned short *)((unsigned int)pframe + WLAN_HDR_A3_LEN + 2));
-	algorithm = cpu_to_le16(*(unsigned short *)((unsigned int)pframe + WLAN_HDR_A3_LEN));
+	seq = cpu_to_le16(*(unsigned short *)((unsigned long)pframe + WLAN_HDR_A3_LEN + 2));
+	algorithm = cpu_to_le16(*(unsigned short *)((unsigned long)pframe + WLAN_HDR_A3_LEN));
 
 	if (GetPrivacy(pframe))
 	{	
Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/core/rtw_p2p.c
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/core/rtw_p2p.c
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/core/rtw_p2p.c
@@ -2595,7 +2595,7 @@ u8 process_p2p_group_negotation_confirm(
 		_rtw_memset( groupid, 0x00, 38 );
 		if ( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen) )
 		{
-			DBG_8192C( "[%s] Ssid = %s, ssidlen = %d\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]) );
+			DBG_8192C( "[%s] Ssid = %s, ssidlen = %d\n", __FUNCTION__, &groupid[ETH_ALEN], (int)strlen(&groupid[ETH_ALEN]) );
 			_rtw_memcpy( pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN );
 			_rtw_memcpy( pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN );			
 		}
Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/include/rtw_recv.h
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/include/rtw_recv.h
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/include/rtw_recv.h
@@ -623,7 +623,7 @@ __inline static union recv_frame *rxmem_
 	//from any given member of recv_frame.
 	// rxmem indicates the any member/address in recv_frame
 	
-	return (union recv_frame*)(((uint)rxmem>>RXFRAME_ALIGN) <<RXFRAME_ALIGN) ;
+	return (union recv_frame*)(((ulong)rxmem>>RXFRAME_ALIGN) <<RXFRAME_ALIGN) ;
 	
 }
 
Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/core/rtw_br_ext.c
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/core/rtw_br_ext.c
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/core/rtw_br_ext.c
@@ -126,11 +126,11 @@ static int skb_pull_and_merge(struct sk_
 	int tail_len;
 	unsigned long end, tail;
 
-	if ((src+len) > skb->tail || skb->len < len)
-		return -1;
-
 	tail = (unsigned long)skb->tail;
 	end = (unsigned long)src+len;
+	if ((end) > tail || skb->len < len)
+		return -1;
+
 	if (tail < end)
 		return -1;
 
@@ -1633,13 +1633,13 @@ void dhcp_flag_bcast(_adapter *priv, str
 
 			if(iph->protocol == IPPROTO_UDP) // UDP
 			{
-				struct udphdr *udph = (struct udphdr *)((unsigned int)iph + (iph->ihl << 2));
+				struct udphdr *udph = (struct udphdr *)((unsigned long)iph + (iph->ihl << 2));
 
 				if((udph->source == __constant_htons(CLIENT_PORT))
 					&& (udph->dest == __constant_htons(SERVER_PORT))) // DHCP request
 				{
 					struct dhcpMessage *dhcph =
-						(struct dhcpMessage *)((unsigned int)udph + sizeof(struct udphdr));
+						(struct dhcpMessage *)((unsigned long)udph + sizeof(struct udphdr));
 
 					if(dhcph->cookie == __constant_htonl(DHCP_MAGIC)) // match magic word
 					{
Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/core/rtw_recv.c
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/core/rtw_recv.c
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/core/rtw_recv.c
@@ -3305,7 +3305,7 @@ static int amsdu_to_msdu(_adapter *padap
 			{
 				sub_skb->data = pdata;
 				sub_skb->len = nSubframe_Length;
-				sub_skb->tail = sub_skb->data + nSubframe_Length;
+				skb_set_tail_pointer(sub_skb, nSubframe_Length);
 			}
 			else
 			{
Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/os_dep/linux/ioctl_linux.c
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/os_dep/linux/ioctl_linux.c
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/os_dep/linux/ioctl_linux.c
@@ -143,7 +143,7 @@ static void indicate_wx_custom_event(_ad
 	union iwreq_data wrqu;
 
 	if (strlen(msg) > IW_CUSTOM_MAX) {
-		DBG_871X("%s strlen(msg):%u > IW_CUSTOM_MAX:%u\n", __FUNCTION__ ,strlen(msg), IW_CUSTOM_MAX);
+		DBG_871X("%s strlen(msg):%u > IW_CUSTOM_MAX:%u\n", __FUNCTION__ ,(uint)strlen(msg), IW_CUSTOM_MAX);
 		return;
 	}
 
@@ -3865,7 +3865,7 @@ static int rtw_p2p_set_go_nego_ssid(stru
 	struct iw_point *pdata = &wrqu->data;
 	struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
 
-	DBG_8192C( "[%s] ssid = %s, len = %d\n", __FUNCTION__, extra, strlen( extra ) );
+	DBG_8192C( "[%s] ssid = %s, len = %d\n", __FUNCTION__, extra, (int)strlen( extra ) );
 	_rtw_memcpy( pwdinfo->nego_ssid, extra, strlen( extra ) );
 	pwdinfo->nego_ssidlen = strlen( extra );
 	
Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/include/drv_types.h
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/include/drv_types.h
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/include/drv_types.h
@@ -462,10 +462,10 @@ struct _ADAPTER{
 	u8	bfirst_init;
 	u8	bHaltInProgress;
 	
-	_thread_hdl_	cmdThread;
-	_thread_hdl_	evtThread;
-	_thread_hdl_	xmitThread;
-	_thread_hdl_	recvThread;
+	void *cmdThread;
+	void *evtThread;
+	void *xmitThread;
+	void *recvThread;
 
 
 	NDIS_STATUS (*dvobj_init)(_adapter * adapter);
Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/os_dep/linux/os_intfs.c
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/os_dep/linux/os_intfs.c
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/os_dep/linux/os_intfs.c
@@ -35,6 +35,10 @@
 #include <rtw_ioctl.h>
 #include <rtw_version.h>
 
+#ifdef PLATFORM_LINUX
+#include <linux/kthread.h>
+#endif
+
 #ifdef CONFIG_SDIO_HCI
 #include <sdio_osintf.h>
 #endif
@@ -255,6 +259,17 @@ static char rtw_proc_name[IFNAMSIZ];
 static struct proc_dir_entry *rtw_proc = NULL;
 static int	rtw_proc_cnt = 0;
 
+#ifndef create_proc_entry
+/* dummy routines */
+void rtw_proc_remove_one(struct net_device *dev)
+{
+}
+
+void rtw_proc_init_one(struct net_device *dev)
+{
+}
+
+#else	/* create_proc_entry not defined */
 void rtw_proc_init_one(struct net_device *dev)
 {
 	struct proc_dir_entry *dir_dev = NULL;
@@ -518,6 +533,7 @@ void rtw_proc_remove_one(struct net_devi
 	}
 }
 #endif
+#endif
 
 uint loadparam( _adapter *padapter,  _nic_hdl	pnetdev)
 {
@@ -790,27 +806,27 @@ u32 rtw_start_drv_threads(_adapter *pada
 	RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_start_drv_threads\n"));
 
 #ifdef CONFIG_SDIO_HCI
-	padapter->xmitThread = kernel_thread(rtw_xmit_thread, padapter, CLONE_FS|CLONE_FILES);
-	if(padapter->xmitThread < 0)
+	padapter->xmitThread = kthread_run(rtw_xmit_thread, padapter, "xmitThread");
+	if(IS_ERR(padapter->xmitThread))
 		_status = _FAIL;
 #endif
 
 #ifdef CONFIG_RECV_THREAD_MODE
-	padapter->recvThread = kernel_thread(recv_thread, padapter, CLONE_FS|CLONE_FILES);
-	if(padapter->recvThread < 0)
+	padapter->recvThread = kthread_run(recv_thread, padapter, "recvThread");
+	if(IS_ERR(padapter->recvThread))
 		_status = _FAIL;	
 #endif
 
-	padapter->cmdThread = kernel_thread(rtw_cmd_thread, padapter, CLONE_FS|CLONE_FILES);
-	if(padapter->cmdThread < 0)
+	padapter->cmdThread = kthread_run(rtw_cmd_thread, padapter, "cmdThread");
+	if(IS_ERR(padapter->cmdThread))
 		_status = _FAIL;
 	else
 		_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); //wait for cmd_thread to run
 		
 
 #ifdef CONFIG_EVENT_THREAD_MODE
-	padapter->evtThread = kernel_thread(event_thread, padapter, CLONE_FS|CLONE_FILES);
-	if(padapter->evtThread < 0)
+	padapter->evtThread = kthread_run(event_thread, padapter, "evtThread");
+	if(IS_ERR(padapter->evtThread))
 		_status = _FAIL;		
 #endif
 
Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/include/osdep_service.h
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730.orig/include/osdep_service.h
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20120730/include/osdep_service.h
@@ -570,10 +570,12 @@ __inline static unsigned char _cancel_ti
 __inline static void thread_enter(void *context)
 {
 #ifdef PLATFORM_LINUX
+	#ifdef daemonize
 	//struct net_device *pnetdev = (struct net_device *)context;
 	//daemonize("%s", pnetdev->name);
 	daemonize("%s", "RTKTHREAD");
 	allow_signal(SIGTERM);
+	#endif
 #endif
 }
 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-26 20:25       ` Larry Finger
@ 2013-06-27  9:58         ` shiki.biomernok
  2013-06-27 13:34           ` Xose Vazquez Perez
  2013-06-27 10:08         ` shiki.biomernok
  1 sibling, 1 reply; 13+ messages in thread
From: shiki.biomernok @ 2013-06-27  9:58 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, xose.vazquez

I have tried to patch my driver but it wouldn't work.
Sent only Larry a message, because I couldn't figure it out why it 
wouldn't work.

Only now I realized that I didn't patch the uncompressed driver itself, 
but this whole "package".
(Sorry when I tried it yesterday, it was already kinda late.)

I also sent him answers about the questions he asked:
- Forced module loading: I use Xubuntu with my own kernel config. (See: 
http://pastebin.com/MR0FHS9w)
- Iwlwifi problem: I did have kernel panic with -rc4, but it's gone 
since -rc6.
(Though I didn't test it that thorough.)

@Xose: What does that mean for me? Am I trying the wrong driver?

By the way guys... how will the closed-source driver help with the 
open-source one?
I mean, I'm sure it will work/load for the device. But people been 
complaining about it.
Thought I could help to fix it up for this specific chip.
(I curse the guy who said this will work under Linux. Argl.)

On 2013-06-26 22:25, Larry Finger wrote:
> On 06/26/2013 12:29 PM, shiki.biomernok wrote:
>> Hello Larry/Mailing list!
>>
>> I have compiled and installed the new wireless-testing kernel from git.
>> I'm sure I used the new kernel, as the device lighted up as soon as I 
>> plugged
>> in. (And I got some new atheros ac module at "make oldconfig".)
>> There was no need for manual echo or modprobe.
>>
>> Yet, the device is not working. It dies at the very same step.
>> Here is the dmesg: http://pastebin.com/C1MNdFiw
>>
>> Please, let me know if I can help with anything.
>> Any debug option, patch or things like that.
>>
>> My offer is still there Larry, I'm willing to give you a full SSH 
>> access to the
>> machine with this stuff plugged in.
>> Besides that, I have no other idea.
>>
>>
>> ! My router runs OpenWRT (latest stable), so I could also gather info 
>> from
>> there. If it's possible.
>> (I checked dmesg but there is nothing. Only some non-crucial info 
>> about the
>> generic eth ports and such.)
>>
>> Thank you for the help.
>>
>> (By the way if the chip is rare (no other people will benefit), then 
>> I can just
>> get it back and ask for a refund. But if others use it as well, then 
>> it's not a
>> waste of time... I guess.)
>
> I think the TP-Link 8200ND is relatively new. You have version 0x11 
> for your chip, and mine is 0x10. That could be a difference.
>
> Whay are you forcing the module loading? As indicated by the (F) in 
> the traceback, it looks as if all of them are being forced.
>
> [   13.111932] BUG: unable to handle kernel NULL pointer dereference 
> at 0000000000000005
> [   13.111943] IP: [<ffffffffa03196c7>] iwl_dbgfs_register+0x27/0x70 
> [iwldvm]
> [   13.111944] PGD 0
> [   13.111945] Oops: 0000 [#1] PREEMPT SMP
> [   13.111964] Modules linked in: arc4(F) snd_hda_codec(F) 
> snd_hwdep(F) snd_pcm(F) iwldvm(F+) snd_page_alloc(F) thinkpad_acpi(F) 
> nvram(F) mac80211(F) snd_seq_midi(F) i915(F+) snd_seq_midi_event(F) 
> drm_kms_helper(F) snd_rawmidi(F) drm(F) snd_seq(F) snd_timer(F) 
> coretemp(F) snd_seq_device(F) r592(F) i2c_algo_bit(F) snd(F) 
> iwlwifi(F) soundcore(F) tpm_tis(F) memstick(F) btusb(F) microcode(F) 
> psmouse(F) bluetooth(F) serio_raw(F) wmi(F) cfg80211(F) video(F) 
> lpc_ich(F) hid_generic(F) usbhid(F) hid(F) sdhci_pci(F) sdhci(F) 
> ahci(F) libahci(F) e1000e(F) ptp(F) pps_core(F)
> [   13.111967] CPU: 1 PID: 741 Comm: modprobe Tainted: GF 
> 3.10.0-rc7-wl-x1-1000hz-wifitesting #1
> [   13.111968] Hardware name: LENOVO 208252G/208252G, BIOS 6FET92WW 
> (3.22 ) 12/14/2011
> [   13.111969] task: ffff8801a3f5d640 ti: ffff8801a1b9e000 task.ti: 
> ffff8801a1b9e000
> [   13.111975] RIP: 0010:[<ffffffffa03196c7>] [<ffffffffa03196c7>] 
> iwl_dbgfs_register+0x27/0x70 [iwldvm]
>
> To help us debug this matter, the attached patch will let you compile 
> the vendor driver that you downloaded from the vendor site.
>
> Larry
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-26 20:25       ` Larry Finger
  2013-06-27  9:58         ` shiki.biomernok
@ 2013-06-27 10:08         ` shiki.biomernok
  2013-06-27 15:21           ` Larry Finger
  1 sibling, 1 reply; 13+ messages in thread
From: shiki.biomernok @ 2013-06-27 10:08 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless

The closed source driver is not working either.
It compiled like a charm, and it loads perfectly.
(I even blacklisted the open-source one!)

But there is nothing in iwconfig or ifconfig.
Here is the dmesg: http://pastebin.com/EX8h1HfZ

I really don't want to waste your time guys by the way. If there is no 
way to fix it, let's just leave it. (Don't get me wrong I know things 
can be troublesome on Linux and I'm still willing to try anything. I 
just bet you have better things to do. :))

On 2013-06-26 22:25, Larry Finger wrote:
> On 06/26/2013 12:29 PM, shiki.biomernok wrote:
>> Hello Larry/Mailing list!
>>
>> I have compiled and installed the new wireless-testing kernel from git.
>> I'm sure I used the new kernel, as the device lighted up as soon as I 
>> plugged
>> in. (And I got some new atheros ac module at "make oldconfig".)
>> There was no need for manual echo or modprobe.
>>
>> Yet, the device is not working. It dies at the very same step.
>> Here is the dmesg: http://pastebin.com/C1MNdFiw
>>
>> Please, let me know if I can help with anything.
>> Any debug option, patch or things like that.
>>
>> My offer is still there Larry, I'm willing to give you a full SSH 
>> access to the
>> machine with this stuff plugged in.
>> Besides that, I have no other idea.
>>
>>
>> ! My router runs OpenWRT (latest stable), so I could also gather info 
>> from
>> there. If it's possible.
>> (I checked dmesg but there is nothing. Only some non-crucial info 
>> about the
>> generic eth ports and such.)
>>
>> Thank you for the help.
>>
>> (By the way if the chip is rare (no other people will benefit), then 
>> I can just
>> get it back and ask for a refund. But if others use it as well, then 
>> it's not a
>> waste of time... I guess.)
>
> I think the TP-Link 8200ND is relatively new. You have version 0x11 
> for your chip, and mine is 0x10. That could be a difference.
>
> Whay are you forcing the module loading? As indicated by the (F) in 
> the traceback, it looks as if all of them are being forced.
>
> [   13.111932] BUG: unable to handle kernel NULL pointer dereference 
> at 0000000000000005
> [   13.111943] IP: [<ffffffffa03196c7>] iwl_dbgfs_register+0x27/0x70 
> [iwldvm]
> [   13.111944] PGD 0
> [   13.111945] Oops: 0000 [#1] PREEMPT SMP
> [   13.111964] Modules linked in: arc4(F) snd_hda_codec(F) 
> snd_hwdep(F) snd_pcm(F) iwldvm(F+) snd_page_alloc(F) thinkpad_acpi(F) 
> nvram(F) mac80211(F) snd_seq_midi(F) i915(F+) snd_seq_midi_event(F) 
> drm_kms_helper(F) snd_rawmidi(F) drm(F) snd_seq(F) snd_timer(F) 
> coretemp(F) snd_seq_device(F) r592(F) i2c_algo_bit(F) snd(F) 
> iwlwifi(F) soundcore(F) tpm_tis(F) memstick(F) btusb(F) microcode(F) 
> psmouse(F) bluetooth(F) serio_raw(F) wmi(F) cfg80211(F) video(F) 
> lpc_ich(F) hid_generic(F) usbhid(F) hid(F) sdhci_pci(F) sdhci(F) 
> ahci(F) libahci(F) e1000e(F) ptp(F) pps_core(F)
> [   13.111967] CPU: 1 PID: 741 Comm: modprobe Tainted: GF 
> 3.10.0-rc7-wl-x1-1000hz-wifitesting #1
> [   13.111968] Hardware name: LENOVO 208252G/208252G, BIOS 6FET92WW 
> (3.22 ) 12/14/2011
> [   13.111969] task: ffff8801a3f5d640 ti: ffff8801a1b9e000 task.ti: 
> ffff8801a1b9e000
> [   13.111975] RIP: 0010:[<ffffffffa03196c7>] [<ffffffffa03196c7>] 
> iwl_dbgfs_register+0x27/0x70 [iwldvm]
>
> To help us debug this matter, the attached patch will let you compile 
> the vendor driver that you downloaded from the vendor site.
>
> Larry
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-27  9:58         ` shiki.biomernok
@ 2013-06-27 13:34           ` Xose Vazquez Perez
  2013-06-27 15:07             ` Larry Finger
  0 siblings, 1 reply; 13+ messages in thread
From: Xose Vazquez Perez @ 2013-06-27 13:34 UTC (permalink / raw)
  To: shiki.biomernok; +Cc: Larry Finger, linux-wireless

On 06/27/2013 11:58 AM, shiki.biomernok wrote:

> @Xose: What does that mean for me? Am I trying the wrong driver?

No, that should be the correct driver.
But it looks like rtl8192cu wasn't tested enough with 2T2R(RTL8192CUS)
devices.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-27 13:34           ` Xose Vazquez Perez
@ 2013-06-27 15:07             ` Larry Finger
  2013-06-27 15:32               ` shiki.biomernok
  2013-06-27 19:45               ` Xose Vazquez Perez
  0 siblings, 2 replies; 13+ messages in thread
From: Larry Finger @ 2013-06-27 15:07 UTC (permalink / raw)
  To: Xose Vazquez Perez; +Cc: shiki.biomernok, linux-wireless

On 06/27/2013 08:34 AM, Xose Vazquez Perez wrote:
> On 06/27/2013 11:58 AM, shiki.biomernok wrote:
>
>> @Xose: What does that mean for me? Am I trying the wrong driver?
>
> No, that should be the correct driver.
> But it looks like rtl8192cu wasn't tested enough with 2T2R(RTL8192CUS)
> devices.

The code in wireless-testing works fine on my Edimax EW-7811Un, which reports as 
an RTL8192CUS. If someone wants to send me an 8200ND, I'll make it work. Note: 
Realtek does not supply me with samples of USB devices.

Larry



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-27 10:08         ` shiki.biomernok
@ 2013-06-27 15:21           ` Larry Finger
  0 siblings, 0 replies; 13+ messages in thread
From: Larry Finger @ 2013-06-27 15:21 UTC (permalink / raw)
  To: shiki.biomernok; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

On 06/27/2013 05:08 AM, shiki.biomernok wrote:
> The closed source driver is not working either.
> It compiled like a charm, and it loads perfectly.
> (I even blacklisted the open-source one!)
>
> But there is nothing in iwconfig or ifconfig.
> Here is the dmesg: http://pastebin.com/EX8h1HfZ
>
> I really don't want to waste your time guys by the way. If there is no way to
> fix it, let's just leave it. (Don't get me wrong I know things can be
> troublesome on Linux and I'm still willing to try anything. I just bet you have
> better things to do. :))

The standard Realtek driver does not have the 8200ND in its device table. Apply 
the attached patch to add the necessary code. This patch was made for the driver 
version that I just sent you privately, but it should work on the other version. 
Please test both with this patch.

Thanks,

Larry



[-- Attachment #2: add_8200ND --]
[-- Type: text/plain, Size: 632 bytes --]

Index: rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/os_dep/linux/usb_intf.c
===================================================================
--- rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105.orig/os_dep/linux/usb_intf.c
+++ rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/os_dep/linux/usb_intf.c
@@ -92,6 +92,7 @@ static struct usb_device_id rtw_usb_id_t
 	/****** 8192CUS ********/
 	{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8177)},//8191cu 1*2
 	{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8178)},//8192cu 2*2
+	{USB_DEVICE(0x2357, 0x0100)}, /*TP-Link WN8200ND*/
 	{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817C)},//8192CE-VAU USB minCard
 	
 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-27 15:07             ` Larry Finger
@ 2013-06-27 15:32               ` shiki.biomernok
  2013-06-27 16:05                 ` Larry Finger
       [not found]                 ` <51CDAE50.3010107@lwfinger.net>
  2013-06-27 19:45               ` Xose Vazquez Perez
  1 sibling, 2 replies; 13+ messages in thread
From: shiki.biomernok @ 2013-06-27 15:32 UTC (permalink / raw)
  To: Larry Finger; +Cc: Xose Vazquez Perez, linux-wireless

Hello!

So I already wanted to write a letter about how the new driver won't do 
anything. Then I got Larry's message and applied the patch immediately.

- The device starts up with no led activity (it should blink (slow) if 
plugged in)
^This is an annoying "feature", but... yeah.

- LED goes off if you disconnect. (Actually I like this behavior a lot 
more.)

- With this driver, I can actually connect and get a password wrong 
dialog. (it's correct.) So I suppose it's the same thing.. auth failed, 
just now I have my proper Nm-applet dialog, asking for a new password. 
(Oh, and finally this driver shows activity in the tray, as in, you can 
see it tries to connect. You know, that green orb going around. But only 
one of them is green and you will get prompted for a new password.)

Here is the dmesg (hope it helps.):
http://pastebin.com/uUsp7edb

I tried to compile the Linus git version of the kernel, but it comes 
with an even older wireless code than the "wireless-next" one. (Well, 
obviously, but you know.)

Could I go more verbose somehow?
Maybe with THIS driver? Or somehow fiddle with my router?

Ps.: That  really sucks Larry. I mean, you are the wireless wizard for 
Realtek and you don't get devices? Just what the... why? All of my why, 
man...



On 2013-06-27 17:07, Larry Finger wrote:
> On 06/27/2013 08:34 AM, Xose Vazquez Perez wrote:
>> On 06/27/2013 11:58 AM, shiki.biomernok wrote:
>>
>>> @Xose: What does that mean for me? Am I trying the wrong driver?
>>
>> No, that should be the correct driver.
>> But it looks like rtl8192cu wasn't tested enough with 2T2R(RTL8192CUS)
>> devices.
>
> The code in wireless-testing works fine on my Edimax EW-7811Un, which 
> reports as an RTL8192CUS. If someone wants to send me an 8200ND, I'll 
> make it work. Note: Realtek does not supply me with samples of USB 
> devices.
>
> Larry
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-27 15:32               ` shiki.biomernok
@ 2013-06-27 16:05                 ` Larry Finger
       [not found]                 ` <51CDAE50.3010107@lwfinger.net>
  1 sibling, 0 replies; 13+ messages in thread
From: Larry Finger @ 2013-06-27 16:05 UTC (permalink / raw)
  To: shiki.biomernok; +Cc: Xose Vazquez Perez, linux-wireless

On 06/27/2013 10:32 AM, shiki.biomernok wrote:
> Hello!
>
> So I already wanted to write a letter about how the new driver won't do
> anything. Then I got Larry's message and applied the patch immediately.
>
> - The device starts up with no led activity (it should blink (slow) if plugged in)
> ^This is an annoying "feature", but... yeah.
>
> - LED goes off if you disconnect. (Actually I like this behavior a lot more.)
>
> - With this driver, I can actually connect and get a password wrong dialog.
> (it's correct.) So I suppose it's the same thing.. auth failed, just now I have
> my proper Nm-applet dialog, asking for a new password. (Oh, and finally this
> driver shows activity in the tray, as in, you can see it tries to connect. You
> know, that green orb going around. But only one of them is green and you will
> get prompted for a new password.)
>
> Here is the dmesg (hope it helps.):
> http://pastebin.com/uUsp7edb

The dmesg output shows that the device authenticated and associated. If you 
still got a password problem after that, then the device is not able to actually 
transmit data.

> I tried to compile the Linus git version of the kernel, but it comes with an
> even older wireless code than the "wireless-next" one. (Well, obviously, but you
> know.)

Of course. Wireless-next has the code that will be in 3.11. I think I told you 
to use wireless-testing, which is the tree I use. It is essentially 3.10 with a 
few changes that are in the pipeline.

> Could I go more verbose somehow?
> Maybe with THIS driver? Or somehow fiddle with my router?

You could change the line in core/debug.c that says "u32 GlobalDebugLevel = 
_drv_info_". The symbol _drv_info_ has value 7, and you could try values down to 
1; however, I am not prepared to spend a lot of time looking at such dumps.

A better approach would be to use a different computer and wireshark to capture 
the "in the air" traffic between the 8200ND and the AP.

> Ps.: That  really sucks Larry. I mean, you are the wireless wizard for Realtek
> and you don't get devices? Just what the... why? All of my why, man...

I get all PCI devices, which is why their drivers are in better shape.

Larry



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
  2013-06-27 15:07             ` Larry Finger
  2013-06-27 15:32               ` shiki.biomernok
@ 2013-06-27 19:45               ` Xose Vazquez Perez
  1 sibling, 0 replies; 13+ messages in thread
From: Xose Vazquez Perez @ 2013-06-27 19:45 UTC (permalink / raw)
  To: Larry Finger; +Cc: shiki.biomernok, linux-wireless

On 06/27/2013 05:07 PM, Larry Finger wrote:

> On 06/27/2013 08:34 AM, Xose Vazquez Perez wrote:

>> But it looks like rtl8192cu wasn't tested enough with 2T2R(RTL8192CUS)
>> devices.

> The code in wireless-testing works fine on my Edimax EW-7811Un, which reports as an RTL8192CUS. 

But Edimax EW-7811Un is a 1T1R device.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
       [not found]                   ` <51CDD051.6060804@gmail.com>
@ 2013-06-28 19:15                     ` Larry Finger
  0 siblings, 0 replies; 13+ messages in thread
From: Larry Finger @ 2013-06-28 19:15 UTC (permalink / raw)
  To: shiki.biomernok; +Cc: linux-wireless

On 06/28/2013 01:05 PM, shiki.biomernok wrote:
> Hello Larry!
>
> I'll only reply to you as you didn't CC the list with the driver (guess because
> it's unreleased.)
>
> Sadly, it isn't working either.
>
> http://pastebin.com/Tv00kCuZ
>
> No idea what could be the problem.
> But no need to waste more time with it, I'm pretty sure you have your things to
> do. I can just stick to the Intel one and that's all.

Just like the other driver, it authenticated and associated. I guess it never 
got the IP address.

I just sent it to you due to the size of the driver, and the fact that it was 
not released. I put this one back on the list.

I just ordered an 8200ND through E-Bay. I'll let you know what I find when it 
arrives.

Larry




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-06-28 19:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <51A77433.2060702@lwfinger.net>
2013-06-26 11:30 ` Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working shiki.biomernok
2013-06-26 16:14   ` Larry Finger
2013-06-26 17:29     ` shiki.biomernok
2013-06-26 20:25       ` Larry Finger
2013-06-27  9:58         ` shiki.biomernok
2013-06-27 13:34           ` Xose Vazquez Perez
2013-06-27 15:07             ` Larry Finger
2013-06-27 15:32               ` shiki.biomernok
2013-06-27 16:05                 ` Larry Finger
     [not found]                 ` <51CDAE50.3010107@lwfinger.net>
     [not found]                   ` <51CDD051.6060804@gmail.com>
2013-06-28 19:15                     ` Larry Finger
2013-06-27 19:45               ` Xose Vazquez Perez
2013-06-27 10:08         ` shiki.biomernok
2013-06-27 15:21           ` Larry Finger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.