[][MAC80211][app][Add atenl eeprom ibf cal sync command]
[Description]
Add atenl eeprom ibf cal sync (from driver) command.
This command is for testmode command mode (iTest, golden cal) to sync
ibf cal data from driver to atenl eeprom tmp file.
If user only enter mt76-test txbf_act=e2p_update command, then only
driver's eeprom ibf cal field are updated.
[Release-log]
N/A
Change-Id: Ibadf107e1365d8d28612eaedd0d6fe4d7ec5efdb
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7778691
diff --git a/feed/atenl/src/atenl.h b/feed/atenl/src/atenl.h
index 1286c55..3641532 100644
--- a/feed/atenl/src/atenl.h
+++ b/feed/atenl/src/atenl.h
@@ -424,6 +424,7 @@
enum mt76_testmode_state state);
int atenl_nl_set_aid(struct atenl *an, u8 band, u8 aid);
int atenl_nl_precal_sync_from_driver(struct atenl *an, enum prek_ops ops);
+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);
diff --git a/feed/atenl/src/eeprom.c b/feed/atenl/src/eeprom.c
index 0182187..d40c806 100644
--- a/feed/atenl/src/eeprom.c
+++ b/feed/atenl/src/eeprom.c
@@ -541,9 +541,11 @@
} else if (!strncmp(s, "sync", 4)) {
atenl_nl_precal_sync_from_driver(an, PREK_SYNC_ALL);
}
+ } else if (!strncmp(s, "ibf sync", 8)) {
+ atenl_get_ibf_cal_result(an);
} else {
- atenl_err("Unknown eeprom command: %s\n", cmd);
- }
+ atenl_err("Unknown eeprom command: %s\n", cmd);
+ }
} else {
atenl_err("Unknown command: %s\n", cmd);
}
diff --git a/feed/atenl/src/nl.c b/feed/atenl/src/nl.c
index def663f..e0ad020 100644
--- a/feed/atenl/src/nl.c
+++ b/feed/atenl/src/nl.c
@@ -826,7 +826,7 @@
return ret;
}
-static void
+void
atenl_get_ibf_cal_result(struct atenl *an)
{
u16 offset;