Search Linux Wireless

Re: [RFC/RFT 2/4] mt76x02: reserve wcid 0 for global traffic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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;
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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux