diff --git a/mt76x2_main.c b/mt76x2_main.c index bb6b3a75..c3de1e73 100644 --- a/mt76x2_main.c +++ b/mt76x2_main.c @@ -327,6 +327,17 @@ mt76x2_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, int idx = key->keyidx; int ret; + /* + * The hardware does not support per-STA RX GTK, fall back + * to software mode for these. + */ + if ((vif->type == NL80211_IFTYPE_ADHOC || + vif->type == NL80211_IFTYPE_MESH_POINT) && + (key->cipher == WLAN_CIPHER_SUITE_TKIP || + key->cipher == WLAN_CIPHER_SUITE_CCMP) && + !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) + return -EOPNOTSUPP; + msta = sta ? (struct mt76x2_sta *) sta->drv_priv : NULL; wcid = msta ? &msta->wcid : &mvif->group_wcid;