* [PATCH] mt76: verify evt type in usb mcu response
[not found] <cover.1535106415.git.lorenzo.bianconi@redhat.com>
@ 2018-08-24 10:41 ` Lorenzo Bianconi
2018-08-24 11:33 ` Kalle Valo
2018-08-31 15:54 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Lorenzo Bianconi @ 2018-08-24 10:41 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless
Verify if evt field is set to EVT_CMD_DONE in usb mcu
response messages
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/dma.h | 10 ++++++++++
drivers/net/wireless/mediatek/mt76/usb_mcu.c | 3 ++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/dma.h b/drivers/net/wireless/mediatek/mt76/dma.h
index 27248e24a19b..828e52ae70e8 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.h
+++ b/drivers/net/wireless/mediatek/mt76/dma.h
@@ -75,6 +75,16 @@ enum dma_msg_port {
DISCARD,
};
+enum mt76_mcu_evt_type {
+ EVT_CMD_DONE,
+ EVT_CMD_ERROR,
+ EVT_CMD_RETRY,
+ EVT_EVENT_PWR_RSP,
+ EVT_EVENT_WOW_RSP,
+ EVT_EVENT_CARRIER_DETECT_RSP,
+ EVT_EVENT_DFS_DETECT_RSP,
+};
+
int mt76_dma_attach(struct mt76_dev *dev);
void mt76_dma_cleanup(struct mt76_dev *dev);
diff --git a/drivers/net/wireless/mediatek/mt76/usb_mcu.c b/drivers/net/wireless/mediatek/mt76/usb_mcu.c
index 070be803d463..ebf3e7ffb26b 100644
--- a/drivers/net/wireless/mediatek/mt76/usb_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/usb_mcu.c
@@ -73,7 +73,8 @@ static int mt76u_mcu_wait_resp(struct mt76_dev *dev, u8 seq)
if (ret)
return ret;
- if (seq == FIELD_GET(MT_RX_FCE_INFO_CMD_SEQ, rxfce))
+ if (seq == FIELD_GET(MT_RX_FCE_INFO_CMD_SEQ, rxfce) &&
+ FIELD_GET(MT_RX_FCE_INFO_EVT_TYPE, rxfce) == EVT_CMD_DONE)
return 0;
dev_err(dev->dev, "error: MCU resp evt:%lx seq:%hhx-%lx\n",
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: verify evt type in usb mcu response
2018-08-24 10:41 ` [PATCH] mt76: verify evt type in usb mcu response Lorenzo Bianconi
@ 2018-08-24 11:33 ` Kalle Valo
2018-08-24 12:01 ` Lorenzo Bianconi
2018-08-31 15:54 ` Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2018-08-24 11:33 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, linux-wireless
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
> Verify if evt field is set to EVT_CMD_DONE in usb mcu
> response messages
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Does this fix a real bug or is it just a cleanup? To which tree it
should go?
--
Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: verify evt type in usb mcu response
2018-08-24 11:33 ` Kalle Valo
@ 2018-08-24 12:01 ` Lorenzo Bianconi
0 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Bianconi @ 2018-08-24 12:01 UTC (permalink / raw)
To: Kalle Valo; +Cc: Felix Fietkau, linux-wireless
>
> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>
> > Verify if evt field is set to EVT_CMD_DONE in usb mcu
> > response messages
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>
> Does this fix a real bug or is it just a cleanup? To which tree it
> should go?
Ops sorry, I forgot to mention that is a preliminary patch for usb_mcu layer
unification between mt76x0u and mt76x2u driver. It should go to
wireless-drivers-next.
Regards,
Lorenzo
>
> --
> Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: verify evt type in usb mcu response
2018-08-24 10:41 ` [PATCH] mt76: verify evt type in usb mcu response Lorenzo Bianconi
2018-08-24 11:33 ` Kalle Valo
@ 2018-08-31 15:54 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2018-08-31 15:54 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, linux-wireless
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
> Verify if evt field is set to EVT_CMD_DONE in usb mcu
> response messages. This is a preliminary patch for usb_mcu layer
> unification between mt76x0u and mt76x2u driver.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Patch applied to wireless-drivers-next.git, thanks.
ac5d5b3f199e mt76: verify evt type in usb mcu response
--
https://patchwork.kernel.org/patch/10575189/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-31 20:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1535106415.git.lorenzo.bianconi@redhat.com>
2018-08-24 10:41 ` [PATCH] mt76: verify evt type in usb mcu response Lorenzo Bianconi
2018-08-24 11:33 ` Kalle Valo
2018-08-24 12:01 ` Lorenzo Bianconi
2018-08-31 15:54 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).