Skip to content

Commit

Permalink
mt7603: 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 9f02db7 commit 4a54ab3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mt7603_main.c
Expand Up @@ -336,6 +336,17 @@ mt7603_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
struct mt76_wcid *wcid = msta ? &msta->wcid : &mvif->sta.wcid;
int idx = key->keyidx;

/*
* 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;

if (cmd == SET_KEY) {
key->hw_key_idx = wcid->idx;
wcid->hw_key_idx = idx;
Expand Down

0 comments on commit 4a54ab3

Please sign in to comment.