whitespace error in some of commits
Hi Janani, I can find the whitespace errors in your commits which is already accepted in staging-testing branch. The commit number is c611d48e65e25af2dc0176e9ac135116095ed03d and c611d48e65e25af2dc0176e9ac135116095ed03d. I don't know why I couldn't find your patch emails from the community. Please cc the linux-wireless and devel. Would you fix these patch or I can make it if you don't mind. Thanks, Tony. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: whitespace error in some of commits
Hi Janani, Please refer to the commit numbers again in the wilc1000 driver: c611d48e65e25af2dc0176e9ac135116095ed03d 24c6c29d85af3748b2d79b46f72188b335566340 Thanks, Tony. On 2016년 02월 16일 15:47, Tony Cho wrote: Hi Janani, I can find the whitespace errors in your commits which is already accepted in staging-testing branch. The commit number is c611d48e65e25af2dc0176e9ac135116095ed03d and c611d48e65e25af2dc0176e9ac135116095ed03d. I don't know why I couldn't find your patch emails from the community. Please cc the linux-wireless and devel. Would you fix these patch or I can make it if you don't mind. Thanks, Tony. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: wilc1000: wilc_wlan.c: remove multiple blank line
This patch removes the multiple blank line reported by checkpatch.pl. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wlan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index f142e61..17e39cc 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -139,7 +139,6 @@ struct pending_acks_info { struct txq_entry_t *txqe; }; - #define NOT_TCP_ACK(-1) #define MAX_TCP_SESSION25 -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: wilc1000: wilc_wlan.c: remove unnecessary blank lines
This patch removes unnecessary blank lines found by checkpatch.pl. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wlan.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index d50ddc6..f142e61 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -21,7 +21,6 @@ static inline void release_bus(struct wilc *wilc, BUS_RELEASE_T release) static void wilc_wlan_txq_remove(struct wilc *wilc, struct txq_entry_t *tqe) { - if (tqe == wilc->txq_head) { wilc->txq_head = tqe->next; if (wilc->txq_head) @@ -248,7 +247,6 @@ static inline void tcp_process(struct net_device *dev, struct txq_entry_t *tqe) add_tcp_pending_ack(ack_no, i, tqe); } - } } spin_unlock_irqrestore(&wilc->txq_spinlock, flags); @@ -429,7 +427,6 @@ static struct txq_entry_t *wilc_wlan_txq_get_next(struct wilc *wilc, static int wilc_wlan_rxq_add(struct wilc *wilc, struct rxq_entry_t *rqe) { - if (wilc->quit) return 0; @@ -450,7 +447,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) { - if (wilc->rxq_head) { struct rxq_entry_t *rqe; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wilc1000: wilc_wlan_if.h: remove unused functions
This patch removes the unused functions anymore related to the configuration of the bus interface clock speed. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wlan_if.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index fbe34eb..f19ecb5 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -918,8 +918,6 @@ typedef enum { struct wilc; int wilc_wlan_init(struct net_device *dev); -void wilc_bus_set_max_speed(void); -void wilc_bus_set_default_speed(void); u32 wilc_get_chipid(struct wilc *wilc, bool update); #endif -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2 1/3] staging: wilc1000: coreconfigurator.c: remove WILC_MALLOC
Hi, This is not called in IRQ context and not even held in the spin lock. All of the macros in the driver for the Linux APIs will be removed soon. I expect all of concerns will be also removed at that time. Thanks, Tony. On 2015년 07월 24일 09:44, Dan Carpenter wrote: On Fri, Jul 24, 2015 at 08:55:53AM +0900, Chaehyun Lim wrote: Use kmalloc and kmalloc_array instead of WILC_MALLOC. Signed-off-by: Chaehyun Lim --- V2: Use GFP_KERNEL flag instead of GFP_ATOMIC This is probably the correct thing but how did you check that we aren't holding a spin_lock or in IRQ context? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/21] cover letter of Atmel WILC1000 patches
Hi Greg, I am Tony from Atmel working together with Johnny in charge of Atmel wireless driver, especially ATWILC1000 single WLAM driver. I know WILC1000 driver is very far from Linux coding style and there are so many changes required to be proper kernel driver over the Linux kernel tree. However, the progress was got stucked due to mess related to 64-bit support problems as I know. So, I will support him to go through it. There are still many issues to tackle the 64-bit problem, mostly structural issues. However, I will frequently send small patches while changing the structural issues to be the kernel driver. As listed in the TODO file, the followings will be patched: - removing most warnings reported by checkpatch.pl - removing OS wrapper to replace them by kernel API as is if possible - removing 64-bit compile warnings - removing platform dependencies in complie-time basis - updating the WILC1000 driver with the latest version - removing CamelCases - removing the warnings for line over 80 characters The followings are highlight in this patch: - remove the unnecessary files which is not used anymore to simplify the driver. - remove the dead conditionals related to SIMULATION which are not used. - add more comments to describe the config symbols in the Kconfig. - remove the platform dependencies in the wilc_sdio.c file. - rewrte the wilc_sdio.c for the preprocessor conditionals to compile out the entire functions rather than portions of the function. - remove the warnings reported by checkpatch.pl. I always appreciate your comment and advice for my patches. Best Regards, Tony. Jude.Lee (2): staging: wilc1000: remove multiple blank lines staging: wilc1000: alignment should match open parenthesis Kim, Leo (3): staging: wilc1000: remove braces {} for single statement blocks staging: wilc1000: remove warnings on the multiple blank lines uses staging: wilc1000: remove unnecessary spcae Tony Cho (16): staging: wilc1000: remove unnecessary files staging: wilc1000: describe the config symbol fully staging: wilc1000: remove dead codes related to SIMULATION staging: wilc1000: remove warnings on the multiple line uses staging: wilc1000: remove the warnings on missing blank line staging: wilc1000: remove the warnings on unnecessary braces staging: wilc1000: remove preprocessor conditionals unused staging: wilc1000: remove a dead preprocessor conditionals staging: wilc1000: #ifdef conditionals cover entire functions staging: wilc1000: remove unused functions staging: wilc1000: remove errors on required space staging: wilc1000: remove warnings on unnecessary braces staging: wilc1000: remove warnings on missing blank line staging: wilc1000: remove unnecessary inner braces staging: wilc1000: remove unnecessary blank lines staging: wilc1000: update TODO list of WILC1000 drivers/staging/wilc1000/Kconfig | 28 +- drivers/staging/wilc1000/Makefile | 4 +- drivers/staging/wilc1000/TODO | 13 +- drivers/staging/wilc1000/coreconfigsimulator.h| 17 - drivers/staging/wilc1000/coreconfigurator.c | 86 -- drivers/staging/wilc1000/coreconfigurator.h | 15 +- drivers/staging/wilc1000/fifo_buffer.c| 132 drivers/staging/wilc1000/fifo_buffer.h| 26 - drivers/staging/wilc1000/host_interface.c | 23 - drivers/staging/wilc1000/host_interface.h | 1 - drivers/staging/wilc1000/linux_mon.c | 15 +- drivers/staging/wilc1000/linux_wlan.c | 169 +--- drivers/staging/wilc1000/wilc_sdio.c | 788 --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 13 - drivers/staging/wilc1000/wilc_wfi_netdevice.c | 909 -- drivers/staging/wilc1000/wilc_wlan.c | 1 - 16 files changed, 383 insertions(+), 1857 deletions(-) delete mode 100644 drivers/staging/wilc1000/coreconfigsimulator.h delete mode 100644 drivers/staging/wilc1000/fifo_buffer.c delete mode 100644 drivers/staging/wilc1000/fifo_buffer.h delete mode 100644 drivers/staging/wilc1000/wilc_wfi_netdevice.c -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/21] staging: wilc1000: remove warnings on the multiple line uses
This patch removes the warnings reported by checkpatch.pl for using multiple blank lines. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 897e47e..632b2b0 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -10,7 +10,6 @@ #include "wilc_wlan_if.h" #include "wilc_wlan.h" - #ifdef WILC1000_SINGLE_TRANSFER #define WILC_SDIO_BLOCK_SIZE 256 #else @@ -90,7 +89,6 @@ static int sdio_set_func0_csa_address_byte0(uint32_t adr) { sdio_cmd52_t cmd; - /** * Review: BIG ENDIAN **/ @@ -222,8 +220,6 @@ uint32_t sdio_xfer_cnt(void) cnt |= (cmd.data << 16); return cnt; - - } / @@ -412,7 +408,6 @@ static int sdio_write(uint32_t addr, uint8_t *buf, uint32_t size) } - if (rest > 0) { cmd.block_mode = 1; cmd.increment = 1; @@ -458,7 +453,6 @@ static int sdio_write(uint32_t addr, uint8_t *buf, uint32_t size) #endif /* platform */ } - if (nleft > 0) { cmd.block_mode = 0; cmd.increment = 1; @@ -622,7 +616,6 @@ static int sdio_read(uint32_t addr, uint8_t *buf, uint32_t size) cmd.buffer = buf; cmd.block_size = block_size; - if (addr > 0) { if (!sdio_set_func0_csa_address(addr)) goto _fail_; @@ -639,7 +632,6 @@ static int sdio_read(uint32_t addr, uint8_t *buf, uint32_t size) } - if (rest > 0) { cmd.block_mode = 1; cmd.increment = 1; @@ -898,7 +890,6 @@ static int sdio_init(wilc_wlan_inp_t *inp, wilc_debug_func func) } g_sdio.dPrint(N_ERR, "[wilc sdio]: has_thrpt_enh3 = %d...\n", g_sdio.has_thrpt_enh3); - return 1; _fail_: @@ -1097,7 +1088,6 @@ static int sdio_clear_int_ext(uint32_t val) } #endif /* WILC_SDIO_IRQ_GPIO */ - { uint32_t vmm_ctl; @@ -1138,7 +1128,6 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */) { uint32_t reg; - if (nint > MAX_NUM_INT) { g_sdio.dPrint(N_ERR, "[wilc sdio]: Too many interupts (%d)...\n", nint); return 0; @@ -1148,7 +1137,6 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */) return 0; } - g_sdio.nint = nint; /** @@ -1170,7 +1158,6 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */) uint32_t reg; int ret, i; - /** * interrupt pin mux select **/ @@ -1225,7 +1212,6 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */) return 1; } - / * * Global sdio HIF function table -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/21] staging: wilc1000: remove dead codes related to SIMULATION
This patch removes preprocessor conditionals (#ifdef or #ifndef) related to SIMULATION definition from the codes becasue that SIMULATION feature is not used anymore. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 86 --- drivers/staging/wilc1000/host_interface.c | 23 -- drivers/staging/wilc1000/linux_mon.c | 15 +--- drivers/staging/wilc1000/linux_wlan.c | 2 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 13 5 files changed, 3 insertions(+), 136 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index b069614..8bacd8c 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -1877,89 +1877,6 @@ s32 ConfigWaitResponse(char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 *ps32Bytes return s32Error; } -/** - * @brief sends certain Configuration Packet based on the input WIDs pstrWIDs - * and retrieves the packet response pu8RxResp - * @details - * @param[in] pstrWIDs WIDs to be sent in the configuration packet - * @param[in] u32WIDsCount number of WIDs to be sent in the configuration packet - * @param[out] pu8RxResp The received Packet Response - * @param[out] ps32RxRespLen Length of the received Packet Response - * @return Error code indicating success/failure - * @note - * @authormabubakr - * @date 1 Mar 2012 - * @version 1.0 - */ -#ifdef SIMULATION -s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, - u32 u32WIDsCount, bool bRespRequired, u32 drvHandler) -{ - s32 s32Error = WILC_SUCCESS; - s32 err = WILC_SUCCESS; - s32 s32ConfigPacketLen = 0; - s32 s32RcvdRespLen = 0; - - down(&SemHandleSendPkt); - - /*set the packet mode*/ - g_oper_mode = u8Mode; - - WILC_memset((void *)gps8ConfigPacket, 0, MAX_PACKET_BUFF_SIZE); - - if (CreateConfigPacket(gps8ConfigPacket, &s32ConfigPacketLen, pstrWIDs, u32WIDsCount) != WILC_SUCCESS) { - s32Error = WILC_FAIL; - goto End_ConfigPkt; - } - /*bug 3878*/ - gstrConfigPktInfo.pcRespBuffer = gps8ConfigPacket; - gstrConfigPktInfo.s32MaxRespBuffLen = MAX_PACKET_BUFF_SIZE; - PRINT_INFO(CORECONFIG_DBG, "GLOBAL =bRespRequired =%d\n", bRespRequired); - gstrConfigPktInfo.bRespRequired = bRespRequired; - - s32Error = SendRawPacket(gps8ConfigPacket, s32ConfigPacketLen); - if (s32Error != WILC_SUCCESS) { - goto End_ConfigPkt; - } - - WILC_memset((void *)gps8ConfigPacket, 0, MAX_PACKET_BUFF_SIZE); - - ConfigWaitResponse(gps8ConfigPacket, MAX_PACKET_BUFF_SIZE, &s32RcvdRespLen, bRespRequired); - - - if (bRespRequired) { - /* If the operating Mode is GET, then we expect a response frame from */ - /* the driver. Hence start listening to the port for response */ - if (g_oper_mode == GET_CFG) { - #if 1 - err = ParseResponse(gps8ConfigPacket, pstrWIDs); - if (err != 0) { - s32Error = WILC_FAIL; - goto End_ConfigPkt; - } else { - s32Error = WILC_SUCCESS; - } - #endif - } else { - err = ParseWriteResponse(gps8ConfigPacket); - if (err != WRITE_RESP_SUCCESS) { - s32Error = WILC_FAIL; - goto End_ConfigPkt; - } else { - s32Error = WILC_SUCCESS; - } - } - - - } - - -End_ConfigPkt: - up(&SemHandleSendPkt); - - return s32Error; -} -#endif s32 ConfigProvideResponse(char *pcRespBuffer, s32 s32RespLen) { s32 s32Error = WILC_SUCCESS; @@ -2052,8 +1969,6 @@ s32 CoreConfiguratorDeInit(void) return s32Error; } - -#ifndef SIMULATION /*Using the global handle of the driver*/ extern wilc_wlan_oup_t *gpstrWlanOps; /** @@ -2127,4 +2042,3 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, return ret; } -#endif diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c089e73..02aaf39 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -570,9 +570,7 @@ static u8 gs8GetIP[2][4]; static u32 gu32InactiveTime; static u8 gu8DelBcn; #endif -#ifndef SIMULATION static u32 gu32WidConnRstHack; -#endif /*BugID_5137*/ u8 *gu8FlushedJoinReq; @@ -1626,14 +1624,12 @@ static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFcon
[PATCH 07/21] staging: wilc1000: remove preprocessor conditionals unused
This patch removes unused preprocessor conditionals for the PLAT_AML8726_M3_BACKUP and PLAT_AML8726_M3 which are not used and so dead codes. They are also platform-dependent codes. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 174 +-- 1 file changed, 1 insertion(+), 173 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 967df95..ea545c9 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -13,12 +13,7 @@ #ifdef WILC1000_SINGLE_TRANSFER #define WILC_SDIO_BLOCK_SIZE 256 #else - #if defined(PLAT_AML8726_M3) /* johnny */ - #define WILC_SDIO_BLOCK_SIZE 512 - #define MAX_SEG_SIZE (1 << 12) /* 4096 */ - #else - #define WILC_SDIO_BLOCK_SIZE 512 - #endif +#define WILC_SDIO_BLOCK_SIZE 512 #endif typedef struct { @@ -356,88 +351,6 @@ static int sdio_write(uint32_t addr, uint8_t *buf, uint32_t size) nleft = size % block_size; if (nblk > 0) { - -#if defined(PLAT_AML8726_M3_BACKUP) /* johnny */ - int i; - - for (i = 0; i < nblk; i++) { - cmd.block_mode = 0; /* 1; */ - cmd.increment = 1; - cmd.count = block_size; /* nblk; */ - cmd.buffer = buf; - cmd.block_size = block_size; - if (addr > 0) { - if (!sdio_set_func0_csa_address(addr)) - goto _fail_; - } - if (!g_sdio.sdio_cmd53(&cmd)) { - g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], block send...\n", addr); - goto _fail_; - } - - if (addr > 0) - addr += block_size; /* addr += nblk*block_size; */ - - buf += block_size; /* buf += nblk*block_size; */ - } - -#elif defined(PLAT_AML8726_M3) /* johnny */ - - int i; - int rest; - int seg_cnt; - - seg_cnt = (nblk * block_size) / MAX_SEG_SIZE; - rest = (nblk * block_size) & (MAX_SEG_SIZE - 1); - - for (i = 0; i < seg_cnt; i++) { - cmd.block_mode = 1; - cmd.increment = 1; - cmd.count = MAX_SEG_SIZE / block_size; - cmd.buffer = buf; - cmd.block_size = block_size; - - if (addr > 0) { - if (!sdio_set_func0_csa_address(addr)) - goto _fail_; - } - if (!g_sdio.sdio_cmd53(&cmd)) { - g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], block send...\n", addr); - goto _fail_; - } - - if (addr > 0) - addr += MAX_SEG_SIZE; - - buf += MAX_SEG_SIZE; - - } - - if (rest > 0) { - cmd.block_mode = 1; - cmd.increment = 1; - cmd.count = rest / block_size; - cmd.buffer = buf; - cmd.block_size = block_size; /* johnny : prevent it from setting unexpected value */ - - if (addr > 0) { - if (!sdio_set_func0_csa_address(addr)) - goto _fail_; - } - if (!g_sdio.sdio_cmd53(&cmd)) { - g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], bytes send...\n", addr); - goto _fail_; - } - - if (addr > 0) - addr += rest; - - buf += rest; - - } - -#else - cmd.block_mode = 1; cmd.increment = 1; cmd.count = nblk; @@ -454,8 +367,6 @@ static int sdio_write(uint32_t addr, uint8_t *buf, uint32_t size) if (addr > 0) addr += nblk * block_size; buf += nblk * block_size; - -#endif /* platform */ } if (nleft > 0) { @@ -582,87 +493,6 @@ static int sdio_read(uint32_t addr, uint8_t *buf, uint32_t size) nleft = size % block_size; if (nblk > 0) { - -#if defined(PLAT_AML8726_M3_BACKUP) /* johnny */ - - int i; - - for (i = 0; i < nblk; i++) { - cmd.block_mode = 0; /* 1; */ - cmd.increment = 1; -
[PATCH 01/21] staging: wilc1000: remove unnecessary files
This patch removes the following files which are not used anymore. - fifo_buffer.c - fifo_buffer.h - coreconfigsimulator.h - wilc_wfi_netdevice.c Signed-off-by: Robin Hwang Signed-off-by: Tony Cho --- drivers/staging/wilc1000/Makefile | 4 +- drivers/staging/wilc1000/coreconfigsimulator.h | 17 - drivers/staging/wilc1000/fifo_buffer.c | 132 drivers/staging/wilc1000/fifo_buffer.h | 26 - drivers/staging/wilc1000/host_interface.h | 1 - drivers/staging/wilc1000/wilc_wfi_netdevice.c | 909 - 6 files changed, 2 insertions(+), 1087 deletions(-) delete mode 100644 drivers/staging/wilc1000/coreconfigsimulator.h delete mode 100644 drivers/staging/wilc1000/fifo_buffer.c delete mode 100644 drivers/staging/wilc1000/fifo_buffer.h delete mode 100644 drivers/staging/wilc1000/wilc_wfi_netdevice.c diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index a78c4d5..5ca8fa2 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -25,10 +25,10 @@ ccflags-$(CONFIG_WILC1000_PREALLOCATE_AT_LOADING_DRIVER) += -DMEMORY_STATIC \ ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += -DWILC_NORMAL_ALLOC -wilc1000-objs := wilc_wfi_netdevice.o wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \ +wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \ wilc_memory.o wilc_msgqueue.o wilc_sleep.o wilc_strutils.o \ wilc_timer.o coreconfigurator.o host_interface.o \ - fifo_buffer.o wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o + wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o wilc1000-$(CONFIG_WILC1000_SDIO) += linux_wlan_sdio.o wilc1000-$(CONFIG_WILC1000_SPI) += linux_wlan_spi.o diff --git a/drivers/staging/wilc1000/coreconfigsimulator.h b/drivers/staging/wilc1000/coreconfigsimulator.h deleted file mode 100644 index 5e01f8e..000 --- a/drivers/staging/wilc1000/coreconfigsimulator.h +++ /dev/null @@ -1,17 +0,0 @@ - -/*! - * @file coreconfigsimulator.h - * @brief - * @author - * @sacoreconfigsimulator.c - * @date 1 Mar 2012 - * @version 1.0 - */ - -#ifndef CORECONFIGSIMULATOR_H -#define CORECONFIGSIMULATOR_H - -extern s32 CoreConfigSimulatorInit(void); -extern s32 CoreConfigSimulatorDeInit(void); - -#endif diff --git a/drivers/staging/wilc1000/fifo_buffer.c b/drivers/staging/wilc1000/fifo_buffer.c deleted file mode 100644 index 86eb82e..000 --- a/drivers/staging/wilc1000/fifo_buffer.c +++ /dev/null @@ -1,132 +0,0 @@ - - -#include "fifo_buffer.h" - - - -u32 FIFO_InitBuffer(tHANDLE *hBuffer, u32 u32BufferLength) -{ - u32 u32Error = 0; - tstrFifoHandler *pstrFifoHandler = WILC_MALLOC (sizeof (tstrFifoHandler)); - if (pstrFifoHandler) { - WILC_memset (pstrFifoHandler, 0, sizeof (tstrFifoHandler)); - pstrFifoHandler->pu8Buffer = WILC_MALLOC (u32BufferLength); - if (pstrFifoHandler->pu8Buffer) { - pstrFifoHandler->u32BufferLength = u32BufferLength; - WILC_memset (pstrFifoHandler->pu8Buffer, 0, u32BufferLength); - /* create semaphore */ - sema_init(&pstrFifoHandler->SemBuffer, 1); - *hBuffer = pstrFifoHandler; - } else { - *hBuffer = NULL; - u32Error = 1; - } - } else { - u32Error = 1; - } - return u32Error; -} -u32 FIFO_DeInit(tHANDLE hFifo) -{ - u32 u32Error = 0; - tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; - if (pstrFifoHandler) { - if (pstrFifoHandler->pu8Buffer) - WILC_FREE (pstrFifoHandler->pu8Buffer); - else - u32Error = 1; - - WILC_FREE (pstrFifoHandler); - } else { - u32Error = 1; - } - return u32Error; -} - -u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32BytesRead) -{ - u32 u32Error = 0; - tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; - if (pstrFifoHandler && pu32BytesRead) { - if (pstrFifoHandler->u32TotalBytes) { - down(&pstrFifoHandler->SemBuffer); - - if (u32BytesToRead > pstrFifoHandler->u32TotalBytes) - *pu32BytesRead = pstrFifoHandler->u32TotalBytes; - else - *pu32BytesRead = u32BytesToRead; - - if ((pstrFifoHandler->u32ReadOffset + u32BytesToRead) <= pstrFifoHandler->u32BufferLength) { - WILC_memcpy(
[PATCH 06/21] staging: wilc1000: remove the warnings on unnecessary braces
This patch removes the warnings reported by checkpatch.pl on {} not necessary for the single statement blocks. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 6e865d4..967df95 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -106,6 +106,7 @@ static int sdio_set_func0_csa_address_byte0(uint32_t adr) _fail_: return 0; } + static int sdio_set_func0_block_size(uint32_t block_size) { sdio_cmd52_t cmd; @@ -963,24 +964,18 @@ static int sdio_read_int(uint32_t *int_status) cmd.data = 0; g_sdio.sdio_cmd52(&cmd); - if (cmd.data & (1 << 0)) { + if (cmd.data & (1 << 0)) tmp |= INT_0; - } - if (cmd.data & (1 << 2)) { + if (cmd.data & (1 << 2)) tmp |= INT_1; - } - if (cmd.data & (1 << 3)) { + if (cmd.data & (1 << 3)) tmp |= INT_2; - } - if (cmd.data & (1 << 4)) { + if (cmd.data & (1 << 4)) tmp |= INT_3; - } - if (cmd.data & (1 << 5)) { + if (cmd.data & (1 << 5)) tmp |= INT_4; - } - if (cmd.data & (1 << 6)) { + if (cmd.data & (1 << 6)) tmp |= INT_5; - } { int i; @@ -1087,9 +1082,8 @@ static int sdio_clear_int_ext(uint32_t val) break; flags >>= 1; } - if (!ret) { + if (!ret) goto _fail_; - } for (i = g_sdio.nint; i < MAX_NUM_INT; i++) { if (flags & 1) g_sdio.dPrint(N_ERR, "[wilc sdio]: Unexpected interrupt cleared %d...\n", i); @@ -1193,9 +1187,8 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */) return 0; } - for (i = 0; (i < 5) && (nint > 0); i++, nint--) { + for (i = 0; (i < 5) && (nint > 0); i++, nint--) reg |= (1 << (27 + i)); - } ret = sdio_write_reg(WILC_INTR_ENABLE, reg); if (!ret) { g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE); @@ -1208,9 +1201,8 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */) return 0; } - for (i = 0; (i < 3) && (nint > 0); i++, nint--) { + for (i = 0; (i < 3) && (nint > 0); i++, nint--) reg |= (1 << i); - } ret = sdio_read_reg(WILC_INTR2_ENABLE, ®); if (!ret) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/21] staging: wilc1000: describe the config symbol fully
This patch removes the warnings reported by checkpatch.pl on the short description for the config symbol in the Kconfig by adding more comments to describe the config symbol in more detail. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/Kconfig | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig index 062d9c5..51bbf46 100644 --- a/drivers/staging/wilc1000/Kconfig +++ b/drivers/staging/wilc1000/Kconfig @@ -37,17 +37,26 @@ choice bool "SDIO support" depends on MMC ---help--- - This module adds support for the SDIO interface - of adapters using WILC chipset. Select this if - your platform is using the SDIO bus. + This module adds support for the SDIO interface of adapters using + WILC1000 chipset. The Atmel WILC1000 SDIO is a full speed interface. + It meets SDIO card specification version 2.0. The interface supports + the 1-bit/4-bit SD transfer mode at the clock range of 0-50 MHz. + The host can use this interface to read and write from any register + within the chip as well as configure the WILC1000 for data DMA. + To use this interface, pin9 (SDIO_SPI_CFG) must be grounded. Select + this if your platform is using the SDIO bus. config WILC1000_SPI depends on SPI bool "SPI support" ---help--- - This module adds support for the SPI interface - of adapters using WILC chipset. Select this if - your platform is using the SPI bus. + This module adds support for the SPI interface of adapters using + WILC1000 chipset. The Atmel WILC1000 has a Serial Peripheral + Interface (SPI) that operates as a SPI slave. This SPI interface can + be used for control and for serial I/O of 802.11 data. The SPI is a + full-duplex slave synchronous serial interface that is available + immediately following reset when pin 9 (SDIO_SPI_CFG) is tied to + VDDIO. Select this if your platform is using the SPI bus. endchoice config WILC1000_HW_OOB_INTR @@ -55,5 +64,8 @@ config WILC1000_HW_OOB_INTR depends on WILC1000 && WILC1000_SDIO default n ---help--- - If your platform don't recognize SDIO IRQ, connect chipset external IRQ pin - and check this option. Or, Use this to get all interrupts including SDIO interrupts. + This option enables out-of-band interrupt support for the WILC1000 + chipset. This OOB interrupt is intended to provide a faster interrupt + mechanism for SDIO host controllers that don't support SDIO interrupt. + Select this option If the SDIO host controller in your platform + doesn't support SDIO time devision interrupt. -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/21] staging: wilc1000: remove the warnings on missing blank line
This patch removes the warnings reported by checkpatch.pl on missing a blank line after declaration. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 632b2b0..6e865d4 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -168,6 +168,7 @@ static int sdio_clear_int(void) #ifndef WILC_SDIO_IRQ_GPIO /* uint32_t sts; */ sdio_cmd52_t cmd; + cmd.read_write = 0; cmd.function = 1; cmd.raw = 0; @@ -179,6 +180,7 @@ static int sdio_clear_int(void) return cmd.data; #else uint32_t reg; + if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, ®)) { g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_HOST_RX_CTRL_0); return 0; @@ -195,6 +197,7 @@ uint32_t sdio_xfer_cnt(void) { uint32_t cnt = 0; sdio_cmd52_t cmd; + cmd.read_write = 0; cmd.function = 1; cmd.raw = 0; @@ -259,6 +262,7 @@ static int sdio_write_reg(uint32_t addr, uint32_t data) if ((addr >= 0xf0) && (addr <= 0xff)) { sdio_cmd52_t cmd; + cmd.read_write = 1; cmd.function = 0; cmd.raw = 0; @@ -482,6 +486,7 @@ static int sdio_read_reg(uint32_t addr, uint32_t *data) { if ((addr >= 0xf0) && (addr <= 0xff)) { sdio_cmd52_t cmd; + cmd.read_write = 0; cmd.function = 0; cmd.raw = 0; @@ -776,6 +781,7 @@ static int sdio_init(wilc_wlan_inp_t *inp, wilc_debug_func func) sdio_cmd52_t cmd; int loop; uint32_t chipid; + memset(&g_sdio, 0, sizeof(wilc_sdio_t)); g_sdio.dPrint = func; @@ -977,6 +983,7 @@ static int sdio_read_int(uint32_t *int_status) } { int i; + for (i = g_sdio.nint; i < MAX_NUM_INT; i++) { if ((tmp >> (IRG_FLAGS_OFFSET + i)) & 0x1) { g_sdio.dPrint(N_ERR, "[wilc sdio]: Unexpected interrupt (1) : tmp=%x, data=%x\n", tmp, cmd.data); @@ -1015,6 +1022,7 @@ static int sdio_clear_int_ext(uint32_t val) #ifdef WILC_SDIO_IRQ_GPIO { uint32_t flags; + flags = val & ((1 << MAX_NUN_INT_THRPT_ENH2) - 1); reg = flags; } @@ -1032,6 +1040,7 @@ static int sdio_clear_int_ext(uint32_t val) reg |= (1 << 7); if (reg) { sdio_cmd52_t cmd; + cmd.read_write = 1; cmd.function = 0; cmd.raw = 0; @@ -1051,6 +1060,7 @@ static int sdio_clear_int_ext(uint32_t val) /* see below. has_thrpt_enh2 uses register 0xf8 to clear interrupts. */ /* Cannot clear multiple interrupts. Must clear each interrupt individually */ uint32_t flags; + flags = val & ((1 << MAX_NUM_INT) - 1); if (flags) { int i; @@ -1059,6 +1069,7 @@ static int sdio_clear_int_ext(uint32_t val) for (i = 0; i < g_sdio.nint; i++) { if (flags & 1) { sdio_cmd52_t cmd; + cmd.read_write = 1; cmd.function = 0; cmd.raw = 0; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/21] staging: wilc1000: remove warnings on unnecessary braces
This patch removes the warnings reported by checkpatch.pl on the braces {} not necessary for any arm of this statement. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 1621f91..5e7e3f0 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -654,11 +654,10 @@ static int sdio_init(wilc_wlan_inp_t *inp, wilc_debug_func func) goto _fail_; } g_sdio.dPrint(N_ERR, "[wilc sdio]: chipid (%08x)\n", chipid); - if ((chipid & 0xfff) > 0x2a0) { + if ((chipid & 0xfff) > 0x2a0) g_sdio.has_thrpt_enh3 = 1; - } else { + else g_sdio.has_thrpt_enh3 = 0; - } g_sdio.dPrint(N_ERR, "[wilc sdio]: has_thrpt_enh3 = %d...\n", g_sdio.has_thrpt_enh3); return 1; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/21] staging: wilc1000: #ifdef conditionals cover entire functions
This patch lets preprocessor conditionals (#ifdef) related to WILC_SDIO_IRQ_GPIO to compile out the entire functions. Compiling out the entire functions is preferred rather than portions of functions or expressions becausue doing so makes code harder to read. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 482 +-- 1 file changed, 293 insertions(+), 189 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 8f674ad..83b8da9 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -155,22 +155,9 @@ _fail_: return 0; } +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO - /* uint32_t sts; */ - sdio_cmd52_t cmd; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x4; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - int_clrd++; - - return cmd.data; -#else uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, ®)) { @@ -181,9 +168,23 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif +} +#else +static int sdio_clear_int(void) +{ + sdio_cmd52_t cmd; + cmd.read_write = 0; + cmd.function = 1; + cmd.raw = 0; + cmd.address = 0x4; + cmd.data = 0; + g_sdio.sdio_cmd52(&cmd); + int_clrd++; + + return cmd.data; } +#endif /* WILC_SDIO_IRQ_GPIO */ uint32_t sdio_xfer_cnt(void) { @@ -521,14 +522,16 @@ static int sdio_deinit(void *pv) return 1; } +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_sync(void) { uint32_t reg; + int ret; /** * Disable power sequencer **/ - if (!sdio_read_reg(WILC_MISC, ®)) { + if(!sdio_read_reg(WILC_MISC, ®)) { g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read misc reg...\n"); return 0; } @@ -539,45 +542,60 @@ static int sdio_sync(void) return 0; } -#ifdef WILC_SDIO_IRQ_GPIO - { - uint32_t reg; - int ret; + /** +* interrupt pin mux select +**/ + ret = sdio_read_reg(WILC_PIN_MUX_0, ®); + if (!ret) { + g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_PIN_MUX_0); + return 0; + } + reg |= (1 << 8); + ret = sdio_write_reg(WILC_PIN_MUX_0, reg); + if (!ret) { + g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_PIN_MUX_0); + return 0; + } - /** -* interrupt pin mux select -**/ - ret = sdio_read_reg(WILC_PIN_MUX_0, ®); - if (!ret) { - g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_PIN_MUX_0); - return 0; - } - reg |= (1 << 8); - ret = sdio_write_reg(WILC_PIN_MUX_0, reg); - if (!ret) { - g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_PIN_MUX_0); - return 0; - } + /** +* interrupt enable +**/ + ret = sdio_read_reg(WILC_INTR_ENABLE, ®); + if (!ret) { + g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_INTR_ENABLE); + return 0; + } + reg |= (1 << 16); + ret = sdio_write_reg(WILC_INTR_ENABLE, reg); + if (!ret) { + g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE); + return 0; + } - /** -* interrupt enable -**/ - ret = sdio_read_reg(WILC_INTR_ENABLE, ®); - if (!ret) { - g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_INTR_ENABLE); - return 0; - } - reg |= (1 << 16); - ret = sdio_write_reg(WILC_INTR_ENABLE, reg); - if (!ret) { - g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE); - return 0; - } + return 1; +} +#else +static int sdio_sync(void) +{ + uint32_t reg; + + /** +* Disable power sequencer +**/ + if (!sdio_read_reg(WILC_MISC, ®)) { + g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read misc reg...\n"); + return 0; + } + + reg &= ~(1 << 8); + if (!sdio_write_reg(WILC_MISC, reg)) { +
[PATCH 11/21] staging: wilc1000: remove multiple blank lines
From: "Jude.Lee" This patch removes the warnings reported by checkpatch.pl for using multiple blank lines. Signed-off-by: Jude.Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 9059c8d..3b4b01b 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -8,7 +8,6 @@ * @version 1.0 */ - #ifndef CORECONFIGURATOR_H #define CORECONFIGURATOR_H @@ -42,7 +41,6 @@ extern u16 g_num_total_switches; #define AID_LEN 2 #define IE_HDR_LEN 2 - /* Operating Mode: SET */ #define SET_CFG 0 /* Operating Mode: GET */ @@ -59,15 +57,12 @@ extern u16 g_num_total_switches; #define MAC_CONNECTED1 #define MAC_DISCONNECTED 0 - - /*/ /* Function Macros */ /*/ #define MAKE_WORD16(lsb, msb) u16)(msb) << 8) & 0xFF00) | (lsb)) #define MAKE_WORD32(lsw, msw) u32)(msw) << 16) & 0x) | (lsw)) - /*/ /* Type Definitions */ /*/ @@ -140,7 +135,6 @@ typedef struct { u16 u16RespIEsLen; } tstrConnectRespInfo; - typedef struct { u8 au8bssid[6]; u8 *pu8ReqIEs; @@ -150,8 +144,6 @@ typedef struct { u16 u16ConnectStatus; } tstrConnectInfo; - - typedef struct { u16 u16reason; u8 *ie; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/21] staging: wilc1000: remove a dead preprocessor conditionals
This patch removes the preprocessor conditionals which are related to the WILC1000_SINGLE_TRANSFER definition becasue this is not used. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index ea545c9..8f674ad 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -10,11 +10,7 @@ #include "wilc_wlan_if.h" #include "wilc_wlan.h" -#ifdef WILC1000_SINGLE_TRANSFER -#define WILC_SDIO_BLOCK_SIZE 256 -#else #define WILC_SDIO_BLOCK_SIZE 512 -#endif typedef struct { void *os_context; @@ -321,16 +317,6 @@ static int sdio_write(uint32_t addr, uint8_t *buf, uint32_t size) cmd.function = 0; cmd.address = 0x10f; } else { -#ifdef WILC1000_SINGLE_TRANSFER - /** -* has to be block aligned... -**/ - nleft = size % block_size; - if (nleft > 0) { - size += block_size; - size &= ~(block_size - 1); - } -#else /** * has to be word aligned... **/ @@ -338,7 +324,6 @@ static int sdio_write(uint32_t addr, uint8_t *buf, uint32_t size) size += 4; size &= ~0x3; } -#endif /** * func 1 access @@ -463,16 +448,6 @@ static int sdio_read(uint32_t addr, uint8_t *buf, uint32_t size) cmd.function = 0; cmd.address = 0x10f; } else { -#ifdef WILC1000_SINGLE_TRANSFER - /** -* has to be block aligned... -**/ - nleft = size % block_size; - if (nleft > 0) { - size += block_size; - size &= ~(block_size - 1); - } -#else /** * has to be word aligned... **/ @@ -480,7 +455,6 @@ static int sdio_read(uint32_t addr, uint8_t *buf, uint32_t size) size += 4; size &= ~0x3; } -#endif /** * func 1 access -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/21] staging: wilc1000: alignment should match open parenthesis
From: "Jude.Lee" This patch fixes the checks reported by checkpatch.pl alignment should match open parenthesis Signed-off-by: Jude.Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 3b4b01b..56ff2ba 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -167,17 +167,18 @@ extern s32 CoreConfiguratorInit(void); extern s32 CoreConfiguratorDeInit(void); extern s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, -u32 u32WIDsCount, bool bRespRequired, u32 drvHandler); +u32 u32WIDsCount, bool bRespRequired, u32 drvHandler); extern s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); extern s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); extern s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, - tstrConnectRespInfo **ppstrConnectRespInfo); + tstrConnectRespInfo **ppstrConnectRespInfo); extern s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo); #ifndef CONNECT_DIRECT extern s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], - wid_site_survey_reslts_s **ppstrSurveyResults, u32 *pu32SurveyResultsCount); + wid_site_survey_reslts_s **ppstrSurveyResults, + u32 *pu32SurveyResultsCount); extern s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults); #endif -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/21] staging: wilc1000: remove warnings on missing blank line
This patch removes the warnings reported by checkpatch.pl on missing a blank line after declarations. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 5e7e3f0..296203a 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -782,6 +782,7 @@ static int sdio_clear_int_ext(uint32_t val) if (g_sdio.has_thrpt_enh3) { uint32_t reg; + reg = val & ((1 << MAX_NUN_INT_THRPT_ENH2) - 1); /* select VMM table 0 */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/21] staging: wilc1000: remove errors on required space
This patch removes the errors reported by checkpatch.pl, which is the space required before the open parenthesis '('. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index ee5578b..1621f91 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -475,7 +475,7 @@ static int sdio_sync(void) /** * Disable power sequencer **/ - if(!sdio_read_reg(WILC_MISC, ®)) { + if (!sdio_read_reg(WILC_MISC, ®)) { g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read misc reg...\n"); return 0; } @@ -781,7 +781,7 @@ static int sdio_clear_int_ext(uint32_t val) { int ret; - if(g_sdio.has_thrpt_enh3) { + if (g_sdio.has_thrpt_enh3) { uint32_t reg; reg = val & ((1 << MAX_NUN_INT_THRPT_ENH2) - 1); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/21] staging: wilc1000: update TODO list of WILC1000
The TODO list is updated for the WILC1000 kernel driver. The TODO list contains many items listed in time sequence. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/TODO | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/TODO b/drivers/staging/wilc1000/TODO index 95199d8..6b745cd 100644 --- a/drivers/staging/wilc1000/TODO +++ b/drivers/staging/wilc1000/TODO @@ -1,14 +1,15 @@ TODO: -- remove the defined feature as kernel versions -- remove OS wrapper functions -- remove custom debug and tracing functions +- remove most of warnings reported by checkpatch.pl +- remove OS wrapper functions to use kernel API as is - rework comments and function headers(also coding style) - replace all semaphores with mutexes or completions -- make spi and sdio components coexist in one build +- remove compile warnings related to 64 bit machine - turn compile-time platform configuration (BEAGLE_BOARD, PANDA_BOARD, PLAT_WMS8304, PLAT_RK, CUSTOMER_PLATFORM, ...) into run-time options that are read from DT -- support soft-ap and p2p mode -- support resume/suspend function +- support soft-ap and p2p mode by updating the WILC1000 driver and fw +- support resume/suspend function by updating the WILC1000 driver and fw - replace SIOCDEVPRIVATE commands with generic API functions - use wext-core handling instead of private SIOCSIWPRIV implementation +- replace CamelCase to follow coding style +- remove the warnings, line over 80 characters -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/21] staging: wilc1000: remove unnecessary blank lines
This patch removes the following warnings reported by checkpatch.pl. - Blank lines aren't necessary after an open brace '{' - Blank lines aren't necessary before a close brace '}' Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 50be2a1..42c5ad8 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -679,7 +679,6 @@ static void sdio_set_default_speed(void) static int sdio_read_size(uint32_t *size) { - uint32_t tmp; sdio_cmd52_t cmd; @@ -806,7 +805,6 @@ static int sdio_clear_int_ext(uint32_t val) g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__); goto _fail_; } - } } else { /* see below. has_thrpt_enh2 uses register 0xf8 to clear interrupts. */ @@ -910,7 +908,6 @@ static int sdio_clear_int_ext(uint32_t val) g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__); goto _fail_; } - } } else { uint32_t vmm_ctl; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/21] staging: wilc1000: remove warnings on the multiple blank lines uses
From: "Kim, Leo" This patch removes the warnings reported by checkpatch.pl for using multiple blank lines. Signed-off-by: Kim, Leo Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 69 --- 1 file changed, 69 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index a4589b7..d012af5 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -102,7 +102,6 @@ static int linux_wlan_device_detection(int on_off) return 0; } - #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP static int dev_state_ev_handler(struct notifier_block *this, unsigned long event, void *ptr); @@ -115,7 +114,6 @@ static struct notifier_block g_dev_notifier = { if (g_linux_wlan->oup.wlan_cleanup != NULL) \ g_linux_wlan->oup.wlan_cleanup(); } - #ifndef STA_FIRMWARE #define STA_FIRMWARE "wifi_firmware.bin" #endif @@ -128,15 +126,12 @@ static struct notifier_block g_dev_notifier = { #define P2P_CONCURRENCY_FIRMWARE "wifi_firmware_p2p_concurrency.bin" #endif - - typedef struct android_wifi_priv_cmd { char *buf; int used_len; int total_len; } android_wifi_priv_cmd; - #define IRQ_WAIT 1 #define IRQ_NO_WAIT0 /* @@ -157,7 +152,6 @@ void linux_wlan_unlock(void *vp); extern void WILC_WFI_monitor_rx(uint8_t *buff, uint32_t size); extern void WILC_WFI_p2p_rx(struct net_device *dev, uint8_t *buff, uint32_t size); - static void *internal_alloc(uint32_t size, uint32_t flag); static void linux_wlan_tx_complete(void *priv, int status); void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset); @@ -169,8 +163,6 @@ static struct net_device_stats *mac_stats(struct net_device *dev); static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd); static void wilc_set_multicast_list(struct net_device *dev); - - /* * for now - in frmw_to_linux there should be private data to be passed to it * and this data should be pointer to net device @@ -199,8 +191,6 @@ volatile int WatchDogdebuggerCounter; char DebugBuffer[DEGUG_BUFFER_LENGTH + 20] = {0}; static char *ps8current = DebugBuffer; - - void printk_later(const char *format, ...) { va_list args; @@ -212,7 +202,6 @@ void printk_later(const char *format, ...) } - void dump_logs() { if (DebugBuffer[0]) { @@ -244,11 +233,8 @@ static int DebuggingThreadTask(void *vp) WatchDogdebuggerCounter = 0; } } - - #endif - #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP static int dev_state_ev_handler(struct notifier_block *this, unsigned long event, void *ptr) { @@ -296,7 +282,6 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event PRINT_INFO(GENERIC_DBG, "\n == IP Address Obtained ===\n\n"); - /*If we are in station mode or client mode*/ if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) { pstrWFIDrv->IFC_UP = 1; @@ -305,8 +290,6 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event PRINT_D(GENERIC_DBG, "IP obtained , enable scan\n"); } - - if (bEnablePS) host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 1, 0); @@ -332,7 +315,6 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event resolve_disconnect_aberration(pstrWFIDrv); - PRINT_D(GENERIC_DBG, "[%s] Down IP\n", dev_iface->ifa_label); pIP_Add_buff = null_ip; @@ -385,8 +367,6 @@ void linux_wlan_disable_irq(int wait) #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) static irqreturn_t isr_uh_routine(int irq, void *user_data) { - - int_rcvdU++; #if (RX_BH_TYPE != RX_BH_THREADED_IRQ) linux_wlan_disable_irq(IRQ_NO_WAIT); @@ -438,9 +418,6 @@ static void isr_bh_routine(struct work_struct *work) #else return; #endif - - - } int_rcvdB++; @@ -451,7 +428,6 @@ static void isr_bh_routine(struct work_struct *work) PRINT_ER("wlan_handle_rx_isr() hasn't been initialized\n"); } - #if (RX_BH_TYPE == RX_BH_THREADED_IRQ) return IRQ_HANDLED; #endif @@ -485,7 +461,6 @@ static int isr_bh_routine(void *vp) } #endif - #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) static int init_irq(linux_wlan_t *p_nic) { @@ -516,7 +491,6 @@ static int init_irq(linux_wlan_t *p_nic) PRINT_ER("could not obtain gpio for WILC_INTR\n"); } - #if (RX_BH_TYPE == RX_BH_THREADED_IRQ) if ((ret != -1) && (request_threaded_irq(nic->dev_irq_num, isr_uh_routine, isr_bh_ro
[PATCH 10/21] staging: wilc1000: remove unused functions
This patch removes the dead functions which are not used anymore. - sdio_check_bs - sdio_xfer_cnt Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 56 drivers/staging/wilc1000/wilc_wlan.c | 1 - 2 files changed, 57 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 83b8da9..ee5578b 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -186,67 +186,11 @@ static int sdio_clear_int(void) } #endif /* WILC_SDIO_IRQ_GPIO */ -uint32_t sdio_xfer_cnt(void) -{ - uint32_t cnt = 0; - sdio_cmd52_t cmd; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x1C; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - cnt = cmd.data; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x1D; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - cnt |= (cmd.data << 8); - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x1E; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - cnt |= (cmd.data << 16); - - return cnt; -} - / * * Sdio interfaces * / -int sdio_check_bs(void) -{ - sdio_cmd52_t cmd; - - /** -* poll until BS is 0 -**/ - cmd.read_write = 0; - cmd.function = 0; - cmd.raw = 0; - cmd.address = 0xc; - cmd.data = 0; - if (!g_sdio.sdio_cmd52(&cmd)) { - g_sdio.dPrint(N_ERR, "[wilc sdio]: Fail cmd 52, get BS register...\n"); - goto _fail_; - } - - return 1; - -_fail_: - - return 0; -} - static int sdio_write_reg(uint32_t addr, uint32_t data) { #ifdef BIG_ENDIAN diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index def72fd..68c38ec 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -25,7 +25,6 @@ extern u8 g_wilc_initialized; /* AMR : 0422 RK3026 Crash issue */ #endif extern void WILC_WFI_mgmt_rx(uint8_t *buff, uint32_t size); extern void frmw_to_linux(uint8_t *buff, uint32_t size); -int sdio_xfer_cnt(void); uint32_t wilc_get_chipid(uint8_t update); u16 Set_machw_change_vir_if(bool bValue); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/21] staging: wilc1000: remove unnecessary spcae
From: "Kim, Leo" This patch removes the warnings reported by checkpatch.pl on space prohibited between function name and open parenthesis '(' Signed-off-by: Kim, Leo Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index d012af5..3e55a8a 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -194,9 +194,9 @@ static char *ps8current = DebugBuffer; void printk_later(const char *format, ...) { va_list args; - va_start (args, format); - ps8current += vsprintf (ps8current, format, args); - va_end (args); + va_start(args, format); + ps8current += vsprintf(ps8current, format, args); + va_end(args); if ((ps8current - DebugBuffer) > DEGUG_BUFFER_LENGTH) ps8current = DebugBuffer; @@ -477,9 +477,9 @@ static int init_irq(linux_wlan_t *p_nic) * * ex) nic->dev_irq_num = gpio_to_irq(GPIO_NUM); */ -#elif defined (NM73131_0_BOARD) +#elif defined(NM73131_0_BOARD) nic->dev_irq_num = IRQ_WILC1000; -#elif defined (PANDA_BOARD) +#elif defined(PANDA_BOARD) gpio_export(GPIO_NUM, 1); nic->dev_irq_num = OMAP_GPIO_IRQ(GPIO_NUM); irq_set_irq_type(nic->dev_irq_num, IRQ_TYPE_LEVEL_LOW); @@ -1483,7 +1483,7 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) nwi->os_context.txq_wait_event = (void *)&g_linux_wlan->txq_event; -#if defined (MEMORY_STATIC) +#if defined(MEMORY_STATIC) nwi->os_context.rx_buffer_size = LINUX_RX_SIZE; #endif nwi->os_context.rxq_critical_section = (void *)&g_linux_wlan->rxq_cs; @@ -1935,7 +1935,7 @@ _fail_locks_: * - this function will be called automatically by OS when module inserted. */ -#if !defined (NM73131_0_BOARD) +#if !defined(NM73131_0_BOARD) int mac_init_fn(struct net_device *ndev) { @@ -1966,7 +1966,7 @@ voidWILC_WFI_frame_register(struct wiphy *wiphy, struct net_device *dev, u16 frame_type, bool reg); /* This fn is called, when this device is setup using ifconfig */ -#if !defined (NM73131_0_BOARD) +#if !defined(NM73131_0_BOARD) int mac_open(struct net_device *ndev) { perInterface_wlan_t *nic; @@ -2565,7 +2565,7 @@ int wilc_netdev_init(void) /*The 1st function called after module inserted*/ static int __init init_wilc_driver(void) { -#if defined (WILC_DEBUGFS) +#if defined(WILC_DEBUGFS) if (wilc_debugfs_init() < 0) { PRINT_D(GENERIC_DBG, "fail to create debugfs for wilc driver\n"); return -1; @@ -2671,7 +2671,7 @@ static void __exit exit_wilc_driver(void) } printk("Module_exit Done.\n"); -#if defined (WILC_DEBUGFS) +#if defined(WILC_DEBUGFS) wilc_debugfs_remove(); #endif -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/21] staging: wilc1000: remove braces {} for single statement blocks
From: "Kim, Leo" This patch removes the warnings reported by checkpatch.pl on braces {} not necessary for the single statement blocks. Signed-off-by: Kim, Leo Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 78 --- 1 file changed, 26 insertions(+), 52 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 10ea53a..a4589b7 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -207,9 +207,8 @@ void printk_later(const char *format, ...) va_start (args, format); ps8current += vsprintf (ps8current, format, args); va_end (args); - if ((ps8current - DebugBuffer) > DEGUG_BUFFER_LENGTH) { + if ((ps8current - DebugBuffer) > DEGUG_BUFFER_LENGTH) ps8current = DebugBuffer; - } } @@ -779,9 +778,8 @@ struct net_device *GetIfHandler(uint8_t *pMacHeader) } } PRINT_INFO(INIT_DBG, "Invalide handle\n"); - for (i = 0; i < 25; i++) { + for (i = 0; i < 25; i++) PRINT_D(INIT_DBG, "%02x ", pMacHeader[i]); - } Bssid = pMacHeader + 18; Bssid1 = pMacHeader + 12; for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) { @@ -821,9 +819,8 @@ int linux_wlan_get_num_conn_ifcs(void) uint8_t ret_val = 0; for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) { - if (memcmp(g_linux_wlan->strInterfaceInfo[i].aBSSID, null_bssid, 6)) { + if (memcmp(g_linux_wlan->strInterfaceInfo[i].aBSSID, null_bssid, 6)) ret_val++; - } } return ret_val; } @@ -912,15 +909,13 @@ static int linux_wlan_txq_task(void *vp) msleep(TX_BACKOFF_WEIGHT_UNIT_MS << backoff_weight); } while (/*timeout*/ 0); backoff_weight += TX_BACKOFF_WEIGHT_INCR_STEP; - if (backoff_weight > TX_BACKOFF_WEIGHT_MAX) { + if (backoff_weight > TX_BACKOFF_WEIGHT_MAX) backoff_weight = TX_BACKOFF_WEIGHT_MAX; - } } else { if (backoff_weight > TX_BACKOFF_WEIGHT_MIN) { backoff_weight -= TX_BACKOFF_WEIGHT_DECR_STEP; - if (backoff_weight < TX_BACKOFF_WEIGHT_MIN) { + if (backoff_weight < TX_BACKOFF_WEIGHT_MIN) backoff_weight = TX_BACKOFF_WEIGHT_MIN; - } } } /*TODO: drop packets after a certain time/number of retry count. */ @@ -1051,9 +1046,8 @@ static int linux_wlan_firmware_download(linux_wlan_t *p_nic) **/ PRINT_D(INIT_DBG, "Downloading Firmware ...\n"); ret = g_linux_wlan->oup.wlan_firmware_download(g_linux_wlan->wilc_firmware->data, g_linux_wlan->wilc_firmware->size); - if (ret < 0) { + if (ret < 0) goto _FAIL_; - } /* Freeing FW buffer */ PRINT_D(INIT_DBG, "Freeing FW buffer ...\n"); @@ -1384,13 +1378,11 @@ void wilc1000_wlan_deinit(linux_wlan_t *nic) /* not sure if the following unlocks are needed or not*/ - if (&g_linux_wlan->rxq_event != NULL) { + if (&g_linux_wlan->rxq_event != NULL) linux_wlan_unlock(&g_linux_wlan->rxq_event); - } - if (&g_linux_wlan->txq_event != NULL) { + if (&g_linux_wlan->txq_event != NULL) linux_wlan_unlock(&g_linux_wlan->txq_event); - } #if (RX_BH_TYPE == RX_BH_WORK_QUEUE) @@ -1744,14 +1736,12 @@ static int linux_wlan_read_mac_addr(void *vp) } } - if (index == array_size) { + if (index == array_size) PRINT_ER("random MAC\n"); - } exit: - if (fp && !IS_ERR(fp)) { + if (fp && !IS_ERR(fp)) filp_close(fp, NULL); - } set_fs(old_fs); @@ -1783,9 +1773,8 @@ uint8_t wilc1000_prepare_11b_core(wilc_wlan_inp_t *nwi, wilc_wlan_oup_t *nwo, li sdio_register_driver(&wilc_bus); - while (!probe) { + while (!probe) msleep(100); - } probe = 0; g_linux_wlan->wilc_sdio_func = local_sdio_func; linux_to_wlan(nwi, nic); @@ -1817,9 +1806,8
[PATCH 16/21] staging: wilc1000: remove unnecessary inner braces
This patch removes unnecessary inner braces. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_sdio.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 296203a..50be2a1 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -686,23 +686,21 @@ static int sdio_read_size(uint32_t *size) /** * Read DMA count in words **/ - { - cmd.read_write = 0; - cmd.function = 0; - cmd.raw = 0; - cmd.address = 0xf2; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - tmp = cmd.data; + cmd.read_write = 0; + cmd.function = 0; + cmd.raw = 0; + cmd.address = 0xf2; + cmd.data = 0; + g_sdio.sdio_cmd52(&cmd); + tmp = cmd.data; - /* cmd.read_write = 0; */ - /* cmd.function = 0; */ - /* cmd.raw = 0; */ - cmd.address = 0xf3; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - tmp |= (cmd.data << 8); - } + /* cmd.read_write = 0; */ + /* cmd.function = 0; */ + /* cmd.raw = 0; */ + cmd.address = 0xf3; + cmd.data = 0; + g_sdio.sdio_cmd52(&cmd); + tmp |= (cmd.data << 8); *size = tmp; return 1; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 06/21] staging: wilc1000: remove the warnings on unnecessary braces
On 2015년 07월 30일 05:50, Greg KH wrote: On Tue, Jul 28, 2015 at 05:47:25PM +0900, Tony Cho wrote: This patch removes the warnings reported by checkpatch.pl on {} not necessary for the single statement blocks. Signed-off-by: Tony Cho Reviewed-by: Dan Carpenter --- drivers/staging/wilc1000/wilc_sdio.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 6e865d4..967df95 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -106,6 +106,7 @@ static int sdio_set_func0_csa_address_byte0(uint32_t adr) _fail_: return 0; } + That's not what this change does :( I'll let this go, but be more careful next time please... greg k-h I will take more careful next time as you advise. Thanks for your advice, Tony. -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 21/21] staging: wilc1000: update TODO list of WILC1000
On 2015년 07월 30일 06:01, Greg KH wrote: On Tue, Jul 28, 2015 at 05:47:40PM +0900, Tony Cho wrote: The TODO list is updated for the WILC1000 kernel driver. The TODO list contains many items listed in time sequence. I don't understand what you mean by "in time sequence" Sorry for unclear sentence. This means I will work them step by step in chronological order. Signed-off-by: Tony Cho Reviewed-by: Dan Carpenter --- drivers/staging/wilc1000/TODO | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/TODO b/drivers/staging/wilc1000/TODO index 95199d8..6b745cd 100644 --- a/drivers/staging/wilc1000/TODO +++ b/drivers/staging/wilc1000/TODO @@ -1,14 +1,15 @@ TODO: -- remove the defined feature as kernel versions -- remove OS wrapper functions -- remove custom debug and tracing functions +- remove most of warnings reported by checkpatch.pl "most"? Why not all? I will end up to remove all of warnings (I must make it) but I need to do them step by step. Most warnings are from both camelcase and line over 80 characters. They will be removed after most warnings are removed to avoid confusing new driver coming soon. Again, I will remove all of warnings. +- remove OS wrapper functions to use kernel API as is Why reword this, the original line is just fine. Good point, I agree with you. - rework comments and function headers(also coding style) - replace all semaphores with mutexes or completions -- make spi and sdio components coexist in one build Why remove this item? It's not done and needs to be done. The first two lines are still in my TODO list. Do you mean coexistence of spi and sdio? If yes, I will recheck the driver to find out good solution as you recommend. +- remove compile warnings related to 64 bit machine That's a given, I'm not enabling the build of the driver until that happens. Please work on that next, coding style fixes can happen after that. As of right now, this driver is marked BROKEN. thanks, greg k-h As you mentioned, I believe it's very important to break down BROKEN status. I will soon send the 64 bit patches to remove compile warnings while fixing coding styles at the same time. As you know, there are the structural issues to resolve them in the driver, for example, redundant casting which causes build warnings and the codes are not readable. However, I will cut down all of them. Thanks, Tony. -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 09/21] staging: wilc1000: #ifdef conditionals cover entire functions
On 2015년 07월 30일 06:14, Dan Carpenter wrote: On Wed, Jul 29, 2015 at 01:54:54PM -0700, Greg KH wrote: On Tue, Jul 28, 2015 at 05:47:28PM +0900, Tony Cho wrote: /** * Disable power sequencer **/ - if (!sdio_read_reg(WILC_MISC, ®)) { + if(!sdio_read_reg(WILC_MISC, ®)) { I noticed this style change during my review, but I didn't comment because I was feeling in a happy mood and because it got fixed again in patch 13. Normally, of course we don't allow people to break and then fix things in later patches but this was a white space issue. It's sometimes hard to know how strict to be. I knowingly allowed far worse things in that series of 150 unisys patches which was probably a mistake in retrospect. regards, dan carpenter Yes, I agree with you. It's obviously my mistake while rewriting the codes and found out my mistake so fixed in the later patch. I will take more care. Thanks for your advice, Tony. -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 09/21] staging: wilc1000: #ifdef conditionals cover entire functions
On 2015년 07월 30일 06:29, Greg KH wrote: On Thu, Jul 30, 2015 at 12:14:08AM +0300, Dan Carpenter wrote: On Wed, Jul 29, 2015 at 01:54:54PM -0700, Greg KH wrote: On Tue, Jul 28, 2015 at 05:47:28PM +0900, Tony Cho wrote: /** * Disable power sequencer **/ - if (!sdio_read_reg(WILC_MISC, ®)) { + if(!sdio_read_reg(WILC_MISC, ®)) { I noticed this style change during my review, but I didn't comment because I was feeling in a happy mood and because it got fixed again in patch 13. Normally, of course we don't allow people to break and then fix things in later patches but this was a white space issue. What this shows is that Tony isn't syncing up properly with other changes that have happened in the upstream tree from his tree, which is indicitive of not doing development properly, which is why I rejected this. And it shouldn't be done anyway, but that's a minor issue overall. thanks, greg k-h It's obviously my mistake as I told to Dan, however, this problem didn't happen because I was not syncing up with other changes in the upstream tree. I will resend the patch. Thanks for your advice, Tony. -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 09/21] staging: wilc1000: #ifdef conditionals cover entire functions
On 2015년 07월 30일 05:54, Greg KH wrote: On Tue, Jul 28, 2015 at 05:47:28PM +0900, Tony Cho wrote: This patch lets preprocessor conditionals (#ifdef) related to WILC_SDIO_IRQ_GPIO to compile out the entire functions. Compiling out the entire functions is preferred rather than portions of functions or expressions becausue doing so makes code harder to read. Signed-off-by: Tony Cho Reviewed-by: Dan Carpenter --- drivers/staging/wilc1000/wilc_sdio.c | 482 +-- 1 file changed, 293 insertions(+), 189 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 8f674ad..83b8da9 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -155,22 +155,9 @@ _fail_: return 0; } +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO - /* uint32_t sts; */ - sdio_cmd52_t cmd; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x4; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - int_clrd++; - - return cmd.data; -#else uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, ®)) { @@ -181,9 +168,23 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif +} +#else +static int sdio_clear_int(void) +{ + sdio_cmd52_t cmd; + cmd.read_write = 0; + cmd.function = 1; + cmd.raw = 0; + cmd.address = 0x4; + cmd.data = 0; + g_sdio.sdio_cmd52(&cmd); + int_clrd++; + + return cmd.data; } +#endif /* WILC_SDIO_IRQ_GPIO */ Why does this have to be a config option anyway? Shouldn't this be dynamically determined? How should someone know which to choose? I agree with your concern. I will check it again. uint32_t sdio_xfer_cnt(void) { @@ -521,14 +522,16 @@ static int sdio_deinit(void *pv) return 1; } +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_sync(void) { uint32_t reg; + int ret; /** * Disable power sequencer **/ - if (!sdio_read_reg(WILC_MISC, ®)) { + if(!sdio_read_reg(WILC_MISC, ®)) { You just reverted this coding style change, why? No, I just had mistake while rewriting the codes. I will take care more from now on. I can't take this patch, sorry. Please sync up and make sure you do not revert changes that other people have already made to the code, and resend the remaining patches in this series. thanks, greg k-h -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/5] 2nd patch for illegal coding style
This patch V2 includes only patches rejected. The rejected patch for the following, #ifdef conditionals cover entire functions, introduced new error on required space before the open parenthesis '('. This is my mistake while rewriting codes. The original 13th patch didn't include new fix introduced on the previous patch due to no sync-up issue. The original 13th patch fixed the same warnings but in different place. The 64bit compile warnings will be resolved after sending these patches. Then, ambiguous sdio/spi parts including preprocessor conditionals will be tried. Tony Cho (5): staging: wilc1000: #ifdef conditionals cover entire functions staging: wilc1000: remove unnecessary blank lines staging: wilc1000: remove warnings on missing blank line staging: wilc1000: remove errors on required space staging: wilc1000: remove unused functions drivers/staging/wilc1000/wilc_sdio.c | 518 +++ drivers/staging/wilc1000/wilc_wlan.c | 1 - 2 files changed, 283 insertions(+), 236 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 2/5] staging: wilc1000: remove unnecessary blank lines
This patch removes the following warnings reported by checkpatch.pl. - Blank lines aren't necessary after an open brace '{' - Blank lines aren't necessary before a close brace '}' Signed-off-by: Tony Cho --- V2: This patch doesn't have a difference with the first one but resent because it's rejected with the 9th patch. --- drivers/staging/wilc1000/wilc_sdio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 50be2a1..42c5ad8 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -679,7 +679,6 @@ static void sdio_set_default_speed(void) static int sdio_read_size(uint32_t *size) { - uint32_t tmp; sdio_cmd52_t cmd; @@ -806,7 +805,6 @@ static int sdio_clear_int_ext(uint32_t val) g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__); goto _fail_; } - } } else { /* see below. has_thrpt_enh2 uses register 0xf8 to clear interrupts. */ @@ -910,7 +908,6 @@ static int sdio_clear_int_ext(uint32_t val) g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__); goto _fail_; } - } } else { uint32_t vmm_ctl; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 3/5] staging: wilc1000: remove warnings on missing blank line
This patch removes the warnings reported by checkpatch.pl on missing a blank line after declarations. Signed-off-by: Tony Cho --- V2: This patch doesn't have a difference with the first one. However, it's resent becasue not accepted with the 9th patch. --- drivers/staging/wilc1000/wilc_sdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index ee1cbd1..50be2a1 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -780,6 +780,7 @@ static int sdio_clear_int_ext(uint32_t val) if (g_sdio.has_thrpt_enh3) { uint32_t reg; + reg = val & ((1 << MAX_NUN_INT_THRPT_ENH2) - 1); /* select VMM table 0 */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 1/5] staging: wilc1000: #ifdef conditionals cover entire functions
This patch lets preprocessor conditionals (#ifdef) related to WILC_SDIO_IRQ_GPIO to compile out the entire functions. Compiling out the entire functions is preferred rather than portions of functions or expressions becausue doing so makes code harder to read. Signed-off-by: Tony Cho --- V2: Remove the warnings on the following: - ERROR: space required before the open parenthesis '(' This patch is resent because unexpected warning is added while rewriting codes. --- drivers/staging/wilc1000/wilc_sdio.c | 480 +-- 1 file changed, 292 insertions(+), 188 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 5a18148..c52044a 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -155,22 +155,9 @@ _fail_: return 0; } +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO - /* uint32_t sts; */ - sdio_cmd52_t cmd; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x4; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - int_clrd++; - - return cmd.data; -#else uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, ®)) { @@ -181,9 +168,23 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif +} +#else +static int sdio_clear_int(void) +{ + sdio_cmd52_t cmd; + + cmd.read_write = 0; + cmd.function = 1; + cmd.raw = 0; + cmd.address = 0x4; + cmd.data = 0; + g_sdio.sdio_cmd52(&cmd); + int_clrd++; + return cmd.data; } +#endif /* WILC_SDIO_IRQ_GPIO */ uint32_t sdio_xfer_cnt(void) { @@ -521,9 +522,11 @@ static int sdio_deinit(void *pv) return 1; } +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_sync(void) { uint32_t reg; + int ret; /** * Disable power sequencer @@ -539,45 +542,60 @@ static int sdio_sync(void) return 0; } -#ifdef WILC_SDIO_IRQ_GPIO - { - uint32_t reg; - int ret; + /** +* interrupt pin mux select +**/ + ret = sdio_read_reg(WILC_PIN_MUX_0, ®); + if (!ret) { + g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_PIN_MUX_0); + return 0; + } + reg |= (1 << 8); + ret = sdio_write_reg(WILC_PIN_MUX_0, reg); + if (!ret) { + g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_PIN_MUX_0); + return 0; + } - /** -* interrupt pin mux select -**/ - ret = sdio_read_reg(WILC_PIN_MUX_0, ®); - if (!ret) { - g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_PIN_MUX_0); - return 0; - } - reg |= (1 << 8); - ret = sdio_write_reg(WILC_PIN_MUX_0, reg); - if (!ret) { - g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_PIN_MUX_0); - return 0; - } + /** +* interrupt enable +**/ + ret = sdio_read_reg(WILC_INTR_ENABLE, ®); + if (!ret) { + g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_INTR_ENABLE); + return 0; + } + reg |= (1 << 16); + ret = sdio_write_reg(WILC_INTR_ENABLE, reg); + if (!ret) { + g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE); + return 0; + } - /** -* interrupt enable -**/ - ret = sdio_read_reg(WILC_INTR_ENABLE, ®); - if (!ret) { - g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_INTR_ENABLE); - return 0; - } - reg |= (1 << 16); - ret = sdio_write_reg(WILC_INTR_ENABLE, reg); - if (!ret) { - g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE); - return 0; - } + return 1; +} +#else +static int sdio_sync(void) +{ + uint32_t reg; + + /** +* Disable power sequencer +**/ + if (!sdio_read_reg(WILC_MISC, ®)) { + g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read misc reg...\n"); + return 0; + } + + reg &= ~(1 << 8); + if (!sdio_write_reg(WILC_MISC, reg)) { + g_sdio.dPrint(N_ERR
[PATCH V2 4/5] staging: wilc1000: remove errors on required space
This patch removes the errors reported by checkpatch.pl, which is the space required before the open parenthesis '('. Signed-off-by: Tony Cho --- V2: This patch is not different with the first one. This patch includes warnings on no space required before the open parenthesis in the function, sdio_clear_int_ext. The 9th patch fixed the same problem in the function, not sdio_clear_int_ext but sdio_sync. --- drivers/staging/wilc1000/wilc_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 44421d0..ee1cbd1 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -778,7 +778,7 @@ static int sdio_clear_int_ext(uint32_t val) { int ret; - if(g_sdio.has_thrpt_enh3) { + if (g_sdio.has_thrpt_enh3) { uint32_t reg; reg = val & ((1 << MAX_NUN_INT_THRPT_ENH2) - 1); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 5/5] staging: wilc1000: remove unused functions
This patch removes the dead functions which are not used anymore. - sdio_check_bs - sdio_xfer_cnt Signed-off-by: Tony Cho --- V2: This patch doesn't have any difference with the first patch becasue this patch just removes unnecessary functions. However, it is resent because it's not accepted with the 9th patch which has a problem. --- drivers/staging/wilc1000/wilc_sdio.c | 56 drivers/staging/wilc1000/wilc_wlan.c | 1 - 2 files changed, 57 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index c52044a..44421d0 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -186,67 +186,11 @@ static int sdio_clear_int(void) } #endif /* WILC_SDIO_IRQ_GPIO */ -uint32_t sdio_xfer_cnt(void) -{ - uint32_t cnt = 0; - sdio_cmd52_t cmd; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x1C; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - cnt = cmd.data; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x1D; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - cnt |= (cmd.data << 8); - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x1E; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - cnt |= (cmd.data << 16); - - return cnt; -} - / * * Sdio interfaces * / -int sdio_check_bs(void) -{ - sdio_cmd52_t cmd; - - /** -* poll until BS is 0 -**/ - cmd.read_write = 0; - cmd.function = 0; - cmd.raw = 0; - cmd.address = 0xc; - cmd.data = 0; - if (!g_sdio.sdio_cmd52(&cmd)) { - g_sdio.dPrint(N_ERR, "[wilc sdio]: Fail cmd 52, get BS register...\n"); - goto _fail_; - } - - return 1; - -_fail_: - - return 0; -} - static int sdio_write_reg(uint32_t addr, uint32_t data) { #ifdef BIG_ENDIAN diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index def72fd..68c38ec 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -25,7 +25,6 @@ extern u8 g_wilc_initialized; /* AMR : 0422 RK3026 Crash issue */ #endif extern void WILC_WFI_mgmt_rx(uint8_t *buff, uint32_t size); extern void frmw_to_linux(uint8_t *buff, uint32_t size); -int sdio_xfer_cnt(void); uint32_t wilc_get_chipid(uint8_t update); u16 Set_machw_change_vir_if(bool bValue); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2 1/5] staging: wilc1000: #ifdef conditionals cover entire functions
On 2015년 07월 30일 20:56, Sudip Mukherjee wrote: On Thu, Jul 30, 2015 at 06:10:10PM +0900, Tony Cho wrote: This patch lets preprocessor conditionals (#ifdef) related to WILC_SDIO_IRQ_GPIO to compile out the entire functions. Compiling out the entire functions is preferred rather than portions of functions or expressions becausue doing so makes code harder to read. Signed-off-by: Tony Cho --- +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO - /* uint32_t sts; */ - sdio_cmd52_t cmd; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x4; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - int_clrd++; - - return cmd.data; -#else uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, ®)) { @@ -181,9 +168,23 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif +} +#else +static int sdio_clear_int(void) +{ + sdio_cmd52_t cmd; + + cmd.read_write = 0; + cmd.function = 1; + cmd.raw = 0; + cmd.address = 0x4; + cmd.data = 0; + g_sdio.sdio_cmd52(&cmd); + int_clrd++; + return cmd.data; } +#endif /* WILC_SDIO_IRQ_GPIO */ instead of changing #ifndef to #ifdef i think the following would have been easier: Yes, I agree with you. I will rewrite them after a big patch is accepted. Thanks for your advice. Tony. diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 5a18148..5cd4d45 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -155,9 +155,9 @@ _fail_: return 0; } +#ifndef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO /* uint32_t sts; */ sdio_cmd52_t cmd; @@ -170,7 +170,10 @@ static int sdio_clear_int(void) int_clrd++; return cmd.data; +} #else +static int sdio_clear_int(void) +{ uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, ®)) { @@ -181,9 +184,8 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif - } +#endif uint32_t sdio_xfer_cnt(void) { uint32_t sdio_xfer_cnt(void) +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int_ext(uint32_t val) { int ret; - if (g_sdio.has_thrpt_enh3) { + if(g_sdio.has_thrpt_enh3) { why changing this? The original style is according to the kernel coding style. regards sudip -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2 1/5] staging: wilc1000: #ifdef conditionals cover entire functions
On 2015년 07월 30일 20:56, Sudip Mukherjee wrote: On Thu, Jul 30, 2015 at 06:10:10PM +0900, Tony Cho wrote: This patch lets preprocessor conditionals (#ifdef) related to WILC_SDIO_IRQ_GPIO to compile out the entire functions. Compiling out the entire functions is preferred rather than portions of functions or expressions becausue doing so makes code harder to read. Signed-off-by: Tony Cho --- +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO - /* uint32_t sts; */ - sdio_cmd52_t cmd; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x4; - cmd.data = 0; - g_sdio.sdio_cmd52(&cmd); - int_clrd++; - - return cmd.data; -#else uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, ®)) { @@ -181,9 +168,23 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif +} +#else +static int sdio_clear_int(void) +{ + sdio_cmd52_t cmd; + + cmd.read_write = 0; + cmd.function = 1; + cmd.raw = 0; + cmd.address = 0x4; + cmd.data = 0; + g_sdio.sdio_cmd52(&cmd); + int_clrd++; + return cmd.data; } +#endif /* WILC_SDIO_IRQ_GPIO */ instead of changing #ifndef to #ifdef i think the following would have been easier: Yes, I agree with you. I will rewrite them after important patches are accepted. Thanks for your advice, Tony. diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 5a18148..5cd4d45 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -155,9 +155,9 @@ _fail_: return 0; } +#ifndef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO /* uint32_t sts; */ sdio_cmd52_t cmd; @@ -170,7 +170,10 @@ static int sdio_clear_int(void) int_clrd++; return cmd.data; +} #else +static int sdio_clear_int(void) +{ uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, ®)) { @@ -181,9 +184,8 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif - } +#endif uint32_t sdio_xfer_cnt(void) { uint32_t sdio_xfer_cnt(void) +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int_ext(uint32_t val) { int ret; - if (g_sdio.has_thrpt_enh3) { + if(g_sdio.has_thrpt_enh3) { why changing this? The original style is according to the kernel coding style. regards sudip -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/5] 2nd patch for illegal coding style
Hi Greg, I understand what you mention. I will first make it. The 5 patches among the first series of patch was rejected and the 2nd patch also has a problem. As you said, I will resend them later after removing build warnings. They will be delivered soon. Thanks, Tony. On 2015년 07월 31일 12:49, Greg KH wrote: On Thu, Jul 30, 2015 at 06:10:09PM +0900, Tony Cho wrote: This patch V2 includes only patches rejected. The rejected patch for the following, #ifdef conditionals cover entire functions, introduced new error on required space before the open parenthesis '('. This is my mistake while rewriting codes. The original 13th patch didn't include new fix introduced on the previous patch due to no sync-up issue. The original 13th patch fixed the same warnings but in different place. The 64bit compile warnings will be resolved after sending these patches. Then, ambiguous sdio/spi parts including preprocessor conditionals will be tried. Again, please fix the build warnings first, they are much more important than coding style issues. thanks, greg k-h -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/28] removing the compile warnings for 64-bit
Hi Greg, This patch focuses on removing the compile warnings for 64bit incompatability. Most warnings are due to senseless type castings from driver handler to u32 and also to void pointers. They are removed by using the same handler with this series of patch. All warnings disappear. This patch is the first step to resolve many issues which the driver contains. Please review and advise me. Thanks, Tony. glen lee (28): staging: wilc1000: change type of driver handler in host interface msg staging: wilc1000: change void type of argument with WILC_WFIDrvHandle staging: wilc1000: move structure WILC_WFIDrvHandle into wilc_wlan_if.h staging: wilc1000: change type of argument 5 in SendConfigPkt staging: wilc1000: remove unnecessary type cast staging: wilc1000: chage driver handler variable in SendConfigPkt staging: wilc1000: remove unused variables staging: wilc1000: change drvHandler type in wlan_cfg_get staging: wilc1000: change drvHandler type in wlan_cfg_set staging: wilc1000: change driver handle variable staging: wilc1000: fix incompatible type in assignment warning staging: wilc1000: change type of driver handler in tstrInterfaceInfo staging: wilc1000: change type of argument in host_int_set_wfi_drv_handler staging: wilc1000: remove unnecessary type cast in host_int_set_wfi_drv_handler staging: wilc1000: fix cast from pointer to integer warning staging: wilc1000: change type of variable staging: wilc1000: fix comparison between different type warning staging: wilc1000: change pstrWFIDrv with drvHandler staging: wilc1000: change type of variable in tstrHostIfSetDrvHandler staging: wilc1000: remove unnecessary type case staging: wilc1000: remove unwanted type cast staging: wilc1000: fix passing argument from incompatible type warning staging: wilc1000: change type of parameter in wilc_wlan_cfg_commit staging: wilc1000: fix cast from pointer to integer warning staging: wilc1000: change cast type from pointer to uintptr_t staging: wilc1000: remove unused variable staging: wilc1000: fix casting build warning staging: wilc1000: change data type of variable drivers/staging/wilc1000/coreconfigurator.c | 2 +- drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/host_interface.c | 232 ++ drivers/staging/wilc1000/host_interface.h | 9 +- drivers/staging/wilc1000/linux_wlan.c | 8 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 8 +- drivers/staging/wilc1000/wilc_wlan_if.h | 8 +- 9 files changed, 130 insertions(+), 145 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/28] staging: wilc1000: change type of driver handler in host interface msg
From: glen lee This patch changes void pointer type of drvHandler with WILC_WFIDrvHandle type variable since the structure member drvHandler in tstrHostIFmsg is explicitly used to pass driver pointer as handler. The void pointer as argument is ambiguous for the functions to handle correctly. After this patch, ATWILC_WFIDrvHandle type will be used as handler type to interface with other functions which does not need to know all about wifi driver structre tstrATWILC_WFIDrv. As a consequence of this patch, several patches will be followed up to change type of parameter which take drvHandler as argument. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 02aaf39..fb4194a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -467,7 +467,7 @@ typedef union _tuniHostIFmsgBody { typedef struct _tstrHostIFmsg { u16 u16MsgId; /*!< Message ID */ tuniHostIFmsgBody uniHostIFmsgBody; /*!< Message body */ - void *drvHandler; + WILC_WFIDrvHandle drvHandler; } tstrHostIFmsg; #ifdef CONNECT_DIRECT -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/28] staging: wilc1000: move structure WILC_WFIDrvHandle into wilc_wlan_if.h
From: glen lee This patch moves the structure WILC_WFIDrvHandle into wilc_wlan_if.h As all the functions which take drive handler as argument will use WILC_WFIDrvHandle type instead of u32 type that makes compile warning due to type difference, move it into wilc_wlan_if which is common wilc header file. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 3 --- drivers/staging/wilc1000/wilc_wlan_if.h | 4 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 7699650..617f105 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -212,9 +212,6 @@ typedef void (*tWILCpfRemainOnChanReady)(void *); /*Remain on channel callback f #endif /* typedef u32 WILC_WFIDrvHandle; */ -typedef struct { - s32 s32Dummy; -} *WILC_WFIDrvHandle; /*! * @struct tstrRcvdNetworkInfo diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 8735a6a..ba22d30 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -63,6 +63,10 @@ / typedef struct { + s32 s32Dummy; +} *WILC_WFIDrvHandle; + +typedef struct { uint32_t read_write: 1; uint32_t function: 3; uint32_t raw: 1; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/28] staging: wilc1000: change type of argument 5 in SendConfigPkt
From: glen lee This patch changes drvHandler of u32 type with WILC_WFIDrvHandle type since SendConfigPkt function gets WILC_WFIDrvHandle type driver Handler pointer as argument which makes compile warning. As the type of parameter changed, associate code will be changed in the next patches. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 2 +- drivers/staging/wilc1000/coreconfigurator.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 342a336..e1928cc 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -1986,7 +1986,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps; * @version 1.0 */ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, - u32 u32WIDsCount, bool bRespRequired, u32 drvHandler) + u32 u32WIDsCount, bool bRespRequired, WILC_WFIDrvHandle drvHandler) { s32 counter = 0, ret = 0; if (gpstrWlanOps == NULL) { diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 56ff2ba..98b5c49 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -167,7 +167,7 @@ extern s32 CoreConfiguratorInit(void); extern s32 CoreConfiguratorDeInit(void); extern s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, -u32 u32WIDsCount, bool bRespRequired, u32 drvHandler); +u32 u32WIDsCount, bool bRespRequired, WILC_WFIDrvHandle drvHandler); extern s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); extern s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/28] staging: wilc1000: remove unnecessary type cast
From: glen lee This patch removes unnecessary type cast since the u32 type of argument 5 in SendConfigPkt was changed with WILC_WFIDrvHandle. Therefore, No need to cast u32. Type cast (u32) cause build warning like below. drivers/staging/wilc1000/host_interface.c:622:54: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 100 +++--- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 68762d2..265ff68 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -617,7 +617,7 @@ static s32 Handle_SetChannel(WILC_WFIDrvHandle drvHandler, tstrHostIFSetChan *ps PRINT_D(HOSTINF_DBG, "Setting channel\n"); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to set channel\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -654,7 +654,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); if ((pstrHostIfSetDrvHandler->u32Address) == (u32)NULL) @@ -699,7 +699,7 @@ static s32 Handle_SetOperationMode(WILC_WFIDrvHandle drvHandler, tstrHostIfSetOp /*Sending Cfg*/ PRINT_INFO(HOSTINF_DBG, "pstrWFIDrv= %p\n", pstrWFIDrv); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL) @@ -748,7 +748,7 @@ s32 Handle_set_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx) strWID.ps8WidVal = (u8 *)pu8IPAddr; strWID.s32ValueSize = IP_ALEN; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); @@ -792,7 +792,7 @@ s32 Handle_get_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx) strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN); strWID.s32ValueSize = IP_ALEN; - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv); PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.ps8WidVal); @@ -853,7 +853,7 @@ static s32 Handle_SetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfSetMacAd strWID.s32ValueSize = ETH_ALEN; PRINT_D(GENERIC_DBG, "mac addr = :%x:%x:%x:%x:%x:%x\n", strWID.ps8WidVal[0], strWID.ps8WidVal[1], strWID.ps8WidVal[2], strWID.ps8WidVal[3], strWID.ps8WidVal[4], strWID.ps8WidVal[5]); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to set mac address\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -891,7 +891,7 @@ static s32 Handle_GetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfGetMacAd strWID.s32ValueSize = ETH_ALEN; /*Sending Cfg*/ - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, false, (u32)drvHandler); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, false, drvHandler); if (s32Error) { PRINT_ER("Failed to get mac address\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -1199,7 +1199,7 @@ static s32 Handle_CfgParam(WILC_WFIDrvHandle drvHandler, tstrHostIFCfgParamAttr } u8WidCnt++; } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, pstrWFIDrv); if (s32Error) PRINT_ER("Error in setting CFG params\n"); @@ -1357,7 +1357,7 @@ static s32 Handle_Scan(WILC_WFIDrvHandle drvHandler, tstrHostIFscanAttr *pstrHos gbScanWhileConnected = false; } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send scan paramters config packet\n"); @@ -1434,7 +1434,7 @@ static s3
[PATCH 02/28] staging: wilc1000: change void type of argument with WILC_WFIDrvHandle
From: glen lee This patch changes void pointer type of parameter with WILC_WFIDrvHandle type in all functions which take drvHandler in tstrHostIFmsg as a function argument since the type of drvHandler in tstrHostIFmsg was changed with WILC_WFIDrvHandle. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 74 +++ drivers/staging/wilc1000/host_interface.h | 2 +- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index fb4194a..68762d2 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -602,7 +602,7 @@ extern int linux_wlan_get_num_conn_ifcs(void); * @date * @version 1.0 */ -static s32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHostIFSetChan) +static s32 Handle_SetChannel(WILC_WFIDrvHandle drvHandler, tstrHostIFSetChan *pstrHostIFSetChan) { s32 s32Error = WILC_SUCCESS; @@ -682,7 +682,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand * @date * @version 1.0 */ -static s32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode *pstrHostIfSetOperationMode) +static s32 Handle_SetOperationMode(WILC_WFIDrvHandle drvHandler, tstrHostIfSetOperationMode *pstrHostIfSetOperationMode) { s32 s32Error = WILC_SUCCESS; @@ -727,7 +727,7 @@ static s32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode * @date * @version 1.0 */ -s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) +s32 Handle_set_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx) { s32 s32Error = WILC_SUCCESS; @@ -779,7 +779,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) * @date * @version 1.0 */ -s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) +s32 Handle_get_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx) { s32 s32Error = WILC_SUCCESS; @@ -832,7 +832,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) * @date November 2013 * @version 7.0 */ -static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrHostIfSetMacAddress) +static s32 Handle_SetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfSetMacAddress *pstrHostIfSetMacAddress) { s32 s32Error = WILC_SUCCESS; @@ -878,7 +878,7 @@ static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrH * @date JAN 2013 * @version 8.0 */ -static s32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddress *pstrHostIfGetMacAddress) +static s32 Handle_GetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfGetMacAddress *pstrHostIfGetMacAddress) { s32 s32Error = WILC_SUCCESS; @@ -915,7 +915,7 @@ static s32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddress *pstrH * @date * @version 1.0 */ -static s32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *strHostIFCfgParamAttr) +static s32 Handle_CfgParam(WILC_WFIDrvHandle drvHandler, tstrHostIFCfgParamAttr *strHostIFCfgParamAttr) { s32 s32Error = WILC_SUCCESS; tstrWID strWIDList[32]; @@ -1239,7 +1239,7 @@ static s32 Handle_wait_msg_q_empty(void) * @date * @version 1.0 */ -static s32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr) +static s32 Handle_Scan(WILC_WFIDrvHandle drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr) { s32 s32Error = WILC_SUCCESS; tstrWID strWIDList[5]; @@ -1410,7 +1410,7 @@ static s32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr) * @date * @version 1.0 */ -static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) +static s32 Handle_ScanDone(WILC_WFIDrvHandle drvHandler, tenuScanEvent enuEvent) { s32 s32Error = WILC_SUCCESS; @@ -1470,7 +1470,7 @@ static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) * @version 1.0 */ u8 u8ConnectedSSID[6] = {0}; -static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFconnectAttr) +static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *pstrHostIFconnectAttr) { tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; s32 s32Error = WILC_SUCCESS; @@ -2039,7 +2039,7 @@ static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFcon * @version 8.0 */ -static s32 Handle_FlushConnect(void *drvHandler) +static s32 Handle_FlushConnect(WILC_WFIDrvHandle drvHandler) { s32 s32Error = WILC_SUCCESS; tstrWID strWIDList[5]; @@ -2106,7 +2106,7 @@ static s32 Handle_FlushConnect(void *drvHandler) * @date * @version 1.0 */ -static s32 Handle_ConnectTimeout(void *drvHandler) +static s32 Handle_ConnectTimeout
[PATCH 06/28] staging: wilc1000: chage driver handler variable in SendConfigPkt
From: glen lee This patch changes pstrWFIDrv with WILC_WFIDrvHandle type variable as a argument of SendConfigPkt in all associate code because the type of argument 5 in SendConfigPkt was changed with WILC_WFIDrvHandle type. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 92 +++ 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 265ff68..c8ebf51 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -617,7 +617,7 @@ static s32 Handle_SetChannel(WILC_WFIDrvHandle drvHandler, tstrHostIFSetChan *ps PRINT_D(HOSTINF_DBG, "Setting channel\n"); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler); if (s32Error) { PRINT_ER("Failed to set channel\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -699,7 +699,7 @@ static s32 Handle_SetOperationMode(WILC_WFIDrvHandle drvHandler, tstrHostIfSetOp /*Sending Cfg*/ PRINT_INFO(HOSTINF_DBG, "pstrWFIDrv= %p\n", pstrWFIDrv); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler); if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL) @@ -748,7 +748,7 @@ s32 Handle_set_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx) strWID.ps8WidVal = (u8 *)pu8IPAddr; strWID.s32ValueSize = IP_ALEN; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler); @@ -792,7 +792,7 @@ s32 Handle_get_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx) strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN); strWID.s32ValueSize = IP_ALEN; - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, drvHandler); PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.ps8WidVal); @@ -853,7 +853,7 @@ static s32 Handle_SetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfSetMacAd strWID.s32ValueSize = ETH_ALEN; PRINT_D(GENERIC_DBG, "mac addr = :%x:%x:%x:%x:%x:%x\n", strWID.ps8WidVal[0], strWID.ps8WidVal[1], strWID.ps8WidVal[2], strWID.ps8WidVal[3], strWID.ps8WidVal[4], strWID.ps8WidVal[5]); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler); if (s32Error) { PRINT_ER("Failed to set mac address\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -1199,7 +1199,7 @@ static s32 Handle_CfgParam(WILC_WFIDrvHandle drvHandler, tstrHostIFCfgParamAttr } u8WidCnt++; } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, drvHandler); if (s32Error) PRINT_ER("Error in setting CFG params\n"); @@ -1357,7 +1357,7 @@ static s32 Handle_Scan(WILC_WFIDrvHandle drvHandler, tstrHostIFscanAttr *pstrHos gbScanWhileConnected = false; } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, drvHandler); if (s32Error) { PRINT_ER("Failed to send scan paramters config packet\n"); @@ -1434,7 +1434,7 @@ static s32 Handle_ScanDone(WILC_WFIDrvHandle drvHandler, tenuScanEvent enuEvent) strWID.s32ValueSize = sizeof(char); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to set abort running scan\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -1631,7 +1631,7 @@ static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *p gu32WidConnRstHack = 0; /* // */ - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, drvHandler); if (s32Error) { PRINT_ER("Handle_Connect()] failed to send config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVA
[PATCH 07/28] staging: wilc1000: remove unused variables
From: glen lee This patch removes unused variable pstrWFIDrv. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c8ebf51..66565f6 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -607,7 +607,6 @@ static s32 Handle_SetChannel(WILC_WFIDrvHandle drvHandler, tstrHostIFSetChan *ps s32 s32Error = WILC_SUCCESS; tstrWID strWID; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; /*prepare configuration packet*/ strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL; @@ -733,7 +732,6 @@ s32 Handle_set_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx) s32 s32Error = WILC_SUCCESS; tstrWID strWID; char firmwareIPAddress[4] = {0}; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; if (pu8IPAddr[0] < 192) pu8IPAddr[0] = 0; @@ -837,7 +835,6 @@ static s32 Handle_SetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfSetMacAd s32 s32Error = WILC_SUCCESS; tstrWID strWID; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; u8 *mac_buf = (u8 *)WILC_MALLOC(ETH_ALEN); if (mac_buf == NULL) { @@ -3161,7 +3158,6 @@ static s32 Switch_Log_Terminal(WILC_WFIDrvHandle drvHandler) s32 s32Error = WILC_SUCCESS; tstrWID strWID; static char dummy = 9; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (u16)WID_LOGTerminal_Switch; strWID.enuWIDtype = WID_CHAR; @@ -3438,7 +3434,6 @@ static void Handle_AddBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFSetBeacon * s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Adding BEACON\n"); @@ -3510,7 +3505,6 @@ static void Handle_DelBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFDelBeacon * s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (u16)WID_DEL_BEACON; strWID.enuWIDtype = WID_CHAR; @@ -3607,7 +3601,6 @@ static void Handle_AddStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaParam s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Handling add station\n"); strWID.u16WIDid = (u16)WID_ADD_STA; @@ -3651,7 +3644,6 @@ static void Handle_DelAllSta(WILC_WFIDrvHandle drvHandler, tstrHostIFDelAllSta * tstrWID strWID; u8 *pu8CurrByte; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; u8 i; u8 au8Zero_Buff[6] = {0}; @@ -3709,7 +3701,6 @@ static void Handle_DelStation(WILC_WFIDrvHandle drvHandler, tstrHostIFDelSta *ps s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (u16)WID_REMOVE_STA; strWID.enuWIDtype = WID_BIN; @@ -3754,7 +3745,6 @@ static void Handle_EditStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaPara s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (u16)WID_EDIT_STA; strWID.enuWIDtype = WID_BIN; @@ -3878,7 +3868,6 @@ static int Handle_RegisterFrame(WILC_WFIDrvHandle drvHandler, tstrHostIfRegister s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Handling frame register Flag : %d FrameType: %d\n", pstrHostIfRegisterFrame->bReg, pstrHostIfRegisterFrame->u16FrameType); @@ -4021,7 +4010,6 @@ static void Handle_PowerManagement(WILC_WFIDrvHandle drvHandler, tstrHostIfPower s32 s32Error = WILC_SUCCESS; tstrWID strWID; s8 s8PowerMode; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (u16)WID_POWER_MANAGEMENT; @@ -4118,7 +4106,6 @@ static s32 Handle_AddBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession tstrWID strWID; int AddbaTimeout = 100; char *ptr = NULL; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Opening Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\nBufferSize == %d\nSessionTimeOut = %d\n", strHostIfBASessionInfo->au8Bssid[0], @@ -4205,7 +4192,6
[PATCH 15/28] staging: wilc1000: fix cast from pointer to integer warning
From: glen lee This patch removes unnecessary type cast because drvHandler type was change with WILC_WFIDrvHandle. drivers/staging/wilc1000/linux_wlan.c:2014:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] g_linux_wlan->strInterfaceInfo[i].drvHandler = (u32)priv->hWILCWFIDrv; Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index a808722..5dcb30c 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2011,7 +2011,7 @@ int mac_open(struct net_device *ndev) for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) { if (ndev == g_linux_wlan->strInterfaceInfo[i].wilc_netdev) { memcpy(g_linux_wlan->strInterfaceInfo[i].aSrcAddress, mac_add, ETH_ALEN); - g_linux_wlan->strInterfaceInfo[i].drvHandler = (u32)priv->hWILCWFIDrv; + g_linux_wlan->strInterfaceInfo[i].drvHandler = priv->hWILCWFIDrv; break; } } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/28] staging: wilc1000: change drvHandler type in wlan_cfg_set
From: glen lee This patch changes drvHandler of uint32_t type with WILC_WFIDrvHandle type in wlan_cfg_set and wilc_wlan_cfg_set. The type of drvHandler which wlan_cfg_set take as argument was changed to WILC_WFIDrvHandle. So the type needs to be changed to match parameter type. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wlan.c| 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 273073f..d5fc54b 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1899,7 +1899,7 @@ static int wilc_wlan_cfg_commit(int type, uint32_t drvHandler) return 0; } -static int wilc_wlan_cfg_set(int start, uint32_t wid, uint8_t *buffer, uint32_t buffer_size, int commit, uint32_t drvHandler) +static int wilc_wlan_cfg_set(int start, uint32_t wid, uint8_t *buffer, uint32_t buffer_size, int commit, WILC_WFIDrvHandle drvHandler) { wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan; uint32_t offset; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 6d2d588..d9d592aa 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -197,7 +197,7 @@ typedef struct { void (*wlan_handle_rx_que)(void); void (*wlan_handle_rx_isr)(void); void (*wlan_cleanup)(void); - int (*wlan_cfg_set)(int, uint32_t, uint8_t *, uint32_t, int, uint32_t); + int (*wlan_cfg_set)(int, uint32_t, uint8_t *, uint32_t, int, WILC_WFIDrvHandle); int (*wlan_cfg_get)(int, uint32_t, int, WILC_WFIDrvHandle); int (*wlan_cfg_get_value)(uint32_t, uint8_t *, uint32_t); /*Bug3959: transmitting mgmt frames received from host*/ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/28] staging: wilc1000: fix incompatible type in assignment warning
From: glen lee Cast type to WILC_WFIDrvHandle before assignment from incompatible pointer type to fix the following warning. drivers/staging/wilc1000/host_interface.c:6916:27: warning: assignment from incompatible pointer type [enabled by default] strHostIFmsg.drvHandler = pstrWFIDrv; Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 66565f6..e9cd77d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -3981,7 +3981,7 @@ static void ListenTimerCB(void *pvArg) /* prepare the Timer Callback message */ WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); strHostIFmsg.u16MsgId = HOST_IF_MSG_LISTEN_TIMER_FIRED; - strHostIFmsg.drvHandler = pstrWFIDrv; + strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv; strHostIFmsg.uniHostIFmsgBody.strHostIfRemainOnChan.u32ListenSessionID = pstrWFIDrv->strHostIfRemainOnChan.u32ListenSessionID; /* send the message */ @@ -6425,7 +6425,7 @@ void GetPeriodicRSSI(void *pvArg) WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); strHostIFmsg.u16MsgId = HOST_IF_MSG_GET_RSSI; - strHostIFmsg.drvHandler = pstrWFIDrv; + strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv; /* send the message */ s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); @@ -6779,7 +6779,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length) WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); strHostIFmsg.u16MsgId = HOST_IF_MSG_RCVD_NTWRK_INFO; - strHostIFmsg.drvHandler = pstrWFIDrv; + strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv; strHostIFmsg.uniHostIFmsgBody.strRcvdNetworkInfo.u32Length = u32Length; strHostIFmsg.uniHostIFmsgBody.strRcvdNetworkInfo.pu8Buffer = (u8 *)WILC_MALLOC(u32Length); /* will be deallocated by the receiving thread */ @@ -6841,7 +6841,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length) strHostIFmsg.u16MsgId = HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO; - strHostIFmsg.drvHandler = pstrWFIDrv; + strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv; strHostIFmsg.uniHostIFmsgBody.strRcvdGnrlAsyncInfo.u32Length = u32Length; @@ -6890,7 +6890,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length) WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); strHostIFmsg.u16MsgId = HOST_IF_MSG_RCVD_SCAN_COMPLETE; - strHostIFmsg.drvHandler = pstrWFIDrv; + strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv; /* will be deallocated by the receiving thread */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/28] staging: wilc1000: change type of variable
From: glen lee This patch changes gu8FlushedJoinReqDrvHandler of u32 type with WILC_WFIDrvHandle type. gu8FlushedJoinReqDrvHandler is used to hold driver handler for comparison but the type mismatches with it. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 38d047d..d5bd23d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -579,7 +579,7 @@ u8 gu8Flushed11iMode; u8 gu8FlushedAuthType; u32 gu32FlushedJoinReqSize; u32 gu32FlushedInfoElemAsocSize; -u32 gu8FlushedJoinReqDrvHandler; +WILC_WFIDrvHandle gu8FlushedJoinReqDrvHandler; #define REAL_JOIN_REQ 0 #define FLUSHED_JOIN_REQ 1 #define FLUSHED_BYTE_POS 79 /* Position the byte indicating flushing in the flushed request */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/28] staging: wilc1000: change driver handle variable
From: glen lee This patch change (u32)pstrWFIDrv with priv->hWILCWFIDrv as a argument of wlan_cfg_set since the parameter drvHandler of uint32_t type in wlan_cfg_set was changed with WILC_WFIDrvHandle. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 3e55a8a..a808722 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1295,7 +1295,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n goto _fail_; c_val[0] = 1; /* Enable N with immediate block ack. */ - if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_IMMEDIATE_BA_ENABLED, c_val, 1, 1, (u32)pstrWFIDrv)) + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_IMMEDIATE_BA_ENABLED, c_val, 1, 1, priv->hWILCWFIDrv)) goto _fail_; return 0; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/28] staging: wilc1000: change type of driver handler in tstrInterfaceInfo
From: glen lee This patch changes drvHandler of uint32_t type with WILC_WFIDrvHandle type since drvHandler is used to pass WILC_WFIDrvHandle type to other functions. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 0dfe108..e581b09 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -176,7 +176,7 @@ typedef struct { typedef struct { uint8_t aSrcAddress[ETH_ALEN]; uint8_t aBSSID[ETH_ALEN]; - uint32_t drvHandler; + WILC_WFIDrvHandle drvHandler; struct net_device *wilc_netdev; } tstrInterfaceInfo; typedef struct { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/28] staging: wilc1000: remove unnecessary type cast in host_int_set_wfi_drv_handler
From: glen lee This patch removes unnecessary type cast since the u32 type parameter in host_int_set_wfi_drv_handler was changed with WILC_WFIDrvHandle. Therefore, No need to cast u32. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index c2ef46f..d077aed 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -736,7 +736,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r priv->u32RcvdChCount = 0; - host_int_set_wfi_drv_handler((u32)priv->hWILCWFIDrv); + host_int_set_wfi_drv_handler(priv->hWILCWFIDrv); reset_shadow_found(priv); @@ -831,7 +831,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, priv = wiphy_priv(wiphy); pstrWFIDrv = (tstrWILC_WFIDrv *)(priv->hWILCWFIDrv); - host_int_set_wfi_drv_handler((u32)priv->hWILCWFIDrv); + host_int_set_wfi_drv_handler(priv->hWILCWFIDrv); PRINT_D(CFG80211_DBG, "Connecting to SSID [%s] on netdev [%p] host if [%p]\n", sme->ssid, dev, priv->hWILCWFIDrv); #ifdef WILC_P2P -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/28] staging: wilc1000: change type of argument in host_int_set_wfi_drv_handler
From: glen lee The parameter of u32 type is incompatible with the argument of WILC_WFIDrvHandle type which host_int_set_wfi_drv_handler takes always as input. Therefore, this patch changes parameter of u32 type with WILC_WFIDrvHandle type in the function host_int_set_wfi_drv_handler. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/host_interface.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index e9cd77d..38d047d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -5792,7 +5792,7 @@ s32 host_int_wait_msg_queue_idle(void) } -s32 host_int_set_wfi_drv_handler(u32 u32address) +s32 host_int_set_wfi_drv_handler(WILC_WFIDrvHandle u32address) { s32 s32Error = WILC_SUCCESS; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 617f105..2ced05f 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -1256,7 +1256,7 @@ s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, bool bR * @date * @version 1.0 */ -s32 host_int_set_wfi_drv_handler(u32 u32address); +s32 host_int_set_wfi_drv_handler(WILC_WFIDrvHandle u32address); s32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode); static s32 Handle_ScanDone(WILC_WFIDrvHandle drvHandler, tenuScanEvent enuEvent); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/28] staging: wilc1000: change drvHandler type in wlan_cfg_get
From: glen lee This patch changes drvHandler of uint32_t type with WILC_WFIDrvHandle type in wlan_cfg_get and wilc_wlan_cfg_get. The type of drvHandler which wlan_cfg_get take as argument was changed to WILC_WFIDrvHandle. So the type needs to be changed to match parameter type. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wlan.c| 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index def72fd..273073f 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1938,7 +1938,7 @@ static int wilc_wlan_cfg_set(int start, uint32_t wid, uint8_t *buffer, uint32_t return ret_size; } -static int wilc_wlan_cfg_get(int start, uint32_t wid, int commit, uint32_t drvHandler) +static int wilc_wlan_cfg_get(int start, uint32_t wid, int commit, WILC_WFIDrvHandle drvHandler) { wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan; uint32_t offset; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index ba22d30..6d2d588 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -198,7 +198,7 @@ typedef struct { void (*wlan_handle_rx_isr)(void); void (*wlan_cleanup)(void); int (*wlan_cfg_set)(int, uint32_t, uint8_t *, uint32_t, int, uint32_t); - int (*wlan_cfg_get)(int, uint32_t, int, uint32_t); + int (*wlan_cfg_get)(int, uint32_t, int, WILC_WFIDrvHandle); int (*wlan_cfg_get_value)(uint32_t, uint8_t *, uint32_t); /*Bug3959: transmitting mgmt frames received from host*/ #if defined(WILC_AP_EXTERNAL_MLME) || defined(WILC_P2P) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/28] staging: wilc1000: remove unnecessary type case
From: glen lee This patch removes (u32) type cast which makes build warning since the u32Address of u32 type was changed with WILC_WFIDrvHandle. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index fae7fd5..bc9195f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -656,7 +656,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); - if ((pstrHostIfSetDrvHandler->u32Address) == (u32)NULL) + if ((pstrHostIfSetDrvHandler->u32Address) == NULL) up(&hSemDeinitDrvHandle); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/28] staging: wilc1000: remove unwanted type cast
From: glen lee This patch removes (u32) type cast which makes build warning because the parameter of u32 type in the function host_int_set_wfi_drv_handler was changed with WILC_WFIDrvHandle. Not necessary to cast type. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index bc9195f..ab2e082 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -6687,7 +6687,7 @@ s32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) WILC_TimerDestroy(&(pstrWFIDrv->hRemainOnChannel), NULL); #endif - host_int_set_wfi_drv_handler((u32)NULL); + host_int_set_wfi_drv_handler(NULL); down(&hSemDeinitDrvHandle); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/28] staging: wilc1000: change cast type from pointer to uintptr_t
From: glen lee To use drvHandler as integer operation, cast type to uintptr_t. Here is the build warning. drivers/staging/wilc1000/wilc_wlan.c:1871:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] int driver_handler = (u32)drvHandler; Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index ec80849..14c2071 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1056,7 +1056,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n goto _fail_; } - *(int *)c_val = (u32)pstrWFIDrv; + *(int *)c_val = (uintptr_t)pstrWFIDrv; if (!g_linux_wlan->oup.wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0)) goto _fail_; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index f5075b26..2cc23d5 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1868,7 +1868,7 @@ static int wilc_wlan_cfg_commit(int type, WILC_WFIDrvHandle drvHandler) wilc_cfg_frame_t *cfg = &p->cfg_frame; int total_len = p->cfg_frame_offset + 4 + DRIVER_HANDLER_SIZE; int seq_no = p->cfg_seq_no % 256; - int driver_handler = (u32)drvHandler; + int driver_handler = (uintptr_t)drvHandler; /** -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/28] staging: wilc1000: change type of variable in tstrHostIfSetDrvHandler
From: glen lee This patch changes u32Address of u32 type with WILC_WFIDrvHandle type in the structure tstrHostIfSetDrvHandler because u32Address is used to hold driver handler. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 2ced05f..fffbcca 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -269,7 +269,7 @@ typedef struct { } tstrWILC_UsrConnReq; typedef struct { - u32 u32Address; + WILC_WFIDrvHandle u32Address; } tstrHostIfSetDrvHandler; typedef struct { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/28] staging: wilc1000: remove unused variable
From: glen lee This patch removes unused variable pstrWFIDrv. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 953df71..c5db385 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -642,7 +642,6 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand s32 s32Error = WILC_SUCCESS; tstrWID strWID; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)((pstrHostIfSetDrvHandler->u32Address)); /*prepare configuration packet*/ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/28] staging: wilc1000: fix cast from pointer to integer warning
From: glen lee To use a pointer as as integer in arithmetic operation, cast type to uintptr_t as the data type. This patch changes casting (unsigned int) with (uintptr_t) to do arithmetic operation Here is build warning. drivers/staging/wilc1000/linux_wlan.c:2385:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] skb_reserve(skb, (unsigned int)skb->data & 0x3); Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 5dcb30c..ec80849 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2382,7 +2382,7 @@ void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset) return; } - skb_reserve(skb, (unsigned int)skb->data & 0x3); + skb_reserve(skb, (uintptr_t)skb->data & 0x3); if (g_linux_wlan == NULL || wilc_netdev == NULL) PRINT_ER("wilc_netdev in g_linux_wlan is NULL"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/28] staging: wilc1000: change pstrWFIDrv with drvHandler
From: glen lee As type of gu8FlushedJoinReqDrvHandler was changed with WILC_WFIDrvHandle, change right value with drvHandler to match type. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 7962f06..fae7fd5 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1939,7 +1939,7 @@ static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *p /*BugID_5137*/ if (WILC_memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7)) { memcpy(gu8FlushedJoinReq, pu8CurrByte, gu32FlushedJoinReqSize); - gu8FlushedJoinReqDrvHandler = (u32)pstrWFIDrv; + gu8FlushedJoinReqDrvHandler = drvHandler; } PRINT_D(GENERIC_DBG, "send HOST_IF_WAITING_CONN_RESP\n"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/28] staging: wilc1000: fix comparison between different type warning
From: glen lee This patch removes casting (u32) which makes compile warnings. The type of gu8FlushedJoinReqDrvHandler was changed with WILC_WFIDrvHandle same as drvHandler. drivers/staging/wilc1000/host_interface.c:2197:68: warning: comparison between pointer and integer [enabled by default] if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d5bd23d..7962f06 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -2190,11 +2190,11 @@ static s32 Handle_ConnectTimeout(WILC_WFIDrvHandle drvHandler) WILC_memset(u8ConnectedSSID, 0, ETH_ALEN); /*BugID_5213*/ /*Freeing flushed join request params on connect timeout*/ - if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { + if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) { WILC_FREE(gu8FlushedJoinReq); gu8FlushedJoinReq = NULL; } - if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { + if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) { WILC_FREE(gu8FlushedInfoElemAsoc); gu8FlushedInfoElemAsoc = NULL; } @@ -2615,11 +2615,11 @@ static s32 Handle_RcvdGnrlAsyncInfo(WILC_WFIDrvHandle drvHandler, tstrRcvdGnrlAs /*BugID_5213*/ /*Freeing flushed join request params on receiving*/ /*MAC_DISCONNECTED while connected*/ - if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { + if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) { WILC_FREE(gu8FlushedJoinReq); gu8FlushedJoinReq = NULL; } - if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { + if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) { WILC_FREE(gu8FlushedInfoElemAsoc); gu8FlushedInfoElemAsoc = NULL; } @@ -3116,11 +3116,11 @@ static void Handle_Disconnect(WILC_WFIDrvHandle drvHandler) /*BugID_5137*/ - if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { + if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) { WILC_FREE(gu8FlushedJoinReq); gu8FlushedJoinReq = NULL; } - if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { + if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) { WILC_FREE(gu8FlushedInfoElemAsoc); gu8FlushedInfoElemAsoc = NULL; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/28] staging: wilc1000: change type of parameter in wilc_wlan_cfg_commit
From: glen lee This patch changes drvHandler of uinit32_t type with WILC_WFIDrvHandle type to match driver handle type since wilc_wlan_cfg_commit gets drvHandler of WILC_WFIDrvHandle type as argument now. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index d5fc54b..f5075b26 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1862,7 +1862,7 @@ static void wilc_wlan_cleanup(void) } -static int wilc_wlan_cfg_commit(int type, uint32_t drvHandler) +static int wilc_wlan_cfg_commit(int type, WILC_WFIDrvHandle drvHandler) { wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan; wilc_cfg_frame_t *cfg = &p->cfg_frame; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/28] staging: wilc1000: fix passing argument from incompatible type warning
From: glen lee This patch changes pstrWFIDrv with pstrHostIfSetDrvHandler->u32Address which is WILC_WFIDrvHandle type. The type of parameter 5 in SendConfigPkt and u32Address in tstrHostIfSetDrvHandler was changed with WILC_WFIDrvHandle so the SendConfigPkt needs to take pstrHostIfSetDrvHandler->u32Address as argument as it is. Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index ab2e082..953df71 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -653,7 +653,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrHostIfSetDrvHandler->u32Address); if ((pstrHostIfSetDrvHandler->u32Address) == NULL) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 28/28] staging: wilc1000: change data type of variable
From: glen lee drvHandler of u32 type is used to handle integer type pointer operation which cause build warnings. To use integer type varialbe as pointer, drvHandler data type need to be changed with uintptr_t type. drivers/staging/wilc1000/host_interface.c: In function ‘NetworkInfoReceived’: drivers/staging/wilc1000/host_interface.c:6767:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; ^ drivers/staging/wilc1000/host_interface.c: In function ‘GnrlAsyncInfoReceived’: drivers/staging/wilc1000/host_interface.c:6819:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; ^ drivers/staging/wilc1000/host_interface.c: In function ‘host_int_ScanCompleteReceived’: drivers/staging/wilc1000/host_interface.c:6878:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index b36f98c..668e47e 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -6760,7 +6760,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length) { s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; - u32 drvHandler; + uintptr_t drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24)); @@ -6809,7 +6809,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length) { s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; - u32 drvHandler; + uintptr_t drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; /*BugID_5348*/ @@ -6871,7 +6871,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length) { s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; - u32 drvHandler; + uintptr_t drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 27/28] staging: wilc1000: fix casting build warning
From: glen lee u32Mode type is u32 and it indicates integer type operation mode. So change (32)NULL with 0. drivers/staging/wilc1000/host_interface.c:704:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL) Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c5db385..b36f98c 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -700,7 +700,7 @@ static s32 Handle_SetOperationMode(WILC_WFIDrvHandle drvHandler, tstrHostIfSetOp s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler); - if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL) + if ((pstrHostIfSetOperationMode->u32Mode) == 0) up(&hSemDeinitDrvHandle); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 25/28] staging: wilc1000: change cast type from pointer to uintptr_t
Hi Greg, I'm scheduled to send new patch not using casting between a pointer and integer type. Rewriting the driver to change how to communicate with the firmware has been already started for the second patch but it takes more days. Thanks for your advice, Tony. On 2015년 08월 01일 05:50, Greg KH wrote: On Fri, Jul 31, 2015 at 04:38:33PM +0900, Tony Cho wrote: From: glen lee To use drvHandler as integer operation, cast type to uintptr_t. Here is the build warning. drivers/staging/wilc1000/wilc_wlan.c:1871:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] int driver_handler = (u32)drvHandler; Signed-off-by: glen lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index ec80849..14c2071 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1056,7 +1056,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n goto _fail_; } - *(int *)c_val = (u32)pstrWFIDrv; + *(int *)c_val = (uintptr_t)pstrWFIDrv; Why is the cast needed at all? if (!g_linux_wlan->oup.wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0)) goto _fail_; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index f5075b26..2cc23d5 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1868,7 +1868,7 @@ static int wilc_wlan_cfg_commit(int type, WILC_WFIDrvHandle drvHandler) wilc_cfg_frame_t *cfg = &p->cfg_frame; int total_len = p->cfg_frame_offset + 4 + DRIVER_HANDLER_SIZE; int seq_no = p->cfg_seq_no % 256; - int driver_handler = (u32)drvHandler; + int driver_handler = (uintptr_t)drvHandler; You can't cast a pointer to an integer, it does not work on all systems, which is what the compiler warnings is telling you. If this really is a pointer, use a pointer, otherwise, use an integer, but don't cast between the two. thanks, greg k-h -- Cho, Tony Manager, Staff Engineer | Connectivity System Software Team | Atmel Korea (Wireless solutions BU) #409, Kins Tower, Jeongja-Dong, Bundang-Gu, Seongnam-Si, Gyeonggi-Do, 463-782, Korea Phone:82 31 784 8400(Ext. 317); Mobile: 82 10 7232 1523 email: tony@atmel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/32] staging: wilc1000: remove PLL_WORKAROUND
This patch removes unnecessary definition, PLL_WORKAROUND from the Makefile. There is no use throughout the driver. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index e965df9..d226ebe 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -9,7 +9,7 @@ ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \ -DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\" ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \ - -DPLL_WORKAROUND -DAGING_ALG \ + -DAGING_ALG \ -Wno-unused-function -DWILC_DEBUGFS #ccflags-y += -DTCP_ACK_FILTER -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/32] staging: wilc1000: remove AGING_ALG
This patch removes AGING_ALG from the Makefile because it is always in use. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/Makefile | 1 - drivers/staging/wilc1000/coreconfigurator.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index d226ebe..f495061 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -9,7 +9,6 @@ ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \ -DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\" ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \ - -DAGING_ALG \ -Wno-unused-function -DWILC_DEBUGFS #ccflags-y += -DTCP_ACK_FILTER diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 253c7f0..58aa13c 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -96,9 +96,7 @@ typedef struct { unsigned long u32TimeRcvdInScanCached; unsigned long u32TimeRcvdInScan; bool bNewNetwork; -#ifdef AGING_ALG u8 u8Found; -#endif u32 u32Tsf; u8 *pu8IEs; u16 u16IEsLen; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/32] staging: wilc1000: rename strHostIFconnectAttr
This patch renames strHostIFconnectAttr to con_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 32 +++ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index a039f04..96f0b69 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -415,7 +415,7 @@ struct sta_inactive_t { */ union message_body { struct scan_attr scan_info; - struct connect_attr strHostIFconnectAttr; + struct connect_attr con_info; struct rcvd_net_info strRcvdNetworkInfo; struct rcvd_async_info strRcvdGnrlAsyncInfo; struct key_attr strHostIFkeyAttr; @@ -4103,7 +4103,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_CONNECT: - Handle_Connect(msg.drvHandler, &msg.body.strHostIFconnectAttr); + Handle_Connect(msg.drvHandler, &msg.body.con_info); break; case HOST_IF_MSG_FLUSH_CONNECT: @@ -5084,32 +5084,32 @@ s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8bssid, msg.id = HOST_IF_MSG_CONNECT; - msg.body.strHostIFconnectAttr.u8security = u8security; - msg.body.strHostIFconnectAttr.tenuAuth_type = tenuAuth_type; - msg.body.strHostIFconnectAttr.u8channel = u8channel; - msg.body.strHostIFconnectAttr.pfConnectResult = pfConnectResult; - msg.body.strHostIFconnectAttr.pvUserArg = pvUserArg; - msg.body.strHostIFconnectAttr.pJoinParams = pJoinParams; + msg.body.con_info.u8security = u8security; + msg.body.con_info.tenuAuth_type = tenuAuth_type; + msg.body.con_info.u8channel = u8channel; + msg.body.con_info.pfConnectResult = pfConnectResult; + msg.body.con_info.pvUserArg = pvUserArg; + msg.body.con_info.pJoinParams = pJoinParams; msg.drvHandler = hWFIDrv; if (pu8bssid != NULL) { - msg.body.strHostIFconnectAttr.pu8bssid = kmalloc(6, GFP_KERNEL); /* will be deallocated by the receiving thread */ - memcpy(msg.body.strHostIFconnectAttr.pu8bssid, + msg.body.con_info.pu8bssid = kmalloc(6, GFP_KERNEL); /* will be deallocated by the receiving thread */ + memcpy(msg.body.con_info.pu8bssid, pu8bssid, 6); } if (pu8ssid != NULL) { - msg.body.strHostIFconnectAttr.ssidLen = ssidLen; - msg.body.strHostIFconnectAttr.pu8ssid = kmalloc(ssidLen, GFP_KERNEL); /* will be deallocated by the receiving thread */ - memcpy(msg.body.strHostIFconnectAttr.pu8ssid, + msg.body.con_info.ssidLen = ssidLen; + msg.body.con_info.pu8ssid = kmalloc(ssidLen, GFP_KERNEL); /* will be deallocated by the receiving thread */ + memcpy(msg.body.con_info.pu8ssid, pu8ssid, ssidLen); } if (pu8IEs != NULL) { - msg.body.strHostIFconnectAttr.IEsLen = IEsLen; - msg.body.strHostIFconnectAttr.pu8IEs = kmalloc(IEsLen, GFP_KERNEL); /* will be deallocated by the receiving thread */ - memcpy(msg.body.strHostIFconnectAttr.pu8IEs, + msg.body.con_info.IEsLen = IEsLen; + msg.body.con_info.pu8IEs = kmalloc(IEsLen, GFP_KERNEL); /* will be deallocated by the receiving thread */ + memcpy(msg.body.con_info.pu8IEs, pu8IEs, IEsLen); } if (pstrWFIDrv->enuHostIFstate < HOST_IF_CONNECTING) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/32] staging: wilc1000: rename strHostIFscanAttr
This patch renames strHostIFscanAttr to scan_info in order to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index be01de5..a039f04 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -414,7 +414,7 @@ struct sta_inactive_t { * @version 1.0 */ union message_body { - struct scan_attr strHostIFscanAttr; + struct scan_attr scan_info; struct connect_attr strHostIFconnectAttr; struct rcvd_net_info strRcvdNetworkInfo; struct rcvd_async_info strRcvdGnrlAsyncInfo; @@ -4099,7 +4099,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_SCAN: - Handle_Scan(msg.drvHandler, &msg.body.strHostIFscanAttr); + Handle_Scan(msg.drvHandler, &msg.body.scan_info); break; case HOST_IF_MSG_CONNECT: @@ -5789,26 +5789,26 @@ s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 u8ScanSource, msg.id = HOST_IF_MSG_SCAN; if (pstrHiddenNetwork != NULL) { - msg.body.strHostIFscanAttr.strHiddenNetwork.pstrHiddenNetworkInfo = pstrHiddenNetwork->pstrHiddenNetworkInfo; - msg.body.strHostIFscanAttr.strHiddenNetwork.u8ssidnum = pstrHiddenNetwork->u8ssidnum; + msg.body.scan_info.strHiddenNetwork.pstrHiddenNetworkInfo = pstrHiddenNetwork->pstrHiddenNetworkInfo; + msg.body.scan_info.strHiddenNetwork.u8ssidnum = pstrHiddenNetwork->u8ssidnum; } else PRINT_D(HOSTINF_DBG, "pstrHiddenNetwork IS EQUAL TO NULL\n"); msg.drvHandler = hWFIDrv; - msg.body.strHostIFscanAttr.u8ScanSource = u8ScanSource; - msg.body.strHostIFscanAttr.u8ScanType = u8ScanType; - msg.body.strHostIFscanAttr.pfScanResult = ScanResult; - msg.body.strHostIFscanAttr.pvUserArg = pvUserArg; - - msg.body.strHostIFscanAttr.u8ChnlListLen = u8ChnlListLen; - msg.body.strHostIFscanAttr.pu8ChnlFreqList = kmalloc(u8ChnlListLen, GFP_KERNEL);/* will be deallocated by the receiving thread */ - memcpy(msg.body.strHostIFscanAttr.pu8ChnlFreqList, + msg.body.scan_info.u8ScanSource = u8ScanSource; + msg.body.scan_info.u8ScanType = u8ScanType; + msg.body.scan_info.pfScanResult = ScanResult; + msg.body.scan_info.pvUserArg = pvUserArg; + + msg.body.scan_info.u8ChnlListLen = u8ChnlListLen; + msg.body.scan_info.pu8ChnlFreqList = kmalloc(u8ChnlListLen, GFP_KERNEL);/* will be deallocated by the receiving thread */ + memcpy(msg.body.scan_info.pu8ChnlFreqList, pu8ChnlFreqList, u8ChnlListLen); - msg.body.strHostIFscanAttr.IEsLen = IEsLen; - msg.body.strHostIFscanAttr.pu8IEs = kmalloc(IEsLen, GFP_KERNEL); /* will be deallocated by the receiving thread */ - memcpy(msg.body.strHostIFscanAttr.pu8IEs, + msg.body.scan_info.IEsLen = IEsLen; + msg.body.scan_info.pu8IEs = kmalloc(IEsLen, GFP_KERNEL);/* will be deallocated by the receiving thread */ + memcpy(msg.body.scan_info.pu8IEs, pu8IEs, IEsLen); /* send the message */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/32] staging: wilc1000: rename strRcvdNetworkInfo
This patch renames strRcvdNetworkInfo to net_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 96f0b69..8a93112 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -416,7 +416,7 @@ struct sta_inactive_t { union message_body { struct scan_attr scan_info; struct connect_attr con_info; - struct rcvd_net_info strRcvdNetworkInfo; + struct rcvd_net_info net_info; struct rcvd_async_info strRcvdGnrlAsyncInfo; struct key_attr strHostIFkeyAttr; struct cfg_param_attr strHostIFCfgParamAttr; @@ -4111,7 +4111,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_RCVD_NTWRK_INFO: - Handle_RcvdNtwrkInfo(msg.drvHandler, &msg.body.strRcvdNetworkInfo); + Handle_RcvdNtwrkInfo(msg.drvHandler, &msg.body.net_info); break; case HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO: @@ -6302,9 +6302,9 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length) msg.id = HOST_IF_MSG_RCVD_NTWRK_INFO; msg.drvHandler = pstrWFIDrv; - msg.body.strRcvdNetworkInfo.u32Length = u32Length; - msg.body.strRcvdNetworkInfo.pu8Buffer = kmalloc(u32Length, GFP_KERNEL); /* will be deallocated by the receiving thread */ - memcpy(msg.body.strRcvdNetworkInfo.pu8Buffer, + msg.body.net_info.u32Length = u32Length; + msg.body.net_info.pu8Buffer = kmalloc(u32Length, GFP_KERNEL); /* will be deallocated by the receiving thread */ + memcpy(msg.body.net_info.pu8Buffer, pu8Buffer, u32Length); /* send the message */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/32] staging: wilc1000: rename strRcvdGnrlAsyncInfo
This patch renames strRcvdGnrlAsyncInfo to async_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 8a93112..b24c022 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -417,7 +417,7 @@ union message_body { struct scan_attr scan_info; struct connect_attr con_info; struct rcvd_net_info net_info; - struct rcvd_async_info strRcvdGnrlAsyncInfo; + struct rcvd_async_info async_info; struct key_attr strHostIFkeyAttr; struct cfg_param_attr strHostIFCfgParamAttr; struct set_channel strHostIFSetChan; @@ -4115,7 +4115,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO: - Handle_RcvdGnrlAsyncInfo(msg.drvHandler, &msg.body.strRcvdGnrlAsyncInfo); + Handle_RcvdGnrlAsyncInfo(msg.drvHandler, &msg.body.async_info); break; case HOST_IF_MSG_KEY: @@ -6359,9 +6359,9 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length) msg.drvHandler = pstrWFIDrv; - msg.body.strRcvdGnrlAsyncInfo.u32Length = u32Length; - msg.body.strRcvdGnrlAsyncInfo.pu8Buffer = kmalloc(u32Length, GFP_KERNEL); /* will be deallocated by the receiving thread */ - memcpy(msg.body.strRcvdGnrlAsyncInfo.pu8Buffer, + msg.body.async_info.u32Length = u32Length; + msg.body.async_info.pu8Buffer = kmalloc(u32Length, GFP_KERNEL); /* will be deallocated by the receiving thread */ + memcpy(msg.body.async_info.pu8Buffer, pu8Buffer, u32Length); /* send the message */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/32] staging: wilc1000: rename strHostIFkeyAttr
This patch renames strHostIFkeyAttr to key_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 100 +++--- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index b24c022..d4e8122 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -418,7 +418,7 @@ union message_body { struct connect_attr con_info; struct rcvd_net_info net_info; struct rcvd_async_info async_info; - struct key_attr strHostIFkeyAttr; + struct key_attr key_info; struct cfg_param_attr strHostIFCfgParamAttr; struct set_channel strHostIFSetChan; struct get_channel strHostIFGetChan; @@ -4119,7 +4119,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_KEY: - Handle_Key(msg.drvHandler, &msg.body.strHostIFkeyAttr); + Handle_Key(msg.drvHandler, &msg.body.key_info); break; case HOST_IF_MSG_CFG_PARAMS: @@ -4363,13 +4363,13 @@ s32 host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, u8 u8keyIdx) msg.id = HOST_IF_MSG_KEY; - msg.body.strHostIFkeyAttr.enuKeyType = WEP; - msg.body.strHostIFkeyAttr.u8KeyAction = REMOVEKEY; + msg.body.key_info.enuKeyType = WEP; + msg.body.key_info.u8KeyAction = REMOVEKEY; msg.drvHandler = hWFIDrv; - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8keyIdx; /* send the message */ @@ -4411,12 +4411,12 @@ s32 host_int_set_WEPDefaultKeyID(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index) msg.id = HOST_IF_MSG_KEY; - msg.body.strHostIFkeyAttr.enuKeyType = WEP; - msg.body.strHostIFkeyAttr.u8KeyAction = DEFAULTKEY; + msg.body.key_info.enuKeyType = WEP; + msg.body.key_info.u8KeyAction = DEFAULTKEY; msg.drvHandler = hWFIDrv; - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Index; /* send the message */ @@ -4465,22 +4465,22 @@ s32 host_int_add_wep_key_bss_sta(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, msg.id = HOST_IF_MSG_KEY; - msg.body.strHostIFkeyAttr.enuKeyType = WEP; - msg.body.strHostIFkeyAttr.u8KeyAction = ADDKEY; + msg.body.key_info.enuKeyType = WEP; + msg.body.key_info.u8KeyAction = ADDKEY; msg.drvHandler = hWFIDrv; - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = kmalloc(u8WepKeylen, GFP_KERNEL); - memcpy(msg.body.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, + memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, pu8WepKey, u8WepKeylen); - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen = (u8WepKeylen); - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Keyidx; /* send the message */ @@ -4531,29 +4531,29 @@ s32 host_int_add_wep_key_bss_ap(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u PRINT_INFO(HOSTAPD_DBG, "KEY is %x\n", pu8WepKey[i]); } msg.id = HOST_IF_MSG_KEY; - msg.body.strHostIFkeyAttr.enuKeyType = WEP; - msg.body.strHostIFkeyAttr.u8KeyAction = ADDKEY_AP; + msg.body.key_info.enuKeyType = WEP; + msg.body.key_info.u8KeyAction = ADDKEY_AP; msg.drvHandler = hWFIDrv; - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = kmalloc(u8WepKeylen, GFP_KERNEL); - memcpy(msg.body.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, + memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, pu8WepKey, (u8WepKeylen)); - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen = (u8WepKeylen); - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Keyidx; - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.u8mode = u8mode; - msg.body.strHostIFkeyAttr. + msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.tenuAuth_type = tenuAuth_type; /* send the message */ s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); @@ -4606,26 +4606,26 @@ s32 host_int_add_ptk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen, msg.id = HOST_IF_MSG_KEY; - msg.body.strHostIFk
[PATCH 08/32] staging: wilc1000: rename strHostIFCfgParamAttr
This patch renames strHostIFCfgParamAttr to cfg_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d4e8122..76e82e6 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -419,7 +419,7 @@ union message_body { struct rcvd_net_info net_info; struct rcvd_async_info async_info; struct key_attr key_info; - struct cfg_param_attr strHostIFCfgParamAttr; + struct cfg_param_attr cfg_info; struct set_channel strHostIFSetChan; struct get_channel strHostIFGetChan; struct set_beacon strHostIFSetBeacon; @@ -4124,7 +4124,7 @@ static int hostIFthread(void *pvArg) case HOST_IF_MSG_CFG_PARAMS: - Handle_CfgParam(msg.drvHandler, &msg.body.strHostIFCfgParamAttr); + Handle_CfgParam(msg.drvHandler, &msg.body.cfg_info); break; case HOST_IF_MSG_SET_CHANNEL: @@ -5854,7 +5854,7 @@ s32 hif_set_cfg(tstrWILC_WFIDrv *hWFIDrv, tstrCfgParamVal *pstrCfgParamVal) /* prepare the WiphyParams Message */ memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_CFG_PARAMS; - msg.body.strHostIFCfgParamAttr.pstrCfgParamVal = *pstrCfgParamVal; + msg.body.cfg_info.pstrCfgParamVal = *pstrCfgParamVal; msg.drvHandler = hWFIDrv; s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/32] staging: wilc1000: rename struct set_channel
This patch renames struct set_channel to channel_attr to keep the naming convention such as scan_attr and connect_attr. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index e715f54..e66118a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -218,7 +218,7 @@ struct rcvd_async_info { }; /*! - * @struct set_channel + * @structchannel_attr * @brief Set Channel message body * @details * @todo @@ -227,7 +227,7 @@ struct rcvd_async_info { * @date 25 March 2012 * @version 1.0 */ -struct set_channel { +struct channel_attr { u8 u8SetChan; }; @@ -406,7 +406,7 @@ union message_body { struct rcvd_async_info async_info; struct key_attr key_info; struct cfg_param_attr cfg_info; - struct set_channel strHostIFSetChan; + struct channel_attr strHostIFSetChan; struct set_beacon strHostIFSetBeacon; struct del_beacon strHostIFDelBeacon; struct add_sta_param strAddStaParam; @@ -599,14 +599,14 @@ static tstrWILC_WFIDrv *get_handler_from_id(int id) /** * @brief Handle_SetChannel * @detailsSending config packet to firmware to set channel - * @param[in] struct set_channel *pstrHostIFSetChan + * @param[in] struct channel_attr *pstrHostIFSetChan * @return Error code. * @author * @date * @version 1.0 */ static s32 Handle_SetChannel(tstrWILC_WFIDrv *drvHandler, -struct set_channel *pstrHostIFSetChan) +struct channel_attr *pstrHostIFSetChan) { s32 s32Error = 0; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/32] staging: wilc1000: rename struct set_beacon
This patch renames struct set_beacon to beacon_attr to keep the naming convention as scan_attr, connect_attr and channel_attr. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 686402a9..2f211f9 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -248,7 +248,7 @@ struct channel_attr { * } tstrScanComplete;*/ /*! - * @struct set_beacon + * @struct beacon_attr * @brief Set Beacon message body * @details * @todo @@ -257,7 +257,7 @@ struct channel_attr { * @date 10 July 2012 * @version 1.0 */ -struct set_beacon { +struct beacon_attr { u32 u32Interval;/*!< Beacon Interval. Period between two successive beacons on air */ u32 u32DTIMPeriod; /*!< DTIM Period. Indicates how many Beacon frames * (including the current frame) appear before the next DTIM*/ @@ -391,7 +391,7 @@ union message_body { struct key_attr key_info; struct cfg_param_attr cfg_info; struct channel_attr channel_info; - struct set_beacon strHostIFSetBeacon; + struct beacon_attr strHostIFSetBeacon; struct add_sta_param strAddStaParam; struct del_sta strDelStaParam; struct add_sta_param strEditStaParam; @@ -3158,14 +3158,14 @@ static s32 Handle_Get_InActiveTime(tstrWILC_WFIDrv *drvHandler, /** * @brief Handle_AddBeacon * @details Sending config packet to add beacon - * @param[in]struct set_beacon *pstrSetBeaconParam + * @param[in]struct beacon_attr *pstrSetBeaconParam * @return NONE * @author * @date * @version 1.0 */ static void Handle_AddBeacon(tstrWILC_WFIDrv *drvHandler, -struct set_beacon *pstrSetBeaconParam) +struct beacon_attr *pstrSetBeaconParam) { s32 s32Error = 0; tstrWID strWID; @@ -6548,7 +6548,7 @@ s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 u32Interval, s32 s32Error = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; struct host_if_msg msg; - struct set_beacon *pstrSetBeaconParam = &msg.body.strHostIFSetBeacon; + struct beacon_attr *pstrSetBeaconParam = &msg.body.strHostIFSetBeacon; if (pstrWFIDrv == NULL) { PRINT_ER("driver is null\n"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/32] staging: wilc1000: rename strHostIFSetBeacon
This patch renames strHostIFSetBeacon to beacon_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 2f211f9..7e53aa9 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -391,7 +391,7 @@ union message_body { struct key_attr key_info; struct cfg_param_attr cfg_info; struct channel_attr channel_info; - struct beacon_attr strHostIFSetBeacon; + struct beacon_attr beacon_info; struct add_sta_param strAddStaParam; struct del_sta strDelStaParam; struct add_sta_param strEditStaParam; @@ -4134,7 +4134,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_ADD_BEACON: - Handle_AddBeacon(msg.drvHandler, &msg.body.strHostIFSetBeacon); + Handle_AddBeacon(msg.drvHandler, &msg.body.beacon_info); break; case HOST_IF_MSG_DEL_BEACON: @@ -6548,7 +6548,7 @@ s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 u32Interval, s32 s32Error = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; struct host_if_msg msg; - struct beacon_attr *pstrSetBeaconParam = &msg.body.strHostIFSetBeacon; + struct beacon_attr *pstrSetBeaconParam = &msg.body.beacon_info; if (pstrWFIDrv == NULL) { PRINT_ER("driver is null\n"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/32] staging: wilc1000: rename strHostIFSetChan
This patch renames strHostIFSetChan to channel_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index e66118a..4559ed5 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -406,7 +406,7 @@ union message_body { struct rcvd_async_info async_info; struct key_attr key_info; struct cfg_param_attr cfg_info; - struct channel_attr strHostIFSetChan; + struct channel_attr channel_info; struct set_beacon strHostIFSetBeacon; struct del_beacon strHostIFDelBeacon; struct add_sta_param strAddStaParam; @@ -4113,7 +4113,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_SET_CHANNEL: - Handle_SetChannel(msg.drvHandler, &msg.body.strHostIFSetChan); + Handle_SetChannel(msg.drvHandler, &msg.body.channel_info); break; case HOST_IF_MSG_DISCONNECT: @@ -5368,7 +5368,7 @@ s32 host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum) /* prepare the set channel message */ memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_SET_CHANNEL; - msg.body.strHostIFSetChan.u8SetChan = u8ChNum; + msg.body.channel_info.u8SetChan = u8ChNum; msg.drvHandler = hWFIDrv; s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/32] staging: wilc1000: remove struct del_beacon
This patch removes struct del_beacon which is not necessary. This patch also changes Handle_DelBeacon function by removing 2nd parameter, struct del_beacon because it is not used inside. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 24 +++- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 4559ed5..686402a9 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -269,22 +269,6 @@ struct set_beacon { * after the TIM inormation element */ }; - - -/*! - * @struct del_beacon - * @brief Del Beacon message body - * @details - * @todo - * @sa - * @authorAdham Abozaeid - * @date 15 July 2012 - * @version 1.0 - */ -struct del_beacon { - u8 u8dummy; -}; - /*! * @struct set_multicast * @brief set Multicast filter Address @@ -408,7 +392,6 @@ union message_body { struct cfg_param_attr cfg_info; struct channel_attr channel_info; struct set_beacon strHostIFSetBeacon; - struct del_beacon strHostIFDelBeacon; struct add_sta_param strAddStaParam; struct del_sta strDelStaParam; struct add_sta_param strEditStaParam; @@ -3244,14 +3227,13 @@ ERRORHANDLER: /** * @brief Handle_AddBeacon * @details Sending config packet to delete beacon - * @param[in] struct del_beacon *pstrDelBeacon + * @param[in] tstrWILC_WFIDrv *drvHandler * @return NONE * @author * @date * @version 1.0 */ -static void Handle_DelBeacon(tstrWILC_WFIDrv *drvHandler, -struct del_beacon *pstrDelBeacon) +static void Handle_DelBeacon(tstrWILC_WFIDrv *drvHandler) { s32 s32Error = 0; tstrWID strWID; @@ -4156,7 +4138,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_DEL_BEACON: - Handle_DelBeacon(msg.drvHandler, &msg.body.strHostIFDelBeacon); + Handle_DelBeacon(msg.drvHandler); break; case HOST_IF_MSG_ADD_STATION: -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/32] staging: wilc1000: rename strEditStaParam
This patch renames strEditStaParam to edit_sta_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 94559bd..da8e589 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -394,7 +394,7 @@ union message_body { struct beacon_attr beacon_info; struct add_sta_param add_sta_info; struct del_sta del_sta_info; - struct add_sta_param strEditStaParam; + struct add_sta_param edit_sta_info; struct timer_cb strTimerCb; struct power_mgmt_param strPowerMgmtparam; struct sta_inactive_t strHostIfStaInactiveT; @@ -4150,7 +4150,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_EDIT_STATION: - Handle_EditStation(msg.drvHandler, &msg.body.strEditStaParam); + Handle_EditStation(msg.drvHandler, &msg.body.edit_sta_info); break; case HOST_IF_MSG_GET_INACTIVETIME: -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/32] staging: wilc1000: remove struct get_channel
This patch removes struct get_channel from the driver because it is not used anywhere. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 76e82e6..e715f54 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -232,20 +232,6 @@ struct set_channel { }; /*! - * @struct get_channel - * @brief Get Channel message body - * @details - * @todo - * @sa - * @authorMai Daftedar - * @date 01 Jule 2012 - * @version 1.0 - */ -struct get_channel { - u8 u8GetChan; -}; - -/*! * @struct tstrScanComplete * @brief hold received Async. Scan Complete message body * @details @@ -421,7 +407,6 @@ union message_body { struct key_attr key_info; struct cfg_param_attr cfg_info; struct set_channel strHostIFSetChan; - struct get_channel strHostIFGetChan; struct set_beacon strHostIFSetBeacon; struct del_beacon strHostIFDelBeacon; struct add_sta_param strAddStaParam; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/32] staging: wilc1000: rename strDelStaParam
This patch renames strDelStaParam to del_sta_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d9d0b2d..94559bd 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -393,7 +393,7 @@ union message_body { struct channel_attr channel_info; struct beacon_attr beacon_info; struct add_sta_param add_sta_info; - struct del_sta strDelStaParam; + struct del_sta del_sta_info; struct add_sta_param strEditStaParam; struct timer_cb strTimerCb; struct power_mgmt_param strPowerMgmtparam; @@ -4146,7 +4146,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_DEL_STATION: - Handle_DelStation(msg.drvHandler, &msg.body.strDelStaParam); + Handle_DelStation(msg.drvHandler, &msg.body.del_sta_info); break; case HOST_IF_MSG_EDIT_STATION: @@ -6700,7 +6700,7 @@ s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr) s32 s32Error = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; struct host_if_msg msg; - struct del_sta *pstrDelStationMsg = &msg.body.strDelStaParam; + struct del_sta *pstrDelStationMsg = &msg.body.del_sta_info; if (pstrWFIDrv == NULL) { PRINT_ER("driver is null\n"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/32] staging: wilc1000: rename strAddStaParam
This patch renames strAddStaParam to add_sta_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 7e53aa9..d9d0b2d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -392,7 +392,7 @@ union message_body { struct cfg_param_attr cfg_info; struct channel_attr channel_info; struct beacon_attr beacon_info; - struct add_sta_param strAddStaParam; + struct add_sta_param add_sta_info; struct del_sta strDelStaParam; struct add_sta_param strEditStaParam; struct timer_cb strTimerCb; @@ -4142,7 +4142,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_ADD_STATION: - Handle_AddStation(msg.drvHandler, &msg.body.strAddStaParam); + Handle_AddStation(msg.drvHandler, &msg.body.add_sta_info); break; case HOST_IF_MSG_DEL_STATION: @@ -6651,7 +6651,7 @@ s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv, s32 s32Error = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; struct host_if_msg msg; - struct add_sta_param *pstrAddStationMsg = &msg.body.strAddStaParam; + struct add_sta_param *pstrAddStationMsg = &msg.body.add_sta_info; if (pstrWFIDrv == NULL) { @@ -6802,7 +6802,7 @@ s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv, s32 s32Error = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; struct host_if_msg msg; - struct add_sta_param *pstrAddStationMsg = &msg.body.strAddStaParam; + struct add_sta_param *pstrAddStationMsg = &msg.body.add_sta_info; if (pstrWFIDrv == NULL) { PRINT_ER("driver is null\n"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/32] staging: wilc1000: remove struct timer_cb
This patch removes struct timer_cb which is not used. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index da8e589..7d51122 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -315,20 +315,6 @@ struct del_sta { }; /*! - * @struct timer_cb - * @brief Timer callback message body - * @details - * @todo - * @sa - * @authorMostafa Abu Bakr - * @date 25 March 2012 - * @version 1.0 - */ -struct timer_cb { - void *pvUsrArg; /*!< Private data passed at timer start */ -}; - -/*! * @struct power_mgmt_param * @brief Power management message body * @details @@ -395,7 +381,6 @@ union message_body { struct add_sta_param add_sta_info; struct del_sta del_sta_info; struct add_sta_param edit_sta_info; - struct timer_cb strTimerCb; struct power_mgmt_param strPowerMgmtparam; struct sta_inactive_t strHostIfStaInactiveT; struct set_ip_addr strHostIfSetIP; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/32] staging: wilc1000: rename strHostIfStaInactiveT
This patch renames strHostIfStaInactiveT to mac_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index de64bd2..5a54608 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -382,7 +382,7 @@ union message_body { struct del_sta del_sta_info; struct add_sta_param edit_sta_info; struct power_mgmt_param pwr_mgmt_info; - struct sta_inactive_t strHostIfStaInactiveT; + struct sta_inactive_t mac_info; struct set_ip_addr strHostIfSetIP; struct drv_handler strHostIfSetDrvHandler; struct set_multicast strHostIfSetMulti; @@ -4139,7 +4139,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_GET_INACTIVETIME: - Handle_Get_InActiveTime(msg.drvHandler, &msg.body.strHostIfStaInactiveT); + Handle_Get_InActiveTime(msg.drvHandler, &msg.body.mac_info); break; case HOST_IF_MSG_SCAN_TIMER_FIRED: @@ -5533,7 +5533,7 @@ s32 host_int_get_inactive_time(tstrWILC_WFIDrv *hWFIDrv, const u8 *mac, u32 *pu3 memset(&msg, 0, sizeof(struct host_if_msg)); - memcpy(msg.body.strHostIfStaInactiveT.mac, + memcpy(msg.body.mac_info.mac, mac, ETH_ALEN); msg.id = HOST_IF_MSG_GET_INACTIVETIME; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/32] staging: wilc1000: rename strPowerMgmtparam
This patch renames strPowerMgmtparam to pwr_mgmt_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 7d51122..de64bd2 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -381,7 +381,7 @@ union message_body { struct add_sta_param add_sta_info; struct del_sta del_sta_info; struct add_sta_param edit_sta_info; - struct power_mgmt_param strPowerMgmtparam; + struct power_mgmt_param pwr_mgmt_info; struct sta_inactive_t strHostIfStaInactiveT; struct set_ip_addr strHostIfSetIP; struct drv_handler strHostIfSetDrvHandler; @@ -4154,7 +4154,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_POWER_MGMT: - Handle_PowerManagement(msg.drvHandler, &msg.body.strPowerMgmtparam); + Handle_PowerManagement(msg.drvHandler, &msg.body.pwr_mgmt_info); break; case HOST_IF_MSG_SET_WFIDRV_HANDLER: @@ -6826,7 +6826,7 @@ s32 host_int_set_power_mgmt(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32Ti s32 s32Error = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; struct host_if_msg msg; - struct power_mgmt_param *pstrPowerMgmtParam = &msg.body.strPowerMgmtparam; + struct power_mgmt_param *pstrPowerMgmtParam = &msg.body.pwr_mgmt_info; PRINT_INFO(HOSTINF_DBG, "\n\n>> Setting PS to %d <<\n\n", bIsEnabled); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/32] staging: wilc1000: rename strHostIfSetDrvHandler
This patch renames strHostIfSetDrvHandler to drv to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 5a54608..b8ef165 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -384,7 +384,7 @@ union message_body { struct power_mgmt_param pwr_mgmt_info; struct sta_inactive_t mac_info; struct set_ip_addr strHostIfSetIP; - struct drv_handler strHostIfSetDrvHandler; + struct drv_handler drv; struct set_multicast strHostIfSetMulti; struct op_mode strHostIfSetOperationMode; struct set_mac_addr strHostIfSetMacAddress; @@ -4159,7 +4159,7 @@ static int hostIFthread(void *pvArg) case HOST_IF_MSG_SET_WFIDRV_HANDLER: Handle_SetWfiDrvHandler(msg.drvHandler, - &msg.body.strHostIfSetDrvHandler); + &msg.body.drv); break; case HOST_IF_MSG_SET_OPERATION_MODE: @@ -5382,7 +5382,7 @@ s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address) memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_SET_WFIDRV_HANDLER; - msg.body.strHostIfSetDrvHandler.u32Address = get_id_from_handler(u32address); + msg.body.drv.u32Address = get_id_from_handler(u32address); msg.drvHandler = u32address; s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/32] staging: wilc1000: rename strHostIfSetIP
This patch renames strHostIfSetIP to ip_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index b8ef165..596d68f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -383,7 +383,7 @@ union message_body { struct add_sta_param edit_sta_info; struct power_mgmt_param pwr_mgmt_info; struct sta_inactive_t mac_info; - struct set_ip_addr strHostIfSetIP; + struct set_ip_addr ip_info; struct drv_handler drv; struct set_multicast strHostIfSetMulti; struct op_mode strHostIfSetOperationMode; @@ -4168,12 +4168,12 @@ static int hostIFthread(void *pvArg) case HOST_IF_MSG_SET_IPADDRESS: PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n"); - Handle_set_IPAddress(msg.drvHandler, msg.body.strHostIfSetIP.au8IPAddr, msg.body.strHostIfSetIP.idx); + Handle_set_IPAddress(msg.drvHandler, msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx); break; case HOST_IF_MSG_GET_IPADDRESS: PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n"); - Handle_get_IPAddress(msg.drvHandler, msg.body.strHostIfSetIP.au8IPAddr, msg.body.strHostIfSetIP.idx); + Handle_get_IPAddress(msg.drvHandler, msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx); break; case HOST_IF_MSG_SET_MAC_ADDRESS: @@ -7232,9 +7232,9 @@ s32 host_int_setup_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *u16ipadd, u8 idx) /* prepare the WiphyParams Message */ msg.id = HOST_IF_MSG_SET_IPADDRESS; - msg.body.strHostIfSetIP.au8IPAddr = u16ipadd; + msg.body.ip_info.au8IPAddr = u16ipadd; msg.drvHandler = hWFIDrv; - msg.body.strHostIfSetIP.idx = idx; + msg.body.ip_info.idx = idx; s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); if (s32Error) @@ -7269,9 +7269,9 @@ s32 host_int_get_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *u16ipadd, u8 idx) /* prepare the WiphyParams Message */ msg.id = HOST_IF_MSG_GET_IPADDRESS; - msg.body.strHostIfSetIP.au8IPAddr = u16ipadd; + msg.body.ip_info.au8IPAddr = u16ipadd; msg.drvHandler = hWFIDrv; - msg.body.strHostIfSetIP.idx = idx; + msg.body.ip_info.idx = idx; s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); if (s32Error) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/32] staging: wilc1000: rename strHostIfSetMulti
This patch renames strHostIfSetMulti to multicast_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 596d68f..034e3d9 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -385,7 +385,7 @@ union message_body { struct sta_inactive_t mac_info; struct set_ip_addr ip_info; struct drv_handler drv; - struct set_multicast strHostIfSetMulti; + struct set_multicast multicast_info; struct op_mode strHostIfSetOperationMode; struct set_mac_addr strHostIfSetMacAddress; struct get_mac_addr strHostIfGetMacAddress; @@ -4200,7 +4200,7 @@ static int hostIFthread(void *pvArg) case HOST_IF_MSG_SET_MULTICAST_FILTER: PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_MULTICAST_FILTER\n"); - Handle_SetMulticastFilter(msg.drvHandler, &msg.body.strHostIfSetMulti); + Handle_SetMulticastFilter(msg.drvHandler, &msg.body.multicast_info); break; case HOST_IF_MSG_ADD_BA_SESSION: @@ -6860,7 +6860,7 @@ s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; struct host_if_msg msg; - struct set_multicast *pstrMulticastFilterParam = &msg.body.strHostIfSetMulti; + struct set_multicast *pstrMulticastFilterParam = &msg.body.multicast_info; if (pstrWFIDrv == NULL) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/32] staging: wilc1000: rename strHostIfSetMacAddress
This patch renames strHostIfSetMacAddress to set_mac_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index a66f78d..2fa1158 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -387,7 +387,7 @@ union message_body { struct drv_handler drv; struct set_multicast multicast_info; struct op_mode mode; - struct set_mac_addr strHostIfSetMacAddress; + struct set_mac_addr set_mac_info; struct get_mac_addr strHostIfGetMacAddress; struct ba_session_info strHostIfBASessionInfo; struct remain_ch strHostIfRemainOnChan; @@ -4177,7 +4177,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_SET_MAC_ADDRESS: - Handle_SetMacAddress(msg.drvHandler, &msg.body.strHostIfSetMacAddress); + Handle_SetMacAddress(msg.drvHandler, &msg.body.set_mac_info); break; case HOST_IF_MSG_GET_MAC_ADDRESS: @@ -4892,7 +4892,7 @@ s32 host_int_set_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress) /* prepare setting mac address message */ memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_SET_MAC_ADDRESS; - memcpy(msg.body.strHostIfSetMacAddress.u8MacAddress, pu8MacAddress, ETH_ALEN); + memcpy(msg.body.set_mac_info.u8MacAddress, pu8MacAddress, ETH_ALEN); msg.drvHandler = hWFIDrv; s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/32] staging: wilc1000: rename pUserData
This patch renames pUserData to data to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 79957f9..3769595 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -392,7 +392,7 @@ union message_body { struct ba_session_info session_info; struct remain_ch remain_on_ch; struct reg_frame reg_f; - char *pUserData; + char *data; struct del_all_sta strHostIFDelAllSta; }; @@ -4111,7 +4111,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_GET_STATISTICS: - Handle_GetStatistics(msg.drvHandler, (tstrStatistics *)msg.body.pUserData); + Handle_GetStatistics(msg.drvHandler, (tstrStatistics *)msg.body.data); break; case HOST_IF_MSG_GET_CHNL: @@ -5689,7 +5689,7 @@ s32 host_int_get_statistics(tstrWILC_WFIDrv *hWFIDrv, tstrStatistics *pstrStatis memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_GET_STATISTICS; - msg.body.pUserData = (char *)pstrStatistics; + msg.body.data = (char *)pstrStatistics; msg.drvHandler = hWFIDrv; /* send the message */ s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/32] staging: wilc1000: rename strHostIfGetMacAddress
This patch renames strHostIfGetMacAddress to get_mac_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 2fa1158..a6702dd 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -388,7 +388,7 @@ union message_body { struct set_multicast multicast_info; struct op_mode mode; struct set_mac_addr set_mac_info; - struct get_mac_addr strHostIfGetMacAddress; + struct get_mac_addr get_mac_info; struct ba_session_info strHostIfBASessionInfo; struct remain_ch strHostIfRemainOnChan; struct reg_frame strHostIfRegisterFrame; @@ -4181,7 +4181,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_GET_MAC_ADDRESS: - Handle_GetMacAddress(msg.drvHandler, &msg.body.strHostIfGetMacAddress); + Handle_GetMacAddress(msg.drvHandler, &msg.body.get_mac_info); break; case HOST_IF_MSG_REMAIN_ON_CHAN: @@ -4858,7 +4858,7 @@ s32 host_int_get_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress) memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_GET_MAC_ADDRESS; - msg.body.strHostIfGetMacAddress.u8MacAddress = pu8MacAddress; + msg.body.get_mac_info.u8MacAddress = pu8MacAddress; msg.drvHandler = hWFIDrv; /* send the message */ s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 31/32] staging: wilc1000: rename strHostIFDelAllSta
This patch renames strHostIFDelAllSta to del_all_sta_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 3769595..aad0f5d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -393,7 +393,7 @@ union message_body { struct remain_ch remain_on_ch; struct reg_frame reg_f; char *data; - struct del_all_sta strHostIFDelAllSta; + struct del_all_sta del_all_sta_info; }; /*! @@ -4212,7 +4212,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_DEL_ALL_STA: - Handle_DelAllSta(msg.drvHandler, &msg.body.strHostIFDelAllSta); + Handle_DelAllSta(msg.drvHandler, &msg.body.del_all_sta_info); break; default: @@ -6726,7 +6726,7 @@ s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]) s32 s32Error = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; struct host_if_msg msg; - struct del_all_sta *pstrDelAllStationMsg = &msg.body.strHostIFDelAllSta; + struct del_all_sta *pstrDelAllStationMsg = &msg.body.del_all_sta_info; u8 au8Zero_Buff[ETH_ALEN] = {0}; u32 i; u8 u8AssocNumb = 0; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/32] staging: wilc1000: rename strHostIfSetOperationMode
This patch renames strHostIfSetOperationMode to mode to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 034e3d9..a66f78d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -386,7 +386,7 @@ union message_body { struct set_ip_addr ip_info; struct drv_handler drv; struct set_multicast multicast_info; - struct op_mode strHostIfSetOperationMode; + struct op_mode mode; struct set_mac_addr strHostIfSetMacAddress; struct get_mac_addr strHostIfGetMacAddress; struct ba_session_info strHostIfBASessionInfo; @@ -4163,7 +4163,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_SET_OPERATION_MODE: - Handle_SetOperationMode(msg.drvHandler, &msg.body.strHostIfSetOperationMode); + Handle_SetOperationMode(msg.drvHandler, &msg.body.mode); break; case HOST_IF_MSG_SET_IPADDRESS: @@ -5407,7 +5407,7 @@ s32 host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, u32 u32mode) memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_SET_OPERATION_MODE; - msg.body.strHostIfSetOperationMode.u32Mode = u32mode; + msg.body.mode.u32Mode = u32mode; msg.drvHandler = hWFIDrv; s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel