r8712u driver - on ARM
Dear all,
I'm attempting to get some sense from a Realtek 8191S device on
ARM linux. Using the latest kernel/drivers (3.0.4) I've had
great success on x86 linux, achieving 94Mbit throughput.
On ARM linux, however, the device is barely working. I can
bring up the firmware (using the 20110818 firmware package):
usb 1-1: new high speed USB device using musb-hdrc and address 2 usb 1-1: New USB device found, idVendor=0bda, idProduct=8172 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: RTL8191S WLAN Adapter
usb 1-1: Manufacturer: Manufacturer Realtek
usb 1-1: SerialNumber: 00e04c000001
r8712u: DriverVersion: v7_0.20100831
r8712u: register rtl8712_netdev_ops to netdev_ops
r8712u: USB_SPEED_HIGH with 4 endpoints
r8712u: Boot from EFUSE: Autoload OK
r8712u: CustomerID = 0x0000
r8712u: MAC Address from efuse = 00:02:72:a7:12:47
# ifconfig wlan0 up r8712u: Loading firmware from "rtlwifi/rtl8712u.bin" r8712u: 1 RCR=0x153f00e r8712u: 2 RCR=0x553f00e
I then attempt some basic operations such as an SSID scan. At this point, I occasionally get a result, but more often than not,
I get no results at all. There are 7 access points around me, so
it's surprising to get nothing.
Attempting to forcibly connect to anything is also fruitless.
My host is a TI DaVinci DM8168 (OMAP3+toys). The USB host is not
fantastic, but has been thrashed heavily with other devices and seems to be reliable in those cases.
I'd appreciate any input and guidance as to what may be the issue here. There doesn't appear to be a great deal of debug info to be enabled in the driver, so I'm not sure what more I can add at this point to aid with resolving the problem. I fear some long days of pain trying to track down differences in operation for this device between ARM and x86.
Could I ask if anyone can actually confirm (or deny) this particular driver/chipset works with an ARM host?
Very many thanks,
Ian.
Quoted 27 lines · Ian Jeffray
Dear all,
I'm attempting to get some sense from a Realtek 8191S device on ARM linux. Using the latest kernel/drivers (3.0.4) I've had great success on x86 linux, achieving 94Mbit throughput.
On ARM linux, however, the device is barely working. I can bring up the firmware (using the 20110818 firmware package):
usb 1-1: new high speed USB device using musb-hdrc and address 2 usb 1-1: New USB device found, idVendor=0bda, idProduct=8172 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: RTL8191S WLAN Adapter
usb 1-1: Manufacturer: Manufacturer Realtek
usb 1-1: SerialNumber:00e04c000001
r8712u: DriverVersion: v7_0.20100831
r8712u: registerrtl8712_netdev_opstonetdev_ops
r8712u:USB_SPEED_HIGHwith 4 endpoints
r8712u: Boot from EFUSE: Autoload OK
r8712u: CustomerID =0x0000
r8712u: MAC Address from efuse = 00:02:72:a7:12:47# ifconfig wlan0 up r8712u: Loading firmware from "rtlwifi/rtl8712u.bin" r8712u: 1 RCR=0x153f00e r8712u: 2 RCR=0x553f00e
Quoted 4 lines
I then attempt some basic operations such as an SSID scan. At this point, I occasionally get a result, but more often than not, I get no results at all. There are 7 access points around me, so it's surprising to get nothing.
That is what one might expect if the probe messages for the scan are not being sent, and you are ending up with effectively a passive scan.
Quoted 6 lines
Attempting to forcibly connect to anything is also fruitless.
My host is a TI DaVinci DM8168 (OMAP3+toys). The USB host is not fantastic, but has been thrashed heavily with other devices and seems to be reliable in those cases.
Quoted 8 lines
I'd appreciate any input and guidance as to what may be the issue here. There doesn't appear to be a great deal of debug info to be enabled in the driver, so I'm not sure what more I can add at this point to aid with resolving the problem. I fear some long days of pain trying to track down differences in operation for this device between ARM and x86.
Could I ask if anyone can actually confirm (or deny) this particular driver/chipset works with an ARM host?
I have not tried this chip on an ARM host as I have no hardware. My testing has been with X86 and PPC - thus I know the endianess is OK, but that is the extent of my platform testing.
The first thing I would try is wireshark on another host to verify that packets are actually getting on the air.
Larry
Quoted 5 lines · Larry Finger
Quoted 4 lines · Ian Jeffray
Dear all,
I'm attempting to get some sense from a Realtek 8191S device on ARM linux.
<SNIP>
Quoted 3 lines
Quoted 3 lines
My host is a TI DaVinci DM8168 (OMAP3+toys). The USB host is not fantastic, but has been thrashed heavily with other devices and seems to be reliable in those cases.
<SNIP>
Quoted 7 lines
I have not tried this chip on an ARM host as I have no hardware. My testing has been with X86 and PPC - thus I know the endianess is OK, but that is the extent of my platform testing.
The first thing I would try is wireshark on another host to verify that packets are actually getting on the air.
Ok, so I've spent more more days working on this. The driver appears
to be fine on an ARM9 S3X board. I've contacted the TI support
team about the USB host and applied some patches from them which have slightly improved the situation, but it's still horrible - I'm actually getting "reliable" scans but only a pathetic 1Mbit or less of data throughput.
I've also tried this driver (and the realtek upstream version) with a Blackfin BF527 device, which has roughly the same 'musb' Inventra USB host controller... and I see exactly the same problem there! The firmware appears to load fine, but scans produce no results.
I'm not really sure about your comment about wireshark because, as far as I understand, a 'iwlist wlan0 scan' command doesn't cause any traffic which would be wireshark capturable on another host... am I misunderstanding something?
So it appears as though there may be some general problem with this driver and an 'musb' host controller. Very strange.
My next course of attack is to try comparing outputs of 'usbmon' dumps between hosts which work and hosts which don't... but I can't make a great deal of sense looking at them really.
I'd greatly appreciate any more advice you may be able to give.
Many thanks,
Ian.
Signature · 3 lines
Ian Jeffray [email protected] Tel: +44 (0) 141 221 8449 emobix Limited, Suite 5/5, 29 St Vincent Place, Glasgow, G1 2DT Registered in Scotland; Company No. 371276 - VAT No. 983 4833 78
Quoted 36 lines · On Friday 30 September 2011 20:39:23 Ian Jeffray wrote:
Quoted 5 lines · Larry Finger
Quoted 4 lines · Ian Jeffray
Dear all,
I'm attempting to get some sense from a Realtek 8191S device on ARM linux.
<SNIP>
Quoted 3 lines
Quoted 3 lines
My host is a TI DaVinci DM8168 (OMAP3+toys). The USB host is not fantastic, but has been thrashed heavily with other devices and seems to be reliable in those cases.
<SNIP>
Quoted 7 lines
I have not tried this chip on an ARM host as I have no hardware. My testing has been with X86 and PPC - thus I know the endianess is OK, but that is the extent of my platform testing.
The first thing I would try is wireshark on another host to verify that packets are actually getting on the air.
Ok, so I've spent more more days working on this. The driver appears
to be fine on an ARM9 S3X board. I've contacted the TI support
team about the USB host and applied some patches from them which have slightly improved the situation, but it's still horrible - I'm actually getting "reliable" scans but only a pathetic 1Mbit or less of data throughput.I've also tried this driver (and the realtek upstream version) with a Blackfin BF527 device, which has roughly the same 'musb' Inventra USB host controller... and I see exactly the same problem there! The firmware appears to load fine, but scans produce no results.
I'm not really sure about your comment about wireshark because, as far as I understand, a 'iwlist wlan0 scan' command doesn't cause any traffic which would be wireshark capturable on another host... am I misunderstanding something?
Quoted 8 lines
So it appears as though there may be some general problem with this driver and an 'musb' host controller. Very strange.
My next course of attack is to try comparing outputs of 'usbmon' dumps between hosts which work and hosts which don't... but I can't make a great deal of sense looking at them really.
I'd greatly appreciate any more advice you may be able to give.
Well, I'm not really in r8712u but I can tell you a few things about carl9170 and musb.
You see I had a similar discussion a while ago:
http://www.spinics.net/lists/linux-wireless/msg68870.html
Apparently, musb can't do DMA with non 4-bytes aligned buffers and falls back to PIO [which results in a much higher cpu utilization and really bad usb throughput... so if timing is critical this "fact" is pretty much a deal-breaker for the combination].
Now, you might ask, why this DMA vs. PIO is so importent... Well, it's because the network stack has its own alignment ideas and about the data/skbs. There's a comment in include/linux/skbuff.h around line 1400 which explains the situation. The upshot is you can choose between a penatly on the packet processing by the stack, or a penatly on the driver/hardware site if r8712u does not implement any additional techniques to counter the issues.
Regards,
Chr
Quoted 32 lines · Christian Lamparter
Quoted 31 lines · On Friday 30 September 2011 20:39:23 Ian Jeffray wrote:
Quoted 5 lines · Larry Finger
Quoted 4 lines · Ian Jeffray
Dear all,
I'm attempting to get some sense from a Realtek 8191S device on ARM linux.
<SNIP>
Quoted 3 lines
Quoted 3 lines
My host is a TI DaVinci DM8168 (OMAP3+toys). The USB host is not fantastic, but has been thrashed heavily with other devices and seems to be reliable in those cases.
<SNIP>
Quoted 7 lines
I have not tried this chip on an ARM host as I have no hardware. My testing has been with X86 and PPC - thus I know the endianess is OK, but that is the extent of my platform testing.
The first thing I would try is wireshark on another host to verify that packets are actually getting on the air.
Ok, so I've spent more more days working on this. The driver appears
to be fine on an ARM9 S3X board. I've contacted the TI support
team about the USB host and applied some patches from them which have slightly improved the situation, but it's still horrible - I'm actually getting "reliable" scans but only a pathetic 1Mbit or less of data throughput.I've also tried this driver (and the realtek upstream version) with a Blackfin BF527 device, which has roughly the same 'musb' Inventra USB host controller... and I see exactly the same problem there! The firmware appears to load fine, but scans produce no results.
Quoted 4 lines
Quoted 4 lines
I'm not really sure about your comment about wireshark because, as far as I understand, a 'iwlist wlan0 scan' command doesn't cause any traffic which would be wireshark capturable on another host... am I misunderstanding something?
@Ian: If iwlist scan is run as root, an active scan is done. If run as an unprivileged user, then a passive scan is done. With the former, we would see an outgoing probe packet on each channel.
Quoted 20 lines
Quoted 8 lines
So it appears as though there may be some general problem with this driver and an 'musb' host controller. Very strange.
My next course of attack is to try comparing outputs of 'usbmon' dumps between hosts which work and hosts which don't... but I can't make a great deal of sense looking at them really.
I'd greatly appreciate any more advice you may be able to give.
Well, I'm not really in r8712u but I can tell you a few things about carl9170 and musb.
You see I had a similar discussion a while ago:
http://www.spinics.net/lists/linux-wireless/msg68870.htmlApparently, musb can't do DMA with non 4-bytes aligned buffers and falls back to PIO [which results in a much higher cpu utilization and really bad usb throughput... so if timing is critical this "fact" is pretty much a deal-breaker for the combination].
Quoted 7 lines
Now, you might ask, why this DMA vs. PIO is so importent... Well, it's because the network stack has its own alignment ideas and about the data/skbs. There's a comment in
include/linux/skbuff.haround line 1400 which explains the situation. The upshot is you can choose between a penatly on the packet processing by the stack, or a penatly on the driver/hardware site if r8712u does not implement any additional techniques to counter the issues.
@Christian: Thanks for the pointer on the penalty associated with unaligned DMA on ARM. I'll prepare a patch to see if using the skb_reserve() call hurts x86 or PPC performance. If it does not, then the patch can be used for all architectures.
Larry
Ian,
Most of the skb assignments in r8712u are aligned OK and most aligned on 512-byte boundaries, but there was one that had the minimal offset of 14 bytes. The attached patch should fix it. Does it help?
Larry
drivers/staging/rtl8712/rtl8712_recv.c +2 -2
@@ -372,8 +372,8 @@ static int amsdu_to_msdu(struct _adapter pdata +=ETH_HLEN ; a_len -=ETH_HLEN ;/* Allocate new skb for releasing to upper layer */ - sub_skb =dev_alloc_skb (nSubframe_Length +12 ); -skb_reserve (sub_skb,12 ); + sub_skb =dev_alloc_skb (nSubframe_Length +16 ); +skb_reserve (sub_skb,16 ); data_ptr = (u8 *)skb_put (sub_skb, nSubframe_Length);memcpy (data_ptr, pdata, nSubframe_Length); subframes[nr_subframes++] = sub_skb;
Quoted 5 lines · On Saturday 01 October 2011 18:01:08 Larry Finger wrote:
Ian,
Most of the skb assignments in r8712u are aligned OK and most aligned on 512-byte boundaries, but there was one that had the minimal offset of 14 bytes. The attached patch should fix it. Does it help?
Interesting, this "patch" goes in a completely different direction. Can you tell me where the driver aligns the frames which will be xmitted by the device [i.e.: which is passed to the usb subsystem by usb_submit_urb]? Because that's what actually matters.
Regards,
Chr
Quoted 10 lines · Christian Lamparter
Quoted 5 lines · On Saturday 01 October 2011 18:01:08 Larry Finger wrote:
Ian,
Most of the skb assignments in r8712u are aligned OK and most aligned on 512-byte boundaries, but there was one that had the minimal offset of 14 bytes. The attached patch should fix it. Does it help?
Interesting, this "patch" goes in a completely different direction. Can you tell me where the driver aligns the frames which will be xmitted by the device [i.e.: which is passed to the usb subsystem by
usb_submit_urb]? Because that's what actually matters.
In this driver, all references are to _usb_submit_urb(), which is defined to be usb_submit_urb() in one of the header files. That made it easy to insert a test for misalignment of the DMA buffer as follows:
drivers/staging/rtl8712/osdep_service.h +9 -1
@@ -34,7 +34,7 @@#include <linux/if_arp.h> #include <linux/firmware.h> #define _usb_alloc_urb (x, y) usb_alloc_urb(x, y) -#define _usb_submit_urb (x, y) usb_submit_urb(x, y) +//#define _usb_submit_urb(x, y) usb_submit_urb(x, y) struct __queue {struct list_head queue;
@@ -232,5 +232,13 @@ static inline u32 _RND512(u32 sz) return ((sz >> 9) + ((sz & 511) ? 1 : 0)) << 9; } +static inline int _usb_submit_urb (struct urb *urb,gfp_t mem_flags) +{ +if (urb->transfer_dma &3 ) { +pr_info ("Transfer_dma 0x%x not on 4-byte boundary\n" , (uint )urb->transfer_dma); +dump_stack (); + } +return usb_submit_urb (urb, mem_flags); +}#endif
I never hit the pr_info() and the associated dump_stack(). If that test is sufficient, then buffer misalignment is not the source of the problem.
Larry
Quoted 33 lines · On Saturday 01 October 2011 19:52:37 Larry Finger wrote:
Quoted 10 lines · Christian Lamparter
Quoted 5 lines · On Saturday 01 October 2011 18:01:08 Larry Finger wrote:
Ian,
Most of the skb assignments in r8712u are aligned OK and most aligned on 512-byte boundaries, but there was one that had the minimal offset of 14 bytes. The attached patch should fix it. Does it help?
Interesting, this "patch" goes in a completely different direction. Can you tell me where the driver aligns the frames which will be xmitted by the device [i.e.: which is passed to the usb subsystem by
usb_submit_urb]? Because that's what actually matters.In this driver, all references are to
_usb_submit_urb(), which is defined to beusb_submit_urb()in one of the header files. That made it easy to insert a test for misalignment of the DMA buffer as follows:Index:
wireless-testing-new/drivers/staging/rtl8712/osdep_service.h
===================================================================drivers/staging/rtl8712/osdep_service.h +1
-1@@ -34,7 +34,7 @@#include <linux/if_arp.h> #include <linux/firmware.h> #define _usb_alloc_urb (x, y) usb_alloc_urb(x, y) -#define _usb_submit_urb (x, y) usb_submit_urb(x, y) +//#define _usb_submit_urb(x, y) usb_submit_urb(x, y) struct __queue {struct list_head queue;@@ -232,5 +232,13 @@ static inline u32 _RND512(u32 sz)return ((sz >>9 ) + ((sz &511 ) ?1 :0 )) <<9 ; }
drivers/staging/rtl8712/osdep_service.h static inline u32 _RND512(u32 sz) · line 244
Quoted 10 lines
drivers/staging/rtl8712/osdep_service.h +8
-0+static inline int _usb_submit_urb (struct urb *urb,gfp_t mem_flags) +{ +if (urb->transfer_dma &3 ) { +pr_info ("Transfer_dma 0x%x not on 4-byte boundary\n" , (uint )urb->transfer_dma); +dump_stack (); + } +return usb_submit_urb (urb, mem_flags); +}#endif
I think you need to check transfer_buffer and not transfer_dma.
Regards,
Christian
Quoted 16 lines · Christian Lamparter
Quoted 15 lines · On Saturday 01 October 2011 19:52:37 Larry Finger wrote:
Quoted 10 lines · Christian Lamparter
Quoted 5 lines · On Saturday 01 October 2011 18:01:08 Larry Finger wrote:
Ian,
Most of the skb assignments in r8712u are aligned OK and most aligned on 512-byte boundaries, but there was one that had the minimal offset of 14 bytes. The attached patch should fix it. Does it help?
Interesting, this "patch" goes in a completely different direction. Can you tell me where the driver aligns the frames which will be xmitted by the device [i.e.: which is passed to the usb subsystem by
usb_submit_urb]? Because that's what actually matters.In this driver, all references are to
_usb_submit_urb(), which is defined to beusb_submit_urb()in one of the header files. That made it easy to insert a test for misalignment of the DMA buffer as follows:
<snip>
Quoted 3 lines
Quoted 3 lines
drivers/staging/rtl8712/osdep_service.h +3
-0+static inline int _usb_submit_urb (struct urb *urb,gfp_t mem_flags) +{ +if (urb->transfer_dma&3 ) {
<snip>
Quoted 1 line
I think you need to check
transfer_bufferand nottransfer_dma.
I tried checking both transfer_buffer and transfer_dma and all were always word aligned. (At least on Blackfin)
Ian.
Signature · 3 lines
Ian Jeffray [email protected] Tel: +44 (0) 141 221 8449 emobix Limited, Suite 5/5, 29 St Vincent Place, Glasgow, G1 2DT Registered in Scotland; Company No. 371276 - VAT No. 983 4833 78
Quoted 6 lines · Ian Jeffray
Quoted 5 lines · Christian Lamparter
Quoted 4 lines · On Saturday 01 October 2011 19:52:37 Larry Finger wrote:
Quoted 3 lines · Christian Lamparter
Quoted 2 lines · On Saturday 01 October 2011 18:01:08 Larry Finger wrote:
Ian,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Most of the skb assignments in r8712u are aligned OK and most aligned on 512-byte boundaries, but there was one that had the minimal offset of 14 bytes.
The attached patch should fix it. Does it help?Interesting, this "patch" goes in a completely different direction. Can you tell me where the driver aligns the frames which will be xmitted by the device [i.e.: which
is passed to the usb subsystem
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
by
usb_submit_urb]? Because that's what actually matters.In this driver, all references are to
_usb_submit_urb(), which is defined to beusb_submit_urb()in one of the header files. That made it easy to insert a test for misalignment of the DMA buffer as follows:<snip>
Quoted 3 lines
Quoted 3 lines
drivers/staging/rtl8712/osdep_service.h +3
-0+static inline int _usb_submit_urb (struct urb *urb,gfp_t mem_flags) +{ +if (urb->transfer_dma&3 ) {<snip>
Quoted 4 lines
Quoted 1 line
I think you need to check
transfer_bufferand nottransfer_dma.I tried checking both
transfer_bufferandtransfer_dmaand all were always word aligned. (At least on Blackfin)
The same with x86_64.
Larry
Quoted 30 lines · On Saturday 01 October 2011 20:49:02 Larry Finger wrote:
Quoted 6 lines · Ian Jeffray
Quoted 5 lines · Christian Lamparter
Quoted 4 lines · On Saturday 01 October 2011 19:52:37 Larry Finger wrote:
Quoted 3 lines · Christian Lamparter
Quoted 2 lines · On Saturday 01 October 2011 18:01:08 Larry Finger wrote:
Ian,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Most of the skb assignments in r8712u are aligned OK and most aligned on 512-byte boundaries, but there was one that had the minimal offset of 14 bytes.
The attached patch should fix it. Does it help?Interesting, this "patch" goes in a completely different direction. Can you tell me where the driver aligns the frames which will be xmitted by the device [i.e.: which
is passed to the usb subsystem
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
by
usb_submit_urb]? Because that's what actually matters.In this driver, all references are to
_usb_submit_urb(), which is defined to beusb_submit_urb()in one of the header files. That made it easy to insert a test for misalignment of the DMA buffer as follows:<snip>
Quoted 3 lines
Quoted 3 lines
drivers/staging/rtl8712/osdep_service.h +3
-0+static inline int _usb_submit_urb (struct urb *urb,gfp_t mem_flags) +{ +if (urb->transfer_dma&3 ) {<snip>
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
I think you need to check
transfer_bufferand nottransfer_dma.I tried checking both
transfer_bufferandtransfer_dmaand all were always word aligned. (At least on Blackfin)The same with
x86_64.
Sure, x86_64 and powerpc set in system.h
grep NET_IP_ALIGN * -R
microblaze/include/asm/system.h:#define NET_IP_ALIGN 2
powerpc/include/asm/system.h:#define NET_IP_ALIGN 0
x86/include/asm/system.h:#define NET_IP_ALIGN 0
well, it looks like Realtek did a better job then and unfortunately your problem is related to something else.
Regards,
Chr
Quoted 5 lines · Christian Lamparter
well, it looks like Realtek did a better job then and unfortunately your problem is related to something else.
Regards,
Chr
Onwards. Thanks Christian for your suggestions. At least we were able to eliminate one source of the problem.
BTW, netperf shows that r8712u can transmit at ~80 and receive at ~60 Mbps when connected to a 270 Mbps AP. As Realtek lists this as capable of 150 Mbps, x86_64 is getting the max transmit rate that we might expect.
@Ian: Ali Bahar submitted a number of patches to GregKH updating the driver to the latest Realtek version. As the git repo is not available due to kernel.org, and I have not found an alternate location that Greg has established, I am attaching them here.
Larry
Quoted 1 line
From
35a3512d7d279075be2c1857bf791c8279f43ad0Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sat, 3 Sep 2011 14:14:00 -0500
Subject: [PATCH 01/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Copyright banners.
To: [email protected]
Cc: [email protected],[email protected]
Only copyright banners have been added to these files. No functional changes.
--- drivers/staging/rtl8712/basic_types.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/drv_types.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/ieee80211.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/osdep_intf.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/osdep_service.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl8712_cmd.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl8712_event.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl8712_recv.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl8712_xmit.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_cmd.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_debug.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_io.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_ioctl_rtl.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_led.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_mlme.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_mp.c | 26 ++++++++++++++++++-------- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_xmit.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/sta_info.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/wifi.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/wlan_bssdef.h | 25 +++++++++++++++++++++++++ drivers/staging/rtl8712/xmit_osdep.h | 25 +++++++++++++++++++++++++ 22 files changed, 543 insertions(+), 8 deletions(-)
drivers/staging/rtl8712/basic_types.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __BASIC_TYPES_H__#define __BASIC_TYPES_H__
drivers/staging/rtl8712/drv_types.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ /*--------------------------------------------------------------------- For type defines and data structure defines
drivers/staging/rtl8712/ieee80211.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __IEEE80211_H#define __IEEE80211_H
drivers/staging/rtl8712/osdep_intf.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __OSDEP_INTF_H_#define __OSDEP_INTF_H_
drivers/staging/rtl8712/osdep_service.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __OSDEP_SERVICE_H_#define __OSDEP_SERVICE_H_
drivers/staging/rtl8712/rtl8712_cmd.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __RTL8712_CMD_H_#define __RTL8712_CMD_H_
drivers/staging/rtl8712/rtl8712_event.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef _RTL8712_EVENT_H_#define _RTL8712_EVENT_H_
drivers/staging/rtl8712/rtl8712_recv.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef _RTL8712_RECV_H_#define _RTL8712_RECV_H_
drivers/staging/rtl8712/rtl8712_xmit.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef _RTL8712_XMIT_H_#define _RTL8712_XMIT_H_
drivers/staging/rtl8712/rtl871x_cmd.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __RTL871X_CMD_H_#define __RTL871X_CMD_H_
drivers/staging/rtl8712/rtl871x_debug.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __RTL871X_DEBUG_H__#define __RTL871X_DEBUG_H__
drivers/staging/rtl8712/rtl871x_io.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef _IO_H_#define _IO_H_
drivers/staging/rtl8712/rtl871x_ioctl_rtl.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef _RTL871X_IOCTL_RTL_H#define _RTL871X_IOCTL_RTL_H
drivers/staging/rtl8712/rtl871x_led.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __RTL8712_LED_H#define __RTL8712_LED_H
drivers/staging/rtl8712/rtl871x_mlme.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __RTL871X_MLME_H_#define __RTL871X_MLME_H_
drivers/staging/rtl8712/rtl871x_mp.c +18 -8
@@ -1,18 +1,28 @@/****************************************************************************** -* rtl871x_mp.c * -* Description : +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. * -* Author : +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. * -* History : +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. * -* Copyright 2007, Realtek Corp. +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * -* The contents of this file is the sole property of Realtek Corp. It can not be -* be used, copied or modified without written permission from Realtek Corp. +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. * -*******************************************************************************/ +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #define _RTL871X_MP_C_#include "osdep_service.h"
drivers/staging/rtl8712/rtl871x_mp_ioctl.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef _RTL871X_MP_IOCTL_H#define _RTL871X_MP_IOCTL_H
drivers/staging/rtl8712/rtl871x_xmit.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef _RTL871X_XMIT_H_#define _RTL871X_XMIT_H_
drivers/staging/rtl8712/sta_info.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __STA_INFO_H_#define __STA_INFO_H_
drivers/staging/rtl8712/wifi.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef _WIFI_H_#define _WIFI_H_
drivers/staging/rtl8712/wlan_bssdef.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __WLAN_BSSDEF_H__#define __WLAN_BSSDEF_H__
drivers/staging/rtl8712/xmit_osdep.h +25 -0
@@ -1,3 +1,28 @@ +/****************************************************************************** +* +* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* Modifications for inclusion into the Linux staging tree are +* Copyright(c) 2010 Larry Finger. All rights reserved. +* +* Contact information: +* WLAN FAE <[email protected]> +* Larry Finger <[email protected]> +* +******************************************************************************/ #ifndef __XMIT_OSDEP_H_#define __XMIT_OSDEP_H_
Signature · 1 line
1.7.6.4
Quoted 1 line
From
c1fd55ba743332fd851d1421794e5b381175c8b5Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:05 +0800
Subject: [PATCH 02/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Renamed _netdev_priv.
To: [email protected]
Cc: [email protected],[email protected]
Renamed _netdev_priv to netdev_priv.
--- drivers/staging/rtl8712/os_intfs.c | 10 ++-- drivers/staging/rtl8712/osdep_service.h | 5 -- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 68 ++++++++++++------------ drivers/staging/rtl8712/usb_intf.c | 2 +- drivers/staging/rtl8712/xmit_linux.c | 2 +- 5 files changed, 41 insertions(+), 46 deletions(-)
drivers/staging/rtl8712/os_intfs.c +5 -5
@@ -177,7 +177,7 @@ static uint loadparam(struct _adapter *padapter, struct net_device *pnetdev)static int r871x_net_set_mac_address (struct net_device *pnetdev,void *p) { -struct _adapter *padapter = (struct _adapter *)_netdev_priv (pnetdev); +struct _adapter *padapter = (struct _adapter *)netdev_priv (pnetdev);struct sockaddr *addr = p;if (padapter->bup == false)
@@ -187,7 +187,7 @@ static int r871x_net_set_mac_address(struct net_device *pnetdev, void *p)static struct net_device_stats *r871x_net_get_stats (struct net_device *pnetdev) { -struct _adapter *padapter = (struct _adapter *)_netdev_priv (pnetdev); +struct _adapter *padapter = (struct _adapter *)netdev_priv (pnetdev);struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);struct recv_priv *precvpriv = &(padapter->recvpriv);
@@ -221,7 +221,7 @@ struct net_device *r8712_init_netdev(void)strcpy (ifname,"wlan%d" );dev_alloc_name (pnetdev, ifname); } - padapter = (struct _adapter *)_netdev_priv (pnetdev); + padapter = (struct _adapter *)netdev_priv (pnetdev); padapter->pnetdev = pnetdev;printk (KERN_INFO "r8712u: register rtl8712_netdev_ops to" " netdev_ops\n" );
@@ -383,7 +383,7 @@ static void enable_video_mode(struct _adapter *padapter, int cbw40_value)*/ static int netdev_open (struct net_device *pnetdev) { -struct _adapter *padapter = (struct _adapter *)_netdev_priv (pnetdev); +struct _adapter *padapter = (struct _adapter *)netdev_priv (pnetdev);if (padapter->bup == false) { padapter->bDriverStopped = false;
@@ -448,7 +448,7 @@ netdev_open_error:*/ static int netdev_close (struct net_device *pnetdev) { -struct _adapter *padapter = (struct _adapter *)_netdev_priv (pnetdev); +struct _adapter *padapter = (struct _adapter *)netdev_priv (pnetdev);/* Close LED*/ padapter->ledpriv.LedControlHandler (padapter,LED_CTL_POWER_OFF );
drivers/staging/rtl8712/osdep_service.h +0 -5
@@ -78,11 +78,6 @@ struct __queue {spin_lock_init (&((pqueue)->lock)); \ }while (0 ) -static inline void *_netdev_priv(struct net_device *dev) -{ -return netdev_priv (dev); -} - static inline void os_free_netdev(struct net_device *dev) {free_netdev (dev);
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +34 -34
272 lines not on this page · raw message
drivers/staging/rtl8712/usb_intf.c +1 -1
@@ -378,7 +378,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, pnetdev =r8712_init_netdev ();if (!pnetdev) goto error; - padapter = (struct _adapter *)_netdev_priv (pnetdev); + padapter = (struct _adapter *)netdev_priv (pnetdev);disable_ht_for_spec_devid (pdid, padapter); pdvobjpriv = &padapter->dvobjpriv; pdvobjpriv->padapter = padapter;
drivers/staging/rtl8712/xmit_linux.c +1 -1
@@ -146,7 +146,7 @@ void r8712_xmit_complete(struct _adapter *padapter, struct xmit_frame *pxframe)int r8712_xmit_entry (_pkt *pkt,struct net_device *pnetdev) {struct xmit_frame *pxmitframe =NULL ; -struct _adapter *padapter = (struct _adapter *)_netdev_priv (pnetdev); +struct _adapter *padapter = (struct _adapter *)netdev_priv (pnetdev);struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);int ret =0 ;
Signature · 1 line
1.7.6.4
Quoted 1 line
From
54f5d333cb434ad51d94e56b229c309cd603aaffMon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sat, 3 Sep 2011 14:14:00 -0500
Subject: [PATCH 03/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Removed os_free_netdev.
To: [email protected]
Cc: [email protected],[email protected]
Replaced (Realtek's) os_free_netdev by (linux's own) free_netdev.
--- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/osdep_service.h | 5 ----- drivers/staging/rtl8712/usb_intf.c | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-)
drivers/staging/rtl8712/os_intfs.c +1 -1
@@ -348,7 +348,7 @@ u8 r8712_free_drv_sw(struct _adapter *padapter)_r8712_free_recv_priv (&padapter->recvpriv);mp871xdeinit (padapter);if (pnetdev) -os_free_netdev (pnetdev); +free_netdev (pnetdev);return _SUCCESS; }
drivers/staging/rtl8712/osdep_service.h +0 -5
@@ -78,11 +78,6 @@ struct __queue {spin_lock_init (&((pqueue)->lock)); \ }while (0 ) -static inline void os_free_netdev(struct net_device *dev) -{ -free_netdev (dev); -} - static inline struct list_head *get_next(struct list_head *list) {return list->next;
drivers/staging/rtl8712/usb_intf.c +1 -1
@@ -599,7 +599,7 @@ error:if (padapter->dvobj_deinit !=NULL ) padapter->dvobj_deinit (padapter);if (pnetdev) -os_free_netdev (pnetdev); +free_netdev (pnetdev);return -ENODEV ; }
Signature · 1 line
1.7.6.4
Quoted 1 line
From
8efd687e5e4382c12293dc6e8469f6419d39e399Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:07 +0800
Subject: [PATCH 04/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Removed _usb_alloc_urb.
To: [email protected]
Cc: [email protected],[email protected]
Replaced (Realtek's) _usb_alloc_urb by (linux's own) usb_alloc_urb.
--- drivers/staging/rtl8712/osdep_service.h | 1 - drivers/staging/rtl8712/recv_linux.c | 2 +- drivers/staging/rtl8712/usb_ops_linux.c | 2 +- drivers/staging/rtl8712/xmit_linux.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/osdep_service.h +0 -1
@@ -58,7 +58,6 @@#include "ethernet.h" #include <linux/if_arp.h> #include <linux/firmware.h> -#define _usb_alloc_urb (x, y) usb_alloc_urb(x, y)#define _usb_submit_urb (x, y) usb_submit_urb(x, y)struct __queue {
drivers/staging/rtl8712/recv_linux.c +1 -1
@@ -51,7 +51,7 @@ int r8712_os_recvbuf_resource_alloc(struct _adapter *padapter,int res = _SUCCESS; precvbuf->irp_pending = false; - precvbuf->purb =_usb_alloc_urb (0 ,GFP_KERNEL ); + precvbuf->purb =usb_alloc_urb (0 ,GFP_KERNEL );if (precvbuf->purb ==NULL ) res = _FAIL; precvbuf->pskb =NULL ;
drivers/staging/rtl8712/usb_ops_linux.c +1 -1
@@ -48,7 +48,7 @@ struct zero_bulkout_context {uint r8712_usb_init_intf_priv (struct intf_priv *pintfpriv) { - pintfpriv->piorw_urb =_usb_alloc_urb (0 ,GFP_ATOMIC ); + pintfpriv->piorw_urb =usb_alloc_urb (0 ,GFP_ATOMIC );if (!pintfpriv->piorw_urb)return _FAIL;sema_init (&(pintfpriv->io_retevt),0 );
drivers/staging/rtl8712/xmit_linux.c +1 -1
@@ -113,7 +113,7 @@ int r8712_xmit_resource_alloc(struct _adapter *padapter,int i;for (i =0 ; i <8 ; i++) { - pxmitbuf->pxmit_urb[i] =_usb_alloc_urb (0 ,GFP_KERNEL ); + pxmitbuf->pxmit_urb[i] =usb_alloc_urb (0 ,GFP_KERNEL );if (pxmitbuf->pxmit_urb[i] ==NULL ) {printk (KERN_ERR "r8712u: pxmitbuf->pxmit_urb[i]" " == NULL" );
Signature · 1 line
1.7.6.4
Quoted 1 line
From
cd36dba91ede39db73a9fb5dc82b9b0dd7811995Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:08 +0800
Subject: [PATCH 05/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Removed _usb_submit_urb.
To: [email protected]
Cc: [email protected],[email protected]
Replaced (Realtek's) _usb_submit_urb by (linux's own) usb_submit_urb.
--- drivers/staging/rtl8712/osdep_service.h | 1 - drivers/staging/rtl8712/usb_ops_linux.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/osdep_service.h +0 -1
@@ -58,7 +58,6 @@#include "ethernet.h" #include <linux/if_arp.h> #include <linux/firmware.h> -#define _usb_submit_urb (x, y) usb_submit_urb(x, y)struct __queue {struct list_head queue;
drivers/staging/rtl8712/usb_ops_linux.c +3 -3
@@ -187,7 +187,7 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)usb_fill_bulk_urb (piorw_urb, pusbd, pipe, wmem, cnt, usb_write_mem_complete, pio_queue); - status =_usb_submit_urb (piorw_urb,GFP_ATOMIC ); + status =usb_submit_urb (piorw_urb,GFP_ATOMIC );_down_sema (&pintfpriv->io_retevt); }
@@ -305,7 +305,7 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) precvbuf->pbuf,MAX_RECVBUF_SZ , r8712_usb_read_port_complete, precvbuf); - err =_usb_submit_urb (purb,GFP_ATOMIC ); + err =usb_submit_urb (purb,GFP_ATOMIC );if ((err) && (err != (-EPERM ))) ret = _FAIL; }else
@@ -462,7 +462,7 @@ u32 r8712_usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem) pxmitframe->mem_addr, cnt, usb_write_port_complete, pxmitframe); /* context is xmit_frame */ - status =_usb_submit_urb (purb,GFP_ATOMIC ); + status =usb_submit_urb (purb,GFP_ATOMIC );if (!status) ret = _SUCCESS;else
Signature · 1 line
1.7.6.4
Quoted 1 line
From
1cdb4f423bc84ab0e5db7a273e820c469e8e482cMon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:09 +0800
Subject: [PATCH 06/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Removed unused MSECS.
To: [email protected]
Cc: [email protected],[email protected]
MSECS was never used in this driver. So removed.
--- drivers/staging/rtl8712/osdep_service.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/staging/rtl8712/osdep_service.h +0 -1
@@ -68,7 +68,6 @@ struct __queue {#define _buffer unsigned char#define thread_exit () complete_and_exit(NULL, 0)#define _workitem struct work_struct -#define MSECS (t) (HZ * ((t) / 1000) + (HZ * ((t) % 1000)) / 1000)#define _init_queue (pqueue) \ do { \
Signature · 1 line
1.7.6.4
Quoted 1 line
From
1c0d2ef68eceb8afef10d553a36cb057f73a8ed9Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:10 +0800
Subject: [PATCH 07/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Redundant NULL check.
To: [email protected]
Cc: [email protected],[email protected]
Removed the redundant NULL check in LedControl871x.
As noted by Dan Carpenter, the address of a stack variable is never NULL.
--- drivers/staging/rtl8712/rtl8712_led.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rtl8712/rtl8712_led.c +1 -1
@@ -1786,7 +1786,7 @@ void LedControl871x(struct _adapter *padapter, enum LED_CTL_MODE LedAction) {struct led_priv *ledpriv = &(padapter->ledpriv); -if (ledpriv ==NULL || ledpriv->bRegUseLed == false) +if (ledpriv->bRegUseLed == false)return ;switch (ledpriv->LedStrategy) {case SW_LED_MODE0 :
Signature · 1 line
1.7.6.4
Quoted 1 line
From
559d156c7214779a2630c8d37ef2d76c2e85bcfdMon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:11 +0800
Subject: [PATCH 08/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Updated include directives.
To: [email protected]
Cc: [email protected],[email protected]
These are the new include directives for header files.
The following were (somehow!) not explicity in Realtek's, but proved necessary:
"linux/usb.h" is needed for usb_alloc_urb();
"linux/interrupt.h" is needed for tasklet_struct. It was often a nested include.
--- drivers/staging/rtl8712/hal_init.c | 5 ++++ drivers/staging/rtl8712/osdep_service.h | 30 +++++------------------- drivers/staging/rtl8712/recv_linux.c | 4 +++ drivers/staging/rtl8712/rtl8712_cmd.c | 18 +++++++++++++++ drivers/staging/rtl8712/rtl871x_cmd.c | 18 +++++++++++++++ drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 9 +++++++ drivers/staging/rtl8712/rtl871x_security.c | 15 ++++++++++++ drivers/staging/rtl8712/usb_intf.c | 2 + drivers/staging/rtl8712/usb_ops_linux.c | 2 + drivers/staging/rtl8712/xmit_linux.c | 2 + 10 files changed, 82 insertions(+), 23 deletions(-)
drivers/staging/rtl8712/hal_init.c +5 -0
@@ -28,6 +28,11 @@#define _HAL_INIT_C_ +#include <linux/usb.h> +#include <linux/device.h> +#include <linux/usb/ch9.h> +#include <linux/firmware.h> +#include "osdep_service.h" #include "drv_types.h" #include "rtl871x_byteorder.h"
drivers/staging/rtl8712/osdep_service.h +7 -23
@@ -29,35 +29,19 @@#define _SUCCESS 1#define _FAIL 0 -#include "basic_types.h" +#include <linux/version.h> #include <linux/spinlock.h> + +#include <linux/interrupt.h> #include <linux/semaphore.h> +#include <linux/sched.h> #include <linux/sem.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <net/iw_handler.h> -#include <linux/proc_fs.h> /* Necessary because we use the proc fs */ -#include <linux/compiler.h> -#include <linux/kernel.h> -#include <linux/errno.h> -#include <linux/init.h> -#include <linux/slab.h> -#include <linux/module.h> -#include <linux/sched.h> -#include <linux/kref.h> -#include <linux/skbuff.h> -#include <linux/usb.h> -#include <linux/usb/ch9.h> -#include <linux/io.h> -#include <linux/circ_buf.h> -#include <linux/uaccess.h> -#include <asm/byteorder.h> -#include <linux/atomic.h> -#include <linux/wireless.h> -#include <linux/rtnetlink.h> -#include "ethernet.h" -#include <linux/if_arp.h> -#include <linux/firmware.h> +#include <linux/proc_fs.h> /* Necessary because we use the proc fs */ + +#include "basic_types.h" struct __queue {struct list_head queue;
drivers/staging/rtl8712/recv_linux.c +4 -0
@@ -28,11 +28,15 @@#define _RECV_OSDEP_C_ +#include <linux/usb.h> +#include "osdep_service.h" #include "drv_types.h" #include "wifi.h" #include "recv_osdep.h" #include "osdep_intf.h" +#include "ethernet.h" +#include <linux/if_arp.h> #include "usb_ops.h" /*init os related resource in struct recv_priv*/
drivers/staging/rtl8712/rtl8712_cmd.c +18 -0
@@ -28,6 +28,24 @@#define _RTL8712_CMD_C_ +#include <linux/compiler.h> +#include <linux/kernel.h> +#include <linux/errno.h> +#include <linux/init.h> +#include <linux/slab.h> +#include <linux/module.h> +#include <linux/kref.h> +#include <linux/netdevice.h> +#include <linux/skbuff.h> +#include <linux/usb.h> +#include <linux/usb/ch9.h> +#include <linux/circ_buf.h> +#include <linux/uaccess.h> +#include <asm/byteorder.h> +#include <linux/atomic.h> +#include <linux/semaphore.h> +#include <linux/rtnetlink.h> +#include "osdep_service.h" #include "drv_types.h" #include "recv_osdep.h"
drivers/staging/rtl8712/rtl871x_cmd.c +18 -0
@@ -28,6 +28,24 @@#define _RTL871X_CMD_C_ +#include <linux/compiler.h> +#include <linux/kernel.h> +#include <linux/errno.h> +#include <linux/init.h> +#include <linux/slab.h> +#include <linux/module.h> +#include <linux/kref.h> +#include <linux/netdevice.h> +#include <linux/skbuff.h> +#include <linux/usb.h> +#include <linux/usb/ch9.h> +#include <linux/circ_buf.h> +#include <linux/uaccess.h> +#include <asm/byteorder.h> +#include <linux/atomic.h> +#include <linux/semaphore.h> +#include <linux/rtnetlink.h> +#include "osdep_service.h" #include "drv_types.h" #include "recv_osdep.h"
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +9 -0
@@ -39,6 +39,15 @@#include "rtl871x_ioctl_set.h" #include "rtl871x_mp_ioctl.h" #include "mlme_osdep.h" +#include <linux/wireless.h> +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/version.h> +#include <linux/io.h> +#include <linux/semaphore.h> +#include <net/iw_handler.h> +#include <linux/if_arp.h> #define RTL_IOCTL_WPA_SUPPLICANT (SIOCIWFIRSTPRIV + 30)
drivers/staging/rtl8712/rtl871x_security.c +15 -0
@@ -28,6 +28,21 @@#define _RTL871X_SECURITY_C_ +#include <linux/compiler.h> +#include <linux/kernel.h> +#include <linux/errno.h> +#include <linux/init.h> +#include <linux/slab.h> +#include <linux/module.h> +#include <linux/kref.h> +#include <linux/netdevice.h> +#include <linux/skbuff.h> +#include <linux/circ_buf.h> +#include <linux/uaccess.h> +#include <asm/byteorder.h> +#include <linux/atomic.h> +#include <linux/semaphore.h> +#include "osdep_service.h" #include "drv_types.h" #include "wifi.h"
drivers/staging/rtl8712/usb_intf.c +2 -0
@@ -28,6 +28,8 @@#define _HCI_INTF_C_ +#include <linux/usb.h> +#include "osdep_service.h" #include "drv_types.h" #include "recv_osdep.h"
drivers/staging/rtl8712/usb_ops_linux.c +2 -0
@@ -28,6 +28,8 @@#define _HCI_OPS_OS_C_ +#include <linux/usb.h> +#include "osdep_service.h" #include "drv_types.h" #include "osdep_intf.h"
drivers/staging/rtl8712/xmit_linux.c +2 -0
@@ -28,6 +28,8 @@#define _XMIT_OSDEP_C_ +#include <linux/usb.h> +#include "osdep_service.h" #include "drv_types.h"
Signature · 1 line
1.7.6.4
Quoted 1 line
From
a89cce402b114fef758ec705d1ee3a12a9d2f27cMon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:12 +0800
Subject: [PATCH 09/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Removed redundant .mem.
To: [email protected]
Cc: [email protected],[email protected]
recv_frame.mem
mp_xmit_frame.mem
mp_xmit_packet.mem were not used, and so are now removed.
--- drivers/staging/rtl8712/rtl8712_recv.h | 1 - drivers/staging/rtl8712/rtl871x_mp.h | 1 - drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/rtl8712_recv.h +0 -1
@@ -140,7 +140,6 @@ union recv_frame {union {struct list_head list;struct recv_frame_hdr hdr; -addr_t mem[RECVFRAME_HDR_ALIGN >>2 ]; } u; };
drivers/staging/rtl8712/rtl871x_mp.h +0 -1
@@ -126,7 +126,6 @@ struct mp_xmit_frame {struct urb *pxmit_urb[8 ];u8 bpending[8 ];u8 last[8 ]; -uint mem[(MAX_MP_XMITBUF_SZ >>2 )]; };struct mp_wiparam {
drivers/staging/rtl8712/rtl871x_mp_ioctl.h +0 -1
@@ -332,7 +332,6 @@ struct rfintfs_parm {struct mp_xmit_packet {unsigned int len; -unsigned int mem[MAX_MP_XMITBUF_SZ >>2 ]; };struct psmode_param {
Signature · 1 line
1.7.6.4
Quoted 1 line
From
a93ee13a642f0ff03c99926bb798560dd6a38ea9Mon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Sun, 4 Sep 2011 03:14:23 +0800
Subject: [PATCH 10/20] staging: r8712u: Tracking kmemleak false positives.
To: [email protected]
Cc: [email protected],[email protected]
The frame buffers allocated in _r8712_init_recv_priv() are not tracked by kmemleak, but they are freed when the driver is unloaded. To help find any real leaks, these false positives are annotated for kmemleak.
--- drivers/staging/rtl8712/rtl871x_recv.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/staging/rtl8712/rtl871x_recv.c +4 -0
@@ -28,6 +28,9 @@#define _RTL871X_RECV_C_ +#include <linux/slab.h> +#include <linux/kmemleak.h> +#include "osdep_service.h" #include "drv_types.h" #include "recv_osdep.h"
@@ -73,6 +76,7 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv, RXFRAME_ALIGN_SZ);if (precvpriv->pallocated_frame_buf ==NULL )return _FAIL; +kmemleak_not_leak (precvpriv->pallocated_frame_buf);memset (precvpriv->pallocated_frame_buf,0 ,NR_RECVFRAME *sizeof (union recv_frame ) +RXFRAME_ALIGN_SZ ); precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf +
Signature · 1 line
1.7.6.4
Quoted 1 line
From
c5ff4182e4fa9a0d82542a0960f7860088887471Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:13 +0800
Subject: [PATCH 11/20] staging: r8712u: Merging Realtek's latest (v2.6.6). No
power tracking OID.
To: [email protected]
Cc: [email protected],[email protected]
The call to oid_rt_pro_set_power_tracking_hdl() is no longer available. The function's definition remains, though it is currently unused.
--- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl871x_mp_ioctl.h +1 -2
@@ -434,8 +434,7 @@ static struct mp_ioctl_handler mp_ioctl_hdl[] = { {sizeof(struct psmode_param), NULL, 0},/*13*/ {sizeof(struct eeprom_rw_param), NULL, 0},/*14*/ {sizeof(struct eeprom_rw_param), NULL, 0},/*15*/ - {sizeof(u8), oid_rt_pro_set_power_tracking_hdl, - OID_RT_PRO_SET_POWER_TRACKING},/*16*/ + {sizeof(unsigned char), NULL, 0},/*16*/ {sizeof(u32), NULL, 0},/*17*/ {sizeof(u32), oid_rt_pro_set_continuous_tx_hdl, OID_RT_PRO_SET_CONTINUOUS_TX},/*18*/
Signature · 1 line
1.7.6.4
Quoted 1 line
From
319fad2d5e3782f7b97c88cec25f296bb32fa5c0Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:14 +0800
Subject: [PATCH 12/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
stop_drv_timers moved.
To: [email protected]
Cc: [email protected],[email protected]
stop_drv_timers() is now done in r871xu_dev_remove(), not netdev_close().
--- drivers/staging/rtl8712/os_intfs.c | 4 +--- drivers/staging/rtl8712/usb_intf.c | 2 ++ drivers/staging/rtl8712/usb_osintf.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/os_intfs.c +1 -3
@@ -261,7 +261,7 @@ static void start_drv_timers(struct _adapter *padapter)_set_timer (&padapter->mlmepriv.wdg_timer,2000 ); } -static void stop_drv_timers(struct _adapter *padapter) +void r8712_stop_drv_timers(struct _adapter *padapter) { _cancel_timer_ex(&padapter->mlmepriv.assoc_timer); _cancel_timer_ex(&padapter->mlmepriv.sitesurveyctrl.
@@ -468,8 +468,6 @@ static int netdev_close(struct net_device *pnetdev)r8712_free_assoc_resources (padapter);/*s2-4.*/ r8712_free_network_queue (padapter); -/*Stop driver mlme relation timer*/ -stop_drv_timers (padapter);/* The interface is no longer Up: */ padapter->bup = false;return 0 ;
drivers/staging/rtl8712/usb_intf.c +2 -0
@@ -622,6 +622,8 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf) }flush_scheduled_work ();udelay (1 ); +/*Stop driver mlme relation timer */ +r8712_stop_drv_timers (padapter);r871x_dev_unload (padapter);r8712_free_drv_sw (padapter); }
drivers/staging/rtl8712/usb_osintf.h +1 -0
@@ -42,6 +42,7 @@ uint rtl8712_hal_deinit(struct _adapter *padapter);void rtl871x_intf_stop (struct _adapter *padapter);void r871x_dev_unload (struct _adapter *padapter);void r8712_stop_drv_threads (struct _adapter *padapter); +void r8712_stop_drv_timers (struct _adapter *padapter);u8 r8712_init_drv_sw (struct _adapter *padapter);u8 r8712_free_drv_sw (struct _adapter *padapter);struct net_device *r8712_init_netdev (void );
Signature · 1 line
1.7.6.4
Quoted 1 line
From
99f832092dafb731742357e83918358fd23fb8d5Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:15 +0800
Subject: [PATCH 13/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Use stack, not malloc.
To: [email protected]
Cc: [email protected],[email protected]
translate_scan() now uses the stack for some variables, instead of mallocing.
--- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +3 -8
@@ -169,10 +169,6 @@ static inline char *translate_scan(struct _adapter *padapter,struct iw_event iwe;struct ieee80211_ht_cap *pht_capie;char *current_val; -u8 *buf = (u8 *)_malloc (pnetwork->network.IELength *2 ); -u8 *wpa_ie = (u8 *)_malloc (255 ); -u8 *rsn_ie = (u8 *)_malloc (255 ); -u8 *wps_ie = (u8 *)_malloc (MAX_WPS_IE_LEN );s8 *p;u32 i =0 , ht_ielen =0 ;u16 cap, ht_cap = false, mcs_rate;
@@ -289,6 +285,8 @@ static inline char *translate_scan(struct _adapter *padapter, start = current_val;/* parsing WPA/WPA2 IE */ { +u8 buf[MAX_WPA_IE_LEN ]; +u8 wpa_ie[255 ], rsn_ie[255 ];u16 wpa_len =0 , rsn_len =0 ;int n;sint out_len =0 ;
@@ -339,6 +337,7 @@ static inline char *translate_scan(struct _adapter *padapter, } {/* parsing WPS IE */ +u8 wps_ie[512 ];uint wps_ielen; if (r8712_get_wps_ie(pnetwork->network.IEs,
@@ -363,10 +362,6 @@ static inline char *translate_scan(struct _adapter *padapter, iwe.u.qual.noise =0 ;/* noise level */ start =iwe_stream_add_event (info, start, stop, &iwe,IW_EV_QUAL_LEN );/* how to translate rssi to ?% */ -kfree (buf); -kfree (wpa_ie); -kfree (rsn_ie); -kfree (wps_ie);return start; }
Signature · 1 line
1.7.6.4
Quoted 1 line
From
ddf302586efd871e1aed91e097825d13d8e1b211Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:16 +0800
Subject: [PATCH 14/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Tx-code refactoring.
To: [email protected]
Cc: [email protected],[email protected]
Refactor the TX code to prepare for aggregation.
--- drivers/staging/rtl8712/rtl8712_xmit.c | 48 ++++++++++++++++---------------- drivers/staging/rtl8712/rtl871x_xmit.c | 17 +++++++++-- drivers/staging/rtl8712/rtl871x_xmit.h | 5 +++ 3 files changed, 43 insertions(+), 27 deletions(-)
drivers/staging/rtl8712/rtl8712_xmit.c +24 -24
55 lines not on this page · raw message
drivers/staging/rtl8712/rtl871x_xmit.c +14 -3
@@ -1011,6 +1011,19 @@ static void init_hwxmits(struct hw_xmit *phwxmit, sint entry) } } +void xmitframe_xmitbuf_attach (struct xmit_frame *pxmitframe, +struct xmit_buf *pxmitbuf) +{ +/* pxmitbuf attach to pxmitframe */ + pxmitframe->pxmitbuf = pxmitbuf; +/* urb and irp connection */ + pxmitframe->pxmit_urb[0 ] = pxmitbuf->pxmit_urb[0 ]; +/* buffer addr assoc */ + pxmitframe->buf_addr = pxmitbuf->pbuf; +/* pxmitframe attach to pxmitbuf */ + pxmitbuf->priv_data = pxmitframe; +} +/* * tx_action == 0 == no frames to transmit * tx_action > 0 ==> we have frames to transmit
@@ -1042,9 +1055,7 @@ int r8712_pre_xmit(struct _adapter *padapter, struct xmit_frame *pxmitframe) }else {/*dump packet directly*/ spin_unlock_irqrestore (&pxmitpriv->lock, irqL); ret = true; - pxmitframe->pxmitbuf = pxmitbuf; - pxmitframe->pxmit_urb[0 ] = pxmitbuf->pxmit_urb[0 ]; - pxmitframe->buf_addr = pxmitbuf->pbuf; +xmitframe_xmitbuf_attach (pxmitframe, pxmitbuf);r8712_xmit_direct (padapter, pxmitframe); }return ret;
drivers/staging/rtl8712/rtl871x_xmit.h +5 -0
@@ -135,7 +135,9 @@ struct xmit_buf {u8 *pallocated_buf;u8 *pbuf; +void *priv_data;struct urb *pxmit_urb[8 ]; +u32 aggr_nr; };struct xmit_frame {
@@ -280,6 +282,9 @@ int r8712_xmit_enqueue(struct _adapter *padapter,int r8712_xmit_direct (struct _adapter *padapter,struct xmit_frame *pxmitframe);void r8712_xmit_bh (void *priv); +void xmitframe_xmitbuf_attach (struct xmit_frame *pxmitframe, +struct xmit_buf *pxmitbuf); +#include "rtl8712_xmit.h" #endif /*_RTL871X_XMIT_H_*/
Signature · 1 line
1.7.6.4
Quoted 1 line
From
df217160d2ce7ea74d9707dddd48ce84831aaac5Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:17 +0800
Subject: [PATCH 15/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Rework efuse data handling.
To: [email protected]
Cc: [email protected],[email protected]
Rework efuse data handling.
--- drivers/staging/rtl8712/rtl8712_efuse.c | 75 +++++++++++++++++-------------- 1 files changed, 41 insertions(+), 34 deletions(-)
drivers/staging/rtl8712/rtl8712_efuse.c +41 -34
88 lines not on this page · raw message
Signature · 1 line
1.7.6.4
Quoted 1 line
From
4048212b282b176eb5550e87c8ea326ede61b80fMon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:18 +0800
Subject: [PATCH 16/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
tx: NULL _in_ spin lock.
To: [email protected]
Cc: [email protected],[email protected]
In transmit path, r8712_free_xmitframe(), the pkt pointer is now NULLed _within_ the spin lock.
--- drivers/staging/rtl8712/drv_types.h | 3 +++ drivers/staging/rtl8712/rtl871x_xmit.c | 14 +++++++++----- drivers/staging/rtl8712/xmit_linux.c | 21 ++++++++++++++++++++- drivers/staging/rtl8712/xmit_osdep.h | 1 + 4 files changed, 33 insertions(+), 6 deletions(-)
drivers/staging/rtl8712/drv_types.h +3 -0
@@ -181,6 +181,9 @@ struct _adapter {struct net_device_stats stats;struct iw_statistics iwstats;int pid;/*process id from UI*/ +_workitem wkFilterRxFF0; +u8 blnEnableRxFF0Filter; +spinlock_t lockRxFF0Filter; };static inline u8 *myid (struct eeprom_priv *peepriv)
drivers/staging/rtl8712/rtl871x_xmit.c +9 -5
@@ -152,11 +152,12 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv, pxmitbuf++; } pxmitpriv->free_xmitbuf_cnt =NR_XMITBUFF ; +_init_workitem (&padapter->wkFilterRxFF0, r8712_SetFilter, padapter);alloc_hwxmits (padapter);init_hwxmits (pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);tasklet_init (&pxmitpriv->xmit_tasklet, - (void (*)(addr_t ))r8712_xmit_bh, - (addr_t )padapter); + (void (*)(unsigned long ))r8712_xmit_bh, + (unsigned long )padapter);return _SUCCESS; }
@@ -612,7 +613,7 @@ sint r8712_xmitframe_coalesce(struct _adapter *padapter, _pkt *pkt,if (make_wlanhdr (padapter, mem_start, pattrib) == _FAIL)return _FAIL;_r8712_open_pktfile (pkt, &pktfile); -_r8712_pktfile_read (&pktfile,NULL , pattrib->pkt_hdrlen); +_r8712_pktfile_read (&pktfile,NULL , (uint ) pattrib->pkt_hdrlen);if (check_fwstate (pmlmepriv,WIFI_MP_STATE ) == true) {/* truncate TXDESC_SIZE bytes txcmd if at mp mode for 871x */ if (pattrib->ether_type ==0x8712 ) {
@@ -826,13 +827,16 @@ void r8712_free_xmitframe(struct xmit_priv *pxmitpriv,unsigned long irqL;struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;struct _adapter *padapter = pxmitpriv->adapter; +struct sk_buff *pndis_pkt =NULL ;if (pxmitframe ==NULL )return ; -if (pxmitframe->pkt) -r8712_xmit_complete (padapter, pxmitframe);spin_lock_irqsave (&pfree_xmit_queue->lock, irqL);list_delete (&pxmitframe->list); +if (pxmitframe->pkt) { + pndis_pkt = pxmitframe->pkt; + pxmitframe->pkt =NULL ; + }list_insert_tail (&pxmitframe->list,get_list_head (pfree_xmit_queue)); pxmitpriv->free_xmitframe_cnt++;spin_unlock_irqrestore (&pfree_xmit_queue->lock, irqL);
drivers/staging/rtl8712/xmit_linux.c +20 -1
@@ -44,7 +44,6 @@static uint remainder_len (struct pkt_file *pfile) { -/* Kovich: Need to extend the buf_len to 64 bit ?(unsigned long long) */ return (uint)(pfile->buf_len - ((addr_t)(pfile->cur_addr) - (addr_t)(pfile->buf_start))); }
@@ -109,6 +108,26 @@ void r8712_set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib) pattrib->subtype =WIFI_QOS_DATA_TYPE ; } +void r8712_SetFilter (struct work_struct *work) +{ + struct _adapter *padapter = container_of(work, struct _adapter, + wkFilterRxFF0); +u8 oldvalue =0x00 , newvalue =0x00 ; +unsigned long irqL; + + oldvalue =r8712_read8 (padapter,0x117 ); + newvalue = oldvalue &0xfe ; +r8712_write8 (padapter,0x117 , newvalue); + +spin_lock_irqsave (&padapter->lockRxFF0Filter, irqL); + padapter->blnEnableRxFF0Filter =1 ; +spin_unlock_irqrestore (&padapter->lockRxFF0Filter, irqL); +do { +msleep (100 ); + }while (padapter->blnEnableRxFF0Filter ==1 ); +r8712_write8 (padapter,0x117 , oldvalue); +} +int r8712_xmit_resource_alloc (struct _adapter *padapter,struct xmit_buf *pxmitbuf) {
drivers/staging/rtl8712/xmit_osdep.h +1 -0
@@ -47,6 +47,7 @@ struct xmit_frame;struct xmit_buf ;int r8712_xmit_entry (_pkt *pkt,struct net_device *pnetdev); +void r8712_SetFilter (struct work_struct *work);int r8712_xmit_resource_alloc (struct _adapter *padapter,struct xmit_buf *pxmitbuf); void r8712_xmit_resource_free(struct _adapter *padapter,
Signature · 1 line
1.7.6.4
Quoted 1 line
From
7bf584c5546a30c062d7b0c8519cd13f6206b4b0Mon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:19 +0800
Subject: [PATCH 17/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
New decl's and defines.
To: [email protected]
Cc: [email protected],[email protected]
Removed unnecessary casts in kfree calls.
A few new types, defines and prototypes.
--- drivers/staging/rtl8712/rtl8712_cmd.h | 62 +++++++++++++++++++++++++++++++++ drivers/staging/rtl8712/rtl871x_cmd.c | 13 ++++++- drivers/staging/rtl8712/rtl871x_cmd.h | 4 ++ 3 files changed, 77 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl8712_cmd.h +62 -0
83 lines not on this page · raw message
drivers/staging/rtl8712/rtl871x_cmd.c +11 -2
@@ -371,8 +371,17 @@ u8 r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval)void r8712_getbbrfreg_cmdrsp_callback (struct _adapter *padapter,struct cmd_obj *pcmd) { -kfree ((unsigned char *) pcmd->parmbuf); -kfree ((unsigned char *) pcmd); +kfree (pcmd->parmbuf); +kfree (pcmd); + padapter->mppriv.workparam.bcompleted = true; +} + +void r8712_readtssi_cmdrsp_callback (struct _adapter *padapter, +struct cmd_obj *pcmd) +{ +kfree (pcmd->parmbuf); +kfree (pcmd); + padapter->mppriv.workparam.bcompleted = true; }
drivers/staging/rtl8712/rtl871x_cmd.h +4 -0
@@ -728,10 +728,14 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd);void r8712_getbbrfreg_cmdrsp_callback (struct _adapter *padapter,struct cmd_obj *pcmd); +void r8712_readtssi_cmdrsp_callback (struct _adapter *padapter, +struct cmd_obj *pcmd);void r8712_setstaKey_cmdrsp_callback (struct _adapter *padapter,struct cmd_obj *pcmd);void r8712_setassocsta_cmdrsp_callback (struct _adapter *padapter,struct cmd_obj *pcmd); +u8 r8712_disconnectCtrlEx_cmd (struct _adapter *adapter,u32 enableDrvCtrl, +u32 tryPktCnt,u32 tryPktInterval,u32 firstStageTO);struct _cmd_callback {u32 cmd_code;
Signature · 1 line
1.7.6.4
Quoted 1 line
From
98ebdc5431e4979a07d55cb670a3a4ccc2f6750dMon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:20 +0800
Subject: [PATCH 18/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Various fixes.
To: [email protected]
Cc: [email protected],[email protected]
passive_mode added to private ioctls.
New private ioctls added for RSSI, link speed, mac address, scan type, and DCE-D.
In r8711_wx_get_scan(), we now sleep only 100 times, instead of 1000. In r8711_wx_set_essid(), added a check for Ad-Hoc state.
In r8711_wx_get_rate(), added a check for RTL8712_RF_2T2R RF type. Added Set chplan.
In r871x_get_wireless_stats(), updated the mechanism for displaying link quality.
Added SetDIG and SetRA commands.r8712_joinbss_cmd() no longer checks for Ad-Hoc mode.
--- drivers/staging/rtl8712/rtl871x_cmd.c | 111 +++++++++++++++++-- drivers/staging/rtl8712/rtl871x_cmd.h | 48 ++++++++- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 144 +++++++++++++++++++++++- drivers/staging/rtl8712/rtl871x_mlme.h | 3 +- 4 files changed, 283 insertions(+), 23 deletions(-)
drivers/staging/rtl8712/rtl871x_cmd.c +99 -12
140 lines not on this page · raw message
drivers/staging/rtl8712/rtl871x_cmd.h +45 -3
79 lines not on this page · raw message
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +138 -6
220 lines not on this page · raw message
drivers/staging/rtl8712/rtl871x_mlme.h +1 -2
@@ -95,6 +95,7 @@ struct mlme_priv {struct __queue scanned_queue;u8 *free_bss_buf;unsigned long num_of_scanned; +u8 passive_mode;/*add for Android's SCAN-ACTIVE/SCAN-PASSIVE */ struct ndis_802_11_ssid assoc_ssid;u8 assoc_bssid[6 ];struct wlan_network cur_network;
@@ -226,8 +227,6 @@ void r8712_joinbss_reset(struct _adapter *padapter);unsigned int r8712_restructure_ht_ie (struct _adapter *padapter,u8 *in_ie,u8 *out_ie,uint in_len,uint *pout_len);void r8712_issue_addbareq_cmd (struct _adapter *padapter,int priority); -unsigned int r8712_add_ht_addt_info (struct _adapter *padapter,u8 *in_ie, -u8 *out_ie,uint in_len,uint *pout_len);int r8712_is_same_ibss (struct _adapter *adapter,struct wlan_network *pnetwork);#endif /*__RTL871X_MLME_H_*/
Signature · 1 line
1.7.6.4
Quoted 1 line
From
f090d930761cb30174aa2386c6216e0c340ae23dMon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:21 +0800
Subject: [PATCH 19/20] staging: r8712u: Merging Realtek's latest (v2.6.6).
Various fixes.
To: [email protected]
Cc: [email protected],[email protected]
In r8712_generate_ie(), HT check is no longer done. Removed r8712_add_ht_addt_info().
Changes to defragmentation handling, and queue selection. Get TSSI command.
Added an Ad-Hoc check to is_desired_network() r8712_ind_disconnect() now checks for Linked state. r8712_xmit_bh() now schedules an xmit tasklet.
--- drivers/staging/rtl8712/ieee80211.c | 35 +------------------ drivers/staging/rtl8712/ieee80211.h | 6 +-- drivers/staging/rtl8712/os_intfs.c | 3 ++ drivers/staging/rtl8712/rtl8712_recv.c | 24 +++++++------ drivers/staging/rtl8712/rtl8712_recv.h | 5 +++ drivers/staging/rtl8712/rtl8712_xmit.c | 20 ++++++++-- drivers/staging/rtl8712/rtl8712_xmit.h | 5 +++ drivers/staging/rtl8712/rtl871x_cmd.c | 30 +++++++++++++++- drivers/staging/rtl8712/rtl871x_mlme.c | 58 ++++++++---------------------- drivers/staging/rtl8712/rtl871x_xmit.h | 7 +++- drivers/staging/rtl8712/sta_info.h | 4 +- drivers/staging/rtl8712/usb_intf.c | 12 ++++-- drivers/staging/rtl8712/usb_ops_linux.c | 19 +++++----- 13 files changed, 114 insertions(+), 114 deletions(-)
drivers/staging/rtl8712/ieee80211.c +1 -34
@@ -170,17 +170,11 @@ static uint r8712_get_rateset_len(u8 *rateset)return i; } -int r8712_generate_ie (struct registry_priv *pregistrypriv, -struct _adapter *padapter) +int r8712_generate_ie (struct registry_priv *pregistrypriv) {int sz =0 , rateLen;struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network;u8 *ie = pdev_network->IEs; -struct ieee80211_ht_cap ht_capie; -struct ieee80211_ht_addt_info ht_addt_info; -unsigned char WMM_IE [] = {0x00 ,0x50 ,0xf2 ,0x02 ,0x00 ,0x01 ,0x00 }; -struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -struct qos_priv *pqospriv = &pmlmepriv->qospriv;/*timestamp will be inserted by hardware*/ sz +=8 ;
@@ -219,33 +213,6 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv,/*IBSS Parameter Set*/ ie =r8712_set_ie (ie, _IBSS_PARA_IE_,2 , (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz); -if (pregistrypriv->ht_enable ==1 ) { -if (pqospriv->qos_option ==0 ) { - ie =r8712_set_ie (ie, _VENDOR_SPECIFIC_IE_, - _WMM_IE_Length_,WMM_IE , &sz); - pqospriv->qos_option =1 ; - } -memset (&ht_capie,0 ,sizeof (struct ieee80211_ht_cap )); - ht_capie.cap_info =IEEE80211_HT_CAP_SUP_WIDTH | -IEEE80211_HT_CAP_SGI_20 | -IEEE80211_HT_CAP_SGI_40 | -IEEE80211_HT_CAP_TX_STBC | -IEEE80211_HT_CAP_MAX_AMSDU | -IEEE80211_HT_CAP_DSSSCCK40 ; - ht_capie.ampdu_params_info = (IEEE80211_HT_CAP_AMPDU_FACTOR & -0x03 ) | (IEEE80211_HT_CAP_AMPDU_DENSITY &0x00 ); - ie =r8712_set_ie (ie, _HT_CAPABILITY_IE_, -sizeof (struct ieee80211_ht_cap ), - (unsigned char *)&ht_capie, &sz); -/*add HT info ie*/ -memset (&ht_addt_info,0 , -sizeof (struct ieee80211_ht_addt_info )); -/*need to add the HT additional IEs*/ - ht_addt_info.control_chan = pregistrypriv->channel; - ie =r8712_set_ie (ie, _HT_ADD_INFO_IE_, -sizeof (struct ieee80211_ht_addt_info ), - (unsigned char *)&ht_addt_info, &sz); - }return sz; }
drivers/staging/rtl8712/ieee80211.h +2 -4
@@ -137,7 +137,7 @@ struct ieee_ibss_seq {u8 mac[ETH_ALEN ];u16 seq_num;u16 frag_num; -unsigned int packet_time; +unsigned long packet_time;struct list_head list; };
@@ -669,7 +669,6 @@ struct ieee80211_txb {#define CRC_LENGTH 4U#define MAX_WPA_IE_LEN 128 -#define MAX_WPS_IE_LEN 512#define NETWORK_EMPTY_ESSID (1<<0)#define NETWORK_HAS_OFDM (1<<1)
@@ -789,8 +788,7 @@ int r8712_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,int r8712_get_sec_ie (u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len);int r8712_get_wps_ie (u8 *in_ie,uint in_len,u8 *wps_ie,uint *wps_ielen); -int r8712_generate_ie (struct registry_priv *pregistrypriv, -struct _adapter *padapter); +int r8712_generate_ie (struct registry_priv *pregistrypriv);uint r8712_is_cckrates_included (u8 *rate);uint r8712_is_cckratesonly_included (u8 *rate);
drivers/staging/rtl8712/os_intfs.c +3 -0
@@ -286,6 +286,9 @@ static u8 init_default_value(struct _adapter *padapter) pxmitpriv->vcs_type = pregistrypriv->vcs_type; pxmitpriv->rts_thresh = pregistrypriv->rts_thresh; pxmitpriv->frag_len = pregistrypriv->frag_thresh; +/* mlme_priv */ +/* Maybe someday we should rename this variable to "active_mode"(Jeff)*/ + pmlmepriv->passive_mode =1 ;/* 1: active, 0: passive. */ /*ht_priv*/ {int i;
drivers/staging/rtl8712/rtl8712_recv.c +13 -11
@@ -192,7 +192,7 @@ static void update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib, }else pattrib->tcpchk_valid =0 ;/* invalid */ pattrib->mcs_rate = (u8)((le32_to_cpu (prxstat->rxdw3)) &0x3f ); - pattrib->htc = (u8)((le32_to_cpu (prxstat->rxdw3) >>6 ) &0x1 ); + pattrib->htc = (u8)((le32_to_cpu (prxstat->rxdw3) >>14 ) &0x1 );/*Offset 16*/ /*Offset 20*/ /*phy_info*/
@@ -207,7 +207,7 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, struct __queue *defrag_q) {struct list_head *plist, *phead; -u8 wlanhdr_offset; +u8 *data, wlanhdr_offset;u8 curfragnum;struct recv_frame_hdr *pfhdr, *pnfhdr;union recv_frame *prframe, *pnextrframe;
@@ -224,22 +224,25 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter,/*the first fragment number must be 0 *free the whole queue*/ r8712_free_recvframe (prframe, pfree_recv_queue); - prframe =NULL ; - goto exit; +r8712_free_recvframe_queue (defrag_q, pfree_recv_queue); +return NULL ; } - plist =get_next (phead); + curfragnum++; + plist =get_list_head (defrag_q); + plist =get_next (plist); + data =get_recvframe_data (prframe);while (end_of_queue_search (phead, plist) == false) { pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u); -/*check the fragment sequence (2nd ~n fragment frame) */ pnfhdr = &pnextrframe->u.hdr; - curfragnum++; +/*check the fragment sequence (2nd ~n fragment frame) */ if (curfragnum != pnfhdr->attrib.frag_num) {/* the fragment number must increase (after decache) * release the defrag_q & prframe */ r8712_free_recvframe (prframe, pfree_recv_queue); - prframe =NULL ; - goto exit; +r8712_free_recvframe_queue (defrag_q, pfree_recv_queue); +return NULL ; } + curfragnum++;/* copy the 2nd~n fragment frame's payload to the first fragment * get the 2nd~last fragment frame's payload */ wlanhdr_offset = pnfhdr->attrib.hdrlen + pnfhdr->attrib.iv_len;
@@ -252,7 +255,6 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len; plist =get_next (plist); } -exit:/* free the defrag_q queue and return the prframe */ r8712_free_recvframe_queue (defrag_q, pfree_recv_queue);return prframe;
@@ -1074,7 +1076,7 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb)/* for first fragment packet, driver need allocate 1536 + * drvinfo_sz + RXDESC_SIZE to defrag packet. */ if ((mf ==1 ) && (frag ==0 )) - alloc_sz =1658 ; + alloc_sz =1658 ;/*1658+6=1664, 1664 is 128 alignment.*/ else alloc_sz = tmp_len;/* 2 is for IP header 4 bytes alignment in QoS packet case.
drivers/staging/rtl8712/rtl8712_recv.h +5 -0
@@ -29,7 +29,12 @@#include "osdep_service.h" #include "drv_types.h" +/* Realtek's v2.6.6 reduced this to 4. However, under heavy network and CPU +* loads, even 8 receive buffers might not be enough; cutting it to 4 seemed +* unwise. +*/ #define NR_RECVBUFF (8) +#define NR_PREALLOC_RECV_SKB (8)#define RXDESC_SIZE 24#define RXDESC_OFFSET RXDESC_SIZE
drivers/staging/rtl8712/rtl8712_xmit.c +16 -4
@@ -37,6 +37,7 @@static void dump_xframe (struct _adapter *padapter,struct xmit_frame *pxmitframe); +static void update_txdesc (struct xmit_frame *pxmitframe,uint *pmem,int sz);sint _r8712_init_hw_txqueue (struct hw_txqueue *phw_txqueue,u8 ac_tag) {
@@ -238,13 +239,24 @@ exit_dequeue_xframe_ex:void r8712_do_queue_select (struct _adapter *padapter,struct pkt_attrib *pattrib) { -u8 qsel =0 ; +unsigned int qsel =0 ;struct dvobj_priv *pdvobj = (struct dvobj_priv *)&padapter->dvobjpriv;if (pdvobj->nr_endpoint ==6 ) - qsel = pattrib->priority; -else if (pdvobj->nr_endpoint ==4 ) - qsel = pattrib->priority; + qsel = (unsigned int ) pattrib->priority; +else if (pdvobj->nr_endpoint ==4 ) { + qsel = (unsigned int ) pattrib->priority; +if (qsel ==0 || qsel ==3 ) + qsel =3 ; +else if (qsel ==1 || qsel ==2 ) + qsel =1 ; +else if (qsel ==4 || qsel ==5 ) + qsel =5 ; +else if (qsel ==6 || qsel ==7 ) + qsel =7 ; +else + qsel =3 ; + } pattrib->qsel = qsel; }
drivers/staging/rtl8712/rtl8712_xmit.h +5 -0
@@ -64,6 +64,8 @@#define OWN BIT(31)#define FSG BIT(27)#define LSG BIT(26) +#define TYPE_SHT (24) +#define TYPE_MSK (0x03000000)/*OFFSET 4*/ #define PKT_OFFSET_SZ (0)
@@ -74,6 +76,7 @@#define BMC BIT(7)#define BK BIT(30)#define AGG_EN BIT(29) +#define RTS_RC_SHT (16)/*OFFSET 12*/ #define SEQ_SHT (16)
@@ -83,6 +86,8 @@/*OFFSET 20*/ #define DISFB BIT(15) +#define RSVD6_MSK (0x00E00000) +#define RSVD6_SHT (21)struct tx_desc {/*DWORD 0*/
drivers/staging/rtl8712/rtl871x_cmd.c +29 -1
@@ -240,7 +240,7 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,init_h2fwcmd_w_parm_no_rsp (ph2c, psurveyPara,GEN_CMD_CODE (_SiteSurvey)); psurveyPara->bsslimit =cpu_to_le32 (48 ); - psurveyPara->passive_mode =cpu_to_le32 (1 ); + psurveyPara->passive_mode =cpu_to_le32 (pmlmepriv->passive_mode); psurveyPara->ss_ssidlen =0 ;memset (psurveyPara->ss_ssid,0 ,IW_ESSID_MAX_SIZE +1 );if ((pssid !=NULL ) && (pssid->SsidLength)) {
@@ -251,6 +251,7 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,r8712_enqueue_cmd (pcmdpriv, ph2c);_set_timer (&pmlmepriv->scan_to_timer,SCANNING_TIMEOUT ); padapter->ledpriv.LedControlHandler (padapter,LED_CTL_SITE_SURVEY ); + padapter->blnEnableRxFF0Filter =0 ;return _SUCCESS; }
@@ -760,6 +761,33 @@ u8 r8712_setrttbl_cmd(struct _adapter *padapter,return _SUCCESS; } +u8 r8712_gettssi_cmd (struct _adapter *padapter,u8 offset,u8 *pval) +{ +struct cmd_priv *pcmdpriv = &padapter->cmdpriv; +struct cmd_obj *ph2c; +struct readTSSI_parm *prdtssiparm; + + ph2c = (struct cmd_obj *)_malloc (sizeof (struct cmd_obj )); +if (ph2c ==NULL ) +return _FAIL; + prdtssiparm = (struct readTSSI_parm *) +_malloc (sizeof (struct readTSSI_parm )); +if (prdtssiparm ==NULL ) { +kfree ((unsigned char *) ph2c); +return _FAIL; + } +_init_listhead (&ph2c->list); + ph2c->cmdcode =GEN_CMD_CODE (_ReadTSSI); + ph2c->parmbuf = (unsigned char *)prdtssiparm; + ph2c->cmdsz =sizeof (struct readTSSI_parm ); + ph2c->rsp = pval; + ph2c->rspsz =sizeof (struct readTSSI_rsp ); + + prdtssiparm->offset = offset; +r8712_enqueue_cmd (pcmdpriv, ph2c); +return _SUCCESS; +} +u8 r8712_setMacAddr_cmd (struct _adapter *padapter,u8 *mac_addr) {struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
drivers/staging/rtl8712/rtl871x_mlme.c +16 -42
92 lines not on this page · raw message
drivers/staging/rtl8712/rtl871x_xmit.h +5 -2
@@ -93,9 +93,9 @@ struct pkt_attrib {u16 seqnum;u16 ether_type; -u32 pktlen;/* the original 802.3 pkt raw_data len +u16 pktlen;/* the original 802.3 pkt raw_data len * (not include ether_hdr data) */ -u32 last_txcmdsz; +u16 last_txcmdsz;u8 pkt_hdrlen;/*the original 802.3 pkt header len*/ u8 hdrlen;/*the WLAN Header Len*/
@@ -225,6 +225,9 @@ struct xmit_priv {struct semaphore tx_retevt;/*all tx return event;*/ u8 txirp_cnt;struct tasklet_struct xmit_tasklet; +_workitem xmit_pipe4_reset_wi; +_workitem xmit_pipe6_reset_wi; +_workitem xmit_piped_reset_wi;/*per AC pending irp*/ int beq_cnt;int bkq_cnt;
drivers/staging/rtl8712/sta_info.h +2 -2
@@ -63,8 +63,8 @@ struct sta_info {struct sta_recv_priv sta_recvpriv;uint state;uint aid; -u8 mac_id; -u8 qos_option; +uint mac_id; +uint qos_option;u8 hwaddr[ETH_ALEN ];uint ieee8021x_blocked;/*0: allowed, 1:blocked */ uint XPrivacy;/*aes, tkip...*/
drivers/staging/rtl8712/usb_intf.c +8 -4
@@ -368,23 +368,25 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,struct _adapter *padapter =NULL ;struct dvobj_priv *pdvobjpriv;struct net_device *pnetdev; +struct usb_device *udev;printk (KERN_INFO "r8712u: DriverVersion: %s\n" ,DRVER );/* In this probe function, O.S. will provide the usb interface pointer * to driver. We have to increase the reference count of the usb device * structure by using the usb_get_dev function. */ -usb_get_dev (interface_to_usbdev (pusb_intf)); + udev =interface_to_usbdev (pusb_intf); +usb_get_dev (udev); pintf = pusb_intf;/* step 1. */ pnetdev =r8712_init_netdev ();if (!pnetdev) goto error; - padapter = (struct _adapter *)netdev_priv (pnetdev); + padapter =netdev_priv (pnetdev);disable_ht_for_spec_devid (pdid, padapter); pdvobjpriv = &padapter->dvobjpriv; pdvobjpriv->padapter = padapter; - padapter->dvobjpriv.pusbdev =interface_to_usbdev (pusb_intf); + padapter->dvobjpriv.pusbdev = udev;usb_set_intfdata (pusb_intf, pnetdev);SET_NETDEV_DEV (pnetdev, &pusb_intf->dev);/* step 2. */
@@ -594,9 +596,10 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,/* step 6. Tell the network stack we exist */ if (register_netdev (pnetdev) !=0 ) goto error; +spin_lock_init (&padapter->lockRxFF0Filter);return 0 ; error: -usb_put_dev (interface_to_usbdev (pusb_intf)); +usb_put_dev (udev);usb_set_intfdata (pusb_intf,NULL );if (padapter->dvobj_deinit !=NULL ) padapter->dvobj_deinit (padapter);
@@ -613,6 +616,7 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)struct _adapter *padapter =netdev_priv (pnetdev);struct usb_device *udev =interface_to_usbdev (pusb_intf); +usb_set_intfdata (pusb_intf,NULL );if (padapter) {if (drvpriv.drv_registered == true) padapter->bSurpriseRemoved = true;
drivers/staging/rtl8712/usb_ops_linux.c +9 -10
@@ -334,17 +334,16 @@ void r8712_xmit_bh(void *priv)struct _adapter *padapter = (struct _adapter *)priv;struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -while (1 ) { -if ((padapter->bDriverStopped == true) || - (padapter->bSurpriseRemoved == true)) { -printk (KERN_ERR "r8712u: xmit_bh => bDriverStopped" -" or bSurpriseRemoved\n" ); -break ; - } - ret =r8712_xmitframe_complete (padapter, pxmitpriv,NULL ); -if (ret == false) -break ; +if ((padapter->bDriverStopped == true) || + (padapter->bSurpriseRemoved == true)) { +printk (KERN_ERR "r8712u: xmit_bh => bDriverStopped" +" or bSurpriseRemoved\n" ); +return ; } + ret =r8712_xmitframe_complete (padapter, pxmitpriv,NULL ); +if (ret == false) +return ; +tasklet_hi_schedule (&pxmitpriv->xmit_tasklet); }static void usb_write_port_complete (struct urb *purb)
Signature · 1 line
1.7.6.4
Quoted 1 line
From
0b8466b5f86da18f0a83c871c0b482ccb8c2e31bMon Sep 17 00:00:00 2001
From: Ali Bahar <[email protected]>
Date: Sun, 4 Sep 2011 03:14:22 +0800
Subject: [PATCH 20/20] staging: r8712u: Merging Realtek's latest (v2.6.6). Tx
aggregation.
To: [email protected]
Cc: [email protected],[email protected]
Tx Aggregation (CONFIG_R8712_TX_AGGR, known as CONFIG_USB_TX_AGGR in the Realtek tarball) is now added.
However, its tests have not been successful! The default in the Realtek tarball is to not build it -- and the Release Notes does not seem to list this as a feature. I have tested the driver with and without this feature; the former does not successfully associate when WPA2 is used.
--- drivers/staging/rtl8712/Kconfig | 7 + drivers/staging/rtl8712/rtl8712_xmit.c | 239 ++++++++++++++++++++++++++++++++ drivers/staging/rtl8712/rtl8712_xmit.h | 7 + drivers/staging/rtl8712/rtl871x_xmit.h | 15 ++- 4 files changed, 266 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/Kconfig +7 -0
@@ -16,4 +16,11 @@ config R8712_AP ---help--- This option allows the Realtek RTL8712 USB device to be an Access Point. +config R8712_TX_AGGR + bool "Realtek RTL8712U Transmit Aggregation code" + depends on R8712U && BROKEN + default N + ---help--- + This option provides transmit aggregation for the Realtek RTL8712 USB device. +
drivers/staging/rtl8712/rtl8712_xmit.c +239 -0
292 lines not on this page · raw message
drivers/staging/rtl8712/rtl8712_xmit.h +7 -0
@@ -113,4 +113,11 @@ int r8712_xmitframe_complete(struct _adapter *padapter,void r8712_do_queue_select (struct _adapter *padapter,struct pkt_attrib *pattrib); +#ifdef CONFIG_R8712_TX_AGGR +u8 r8712_xmitframe_aggr_1st (struct xmit_buf *pxmitbuf, +struct xmit_frame *pxmitframe); +u8 r8712_dump_aggr_xframe (struct xmit_buf *pxmitbuf, +struct xmit_frame *pxmitframe); +#endif +#endif
drivers/staging/rtl8712/rtl871x_xmit.h +13 -2
@@ -30,8 +30,19 @@#include "drv_types.h" #include "xmit_osdep.h" -#define MAX_XMITBUF_SZ (2048) -#define NR_XMITBUFF (4) +#ifdef CONFIG_R8712_TX_AGGR +#define MAX_XMITBUF_SZ (16384) +#else +#define MAX_XMITBUF_SZ (2048) +#endif + +#define NR_XMITBUFF (4) + +#ifdef CONFIG_R8712_TX_AGGR +#define AGGR_NR_HIGH_BOUND (4)/*(8) */ +#define AGGR_NR_LOW_BOUND (2) +#endif +#define XMITBUF_ALIGN_SZ 512#define TX_GUARD_BAND 5#define MAX_NUMBLKS (1)
Signature · 1 line
1.7.6.4
Quoted 3 lines · Larry Finger
BTW, netperf shows that r8712u can transmit at ~80 and receive at ~60 Mbps when connected to a 270 Mbps AP. As Realtek lists this as capable of 150 Mbps,
x86_64is getting the max transmit rate that we might expect.
On x86 32bit, I get a sustained 94Mbps transmit to a 300Mbps AP, which seems pretty good - why I'm keen to get this to work for my ARM target.
Quoted 4 lines
@Ian: Ali Bahar submitted a number of patches to GregKH updating the driver to the latest Realtek version. As the git repo is not available due to kernel.org, and I have not found an alternate location that Greg has established, I am attaching them here.
Many thanks for that.
I've applied all Ali's patches you attached, and tried on my Blackfin host, both with and without musb DMA enabled - no improvement, sadly.
I had also tried the 2.6.6.0.20110401 driver from Realtek without any change in behaviour.
May try adding some liberal debug trace next, to compare to operation on x86.
Regards,
Ian.
Quoted 9 lines · Ian Jeffray
Quoted 4 lines · Larry Finger
BTW, netperf shows that r8712u can transmit at ~80 and receive at ~60 Mbps when connected to a 270 Mbps AP. As Realtek lists this as capable of 150 Mbps,
x86_64is getting the max transmit rate that we might expect.On x86 32bit, I get a sustained 94Mbps transmit to a 300Mbps AP, which seems pretty good - why I'm keen to get this to work for my ARM target.
Larry, just a little more info on this issue, FYI.
It would seem the problem is certainly specific to the 'Inventra' mUSB host found in recent TI ARM products and ADI Blackfin devices.
I have added a PCI express NEC USB 2.0 host controller card to my ARM Cortex A8 system, and the r8712u devices work just fine when connected via that host controller. (Albeit only at 20MBps rate, but that's because the host controller is rather poor in general).
We have now raised this problem with TI USB experts.
Regards,
Ian.
Quoted 16 lines · Ian Jeffray
Quoted 9 lines · Ian Jeffray
Quoted 4 lines · Larry Finger
BTW, netperf shows that r8712u can transmit at ~80 and receive at ~60 Mbps when connected to a 270 Mbps AP. As Realtek lists this as capable of 150 Mbps,
x86_64is getting the max transmit rate that we might expect.On x86 32bit, I get a sustained 94Mbps transmit to a 300Mbps AP, which seems pretty good - why I'm keen to get this to work for my ARM target.
Larry, just a little more info on this issue, FYI.
It would seem the problem is certainly specific to the 'Inventra' mUSB host found in recent TI ARM products and ADI Blackfin devices.
Quoted 6 lines
I have added a PCI express NEC USB 2.0 host controller card to my ARM Cortex A8 system, and the r8712u devices work just fine when connected via that host controller. (Albeit only at 20MBps rate, but that's because the host controller is rather poor in general).
We have now raised this problem with TI USB experts.
Thanks for the update. Good luck with finding the real problem and let me know if I can be of help.
Larry
Quoted 5 lines · Larry Finger
Ian,
Most of the skb assignments in r8712u are aligned OK and most aligned on 512-byte boundaries, but there was one that had the minimal offset of 14 bytes. The attached patch should fix it. Does it help?
Hi Larry,
Very many thanks for looking at this - I tried to look in to it myself but realised I don't have a good understanding about what's going on.
I won't have access to my problematic ARM system until Monday, but I've tried this on Blackfin with musb and there's no change in operation unfortunately.
But - I added some printk() debug in this area of the code and it seem amsdu_to_msdu() is never called, on Blackfin or on x86 - even when the driver is fully active and transferring data on an x86 PC.
Ian
Signature · 3 lines
Ian Jeffray [email protected] Tel: +44 (0) 141 221 8449 emobix Limited, Suite 5/5, 29 St Vincent Place, Glasgow, G1 2DT Registered in Scotland; Company No. 371276 - VAT No. 983 4833 78