Skip to content

Commit

Permalink
mt76x2: fall back to software crypto for IBSS/Mesh per-sta GTK
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Mar 17, 2017
1 parent c91e660 commit 9f02db7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mt76x2_main.c
Expand Up @@ -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;

Expand Down

0 comments on commit 9f02db7

Please sign in to comment.