extern wilc_hif_func_t hif_spi;
u32 wilc_get_chipid(u8 update);
-
-
typedef struct {
int quit;
wilc_wlan_io_func_t io_func;
struct rxq_entry_t *rxq_tail;
int rxq_entries;
int rxq_exit;
-
-
} wilc_wlan_dev_t;
static wilc_wlan_dev_t g_wlan;
p->txq_head = tqe->next;
if (p->txq_head)
p->txq_head->prev = NULL;
-
-
} else if (tqe == p->txq_tail) {
p->txq_tail = (tqe->prev);
if (p->txq_tail)
p->txq_head->prev = NULL;
p->txq_entries -= 1;
-
-
-
-
} else {
tqe = NULL;
}
struct txq_entry_t *txqe;
} Pending_Acks_info_t;
-
-
-
struct Ack_session_info *Free_head;
struct Ack_session_info *Alloc_head;
u32 Opened_TCP_session;
u32 Pending_Acks;
-
-
static inline int Init_TCP_tracking(void)
{
ip_hdr_ptr = &buffer[ETHERNET_HDR_LEN];
protocol = ip_hdr_ptr[9];
-
if (protocol == 0x06) {
u8 *tcp_hdr_ptr;
u32 IHL, Total_Length, Data_offset;
Ack_no = (((u32)tcp_hdr_ptr[8]) << 24) + (((u32)tcp_hdr_ptr[9]) << 16) + (((u32)tcp_hdr_ptr[10]) << 8) + ((u32)tcp_hdr_ptr[11]);
-
for (i = 0; i < Opened_TCP_session; i++) {
if (Acks_keep_track_info[i].Ack_seq_num == seq_no) {
Update_TCP_track_session(i, Ack_no);
add_TCP_track_session(0, 0, seq_no);
add_TCP_Pending_Ack(Ack_no, i, tqe);
-
-
}
} else {
return ret;
}
-
static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev)
{
perInterface_wlan_t *nic;
else
PendingAcks_arrBase = 0;
-
spin_unlock_irqrestore(&wilc->txq_spinlock, p->txq_spinlock_flags);
while (Dropped > 0) {
spin_unlock_irqrestore(&wilc->txq_spinlock, flags);
-
return tqe;
}
tqe = tqe->next;
spin_unlock_irqrestore(&wilc->txq_spinlock, flags);
-
return tqe;
}
} while ((clk_status_reg & 0x1) == 0);
}
-
if (genuChipPSstate == CHIP_SLEEPING_MANUAL) {
g_wlan.hif_func.hif_read_reg(0x1C0C, ®);
reg &= ~BIT(0);
p->rxq_exit = 0;
-
-
-
do {
if (p->quit) {
PRINT_D(RX_DBG, "exit 1st do-while due to Clean_UP function\n");
PRINT_D(RX_DBG, "rxQ entery Size = %d - Address = %p\n", size, buffer);
offset = 0;
-
-
do {
u32 header;
u32 pkt_len, pkt_offset, tp_len;
#endif
PRINT_D(RX_DBG, "Header = %04x - Offset = %d\n", header, offset);
-
-
is_cfg_packet = (header >> 31) & 0x1;
pkt_offset = (header >> 22) & 0x1ff;
tp_len = (header >> 11) & 0x7ff;
#define IS_MANAGMEMENT_CALLBACK 0x080
#define IS_MGMT_STATUS_SUCCES 0x040
-
if (pkt_offset & IS_MANAGMEMENT) {
pkt_offset &= ~(IS_MANAGMEMENT | IS_MANAGMEMENT_CALLBACK | IS_MGMT_STATUS_SUCCES);
} else {
wilc_cfg_rsp_t rsp;
-
-
wilc_wlan_cfg_indicate_rx(&buffer[pkt_offset + offset], pkt_len, &rsp);
if (rsp.type == WILC_CFG_RSP) {
PRINT_D(RX_DBG, "p->cfg_seq_no = %d - rsp.seq_no = %d\n", p->cfg_seq_no, rsp.seq_no);
if (offset >= size)
break;
} while (1);
-
-
#ifndef MEMORY_STATIC
kfree(buffer);
#endif
goto _end_;
}
_end_:
-
-
if (ret) {
#ifdef MEMORY_STATIC
offset += size;
}
reg &= ~BIT(10);
-
-
ret = p->hif_func.hif_write_reg(WILC_GLB_RESET_0, reg);
if (!ret) {
PRINT_ER("Error while writing reg\n");
return ret;
}
-
-
do {
ret = p->hif_func.hif_read_reg(WILC_GLB_RESET_0, ®);
if (!ret) {
acquire_bus(ACQUIRE_AND_WAKEUP);
-
ret = p->hif_func.hif_read_reg(WILC_GP_REG_0, ®);
if (!ret) {
PRINT_ER("Error while reading reg\n");
u32 offset;
int ret_size;
-
if (p->cfg_frame_in_use)
return 0;
u32 offset;
int ret_size;
-
if (p->cfg_frame_in_use)
return 0;
if (wilc_wlan_cfg_commit(WILC_CFG_QUERY, drvHandler))
ret_size = 0;
-
if (linux_wlan_lock_timeout(&g_linux_wlan->cfg_event,
CFG_PKTS_TIMEOUT)) {
PRINT_D(TX_DBG, "Get Timed Out\n");
chipid = wilc_get_chipid(true);
-
-
if ((chipid & 0xfff) != 0xa0) {
ret = g_wlan.hif_func.hif_read_reg(0x1118, ®);
if (!ret) {