Commit f0ff5d3a authored by Sean Wang's avatar Sean Wang Committed by Felix Fietkau

mt76: mt7921: make all event parser reusable between mt7921s and mt7921e

The longer event such as the event for mcu_get_nic_capability would hold
the data in paged fragment skb for the SDIO device so we turn the skb to
be linearized skb before accessing it to reuse the same event parser
betweem mt7921s and mt7921e.
Tested-by: default avatarDeren Wu <deren.wu@mediatek.com>
Acked-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 02fbf819
...@@ -455,7 +455,12 @@ mt7921_mcu_rx_unsolicited_event(struct mt7921_dev *dev, struct sk_buff *skb) ...@@ -455,7 +455,12 @@ mt7921_mcu_rx_unsolicited_event(struct mt7921_dev *dev, struct sk_buff *skb)
void mt7921_mcu_rx_event(struct mt7921_dev *dev, struct sk_buff *skb) void mt7921_mcu_rx_event(struct mt7921_dev *dev, struct sk_buff *skb)
{ {
struct mt7921_mcu_rxd *rxd = (struct mt7921_mcu_rxd *)skb->data; struct mt7921_mcu_rxd *rxd;
if (skb_linearize(skb))
return;
rxd = (struct mt7921_mcu_rxd *)skb->data;
if (rxd->eid == 0x6) { if (rxd->eid == 0x6) {
mt76_mcu_rx_event(&dev->mt76, skb); mt76_mcu_rx_event(&dev->mt76, skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment