[...]

> +
> +void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev,
> +                                struct ieee80211_vif *vif, bool val)
> +{
> +     u8 vif_idx = ((struct mt76x02_vif *)vif->drv_priv)->idx;
> +     struct sk_buff *skb = NULL;
> +
> +     if (mt76_is_mmio(dev))
> +             tasklet_disable(&dev->pre_tbtt_tasklet);
> +     else
> +             skb = ieee80211_beacon_get(mt76_hw(dev), vif);

I guess we can avoid to allocate the skb here if we are disabling 'beaconing'

> +
> +     __mt76x02_mac_set_beacon_enable(dev, vif_idx, val, skb);
> +
> +     if (mt76_is_mmio(dev))
> +             tasklet_enable(&dev->pre_tbtt_tasklet);
> +}

Reply via email to