On Thu, Nov 08, 2018 at 04:01:54PM +0100, Lorenzo Bianconi wrote: > > Restore behaviour on mt76x0 before commit 1bb04bb4b838 ("mt76: move > > mt76x02_init_device in mt76x02-lib module"). This will allow to use > > wcid 1 for AP when we work in station mode. It's not clear if this > > is needed, but this is how vendor driver assign wcid's in STA mode. > > This should be harmless for mt76x2. > > > > Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > > index 2be4b527477f..e624397b3d8b 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > > +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > > @@ -113,7 +113,11 @@ void mt76x02_init_device(struct mt76x02_dev *dev) > > ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES); > > ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER); > > > > - dev->mt76.global_wcid.idx = 255; > > + /* Reserve WCID 0 for mcast - thanks to this APs WCID will go to > > + * entry no. 1 like it does in the vendor driver. > > + */ > > + dev->mt76.wcid_mask[0] |= 1; > > + dev->mt76.global_wcid.idx = 0; > > dev->mt76.global_wcid.hw_key_idx = -1; > > dev->slottime = 9; > > > > Does it make any difference in AP mode? First sta will get wcid = 1 instead of 0. > What about using 0 instead of > 255 for global_wcid.idx? Patch do exactly that , it assigns: dev->mt76.global_wcid.idx = 0; Thanks Stanislaw