mt7996_key_iter() installs the keys of an interface or a station on a link that is added. If an install fails, it warns without the key, the link or the error. mac80211 still holds the key as uploaded, so it does not encrypt frames for that link in software. Print the key index, the link and the error in the warning. Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c index 5b0f6f931de4..62b24f87d980 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c @@ -295,6 +295,7 @@ mt7996_key_iter(struct ieee80211_hw *hw, struct ieee80211_vif *vif, void *data) { struct mt7996_key_iter_data *it = data; + int err; if (sta != it->sta) return; @@ -302,7 +303,9 @@ mt7996_key_iter(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (key->link_id >= 0 && key->link_id != it->link_id) return; - WARN_ON(mt7996_set_hw_key(hw, it->cmd, vif, sta, it->link_id, key)); + err = mt7996_set_hw_key(hw, it->cmd, vif, sta, it->link_id, key); + WARN(err, "key %d not installed on link %u: %d\n", key->keyidx, + it->link_id, err); } static void mt7996_vif_link_teardown(struct mt7996_phy *phy, -- 2.47.3