Message ID | 1541688430-31855-3-git-send-email-sgruszka@redhat.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Kalle Valo |
Headers | show |
Series | restore some old mt76x0u behaviour | expand |
> 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@redhat.com> > --- > 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? What about using 0 instead of 255 for global_wcid.idx? Regards, Lorenzo > -- > 1.9.3 >
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@redhat.com> > > --- > > 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
On 2018-11-08 16:54, Stanislaw Gruszka wrote: > 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@redhat.com> >> > --- >> > 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; I don't think we should reserve WCID0 just because the vendor driver does it, unless we can find a case where it actually makes a meaningful difference. WCID entries >128 are useless for normal stations, so let's use those for reserved entries instead of reducing the effective station number limit. - Felix
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;
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@redhat.com> --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)