mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt76x02: minor mt76x02_mac_set_beacon optimization
We do not call mt76x02_mac_set_beacon() with NULL skb any longer and we do not need to return error value. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
584c0784e0
commit
ca17e5657e
+4
-10
@@ -51,21 +51,15 @@ mt76x02_write_beacon(struct mt76x02_dev *dev, int offset, struct sk_buff *skb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mt76x02_mac_set_beacon(struct mt76x02_dev *dev,
|
||||
struct sk_buff *skb)
|
||||
void mt76x02_mac_set_beacon(struct mt76x02_dev *dev,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
int bcn_len = dev->beacon_ops->slot_size;
|
||||
int bcn_addr = MT_BEACON_BASE + (bcn_len * dev->beacon_data_count);
|
||||
int ret = 0;
|
||||
|
||||
if (skb) {
|
||||
ret = mt76x02_write_beacon(dev, bcn_addr, skb);
|
||||
if (!ret)
|
||||
dev->beacon_data_count++;
|
||||
}
|
||||
|
||||
if (!mt76x02_write_beacon(dev, bcn_addr, skb))
|
||||
dev->beacon_data_count++;
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_mac_set_beacon);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user