linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Hin-Tak Leung <hintak.leung@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFT/RFC] rtl8187: Implement TX/RX blink for LED
Date: Thu, 09 Apr 2009 18:01:22 -0500	[thread overview]
Message-ID: <49DE7E42.5020700@lwfinger.net> (raw)
In-Reply-To: <3ace41890904091453o158f5c00ldad58da3d002180e@mail.gmail.com>

Hin-Tak Leung wrote:
> On Thu, Apr 9, 2009 at 5:23 AM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> 
> On the LED functionality - the LED on my laptop actually works rather
> differently under windows vs under linux.
> On windows it is tied to the hardware switch, and the windows driver
> depends on the state of the hardware switch.
> The linux driver's behavior has no relationship with the LED what so
> ever. (I suppose it might blink under windows but I don't know for
> sure).

I take it that your device is built in. If it works with the hardware switch,
then we need a "radio" LED and the rfkill subsystem. I won't be able to test
that configuration, but I will try to spin that code, but I'll do it separately
from the TX/RX LEDs.

>> Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_leds.h
>> ===================================================================
> 
>> + * Based on the r8187 driver, which is:
>> + * Copyright 2005 Andrea Merello <andreamrl@tiscali.it>, et al.
> 
> I found these two comments a bit odd, so I went back to the vendor
> driver code to have a look.
> The LED code is AFAIK a rather new addition to the vendor driver,
> within the 2008, I think. It is in
> 0708.2008 but not in 0822.2007, and does not seem to be in 0125.2008
> driver either.
> 
> The two new LED related files in 0708.2008 have these headers:
> --------------------------------------------------------------------------------------------------
> /*++
> Copyright (c) Realtek Semiconductor Corp. All rights reserved.
> 
> Module Name:
>  	r8187_led.c
> 	
> Abstract:
>  	RTL8187 LED control functions
>  	
> Major Change History:
> 	When        Who      What
> 	----------    ---------------   -------------------------------
> 	2006-09-07    Xiong		Created
> 
> Notes:	
>  	
> --*/
> /*++
> 
> Copyright (c) Microsoft Corporation. All rights reserved.
> 
> Module Name:
>     r8187_led.h
> 
> Abstract:
>     definitions and stuctures for rtl8187 led control.
> 
> Major Change History:
>       When        Who	What
>     ----------	------	----------------------------------------------
>     2006-09-07	Xiong	Created
> 
> Notes:
> 
> --*/
> -------------------------------------------------------------------------------------------------
> 
> I am slightly worried about the microsoft copyright in the latter :-),
> but presumably it is a visual studio or dev tool artefact :-).

I used the rtl8187 code from rtl8187_linux_26.1025.0328.2007, and the rtl8187B
code from rtl8187B_linux_24.6.1031.0125.2008. It turned out that the code was
identical, thus no need to have two distinct paths. As you have likely seen, my
implementation was a lot smaller than theirs.

I used the rtl8187_led.c file to generate my code. It only has a Realtek
copyright. The only part of the .h file that was used was the interpretation of
the EEPROM customer code. I don't think that Microsoft has a copyright on that.

>>  #include <linux/init.h>
>>  #include <linux/usb.h>
>> +#include <linux/eeprom_93cx6.h>
>>  #include <net/mac80211.h>
>>
>>  #include "rtl8187.h"
> 
> This trunk seems to be redundant - why would a new include be needed
> for no code addition?

In my implementation of the LEDs init function, I pass the EEPROM structure as
one of the arguments so that I can read the customer code, which is the reason
that that header ended up there. I'll modify my patch so that the customer code
is read in rtl8187_dev.c and pass that to the init routine. Then the EEPROM
struct will not be needed.

Thanks for your comments.

Larry

  reply	other threads:[~2009-04-09 23:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09  4:23 [RFT/RFC] rtl8187: Implement TX/RX blink for LED Larry Finger
2009-04-09 11:51 ` Gábor Stefanik
2009-04-09 21:53 ` Hin-Tak Leung
2009-04-09 23:01   ` Larry Finger [this message]
2009-04-11  4:23     ` Hin-Tak Leung
2009-04-11  4:29       ` Hin-Tak Leung
2009-04-11 16:36         ` Larry Finger
2009-04-12  4:57           ` Hin-Tak Leung
2009-04-12  5:44             ` Larry Finger
2009-04-12  9:22               ` Hin-Tak Leung

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=49DE7E42.5020700@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=hintak.leung@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).