mt7603: rely on mt76_mcu_msg_alloc routine

Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2019-02-07 14:49:54 +01:00
committed by Felix Fietkau
parent 0e8e53f6ad
commit db47920ac2
2 changed files with 7 additions and 16 deletions
-16
View File
@@ -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);
+7
View File
@@ -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