r8712u: importing the latest Realtek code.

Larry Finger Larry.Finger at lwfinger.net
Thu Jul 21 17:42:38 UTC 2011


On 07/20/2011 10:40 PM, Ali Bahar wrote:
> Hi Larry,
>
>
> On Tue, Jul 19, 2011 at 11:05:12PM +0900, Mike McCormack wrote:
>> On 19 July 2011 10:48, Greg KH<greg at kroah.com>  wrote:
>>> On Mon, Jul 18, 2011 at 08:44:44PM -0500, Larry Finger wrote:
>>>> On 07/18/2011 03:17 PM, Greg KH wrote:
>>>>> On Mon, Jul 11, 2011 at 08:54:20AM +0900, Mike McCormack wrote:
>>>>>> /* this patch only is compressed and attached due to its size */
>>>>>>
>>>>>> Signed-off-by: Mike McCormack<mikem at ring3k.org>
>>>>>
>>>>> Nice, but you didn't write this, so you shouldn't be listed as the
>>>>> "From:" line if at all possible, right?  Any clue as to the original
>>>>> author?  Has realtek signed-off on this somehow?
>>>>
>>>> The listed contact information in the driver is to wlanfae
>>>> <wlanfae at realtek.com>; however, I'm not sure he is with Realtek any
>>>> more.
>>>>
>>>> I have blanket approval from Realtek to submit any of their drivers to the kernel.
>>>
>>> Ok, but your name wasn't on this patch :)
>>>
>>> Care to try to give a bit of credit here and resend this?
>>
>> Hi Greg,
>>
>> Please take Larry's version of series with the Realtek sign off.
>> I haven't been in touch with Realtek about their driver, but assumed that
>> it was OK to include since it is GPL'ed.
>
> As you know, I'd intended to merge Realtek's latest code
> (RTL8192SU_usb_linux_v2.6.6.0.20110401.zip) into r8712u (ie
> drivers/staging/rtl8712/). But the above suggests that I should leave
> this to you.
> This leaves the rest of drivers/staging/rtl8712/TODO:
>
> - switch to use LIB80211
> - switch to use MAC80211
>
> Though I can tackle these before the merge, it may be more acceptable
> not to. Any thoughts?

Ali,

I have downloaded the file and managed to build it on a 3.0-rc6 kernel. The only 
change needed was to make the includes of <linux/smp_lock.h> be conditional on a 
kernel < 2.6.39. I guessed at the version where the Big Kernel Lock disappeared. 
On reflection, those includes probably are not needed and could be deleted.

I built the driver on an x86_64 system. The large number of warnings of the type 
"cast to pointer from integer of different size" means that the driver needs a 
lot of work to function on a 64-bit system. I did not try to run the driver as 
I'm sure it would crash my machine. Most of the changes that I had to make in 
the original code were due to 32-/64-bit differences.

I don't think it would be worth while to replace the existing r8712u driver with 
this one. I would suggest looking at the difference between the two sets of 
sources and make patches that implement any real changes. It will not be easy as 
there have been a lot of cosmetic changes.

Unfortunately, converting this driver to mainline is probably not the way to go. 
First of all, rtl8192su in mainline should use as much of the rtlwifi code as 
possible. Not only the low-level USB code will be used, but a lot of code can be 
shared by rtl8192se and rtl8192su in the same way as rtl8192ce and rtl8192cu 
share the code in rtl8192c. As I see it, we essentially will need to start from 
scratch. The things that r8712u does to the hardware will be a guide, but there 
will likely be little cut-n-paste.

Larry



More information about the devel mailing list