diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c78b51a2f84174c8ae4f7a6e1ebe93f4bd58d9b5..d9601477778536a709d649751959a311280b313f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -230,7 +230,7 @@ static int wilc_enqueue_work(struct host_if_msg *msg) return 0; } -/* The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as +/* The idx starts from 0 to (NUM_CONCURRENT_IFC - 1), but 0 index used as * special purpose in wilc device, so we add 1 to the index to starts from 1. * As a result, the returned index will be 1 to NUM_CONCURRENT_IFC. */ @@ -242,7 +242,7 @@ int wilc_get_vif_idx(struct wilc_vif *vif) /* We need to minus 1 from idx which is from wilc device to get real index * of wilc->vif[], because we add 1 when pass to wilc device in the function * wilc_get_vif_idx. - * As a result, the index should be between 0 and NUM_CONCURRENT_IFC -1. + * As a result, the index should be between 0 and (NUM_CONCURRENT_IFC - 1). */ static struct wilc_vif *wilc_get_vif_from_idx(struct wilc *wilc, int idx) { diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 14405bf1d8fa6ebba111dfce7bc101fe0821c3c9..fa49588bba1e1b9ac653d916a8f3a82a3c879f5f 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -63,7 +63,7 @@ void wilc_wfi_monitor_rx(u8 *buff, u32 size) cb_hdr->hdr.it_present = cpu_to_le32(TX_RADIOTAP_PRESENT); - cb_hdr->rate = 5; /* txrate->bitrate / 5; */ + cb_hdr->rate = 5; if (pkt_offset & IS_MGMT_STATUS_SUCCES) { /* success */ @@ -84,8 +84,8 @@ void wilc_wfi_monitor_rx(u8 *buff, u32 size) hdr->hdr.it_version = 0; /* PKTHDR_RADIOTAP_VERSION; */ hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); hdr->hdr.it_present = cpu_to_le32 - (1 << IEEE80211_RADIOTAP_RATE); /* | */ - hdr->rate = 5; /* txrate->bitrate / 5; */ + (1 << IEEE80211_RADIOTAP_RATE); + hdr->rate = 5; } skb->dev = wilc_wfi_mon; @@ -178,7 +178,7 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb, cb_hdr->hdr.it_present = cpu_to_le32(TX_RADIOTAP_PRESENT); - cb_hdr->rate = 5; /* txrate->bitrate / 5; */ + cb_hdr->rate = 5; cb_hdr->tx_flags = 0x0004; skb2->dev = wilc_wfi_mon; @@ -194,11 +194,12 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb, } skb->dev = mon_priv->real_ndev; - /* Identify if Ethernet or MAC header (data or mgmt) */ memcpy(srcadd, &skb->data[10], 6); memcpy(bssid, &skb->data[16], 6); - /* if source address and bssid fields are equal>>Mac header */ - /*send it to mgmt frames handler */ + /* + * Identify if data or mgmt packet, if source address and bssid + * fields are equal send it to mgmt frames handler + */ if (!(memcmp(srcadd, bssid, 6))) { ret = mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len); if (ret) diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index ecbf3dbaec28f48754af33b765548d6cb78e257a..ac26e94ae097b501ac0ef44d627fae57177e7fbc 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -18,9 +18,6 @@ static struct dentry *wilc_dir; -/* - * ---------------------------------------------------------------------------- - */ #define DEBUG BIT(0) #define INFO BIT(1) #define WRN BIT(2) @@ -29,10 +26,6 @@ static struct dentry *wilc_dir; #define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR) static atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR); -/* - * ---------------------------------------------------------------------------- - */ - static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, size_t count, loff_t *ppos) { @@ -76,10 +69,6 @@ static ssize_t wilc_debug_level_write(struct file *filp, return count; } -/* - * ---------------------------------------------------------------------------- - */ - #define FOPS(_open, _read, _write, _poll) { \ .owner = THIS_MODULE, \ .open = (_open), \ diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 8a471474a807669a63f1da0974e042cb5781a80c..0628237cdcf4731ad65061354fd6ef58549ce660 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -809,9 +809,6 @@ static int sdio_read_size(struct wilc *wilc, u32 *size) wilc_sdio_cmd52(wilc, &cmd); tmp = cmd.data; - /* cmd.read_write = 0; */ - /* cmd.function = 0; */ - /* cmd.raw = 0; */ cmd.address = 0xf3; cmd.data = 0; wilc_sdio_cmd52(wilc, &cmd); @@ -1096,12 +1093,7 @@ static int sdio_sync_ext(struct wilc *wilc, int nint) return 1; } -/******************************************** - * - * Global sdio HIF function table - * - ********************************************/ - +/* Global sdio HIF function table */ static const struct wilc_hif_func wilc_hif_sdio = { .hif_init = sdio_init, .hif_deinit = sdio_deinit, diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index fa9371ba53a94e5760747d9ff91c1ec467ad6859..5aa1f7b701d8ea9ef09e069dab0e374322a7a989 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -767,7 +767,6 @@ static int wilc_spi_read_reg(struct wilc *wilc, u32 addr, u32 *data) u8 clockless = 0; if (addr < 0x30) { - /* dev_err(&spi->dev, "***** read addr %d\n\n", addr); */ /* Clockless register */ cmd = CMD_INTERNAL_READ; clockless = 1; diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 331a9711e31d2046e6a988c6c7923f1a6f1fc9be..371a87fbf26b9177cac0a723a22893595f1e7587 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -37,11 +37,6 @@ struct wilc_wfi_stats { }; -/* - * This structure is private to each device. It is used to pass - * packets in and out, so there is place for a packet - */ - struct wilc_wfi_key { u8 *key; u8 *seq; diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index f29d1ea73551d41729675de6a9516bb0ff1c6a4d..696cf1f229b6110075cf838e4f8f606b4135138b 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -246,12 +246,6 @@ struct wilc_hif_func { void (*disable_interrupt)(struct wilc *nic); }; -/******************************************** - * - * Configuration Structure - * - ********************************************/ - #define MAX_CFG_FRAME_SIZE 1468 struct wilc_cfg_frame { diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index c0b9b700f4d77e26ad88821ee058f2f33cb1e544..331be7b952940e6baedd23d9931a273b4425b37f 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -13,11 +13,6 @@ #include "wilc_wlan_cfg.h" #include "coreconfigurator.h" -/******************************************** - * - * Global Data - * - ********************************************/ enum cfg_cmd_type { CFG_BYTE_CMD = 0, CFG_HWORD_CMD = 1,