testmode.c (9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e) testmode.c (78562b2cafc61a0c08dc949eacb942ac756aae37)
1// SPDX-License-Identifier: ISC
2
3#include "mt7921.h"
4#include "mcu.h"
5
6enum mt7921_testmode_attr {
7 MT7921_TM_ATTR_UNSPEC,
8 MT7921_TM_ATTR_SET,

--- 99 unchanged lines hidden (view full) ---

108 return ret;
109}
110
111int mt7921_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
112 void *data, int len)
113{
114 struct nlattr *tb[NUM_MT76_TM_ATTRS];
115 struct mt76_phy *mphy = hw->priv;
1// SPDX-License-Identifier: ISC
2
3#include "mt7921.h"
4#include "mcu.h"
5
6enum mt7921_testmode_attr {
7 MT7921_TM_ATTR_UNSPEC,
8 MT7921_TM_ATTR_SET,

--- 99 unchanged lines hidden (view full) ---

108 return ret;
109}
110
111int mt7921_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
112 void *data, int len)
113{
114 struct nlattr *tb[NUM_MT76_TM_ATTRS];
115 struct mt76_phy *mphy = hw->priv;
116 struct mt7921_phy *phy = mphy->priv;
116 struct mt792x_phy *phy = mphy->priv;
117 int err;
118
119 if (!test_bit(MT76_STATE_RUNNING, &mphy->state) ||
120 !(hw->conf.flags & IEEE80211_CONF_MONITOR))
121 return -ENOTCONN;
122
123 err = nla_parse_deprecated(tb, MT76_TM_ATTR_MAX, data, len,
124 mt76_tm_policy, NULL);

--- 20 unchanged lines hidden (view full) ---

145 return -EINVAL;
146}
147
148int mt7921_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
149 struct netlink_callback *cb, void *data, int len)
150{
151 struct nlattr *tb[NUM_MT76_TM_ATTRS];
152 struct mt76_phy *mphy = hw->priv;
117 int err;
118
119 if (!test_bit(MT76_STATE_RUNNING, &mphy->state) ||
120 !(hw->conf.flags & IEEE80211_CONF_MONITOR))
121 return -ENOTCONN;
122
123 err = nla_parse_deprecated(tb, MT76_TM_ATTR_MAX, data, len,
124 mt76_tm_policy, NULL);

--- 20 unchanged lines hidden (view full) ---

145 return -EINVAL;
146}
147
148int mt7921_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
149 struct netlink_callback *cb, void *data, int len)
150{
151 struct nlattr *tb[NUM_MT76_TM_ATTRS];
152 struct mt76_phy *mphy = hw->priv;
153 struct mt7921_phy *phy = mphy->priv;
153 struct mt792x_phy *phy = mphy->priv;
154 int err;
155
156 if (!test_bit(MT76_STATE_RUNNING, &mphy->state) ||
157 !(hw->conf.flags & IEEE80211_CONF_MONITOR) ||
158 !mt76_testmode_enabled(mphy))
159 return -ENOTCONN;
160
161 if (cb->args[2]++ > 0)

--- 35 unchanged lines hidden ---
154 int err;
155
156 if (!test_bit(MT76_STATE_RUNNING, &mphy->state) ||
157 !(hw->conf.flags & IEEE80211_CONF_MONITOR) ||
158 !mt76_testmode_enabled(mphy))
159 return -ENOTCONN;
160
161 if (cb->args[2]++ > 0)

--- 35 unchanged lines hidden ---