* Re: Delivery Status Notification (Failure) [not found] ` <0022152d6729673f6a0494b1f2e6@google.com> @ 2010-11-10 12:25 ` miloofr 2010-11-10 15:26 ` Question about Edimax 7811Un Larry Finger 0 siblings, 1 reply; 8+ messages in thread From: miloofr @ 2010-11-10 12:25 UTC (permalink / raw) To: linux-wireless Hi, I would want to know what is the current state of the 8191su wireless driver. I have a wifi USB stick from EDIMAX, the 7811Un model, which is supposed to have a 8192su chip inside. It is not recognized neither from latest Ubuntu 10.10 nor openSUSE 11.3 . However I have been able to make it work by compiling the drivers proposed on the EDIMAX website, but this is only available for 32 bits systems/kernels. I saw that there were some discussion 2 months ago about this port from 32 to 64 bits, what is the current state today? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Question about Edimax 7811Un 2010-11-10 12:25 ` Delivery Status Notification (Failure) miloofr @ 2010-11-10 15:26 ` Larry Finger 2010-11-11 9:03 ` miloofr [not found] ` <AANLkTik9=-8bXNOvrY-JnFuVJr1wZG24o8m8JzJVD8tQ@mail.gmail.com> 0 siblings, 2 replies; 8+ messages in thread From: Larry Finger @ 2010-11-10 15:26 UTC (permalink / raw) To: miloofr@gmail.com; +Cc: linux-wireless On 11/10/2010 06:25 AM, miloofr@gmail.com wrote: > Hi, > I would want to know what is the current state of the 8191su wireless > driver. I have a wifi USB stick from EDIMAX, the 7811Un model, which is > supposed to have a 8192su chip inside. > It is not recognized neither from latest Ubuntu 10.10 nor openSUSE > 11.3 . However I have been able to make it work by compiling the > drivers proposed on the EDIMAX website, but this is only available for > 32 bits systems/kernels. > I saw that there were some discussion 2 months ago about this port > from 32 to 64 bits, what is the current state today? What are the USB IDs for this device as shown by lsusb? If the numbers are 0x7392:0x7611, 0x7392:0x7612, or 0x7392:0x7622, the device is supported by the r8712u driver in staging and is present in mainline kernel 2.6.37-rc1. I can assure you that the driver works for both 32- and 64-bit systems. Larry ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Question about Edimax 7811Un 2010-11-10 15:26 ` Question about Edimax 7811Un Larry Finger @ 2010-11-11 9:03 ` miloofr [not found] ` <AANLkTik9=-8bXNOvrY-JnFuVJr1wZG24o8m8JzJVD8tQ@mail.gmail.com> 1 sibling, 0 replies; 8+ messages in thread From: miloofr @ 2010-11-11 9:03 UTC (permalink / raw) To: Larry Finger; +Cc: linux-wireless The device as shown in lsusb is: 0x7392:0x7811 The vendor id seems to be different as those recognized by the r8712u driver. How could I try the driver to confirm that the 7811 device works with this driver? Eric 2010/11/10 Larry Finger <Larry.Finger@lwfinger.net>: > On 11/10/2010 06:25 AM, miloofr@gmail.com wrote: >> Hi, >> I would want to know what is the current state of the 8191su wireless >> driver. I have a wifi USB stick from EDIMAX, the 7811Un model, which is >> supposed to have a 8192su chip inside. >> It is not recognized neither from latest Ubuntu 10.10 nor openSUSE >> 11.3 . However I have been able to make it work by compiling the >> drivers proposed on the EDIMAX website, but this is only available for >> 32 bits systems/kernels. >> I saw that there were some discussion 2 months ago about this port >> from 32 to 64 bits, what is the current state today? > > What are the USB IDs for this device as shown by lsusb? > > If the numbers are 0x7392:0x7611, 0x7392:0x7612, or 0x7392:0x7622, the device is > supported by the r8712u driver in staging and is present in mainline kernel > 2.6.37-rc1. I can assure you that the driver works for both 32- and 64-bit systems. > > Larry > > ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <AANLkTik9=-8bXNOvrY-JnFuVJr1wZG24o8m8JzJVD8tQ@mail.gmail.com>]
* Re: Question about Edimax 7811Un [not found] ` <AANLkTik9=-8bXNOvrY-JnFuVJr1wZG24o8m8JzJVD8tQ@mail.gmail.com> @ 2010-11-11 14:58 ` Larry Finger 2010-11-11 19:14 ` miloofr 0 siblings, 1 reply; 8+ messages in thread From: Larry Finger @ 2010-11-11 14:58 UTC (permalink / raw) To: miloofr@gmail.com; +Cc: wireless On 11/11/2010 02:55 AM, miloofr@gmail.com wrote: > The device as shown in lsusb is: > 0x7392:0x7811 > > The vendor id seems to be different as those recognized by the r8712u > driver. How could I try the driver to confirm that the 7811 device > works with this driver? Please use the "Reply-to-all" when you respond to an email. I want to keep the wireless mailing list informed about what we are doing. Driver r8712u does not appear to work with your device. I could not get the Linux driver source for the 7811 to download from the Edimax site, but I found it on the Realtek site as RTL8192CU_v2.0.1126.zip. There is a tarball inside that zip file with the Linux driver. It does not compile under 2.6.37-rc1. From the warnings, I can see that it needs work to get it to run on a 64-bit system, but it is likely to work in the 32-bit version. Realtek is sending me some sample devices. If one of these nano USB devices is included, I will convert the driver to 64 bits and send the modifications back to Realtek. If/when that happens, I'll let you know. Larry ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Question about Edimax 7811Un 2010-11-11 14:58 ` Larry Finger @ 2010-11-11 19:14 ` miloofr 2010-11-12 20:18 ` Larry Finger 0 siblings, 1 reply; 8+ messages in thread From: miloofr @ 2010-11-11 19:14 UTC (permalink / raw) To: Larry Finger; +Cc: wireless Thank you. In fact I successfully compiled this driver (latest 1126 version) with a 2.6.35 kernel from ubuntu 10.10 . It seems to work ok, except some freezing sometimes while booting with the stick installed on the PC. It also compiles with the same kernel on a 64 bits system, with a lot of errors, but does not work at all (freezes immediately). It is precised in the doc of the realtek linux driver that this is a 32 bits driver. Can you warn if the usb stick is in the samples sent from Realtek? If necessary, I can test your 64 bits converted driver on my system and give you the results in order to fix it. Eric PS: sorry for the reply-to-all forgetting. I realized that one minute after and resent my email to the ML also ;). 2010/11/11 Larry Finger <Larry.Finger@lwfinger.net>: > On 11/11/2010 02:55 AM, miloofr@gmail.com wrote: >> The device as shown in lsusb is: >> 0x7392:0x7811 >> >> The vendor id seems to be different as those recognized by the r8712u >> driver. How could I try the driver to confirm that the 7811 device >> works with this driver? > > Please use the "Reply-to-all" when you respond to an email. I want to keep the > wireless mailing list informed about what we are doing. > > Driver r8712u does not appear to work with your device. I could not get the > Linux driver source for the 7811 to download from the Edimax site, but I found > it on the Realtek site as RTL8192CU_v2.0.1126.zip. There is a tarball inside > that zip file with the Linux driver. It does not compile under 2.6.37-rc1. From > the warnings, I can see that it needs work to get it to run on a 64-bit system, > but it is likely to work in the 32-bit version. > > Realtek is sending me some sample devices. If one of these nano USB devices is > included, I will convert the driver to 64 bits and send the modifications back > to Realtek. If/when that happens, I'll let you know. > > Larry > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Question about Edimax 7811Un 2010-11-11 19:14 ` miloofr @ 2010-11-12 20:18 ` Larry Finger 2010-11-12 22:13 ` miloofr 0 siblings, 1 reply; 8+ messages in thread From: Larry Finger @ 2010-11-12 20:18 UTC (permalink / raw) To: miloofr@gmail.com; +Cc: wireless [-- Attachment #1: Type: text/plain, Size: 749 bytes --] Eric, Attached is a patch that compiles cleanly on a 64-bit system. I have not tested it as I have no device. There are two kinds of differences between 32- and 64-bit systems. The first is the size of a pointer, which becomes important whenever there is a need to keep one as an integer. The original driver stores them into a u32 or a uint, which is too short. These problems are solved by storing such values in variables of __kernel_size_t. The second problem occurs for the communication buffers. There are 4 quantities: head, data, tail and end. For both 32- and 64-bit systems, head and data are pointers. With 32 bits, so are tail and end, but for 64 bits, tail and end are uint. I got all the ones the compiler complained about. Larry [-- Attachment #2: convert_to_64bit --] [-- Type: text/plain, Size: 19067 bytes --] Index: rtl8192CU_linux_v2.0.1126.20101020/core/rtw_cmd.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/core/rtw_cmd.c +++ rtl8192CU_linux_v2.0.1126.20101020/core/rtw_cmd.c @@ -84,7 +84,7 @@ _func_enter_; goto exit; } - pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ - ( (uint)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ-1)); + pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ - ((__kernel_size_t)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ-1)); pcmdpriv->rsp_allocated_buf = _rtw_malloc(MAX_RSPSZ + 4); @@ -93,7 +93,7 @@ _func_enter_; goto exit; } - pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ( (uint)(pcmdpriv->rsp_allocated_buf) & 3); + pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((__kernel_size_t)(pcmdpriv->rsp_allocated_buf) & 3); pcmdpriv->cmd_issued_cnt = pcmdpriv->cmd_done_cnt = pcmdpriv->rsp_cnt = 0; Index: rtl8192CU_linux_v2.0.1126.20101020/core/rtw_ioctl_set.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/core/rtw_ioctl_set.c +++ rtl8192CU_linux_v2.0.1126.20101020/core/rtw_ioctl_set.c @@ -1029,7 +1029,7 @@ _func_enter_; { u8 ret; u32 keyindex; - u32 len = FIELD_OFFSET(NDIS_802_11_KEY, KeyMaterial) + key->KeyLength; + __kernel_size_t len = FIELD_OFFSET(NDIS_802_11_KEY, KeyMaterial) + key->KeyLength; NDIS_802_11_WEP *wep = &padapter->securitypriv.ndiswep; RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("OID_802_11_ADD_KEY: +++++ WEP key +++++\n")); Index: rtl8192CU_linux_v2.0.1126.20101020/core/rtw_mlme_ext.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/core/rtw_mlme_ext.c +++ rtl8192CU_linux_v2.0.1126.20101020/core/rtw_mlme_ext.c @@ -668,9 +668,9 @@ unsigned int OnAuthClient(_adapter *pada offset = (GetPrivacy(pframe))? 4: 0; - algthm = le16_to_cpu(*(unsigned short *)((unsigned int)pframe + WLAN_HDR_A3_LEN + offset)); - seq = le16_to_cpu(*(unsigned short *)((unsigned int)pframe + WLAN_HDR_A3_LEN + offset + 2)); - status = le16_to_cpu(*(unsigned short *)((unsigned int)pframe + WLAN_HDR_A3_LEN + offset + 4)); + algthm = le16_to_cpu(*(unsigned short *)((__kernel_size_t)pframe + WLAN_HDR_A3_LEN + offset)); + seq = le16_to_cpu(*(unsigned short *)((__kernel_size_t)pframe + WLAN_HDR_A3_LEN + offset + 2)); + status = le16_to_cpu(*(unsigned short *)((__kernel_size_t)pframe + WLAN_HDR_A3_LEN + offset + 4)); if (status != 0) { Index: rtl8192CU_linux_v2.0.1126.20101020/core/rtw_recv.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/core/rtw_recv.c +++ rtl8192CU_linux_v2.0.1126.20101020/core/rtw_recv.c @@ -91,7 +91,7 @@ _func_enter_; _rtw_memset(precvpriv->pallocated_frame_buf, 0, NR_RECVFRAME * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ); precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf + RXFRAME_ALIGN_SZ - - ((uint) (precvpriv->pallocated_frame_buf) &(RXFRAME_ALIGN_SZ-1)); + ((__kernel_size_t) (precvpriv->pallocated_frame_buf) &(RXFRAME_ALIGN_SZ-1)); precvframe = (union recv_frame*) precvpriv->precv_frame_buf; Index: rtl8192CU_linux_v2.0.1126.20101020/core/rtw_security.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/core/rtw_security.c +++ rtl8192CU_linux_v2.0.1126.20101020/core/rtw_security.c @@ -245,7 +245,7 @@ _func_enter_; arcfour_encrypt(&mycontext, payload+length, crc, 4); pframe+=pxmitpriv->frag_len; - pframe=(u8 *)RND4((uint)(pframe)); + pframe=(u8 *)RND4((__kernel_size_t)(pframe)); } @@ -741,7 +741,7 @@ _func_enter_; arcfour_encrypt(&mycontext, payload+length, crc, 4); pframe+=pxmitpriv->frag_len; - pframe=(u8 *)RND4((uint)(pframe)); + pframe=(u8 *)RND4((__kernel_size_t)(pframe)); } } @@ -1557,7 +1557,7 @@ _func_enter_; aes_cipher(prwskey,pattrib->hdrlen,pframe, length); pframe+=pxmitpriv->frag_len; - pframe=(u8*)RND4((uint)(pframe)); + pframe=(u8*)RND4((__kernel_size_t)(pframe)); } } Index: rtl8192CU_linux_v2.0.1126.20101020/core/rtw_xmit.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/core/rtw_xmit.c +++ rtl8192CU_linux_v2.0.1126.20101020/core/rtw_xmit.c @@ -134,7 +134,7 @@ _func_enter_; goto exit; } pxmitpriv->pxmit_frame_buf = pxmitpriv->pallocated_frame_buf + 4 - - ((uint) (pxmitpriv->pallocated_frame_buf) &3); + ((__kernel_size_t) (pxmitpriv->pallocated_frame_buf) &3); pxframe = (struct xmit_frame*) pxmitpriv->pxmit_frame_buf; @@ -173,7 +173,7 @@ _func_enter_; } pxmitpriv->pxmitbuf = pxmitpriv->pallocated_xmitbuf + 4 - - ((uint) (pxmitpriv->pallocated_xmitbuf) &3); + ((__kernel_size_t) (pxmitpriv->pallocated_xmitbuf) &3); pxmitbuf = (struct xmit_buf*)pxmitpriv->pxmitbuf; @@ -191,7 +191,7 @@ _func_enter_; goto exit; } - pxmitbuf->pbuf = pxmitbuf->pallocated_buf + XMITBUF_ALIGN_SZ -((uint) (pxmitbuf->pallocated_buf) &(XMITBUF_ALIGN_SZ-1)); + pxmitbuf->pbuf = pxmitbuf->pallocated_buf + XMITBUF_ALIGN_SZ -((__kernel_size_t) (pxmitbuf->pallocated_buf) &(XMITBUF_ALIGN_SZ-1)); rtw_os_xmit_resource_alloc(padapter, pxmitbuf); @@ -843,7 +843,7 @@ _func_enter_; payload=pframe; for(curfragnum=0;curfragnum<pattrib->nr_frags;curfragnum++){ - payload=(u8 *)RND4((uint)(payload)); + payload=(u8 *)RND4((__kernel_size_t)(payload)); RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("===curfragnum=%d, pframe= 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,!!!\n", curfragnum,*payload, *(payload+1),*(payload+2),*(payload+3),*(payload+4),*(payload+5),*(payload+6),*(payload+7))); @@ -1107,7 +1107,7 @@ s32 rtw_xmitframe_coalesce(_adapter *pad s32 frg_inx, frg_len, mpdu_len, llc_sz, mem_sz; - u32 addr; + __kernel_size_t addr; u8 *pframe, *mem_start, *ptxdesc; @@ -1282,7 +1282,7 @@ _func_enter_; #endif } - addr = (uint)(pframe); + addr = (__kernel_size_t)(pframe); mem_start = (unsigned char *)RND4(addr) + TXDESC_OFFSET; _rtw_memcpy(mem_start, pbuf_start + TXDESC_OFFSET, pattrib->hdrlen); Index: rtl8192CU_linux_v2.0.1126.20101020/hal/rtl8192c/usb/rtl8192cu_recv.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/hal/rtl8192c/usb/rtl8192cu_recv.c +++ rtl8192CU_linux_v2.0.1126.20101020/hal/rtl8192c/usb/rtl8192cu_recv.c @@ -65,7 +65,7 @@ int rtw_init_recv_priv(struct recv_priv _rtw_memset(precvpriv->pallocated_recv_buf, 0, NR_RECVBUFF *sizeof(struct recv_buf) + 4); precvpriv->precv_buf = precvpriv->pallocated_recv_buf + 4 - - ((uint) (precvpriv->pallocated_recv_buf) &(4-1)); + ((__kernel_size_t) (precvpriv->pallocated_recv_buf) &(4-1)); precvbuf = (struct recv_buf*)precvpriv->precv_buf; @@ -148,7 +148,7 @@ int rtw_init_recv_priv(struct recv_priv { pskb->dev = padapter->pnetdev; - tmpaddr = (u32)pskb->data; + tmpaddr = (__kernel_size_t)pskb->data; alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1); skb_reserve(pskb, (RECVBUFF_ALIGN_SZ - alignment)); Index: rtl8192CU_linux_v2.0.1126.20101020/hal/rtl8192c/usb/rtl8192cu_xmit.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/hal/rtl8192c/usb/rtl8192cu_xmit.c +++ rtl8192CU_linux_v2.0.1126.20101020/hal/rtl8192c/usb/rtl8192cu_xmit.c @@ -1064,7 +1064,7 @@ void rtw_dump_xframe(_adapter *padapter, mem_addr += w_sz; - mem_addr = (u8 *)RND4(((uint)(mem_addr))); + mem_addr = (u8 *)RND4(((__kernel_size_t)(mem_addr))); } Index: rtl8192CU_linux_v2.0.1126.20101020/hal/rtl8192c/usb/usb_ops_linux.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/hal/rtl8192c/usb/usb_ops_linux.c +++ rtl8192CU_linux_v2.0.1126.20101020/hal/rtl8192c/usb/usb_ops_linux.c @@ -73,7 +73,7 @@ static int usbctrl_vendorreq(struct dvob return(-1); } - pIo_buf = palloc_buf + 16 -((uint)(palloc_buf) & 0x0f ); + pIo_buf = palloc_buf + 16 -((__kernel_size_t)(palloc_buf) & 0x0f ); if (requesttype == 0x01) @@ -660,7 +660,7 @@ static int recvbuf2recvframe(_adapter *p if(pkt_copy) { - tmpaddr = (u32)pkt_copy->data; + tmpaddr = (__kernel_size_t)pkt_copy->data; alignment = tmpaddr & (3); skb_reserve(pkt_copy, (4 - alignment));//force pkt_copy->data at 4-byte alignment address @@ -744,7 +744,11 @@ void rtl8192cu_recv_tasklet(void *priv) #ifdef CONFIG_PREALLOC_RECV_SKB - pskb->tail = pskb->data; +#ifdef NET_SKBUFF_DATA_USES_OFFSET + pskb->tail = (sk_buff_data_t)(pskb->data - pskb->head); +#else + pskb->tail = (sk_buff_data_t)(pskb->data); +#endif pskb->len = 0; skb_queue_tail(&precvpriv->free_recv_skb_queue, pskb); @@ -909,14 +913,19 @@ _func_enter_; return _FAIL; } - tmpaddr = (u32)precvbuf->pskb->data; + tmpaddr = (__kernel_size_t)precvbuf->pskb->data; alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1); skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment)); precvbuf->phead = precvbuf->pskb->head; precvbuf->pdata = precvbuf->pskb->data; +#ifdef NET_SKBUFF_DATA_USES_OFFSET + precvbuf->ptail = precvbuf->pskb->head + precvbuf->pskb->tail; + precvbuf->pend = precvbuf->pskb->head+precvbuf->pskb->end; +#else precvbuf->ptail = precvbuf->pskb->tail; precvbuf->pend = precvbuf->pskb->end; +#endif precvbuf->pbuf = precvbuf->pskb->data; } @@ -924,10 +933,15 @@ _func_enter_; { precvbuf->phead = precvbuf->pskb->head; precvbuf->pdata = precvbuf->pskb->data; +#ifdef NET_SKBUFF_DATA_USES_OFFSET + precvbuf->ptail = precvbuf->pskb->head + precvbuf->pskb->tail; + precvbuf->pend = precvbuf->pskb->head+precvbuf->pskb->end; +#else precvbuf->ptail = precvbuf->pskb->tail; precvbuf->pend = precvbuf->pskb->end; +#endif - precvbuf->pbuf = precvbuf->pskb->data; + precvbuf->pbuf = precvbuf->pskb->data; precvbuf->reuse = _FALSE; } Index: rtl8192CU_linux_v2.0.1126.20101020/include/osdep_service.h =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/include/osdep_service.h +++ rtl8192CU_linux_v2.0.1126.20101020/include/osdep_service.h @@ -156,7 +156,7 @@ __inline static void _init_timer(_timer { //setup_timer(ptimer, pfunc,(u32)cntx); ptimer->function = pfunc; - ptimer->data = (u32)cntx; + ptimer->data = (__kernel_size_t)cntx; init_timer(ptimer); } Index: rtl8192CU_linux_v2.0.1126.20101020/include/rtw_recv.h =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/include/rtw_recv.h +++ rtl8192CU_linux_v2.0.1126.20101020/include/rtw_recv.h @@ -426,7 +426,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*)(((__kernel_size_t)rxmem>>RXFRAME_ALIGN) <<RXFRAME_ALIGN) ; } Index: rtl8192CU_linux_v2.0.1126.20101020/include/wifi.h =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/include/wifi.h +++ rtl8192CU_linux_v2.0.1126.20101020/include/wifi.h @@ -270,29 +270,29 @@ enum WIFI_REG_DOMAIN { *(unsigned short *)(pbuf) |= cpu_to_le16(type); \ } while(0) -#define GetSequence(pbuf) (cpu_to_le16(*(unsigned short *)((unsigned int)(pbuf) + 22)) >> 4) +#define GetSequence(pbuf) (cpu_to_le16(*(unsigned short *)((__kernel_size_t)(pbuf) + 22)) >> 4) -#define GetFragNum(pbuf) (cpu_to_le16(*(unsigned short *)((unsigned int)(pbuf) + 22)) & 0x0f) +#define GetFragNum(pbuf) (cpu_to_le16(*(unsigned short *)((__kernel_size_t)(pbuf) + 22)) & 0x0f) -#define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((unsigned int)(pbuf) + 22))) +#define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((__kernel_size_t)(pbuf) + 22))) #define SetFragNum(pbuf, num) \ do { \ - *(unsigned short *)((unsigned int)(pbuf) + 22) = \ - ((*(unsigned short *)((unsigned int)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \ + *(unsigned short *)((__kernel_size_t)(pbuf) + 22) = \ + ((*(unsigned short *)((__kernel_size_t)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \ cpu_to_le16(0x0f & (num)); \ } while(0) #define SetSeqNum(pbuf, num) \ do { \ - *(unsigned short *)((unsigned int)(pbuf) + 22) = \ - ((*(unsigned short *)((unsigned int)(pbuf) + 22)) & le16_to_cpu((unsigned short)~0xfff0)) | \ + *(unsigned short *)((__kernel_size_t)(pbuf) + 22) = \ + ((*(unsigned short *)((__kernel_size_t)(pbuf) + 22)) & le16_to_cpu((unsigned short)~0xfff0)) | \ le16_to_cpu((unsigned short)(0xfff0 & (num << 4))); \ } while(0) #define SetDuration(pbuf, dur) \ do { \ - *(unsigned short *)((unsigned int)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \ + *(unsigned short *)((__kernel_size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \ } while(0) @@ -317,17 +317,17 @@ enum WIFI_REG_DOMAIN { *(unsigned short *)(pbuf) |= cpu_to_le16( (amsdu & 1) << 7); \ } while(0) -#define GetAid(pbuf) (cpu_to_le16(*(unsigned short *)((unsigned int)(pbuf) + 2)) & 0x3fff) +#define GetAid(pbuf) (cpu_to_le16(*(unsigned short *)((__kernel_size_t)(pbuf) + 2)) & 0x3fff) -#define GetTid(pbuf) (cpu_to_le16(*(unsigned short *)((unsigned int)(pbuf) + (((GetToDs(pbuf)<<1)|GetFrDs(pbuf))==3?30:24))) & 0x000f) +#define GetTid(pbuf) (cpu_to_le16(*(unsigned short *)((__kernel_size_t)(pbuf) + (((GetToDs(pbuf)<<1)|GetFrDs(pbuf))==3?30:24))) & 0x000f) -#define GetAddr1Ptr(pbuf) ((unsigned char *)((unsigned int)(pbuf) + 4)) +#define GetAddr1Ptr(pbuf) ((unsigned char *)((__kernel_size_t)(pbuf) + 4)) -#define GetAddr2Ptr(pbuf) ((unsigned char *)((unsigned int)(pbuf) + 10)) +#define GetAddr2Ptr(pbuf) ((unsigned char *)((__kernel_size_t)(pbuf) + 10)) -#define GetAddr3Ptr(pbuf) ((unsigned char *)((unsigned int)(pbuf) + 16)) +#define GetAddr3Ptr(pbuf) ((unsigned char *)((__kernel_size_t)(pbuf) + 16)) -#define GetAddr4Ptr(pbuf) ((unsigned char *)((unsigned int)(pbuf) + 24)) +#define GetAddr4Ptr(pbuf) ((unsigned char *)((__kernel_size_t)(pbuf) + 24)) #define MacAddr_isBcst(addr) \ ( \ Index: rtl8192CU_linux_v2.0.1126.20101020/autoconf_rtl8192c_usb_linux.h =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/autoconf_rtl8192c_usb_linux.h +++ rtl8192CU_linux_v2.0.1126.20101020/autoconf_rtl8192c_usb_linux.h @@ -53,7 +53,7 @@ #define CONFIG_AUTOSUSPEND 1 #define SUPPORT_HW_RFOFF_DETECTED 1 - +#define CONFIG_SKB_COPY 1 #ifdef PLATFORM_LINUX // #define CONFIG_PROC_DEBUG 1 Index: rtl8192CU_linux_v2.0.1126.20101020/core/rtw_sta_mgt.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/core/rtw_sta_mgt.c +++ rtl8192CU_linux_v2.0.1126.20101020/core/rtw_sta_mgt.c @@ -79,7 +79,7 @@ _func_enter_; return _FAIL; pstapriv->pstainfo_buf = pstapriv->pallocated_stainfo_buf + 4 - - ((unsigned int)(pstapriv->pallocated_stainfo_buf ) & 3); + ((__kernel_size_t)(pstapriv->pallocated_stainfo_buf ) & 3); _rtw_init_queue(&pstapriv->free_sta_queue); Index: rtl8192CU_linux_v2.0.1126.20101020/include/autoconf.h =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/include/autoconf.h +++ rtl8192CU_linux_v2.0.1126.20101020/include/autoconf.h @@ -53,7 +53,7 @@ #define CONFIG_AUTOSUSPEND 1 #define SUPPORT_HW_RFOFF_DETECTED 1 - +#define CONFIG_SKB_COPY 1 #ifdef PLATFORM_LINUX // #define CONFIG_PROC_DEBUG 1 Index: rtl8192CU_linux_v2.0.1126.20101020/include/basic_types.h =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/include/basic_types.h +++ rtl8192CU_linux_v2.0.1126.20101020/include/basic_types.h @@ -99,7 +99,7 @@ typedef void (*proc_t)(void*); typedef __kernel_size_t SIZE_T; - #define FIELD_OFFSET(s,field) ((int)&((s*)(0))->field) + #define FIELD_OFFSET(s,field) ((__kernel_size_t)&((s*)(0))->field) #endif Index: rtl8192CU_linux_v2.0.1126.20101020/os_dep/linux/recv_linux.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/os_dep/linux/recv_linux.c +++ rtl8192CU_linux_v2.0.1126.20101020/os_dep/linux/recv_linux.c @@ -224,7 +224,11 @@ _func_enter_; RT_TRACE(_module_recv_osdep_c_,_drv_info_,("precv_frame->hdr.rx_tail=%p precv_frame->u.hdr.rx_end=%p precv_frame->hdr.len=%d \n", precv_frame->u.hdr.rx_tail, precv_frame->u.hdr.rx_end, precv_frame->u.hdr.len)); skb->data = precv_frame->u.hdr.rx_data; - skb->tail = precv_frame->u.hdr.rx_tail; +#ifdef NET_SKBUFF_DATA_USES_OFFSET + skb->tail = (sk_buff_data_t) (precv_frame->u.hdr.rx_tail-precv_frame->u.hdr.rx_head); +#else + skb->tail = (sk_buff_data_t)(precv_frame->u.hdr.rx_tail); +#endif skb->len = precv_frame->u.hdr.len; RT_TRACE(_module_recv_osdep_c_,_drv_info_,("\n skb->head=%p skb->data=%p skb->tail=%p skb->end=%p skb->len=%d\n", skb->head, skb->data, skb->tail, skb->end, skb->len)); Index: rtl8192CU_linux_v2.0.1126.20101020/os_dep/linux/xmit_linux.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/os_dep/linux/xmit_linux.c +++ rtl8192CU_linux_v2.0.1126.20101020/os_dep/linux/xmit_linux.c @@ -40,7 +40,7 @@ uint rtw_remainder_len(struct pkt_file *pfile) { - return (pfile->buf_len - ((u32)(pfile->cur_addr) - (u32)(pfile->buf_start))); + return (pfile->buf_len - ((__kernel_size_t)(pfile->cur_addr) - (__kernel_size_t)(pfile->buf_start))); } void _rtw_open_pktfile (_pkt *pktptr, struct pkt_file *pfile) Index: rtl8192CU_linux_v2.0.1126.20101020/os_dep/osdep_service.c =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/os_dep/osdep_service.c +++ rtl8192CU_linux_v2.0.1126.20101020/os_dep/osdep_service.c @@ -289,7 +289,7 @@ void _rtw_rwlock_init(_rwlock *prwlock) { #ifdef PLATFORM_LINUX - init_MUTEX(prwlock); + sema_init(prwlock, 1); #endif #ifdef PLATFORM_OS_XP Index: rtl8192CU_linux_v2.0.1126.20101020/include/rtl8712_recv.h =================================================================== --- rtl8192CU_linux_v2.0.1126.20101020.orig/include/rtl8712_recv.h +++ rtl8192CU_linux_v2.0.1126.20101020/include/rtl8712_recv.h @@ -193,8 +193,13 @@ struct recv_buf{ uint len; u8 *phead; u8 *pdata; +#ifdef NET_SKBUFF_DATA_USES_OFFSET + uint ptail; + uint ptail +#else u8 *ptail; u8 *pend; +#endif u8 *pbuf; u8 *pallocated_buf; ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Question about Edimax 7811Un 2010-11-12 20:18 ` Larry Finger @ 2010-11-12 22:13 ` miloofr 2010-11-14 16:24 ` Larry Finger 0 siblings, 1 reply; 8+ messages in thread From: miloofr @ 2010-11-12 22:13 UTC (permalink / raw) To: Larry Finger; +Cc: wireless Thank you Larry. I successfully compiled the patched driver on a 64 bits system without any error. The driver loads, no freeze when inserting the stick, however, there are a lot of timeout errors, as shown below (the drivers seems to unload itself). That's why I guess a "lshw -C network" does not show the wireless usb network. Eric Nov 12 23:12:26 grandsom kernel: [99800.313048] Nov 12 23:12:26 grandsom kernel: [99800.313050] 8712_usb_endpoint_descriptor(0): Nov 12 23:12:26 grandsom kernel: [99800.313054] bLength=7 Nov 12 23:12:26 grandsom kernel: [99800.313057] bDescriptorType=5 Nov 12 23:12:26 grandsom kernel: [99800.313060] bEndpointAddress=81 Nov 12 23:12:26 grandsom kernel: [99800.313063] wMaxPacketSize=200 Nov 12 23:12:26 grandsom kernel: [99800.313065] bInterval=0 Nov 12 23:12:26 grandsom kernel: [99800.313068] Nov 12 23:12:26 grandsom kernel: [99800.313070] 8712_usb_endpoint_descriptor(1): Nov 12 23:12:26 grandsom kernel: [99800.313073] bLength=7 Nov 12 23:12:26 grandsom kernel: [99800.313075] bDescriptorType=5 Nov 12 23:12:26 grandsom kernel: [99800.313078] bEndpointAddress=2 Nov 12 23:12:26 grandsom kernel: [99800.313081] wMaxPacketSize=200 Nov 12 23:12:26 grandsom kernel: [99800.313084] bInterval=0 Nov 12 23:12:26 grandsom kernel: [99800.313086] Nov 12 23:12:26 grandsom kernel: [99800.313088] 8712_usb_endpoint_descriptor(2): Nov 12 23:12:26 grandsom kernel: [99800.313091] bLength=7 Nov 12 23:12:26 grandsom kernel: [99800.313094] bDescriptorType=5 Nov 12 23:12:26 grandsom kernel: [99800.313096] bEndpointAddress=3 Nov 12 23:12:26 grandsom kernel: [99800.313099] wMaxPacketSize=200 Nov 12 23:12:26 grandsom kernel: [99800.313102] bInterval=0 Nov 12 23:12:26 grandsom kernel: [99800.313104] Nov 12 23:12:26 grandsom kernel: [99800.313106] 8712_usb_endpoint_descriptor(3): Nov 12 23:12:26 grandsom kernel: [99800.313109] bLength=7 Nov 12 23:12:26 grandsom kernel: [99800.313112] bDescriptorType=5 Nov 12 23:12:26 grandsom kernel: [99800.313114] bEndpointAddress=84 Nov 12 23:12:26 grandsom kernel: [99800.313117] wMaxPacketSize=40 Nov 12 23:12:26 grandsom kernel: [99800.313120] bInterval=1 Nov 12 23:12:26 grandsom kernel: [99800.313123] nr_endpoint=4, in_num=2, out_num=2 Nov 12 23:12:26 grandsom kernel: [99800.313126] Nov 12 23:12:26 grandsom kernel: [99800.313128] 8192cu: USB_SPEED_HIGH Nov 12 23:12:26 grandsom kernel: [99800.313301] Chip Version ID: VERSION_NORMAL_TSMC_CHIP_88C. Nov 12 23:12:26 grandsom kernel: [99800.314046] EEPROM type is E-FUSE Nov 12 23:12:26 grandsom kernel: [99800.314052] ====> ReadAdapterInfo8192C Nov 12 23:12:26 grandsom kernel: [99800.314163] Boot from EFUSE, Autoload Success ! Nov 12 23:12:26 grandsom kernel: [99800.323541] rtw_efuse_get_max_phy_size...eeprompriv.efuse_phy_max_size(504) Nov 12 23:12:26 grandsom kernel: [99800.822117] EEPROMVID = 0x7392 Nov 12 23:12:26 grandsom kernel: [99800.822123] EEPROMPID = 0x7811 Nov 12 23:12:26 grandsom kernel: [99800.822126] EEPROMCustomerID : 0x00 Nov 12 23:12:26 grandsom kernel: [99800.822130] EEPROMSubCustomerID: 0x00 Nov 12 23:12:26 grandsom kernel: [99800.822133] RT_CustomerID: 0x00 Nov 12 23:12:26 grandsom kernel: [99800.822137] RT_ChannelPlan: 0x02 Nov 12 23:12:26 grandsom kernel: [99800.822140] _ReadBoardType(0) Nov 12 23:12:26 grandsom kernel: [99800.822143] ### AntDivCfg(0) Nov 12 23:12:26 grandsom kernel: [99800.822147] BT Coexistance = disable Nov 12 23:12:26 grandsom kernel: [99800.822152] _ReadHWPDSelection...bHWPwrPindetect(0) bSupportRemoteWakeup(0) Nov 12 23:12:26 grandsom kernel: [99800.822156] <==== ReadAdapterInfo8192C Nov 12 23:12:26 grandsom kernel: [99800.822168] MAC Address from efuse= 00:1f:1f:c7:8b:df Nov 12 23:12:26 grandsom kernel: [99800.844971] +871x_drv - drv_open, bup=0 Nov 12 23:12:26 grandsom kernel: [99800.953013] ===> FirmwareDownload91C() fw:Rtl819XFwImageArray_TSMC Nov 12 23:12:26 grandsom kernel: [99800.953030] fw_ver=v57, fw_subver=0, sig=0x88c0 Nov 12 23:12:27 grandsom kernel: [99801.030141] reg 0x1fd4, usb write TimeOut! status:-110 value=0x144e046 Nov 12 23:12:27 grandsom kernel: [99801.080149] reg 0x1fe4, usb write TimeOut! status:-110 value=0x6f97901d Nov 12 23:12:27 grandsom kernel: [99801.126605] fw download ok! Nov 12 23:12:27 grandsom kernel: [99801.126612] Set RF Chip ID to RF_6052 and RF type to 1T1R. Nov 12 23:12:27 grandsom kernel: [99801.126617] rf_chip=0x4, rf_type=0x3 and/or ... Nov 12 23:05:37 grandsom kernel: [99391.020266] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020268] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020271] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020273] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020275] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020278] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020280] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020283] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020285] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020288] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020290] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020292] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020295] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020297] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020300] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020302] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020305] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020307] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020309] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020312] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020314] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020317] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020319] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020322] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020324] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020327] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020329] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020331] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020334] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020336] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020339] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020341] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020344] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020377] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020379] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020382] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020384] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020386] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020389] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020391] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020394] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020396] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020398] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020401] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020403] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020406] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020408] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020410] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020413] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020415] reg 0x33, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020419] pdmpriv->TxPowerTrackControl = 1 Nov 12 23:05:37 grandsom kernel: [99391.020421] reg 0x40, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020424] reg 0x40, usb write TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020426] usb_write8...error(-19) Nov 12 23:05:37 grandsom kernel: [99391.020428] reg 0xf0, usb read TimeOut! status:-19 value=0x0 Nov 12 23:05:37 grandsom kernel: [99391.020431] reg 0x15, usb write TimeOut! status:-19 value=0xe9 Nov 12 23:05:37 grandsom kernel: [99391.020432] usb_write8...error(-19) Nov 12 23:05:37 grandsom kernel: [99391.020435] reg 0xf0, usb read TimeOut! status:-19 value=0xe9 Nov 12 23:05:37 grandsom kernel: [99391.020438] MAC Address = 0-1f-1f-c7-8b-df Nov 12 23:05:37 grandsom kernel: [99391.020471] -871x_drv - drv_open, bup=1 Nov 12 23:05:37 grandsom kernel: [99391.020693] ADDRCONF(NETDEV_UP): wlan0: link is not ready Nov 12 23:05:37 grandsom kernel: [99391.020711] (2)871x_drv - drv_close, bup=1, hw_init_completed=1 Nov 12 23:05:37 grandsom kernel: [99391.020716] -871x_drv - drv_close, bup=1 Nov 12 23:05:37 grandsom kernel: [99391.029314] ###> rtw_cmd_thread break................. Nov 12 23:05:37 grandsom kernel: [99391.280874] +rtw_dev_unload Nov 12 23:05:37 grandsom kernel: [99391.280884] reg 0x522, usb write TimeOut! status:-19 value=0xff Nov 12 23:05:37 grandsom kernel: [99391.280887] usb_write8...error(-19) Nov 12 23:05:37 grandsom kernel: [99391.280890] reg 0xf0, usb read TimeOut! status:-19 value=0xff Nov 12 23:05:37 grandsom kernel: [99391.280892] usb_read_port_cancel Nov 12 23:05:37 grandsom kernel: [99391.280894] usb_read_port_cancel Nov 12 23:05:37 grandsom kernel: [99391.280896] -rtw_dev_unload Nov 12 23:05:37 grandsom kernel: [99391.280897] +r871xu_dev_remove, hw_init_completed=1 2010/11/12 Larry Finger <Larry.Finger@lwfinger.net>: > Eric, > > Attached is a patch that compiles cleanly on a 64-bit system. I have not tested > it as I have no device. > > There are two kinds of differences between 32- and 64-bit systems. The first is > the size of a pointer, which becomes important whenever there is a need to keep > one as an integer. The original driver stores them into a u32 or a uint, which > is too short. These problems are solved by storing such values in variables of > __kernel_size_t. The second problem occurs for the communication buffers. There > are 4 quantities: head, data, tail and end. For both 32- and 64-bit systems, > head and data are pointers. With 32 bits, so are tail and end, but for 64 bits, > tail and end are uint. > > I got all the ones the compiler complained about. > > Larry > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Question about Edimax 7811Un 2010-11-12 22:13 ` miloofr @ 2010-11-14 16:24 ` Larry Finger 0 siblings, 0 replies; 8+ messages in thread From: Larry Finger @ 2010-11-14 16:24 UTC (permalink / raw) To: miloofr@gmail.com; +Cc: wireless On 11/12/2010 04:13 PM, miloofr@gmail.com wrote: > Thank you Larry. I successfully compiled the patched driver on a 64 > bits system without any error. The driver loads, no freeze when > inserting the stick, however, there are a lot of timeout errors, as > shown below (the drivers seems to unload itself). That's why I guess a > "lshw -C network" does not show the wireless usb network. > > Eric > > Nov 12 23:12:26 grandsom kernel: [99800.313048] > Nov 12 23:12:26 grandsom kernel: [99800.313050] 8712_usb_endpoint_descriptor(0): > Nov 12 23:12:26 grandsom kernel: [99800.313054] bLength=7 > Nov 12 23:12:26 grandsom kernel: [99800.313057] bDescriptorType=5 > Nov 12 23:12:26 grandsom kernel: [99800.313060] bEndpointAddress=81 > Nov 12 23:12:26 grandsom kernel: [99800.313063] wMaxPacketSize=200 > Nov 12 23:12:26 grandsom kernel: [99800.313065] bInterval=0 > Nov 12 23:12:26 grandsom kernel: [99800.313068] > Nov 12 23:12:26 grandsom kernel: [99800.313070] 8712_usb_endpoint_descriptor(1): > Nov 12 23:12:26 grandsom kernel: [99800.313073] bLength=7 > Nov 12 23:12:26 grandsom kernel: [99800.313075] bDescriptorType=5 > Nov 12 23:12:26 grandsom kernel: [99800.313078] bEndpointAddress=2 > Nov 12 23:12:26 grandsom kernel: [99800.313081] wMaxPacketSize=200 > Nov 12 23:12:26 grandsom kernel: [99800.313084] bInterval=0 > Nov 12 23:12:26 grandsom kernel: [99800.313086] > Nov 12 23:12:26 grandsom kernel: [99800.313088] 8712_usb_endpoint_descriptor(2): > Nov 12 23:12:26 grandsom kernel: [99800.313091] bLength=7 > Nov 12 23:12:26 grandsom kernel: [99800.313094] bDescriptorType=5 > Nov 12 23:12:26 grandsom kernel: [99800.313096] bEndpointAddress=3 > Nov 12 23:12:26 grandsom kernel: [99800.313099] wMaxPacketSize=200 > Nov 12 23:12:26 grandsom kernel: [99800.313102] bInterval=0 > Nov 12 23:12:26 grandsom kernel: [99800.313104] > Nov 12 23:12:26 grandsom kernel: [99800.313106] 8712_usb_endpoint_descriptor(3): > Nov 12 23:12:26 grandsom kernel: [99800.313109] bLength=7 > Nov 12 23:12:26 grandsom kernel: [99800.313112] bDescriptorType=5 > Nov 12 23:12:26 grandsom kernel: [99800.313114] bEndpointAddress=84 > Nov 12 23:12:26 grandsom kernel: [99800.313117] wMaxPacketSize=40 > Nov 12 23:12:26 grandsom kernel: [99800.313120] bInterval=1 > Nov 12 23:12:26 grandsom kernel: [99800.313123] nr_endpoint=4, > in_num=2, out_num=2 > Nov 12 23:12:26 grandsom kernel: [99800.313126] > Nov 12 23:12:26 grandsom kernel: [99800.313128] 8192cu: USB_SPEED_HIGH > Nov 12 23:12:26 grandsom kernel: [99800.313301] Chip Version ID: > VERSION_NORMAL_TSMC_CHIP_88C. > Nov 12 23:12:26 grandsom kernel: [99800.314046] EEPROM type is E-FUSE > Nov 12 23:12:26 grandsom kernel: [99800.314052] ====> ReadAdapterInfo8192C > Nov 12 23:12:26 grandsom kernel: [99800.314163] Boot from EFUSE, > Autoload Success ! > Nov 12 23:12:26 grandsom kernel: [99800.323541] > rtw_efuse_get_max_phy_size...eeprompriv.efuse_phy_max_size(504) > Nov 12 23:12:26 grandsom kernel: [99800.822117] EEPROMVID = 0x7392 > Nov 12 23:12:26 grandsom kernel: [99800.822123] EEPROMPID = 0x7811 > Nov 12 23:12:26 grandsom kernel: [99800.822126] EEPROMCustomerID : 0x00 > Nov 12 23:12:26 grandsom kernel: [99800.822130] EEPROMSubCustomerID: 0x00 > Nov 12 23:12:26 grandsom kernel: [99800.822133] RT_CustomerID: 0x00 > Nov 12 23:12:26 grandsom kernel: [99800.822137] RT_ChannelPlan: 0x02 > Nov 12 23:12:26 grandsom kernel: [99800.822140] _ReadBoardType(0) > Nov 12 23:12:26 grandsom kernel: [99800.822143] ### AntDivCfg(0) > Nov 12 23:12:26 grandsom kernel: [99800.822147] BT Coexistance = disable > Nov 12 23:12:26 grandsom kernel: [99800.822152] > _ReadHWPDSelection...bHWPwrPindetect(0) bSupportRemoteWakeup(0) > Nov 12 23:12:26 grandsom kernel: [99800.822156] <==== ReadAdapterInfo8192C > Nov 12 23:12:26 grandsom kernel: [99800.822168] MAC Address from > efuse= 00:1f:1f:c7:8b:df > Nov 12 23:12:26 grandsom kernel: [99800.844971] +871x_drv - drv_open, bup=0 > Nov 12 23:12:26 grandsom kernel: [99800.953013] ===> > FirmwareDownload91C() fw:Rtl819XFwImageArray_TSMC > Nov 12 23:12:26 grandsom kernel: [99800.953030] fw_ver=v57, > fw_subver=0, sig=0x88c0 > Nov 12 23:12:27 grandsom kernel: [99801.030141] reg 0x1fd4, usb write > TimeOut! status:-110 value=0x144e046 > Nov 12 23:12:27 grandsom kernel: [99801.080149] reg 0x1fe4, usb write > TimeOut! status:-110 value=0x6f97901d > Nov 12 23:12:27 grandsom kernel: [99801.126605] fw download ok! > Nov 12 23:12:27 grandsom kernel: [99801.126612] Set RF Chip ID to > RF_6052 and RF type to 1T1R. > Nov 12 23:12:27 grandsom kernel: [99801.126617] rf_chip=0x4, rf_type=0x3 > and/or > ... > Nov 12 23:05:37 grandsom kernel: [99391.020266] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020268] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020271] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020273] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020275] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020278] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020280] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020283] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020285] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020288] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020290] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020292] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020295] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020297] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020300] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020302] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020305] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020307] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020309] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020312] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020314] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020317] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020319] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020322] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020324] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020327] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020329] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020331] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020334] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020336] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020339] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020341] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020344] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020377] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020379] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020382] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020384] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020386] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020389] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020391] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020394] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020396] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020398] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020401] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020403] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020406] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020408] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020410] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020413] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020415] reg 0x33, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020419] pdmpriv->TxPowerTrackControl = 1 > Nov 12 23:05:37 grandsom kernel: [99391.020421] reg 0x40, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020424] reg 0x40, usb write > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020426] usb_write8...error(-19) > Nov 12 23:05:37 grandsom kernel: [99391.020428] reg 0xf0, usb read > TimeOut! status:-19 value=0x0 > Nov 12 23:05:37 grandsom kernel: [99391.020431] reg 0x15, usb write > TimeOut! status:-19 value=0xe9 > Nov 12 23:05:37 grandsom kernel: [99391.020432] usb_write8...error(-19) > Nov 12 23:05:37 grandsom kernel: [99391.020435] reg 0xf0, usb read > TimeOut! status:-19 value=0xe9 > Nov 12 23:05:37 grandsom kernel: [99391.020438] MAC Address = 0-1f-1f-c7-8b-df > Nov 12 23:05:37 grandsom kernel: [99391.020471] -871x_drv - drv_open, bup=1 > Nov 12 23:05:37 grandsom kernel: [99391.020693] ADDRCONF(NETDEV_UP): > wlan0: link is not ready > Nov 12 23:05:37 grandsom kernel: [99391.020711] (2)871x_drv - > drv_close, bup=1, hw_init_completed=1 > Nov 12 23:05:37 grandsom kernel: [99391.020716] -871x_drv - drv_close, bup=1 > Nov 12 23:05:37 grandsom kernel: [99391.029314] ###> rtw_cmd_thread > break................. > Nov 12 23:05:37 grandsom kernel: [99391.280874] +rtw_dev_unload > Nov 12 23:05:37 grandsom kernel: [99391.280884] reg 0x522, usb write > TimeOut! status:-19 value=0xff > Nov 12 23:05:37 grandsom kernel: [99391.280887] usb_write8...error(-19) > Nov 12 23:05:37 grandsom kernel: [99391.280890] reg 0xf0, usb read > TimeOut! status:-19 value=0xff > Nov 12 23:05:37 grandsom kernel: [99391.280892] usb_read_port_cancel > Nov 12 23:05:37 grandsom kernel: [99391.280894] usb_read_port_cancel > Nov 12 23:05:37 grandsom kernel: [99391.280896] -rtw_dev_unload > Nov 12 23:05:37 grandsom kernel: [99391.280897] +r871xu_dev_remove, > hw_init_completed=1 At least we made some progress. I'll go through the driver again to see what I may have missed. In addition, I have just bought one of these 7811Un devices through Ebay. It should arrive in early December. Larry ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-11-14 16:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <AANLkTi=+0BOUaTs73jRMnJ=9qyNkqnBvMuKVTG4od9_+@mail.gmail.com>
[not found] ` <0022152d6729673f6a0494b1f2e6@google.com>
2010-11-10 12:25 ` Delivery Status Notification (Failure) miloofr
2010-11-10 15:26 ` Question about Edimax 7811Un Larry Finger
2010-11-11 9:03 ` miloofr
[not found] ` <AANLkTik9=-8bXNOvrY-JnFuVJr1wZG24o8m8JzJVD8tQ@mail.gmail.com>
2010-11-11 14:58 ` Larry Finger
2010-11-11 19:14 ` miloofr
2010-11-12 20:18 ` Larry Finger
2010-11-12 22:13 ` miloofr
2010-11-14 16:24 ` Larry Finger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).