Search Linux Wireless

[PATCH 2/2] mt76: mt7915: improve logging around unhandled events.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Greear <greearb@xxxxxxxxxxxxxxx>

It would be good to know of events that firmware is sending that
the driver does not currently handle.

Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
---
 .../net/wireless/mediatek/mt76/mt76_connac_mcu.h   |  1 +
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c    | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
index c3c93338d56a..272b107b7e91 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
@@ -820,6 +820,7 @@ enum {
 	MCU_EXT_EVENT_CSA_NOTIFY = 0x4f,
 	MCU_EXT_EVENT_BCC_NOTIFY = 0x75,
 	MCU_EXT_EVENT_MURU_CTRL = 0x9f,
+	MCU_EXT_EVENT_IGMP_FLOODING = 0xBD, /* Seen on 7915 */
 };
 
 enum {
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index d09cf89c4505..83af8e2ca95f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -487,7 +487,13 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
 	case MCU_EXT_EVENT_BCC_NOTIFY:
 		mt7915_mcu_rx_bcc_notify(dev, skb);
 		break;
+	case MCU_EXT_EVENT_IGMP_FLOODING:
+	case MCU_EXT_EVENT_PS_SYNC:
+		/* ignore some we know we do not care about */
+		break;
 	default:
+		/* in SDK, grep for EventExtEventHandler */
+		dev_info(dev->mt76.dev, "mt7915, unhandled rx_ext_event: 0x%x", rxd->ext_eid);
 		break;
 	}
 }
@@ -502,6 +508,7 @@ mt7915_mcu_rx_unsolicited_event(struct mt7915_dev *dev, struct sk_buff *skb)
 		mt7915_mcu_rx_ext_event(dev, skb);
 		break;
 	default:
+		dev_info(dev->mt76.dev, "mt7915, unhandled unsolicited event: 0x%x", rxd->eid);
 		break;
 	}
 	dev_kfree_skb(skb);
@@ -2090,7 +2097,7 @@ static int mt7915_load_patch(struct mt7915_dev *dev)
 	case PATCH_NOT_DL_SEM_SUCCESS:
 		break;
 	default:
-		dev_err(dev->mt76.dev, "Failed to get patch semaphore\n");
+		dev_err(dev->mt76.dev, "Failed to get patch semaphore: %d", sem);
 		return -EAGAIN;
 	}
 
@@ -2530,8 +2537,11 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
 	}
 
 	ret = mt7915_load_firmware(dev);
-	if (ret)
+	if (ret) {
+		dev_info(dev->mt76.dev, "mcu-init: Failed to load firmware, err: %d",
+			 ret);
 		return ret;
+	}
 
 	set_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);
 
-- 
2.20.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux