Commit 7acf4002 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: ks7010: remove useless DPRINTK traces

This commit removes some useless traces in some source files
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a9bbe53
......@@ -112,8 +112,6 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
{
int ret;
DPRINTK(4, "\n");
/* clear request */
atomic_set(&priv->sleepstatus.doze_request, 0);
......@@ -123,11 +121,8 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
DPRINTK(1, " error : GCR_B\n");
goto set_sleep_mode;
}
DPRINTK(3, "sleep_mode=SLP_SLEEP\n");
atomic_set(&priv->sleepstatus.status, 1);
priv->last_doze = jiffies;
} else {
DPRINTK(1, "sleep_mode=%d\n", priv->sleep_mode);
}
set_sleep_mode:
......@@ -138,8 +133,6 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
{
int ret;
DPRINTK(4, "\n");
/* clear request */
atomic_set(&priv->sleepstatus.wakeup_request, 0);
......@@ -149,12 +142,9 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
DPRINTK(1, " error : WAKEUP\n");
goto set_sleep_mode;
}
DPRINTK(4, "wake up : WAKEUP\n");
atomic_set(&priv->sleepstatus.status, 0);
priv->last_wakeup = jiffies;
++priv->wakeup_count;
} else {
DPRINTK(1, "sleep_mode=%d\n", priv->sleep_mode);
}
set_sleep_mode:
......@@ -165,19 +155,13 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
{
int ret;
DPRINTK(4, "\n");
if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
ret = ks7010_sdio_writeb(priv, WAKEUP, WAKEUP_REQ);
if (ret)
DPRINTK(1, " error : WAKEUP\n");
else
DPRINTK(4, "wake up : WAKEUP\n");
priv->last_wakeup = jiffies;
++priv->wakeup_count;
} else {
DPRINTK(1, "psstatus=%d\n",
atomic_read(&priv->psstatus.status));
}
}
......@@ -228,7 +212,6 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
goto queue_delayed_work;
}
atomic_set(&priv->psstatus.status, PS_SNOOZE);
DPRINTK(3, "psstatus.status=PS_SNOOZE\n");
return;
......@@ -288,7 +271,6 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
hdr = (struct hostif_hdr *)buffer;
DPRINTK(4, "size=%d\n", hdr->size);
if (le16_to_cpu(hdr->event) < HIF_DATA_REQ ||
le16_to_cpu(hdr->event) > HIF_REQ_MAX) {
DPRINTK(1, "unknown event=%04X\n", hdr->event);
......@@ -315,7 +297,6 @@ static void tx_device_task(struct ks_wlan_private *priv)
struct tx_device_buffer *sp;
int ret;
DPRINTK(4, "\n");
if (cnt_txqbody(priv) <= 0 ||
atomic_read(&priv->psstatus.status) == PS_SNOOZE)
return;
......@@ -358,7 +339,6 @@ int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
priv->hostt.buff[priv->hostt.qtail] = le16_to_cpu(hdr->event);
priv->hostt.qtail = (priv->hostt.qtail + 1) % SME_EVENT_BUFF_SIZE;
DPRINTK(4, "event=%04X\n", hdr->event);
spin_lock(&priv->tx_dev.tx_dev_lock);
result = enqueue_txdev(priv, p, size, complete_handler, skb);
spin_unlock(&priv->tx_dev.tx_dev_lock);
......@@ -374,8 +354,6 @@ static void rx_event_task(unsigned long dev)
struct ks_wlan_private *priv = (struct ks_wlan_private *)dev;
struct rx_device_buffer *rp;
DPRINTK(4, "\n");
if (cnt_rxqbody(priv) > 0 && priv->dev_state >= DEVICE_STATE_BOOT) {
rp = &priv->rx_dev.rx_dev_buff[priv->rx_dev.qhead];
hostif_receive(priv, rp->data, rp->size);
......@@ -393,8 +371,6 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
struct hostif_hdr *hdr;
unsigned short event = 0;
DPRINTK(4, "\n");
/* receive data */
if (cnt_rxqbody(priv) >= (RX_DEVICE_BUFF_SIZE - 1)) {
DPRINTK(1, "rx buffer overflow\n");
......@@ -450,8 +426,6 @@ static void ks7010_rw_function(struct work_struct *work)
priv = container_of(work, struct ks_wlan_private, rw_dwork.work);
DPRINTK(4, "\n");
/* wait after DOZE */
if (time_after(priv->last_doze + ((30 * HZ) / 1000), jiffies)) {
DPRINTK(4, "wait after DOZE\n");
......@@ -498,7 +472,6 @@ static void ks7010_rw_function(struct work_struct *work)
atomic_read(&priv->psstatus.status));
goto release_host;
}
DPRINTK(4, "WSTATUS_RSIZE=%02X\n", byte);
if (byte & RSIZE_MASK) { /* Read schedule */
ks_wlan_hw_rx(priv, (uint16_t)((byte & RSIZE_MASK) << 4));
......@@ -521,7 +494,6 @@ static void ks_sdio_interrupt(struct sdio_func *func)
card = sdio_get_drvdata(func);
priv = card->priv;
DPRINTK(4, "\n");
if (priv->dev_state < DEVICE_STATE_BOOT)
goto queue_delayed_work;
......@@ -531,7 +503,6 @@ static void ks_sdio_interrupt(struct sdio_func *func)
DPRINTK(1, "error : INT_PENDING\n");
goto queue_delayed_work;
}
DPRINTK(4, "INT_PENDING=%02X\n", status);
/* schedule task for interrupt status */
/* bit7 -> Write General Communication B register */
......@@ -561,7 +532,6 @@ static void ks_sdio_interrupt(struct sdio_func *func)
DPRINTK(1, " error : WSTATUS_RSIZE\n");
goto queue_delayed_work;
}
DPRINTK(4, "WSTATUS_RSIZE=%02X\n", byte);
rsize = byte & RSIZE_MASK;
if (rsize != 0) /* Read schedule */
ks_wlan_hw_rx(priv, (uint16_t)(rsize << 4));
......@@ -709,7 +679,6 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
size = length;
length = 0;
}
DPRINTK(4, "size = %d\n", size);
if (size == 0)
break;
memcpy(rom_buf, fw_entry->data + n, size);
......@@ -735,8 +704,6 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
if (ret)
goto release_firmware;
DPRINTK(4, " REMAP Request : GCR_A\n");
/* Firmware running check */
for (n = 0; n < 50; ++n) {
mdelay(10); /* wait_ms(10); */
......@@ -747,7 +714,6 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
if (byte == GCR_A_RUN)
break;
}
DPRINTK(4, "firmware wakeup (%d)!!!!\n", n);
if ((50) <= n) {
DPRINTK(1, "firmware can't start\n");
ret = -EIO;
......@@ -767,17 +733,11 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
static void ks7010_card_init(struct ks_wlan_private *priv)
{
DPRINTK(5, "\ncard_init_task()\n");
init_completion(&priv->confirm_wait);
DPRINTK(5, "init_completion()\n");
/* get mac address & firmware version */
hostif_sme_enqueue(priv, SME_START);
DPRINTK(5, "hostif_sme_enqueu()\n");
if (!wait_for_completion_interruptible_timeout
(&priv->confirm_wait, 5 * HZ)) {
DPRINTK(1, "wait time out!! SME_START\n");
......@@ -813,8 +773,6 @@ static void ks7010_card_init(struct ks_wlan_private *priv)
if (priv->dev_state >= DEVICE_STATE_PREINIT) {
DPRINTK(1, "DEVICE READY!!\n");
priv->dev_state = DEVICE_STATE_READY;
} else {
DPRINTK(1, "dev_state=%d\n", priv->dev_state);
}
}
......@@ -870,7 +828,6 @@ static int ks7010_sdio_probe(struct sdio_func *func,
func->card->cccr.multi_block, func->cur_blksize, ret);
ret = sdio_enable_func(func);
DPRINTK(5, "sdio_enable_func() %d\n", ret);
if (ret)
goto err_free_card;
......@@ -958,7 +915,6 @@ static int ks7010_sdio_probe(struct sdio_func *func,
if (ret)
DPRINTK(1, " err : INT_ENABLE\n");
DPRINTK(4, " enable Interrupt : INT_ENABLE=%02X\n", byte);
priv->dev_state = DEVICE_STATE_BOOT;
priv->wq = create_workqueue("wq");
......@@ -1031,35 +987,28 @@ static void ks7010_sdio_remove(struct sdio_func *func)
if (!card)
return;
DPRINTK(1, "priv = card->priv\n");
priv = card->priv;
if (priv) {
struct net_device *netdev = priv->net_dev;
ks_wlan_net_stop(netdev);
DPRINTK(1, "ks_wlan_net_stop\n");
/* interrupt disable */
sdio_claim_host(func);
sdio_writeb(func, 0, INT_ENABLE, &ret);
sdio_writeb(func, 0xff, INT_PENDING, &ret);
sdio_release_host(func);
DPRINTK(1, "interrupt disable\n");
ret = send_stop_request(func);
if (ret) /* memory allocation failure */
return;
DPRINTK(1, "STOP Req\n");
if (priv->wq) {
flush_workqueue(priv->wq);
destroy_workqueue(priv->wq);
}
DPRINTK(1, "destroy_workqueue(priv->wq);\n");
hostif_exit(priv);
DPRINTK(1, "hostif_exit\n");
unregister_netdev(netdev);
......@@ -1070,17 +1019,10 @@ static void ks7010_sdio_remove(struct sdio_func *func)
sdio_claim_host(func);
sdio_release_irq(func);
DPRINTK(1, "sdio_release_irq()\n");
sdio_disable_func(func);
DPRINTK(1, "sdio_disable_func()\n");
sdio_release_host(func);
sdio_set_drvdata(func, NULL);
kfree(card);
DPRINTK(1, "kfree()\n");
DPRINTK(5, " Bye !!\n");
}
static struct sdio_driver ks7010_sdio_driver = {
......
This diff is collapsed.
......@@ -123,8 +123,6 @@ void ks_wlan_update_phyinfo_timeout(struct timer_list *unused)
int ks_wlan_setup_parameter(struct ks_wlan_private *priv,
unsigned int commit_flag)
{
DPRINTK(2, "\n");
hostif_sme_enqueue(priv, SME_STOP_REQUEST);
if (commit_flag & SME_RTS)
......@@ -268,8 +266,6 @@ static int ks_wlan_set_essid(struct net_device *dev,
struct ks_wlan_private *priv = netdev_priv(dev);
size_t len;
DPRINTK(2, " %d\n", dwrq->flags);
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -352,8 +348,6 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -785,8 +779,6 @@ static int ks_wlan_set_mode(struct net_device *dev,
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "mode=%d\n", *uwrq);
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -848,8 +840,6 @@ static int ks_wlan_set_encode(struct net_device *dev,
int current_index = priv->reg.wep_index;
int i;
DPRINTK(2, "flags=%04X\n", dwrq->flags);
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -986,7 +976,6 @@ static int ks_wlan_get_encode(struct net_device *dev,
/* dwrq->flags |= IW_ENCODE_NOKEY; */
}
dwrq->flags |= index + 1;
DPRINTK(2, "encoding flag = 0x%04X\n", dwrq->flags);
/* Copy the key to the user buffer */
if ((index >= 0) && (index < 4))
dwrq->length = priv->reg.wep_key[index].size;
......@@ -1058,8 +1047,6 @@ static int ks_wlan_get_range(struct net_device *dev,
struct iw_range *range = (struct iw_range *)extra;
int i, k;
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -1300,8 +1287,6 @@ static int ks_wlan_set_scan(struct net_device *dev,
struct ks_wlan_private *priv = netdev_priv(dev);
struct iw_scan_req *req = NULL;
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -1494,21 +1479,16 @@ static int ks_wlan_get_scan(struct net_device *dev,
int i;
char *current_ev = extra;
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
if (priv->sme_i.sme_flag & SME_AP_SCAN) {
DPRINTK(2, "flag AP_SCAN\n");
if (priv->sme_i.sme_flag & SME_AP_SCAN)
return -EAGAIN;
}
if (priv->aplist.size == 0) {
/* Client error, no scan results...
* The caller need to restart the scan.
*/
DPRINTK(2, "aplist 0\n");
return -ENODATA;
}
......@@ -1552,8 +1532,6 @@ static int ks_wlan_set_genie(struct net_device *dev,
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
......@@ -1569,8 +1547,6 @@ static int ks_wlan_set_auth_mode(struct net_device *dev,
int index = (vwrq->flags & IW_AUTH_INDEX);
int value = vwrq->value;
DPRINTK(2, "index=%d:value=%08X\n", index, value);
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
......@@ -1702,8 +1678,6 @@ static int ks_wlan_get_auth_mode(struct net_device *dev,
struct ks_wlan_private *priv = netdev_priv(dev);
int index = (vwrq->flags & IW_AUTH_INDEX);
DPRINTK(2, "index=%d\n", index);
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -1753,9 +1727,6 @@ static int ks_wlan_set_encode_ext(struct net_device *dev,
if (!enc)
return -EINVAL;
DPRINTK(2, "flags=%04X:: ext_flags=%08X\n", dwrq->flags,
enc->ext_flags);
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -1865,8 +1836,6 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
struct pmk_t *pmk;
struct list_head *ptr;
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -1875,7 +1844,6 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
return -EINVAL;
pmksa = (struct iw_pmksa *)extra;
DPRINTK(2, "cmd=%d\n", pmksa->cmd);
switch (pmksa->cmd) {
case IW_PMKSA_ADD:
......@@ -1987,8 +1955,6 @@ static int ks_wlan_set_stop_request(struct net_device *dev,
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -2009,8 +1975,6 @@ static int ks_wlan_set_mlme(struct net_device *dev,
struct iw_mlme *mlme = (struct iw_mlme *)extra;
__u32 mode;
DPRINTK(2, ":%d :%d\n", mlme->cmd, mlme->reason_code);
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
......@@ -2269,8 +2233,6 @@ static int ks_wlan_set_sleep_mode(struct net_device *dev,
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "\n");
if (*uwrq == SLP_SLEEP) {
priv->sleep_mode = *uwrq;
netdev_info(dev, "SET_SLEEP_MODE %d\n", priv->sleep_mode);
......@@ -2296,7 +2258,6 @@ static int ks_wlan_get_sleep_mode(struct net_device *dev,
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "GET_SLEEP_MODE %d\n", priv->sleep_mode);
*uwrq = priv->sleep_mode;
return 0;
......@@ -2310,8 +2271,6 @@ static int ks_wlan_set_wps_enable(struct net_device *dev,
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
......@@ -2331,8 +2290,6 @@ static int ks_wlan_get_wps_enable(struct net_device *dev,
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
......@@ -2350,12 +2307,8 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev,
unsigned char len;
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
DPRINTK(2, "dwrq->length=%d\n", dwrq->length);
/* length check */
if (p[1] + 2 != dwrq->length || dwrq->length > 256)
......@@ -2789,7 +2742,6 @@ static int ks_wlan_netdev_ioctl(struct net_device *dev, struct ifreq *rq,
ret = -EOPNOTSUPP;
}
DPRINTK(5, "return=%d\n", ret);
return ret;
}
......@@ -2865,8 +2817,6 @@ int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
void send_packet_complete(struct ks_wlan_private *priv, struct sk_buff *skb)
{
DPRINTK(3, "\n");
priv->nstats.tx_packets++;
if (netif_queue_stopped(priv->net_dev))
......@@ -2887,7 +2837,6 @@ void ks_wlan_set_multicast_list(struct net_device *dev)
{
struct ks_wlan_private *priv = netdev_priv(dev);
DPRINTK(4, "\n");
if (priv->dev_state < DEVICE_STATE_READY)
return; /* not finished initialize */
hostif_sme_enqueue(priv, SME_MULTICAST_REQUEST);
......@@ -2914,9 +2863,6 @@ int ks_wlan_close(struct net_device *dev)
{
netif_stop_queue(dev);
DPRINTK(4, "%s: Shutting down ethercard, status was 0x%4.4x.\n",
dev->name, 0x00);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment