diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2018-09-09 22:32:46 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-09-19 12:31:28 +0200 |
commit | 331419b2ce6eb97c6a042d34bbacd79ff5fb5cf1 (patch) | |
tree | 08022df4539bfea2b3e0b51895058fc3c168a79e /drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c | |
parent | fd0c6e189d2315294bbd29107ae8e7b1b4ed2e4a (diff) |
mt76x0: remove mt76x0_burst_write_regs()
We don't need to use custom burst write regs via MCU, we can use
generic mt76_wr_copy() for the same purpose.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c index c14ae6c3e863..4a5739e056a7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c @@ -77,35 +77,6 @@ mt76x0_mcu_calibrate(struct mt76x0_dev *dev, enum mcu_calibrate cal, u32 val) return mt76_mcu_send_msg(dev, skb, CMD_CALIBRATION_OP, true); } -int mt76x0_burst_write_regs(struct mt76x0_dev *dev, u32 offset, - const u32 *data, int n) -{ - const int max_regs_per_cmd = MT_INBAND_PACKET_MAX_LEN / 4 - 1; - struct sk_buff *skb; - int cnt, i, ret; - - if (!n) - return 0; - - cnt = min(max_regs_per_cmd, n); - - skb = alloc_skb(cnt * 4 + MT_DMA_HDR_LEN + 4, GFP_KERNEL); - if (!skb) - return -ENOMEM; - skb_reserve(skb, MT_DMA_HDR_LEN); - - skb_put_le32(skb, MT_MCU_MEMMAP_WLAN + offset); - for (i = 0; i < cnt; i++) - skb_put_le32(skb, data[i]); - - ret = mt76_mcu_send_msg(dev, skb, CMD_BURST_WRITE, cnt == n); - if (ret) - return ret; - - return mt76x0_burst_write_regs(dev, offset + cnt * 4, - data + cnt, n - cnt); -} - struct mt76_fw_header { __le32 ilm_len; __le32 dlm_len; |