On Jan 24, Stanislaw Gruszka wrote: > Configure beaconing on USB devices without PS buffering support. > > Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> > --- > drivers/net/wireless/mediatek/mt76/mac80211.c | 3 ++- > drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 24 ++++++++++++++++++++--- > drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2 +- > drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 8 +++++--- > 4 files changed, 29 insertions(+), 8 deletions(-) > [...] > + > +void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev, u8 vif_idx, > + bool val, struct sk_buff *skb) > +{ > + if (mt76_is_mmio(dev)) > + tasklet_disable(&dev->pre_tbtt_tasklet); > + > + __mt76x02_mac_set_beacon_enable(dev, vif_idx, val, skb); > + > + if (mt76_is_mmio(dev)) > + tasklet_enable(&dev->pre_tbtt_tasklet); > +} > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h > index 76e564b8f5da..a15fc71e3d55 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h > +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h > @@ -205,7 +205,7 @@ void mt76x02_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q, > int mt76x02_mac_set_beacon(struct mt76x02_dev *dev, u8 vif_idx, > struct sk_buff *skb); > void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev, u8 vif_idx, > - bool val); > + bool val, struct sk_buff *skb); > > void mt76x02_edcca_init(struct mt76x02_dev *dev); > #endif > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > index 741ecd723b8e..8732e07c01ad 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c > @@ -687,6 +687,7 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw, > { > struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv; > struct mt76x02_dev *dev = hw->priv; > + struct sk_buff *skb; > > mutex_lock(&dev->mt76.mutex); > > @@ -694,10 +695,11 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw, > mt76x02_mac_set_bssid(dev, mvif->idx, info->bssid); > > if (changed & BSS_CHANGED_BEACON_ENABLED) { > - tasklet_disable(&dev->pre_tbtt_tasklet); > + skb = NULL; > + if (info->enable_beacon && mt76_is_usb(dev)) > + skb = ieee80211_beacon_get(hw, vif); What about moving this in mt76x02_mac_set_beacon_enable(), I guess the code will be more readable. Moreover you can move skb pointer declaration in if (changed & BSS_CHANGED_BEACON_ENABLED) block Regards, Lorenzo > mt76x02_mac_set_beacon_enable(dev, mvif->idx, > - info->enable_beacon); > - tasklet_enable(&dev->pre_tbtt_tasklet); > + info->enable_beacon, skb); > } > > if (changed & BSS_CHANGED_HT || changed & BSS_CHANGED_ERP_CTS_PROT) > -- > 1.9.3 >