mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: rely on mt76_mcu_msg_alloc routine
Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
0e8e53f6ad
commit
db47920ac2
@@ -13,22 +13,6 @@ struct mt7603_fw_trailer {
|
||||
__le32 dl_len;
|
||||
} __packed;
|
||||
|
||||
static struct sk_buff *mt7603_mcu_msg_alloc(const void *data, int len)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = alloc_skb(len + sizeof(struct mt7603_mcu_txd),
|
||||
GFP_KERNEL);
|
||||
if (!skb)
|
||||
return NULL;
|
||||
|
||||
skb_reserve(skb, sizeof(struct mt7603_mcu_txd));
|
||||
if (data && len)
|
||||
memcpy(skb_put(skb, len), data, len);
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
||||
void mt7603_mcu_rx_event(struct mt7603_dev *dev, struct sk_buff *skb)
|
||||
{
|
||||
skb_queue_tail(&dev->mt76.mmio.mcu.res_q, skb);
|
||||
|
||||
@@ -100,4 +100,11 @@ enum {
|
||||
MCU_EXT_EVENT_BCN_UPDATE = 0x31,
|
||||
};
|
||||
|
||||
static inline struct sk_buff *
|
||||
mt7603_mcu_msg_alloc(const void *data, int len)
|
||||
{
|
||||
return mt76_mcu_msg_alloc(data, sizeof(struct mt7603_mcu_txd),
|
||||
len, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user