All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] AR9331 ath9k driver init fails when using mtd
@ 2013-07-16 12:14 Gerrit van der Bij
  0 siblings, 0 replies; 3+ messages in thread
From: Gerrit van der Bij @ 2013-07-16 12:14 UTC (permalink / raw)
  To: ath9k-devel

 

Hi, 

I have a small project where I used a 32 Mbyte flash in a TP-Link MR-11U
running OpenWrt AA. The device is based on the AR9331 chip. The kernel
disables the SPI interface of the AR9331, so the flash is no longer
memory mapped. 

To compensate for this, I added a function in "ar9003_eeprom.c" for
restoring the ar9300_eeprom struct from an mtd partition named 'art'.
The struct is at offset 0x1000 in that partition. That seems to work,
because the driver now loads with no complaints, and all fields of the
struct match the expected values read from flash. 

The function gets called instead of
"ar9003_hw_eeprom_restore_from_flash()" 

However, radio refuses to be enabled and 'ifconfig -a' shows a MAC of
'ff:ff:ff:ff:ff:ff'. 

I found one item with similar properties on this mailing list that
suggests that "rx_chainmask" is set wrong
(http://www.mail-archive.com/ath9k-devel at lists.ath9k.org/msg06354.html
[1]), but its a different SoC and my old flash chip (containing stock
openWRT with AA) was capable of using the WiFi with the correct MAC
address. So I am assuming this would not apply to my issue? 

Some help in the right direction for fixing this would be highly
appreciated, I'm not an expert on the artheros drivers ... 

W/regards, 

Gerrit 

 

Links:
------
[1]
http://www.mail-archive.com/ath9k-devel at lists.ath9k.org/msg06354.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20130716/bd828158/attachment.htm 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ath9k-devel] AR9331 ath9k driver init fails when using mtd
  2013-07-16 12:46 Gerrit van der Bij
@ 2013-07-16 13:33 ` Felix Fietkau
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2013-07-16 13:33 UTC (permalink / raw)
  To: ath9k-devel

On 2013-07-16 2:46 PM, Gerrit van der Bij wrote:
>  
> 
> Hi,
> 
> I have a small project where I used a 32 Mbyte flash in a TP-Link MR-11U
> running OpenWrt AA. The device is based on the AR9331 chip. The kernel
> disables the SPI interface of the AR9331, so the flash is no longer
> memory mapped.
> 
> To compensate for this, I added a function in "ar9003_eeprom.c" for
> restoring the ar9300_eeprom struct from an mtd partition named 'art'.
> The struct is at offset 0x1000 in that partition. That seems to work,
> because the driver now loads with no complaints, and all fields of the
> struct match the expected values read from flash.
> 
> The function gets called instead of "ar9003_hw_eeprom_restore_from_flash()"
> 
> However, radio refuses to be enabled and 'ifconfig -a' shows a MAC of
> 'ff:ff:ff:ff:ff:ff'. 
> 
> I found one item with similar properties on this mailing list that
> suggests that "rx_chainmask" is set wrong
> (http://www.mail-archive.com/ath9k-devel at lists.ath9k.org/msg06354.html),
> but its a different SoC and my old flash chip (containing stock openWRT
> with AA) was capable of using the WiFi with the correct MAC address. So
> I am assuming this would not apply to my issue? 
> 
> Some help in the right direction for fixing this would be highly
> appreciated, I'm not an expert on the artheros drivers ...
Accessing mtd partitions from within the driver is the wrong approach.
OpenWrt fills the platform data with the partition contents in the
platform setup. You should be able to do something like that without
changing the driver at all.

- Felix

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ath9k-devel] AR9331 ath9k driver init fails when using mtd
@ 2013-07-16 12:46 Gerrit van der Bij
  2013-07-16 13:33 ` Felix Fietkau
  0 siblings, 1 reply; 3+ messages in thread
From: Gerrit van der Bij @ 2013-07-16 12:46 UTC (permalink / raw)
  To: ath9k-devel

 

Hi, 

I have a small project where I used a 32 Mbyte flash in a TP-Link MR-11U
running OpenWrt AA. The device is based on the AR9331 chip. The kernel
disables the SPI interface of the AR9331, so the flash is no longer
memory mapped. 

To compensate for this, I added a function in "ar9003_eeprom.c" for
restoring the ar9300_eeprom struct from an mtd partition named 'art'.
The struct is at offset 0x1000 in that partition. That seems to work,
because the driver now loads with no complaints, and all fields of the
struct match the expected values read from flash. 

The function gets called instead of
"ar9003_hw_eeprom_restore_from_flash()" 

However, radio refuses to be enabled and 'ifconfig -a' shows a MAC of
'ff:ff:ff:ff:ff:ff'. 

I found one item with similar properties on this mailing list that
suggests that "rx_chainmask" is set wrong
(http://www.mail-archive.com/ath9k-devel at lists.ath9k.org/msg06354.html
[1]), but its a different SoC and my old flash chip (containing stock
openWRT with AA) was capable of using the WiFi with the correct MAC
address. So I am assuming this would not apply to my issue? 

Some help in the right direction for fixing this would be highly
appreciated, I'm not an expert on the artheros drivers ... 

W/regards, 

Gerrit 

 

Links:
------
[1]
http://www.mail-archive.com/ath9k-devel at lists.ath9k.org/msg06354.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20130716/44d10063/attachment.htm 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-16 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-16 12:14 [ath9k-devel] AR9331 ath9k driver init fails when using mtd Gerrit van der Bij
2013-07-16 12:46 Gerrit van der Bij
2013-07-16 13:33 ` Felix Fietkau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.