[][MAC80211][WiFi6/7][app][Add eMMC support in atenl]
[Description]
Add eMMC support in atenl
1. add mtd/mmc open/write function
2. add new opt for specifying partition name and offset
Usage:
- atenl -i phy0 -c "sync eeprom all" -p <name>:<offset>
- <offset> can be specified as decimal (e.g. 2560) or
hexadecimal (0xa000)
[Release-log]
N/A
Change-Id: I10c19e15d2500cb287793a5e77f1b336eb6870a5
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/9897396
diff --git a/feed/app/atenl/src/atenl.h b/feed/app/atenl/src/atenl.h
index da3fd72..1cd5a3e 100644
--- a/feed/app/atenl/src/atenl.h
+++ b/feed/app/atenl/src/atenl.h
@@ -92,8 +92,8 @@
bool unicast;
int sock_eth;
- const char *mtd_part;
- u32 mtd_offset;
+ const char *flash_part;
+ u32 flash_offset;
u8 band_idx;
u8 *eeprom_data;
int eeprom_fd;
@@ -465,7 +465,7 @@
u16 ch, u16 center_ch1, u16 center_ch2);
int atenl_nl_process(struct atenl *an, struct atenl_data *data);
int atenl_nl_process_many(struct atenl *an, struct atenl_data *data);
-int atenl_nl_check_mtd(struct atenl *an);
+int atenl_nl_check_flash(struct atenl *an);
int atenl_nl_write_eeprom(struct atenl *an, u32 offset, u8 *val, int len);
int atenl_nl_write_efuse_all(struct atenl *an);
int atenl_nl_write_ext_eeprom_all(struct atenl *an);
@@ -477,7 +477,7 @@
void atenl_get_ibf_cal_result(struct atenl *an);
int atenl_eeprom_init(struct atenl *an, u8 phy_idx);
void atenl_eeprom_close(struct atenl *an);
-int atenl_eeprom_write_mtd(struct atenl *an);
+int atenl_eeprom_write_flash(struct atenl *an);
int atenl_eeprom_update_precal(struct atenl *an, int write_offs, int size);
int atenl_eeprom_read_from_driver(struct atenl *an, u32 offset, int len);
void atenl_eeprom_cmd_handler(struct atenl *an, u8 phy_idx, char *cmd);