mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
wifi: mt76: mt76_usb.mt76u_mcu.burst is always false remove related code
Simplify mt76x02u_multiple_mcu_reads routine since burst is always false. Signed-off-by: Gergo Koteles <soyer@irl.hu> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
deb0f90d9d
commit
028a47cf60
2 changed files with 6 additions and 21 deletions
|
@ -527,7 +527,6 @@ struct mt76_usb {
|
|||
struct mt76_reg_pair *rp;
|
||||
int rp_len;
|
||||
u32 base;
|
||||
bool burst;
|
||||
} mcu;
|
||||
};
|
||||
|
||||
|
|
|
@ -21,29 +21,16 @@ static void
|
|||
mt76x02u_multiple_mcu_reads(struct mt76_dev *dev, u8 *data, int len)
|
||||
{
|
||||
struct mt76_usb *usb = &dev->usb;
|
||||
u32 reg, val;
|
||||
int i;
|
||||
|
||||
if (usb->mcu.burst) {
|
||||
WARN_ON_ONCE(len / 4 != usb->mcu.rp_len);
|
||||
WARN_ON_ONCE(len / 8 != usb->mcu.rp_len);
|
||||
|
||||
reg = usb->mcu.rp[0].reg - usb->mcu.base;
|
||||
for (i = 0; i < usb->mcu.rp_len; i++) {
|
||||
val = get_unaligned_le32(data + 4 * i);
|
||||
usb->mcu.rp[i].reg = reg++;
|
||||
usb->mcu.rp[i].value = val;
|
||||
}
|
||||
} else {
|
||||
WARN_ON_ONCE(len / 8 != usb->mcu.rp_len);
|
||||
for (i = 0; i < usb->mcu.rp_len; i++) {
|
||||
u32 reg = get_unaligned_le32(data + 8 * i) - usb->mcu.base;
|
||||
u32 val = get_unaligned_le32(data + 8 * i + 4);
|
||||
|
||||
for (i = 0; i < usb->mcu.rp_len; i++) {
|
||||
reg = get_unaligned_le32(data + 8 * i) -
|
||||
usb->mcu.base;
|
||||
val = get_unaligned_le32(data + 8 * i + 4);
|
||||
|
||||
WARN_ON_ONCE(usb->mcu.rp[i].reg != reg);
|
||||
usb->mcu.rp[i].value = val;
|
||||
}
|
||||
WARN_ON_ONCE(usb->mcu.rp[i].reg != reg);
|
||||
usb->mcu.rp[i].value = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -207,7 +194,6 @@ mt76x02u_mcu_rd_rp(struct mt76_dev *dev, u32 base,
|
|||
usb->mcu.rp = data;
|
||||
usb->mcu.rp_len = n;
|
||||
usb->mcu.base = base;
|
||||
usb->mcu.burst = false;
|
||||
|
||||
ret = __mt76x02u_mcu_send_msg(dev, skb, CMD_RANDOM_READ, true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue