wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
/* unsigned long flags; */
- /* p->os_func.os_spin_lock(p->txq_spinlock, &flags); */
if (tqe == p->txq_head) {
p->txq_head = tqe->next;
tqe->next->prev = tqe->prev;
}
p->txq_entries -= 1;
- /* p->os_func.os_spin_unlock(p->txq_spinlock, &flags); */
}
unsigned long flags;
p->os_func.os_spin_lock(p->txq_spinlock, &flags);
if (p->txq_head) {
- /* p->os_func.os_enter_cs(p->txq_lock); */
tqe = p->txq_head;
p->txq_head = tqe->next;
if (p->txq_head) {
/*Added by Amr - BugID_4720*/
- /* p->os_func.os_leave_cs(p->txq_lock); */
} else {
tqe = NULL;
/*Added by Amr - BugID_4720*/
p->os_func.os_spin_lock(p->txq_spinlock, &flags);
-/* p->os_func.os_enter_cs(p->txq_lock); */
if (p->txq_head == NULL) {
tqe->next = NULL;
tqe->prev = NULL;
p->txq_head = tqe;
p->txq_tail = tqe;
- /* p->os_func.os_signal(p->txq_wait); */
} else {
tqe->next = NULL;
tqe->prev = p->txq_tail;
}
p->txq_entries += 1;
PRINT_D(TX_DBG, "Number of entries in TxQ = %d\n", p->txq_entries);
-/* p->os_func.os_leave_cs(p->txq_lock); */
/*Added by Amr - BugID_4720*/
p->os_func.os_spin_unlock(p->txq_spinlock, &flags);
p->os_func.os_spin_lock(p->txq_spinlock, &flags);
- /* p->os_func.os_enter_cs(p->txq_lock); */
if (p->txq_head == NULL) {
tqe->next = NULL;
tqe->prev = NULL;
}
p->txq_entries += 1;
PRINT_D(TX_DBG, "Number of entries in TxQ = %d\n", p->txq_entries);
- /* p->os_func.os_leave_cs(p->txq_lock); */
/*Added by Amr - BugID_4720*/
p->os_func.os_spin_unlock(p->txq_spinlock, &flags);
**/
p->os_func.os_signal(p->txq_wait);
PRINT_D(TX_DBG, "Wake up the txq_handler\n");
-/* complete(p->txq_wait); */
/*Added by Amr - BugID_4720*/
return 0;
uint16_t src_port;
uint16_t dst_port;
uint16_t status;
- /* struct Ack_session_info * next; */
- /* struct Ack_session_info * prev; */
} Ack_session_info_t;
typedef struct {
uint32_t ack_num;
- /* uint32_t seq_num; */
- /* uint16_t src_port; */
- /* uint16_t dst_port; */
- /* uint32_t dst_ip_addr; */
uint32_t Session_index;
struct txq_entry_t *txqe;
- /* Ack_session_info * Ack_session; */
} Pending_Acks_info_t /*Ack_info_t*/;
static __inline int Init_TCP_tracking(void)
{
- /*uint32_t i;
- * Free_head=&Acks_keep_track_info[0];
- * i=1;
- * Acks_keep_track_info[0].next=&Acks_keep_track_info[1];
- * for(i=1<;i<MAX_TCP_SESSION-1;i++)
- * {
- * Acks_keep_track_info[i].next=&Acks_keep_track_info[i+1];
- * Acks_keep_track_info[i].prev=&Acks_keep_track_info[i-1];
- * }
- * Acks_keep_track_info[49].prev=&Acks_keep_track_info[48];
- */
return 0;
}
tqe->tx_complete_func(tqe->priv, tqe->status);
p->os_func.os_free(tqe);
Dropped++;
- /* p->txq_entries -= 1; */
}
}
}
/*Edited by Amr - BugID_4720*/
if (wilc_wlan_txq_add_to_head(tqe))
return 0;
- /* wilc_wlan_txq_add_to_tail(tqe); */
return 1;
}
/*Added by Amr - BugID_4720*/
p->os_func.os_spin_lock(p->txq_spinlock, &flags);
- /* p->os_func.os_enter_cs(p->txq_lock); */
tqe = p->txq_head;
/*Added by Amr - BugID_4720*/
p->os_func.os_spin_unlock(p->txq_spinlock, &flags);
- /* p->os_func.os_leave_cs(p->txq_lock); */
return tqe;
}
/*Added by Amr - BugID_4720*/
p->os_func.os_spin_lock(p->txq_spinlock, &flags);
- /* p->os_func.os_enter_cs(p->txq_lock); */
tqe = tqe->next;
-
/*Added by Amr - BugID_4720*/
p->os_func.os_spin_unlock(p->txq_spinlock, &flags);
- /* p->os_func.os_leave_cs(p->txq_lock); */
return tqe;
}
do {
/* Wait for the chip to stabilize*/
-/* WILC_Sleep(2); */
mdelay(3);
/* Make sure chip is awake. This is an extra step that can be removed */
#ifdef BIG_ENDIAN
vmm_table[i] = BYTE_SWAP(vmm_table[i]);
#endif
- /* p->hif_func.hif_write_reg(0x1160,vmm_table[0]); */
- /* wilc_debug(N_TXQ, "[wilc txq]: vmm table[%d] = %08x\n", i, vmm_table[i]); */
i++;
sum += vmm_sz;
PRINT_D(TX_DBG, "sum = %d\n", sum);
header &= ~(1 << 30);
}
#endif
- /*else if(tqe->type == WILC_DATA_PKT_MAC_HDR)
- * {
- * header |= (1<< 29);
- * }*/
- /* wilc_debug(N_TXQ, "[wilc txq]: header (%08x), real size (%d), vmm size (%d)\n", header, tqe->buffer_size, vmm_sz); */
#ifdef BIG_ENDIAN
header = BYTE_SWAP(header);
if (ret != 1)
break;
} while (0);
- /* remove_TCP_related(); */
/*Added by Amr - BugID_4720*/
p->os_func.os_signal(p->txq_add_to_head_lock);
else
#endif
{
- /* wilc_debug(N_RXQ, "[wilc rxq]: packet, tp len(%d), len (%d), offset (%d), cfg (%d)\n", tp_len, pkt_len, pkt_offset, is_cfg_packet); */
if (!is_cfg_packet) {
if (p->cfg_seq_no == rsp.seq_no) {
p->os_func.os_signal(p->cfg_wait);
}
- /* p->os_func.os_signal(p->cfg_wait); */
} else if (rsp.type == WILC_CFG_RSP_STATUS) {
/**
* Call back to indicate status...
* Go...
**/
- /* p->hif_func.hif_write_reg(0x150014, reg); */
p->hif_func.hif_read_reg(WILC_GLB_RESET_0, ®);
if ((reg & (1ul << 10)) == (1ul << 10)) {
int ret;
p->quit = 1;
- /**
- * wait for queue end
- **/
- /* p->os_func.os_signal(p->txq_wait); */
- /* p->os_func.os_signal(p->rxq_wait); */
-
- /* complete(p->txq_wait); */
- /* complete(p->rxq_wait); */
- /*do {
- * if (p->txq_exit && p->rxq_exit)
- * break;
- * } while (1);*/
-
- /**
- * clean up the queue
- **/
do {
tqe = wilc_wlan_txq_remove_from_head();
if (tqe == NULL)
#if defined (MEMORY_STATIC)
g_wlan.rx_buffer_size = inp->os_context.rx_buffer_size;
#endif
- /* g_wlan.os_func.os_lock(g_wlan.cfg_wait); */
/***
* host interface init
**/
oup->wlan_add_to_tx_que = wilc_wlan_txq_add_net_pkt;
oup->wlan_handle_tx_que = wilc_wlan_handle_txq;
oup->wlan_handle_rx_que = wilc_wlan_handle_rxq;
- /* oup->wlan_handle_rx_isr = wilc_wlan_handle_isr; */
oup->wlan_handle_rx_isr = wilc_handle_isr;
oup->wlan_cleanup = wilc_wlan_cleanup;
oup->wlan_cfg_set = wilc_wlan_cfg_set;