blob: 521c0b6fde89e529509ea1db597606147f82be7f [file] [log] [blame]
developer1f55fcf2024-10-17 14:52:33 +08001From d84d275ceb0ff433f58c1bbfde93267225260e84 Mon Sep 17 00:00:00 2001
developer05f3b2b2024-08-19 19:17:34 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Wed, 19 Jun 2024 12:04:46 +0800
developer1f55fcf2024-10-17 14:52:33 +08004Subject: [PATCH 146/193] mtk: mt76: mt7996: rework debug prints
developer05f3b2b2024-08-19 19:17:34 +08005
6Trim debug messages, and move some of them (especially mcu cmd) into
7tracing log.
8
developerd0c89452024-10-11 16:53:27 +08009Change-Id: I1cf15113a43990fdf201722738e32f08b9118b8f
developer05f3b2b2024-08-19 19:17:34 +080010Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
11---
12 mt76_connac_mcu.c | 1 -
13 mt7996/mac.c | 3 ---
14 mt7996/main.c | 66 ++++++++++++++++++++++++++++-------------------
15 mt7996/mcu.c | 36 +++++++++++++-------------
16 mt7996/mt7996.h | 10 ++++++-
17 5 files changed, 67 insertions(+), 49 deletions(-)
18
19diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
developer1f55fcf2024-10-17 14:52:33 +080020index b62a1ac..e4e6c0d 100644
developer05f3b2b2024-08-19 19:17:34 +080021--- a/mt76_connac_mcu.c
22+++ b/mt76_connac_mcu.c
developerd0c89452024-10-11 16:53:27 +080023@@ -428,7 +428,6 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
developer05f3b2b2024-08-19 19:17:34 +080024 }
25
26 memcpy(basic->peer_addr, link_sta->addr, ETH_ALEN);
27- pr_info("%s: link %u addr [%pM]\n", __func__, link_sta->link_id, basic->peer_addr);
28 basic->qos = link_sta->sta->wme;
29 }
30 EXPORT_SYMBOL_GPL(mt76_connac_mcu_sta_basic_tlv);
31diff --git a/mt7996/mac.c b/mt7996/mac.c
developer1f55fcf2024-10-17 14:52:33 +080032index 966cf31..0a96b5d 100644
developer05f3b2b2024-08-19 19:17:34 +080033--- a/mt7996/mac.c
34+++ b/mt7996/mac.c
developerd0c89452024-10-11 16:53:27 +080035@@ -2942,9 +2942,6 @@ void mt7996_scan_work(struct work_struct *work)
developer05f3b2b2024-08-19 19:17:34 +080036 return;
37 }
38
39- wiphy_info(hw->wiphy, "hw scan %d MHz\n",
40- req->channels[phy->scan_chan_idx]->center_freq);
41-
42 phy->scan_chan = req->channels[phy->scan_chan_idx++];
43
44 if (!req->n_ssids ||
45diff --git a/mt7996/main.c b/mt7996/main.c
developer1f55fcf2024-10-17 14:52:33 +080046index 678da02..543265a 100644
developer05f3b2b2024-08-19 19:17:34 +080047--- a/mt7996/main.c
48+++ b/mt7996/main.c
49@@ -297,6 +297,9 @@ static void mt7996_remove_bss_conf(struct ieee80211_vif *vif,
50 if (!mlink || !mconf)
51 return;
52
53+ mt76_vif_dbg(vif, "band=%u, bss_idx=%u, link_id=%u, wcid=%u\n",
54+ mconf->phy->mt76->band_idx, mconf->mt76.idx, mconf->link_id, mlink->wcid.idx);
55+
56 phy = mconf->phy;
57 dev = phy->dev;
58 mt7996_mcu_add_sta(dev, conf, mconf, NULL, mlink, false, false);
59@@ -448,8 +451,8 @@ static int mt7996_add_bss_conf(struct mt7996_phy *phy,
60 rcu_assign_pointer(mvif->link[link_id], mconf);
61 rcu_assign_pointer(mvif->sta.link[link_id], mlink);
62
63- mlo_dbg(phy, "bss_idx=%u, link_id=%u, wcid=%u\n",
64- mconf->mt76.idx, mconf->link_id, mlink->wcid.idx);
65+ mt76_vif_dbg(vif, "band=%u, bss_idx=%u, link_id=%u, wcid=%u\n",
66+ phy->mt76->band_idx, mconf->mt76.idx, mconf->link_id, mlink->wcid.idx);
67
68 return 0;
69 error:
70@@ -636,10 +639,11 @@ static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
71 add = vif->valid_links ?: BIT(0);
72 }
73
74- mlo_dbg(mt7996_hw_phy(hw), "cipher = 0x%x, icv_len = %u, iv_len = %u, hw_key_idx = %u, keyidx = %d, flags = 0x%x, link_id = %d, keylen = %u\n",
75- key->cipher, key->icv_len, key->iv_len, key->hw_key_idx, key->keyidx, key->flags, key->link_id, key->keylen);
76- // print_hex_dump(KERN_INFO , "", DUMP_PREFIX_OFFSET, 16, 1, key->key, key->keylen, false);
77- mlo_dbg(mt7996_hw_phy(hw), "add=%lx, valid_links=%x, active_links=%x\n", add, vif->valid_links, vif->active_links);
78+ if (sta)
79+ mt76_trace(vif, "keyidx=%d, link_bitmap=0x%lx (STA %pM)\n",
80+ key->keyidx, add, sta->addr);
81+ else
82+ mt76_trace(vif, "keyidx=%d, link_bitmap=0x%lx\n", key->keyidx, add);
83
84 mutex_lock(&dev->mt76.mutex);
85
developer1f55fcf2024-10-17 14:52:33 +080086@@ -1215,7 +1219,8 @@ static int mt7996_add_link_sta(struct mt7996_dev *dev,
developer05f3b2b2024-08-19 19:17:34 +080087 rcu_assign_pointer(dev->mt76.wcid[idx], &mlink->wcid);
88 mt76_wcid_init(&mlink->wcid);
89
90- mlo_dbg(mconf->phy, "wcid=%u, link_id=%u, link_addr=%pM, pri_link=%u, sec_link=%u\n", mlink->wcid.idx, link_id, link_sta->addr, msta->pri_link, msta->sec_link);
91+ mt76_vif_dbg(conf->vif, "STA %pM, wcid=%u, link_id=%u (%pM), pri_link=%u, sec_link=%u\n",
92+ sta->addr, mlink->wcid.idx, link_id, link_sta->addr, msta->pri_link, msta->sec_link);
93 }
94
95 if (!assoc)
developer1f55fcf2024-10-17 14:52:33 +080096@@ -1254,7 +1259,7 @@ mt7996_mac_sta_remove_links(struct mt7996_dev *dev, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +080097 if (!ieee80211_vif_is_mld(vif) || rem == sta->valid_links)
98 cancel_delayed_work(&mvif->beacon_mon_work);
99
100- mlo_dbg(mt7996_hw_phy(mvif->hw), "rem=%lu\n", rem);
101+ mt76_vif_dbg(vif, "removed_links=0x%lx\n", rem);
102 for_each_set_bit(link_id, &rem, IEEE80211_MLD_MAX_NUM_LINKS) {
103 struct mt7996_bss_conf *mconf =
104 mconf_dereference_protected(mvif, link_id);
developer1f55fcf2024-10-17 14:52:33 +0800105@@ -1281,7 +1286,7 @@ mt7996_mac_sta_add_links(struct mt7996_dev *dev, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +0800106 unsigned int link_id;
107 int i, ret;
108
109- mlo_dbg(mt7996_hw_phy(mvif->hw), "add=%lu, assoc=%d\n", add, assoc);
110+ mt76_vif_dbg(vif, "added_links=0x%lx, assoc=%d\n", add, assoc);
111 for_each_set_bit(link_id, &add, IEEE80211_MLD_MAX_NUM_LINKS) {
112 struct mt7996_bss_conf *mconf =
113 mconf_dereference_protected(mvif, link_id);
developer1f55fcf2024-10-17 14:52:33 +0800114@@ -1290,6 +1295,9 @@ mt7996_mac_sta_add_links(struct mt7996_dev *dev, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +0800115 struct ieee80211_link_sta *link_sta =
116 link_sta_dereference_protected(sta, link_id);
117
118+ if (!mconf || !conf || !link_sta)
119+ continue;
120+
121 ret = mt7996_add_link_sta(dev, conf, mconf, link_sta, assoc);
122 if (ret)
123 goto error;
developer1f55fcf2024-10-17 14:52:33 +0800124@@ -1460,13 +1468,13 @@ static void mt7996_tx(struct ieee80211_hw *hw,
developer05f3b2b2024-08-19 19:17:34 +0800125 rcu_dereference(sta->link[link_id]);
126
127 if (!link_sta) {
128- mlo_dbg(mt7996_hw_phy(mvif->hw), "request TX on invalid link_id=%u, use primary link (id=%u) instead.\n",
129- link_id, msta->pri_link);
130+ mt76_vif_dbg(vif, "request TX on invalid link_id=%u, use primary link (id=%u) instead.\n",
131+ link_id, msta->pri_link);
132 link_id = msta->pri_link;
133 link_sta = rcu_dereference(sta->link[link_id]);
134
135 if (!link_sta) {
136- mlo_dbg(mt7996_hw_phy(mvif->hw), "primary link became invalid, give up the TX\n");
137+ mt76_vif_dbg(vif, "primary link became invalid, give up the TX\n");
138 goto unlock;
139 }
140 }
developer1f55fcf2024-10-17 14:52:33 +0800141@@ -2498,6 +2506,7 @@ mt7996_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +0800142 struct mt7996_bss_conf *mconf;
143 int ret;
144
145+ mt76_vif_dbg(vif, "trigger scan on mt76 band %u\n", phy->mt76->band_idx);
146 mutex_lock(&phy->dev->mt76.mutex);
147 if (WARN_ON(phy->scan_req || phy->scan_chan)) {
148 mutex_unlock(&phy->dev->mt76.mutex);
developer1f55fcf2024-10-17 14:52:33 +0800149@@ -2627,7 +2636,7 @@ mt7996_add_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf)
developer05f3b2b2024-08-19 19:17:34 +0800150 struct mt7996_chanctx *ctx = mt7996_chanctx_get(conf);
151 int ret;
152
153- wiphy_info(hw->wiphy, "%s: add %u\n", __func__, conf->def.chan->hw_value);
154+ mt76_dbg(hw, "add %u on mt76 band %d\n", conf->def.chan->hw_value, phy->mt76->band_idx);
155 mutex_lock(&phy->dev->mt76.mutex);
156
157 if (ctx->assigned) {
developer1f55fcf2024-10-17 14:52:33 +0800158@@ -2666,7 +2675,7 @@ mt7996_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *co
developer05f3b2b2024-08-19 19:17:34 +0800159 struct mt7996_chanctx *ctx = mt7996_chanctx_get(conf);
160 struct mt7996_phy *phy = ctx->phy;
161
162- wiphy_info(hw->wiphy, "%s: remove %u\n", __func__, conf->def.chan->hw_value);
163+ mt76_dbg(hw, "remove %u\n", conf->def.chan->hw_value);
164 cancel_delayed_work_sync(&phy->scan_work);
165 cancel_delayed_work_sync(&phy->mt76->mac_work);
166
developer1f55fcf2024-10-17 14:52:33 +0800167@@ -2686,13 +2695,14 @@ mt7996_change_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *co
developer05f3b2b2024-08-19 19:17:34 +0800168 struct mt7996_chanctx *ctx = mt7996_chanctx_get(conf);
169 struct mt7996_phy *phy = ctx->phy;
170
171- wiphy_info(hw->wiphy, "%s: change %u, 0x%x\n", __func__, conf->def.chan->hw_value, changed);
172 if (changed & IEEE80211_CHANCTX_CHANGE_WIDTH ||
173 changed & IEEE80211_CHANCTX_CHANGE_RADAR) {
174 ctx->chandef = conf->def;
175 phy->mt76->radar_enabled = conf->radar_enabled;
176
177 mt7996_set_channel(phy, &ctx->chandef);
178+
179+ mt76_dbg(hw, "change to %u, 0x%x\n", conf->def.chan->hw_value, changed);
180 }
181 }
182
developer1f55fcf2024-10-17 14:52:33 +0800183@@ -2708,9 +2718,8 @@ mt7996_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +0800184 u8 link_id = link_conf->link_id;
185 int ret;
186
187- wiphy_info(hw->wiphy, "Assign VIF (addr: %pM, type: %d, link_id: %d) to channel context: %d MHz\n",
188- vif->addr, vif->type, link_conf->link_id,
189- conf->def.chan->center_freq);
190+ mt76_vif_dbg(vif, "assign link_id %u to %d MHz\n", link_conf->link_id,
191+ conf->def.chan->center_freq);
192
193 mutex_lock(&phy->dev->mt76.mutex);
194
developer1f55fcf2024-10-17 14:52:33 +0800195@@ -2750,9 +2759,8 @@ mt7996_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +0800196 struct mt7996_chanctx *ctx = mt7996_chanctx_get(conf);
197 struct mt7996_phy *phy = ctx->phy;
198
199- wiphy_info(hw->wiphy, "Remove VIF (addr: %pM, type: %d, link_id: %d) from channel context: %d MHz\n",
200- vif->addr, vif->type, link_conf->link_id,
201- conf->def.chan->center_freq);
202+ mt76_vif_dbg(vif, "remove link %u from %d MHz\n",
203+ link_conf->link_id, conf->def.chan->center_freq);
204 cancel_delayed_work_sync(&phy->scan_work);
205
206 mutex_lock(&phy->dev->mt76.mutex);
developer1f55fcf2024-10-17 14:52:33 +0800207@@ -2781,9 +2789,15 @@ mt7996_switch_vif_chanctx(struct ieee80211_hw *hw,
developer05f3b2b2024-08-19 19:17:34 +0800208 if (vifs[i].old_ctx == vifs[i].new_ctx)
209 continue;
210
211- wiphy_info(hw->wiphy, "%s: old=%d, new=%d\n",
212- __func__, vifs[i].old_ctx->def.chan->hw_value,
213- vifs[i].new_ctx->def.chan->hw_value);
214+ mt76_vif_dbg(vifs[i].vif,
215+ "chan=%d->%d, width=%d->%d, punct_bitmap=0x%04x->0x%04x, link=%u\n",
216+ vifs[i].old_ctx->def.chan->hw_value,
217+ vifs[i].new_ctx->def.chan->hw_value,
218+ vifs[i].old_ctx->def.width,
219+ vifs[i].new_ctx->def.width,
220+ vifs[i].old_ctx->def.punctured,
221+ vifs[i].new_ctx->def.punctured,
222+ vifs[i].link_conf->link_id);
223
224 mutex_lock(&dev->mt76.mutex);
225
developer1f55fcf2024-10-17 14:52:33 +0800226@@ -2833,7 +2847,7 @@ mt7996_change_vif_links(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +0800227 unsigned int link_id;
228 int ret = 0;
229
230- mlo_dbg(phy, "old=%u, new=%u\n", old_links, new_links);
231+ mt76_vif_dbg(vif, "old=0x%x, new=0x%x\n", old_links, new_links);
232 if (old_links == new_links)
233 return 0;
234
developer1f55fcf2024-10-17 14:52:33 +0800235@@ -2879,7 +2893,7 @@ mt7996_change_sta_links(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +0800236 unsigned long rem = old_links & ~new_links;
237 int ret = 0;
238
239- mlo_dbg(mt7996_hw_phy(hw), "old=%u, new=%u\n", old_links, new_links);
240+ mt76_vif_dbg(vif, "STA %pM old=0x%x, new=0x%x\n", sta->addr, old_links, new_links);
241 mutex_lock(&dev->mt76.mutex);
242
243 if (rem)
244diff --git a/mt7996/mcu.c b/mt7996/mcu.c
developer1f55fcf2024-10-17 14:52:33 +0800245index 3a356b9..5461fb1 100644
developer05f3b2b2024-08-19 19:17:34 +0800246--- a/mt7996/mcu.c
247+++ b/mt7996/mcu.c
developerd0c89452024-10-11 16:53:27 +0800248@@ -387,7 +387,6 @@ mt7996_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
developer05f3b2b2024-08-19 19:17:34 +0800249 if (!link_conf || !link_conf->csa_active || vif->type == NL80211_IFTYPE_STATION)
250 return;
251
252- pr_info("%s: link_id=%d\n", __func__, link_id);
253 mvif->cs_ready_links = 0;
254 mvif->cs_link_id = IEEE80211_LINK_UNSPECIFIED;
255 ieee80211_csa_finish(vif, link_id);
developerd0c89452024-10-11 16:53:27 +0800256@@ -1513,8 +1512,8 @@ mt7996_mcu_bss_mld_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
developer05f3b2b2024-08-19 19:17:34 +0800257 }
258
259 mld->own_mld_id = mconf->own_mld_id;
260- pr_info("%s: group_mld_id=%d own_mld_id=%d remap_idx=%d mld->addr[%pM]\n",
261- __func__, mld->group_mld_id, mld->own_mld_id, mld->remap_idx, mld->mac_addr);
262+ mt76_trace(vif, "group_mld_id=%d, own_mld_id=%d, remap_idx=%d, mld->addr[%pM]\n",
263+ mld->group_mld_id, mld->own_mld_id, mld->remap_idx, mld->mac_addr);
264 }
265
266 static void
developerd0c89452024-10-11 16:53:27 +0800267@@ -1667,8 +1666,8 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, struct ieee80211_bss_conf *conf,
developer05f3b2b2024-08-19 19:17:34 +0800268
269 memcpy(bss->bssid, conf->bssid, ETH_ALEN);
270
271- mlo_dbg(mconf->phy, "omac_idx=%d band_idx=%d wmm_idx=%d bss->bssid=%pM enable=%d\n",
272- bss->omac_idx, bss->band_idx, bss->wmm_idx, bss->bssid, enable);
273+ mt76_trace(vif, "band=%d, omac=%d, wmm_idx=%d, bssid=%pM, link=%d, en=%d\n",
274+ bss->band_idx, bss->omac_idx, bss->wmm_idx, bss->bssid, conf->link_id, enable);
275
276 bss->bcn_interval = cpu_to_le16(conf->beacon_int);
277 bss->dtim_period = conf->dtim_period;
developerd0c89452024-10-11 16:53:27 +0800278@@ -1807,8 +1806,6 @@ mt7996_mcu_sta_tx_cap(struct mt7996_dev *dev, struct mt76_vif *mvif,
developer05f3b2b2024-08-19 19:17:34 +0800279 tx_cap = (struct sta_rec_tx_cap *)tlv;
280 tx_cap->ampdu_limit_en = true;
281
282- dev_info(dev->mt76.dev, "%s: limit wcid %d ampdu to 512\n", __func__, wcid->idx);
283-
284 return mt76_mcu_skb_send_msg(&dev->mt76, skb,
285 MCU_WMWA_UNI_CMD(STA_REC_UPDATE), true);
286 }
developerd0c89452024-10-11 16:53:27 +0800287@@ -2968,8 +2965,8 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_bss_conf *conf,
288 conn_state = enable ? CONN_STATE_PORT_SECURE : CONN_STATE_DISCONNECT;
developer05f3b2b2024-08-19 19:17:34 +0800289 mt76_connac_mcu_sta_basic_tlv(&dev->mt76, skb, conf, link_sta,
developerd0c89452024-10-11 16:53:27 +0800290 conn_state, newly);
291- mlo_dbg(mconf->phy, "link=%u, newly=%d, conn_state=%d\n",
292- mlink->wcid.link_id, newly, conn_state);
293+ mt76_trace(vif, "link=%u, wcid=%u, newly=%d, conn_state=%d\n",
294+ mlink->wcid.link_id, mlink->wcid.idx, newly, conn_state);
developer05f3b2b2024-08-19 19:17:34 +0800295
296 if (!enable)
297 goto out;
developerd0c89452024-10-11 16:53:27 +0800298@@ -3029,6 +3026,8 @@ mt7996_mcu_sta_mld_setup_tlv(struct mt7996_dev *dev, struct sk_buff *skb,
developer05f3b2b2024-08-19 19:17:34 +0800299 struct tlv *tlv;
300 unsigned long valid_links = sta->valid_links;
301 unsigned int link_id;
302+ struct ieee80211_vif *vif = container_of((void *)msta->vif, struct ieee80211_vif,
303+ drv_priv);
304
305 mlink = mlink_dereference_protected(msta, msta->pri_link);
306 if (!mlink)
developerd0c89452024-10-11 16:53:27 +0800307@@ -3052,15 +3051,16 @@ mt7996_mcu_sta_mld_setup_tlv(struct mt7996_dev *dev, struct sk_buff *skb,
developer05f3b2b2024-08-19 19:17:34 +0800308 mld_setup->link_num = hweight16(sta->valid_links);
309
310 mld_setup_link = (struct mld_setup_link *)mld_setup->link_info;
311- mlo_dbg(mt7996_hw_phy(mlink->sta->vif->hw), "pri_link(%u) primary_id(%d) seconed_id(%d) wcid(%d), link_num(%d), mld_addr[%pM]\n",
312- msta->pri_link, mld_setup->primary_id, mld_setup->seconed_id, mld_setup->setup_wcid, mld_setup->link_num, mld_setup->mld_addr);
313+ mt76_trace(vif, "STA %pM pri_link=%u, pri_wcid=%u, sec_link=%u, sec_wcid=%u\n",
314+ sta->addr, msta->pri_link, le16_to_cpu(mld_setup->primary_id),
315+ msta->sec_link, le16_to_cpu(mld_setup->seconed_id));
316 for_each_set_bit(link_id, &valid_links, IEEE80211_MLD_MAX_NUM_LINKS) {
317 mlink = mlink_dereference_protected(msta, link_id);
318 mconf = mconf_dereference_protected(msta->vif, link_id);
319
320 mld_setup_link->wcid = cpu_to_le16(mlink->wcid.idx);
321 mld_setup_link->bss_idx = mconf->mt76.idx;
322- mlo_dbg(mt7996_hw_phy(mlink->sta->vif->hw), "link_id(%d) wcid(%d) bss_idx(%d)\n",
323+ mt76_trace(vif, "link_id(%d) wcid(%d) bss_idx(%d)\n",
324 link_id, mld_setup_link->wcid, mld_setup_link->bss_idx);
325 mld_setup_link++;
326 }
developerd0c89452024-10-11 16:53:27 +0800327@@ -3326,8 +3326,8 @@ int mt7996_mcu_add_dev_info(struct mt7996_phy *phy,
developer05f3b2b2024-08-19 19:17:34 +0800328 return mt7996_mcu_muar_config(phy, conf, mconf, false, enable);
329
330 memcpy(data.tlv.omac_addr, conf->addr, ETH_ALEN);
331- mlo_dbg(phy, "omac=%u, band=%u, addr=%pM, en=%d\n",
332- data.hdr.omac_idx,data.hdr.band_idx, data.tlv.omac_addr, enable);
333+ mt76_trace(conf->vif, "band=%u, omac=%u, addr=%pM, en=%d\n",
334+ data.hdr.band_idx, data.hdr.omac_idx, data.tlv.omac_addr, enable);
335 return mt76_mcu_send_msg(&dev->mt76, MCU_WMWA_UNI_CMD(DEV_INFO_UPDATE),
336 &data, sizeof(data), true);
337 }
developerd0c89452024-10-11 16:53:27 +0800338@@ -6559,10 +6559,10 @@ int mt7996_mcu_set_eml_omn(struct ieee80211_hw *hw,
developer05f3b2b2024-08-19 19:17:34 +0800339 }
340 }
341
342- mlo_dbg(mconf->phy, "link:%u, wcid:%d, control:%x, mode:%d, bmp:%x\n",
343- mlink->wcid.link_id, mlink->wcid.idx, eml_omn->control,
344- !!(eml_omn->control & EML_OMN_CONTROL_EMLSR_MODE),
345- eml_op->bitmap);
346+ mt76_vif_dbg(vif, "link:%u, wcid:%d, control:%x, mode:%d, bmp:%x\n",
347+ mlink->wcid.link_id, mlink->wcid.idx, eml_omn->control,
348+ !!(eml_omn->control & EML_OMN_CONTROL_EMLSR_MODE),
349+ eml_op->bitmap);
350
351 return mt76_mcu_skb_send_msg(&dev->mt76, skb,
352 MCU_WMWA_UNI_CMD(STA_REC_UPDATE), true);
353diff --git a/mt7996/mt7996.h b/mt7996/mt7996.h
developer1f55fcf2024-10-17 14:52:33 +0800354index c20206c..d56d971 100644
developer05f3b2b2024-08-19 19:17:34 +0800355--- a/mt7996/mt7996.h
356+++ b/mt7996/mt7996.h
developerd0c89452024-10-11 16:53:27 +0800357@@ -986,7 +986,15 @@ mt7996_get_link_wcid(struct mt7996_dev *dev, u16 idx, u8 band_idx)
developer05f3b2b2024-08-19 19:17:34 +0800358 return &mlink->wcid;
359 }
360
361-#define mlo_dbg(phy, fmt, ...) wiphy_info(phy->mt76->hw->wiphy, "%s: " fmt, __func__, ##__VA_ARGS__)
362+#define mt76_dbg(hw, fmt, ...) wiphy_info(hw->wiphy, "%s: " fmt, __func__, ##__VA_ARGS__)
363+#define mt76_vif_dbg(vif, fmt, ...) \
364+ pr_info("%s: %s: " fmt, \
365+ ieee80211_vif_to_wdev(vif)->netdev->name, \
366+ __func__, ##__VA_ARGS__)
367+#define mt76_trace(vif, fmt, ...) \
368+ trace_printk("(%s) " fmt, \
369+ ieee80211_vif_to_wdev(vif)->netdev->name, \
370+ ##__VA_ARGS__)
371
372 extern const struct ieee80211_ops mt7996_ops;
373 extern struct pci_driver mt7996_pci_driver;
374--
developerd0c89452024-10-11 16:53:27 +08003752.45.2
developer05f3b2b2024-08-19 19:17:34 +0800376