mt76x0: remove unused mt76x0_burst_read_regs
authorStanislaw Gruszka <sgruszka@redhat.com>
Sun, 9 Sep 2018 20:32:45 +0000 (22:32 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 19 Sep 2018 10:31:27 +0000 (12:31 +0200)
mt76x0_burst_read_regs is not used, but keep it for eventual use. Since
we have this function now in the driver git history, we can remove it and
eventually revert this commit it the function will be needed.

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>
drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c

index 7baa9a4..c14ae6c 100644 (file)
@@ -106,49 +106,6 @@ int mt76x0_burst_write_regs(struct mt76x0_dev *dev, u32 offset,
                                        data + cnt, n - cnt);
 }
 
-#if 0
-static int mt76x0_burst_read_regs(struct mt76x0_dev *dev, u32 base,
-                                 struct mt76_reg_pair *data, int n)
-{
-       const int max_vals_per_cmd = MT_INBAND_PACKET_MAX_LEN / 4 - 1;
-       struct mt76_usb *usb = &dev->mt76.usb;
-       struct sk_buff *skb;
-       int cnt, ret;
-
-       if (!n)
-               return 0;
-
-       cnt = min(max_vals_per_cmd, n);
-       if (cnt != n)
-               return -EINVAL;
-
-       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, base + data[0].reg);
-       skb_put_le32(skb, n);
-
-       mutex_lock(&usb->mcu.mutex);
-
-       usb->mcu.rp = data;
-       usb->mcu.rp_len = n;
-       usb->mcu.base = base;
-       usb->mcu.burst = false;
-
-       ret = __mt76u_mcu_send_msg(&dev->mt76, skb, CMD_BURST_READ, true);
-
-       usb->mcu.rp = NULL;
-
-       mutex_unlock(&usb->mcu.mutex);
-
-       consume_skb(skb);
-
-       return ret;
-}
-#endif
-
 struct mt76_fw_header {
        __le32 ilm_len;
        __le32 dlm_len;