浏览代码

qcacmn: check linkstate_vote in hif_vote_link_down

It is not right that linkstate_vote is 0 when entering
hif_vote_link_down, this indicates there is a mismatch
for vote up/down.

Enable debug to catch such case at first time.

Change-Id: I128bc42917ca5de949ee0d0b657579c14dd96eac
CRs-Fixed: 3009469
Jingxiang Ge 3 年之前
父节点
当前提交
7e7d768c71
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      hif/src/hif_main.c

+ 4 - 0
hif/src/hif_main.c

@@ -127,6 +127,10 @@ void hif_vote_link_down(struct hif_opaque_softc *hif_ctx)
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
 
 	QDF_BUG(scn);
+	if (scn->linkstate_vote == 0)
+		QDF_DEBUG_PANIC("linkstate_vote(%d) has already been 0",
+				scn->linkstate_vote);
+
 	scn->linkstate_vote--;
 	hif_info("Down_linkstate_vote %d", scn->linkstate_vote);
 	if (scn->linkstate_vote == 0)