Realtek 8185 Wireless Card
If you are using a cheap wireless card based on the RTL8185 chipset, but are having horrible signal strength, you need to use the custom realtek drivers from realtek's website. The standard linux driver is the rtl8180 module. The RealTek driver is named r8185b, and it doesn't work 1n the 64 bit kernel.
The RealTek download page is: http://www.realtek.com.tw/downloads/
The 64bit build has these errors:
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-28-generic'
CC [M] /home/markw/drivers/old/rtl8185/r8180_core.o
/home/markw/drivers/old/rtl8185/r8180_core.c: In function ‘proc_get_stats_hw’:
/home/markw/drivers/old/rtl8185/r8180_core.c:350: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:351: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:354: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:355: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:358: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:359: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c: In function ‘check_tx_ring’:
/home/markw/drivers/old/rtl8185/r8180_core.c:826: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:826: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:827: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:827: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c: In function ‘alloc_tx_desc_ring’:
/home/markw/drivers/old/rtl8185/r8180_core.c:1447: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:1447: warning: cast to pointer from integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c: In function ‘alloc_rx_desc_ring’:
/home/markw/drivers/old/rtl8185/r8180_core.c:1621: warning: cast from pointer to integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c:1621: warning: cast to pointer from integer of different size
/home/markw/drivers/old/rtl8185/r8180_core.c: In function ‘rtl8180_rx’:
/home/markw/drivers/old/rtl8185/r8180_core.c:2065: error: implicit declaration of function ‘rdtsc_rtl’
/home/markw/drivers/old/rtl8185/r8180_core.c: In function ‘rtl8180_watch_dog’:
/home/markw/drivers/old/rtl8185/r8180_core.c:2793: warning: unused variable ‘bEnterPS’
make[2]: *** [/home/markw/drivers/old/rtl8185/r8180_core.o] Error 1
make[1]: *** [_module_/home/markw/drivers/old/rtl8185] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-28-generic'
The problem is that they used __i386__ which is not defined on the 64 bit x86 kernel. The operations should work on x86_64 architecture, so adding __x86_64__ to the "ifdef" should fix the problem.
Here's the patch:
____________ cut here ___________________
--- ../../old/rtl8185/r8180_core.c 2009-12-07 05:00:09.000000000 -0500
+++ r8180_core.c 2011-02-09 13:26:55.000000000 -0500
@@ -66,7 +66,7 @@
#define PCI_VENDOR_ID_DLINK 0x1186
#endif
-#ifdef __i386__
+#if defined(__i386__) || defined (__x86_64__)
#define rdtsc_rtl(low,high)\
__asm__ __volatile__("rdtsc" : "=a"(low), "=d"(high))
#endif
____________ cut here ___________________
This probably means that the driver has not been tested on a 64 bit platform, so we are on our own, but it seems to be working for me.