All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: "shiki.biomernok" <shiki.biomernok@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: Fwd: Re: TP-Link 8200ND - rtl8192cu module not loading / working
Date: Wed, 26 Jun 2013 15:25:21 -0500	[thread overview]
Message-ID: <51CB4E31.50502@lwfinger.net> (raw)
In-Reply-To: <51CB250A.3060900@gmail.com>

[-- 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
 }
 

  reply	other threads:[~2013-06-26 20:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51CB4E31.50502@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=shiki.biomernok@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.