Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions mt7925/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,17 @@ static int mt7925_set_link_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
link_sta = sta ? mt792x_sta_to_link_sta(vif, sta, link_id) : NULL;
mconf = mt792x_vif_to_link(mvif, link_id);
mlink = mt792x_sta_to_link(msta, link_id);

if (!link_conf || !mconf || !mlink) {
/* During MLO roaming, link state may be torn down before
* mac80211 requests key removal. If removing a key and
* the link is already gone, consider it successfully removed.
*/
if (cmd != SET_KEY)
return 0;
return -EINVAL;
}

wcid = &mlink->wcid;
wcid_keyidx = &wcid->hw_key_idx;

Expand Down