All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] AR9331 ath9k driver init fails when using mtd
Date: Tue, 16 Jul 2013 15:33:32 +0200	[thread overview]
Message-ID: <51E54BAC.7070807@openwrt.org> (raw)
In-Reply-To: <139aa484b01fe79567947e0be65212e3@mail.vanderbij.org>

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

  reply	other threads:[~2013-07-16 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 12:46 [ath9k-devel] AR9331 ath9k driver init fails when using mtd Gerrit van der Bij
2013-07-16 13:33 ` Felix Fietkau [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-16 12:14 Gerrit van der Bij

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=51E54BAC.7070807@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath9k-devel@lists.ath9k.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 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.