Commit d98fb328 authored by Felix Fietkau's avatar Felix Fietkau Committed by Kalle Valo

mt76: fix sending encrypted broadcast packets for secondary interfaces

For encryption to work properly, the BSS index needs to be initialized
for the WCID entry used for the interface.
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 0d45d3fe
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
#define MT_CALIBRATE_INTERVAL HZ #define MT_CALIBRATE_INTERVAL HZ
#define MT_MAX_VIFS 8
#define MT_VIF_WCID(_n) (254 - ((_n) & 7))
#include "mt76.h" #include "mt76.h"
#include "mt76x2_regs.h" #include "mt76x2_regs.h"
#include "mt76x2_mac.h" #include "mt76x2_mac.h"
......
...@@ -296,6 +296,9 @@ static int mt76x2_mac_reset(struct mt76x2_dev *dev, bool hard) ...@@ -296,6 +296,9 @@ static int mt76x2_mac_reset(struct mt76x2_dev *dev, bool hard)
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
mt76x2_mac_wcid_setup(dev, i, 0, NULL); mt76x2_mac_wcid_setup(dev, i, 0, NULL);
for (i = 0; i < MT_MAX_VIFS; i++)
mt76x2_mac_wcid_setup(dev, MT_VIF_WCID(i), i, NULL);
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
for (k = 0; k < 4; k++) for (k = 0; k < 4; k++)
mt76x2_mac_shared_key_setup(dev, i, k, NULL); mt76x2_mac_shared_key_setup(dev, i, k, NULL);
......
...@@ -104,7 +104,7 @@ mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) ...@@ -104,7 +104,7 @@ mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
idx += 8; idx += 8;
mvif->idx = idx; mvif->idx = idx;
mvif->group_wcid.idx = 254 - idx; mvif->group_wcid.idx = MT_VIF_WCID(idx);
mvif->group_wcid.hw_key_idx = -1; mvif->group_wcid.hw_key_idx = -1;
mt76x2_txq_init(dev, vif->txq); mt76x2_txq_init(dev, vif->txq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment