提交 417a4534 编写于 作者: B Bo Jiao 提交者: Felix Fietkau

mt76: mt7915: update mt7915_chan_mib_offs for mt7916

Update v2 offset. This is an intermediate patch to add mt7916 support.
Co-developed-by: NSujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: NSujuan Chen <sujuan.chen@mediatek.com>
Co-developed-by: NRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: NRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: NBo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
上级 1c9db0aa
...@@ -3817,19 +3817,24 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy) ...@@ -3817,19 +3817,24 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
int mt7915_mcu_get_chan_mib_info(struct mt7915_phy *phy, bool chan_switch) int mt7915_mcu_get_chan_mib_info(struct mt7915_phy *phy, bool chan_switch)
{ {
/* strict order */ /* strict order */
static const enum mt7915_chan_mib_offs offs[] = { static const u32 offs[] = {
MIB_BUSY_TIME, MIB_TX_TIME, MIB_RX_TIME, MIB_OBSS_AIRTIME MIB_BUSY_TIME, MIB_TX_TIME, MIB_RX_TIME, MIB_OBSS_AIRTIME,
MIB_BUSY_TIME_V2, MIB_TX_TIME_V2, MIB_RX_TIME_V2,
MIB_OBSS_AIRTIME_V2
}; };
struct mt76_channel_state *state = phy->mt76->chan_state; struct mt76_channel_state *state = phy->mt76->chan_state;
struct mt76_channel_state *state_ts = &phy->state_ts; struct mt76_channel_state *state_ts = &phy->state_ts;
struct mt7915_dev *dev = phy->dev; struct mt7915_dev *dev = phy->dev;
struct mt7915_mcu_mib *res, req[4]; struct mt7915_mcu_mib *res, req[4];
struct sk_buff *skb; struct sk_buff *skb;
int i, ret; int i, ret, start = 0;
if (!is_mt7915(&dev->mt76))
start = 4;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
req[i].band = cpu_to_le32(phy != &dev->phy); req[i].band = cpu_to_le32(phy != &dev->phy);
req[i].offs = cpu_to_le32(offs[i]); req[i].offs = cpu_to_le32(offs[i + start]);
} }
ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD(GET_MIB_INFO), ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD(GET_MIB_INFO),
......
...@@ -161,10 +161,16 @@ struct mt7915_mcu_mib { ...@@ -161,10 +161,16 @@ struct mt7915_mcu_mib {
} __packed; } __packed;
enum mt7915_chan_mib_offs { enum mt7915_chan_mib_offs {
/* mt7915 */
MIB_BUSY_TIME = 14, MIB_BUSY_TIME = 14,
MIB_TX_TIME = 81, MIB_TX_TIME = 81,
MIB_RX_TIME, MIB_RX_TIME,
MIB_OBSS_AIRTIME = 86 MIB_OBSS_AIRTIME = 86,
/* mt7916 */
MIB_BUSY_TIME_V2 = 0,
MIB_TX_TIME_V2 = 6,
MIB_RX_TIME_V2 = 8,
MIB_OBSS_AIRTIME_V2 = 490
}; };
struct edca { struct edca {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册