staging: wilc1000: remove useless log message

This patch remove useless log message in wilc_wlan.c file

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Chris Park 2016-02-04 18:15:50 +09:00 committed by Greg Kroah-Hartman
parent 4d38a56b3c
commit 133b22d694

View File

@ -104,12 +104,9 @@ static void wilc_wlan_txq_add_to_tail(struct net_device *dev,
wilc->txq_tail = tqe; wilc->txq_tail = tqe;
} }
wilc->txq_entries += 1; wilc->txq_entries += 1;
PRINT_D(TX_DBG, "Number of entries in TxQ = %d\n", wilc->txq_entries);
spin_unlock_irqrestore(&wilc->txq_spinlock, flags); spin_unlock_irqrestore(&wilc->txq_spinlock, flags);
PRINT_D(TX_DBG, "Wake the txq_handling\n");
up(&wilc->txq_event); up(&wilc->txq_event);
} }
@ -137,12 +134,10 @@ static int wilc_wlan_txq_add_to_head(struct wilc_vif *vif,
wilc->txq_head = tqe; wilc->txq_head = tqe;
} }
wilc->txq_entries += 1; wilc->txq_entries += 1;
netdev_dbg(vif->ndev, "Number of entries in TxQ = %d\n", wilc->txq_entries);
spin_unlock_irqrestore(&wilc->txq_spinlock, flags); spin_unlock_irqrestore(&wilc->txq_spinlock, flags);
up(&wilc->txq_add_to_head_cs); up(&wilc->txq_add_to_head_cs);
up(&wilc->txq_event); up(&wilc->txq_event);
netdev_dbg(vif->ndev, "Wake up the txq_handler\n");
return 0; return 0;
} }
@ -188,7 +183,6 @@ static inline int add_tcp_session(u32 src_prt, u32 dst_prt, u32 seq)
ack_session_info[tcp_session].dst_port = dst_prt; ack_session_info[tcp_session].dst_port = dst_prt;
tcp_session++; tcp_session++;
} }
PRINT_D(TCP_ENH, "TCP Session %d to Ack %d\n", tcp_session, seq);
return 0; return 0;
} }
@ -310,8 +304,6 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev)
if (pending_acks_info[i].ack_num < ack_session_info[pending_acks_info[i].session_index].bigger_ack_num) { if (pending_acks_info[i].ack_num < ack_session_info[pending_acks_info[i].session_index].bigger_ack_num) {
struct txq_entry_t *tqe; struct txq_entry_t *tqe;
PRINT_D(TCP_ENH, "DROP ACK: %u\n",
pending_acks_info[i].ack_num);
tqe = pending_acks_info[i].txqe; tqe = pending_acks_info[i].txqe;
if (tqe) { if (tqe) {
wilc_wlan_txq_remove(wilc, tqe); wilc_wlan_txq_remove(wilc, tqe);
@ -379,7 +371,6 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer,
tqe->tx_complete_func = NULL; tqe->tx_complete_func = NULL;
tqe->priv = NULL; tqe->priv = NULL;
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->tcp_pending_ack_idx = NOT_TCP_ACK;
netdev_dbg(vif->ndev, "Adding the config packet at the Queue tail\n");
if (wilc_wlan_txq_add_to_head(vif, tqe)) if (wilc_wlan_txq_add_to_head(vif, tqe))
return 0; return 0;
@ -408,7 +399,6 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
tqe->tx_complete_func = func; tqe->tx_complete_func = func;
tqe->priv = priv; tqe->priv = priv;
PRINT_D(TX_DBG, "Adding mgmt packet at the Queue tail\n");
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->tcp_pending_ack_idx = NOT_TCP_ACK;
if (is_tcp_ack_filter_enabled()) if (is_tcp_ack_filter_enabled())
tcp_process(dev, tqe); tcp_process(dev, tqe);
@ -438,7 +428,6 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
tqe->tx_complete_func = func; tqe->tx_complete_func = func;
tqe->priv = priv; tqe->priv = priv;
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->tcp_pending_ack_idx = NOT_TCP_ACK;
PRINT_D(TX_DBG, "Adding Network packet at the Queue tail\n");
wilc_wlan_txq_add_to_tail(dev, tqe); wilc_wlan_txq_add_to_tail(dev, tqe);
return 1; return 1;
} }
@ -478,18 +467,15 @@ static int wilc_wlan_rxq_add(struct wilc *wilc, struct rxq_entry_t *rqe)
mutex_lock(&wilc->rxq_cs); mutex_lock(&wilc->rxq_cs);
if (!wilc->rxq_head) { if (!wilc->rxq_head) {
PRINT_D(RX_DBG, "Add to Queue head\n");
rqe->next = NULL; rqe->next = NULL;
wilc->rxq_head = rqe; wilc->rxq_head = rqe;
wilc->rxq_tail = rqe; wilc->rxq_tail = rqe;
} else { } else {
PRINT_D(RX_DBG, "Add to Queue tail\n");
wilc->rxq_tail->next = rqe; wilc->rxq_tail->next = rqe;
rqe->next = NULL; rqe->next = NULL;
wilc->rxq_tail = rqe; wilc->rxq_tail = rqe;
} }
wilc->rxq_entries += 1; wilc->rxq_entries += 1;
PRINT_D(RX_DBG, "Number of queue entries: %d\n", wilc->rxq_entries);
mutex_unlock(&wilc->rxq_cs); mutex_unlock(&wilc->rxq_cs);
return wilc->rxq_entries; return wilc->rxq_entries;
} }
@ -497,7 +483,6 @@ static int wilc_wlan_rxq_add(struct wilc *wilc, struct rxq_entry_t *rqe)
static struct rxq_entry_t *wilc_wlan_rxq_remove(struct wilc *wilc) static struct rxq_entry_t *wilc_wlan_rxq_remove(struct wilc *wilc)
{ {
PRINT_D(RX_DBG, "Getting rxQ element\n");
if (wilc->rxq_head) { if (wilc->rxq_head) {
struct rxq_entry_t *rqe; struct rxq_entry_t *rqe;
@ -505,11 +490,9 @@ static struct rxq_entry_t *wilc_wlan_rxq_remove(struct wilc *wilc)
rqe = wilc->rxq_head; rqe = wilc->rxq_head;
wilc->rxq_head = wilc->rxq_head->next; wilc->rxq_head = wilc->rxq_head->next;
wilc->rxq_entries -= 1; wilc->rxq_entries -= 1;
PRINT_D(RX_DBG, "RXQ entries decreased\n");
mutex_unlock(&wilc->rxq_cs); mutex_unlock(&wilc->rxq_cs);
return rqe; return rqe;
} }
PRINT_D(RX_DBG, "Nothing to get from Q\n");
return NULL; return NULL;
} }
@ -643,7 +626,6 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
wilc_lock_timeout(wilc, &wilc->txq_add_to_head_cs, wilc_lock_timeout(wilc, &wilc->txq_add_to_head_cs,
CFG_PKTS_TIMEOUT); CFG_PKTS_TIMEOUT);
wilc_wlan_txq_filter_dup_tcp_ack(dev); wilc_wlan_txq_filter_dup_tcp_ack(dev);
PRINT_D(TX_DBG, "Getting the head of the TxQ\n");
tqe = wilc_wlan_txq_get_first(wilc); tqe = wilc_wlan_txq_get_first(wilc);
i = 0; i = 0;
sum = 0; sum = 0;
@ -659,27 +641,20 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
vmm_sz = HOST_HDR_OFFSET; vmm_sz = HOST_HDR_OFFSET;
vmm_sz += tqe->buffer_size; vmm_sz += tqe->buffer_size;
PRINT_D(TX_DBG, "VMM Size before alignment = %d\n", vmm_sz);
if (vmm_sz & 0x3) if (vmm_sz & 0x3)
vmm_sz = (vmm_sz + 4) & ~0x3; vmm_sz = (vmm_sz + 4) & ~0x3;
if ((sum + vmm_sz) > LINUX_TX_SIZE) if ((sum + vmm_sz) > LINUX_TX_SIZE)
break; break;
PRINT_D(TX_DBG, "VMM Size AFTER alignment = %d\n", vmm_sz);
vmm_table[i] = vmm_sz / 4; vmm_table[i] = vmm_sz / 4;
PRINT_D(TX_DBG, "VMMTable entry size = %d\n", if (tqe->type == WILC_CFG_PKT)
vmm_table[i]);
if (tqe->type == WILC_CFG_PKT) {
vmm_table[i] |= BIT(10); vmm_table[i] |= BIT(10);
PRINT_D(TX_DBG, "VMMTable entry changed for CFG packet = %d\n", vmm_table[i]);
}
vmm_table[i] = cpu_to_le32(vmm_table[i]); vmm_table[i] = cpu_to_le32(vmm_table[i]);
i++; i++;
sum += vmm_sz; sum += vmm_sz;
PRINT_D(TX_DBG, "sum = %d\n", sum);
tqe = wilc_wlan_txq_get_next(wilc, tqe); tqe = wilc_wlan_txq_get_next(wilc, tqe);
} else { } else {
break; break;
@ -699,23 +674,18 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
ret = wilc->hif_func->hif_read_reg(wilc, ret = wilc->hif_func->hif_read_reg(wilc,
WILC_HOST_TX_CTRL, WILC_HOST_TX_CTRL,
&reg); &reg);
if (!ret) { if (!ret)
wilc_debug(N_ERR, "[wilc txq]: fail can't read reg vmm_tbl_entry..\n");
break; break;
}
if ((reg & 0x1) == 0) { if ((reg & 0x1) == 0) {
PRINT_D(TX_DBG, "Writing VMM table ... with Size = %d\n", ((i + 1) * 4));
break; break;
} else { } else {
counter++; counter++;
if (counter > 200) { if (counter > 200) {
counter = 0; counter = 0;
PRINT_D(TX_DBG, "Looping in tx ctrl , forcce quit\n");
ret = wilc->hif_func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, 0); ret = wilc->hif_func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, 0);
break; break;
} }
PRINT_WRN(GENERIC_DBG, "[wilc txq]: warn, vmm table not clear yet, wait...\n");
} }
} while (!wilc->quit); } while (!wilc->quit);
@ -725,25 +695,19 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
timeout = 200; timeout = 200;
do { do {
ret = wilc->hif_func->hif_block_tx(wilc, WILC_VMM_TBL_RX_SHADOW_BASE, (u8 *)vmm_table, ((i + 1) * 4)); ret = wilc->hif_func->hif_block_tx(wilc, WILC_VMM_TBL_RX_SHADOW_BASE, (u8 *)vmm_table, ((i + 1) * 4));
if (!ret) { if (!ret)
wilc_debug(N_ERR, "ERR block TX of VMM table.\n");
break; break;
}
ret = wilc->hif_func->hif_write_reg(wilc, ret = wilc->hif_func->hif_write_reg(wilc,
WILC_HOST_VMM_CTL, WILC_HOST_VMM_CTL,
0x2); 0x2);
if (!ret) { if (!ret)
wilc_debug(N_ERR, "[wilc txq]: fail can't write reg host_vmm_ctl..\n");
break; break;
}
do { do {
ret = wilc->hif_func->hif_read_reg(wilc, WILC_HOST_VMM_CTL, &reg); ret = wilc->hif_func->hif_read_reg(wilc, WILC_HOST_VMM_CTL, &reg);
if (!ret) { if (!ret)
wilc_debug(N_ERR, "[wilc txq]: fail can't read reg host_vmm_ctl..\n");
break; break;
}
if ((reg >> 2) & 0x1) { if ((reg >> 2) & 0x1) {
entries = ((reg >> 3) & 0x3f); entries = ((reg >> 3) & 0x3f);
break; break;
@ -763,16 +727,12 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
PRINT_WRN(GENERIC_DBG, "[wilc txq]: no more buffer in the chip (reg: %08x), retry later [[ %d, %x ]]\n", reg, i, vmm_table[i - 1]); PRINT_WRN(GENERIC_DBG, "[wilc txq]: no more buffer in the chip (reg: %08x), retry later [[ %d, %x ]]\n", reg, i, vmm_table[i - 1]);
ret = wilc->hif_func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, &reg); ret = wilc->hif_func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, &reg);
if (!ret) { if (!ret)
wilc_debug(N_ERR, "[wilc txq]: fail can't read reg WILC_HOST_TX_CTRL..\n");
break; break;
}
reg &= ~BIT(0); reg &= ~BIT(0);
ret = wilc->hif_func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, reg); ret = wilc->hif_func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, reg);
if (!ret) { if (!ret)
wilc_debug(N_ERR, "[wilc txq]: fail can't write reg WILC_HOST_TX_CTRL..\n");
break; break;
}
break; break;
} else { } else {
break; break;
@ -840,16 +800,12 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
acquire_bus(wilc, ACQUIRE_AND_WAKEUP); acquire_bus(wilc, ACQUIRE_AND_WAKEUP);
ret = wilc->hif_func->hif_clear_int_ext(wilc, ENABLE_TX_VMM); ret = wilc->hif_func->hif_clear_int_ext(wilc, ENABLE_TX_VMM);
if (!ret) { if (!ret)
wilc_debug(N_ERR, "[wilc txq]: fail can't start tx VMM ...\n");
goto _end_; goto _end_;
}
ret = wilc->hif_func->hif_block_tx_ext(wilc, 0, txb, offset); ret = wilc->hif_func->hif_block_tx_ext(wilc, 0, txb, offset);
if (!ret) { if (!ret)
wilc_debug(N_ERR, "[wilc txq]: fail can't block tx ext...\n");
goto _end_; goto _end_;
}
_end_: _end_:
@ -875,19 +831,15 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
do { do {
if (wilc->quit) { if (wilc->quit) {
PRINT_D(RX_DBG, "exit 1st do-while due to Clean_UP function\n");
up(&wilc->cfg_event); up(&wilc->cfg_event);
break; break;
} }
rqe = wilc_wlan_rxq_remove(wilc); rqe = wilc_wlan_rxq_remove(wilc);
if (!rqe) { if (!rqe)
PRINT_D(RX_DBG, "nothing in the queue - exit 1st do-while\n");
break; break;
}
buffer = rqe->buffer; buffer = rqe->buffer;
size = rqe->buffer_size; size = rqe->buffer_size;
PRINT_D(RX_DBG, "rxQ entery Size = %d - Address = %p\n",
size, buffer);
offset = 0; offset = 0;
do { do {
@ -906,10 +858,8 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
tp_len = (header >> 11) & 0x7ff; tp_len = (header >> 11) & 0x7ff;
pkt_len = header & 0x7ff; pkt_len = header & 0x7ff;
if (pkt_len == 0 || tp_len == 0) { if (pkt_len == 0 || tp_len == 0)
wilc_debug(N_RXQ, "[wilc rxq]: data corrupt, packet len or tp_len is 0 [%d][%d]\n", pkt_len, tp_len);
break; break;
}
#define IS_MANAGMEMENT 0x100 #define IS_MANAGMEMENT 0x100
#define IS_MANAGMEMENT_CALLBACK 0x080 #define IS_MANAGMEMENT_CALLBACK 0x080
@ -935,7 +885,6 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
wilc_wlan_cfg_indicate_rx(wilc, &buffer[pkt_offset + offset], pkt_len, &rsp); wilc_wlan_cfg_indicate_rx(wilc, &buffer[pkt_offset + offset], pkt_len, &rsp);
if (rsp.type == WILC_CFG_RSP) { if (rsp.type == WILC_CFG_RSP) {
PRINT_D(RX_DBG, "wilc->cfg_seq_no = %d - rsp.seq_no = %d\n", wilc->cfg_seq_no, rsp.seq_no);
if (wilc->cfg_seq_no == rsp.seq_no) if (wilc->cfg_seq_no == rsp.seq_no)
up(&wilc->cfg_event); up(&wilc->cfg_event);
} else if (rsp.type == WILC_CFG_RSP_STATUS) { } else if (rsp.type == WILC_CFG_RSP_STATUS) {
@ -977,10 +926,8 @@ static void wilc_pllupdate_isr_ext(struct wilc *wilc, u32 int_stats)
else else
mdelay(WILC_PLL_TO_SPI); mdelay(WILC_PLL_TO_SPI);
while (!(ISWILC1000(wilc_get_chipid(wilc, true)) && --trials)) { while (!(ISWILC1000(wilc_get_chipid(wilc, true)) && --trials))
PRINT_D(TX_DBG, "PLL update retrying\n");
mdelay(1); mdelay(1);
}
} }
static void wilc_sleeptimer_isr_ext(struct wilc *wilc, u32 int_stats1) static void wilc_sleeptimer_isr_ext(struct wilc *wilc, u32 int_stats1)
@ -1000,9 +947,6 @@ static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status)
size = ((int_status & 0x7fff) << 2); size = ((int_status & 0x7fff) << 2);
while (!size && retries < 10) { while (!size && retries < 10) {
u32 time = 0;
wilc_debug(N_ERR, "RX Size equal zero ... Trying to read it again for %d time\n", time++);
wilc->hif_func->hif_read_size(wilc, &size); wilc->hif_func->hif_read_size(wilc, &size);
size = ((size & 0x7fff) << 2); size = ((size & 0x7fff) << 2);
retries++; retries++;
@ -1012,21 +956,17 @@ static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status)
if (LINUX_RX_SIZE - offset < size) if (LINUX_RX_SIZE - offset < size)
offset = 0; offset = 0;
if (wilc->rx_buffer) { if (wilc->rx_buffer)
buffer = &wilc->rx_buffer[offset]; buffer = &wilc->rx_buffer[offset];
} else { else
wilc_debug(N_ERR, "[wilc isr]: fail Rx Buffer is NULL...drop the packets (%d)\n", size);
goto _end_; goto _end_;
}
wilc->hif_func->hif_clear_int_ext(wilc, wilc->hif_func->hif_clear_int_ext(wilc,
DATA_INT_CLR | ENABLE_RX_VMM); DATA_INT_CLR | ENABLE_RX_VMM);
ret = wilc->hif_func->hif_block_rx_ext(wilc, 0, buffer, size); ret = wilc->hif_func->hif_block_rx_ext(wilc, 0, buffer, size);
if (!ret) { if (!ret)
wilc_debug(N_ERR, "[wilc isr]: fail block rx...\n");
goto _end_; goto _end_;
}
_end_: _end_:
if (ret) { if (ret) {
offset += size; offset += size;
@ -1079,12 +1019,9 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
dma_buffer = kmalloc(blksz, GFP_KERNEL); dma_buffer = kmalloc(blksz, GFP_KERNEL);
if (!dma_buffer) { if (!dma_buffer) {
ret = -EIO; ret = -EIO;
PRINT_ER("Can't allocate buffer for firmware download IO error\n ");
goto _fail_1; goto _fail_1;
} }
PRINT_D(INIT_DBG, "Downloading firmware size = %d ...\n", buffer_size);
offset = 0; offset = 0;
do { do {
memcpy(&addr, &buffer[offset], 4); memcpy(&addr, &buffer[offset], 4);
@ -1113,7 +1050,6 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
if (!ret) { if (!ret) {
ret = -EIO; ret = -EIO;
PRINT_ER("Can't download firmware IO error\n ");
goto _fail_; goto _fail_;
} }
PRINT_D(INIT_DBG, "Offset = %d\n", offset); PRINT_D(INIT_DBG, "Offset = %d\n", offset);
@ -1143,7 +1079,6 @@ int wilc_wlan_start(struct wilc *wilc)
acquire_bus(wilc, ACQUIRE_ONLY); acquire_bus(wilc, ACQUIRE_ONLY);
ret = wilc->hif_func->hif_write_reg(wilc, WILC_VMM_CORE_CFG, reg); ret = wilc->hif_func->hif_write_reg(wilc, WILC_VMM_CORE_CFG, reg);
if (!ret) { if (!ret) {
wilc_debug(N_ERR, "[wilc start]: fail write reg vmm_core_cfg...\n");
release_bus(wilc, RELEASE_ONLY); release_bus(wilc, RELEASE_ONLY);
ret = -EIO; ret = -EIO;
return ret; return ret;
@ -1177,7 +1112,6 @@ int wilc_wlan_start(struct wilc *wilc)
ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_1, reg); ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_1, reg);
if (!ret) { if (!ret) {
wilc_debug(N_ERR, "[wilc start]: fail write WILC_GP_REG_1 ...\n");
release_bus(wilc, RELEASE_ONLY); release_bus(wilc, RELEASE_ONLY);
ret = -EIO; ret = -EIO;
return ret; return ret;
@ -1187,7 +1121,6 @@ int wilc_wlan_start(struct wilc *wilc)
ret = wilc->hif_func->hif_read_reg(wilc, 0x1000, &chipid); ret = wilc->hif_func->hif_read_reg(wilc, 0x1000, &chipid);
if (!ret) { if (!ret) {
wilc_debug(N_ERR, "[wilc start]: fail read reg 0x1000 ...\n");
release_bus(wilc, RELEASE_ONLY); release_bus(wilc, RELEASE_ONLY);
ret = -EIO; ret = -EIO;
return ret; return ret;
@ -1223,7 +1156,6 @@ int wilc_wlan_stop(struct wilc *wilc)
ret = wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, &reg); ret = wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, &reg);
if (!ret) { if (!ret) {
PRINT_ER("Error while reading reg\n");
release_bus(wilc, RELEASE_ALLOW_SLEEP); release_bus(wilc, RELEASE_ALLOW_SLEEP);
return ret; return ret;
} }
@ -1231,7 +1163,6 @@ int wilc_wlan_stop(struct wilc *wilc)
reg &= ~BIT(10); reg &= ~BIT(10);
ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg); ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg);
if (!ret) { if (!ret) {
PRINT_ER("Error while writing reg\n");
release_bus(wilc, RELEASE_ALLOW_SLEEP); release_bus(wilc, RELEASE_ALLOW_SLEEP);
return ret; return ret;
} }
@ -1240,34 +1171,24 @@ int wilc_wlan_stop(struct wilc *wilc)
ret = wilc->hif_func->hif_read_reg(wilc, ret = wilc->hif_func->hif_read_reg(wilc,
WILC_GLB_RESET_0, &reg); WILC_GLB_RESET_0, &reg);
if (!ret) { if (!ret) {
PRINT_ER("Error while reading reg\n");
release_bus(wilc, RELEASE_ALLOW_SLEEP); release_bus(wilc, RELEASE_ALLOW_SLEEP);
return ret; return ret;
} }
PRINT_D(GENERIC_DBG, "Read RESET Reg %x : Retry%d\n",
reg, timeout);
if ((reg & BIT(10))) { if ((reg & BIT(10))) {
PRINT_D(GENERIC_DBG, "Bit 10 not reset : Retry %d\n",
timeout);
reg &= ~BIT(10); reg &= ~BIT(10);
ret = wilc->hif_func->hif_write_reg(wilc, ret = wilc->hif_func->hif_write_reg(wilc,
WILC_GLB_RESET_0, WILC_GLB_RESET_0,
reg); reg);
timeout--; timeout--;
} else { } else {
PRINT_D(GENERIC_DBG, "Bit 10 reset after : Retry %d\n",
timeout);
ret = wilc->hif_func->hif_read_reg(wilc, ret = wilc->hif_func->hif_read_reg(wilc,
WILC_GLB_RESET_0, WILC_GLB_RESET_0,
&reg); &reg);
if (!ret) { if (!ret) {
PRINT_ER("Error while reading reg\n");
release_bus(wilc, RELEASE_ALLOW_SLEEP); release_bus(wilc, RELEASE_ALLOW_SLEEP);
return ret; return ret;
} }
PRINT_D(GENERIC_DBG, "Read RESET Reg %x : Retry%d\n",
reg, timeout);
break; break;
} }
@ -1322,17 +1243,14 @@ void wilc_wlan_cleanup(struct net_device *dev)
acquire_bus(wilc, ACQUIRE_AND_WAKEUP); acquire_bus(wilc, ACQUIRE_AND_WAKEUP);
ret = wilc->hif_func->hif_read_reg(wilc, WILC_GP_REG_0, &reg); ret = wilc->hif_func->hif_read_reg(wilc, WILC_GP_REG_0, &reg);
if (!ret) { if (!ret)
PRINT_ER("Error while reading reg\n");
release_bus(wilc, RELEASE_ALLOW_SLEEP); release_bus(wilc, RELEASE_ALLOW_SLEEP);
}
PRINT_ER("Writing ABORT reg\n");
ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_0, ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_0,
(reg | ABORT_INT)); (reg | ABORT_INT));
if (!ret) { if (!ret)
PRINT_ER("Error while writing reg\n");
release_bus(wilc, RELEASE_ALLOW_SLEEP); release_bus(wilc, RELEASE_ALLOW_SLEEP);
}
release_bus(wilc, RELEASE_ALLOW_SLEEP); release_bus(wilc, RELEASE_ALLOW_SLEEP);
wilc->hif_func->hif_deinit(NULL); wilc->hif_func->hif_deinit(NULL);
} }
@ -1437,7 +1355,6 @@ int wilc_wlan_cfg_get(struct wilc_vif *vif, int start, u32 wid, int commit,
netdev_dbg(vif->ndev, "Get Timed Out\n"); netdev_dbg(vif->ndev, "Get Timed Out\n");
ret_size = 0; ret_size = 0;
} }
netdev_dbg(vif->ndev, "[WILC]Get Response received\n");
wilc->cfg_frame_in_use = 0; wilc->cfg_frame_in_use = 0;
wilc->cfg_frame_offset = 0; wilc->cfg_frame_offset = 0;
wilc->cfg_seq_no += 1; wilc->cfg_seq_no += 1;
@ -1589,7 +1506,6 @@ int wilc_wlan_init(struct net_device *dev)
if (!wilc->tx_buffer) if (!wilc->tx_buffer)
wilc->tx_buffer = kmalloc(LINUX_TX_SIZE, GFP_KERNEL); wilc->tx_buffer = kmalloc(LINUX_TX_SIZE, GFP_KERNEL);
PRINT_D(TX_DBG, "wilc->tx_buffer = %p\n", wilc->tx_buffer);
if (!wilc->tx_buffer) { if (!wilc->tx_buffer) {
ret = -ENOBUFS; ret = -ENOBUFS;
@ -1599,7 +1515,7 @@ int wilc_wlan_init(struct net_device *dev)
if (!wilc->rx_buffer) if (!wilc->rx_buffer)
wilc->rx_buffer = kmalloc(LINUX_RX_SIZE, GFP_KERNEL); wilc->rx_buffer = kmalloc(LINUX_RX_SIZE, GFP_KERNEL);
PRINT_D(TX_DBG, "wilc->rx_buffer =%p\n", wilc->rx_buffer);
if (!wilc->rx_buffer) { if (!wilc->rx_buffer) {
ret = -ENOBUFS; ret = -ENOBUFS;
PRINT_ER("Can't allocate Rx Buffer"); PRINT_ER("Can't allocate Rx Buffer");