Skip to content

Commit

Permalink
mt76x02: disable HW encryption for group frames
Browse files Browse the repository at this point in the history
This is required to sent multicast/broadcast frames in USB AP
mode just after beacon.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Stanislaw Gruszka authored and nbd168 committed Mar 24, 2019
1 parent dcccc04 commit 5ac5289
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mt76x02_util.c
Expand Up @@ -425,6 +425,16 @@ int mt76x02_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
return -EOPNOTSUPP;

/*
* In USB AP mode, broadcast/multicast frames are setup in beacon
* data registers and sent via HW beacons engine, they require to
* be already encrypted.
*/
if (mt76_is_usb(dev) &&
vif->type == NL80211_IFTYPE_AP &&
!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
return -EOPNOTSUPP;

msta = sta ? (struct mt76x02_sta *) sta->drv_priv : NULL;
wcid = msta ? &msta->wcid : &mvif->group_wcid;

Expand Down

0 comments on commit 5ac5289

Please sign in to comment.