示例#1
0
/**
@brief		function for IPC message reception

Invokes cmd_handler for a command or recv_ipc_frames for IPC messages.

@param mld	the pointer to a mem_link_device instance
*/
static void ipc_rx_func(struct mem_link_device *mld)
{
	struct sbd_link_device *sl = &mld->sbd_link_dev;

	while (1) {
		struct mst_buff *msb;
		u16 intr;

		msb = msb_dequeue(&mld->msb_rxq);
		if (!msb)
			break;

		intr = msb->snapshot.int2ap;

		if (cmd_valid(intr))
			mld->cmd_handler(mld, int2cmd(intr));

		if (sbd_active(sl))
			recv_sbd_ipc_frames(mld);
		else
			recv_ipc_frames(mld, &msb->snapshot);

		msb_free(msb);
	}
}
static void ipc_rx_func(struct mem_link_device *mld)
{
#ifdef CONFIG_LINK_DEVICE_WITH_SBD_ARCH
	struct sbd_link_device *sl = &mld->sbd_link_dev;
#endif

	while (1) {
		struct mst_buff *msb;
		u16 intr;

		msb = msb_dequeue(&mld->msb_rxq);
		if (!msb)
			break;

		intr = msb->snapshot.int2ap;

		if (cmd_valid(intr))
			mld->cmd_handler(mld, int2cmd(intr));

#ifdef CONFIG_LINK_DEVICE_WITH_SBD_ARCH
		if (sbd_active(sl))
			recv_sbd_ipc_frames(mld, &msb->snapshot);
		else
			recv_ipc_frames(mld, &msb->snapshot);
#else
		recv_ipc_frames(mld, &msb->snapshot);
#endif

#if 0
		msb_queue_tail(&mld->msb_log, msb);
#else
		msb_free(msb);
#endif
	}
}
/**
@brief		function for IPC message reception

Invokes mem_cmd_handler for a command or recv_ipc_frames for IPC messages.

@param mld	the pointer to a mem_link_device instance
*/
static void ipc_rx_func(struct mem_link_device *mld)
{
	while (1) {
		struct mst_buff *msb;
		u16 intr;

		msb = msb_dequeue(&mld->msb_rxq);
		if (!msb)
			break;

		intr = msb->snapshot.int2ap;

		if (cmd_valid(intr))
			mem_cmd_handler(mld, int2cmd(intr));

		recv_ipc_frames(mld, &msb->snapshot);

#if 0/*defined(DEBUG_MODEM_IF)*/
		msb_queue_tail(&mld->msb_log, msb);
#else
		msb_free(msb);
#endif
	}
}