diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-04-02 21:18:48 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-05-12 20:52:29 +0300 |
commit | bb31a80eb2b36cccf5d72b616381aff650ac3961 (patch) | |
tree | 0ffe0f3599aeb86bd95bb5d72b6c629f9f246b8b /drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | |
parent | 34cdf1a618eb071a62362eb79428835167630531 (diff) | |
download | linux-bb31a80eb2b36cccf5d72b616381aff650ac3961.tar.xz |
mt76: add headroom and tailroom to mt76_mcu_ops data structure
Introduce headroom and tailroom to mt76_mcu_ops data structure in order
to unify the routine used for mcu message allocation. This is a
preliminary patch to add mt7663u support
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c index 843b86560ed4..a30bb536fc8a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c @@ -123,7 +123,7 @@ mt76x02u_mcu_send_msg(struct mt76_dev *dev, int cmd, const void *data, struct sk_buff *skb; int err; - skb = mt76_mcu_msg_alloc(data, MT_CMD_HDR_LEN, len, 8); + skb = mt76_mcu_msg_alloc(dev, data, len); if (!skb) return -ENOMEM; @@ -291,6 +291,8 @@ EXPORT_SYMBOL_GPL(mt76x02u_mcu_fw_send_data); void mt76x02u_init_mcu(struct mt76_dev *dev) { static const struct mt76_mcu_ops mt76x02u_mcu_ops = { + .headroom = MT_CMD_HDR_LEN, + .tailroom = 8, .mcu_send_msg = mt76x02u_mcu_send_msg, .mcu_wr_rp = mt76x02u_mcu_wr_rp, .mcu_rd_rp = mt76x02u_mcu_rd_rp, |