sdio support for wl12xx
PATCH 1/1 sdio support for wl12xx
Hi all,
Here's a VERY rough patch containing SDIO support for wl12xx, not yet for applying. However, it does load (with the proper setup code) on my Android dev phone, chip probe works, and probably the rest too, though I didn't get that far. This also splits out spi driver so we have wl12xx.ko (core) and wl12xx_spi/_sdio.
A big thanks to the Nokia engineers for making this as easy as inserting an io ops structure and shuffling some code around. The actual SDIO read/write bits are largely identical to TI/Google's own GPLed driver, though I plan to rework them a bit before submitting this (see below).
TODO:
- invoke setup code prior to bus probe (FIXMEs in sdio.c and main.c)
- do something about sdio read/write functions (kill the loops, drop the _direct stuff if possible).
- use readl/writel where appropriate (will fix endian issues)
--- drivers/net/wireless/wl12xx/Kconfig | 22 +++- drivers/net/wireless/wl12xx/Makefile | 9 +- drivers/net/wireless/wl12xx/acx.c | 3 +- drivers/net/wireless/wl12xx/boot.c | 3 +- drivers/net/wireless/wl12xx/cmd.c | 11 +- drivers/net/wireless/wl12xx/event.c | 4 +- drivers/net/wireless/wl12xx/io.c | 181 +++++++++++++++++++++ drivers/net/wireless/wl12xx/io.h | 58 +++++++ drivers/net/wireless/wl12xx/main.c | 175 +++++---------------- drivers/net/wireless/wl12xx/ps.c | 3 +- drivers/net/wireless/wl12xx/rx.c | 8 +- drivers/net/wireless/wl12xx/sdio.c | 266 +++++++++++++++++++++++++++++++ drivers/net/wireless/wl12xx/spi.c | 286 +++++++++++++++------------------- drivers/net/wireless/wl12xx/spi.h | 34 +---- drivers/net/wireless/wl12xx/tx.c | 14 +- drivers/net/wireless/wl12xx/wl1251.c | 9 +- drivers/net/wireless/wl12xx/wl12xx.h | 18 ++ 17 files changed, 742 insertions(+), 362 deletions(-) create mode 100644 drivers/net/wireless/wl12xx/io.c create mode 100644 drivers/net/wireless/wl12xx/io.h create mode 100644 drivers/net/wireless/wl12xx/sdio.c
drivers/net/wireless/wl12xx/Kconfig +21 -1
@@ -1,6 +1,6 @@ config WL12XX tristate "TI wl1251/wl1271 support" - depends on MAC80211 && WLAN_80211 && SPI_MASTER && GENERIC_HARDIRQS && EXPERIMENTAL + depends on MAC80211 && WLAN_80211 && GENERIC_HARDIRQS && EXPERIMENTAL select FW_LOADER select CRC7 ---help---
@@ -9,3 +9,23 @@ config WL12XX If you choose to build a module, it'll be called wl12xx. Say N if unsure. + +config WL12XX_SPI + tristate "TI wl1251/wl1271 SPI support" + depends on WL12XX && SPI_MASTER + ---help--- + This module adds support for the SPI interface of adapters using + TI wl1251/wl1271 chipsets. + + If you choose to build a module, it'll be called wl12xx_spi. Say N if + unsure. + +config WL12XX_SDIO + tristate "TI wl1251/wl1271 SDIO support" + depends on WL12XX + ---help--- + This module adds support for the SDIO interface of adapters using + TI wl1251/wl1271 chipsets. + + If you choose to build a module, it'll be called wl12xx_sdio. Say N if + unsure.
drivers/net/wireless/wl12xx/Makefile +7 -2
@@ -1,4 +1,9 @@ -wl12xx-objs = main.o spi.o event.o tx.o rx.o \ +wl12xx-objs = main.o event.o tx.o rx.o \ ps.o cmd.o acx.o boot.o init.o wl1251.o \ - debugfs.o + debugfs.o io.o +wl12xx_spi-objs += spi.o +wl12xx_sdio-objs += sdio.o + obj-$(CONFIG_WL12XX) += wl12xx.o +obj-$(CONFIG_WL12XX_SPI) += wl12xx_spi.o +obj-$(CONFIG_WL12XX_SDIO) += wl12xx_sdio.o
drivers/net/wireless/wl12xx/acx.c +1 -2
@@ -2,12 +2,11 @@#include <linux/module.h> #include <linux/crc7.h> -#include <linux/spi/spi.h> #include "wl12xx.h" #include "wl12xx_80211.h" #include "reg.h" -#include "spi.h" +#include "cmd.h" #include "ps.h" int wl12xx_acx_frame_rates(struct wl12xx *wl, u8 ctrl_rate, u8 ctrl_mod,
drivers/net/wireless/wl12xx/boot.c +2 -1
@@ -25,7 +25,8 @@#include "reg.h" #include "boot.h" -#include "spi.h" +#include "io.h" +#include "wl12xx.h" #include "event.h" static void wl12xx_boot_enable_interrupts (struct wl12xx *wl)
drivers/net/wireless/wl12xx/cmd.c +5 -6
@@ -2,12 +2,11 @@#include <linux/module.h> #include <linux/crc7.h> -#include <linux/spi/spi.h> #include "wl12xx.h" #include "wl12xx_80211.h" #include "reg.h" -#include "spi.h" +#include "io.h" #include "ps.h" int wl12xx_cmd_send (struct wl12xx *wl,u16 type,void *buf,size_t buf_len)
@@ -26,7 +25,7 @@ int wl12xx_cmd_send(struct wl12xx *wl, u16 type, void *buf, size_t buf_len)wl12xx_ps_elp_wakeup (wl); -wl12xx_spi_mem_write (wl, wl->cmd_box_addr, &cmd, cmd_len); +wl12xx_mem_write (wl, wl->cmd_box_addr, &cmd, cmd_len);wl12xx_reg_write32 (wl,ACX_REG_INTERRUPT_TRIG ,INTR_TRIG_CMD );
@@ -77,7 +76,7 @@ int wl12xx_cmd_test(struct wl12xx *wl, void *buf, size_t buf_len, u8 answer)wl12xx_ps_elp_wakeup (wl); -wl12xx_spi_mem_read (wl, wl->cmd_box_addr, buf, buf_len); +wl12xx_mem_read (wl, wl->cmd_box_addr, buf, buf_len);wl12xx_ps_elp_sleep (wl);
@@ -112,7 +111,7 @@ int wl12xx_cmd_interrogate(struct wl12xx *wl, u16 ie_id, u16 ie_len,wl12xx_ps_elp_wakeup (wl);/* the interrogate command got in, we can read the answer */ -wl12xx_spi_mem_read (wl, wl->cmd_box_addr, answer, +wl12xx_mem_read (wl, wl->cmd_box_addr, answer,CMDMBOX_HEADER_LEN + ie_len);wl12xx_ps_elp_sleep (wl);
@@ -313,7 +312,7 @@ int wl12xx_cmd_read_memory(struct wl12xx *wl, u32 addr, u32 len, void *answer) }/* the read command got in, we can now read the answer */ -wl12xx_spi_mem_read (wl, wl->cmd_box_addr, &cmd, +wl12xx_mem_read (wl, wl->cmd_box_addr, &cmd,CMDMBOX_HEADER_LEN +sizeof (mem_cmd));if (cmd.status !=CMD_STATUS_SUCCESS )
drivers/net/wireless/wl12xx/event.c +2 -2
@@ -24,7 +24,7 @@#include "wl12xx.h" #include "reg.h" -#include "spi.h" +#include "io.h" #include "event.h" #include "ps.h"
@@ -112,7 +112,7 @@ int wl12xx_event_handle(struct wl12xx *wl, u8 mbox_num)return -EINVAL ;/* first we read the mbox descriptor */ -wl12xx_spi_mem_read (wl, wl->mbox_ptr[mbox_num], &mbox, +wl12xx_mem_read (wl, wl->mbox_ptr[mbox_num], &mbox,sizeof (struct event_mailbox ));/* process the descriptor */
drivers/net/wireless/wl12xx/io.c new file +181 -0
181 lines not on this page · raw message
drivers/net/wireless/wl12xx/io.h new file +58 -0
58 lines not on this page · raw message
drivers/net/wireless/wl12xx/main.c +38 -137
287 lines not on this page · raw message
drivers/net/wireless/wl12xx/ps.c +2 -1
@@ -23,7 +23,8 @@#include "reg.h" #include "ps.h" -#include "spi.h" +#include "cmd.h" +#include "io.h" #define WL12XX_WAKEUP_TIMEOUT 2000
drivers/net/wireless/wl12xx/rx.c +5 -3
@@ -27,8 +27,10 @@#include "wl12xx.h" #include "reg.h" -#include "spi.h" +#include "io.h" #include "rx.h" +#include "cmd.h" +#include "acx.h" static void wl12xx_rx_header (struct wl12xx *wl,struct wl12xx_rx_descriptor *desc)
@@ -39,7 +41,7 @@ static void wl12xx_rx_header(struct wl12xx *wl,if (wl->rx_current_buffer) rx_packet_ring_addr += wl->data_path->rx_packet_ring_chunk_size; -wl12xx_spi_mem_read (wl, rx_packet_ring_addr, desc, +wl12xx_mem_read (wl, rx_packet_ring_addr, desc,sizeof (struct wl12xx_rx_descriptor )); }
@@ -151,7 +153,7 @@ static void wl12xx_rx_body(struct wl12xx *wl, } rx_buffer =skb_put (skb, length); -wl12xx_spi_mem_read (wl, rx_packet_ring_addr, rx_buffer, length); +wl12xx_mem_read (wl, rx_packet_ring_addr, rx_buffer, length);/* The actual lenght doesn't include the target's alignment */ skb->len = desc->length -PLCP_HEADER_LENGTH ;
drivers/net/wireless/wl12xx/sdio.c new file +266 -0
266 lines not on this page · raw message
drivers/net/wireless/wl12xx/spi.c +123 -163
330 lines not on this page · raw message
drivers/net/wireless/wl12xx/spi.h +1 -33
@@ -71,39 +71,7 @@#define HW_ACCESS_WSPI_INIT_CMD_MASK 0 -/* Raw target IO, address is not translated */ -void wl12xx_spi_read (struct wl12xx *wl,int addr,void *buf,size_t len); -void wl12xx_spi_write (struct wl12xx *wl,int addr,void *buf,size_t len); - -/* Memory target IO, address is tranlated to partition 0 */ -void wl12xx_spi_mem_read (struct wl12xx *wl,int addr,void *buf,size_t len); -void wl12xx_spi_mem_write (struct wl12xx *wl,int addr,void *buf,size_t len); -u32 wl12xx_mem_read32 (struct wl12xx *wl,int addr); -void wl12xx_mem_write32 (struct wl12xx *wl,int addr,u32 val); - -/* Registers IO */ -u32 wl12xx_reg_read32 (struct wl12xx *wl,int addr); -void wl12xx_reg_write32 (struct wl12xx *wl,int addr,u32 val); -/* INIT and RESET words */ void wl12xx_spi_reset (struct wl12xx *wl); -void wl12xx_spi_init (struct wl12xx *wl); -void wl12xx_set_partition (struct wl12xx *wl, -u32 part_start,u32 part_size, -u32 reg_start,u32 reg_size); - -static inline u32 wl12xx_read32 (struct wl12xx *wl,int addr) -{ -u32 response; - -wl12xx_spi_read (wl, addr, &response,sizeof (u32)); - -return response; -} - -static inline void wl12xx_write32 (struct wl12xx *wl,int addr,u32 val) -{ -wl12xx_spi_write (wl, addr, &val,sizeof (u32)); -} - +void wl12xx_spi_wake (struct wl12xx *wl);#endif /* __WL12XX_SPI_H__ */
drivers/net/wireless/wl12xx/tx.c +7 -7
@@ -27,7 +27,7 @@#include "wl12xx.h" #include "reg.h" -#include "spi.h" +#include "io.h" #include "tx.h" #include "ps.h"
@@ -235,7 +235,7 @@ static int wl12xx_tx_send_packet(struct wl12xx *wl, struct sk_buff *skb,else addr = wl->data_path->tx_packet_ring_addr; -wl12xx_spi_mem_write (wl, addr, skb->data, len); +wl12xx_mem_write (wl, addr, skb->data, len);wl12xx_debug (DEBUG_TX ,"tx id %u skb 0x%p payload %u rate 0x%x" , tx_hdr->id, skb, tx_hdr->length, tx_hdr->rate);
@@ -449,7 +449,7 @@ void wl12xx_tx_complete(struct wl12xx *wl)return ;/* First we read the result */ -wl12xx_spi_mem_read (wl, wl->data_path->tx_complete_addr, +wl12xx_mem_read (wl, wl->data_path->tx_complete_addr, result,sizeof (result)); result_index = wl->next_tx_complete;
@@ -480,7 +480,7 @@ void wl12xx_tx_complete(struct wl12xx *wl)*/ if (result_index > wl->next_tx_complete) {/* Only 1 write is needed */ - wl12xx_spi_mem_write(wl, + wl12xx_mem_write(wl, wl->data_path->tx_complete_addr + (wl->next_tx_complete * sizeof(struct tx_result)),
@@ -491,7 +491,7 @@ void wl12xx_tx_complete(struct wl12xx *wl) }else if (result_index < wl->next_tx_complete) {/* 2 writes are needed */ - wl12xx_spi_mem_write(wl, + wl12xx_mem_write(wl, wl->data_path->tx_complete_addr + (wl->next_tx_complete * sizeof(struct tx_result)),
@@ -500,7 +500,7 @@ void wl12xx_tx_complete(struct wl12xx *wl) wl->next_tx_complete) * sizeof(struct tx_result)); - wl12xx_spi_mem_write(wl, + wl12xx_mem_write(wl, wl->data_path->tx_complete_addr, result, (num_complete -
@@ -510,7 +510,7 @@ void wl12xx_tx_complete(struct wl12xx *wl) }else {/* We have to write the whole array */ - wl12xx_spi_mem_write(wl, + wl12xx_mem_write(wl, wl->data_path->tx_complete_addr, result, FW_TX_CMPLT_BLOCK_SIZE *
drivers/net/wireless/wl12xx/wl1251.c +5 -4
@@ -26,13 +26,14 @@#include "wl1251.h" #include "reg.h" -#include "spi.h" +#include "io.h" #include "boot.h" #include "event.h" #include "acx.h" #include "tx.h" #include "rx.h" #include "ps.h" +#include "cmd.h" #include "init.h" static struct wl12xx_partition_set wl1251_part_table[PART_TABLE_LEN ] = {
@@ -130,7 +131,7 @@ static int wl1251_upload_firmware(struct wl12xx *wl) p = wl->fw +FW_HDR_SIZE + chunk_num *CHUNK_SIZE ;wl12xx_debug (DEBUG_BOOT ,"uploading fw chunk 0x%p to 0x%x" , p, addr); -wl12xx_spi_mem_write (wl, addr, p,CHUNK_SIZE ); +wl12xx_mem_write (wl, addr, p,CHUNK_SIZE ); chunk_num++; }
@@ -140,7 +141,7 @@ static int wl1251_upload_firmware(struct wl12xx *wl) p = wl->fw +FW_HDR_SIZE + chunk_num *CHUNK_SIZE ;wl12xx_debug (DEBUG_BOOT ,"uploading fw last chunk (%zu B) 0x%p to 0x%x" , fw_data_len %CHUNK_SIZE , p, addr); -wl12xx_spi_mem_write (wl, addr, p, fw_data_len %CHUNK_SIZE ); +wl12xx_mem_write (wl, addr, p, fw_data_len %CHUNK_SIZE );return 0 ; }
@@ -412,7 +413,7 @@ static void wl1251_irq_work(struct work_struct *work)wl12xx_debug (DEBUG_IRQ ,"intr: 0x%x" , intr);if (wl->data_path) { -wl12xx_spi_mem_read (wl, wl->data_path->rx_control_addr, +wl12xx_mem_read (wl, wl->data_path->rx_control_addr, &wl->rx_counter,sizeof (u32));/* We handle a frmware bug here */
drivers/net/wireless/wl12xx/wl12xx.h +18 -0
@@ -276,11 +276,19 @@ struct wl12xx_debugfs {struct dentry *excessive_retries; }; +struct wl12xx_if_operations { +void (*read)(struct wl12xx *,int addr,void *buf,size_t len); +void (*write)(struct wl12xx *,int addr,void *buf,size_t len); +}; +struct wl12xx {struct ieee80211_hw *hw;bool mac80211_registered; +struct sdio_func *func;struct spi_device *spi; +struct device *dev; +struct wl12xx_if_operations *if_ops;void (*set_power)(bool enable);int irq;
@@ -387,6 +395,16 @@ struct wl12xx {int wl12xx_plt_start (struct wl12xx *wl);int wl12xx_plt_stop (struct wl12xx *wl); +irqreturn_t wl12xx_irq (int irq,void *cookie); +struct ieee80211_hw *wl12xx_alloc_hw (void ); +int wl12xx_register_hw (struct wl12xx *wl); +int wl12xx_init_ieee80211 (struct wl12xx *wl); +void wl12xx_filter_work (struct work_struct *work); +void wl12xx_fw_wakeup (struct wl12xx *wl); +void wl12xx_set_partition (struct wl12xx *wl, +u32 part_start,u32 part_size, +u32 reg_start,u32 reg_size); +#define DEFAULT_HW_GEN_MODULATION_TYPE CCK_LONG/* Long Preamble */ #define DEFAULT_HW_GEN_TX_RATE RATE_2MBPS#define JOIN_TIMEOUT 5000/* 5000 milliseconds to join */
Signature · 4 lines
1.6.0.6 -- Bob Copeland %% www.bobcopeland.com
Quoted 1 line · Bob Copeland
Hi all,
Hi Bob,
Quoted 4 lines
Here's a VERY rough patch containing SDIO support for wl12xx, not yet for applying. However, it does load (with the proper setup code) on my Android dev phone, chip probe works, and probably the rest too, though I didn't get that far.
Very cool!
Quoted 2 lines
This also splits out spi driver so we have wl12xx.ko (core) and
wl12xx_spi/_sdio.
For the upcoming 1271 support this might create some problems, but let's worry that later.
Quoted 6 lines
A big thanks to the Nokia engineers for making this as easy as inserting an io ops structure and shuffling some code around. The actual SDIO read/write bits are largely identical to TI/Google's own GPLed driver, though I plan to rework them a bit before submitting this (see below).
From a quick look this looks good to me, having separate
io.cwas a good
choice. I won't comment on the details yet because this is early stages still.
Thanks a lot for doing this!
Signature · 1 line
Kalle Valo
Quoted 3 lines · Bob Copeland
yet for applying. However, it does load (with the proper setup code) on my Android dev phone, chip probe works, and probably the rest too, though I didn't get that far.
So much for hubris!
drivers/net/wireless/wl12xx/sdio.c line 147
Quoted 3 lines
drivers/net/wireless/wl12xx/sdio.c new file +3
-0+void wl12xx_sdio_read (struct wl12xx *wl,int addr,void *buf,size_t len) +{ +int ret, i;
sdio_claim_host(wl->func);
drivers/net/wireless/wl12xx/sdio.c line 156
Quoted 9 lines
drivers/net/wireless/wl12xx/sdio.c new file +9
-0+for (i=0 ; i <5 ; i++) { +if (i <2 ) + ret =read_direct (wl->func, buf, addr, len); +else + ret =sdio_memcpy_fromio (wl->func, buf, addr, len); + +if (!ret) +break ; + }
sdio_release_host(wl->func);
Quoted 1 line
+}
And so on with write() (and dropping around wl12xx_init_ieee80211 to avoid the recursive lock). That kills some warnings.
iwconfig shows:
wlan0 IEEE 802.11bg ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
So at least mac80211 is up and running.
I'm missing the NVS tables so 'ifconfig wlan0 up' bails on fw load.
Signature · 1 line
Bob Copeland %% www.bobcopeland.com
Quoted 6 lines · Bob Copeland
Quoted 3 lines · Bob Copeland
yet for applying. However, it does load (with the proper setup code) on my Android dev phone, chip probe works, and probably the rest too, though I didn't get that far.
So much for hubris!
Don't feel down about this, this is always difficult and you are making good progress already.
Quoted 11 lines
iwconfig shows:
wlan0 IEEE 802.11bg ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0So at least mac80211 is up and running.
Very nice. I assume you can read the chip id and that's good, it means that SDIO bus is working correctly.
Quoted 1 line
I'm missing the NVS tables so 'ifconfig wlan0 up' bails on fw load.
Current wl12xx code assumes that user space provides the NVS file. I'm guessing that Android has NVS file stored in chip's EEPROM. Check the !pWhalBus->pEEPROMBuf code path from TI's driver how to implement it. Should be relatively easy:
Please let me know if you have any questions. I try to get hold of pandora, it has wl1251 using SDIO, so that I could help you with testing.
Signature · 1 line
Kalle Valo
Quoted 5 lines · Kalle Valo
Quoted 1 line · Bob Copeland
So much for hubris!
Don't feel down about this, this is always difficult and you are making good progress already.
Heh, just a joke :)
Quoted 3 lines
Current wl12xx code assumes that user space provides the NVS file. I'm guessing that Android has NVS file stored in chip's EEPROM. Check the !pWhalBus->pEEPROMBuf code path from TI's driver how to implement it.
If you don't mind, check my work -- the shmFwCtrl.c code seems to do the equivalent of:
// initiate eeprom transfer wl12xx_reg_write32(wl, ACX_REG_EE_START, ACX_REG_EEPROM_START_BIT); // *** msleep(40); msleep(40);
// sets spad4 to 0, I guess this is some kind of address register? wl12xx_reg_write32(wl, ACX_EEPROMLESS_IND_REG, 0);
// everything from here on out is the same - read spad2 and 3 then boot.
*** NB: I redefined ACX_REG_EEPROM_START_BIT to BIT(0) -- BIT(1) looked wrong unless that define is meant for something else.
The state machine is kind of hard to read, but it seems like there should be more to it. Did I miss anything as far as you can tell? I get all zeros from spad2 and spad3 so it's not working with just the above...
Quoted 5 lines
Please let me know if you have any questions. I try to get hold of pandora, it has wl1251 using SDIO, so that I could help you with testing.
I'll take one too :)
Signature · 1 line
Bob Copeland %% www.bobcopeland.com
Quoted 8 lines · Bob Copeland
Quoted 5 lines · Kalle Valo
Quoted 1 line · Bob Copeland
So much for hubris!
Don't feel down about this, this is always difficult and you are making good progress already.
Heh, just a joke :)
Good :)
Quoted 5 lines
Quoted 3 lines
Current wl12xx code assumes that user space provides the NVS file. I'm guessing that Android has NVS file stored in chip's EEPROM. Check the !pWhalBus->pEEPROMBuf code path from TI's driver how to implement it.
If you don't mind, check my work
Definitely not, feel free to ask me.
Quoted 11 lines
-- the
shmFwCtrl.ccode seems to do the equivalent of:// initiate eeprom transfer wl12xx_reg_write32(wl, ACX_REG_EE_START, ACX_REG_EEPROM_START_BIT); // *** msleep(40); msleep(40);// sets spad4 to 0, I guess this is some kind of address register? wl12xx_reg_write32(wl, ACX_EEPROMLESS_IND_REG, 0); // everything from here on out is the same - read spad2 and 3 then boot.
To me the code looks same. Only difference I found was that the TI driver had only one msleep(40), but that won't make any difference.
Quoted 2 lines
*** NB: I redefined
ACX_REG_EEPROM_START_BITto BIT(0) -- BIT(1) looked wrong unless that define is meant for something else.
I think BIT(1) is wrong, most probably I introduced the bug.
Quoted 2 lines
The state machine is kind of hard to read, but it seems like there should be more to it. Did I miss anything as far as you can tell?
My understanding is that nothing else is needed, but I can be wrong.
Quoted 2 lines
I get all zeros from spad2 and spad3 so it's not working with just the above...
Not good. Can you somehow check if Google stores the NVS file to the chip or somewhere else?
Signature · 1 line
Kalle Valo
Quoted 5 lines · Kalle Valo
Quoted 2 lines
I get all zeros from spad2 and spad3 so it's not working with just the above...
Not good. Can you somehow check if Google stores the NVS file to the chip or somewhere else?
I'm guessing that the struct below is used for providing the NVS file from user space. Not sure, though.
/* TIWLN_SET_INIT_INFO request parameter
*/
typedef struct
{
tiUINT32 eeprom_image_length;
tiUINT32 firmware_image_length;
tiUINT32 init_file_length;
/* eeprom image follows */
char data[1];
/* firmware image follows */
/* init file follows */
} tiwlan_dev_init_t;
Signature · 1 line
Kalle Valo
Quoted 6 lines · Kalle Valo
Quoted 2 lines · Kalle Valo
Not good. Can you somehow check if Google stores the NVS file to the chip or somewhere else?
I'm guessing that the struct below is used for providing the NVS file from user space. Not sure, though.
Ah, indeed it does... initscript has:
service wlan_loader /system/bin/wlan_loader \
-f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration \
-i /system/etc/wifi/tiwlan.iniwlan_loader source is in CUDK dir.
Signature · 1 line
Bob Copeland %% www.bobcopeland.com