[][MAC80211][mt76][Implement iBF command mode support in testmode]
[Description]
Add mt76-test iBF commands and update iwpriv wrapper for iBF commands.
[Release-log]
N/A
Change-Id: Ic9dac7cfa2f60ee232efde677156bf1241b4c6e8
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6502057
diff --git a/feed/atenl/src/nl.c b/feed/atenl/src/nl.c
index 85af9dc..b919356 100644
--- a/feed/atenl/src/nl.c
+++ b/feed/atenl/src/nl.c
@@ -849,7 +849,7 @@
struct nl_msg *msg = nl_priv->msg;
u32 *v = (u32 *)(hdr->data + 4);
u32 action = ntohl(v[0]);
- u16 val[8];
+ u16 val[8], is_atenl = 1;
u8 tmp_ant;
void *ptr, *a;
char cmd[64];
@@ -925,9 +925,13 @@
a = nla_nest_start(msg, MT76_TM_ATTR_TXBF_PARAM);
if (!a)
return -ENOMEM;
-
+ /* Note: litepoint may send random number for lna_gain_level, reset to 0 */
+ if (action == TXBF_ACT_IBF_PHASE_CAL)
+ val[4] = 0;
for (i = 0; i < 5; i++)
nla_put_u16(msg, i, val[i]);
+ /* Used to distinguish between command mode and HQADLL mode */
+ nla_put_u16(msg, 5, is_atenl);
nla_nest_end(msg, a);
break;
case TXBF_ACT_IBF_PHASE_E2P_UPDATE:
diff --git a/feed/atenl/src/nl.h b/feed/atenl/src/nl.h
index eaf082f..27336bd 100644
--- a/feed/atenl/src/nl.h
+++ b/feed/atenl/src/nl.h
@@ -240,8 +240,10 @@
MT76_TM_TXBF_ACT_TX_PREP,
MT76_TM_TXBF_ACT_IBF_PROF_UPDATE,
MT76_TM_TXBF_ACT_EBF_PROF_UPDATE,
+ MT76_TM_TXBF_ACT_APPLY_TX,
MT76_TM_TXBF_ACT_PHASE_CAL,
MT76_TM_TXBF_ACT_PROF_UPDATE_ALL,
+ MT76_TM_TXBF_ACT_PROF_UPDATE_ALL_CMD,
MT76_TM_TXBF_ACT_E2P_UPDATE,
/* keep last */