Search Linux Wireless

Re: [PATCH] rt2800usb: Add support for eeprom writes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 14, 2013 at 09:25:56PM +0100, Ivo Van Doorn wrote:
> This is incorrect, all other debugfs files are read/write, so there is
> no point in a extra commit file.

The other eeprom debugfs files only modify the in-memory copy of the 
eeprom data; they do not actually write it back out to the eeprom.

Furthermore, the rt2800usb driver often "validates" (ie modifies) the 
in-memory copy of the eeprom data, so I needed to have a way to re-read 
the raw data so I would only modify what was absolutely necessary.

(IIRC the PCI-based modules expose a standard I2C eeprom which can be 
 accessed/updated independently)

> rt2800 specific code doesn't belong in the generic code. You should 
> make your solution completely driver independent.

I see your point.

This should come via bolting on generic eeprom read/write functions to 
rt2x00lib_ops, and calling those from the debugfs hooks, correct?

Alternatively this could be bolted up to ethtool's eeprom manipulation 
hooks instead of the debugfs hook I hacked in there.

Let me know what you'd prefer.

> Have you checked if this is specific to rt2800 or would other Ralink 
> USB devices be able to work with this as well?

I only have access to RT2870 modules at the moment, so I don't have any 
way of verifying this applies to non-RT2800 modules.  I suppose I could 
wade through ralink's posted source code, but the comments in 
rt2x00usb.h seem to indicate eeprom write support is generic.

 - Solomon
-- 
Solomon Peachy        		       pizza at shaftnet dot org	 
Melbourne, FL                          ^^ (mail/jabber/gtalk) ^^
Quidquid latine dictum sit, altum viditur.

Attachment: pgpqbRJFDmotS.pgp
Description: PGP signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux