> For STA mode configure legacy basic rates according to info > mac80211 provides to us, as well as follback registers, which > are setup in vendor driver under CONFIG_STA_SUPPORT . > For LB_FBK_CFG1 register use values from vendor driver, which > are different for mt76x0 and mt76x2 . > > Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> > --- > drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > index 87ce6a51fb05..2be4b527477f 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > @@ -678,6 +678,18 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw, > tasklet_enable(&dev->pre_tbtt_tasklet); > } > > + if (changed & BSS_CHANGED_BASIC_RATES && > + vif->type == NL80211_IFTYPE_STATION) { > + mt76_wr(dev, MT_LEGACY_BASIC_RATE, info->basic_rates); > + mt76_wr(dev, MT_VHT_HT_FBK_CFG0, 0x65432100); > + mt76_wr(dev, MT_VHT_HT_FBK_CFG1, 0xedcba980); > + mt76_wr(dev, MT_LG_FBK_CFG0, 0xedcba988); > + if (is_mt76x2(dev)) > + mt76_wr(dev, MT_LG_FBK_CFG1, 0x87872100); > + else > + mt76_wr(dev, MT_LG_FBK_CFG1, 0x00872100); > + } > + since these values are constant, why not put them init_vals? Regards, Lorenzo > if (changed & BSS_CHANGED_BEACON_INT) { > mt76_rmw_field(dev, MT_BEACON_TIME_CFG, > MT_BEACON_TIME_CFG_INTVAL, > -- > 1.9.3 >