From: Oleksij Rempel <linux@rempel-privat.de>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] Fwd: Re: ath9k_htc firmware
Date: Sat, 4 Jun 2016 07:58:04 +0200 [thread overview]
Message-ID: <57526DEC.40907@rempel-privat.de> (raw)
In-Reply-To: <57526D1D.9000305@gmx.net>
Am 03.06.2016 um 19:26 schrieb bruce m beach:
> Hello All
>
> I am still working on cleaning up ath9k_htc firmware build tree for about 6
> months now ( and looks like I'll be doing this for all eternity**2 ) and am
> not clear myself what I'm looking for right now.
>
> I'm looking for some kind of simple request in the ath9k_htc driver, through
> the usb ep0, like a memory read on the card, where a urb is sent with
> the resulting chain of events. The simpler the better. The simplest.
For EP0 on drivers site:
static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
{
int transfer, err;
const void *data = hif_dev->fw_data;
size_t len = hif_dev->fw_size;
u32 addr = AR9271_FIRMWARE;
u8 *buf = kzalloc(4096, GFP_KERNEL);
u32 firm_offset;
if (!buf)
return -ENOMEM;
while (len) {
transfer = min_t(size_t, len, 4096);
memcpy(buf, data, transfer);
err = usb_control_msg(hif_dev->udev,
usb_sndctrlpipe(hif_dev->udev, 0),
FIRMWARE_DOWNLOAD, 0x40 | USB_DIR_OUT,
addr >> 8, 0, buf, transfer, HZ);
=============================================================================
On side of pre installed firmware, the code looks like this:
open-ath9k-htc-firmware/sboot/magpie_1_1/sboot/hif/usb/src/usb_api.c
LOCAL void VendorCommand(void)
{
#define cUSB_REQ_DOWNLOAD 0x30
#define cUSB_REQ_DOWNLOAD_COMP 0x31
#define cUSB_REQ_BOOT 0x32
#define cUSB_REQ_RESERVED_1 0x33
#define cUSB_REQ_RESERVED_2 0x34
#define cUSB_REQ_FLASH_READ 0x35
#define cUSB_REQ_FLASH_READ_COMP 0x36
//#define ZM_FIRMWARE_ADDR 0x200000
void (*funcPtr)(void);
uint16_t *text_addr = 0;
uint32_t ep0_data = 0x0;
...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20160604/2a073a8d/attachment.pgp
WARNING: multiple messages have this Message-ID (diff)
From: Oleksij Rempel <linux@rempel-privat.de>
To: ath9k-devel@lists.ath9k.org, brucembeach@gmail.com,
ath9k_htc_fw <ath9k_htc_fw@lists.infradead.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Fwd: Re: ath9k_htc firmware
Date: Sat, 4 Jun 2016 07:58:04 +0200 [thread overview]
Message-ID: <57526DEC.40907@rempel-privat.de> (raw)
In-Reply-To: <57526D1D.9000305@gmx.net>
[-- Attachment #1.1: Type: text/plain, Size: 1989 bytes --]
Am 03.06.2016 um 19:26 schrieb bruce m beach:
> Hello All
>
> I am still working on cleaning up ath9k_htc firmware build tree for about 6
> months now ( and looks like I'll be doing this for all eternity**2 ) and am
> not clear myself what I'm looking for right now.
>
> I'm looking for some kind of simple request in the ath9k_htc driver, through
> the usb ep0, like a memory read on the card, where a urb is sent with
> the resulting chain of events. The simpler the better. The simplest.
For EP0 on drivers site:
static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
{
int transfer, err;
const void *data = hif_dev->fw_data;
size_t len = hif_dev->fw_size;
u32 addr = AR9271_FIRMWARE;
u8 *buf = kzalloc(4096, GFP_KERNEL);
u32 firm_offset;
if (!buf)
return -ENOMEM;
while (len) {
transfer = min_t(size_t, len, 4096);
memcpy(buf, data, transfer);
err = usb_control_msg(hif_dev->udev,
usb_sndctrlpipe(hif_dev->udev, 0),
FIRMWARE_DOWNLOAD, 0x40 | USB_DIR_OUT,
addr >> 8, 0, buf, transfer, HZ);
=============================================================================
On side of pre installed firmware, the code looks like this:
open-ath9k-htc-firmware/sboot/magpie_1_1/sboot/hif/usb/src/usb_api.c
LOCAL void VendorCommand(void)
{
#define cUSB_REQ_DOWNLOAD 0x30
#define cUSB_REQ_DOWNLOAD_COMP 0x31
#define cUSB_REQ_BOOT 0x32
#define cUSB_REQ_RESERVED_1 0x33
#define cUSB_REQ_RESERVED_2 0x34
#define cUSB_REQ_FLASH_READ 0x35
#define cUSB_REQ_FLASH_READ_COMP 0x36
//#define ZM_FIRMWARE_ADDR 0x200000
void (*funcPtr)(void);
uint16_t *text_addr = 0;
uint32_t ep0_data = 0x0;
...
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
next prev parent reply other threads:[~2016-06-04 5:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 17:26 ath9k_htc firmware bruce m beach
2016-06-04 5:54 ` Oleksij Rempel
2016-06-04 5:58 ` Oleksij Rempel [this message]
2016-06-04 5:58 ` Fwd: " Oleksij Rempel
2016-06-04 19:44 ` [ath9k-devel] " bruce m beach
2016-06-04 19:44 ` bruce m beach
2016-06-04 20:25 ` [ath9k-devel] " Oleksij Rempel
2016-06-04 20:25 ` Oleksij Rempel
2016-06-04 20:27 ` [ath9k-devel] " Oleksij Rempel
2016-06-04 20:27 ` Oleksij Rempel
2016-06-09 15:14 ` bruce m beach
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=57526DEC.40907@rempel-privat.de \
--to=linux@rempel-privat.de \
--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.