/* Send pending packets to the winc under HIF thread context.  */
void winc_netif_tx_from_queue(hif_msg_t *msg)
/* Send pending packets to the winc under HIF thread context.  */
void winc_netif_tx_from_queue(hif_msg_t *msg)
{
	struct pbuf *p = (struct pbuf *)msg->pbuf;
	void *payload = msg->payload;
	uint32_t len = msg->payload_size;
	uint32_t tries = 0;
	sint8 err;
	for (;;) {
		err = m2m_wifi_send_ethernet_pkt(payload, len);		if (M2M_SUCCESS == err) {
			break;
		} else {
			if (++tries == 100) {
				break;
			}
			vTaskDelay(1);
		}
	}
	if (p)
		pbuf_free(p);}