From c5c77ba18ea66aa05441c71e38473efb787705a4 Mon Sep 17 00:00:00 2001 From: Johnny Kim Date: Mon, 11 May 2015 14:30:56 +0900 Subject: staging: wilc1000: Add SDIO/SPI 802.11 driver This driver is for the wilc1000 which is a single chip IEEE 802.11 b/g/n device. The driver works together with cfg80211, which is the kernel side of configuration management for wireless devices because the wilc1000 chipset is fullmac where the MLME is managed in hardware. The driver worked from kernel version 2.6.38 and being now ported to several others since then. A TODO file is included as well in this commit. Signed-off-by: Johnny Kim Signed-off-by: Rachel Kim Signed-off-by: Dean Lee Signed-off-by: Chris Park Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 2953 +++++++++++++++++++++++++++++++++ 1 file changed, 2953 insertions(+) create mode 100644 drivers/staging/wilc1000/linux_wlan.c (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c new file mode 100644 index 000000000000..49b238a05a88 --- /dev/null +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -0,0 +1,2953 @@ +#ifndef SIMULATION +#include "wilc_wfi_cfgoperations.h" +#include "linux_wlan_common.h" +#include "wilc_wlan_if.h" +#include "wilc_wlan.h" +#ifdef USE_WIRELESS +#include "wilc_wfi_cfgoperations.h" +#endif + +#include "linux_wlan_common.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP +#include +#endif +#include +#include +#include +#include + +#include +#include + +#ifdef WILC_SDIO +#include "linux_wlan_sdio.h" +#else +#include "linux_wlan_spi.h" +#endif + +#ifdef WILC_FULLY_HOSTING_AP +#include "wilc_host_ap.h" +#endif + +#ifdef STATIC_MACADDRESS /* brandy_0724 [[ */ +#include +#include +struct task_struct *wilc_mac_thread; +unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xb2}; +#endif /* brandy_0724 ]] */ + +#if defined(CUSTOMER_PLATFORM) +/* + TODO : Write power control functions as customer platform. + */ +#else + + #define _linux_wlan_device_power_on() {} + #define _linux_wlan_device_power_off() {} + + #define _linux_wlan_device_detection() {} + #define _linux_wlan_device_removal() {} +#endif + +#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP +extern WILC_Bool g_obtainingIP; +#endif +extern WILC_Uint16 Set_machw_change_vir_if(WILC_Bool bValue); +extern void resolve_disconnect_aberration(void *drvHandler); +extern WILC_Uint8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; +void wilc1000_wlan_deinit(linux_wlan_t *nic); +#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP +extern WILC_TimerHandle hDuringIpTimer; +#endif + +static int linux_wlan_device_power(int on_off) +{ + PRINT_D(INIT_DBG, "linux_wlan_device_power.. (%d)\n", on_off); + + if (on_off) { + _linux_wlan_device_power_on(); + } else { + _linux_wlan_device_power_off(); + } + + return 0; +} + +static int linux_wlan_device_detection(int on_off) +{ + PRINT_D(INIT_DBG, "linux_wlan_device_detection.. (%d)\n", on_off); + +#ifdef WILC_SDIO + if (on_off) { + _linux_wlan_device_detection(); + } else { + _linux_wlan_device_removal(); + } +#endif + + return 0; +} + + +#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP +static int dev_state_ev_handler(struct notifier_block *this, unsigned long event, void *ptr); + +static struct notifier_block g_dev_notifier = { + .notifier_call = dev_state_ev_handler +}; +#endif + +#define wilc_wlan_deinit(nic) { if (&g_linux_wlan->oup != NULL) \ + if (g_linux_wlan->oup.wlan_cleanup != NULL) \ + g_linux_wlan->oup.wlan_cleanup(); } + + +#ifndef STA_FIRMWARE +#define STA_FIRMWARE "wifi_firmware.bin" +#endif + +#ifndef AP_FIRMWARE +#define AP_FIRMWARE "wifi_firmware_ap.bin" +#endif + +#ifndef P2P_CONCURRENCY_FIRMWARE +#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_WAIT 0 +/* + * to sync between mac_close and module exit. + * don't initialize or de-initialize from init/deinitlocks + * to be initialized from module wilc_netdev_init and + * deinitialized from mdoule_exit + */ +static struct semaphore close_exit_sync; +unsigned int int_rcvdU; +unsigned int int_rcvdB; +unsigned int int_clrd; + +static int wlan_deinit_locks(linux_wlan_t *nic); +static void wlan_deinitialize_threads(linux_wlan_t *nic); +static void linux_wlan_lock(void *vp); +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); +static int mac_init_fn(struct net_device *ndev); +int mac_xmit(struct sk_buff *skb, struct net_device *dev); +int mac_open(struct net_device *ndev); +int mac_close(struct net_device *ndev); +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 + */ +linux_wlan_t *g_linux_wlan; +wilc_wlan_oup_t *gpstrWlanOps; +WILC_Bool bEnablePS = WILC_TRUE; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) +static const struct net_device_ops wilc_netdev_ops = { + .ndo_init = mac_init_fn, + .ndo_open = mac_open, + .ndo_stop = mac_close, + .ndo_start_xmit = mac_xmit, + .ndo_do_ioctl = mac_ioctl, + .ndo_get_stats = mac_stats, + .ndo_set_rx_mode = wilc_set_multicast_list, + +}; +#define wilc_set_netdev_ops(ndev) do { (ndev)->netdev_ops = &wilc_netdev_ops; } while (0) +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) + +static const struct net_device_ops wilc_netdev_ops = { + .ndo_init = mac_init_fn, + .ndo_open = mac_open, + .ndo_stop = mac_close, + .ndo_start_xmit = mac_xmit, + .ndo_do_ioctl = mac_ioctl, + .ndo_get_stats = mac_stats, + .ndo_set_multicast_list = wilc_set_multicast_list, + +}; + +#define wilc_set_netdev_ops(ndev) do { (ndev)->netdev_ops = &wilc_netdev_ops; } while (0) + +#else + +static void wilc_set_netdev_ops(struct net_device *ndev) +{ + + ndev->init = mac_init_fn; + ndev->open = mac_open; + ndev->stop = mac_close; + ndev->hard_start_xmit = mac_xmit; + ndev->do_ioctl = mac_ioctl; + ndev->get_stats = mac_stats; + ndev->set_multicast_list = wilc_set_multicast_list, +} + +#endif +#ifdef DEBUG_MODE + +extern volatile int timeNo; + +#define DEGUG_BUFFER_LENGTH 1000 +volatile int WatchDogdebuggerCounter; +char DebugBuffer[DEGUG_BUFFER_LENGTH + 20] = {0}; +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); + if ((ps8current - DebugBuffer) > DEGUG_BUFFER_LENGTH) { + ps8current = DebugBuffer; + } + +} + + +void dump_logs() +{ + if (DebugBuffer[0]) { + DebugBuffer[DEGUG_BUFFER_LENGTH] = 0; + PRINT_INFO(GENERIC_DBG, "early printed\n"); + PRINT_D(GENERIC_DBG, ps8current + 1); + ps8current[1] = 0; + PRINT_INFO(GENERIC_DBG, "latest printed\n"); + PRINT_D(GENERIC_DBG, DebugBuffer); + DebugBuffer[0] = 0; + ps8current = DebugBuffer; + } +} + +void Reset_WatchDogdebugger() +{ + WatchDogdebuggerCounter = 0; +} + +static int DebuggingThreadTask(void *vp) +{ + while (1) { + while (!WatchDogdebuggerCounter) { + PRINT_D(GENERIC_DBG, "Debug Thread Running %d\n", timeNo); + WatchDogdebuggerCounter = 1; + msleep(10000); + } + dump_logs(); + 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) +{ + struct in_ifaddr *dev_iface = (struct in_ifaddr *)ptr; + struct WILC_WFI_priv *priv; + tstrWILC_WFIDrv *pstrWFIDrv; + struct net_device *dev; + WILC_Uint8 *pIP_Add_buff; + WILC_Sint32 s32status = WILC_FAIL; + perInterface_wlan_t *nic; + WILC_Uint8 null_ip[4] = {0}; + char wlan_dev_name[5] = "wlan0"; + + if (dev_iface == NULL || dev_iface->ifa_dev == NULL || dev_iface->ifa_dev->dev == NULL) { + PRINT_D(GENERIC_DBG, "dev_iface = NULL\n"); + return NOTIFY_DONE; + } + + if ((memcmp(dev_iface->ifa_label, "wlan0", 5)) && (memcmp(dev_iface->ifa_label, "p2p0", 4))) { + PRINT_D(GENERIC_DBG, "Interface is neither WLAN0 nor P2P0\n"); + return NOTIFY_DONE; + } + + dev = (struct net_device *)dev_iface->ifa_dev->dev; + if (dev->ieee80211_ptr == NULL || dev->ieee80211_ptr->wiphy == NULL) { + PRINT_D(GENERIC_DBG, "No Wireless registerd\n"); + return NOTIFY_DONE; + } + priv = wiphy_priv(dev->ieee80211_ptr->wiphy); + if (priv == NULL) { + PRINT_D(GENERIC_DBG, "No Wireless Priv\n"); + return NOTIFY_DONE; + } + pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv; + nic = netdev_priv(dev); + if (nic == NULL || pstrWFIDrv == NULL) { + PRINT_D(GENERIC_DBG, "No Wireless Priv\n"); + return NOTIFY_DONE; + } + + PRINT_INFO(GENERIC_DBG, "dev_state_ev_handler +++\n"); /* tony */ + + switch (event) { + case NETDEV_UP: + PRINT_D(GENERIC_DBG, "dev_state_ev_handler event=NETDEV_UP %p\n", dev); /* tony */ + + 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; + g_obtainingIP = WILC_FALSE; + WILC_TimerStop(&hDuringIpTimer, WILC_NULL); + PRINT_D(GENERIC_DBG, "IP obtained , enable scan\n"); + } + + + + if (bEnablePS == WILC_TRUE) + host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 1, 0); + + PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label); + + pIP_Add_buff = (char *) (&(dev_iface->ifa_address)); + PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d \n", pIP_Add_buff[0], pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]); + s32status = host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx); + + break; + + case NETDEV_DOWN: + PRINT_D(GENERIC_DBG, "dev_state_ev_handler event=NETDEV_DOWN %p\n", dev); /* tony */ + + PRINT_INFO(GENERIC_DBG, "\n ============== IP Address Released ===============\n\n"); + if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) { + pstrWFIDrv->IFC_UP = 0; + g_obtainingIP = WILC_FALSE; + } + + if (memcmp(dev_iface->ifa_label, wlan_dev_name, 5) == 0) + host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0); + + resolve_disconnect_aberration(pstrWFIDrv); + + + PRINT_D(GENERIC_DBG, "[%s] Down IP\n", dev_iface->ifa_label); + + pIP_Add_buff = null_ip; + PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d \n", pIP_Add_buff[0], pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]); + + s32status = host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx); + + break; + + default: + PRINT_INFO(GENERIC_DBG, "dev_state_ev_handler event=default\n"); /* tony */ + PRINT_INFO(GENERIC_DBG, "[%s] unknown dev event: %lu\n", dev_iface->ifa_label, event); + + break; + } + + return NOTIFY_DONE; + +} +#endif + +/* + * Interrupt initialization and handling functions + */ + +void linux_wlan_enable_irq(void) +{ + +#if (RX_BH_TYPE != RX_BH_THREADED_IRQ) +#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) + PRINT_D(INT_DBG, "Enabling IRQ ...\n"); + enable_irq(g_linux_wlan->dev_irq_num); +#endif +#endif +} + +void linux_wlan_disable_irq(int wait) +{ +#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) + if (wait) { + PRINT_D(INT_DBG, "Disabling IRQ ...\n"); + disable_irq(g_linux_wlan->dev_irq_num); + } else { + PRINT_D(INT_DBG, "Disabling IRQ ...\n"); + disable_irq_nosync(g_linux_wlan->dev_irq_num); + } +#endif +} + +#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); +#endif + PRINT_D(INT_DBG, "Interrupt received UH\n"); + + /*While mac is closing cacncel the handling of any interrupts received*/ + if (g_linux_wlan->close) { + PRINT_ER("Driver is CLOSING: Can't handle UH interrupt\n"); + #if (RX_BH_TYPE == RX_BH_THREADED_IRQ) + return IRQ_HANDLED; + #else + return IRQ_NONE; + #endif + + } +#if (RX_BH_TYPE == RX_BH_WORK_QUEUE) + schedule_work(&g_linux_wlan->rx_work_queue); + return IRQ_HANDLED; +#elif (RX_BH_TYPE == RX_BH_KTHREAD) + linux_wlan_unlock(&g_linux_wlan->rx_sem); + return IRQ_HANDLED; +#elif (RX_BH_TYPE == RX_BH_THREADED_IRQ) + return IRQ_WAKE_THREAD; +#endif + +} +#endif + +#if (RX_BH_TYPE == RX_BH_WORK_QUEUE || RX_BH_TYPE == RX_BH_THREADED_IRQ) + +#if (RX_BH_TYPE == RX_BH_THREADED_IRQ) +irqreturn_t isr_bh_routine(int irq, void *userdata) +{ + linux_wlan_t *nic; + nic = (linux_wlan_t *)userdata; +#else +static void isr_bh_routine(struct work_struct *work) +{ + perInterface_wlan_t *nic; + nic = (perInterface_wlan_t *)container_of(work, linux_wlan_t, rx_work_queue); +#endif + + /*While mac is closing cacncel the handling of any interrupts received*/ + if (g_linux_wlan->close) { + PRINT_ER("Driver is CLOSING: Can't handle BH interrupt\n"); + #if (RX_BH_TYPE == RX_BH_THREADED_IRQ) + return IRQ_HANDLED; + #else + return; + #endif + + + + } + + int_rcvdB++; + PRINT_D(INT_DBG, "Interrupt received BH\n"); + if (g_linux_wlan->oup.wlan_handle_rx_isr != 0) { + g_linux_wlan->oup.wlan_handle_rx_isr(); + } else { + PRINT_ER("wlan_handle_rx_isr() hasn't been initialized\n"); + } + + +#if (RX_BH_TYPE == RX_BH_THREADED_IRQ) + return IRQ_HANDLED; +#endif +} +#elif (RX_BH_TYPE == RX_BH_KTHREAD) +static int isr_bh_routine(void *vp) +{ + linux_wlan_t *nic; + + nic = (linux_wlan_t *)vp; + + while (1) { + linux_wlan_lock(&nic->rx_sem); + if (g_linux_wlan->close) { + + while (!kthread_should_stop()) + schedule(); + + break; + } + int_rcvdB++; + PRINT_D(INT_DBG, "Interrupt received BH\n"); + if (g_linux_wlan->oup.wlan_handle_rx_isr != 0) { + g_linux_wlan->oup.wlan_handle_rx_isr(); + } else { + PRINT_ER("wlan_handle_rx_isr() hasn't been initialized\n"); + } + } + + return 0; +} +#endif + + +#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) +static int init_irq(linux_wlan_t *p_nic) +{ + int ret = 0; + linux_wlan_t *nic = p_nic; + + /*initialize GPIO and register IRQ num*/ + /*GPIO request*/ + if ((gpio_request(GPIO_NUM, "WILC_INTR") == 0) && + (gpio_direction_input(GPIO_NUM) == 0)) { +#if defined(CUSTOMER_PLATFORM) +/* + TODO : save the registerd irq number to the private wilc context in kernel. + * + * ex) nic->dev_irq_num = gpio_to_irq(GPIO_NUM); + */ +#elif defined (NM73131_0_BOARD) + nic->dev_irq_num = IRQ_WILC1000; +#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); +#else + nic->dev_irq_num = gpio_to_irq(GPIO_NUM); +#endif + } else { + ret = -1; + 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_routine, + IRQF_TRIGGER_LOW | IRQF_ONESHOT, /*Without IRQF_ONESHOT the uh will remain kicked in and dont gave a chance to bh*/ + "WILC_IRQ", nic)) < 0) { + +#else + /*Request IRQ*/ + if ((ret != -1) && (request_irq(nic->dev_irq_num, isr_uh_routine, + IRQF_TRIGGER_LOW, "WILC_IRQ", nic) < 0)) { + +#endif + PRINT_ER("Failed to request IRQ for GPIO: %d\n", GPIO_NUM); + ret = -1; + } else { + + PRINT_D(INIT_DBG, "IRQ request succeeded IRQ-NUM= %d on GPIO: %d\n", + nic->dev_irq_num, GPIO_NUM); + } + + return ret; +} +#endif + +static void deinit_irq(linux_wlan_t *nic) +{ +#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) + /* Deintialize IRQ */ + if (&nic->dev_irq_num != 0) { + free_irq(nic->dev_irq_num, g_linux_wlan); + + gpio_free(GPIO_NUM); + } +#endif +} + + +/* + * OS functions + */ +static void linux_wlan_msleep(uint32_t msc) +{ + if (msc <= 4000000) { + WILC_Uint32 u32Temp = msc * 1000; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) + usleep_range(u32Temp, u32Temp); +#else + /* This is delay not sleep !!!, has to be changed*/ + msleep(msc); +#endif + } else { + msleep(msc); + } +} + +static void linux_wlan_atomic_msleep(uint32_t msc) +{ + mdelay(msc); +} +static void linux_wlan_dbg(uint8_t *buff) +{ + PRINT_D(INIT_DBG, "%d\n", *buff); +} + +static void *linux_wlan_malloc_atomic(uint32_t sz) +{ + char *pntr = NULL; + pntr = (char *)kmalloc(sz, GFP_ATOMIC); + PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr); + return (void *)pntr; + +} +static void *linux_wlan_malloc(uint32_t sz) +{ + char *pntr = NULL; + pntr = (char *)kmalloc(sz, GFP_KERNEL); + PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr); + return (void *)pntr; +} + +void linux_wlan_free(void *vp) +{ + if (vp != NULL) { + PRINT_D(MEM_DBG, "Freeing %p\n", vp); + kfree(vp); + } +} + + +static void *internal_alloc(uint32_t size, uint32_t flag) +{ + char *pntr = NULL; + pntr = (char *)kmalloc(size, flag); + PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", size, pntr); + return (void *)pntr; +} + + +static void linux_wlan_init_lock(char *lockName, void *plock, int count) +{ + sema_init((struct semaphore *)plock, count); + PRINT_D(LOCK_DBG, "Initializing [%s][%p]\n", lockName, plock); + +} + +static void linux_wlan_deinit_lock(void *plock) +{ + /* mutex_destroy((struct mutex*)plock); */ +} + +static void linux_wlan_lock(void *vp) +{ + PRINT_D(LOCK_DBG, "Locking %p\n", vp); + if (vp != NULL) { + while (down_interruptible((struct semaphore *) vp)) + ; + } else { + PRINT_ER("Failed, mutex is NULL\n"); + } +} + +static int linux_wlan_lock_timeout(void *vp, WILC_Uint32 timeout) +{ + int error = -1; + PRINT_D(LOCK_DBG, "Locking %p\n", vp); + if (vp != NULL) { + error = down_timeout((struct semaphore *)vp, msecs_to_jiffies(timeout)); + } else { + PRINT_ER("Failed, mutex is NULL\n"); + } + return error; +} + +void linux_wlan_unlock(void *vp) +{ + PRINT_D(LOCK_DBG, "Unlocking %p\n", vp); + if (vp != NULL) { + up((struct semaphore *)vp); + } else { + PRINT_ER("Failed, mutex is NULL\n"); + } +} + + +static void linux_wlan_init_mutex(char *lockName, void *plock, int count) +{ + mutex_init((struct mutex *)plock); + PRINT_D(LOCK_DBG, "Initializing mutex [%s][%p]\n", lockName, plock); + +} + +static void linux_wlan_deinit_mutex(void *plock) +{ + mutex_destroy((struct mutex *)plock); +} + +static void linux_wlan_lock_mutex(void *vp) +{ + PRINT_D(LOCK_DBG, "Locking mutex %p\n", vp); + if (vp != NULL) { + /* + * if(mutex_is_locked((struct mutex*)vp)) + * { + * //PRINT_ER("Mutex already locked - %p \n",vp); + * } + */ + mutex_lock((struct mutex *)vp); + + } else { + PRINT_ER("Failed, mutex is NULL\n"); + } +} + +static void linux_wlan_unlock_mutex(void *vp) +{ + PRINT_D(LOCK_DBG, "Unlocking mutex %p\n", vp); + if (vp != NULL) { + + if (mutex_is_locked((struct mutex *)vp)) { + mutex_unlock((struct mutex *)vp); + } else { + /* PRINT_ER("Mutex already unlocked - %p\n",vp); */ + } + + } else { + PRINT_ER("Failed, mutex is NULL\n"); + } +} + + +/*Added by Amr - BugID_4720*/ +static void linux_wlan_init_spin_lock(char *lockName, void *plock, int count) +{ + spin_lock_init((spinlock_t *)plock); + PRINT_D(SPIN_DEBUG, "Initializing mutex [%s][%p]\n", lockName, plock); + +} + +static void linux_wlan_deinit_spin_lock(void *plock) +{ + +} +static void linux_wlan_spin_lock(void *vp, unsigned long *flags) +{ + unsigned long lflags; + PRINT_D(SPIN_DEBUG, "Lock spin %p\n", vp); + if (vp != NULL) { + spin_lock_irqsave((spinlock_t *)vp, lflags); + *flags = lflags; + } else { + PRINT_ER("Failed, spin lock is NULL\n"); + } +} +static void linux_wlan_spin_unlock(void *vp, unsigned long *flags) +{ + unsigned long lflags = *flags; + PRINT_D(SPIN_DEBUG, "Unlock spin %p\n", vp); + if (vp != NULL) { + spin_unlock_irqrestore((spinlock_t *)vp, lflags); + *flags = lflags; + } else { + PRINT_ER("Failed, spin lock is NULL\n"); + } +} + +static void linux_wlan_mac_indicate(int flag) +{ + /*I have to do it that way becuase there is no mean to encapsulate device pointer + * as a parameter + */ + linux_wlan_t *pd = g_linux_wlan; + int status; + + if (flag == WILC_MAC_INDICATE_STATUS) { + pd->oup.wlan_cfg_get_value(WID_STATUS, (unsigned char *)&status, 4); + if (pd->mac_status == WILC_MAC_STATUS_INIT) { + pd->mac_status = status; + linux_wlan_unlock(&pd->sync_event); + } else { + pd->mac_status = status; + } + + if (pd->mac_status == WILC_MAC_STATUS_CONNECT) { /* Connect */ +#if 0 + /** + * get the mac and bssid address + **/ + PRINT_D(RX_DBG, "Calling cfg_get to get MAC_ADDR\n"); + pd->oup.wlan_cfg_get(1, WID_MAC_ADDR, 0); + PRINT_D(RX_DBG, "Calling cfg_get to get BSSID\n"); + pd->oup.wlan_cfg_get(0, WID_BSSID, 1); + + /** + * get the value + **/ + pd->oup.wlan_cfg_get_value(WID_MAC_ADDR, pd->eth_src_address, 6); + pd->oup.wlan_cfg_get_value(WID_BSSID, pd->eth_dst_address, 6); + + PRINT_D(GENERIC_DBG, "Source Address = %s", pd->eth_src_address); + PRINT_D(GENERIC_DBG, "Destiation Address = %s", pd->eth_dst_address); + + /** + * launch ndis + **/ +#endif + } + + } else if (flag == WILC_MAC_INDICATE_SCAN) { + PRINT_D(GENERIC_DBG, "Scanning ...\n"); + + } + +} + +struct net_device *GetIfHandler(uint8_t *pMacHeader) +{ + uint8_t *Bssid, *Bssid1; + int i = 0; + + Bssid = pMacHeader + 10; + Bssid1 = pMacHeader + 4; + + for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) { + if (!memcmp(Bssid1, g_linux_wlan->strInterfaceInfo[i].aBSSID, ETH_ALEN) || + !memcmp(Bssid, g_linux_wlan->strInterfaceInfo[i].aBSSID, ETH_ALEN)) { + return g_linux_wlan->strInterfaceInfo[i].wilc_netdev; + } + } + PRINT_INFO(INIT_DBG, "Invalide handle\n"); + 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++) { + if (!memcmp(Bssid1, g_linux_wlan->strInterfaceInfo[i].aBSSID, ETH_ALEN) || + !memcmp(Bssid, g_linux_wlan->strInterfaceInfo[i].aBSSID, ETH_ALEN)) { + PRINT_D(INIT_DBG, "Ctx [%p]\n", g_linux_wlan->strInterfaceInfo[i].wilc_netdev); + return g_linux_wlan->strInterfaceInfo[i].wilc_netdev; + } + } + PRINT_INFO(INIT_DBG, "\n"); + return NULL; +} + +int linux_wlan_set_bssid(struct net_device *wilc_netdev, uint8_t *pBSSID) +{ + int i = 0; + int ret = -1; + + PRINT_D(INIT_DBG, "set bssid on[%p]\n", wilc_netdev); + for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) { + if (g_linux_wlan->strInterfaceInfo[i].wilc_netdev == wilc_netdev) { + PRINT_D(INIT_DBG, "set bssid [%x][%x][%x]\n", pBSSID[0], pBSSID[1], pBSSID[2]); + memcpy(g_linux_wlan->strInterfaceInfo[i].aBSSID, pBSSID, 6); + ret = 0; + break; + } + } + return ret; +} + +/*BugID_5213*/ +/*Function to get number of connected interfaces*/ +int linux_wlan_get_num_conn_ifcs(void) +{ + uint8_t i = 0; + uint8_t null_bssid[6] = {0}; + 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)) { + ret_val++; + } + } + return ret_val; +} + +static int linux_wlan_rxq_task(void *vp) +{ + + /* inform wilc1000_wlan_init that RXQ task is started. */ + linux_wlan_unlock(&g_linux_wlan->rxq_thread_started); + while (1) { + linux_wlan_lock(&g_linux_wlan->rxq_event); + /* wait_for_completion(&g_linux_wlan->rxq_event); */ + + if (g_linux_wlan->close) { + /*Unlock the mutex in the mac_close function to indicate the exiting of the RX thread */ + linux_wlan_unlock(&g_linux_wlan->rxq_thread_started); + + while (!kthread_should_stop()) + schedule(); + + PRINT_D(RX_DBG, " RX thread stopped\n"); + break; + } + PRINT_D(RX_DBG, "Calling wlan_handle_rx_que()\n"); + + g_linux_wlan->oup.wlan_handle_rx_que(); + } + return 0; +} + +#define USE_TX_BACKOFF_DELAY_IF_NO_BUFFERS + +static int linux_wlan_txq_task(void *vp) +{ + int ret, txq_count; + +#if defined USE_TX_BACKOFF_DELAY_IF_NO_BUFFERS +#define TX_BACKOFF_WEIGHT_INCR_STEP (1) +#define TX_BACKOFF_WEIGHT_DECR_STEP (1) +#define TX_BACKOFF_WEIGHT_MAX (7) +#define TX_BACKOFF_WEIGHT_MIN (0) +#define TX_BACKOFF_WEIGHT_UNIT_MS (10) + int backoff_weight = TX_BACKOFF_WEIGHT_MIN; + signed long timeout; +#endif + + /* inform wilc1000_wlan_init that TXQ task is started. */ + linux_wlan_unlock(&g_linux_wlan->txq_thread_started); + while (1) { + + PRINT_D(TX_DBG, "txq_task Taking a nap :)\n"); + linux_wlan_lock(&g_linux_wlan->txq_event); + /* wait_for_completion(&pd->txq_event); */ + PRINT_D(TX_DBG, "txq_task Who waked me up :$\n"); + + if (g_linux_wlan->close) { + /*Unlock the mutex in the mac_close function to indicate the exiting of the TX thread */ + linux_wlan_unlock(&g_linux_wlan->txq_thread_started); + + while (!kthread_should_stop()) + schedule(); + + PRINT_D(TX_DBG, "TX thread stopped\n"); + break; + } + PRINT_D(TX_DBG, "txq_task handle the sending packet and let me go to sleep.\n"); +#if !defined USE_TX_BACKOFF_DELAY_IF_NO_BUFFERS + g_linux_wlan->oup.wlan_handle_tx_que(); +#else + do { + ret = g_linux_wlan->oup.wlan_handle_tx_que(&txq_count); + if (txq_count < FLOW_CONTROL_LOWER_THRESHOLD /* && netif_queue_stopped(pd->wilc_netdev)*/) { + PRINT_D(TX_DBG, "Waking up queue\n"); + /* netif_wake_queue(pd->wilc_netdev); */ + if (netif_queue_stopped(g_linux_wlan->strInterfaceInfo[0].wilc_netdev)) + netif_wake_queue(g_linux_wlan->strInterfaceInfo[0].wilc_netdev); + if (netif_queue_stopped(g_linux_wlan->strInterfaceInfo[1].wilc_netdev)) + netif_wake_queue(g_linux_wlan->strInterfaceInfo[1].wilc_netdev); + } + + if (ret == WILC_TX_ERR_NO_BUF) { /* failed to allocate buffers in chip. */ + timeout = msecs_to_jiffies(TX_BACKOFF_WEIGHT_UNIT_MS << backoff_weight); + do { + /* Back off from sending packets for some time. */ + /* schedule_timeout will allow RX task to run and free buffers.*/ + /* set_current_state(TASK_UNINTERRUPTIBLE); */ + /* timeout = schedule_timeout(timeout); */ + 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) { + 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) { + backoff_weight = TX_BACKOFF_WEIGHT_MIN; + } + } + } + /*TODO: drop packets after a certain time/number of retry count. */ + } while (ret == WILC_TX_ERR_NO_BUF && !g_linux_wlan->close); /* retry sending packets if no more buffers in chip. */ +#endif + } + return 0; +} + +static void linux_wlan_rx_complete(void) +{ + PRINT_D(RX_DBG, "RX completed\n"); +} + +int linux_wlan_get_firmware(perInterface_wlan_t *p_nic) +{ + + perInterface_wlan_t *nic = p_nic; + int ret = 0; + const struct firmware *wilc_firmware; + char *firmware; + + + if (nic->iftype == AP_MODE) + firmware = AP_FIRMWARE; + else if (nic->iftype == STATION_MODE) + firmware = STA_FIRMWARE; + + /*BugID_5137*/ + else { + PRINT_D(INIT_DBG, "Get P2P_CONCURRENCY_FIRMWARE\n"); + firmware = P2P_CONCURRENCY_FIRMWARE; + } + + + + if (nic == NULL) { + PRINT_ER("NIC is NULL\n"); + goto _fail_; + } + + if (&nic->wilc_netdev->dev == NULL) { + PRINT_ER("&nic->wilc_netdev->dev is NULL\n"); + goto _fail_; + } + + + /* the firmare should be located in /lib/firmware in + * root file system with the name specified above */ + +#ifdef WILC_SDIO + if (request_firmware(&wilc_firmware, firmware, &g_linux_wlan->wilc_sdio_func->dev) != 0) { + PRINT_ER("%s - firmare not available\n", firmware); + ret = -1; + goto _fail_; + } +#else + if (request_firmware(&wilc_firmware, firmware, &g_linux_wlan->wilc_spidev->dev) != 0) { + PRINT_ER("%s - firmare not available\n", firmware); + ret = -1; + goto _fail_; + } +#endif + g_linux_wlan->wilc_firmware = wilc_firmware; /* Bug 4703 */ + +_fail_: + + return ret; + +} + +#ifdef COMPLEMENT_BOOT +int repeat_power_cycle(perInterface_wlan_t *nic); +#endif + +static int linux_wlan_start_firmware(perInterface_wlan_t *nic) +{ + + static int timeout = 5; + int ret = 0; + /* start firmware */ + PRINT_D(INIT_DBG, "Starting Firmware ...\n"); + ret = g_linux_wlan->oup.wlan_start(); + if (ret < 0) { + PRINT_ER("Failed to start Firmware\n"); + goto _fail_; + } + + /* wait for mac ready */ + PRINT_D(INIT_DBG, "Waiting for Firmware to get ready ...\n"); + ret = linux_wlan_lock_timeout(&g_linux_wlan->sync_event, 5000); + if (ret) { +#ifdef COMPLEMENT_BOOT + + if (timeout--) { + PRINT_D(INIT_DBG, "repeat power cycle[%d]", timeout); + ret = repeat_power_cycle(nic); + } else { + timeout = 5; + ret = -1; + goto _fail_; + } +#endif + PRINT_D(INIT_DBG, "Firmware start timed out"); + goto _fail_; + } + /* + * TODO: Driver shouoldn't wait forever for firmware to get started - + * in case of timeout this should be handled properly + */ + PRINT_D(INIT_DBG, "Firmware successfully started\n"); + +_fail_: + return ret; +} +static int linux_wlan_firmware_download(linux_wlan_t *p_nic) +{ + + int ret = 0; + + if (g_linux_wlan->wilc_firmware == NULL) { + PRINT_ER("Firmware buffer is NULL\n"); + ret = -ENOBUFS; + goto _FAIL_; + } + /** + * do the firmware download + **/ + 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) { + goto _FAIL_; + } + + /* Freeing FW buffer */ + PRINT_D(INIT_DBG, "Freeing FW buffer ...\n"); + PRINT_D(INIT_DBG, "Releasing firmware\n"); + release_firmware(g_linux_wlan->wilc_firmware); + g_linux_wlan->wilc_firmware = NULL; + + PRINT_D(INIT_DBG, "Download Succeeded \n"); + +_FAIL_: + return ret; +} + + +/* startup configuration - could be changed later using iconfig*/ +static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_nic) +{ + + unsigned char c_val[64]; + #ifndef STATIC_MACADDRESS + unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xff}; + #endif + unsigned int chipid = 0; + + /*BugID_5077*/ + struct WILC_WFI_priv *priv; + tstrWILC_WFIDrv *pstrWFIDrv; + + PRINT_D(TX_DBG, "Start configuring Firmware\n"); + #ifndef STATIC_MACADDRESS + get_random_bytes(&mac_add[5], 1); + get_random_bytes(&mac_add[4], 1); + #endif + priv = wiphy_priv(dev->ieee80211_ptr->wiphy); + pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv; + PRINT_D(INIT_DBG, "Host = %x\n", (WILC_Uint32)pstrWFIDrv); + + PRINT_D(INIT_DBG, "MAC address is : %02x-%02x-%02x-%02x-%02x-%02x\n", mac_add[0], mac_add[1], mac_add[2], mac_add[3], mac_add[4], mac_add[5]); + chipid = wilc_get_chipid(0); + + + if (g_linux_wlan->oup.wlan_cfg_set == NULL) { + PRINT_D(INIT_DBG, "Null p[ointer\n"); + goto _fail_; + } + + *(int *)c_val = (WILC_Uint32)pstrWFIDrv; + + if (!g_linux_wlan->oup.wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0)) + goto _fail_; + + /*to tell fw that we are going to use PC test - WILC specific*/ + c_val[0] = 0; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_PC_TEST_MODE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = INFRASTRUCTURE; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_BSS_TYPE, c_val, 1, 0, 0)) + goto _fail_; + + + /* c_val[0] = RATE_AUTO; / * bug 4275: Enable autorate and limit it to 24Mbps * / */ + c_val[0] = RATE_AUTO; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_CURRENT_TX_RATE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = G_MIXED_11B_2_MODE; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11G_OPERATING_MODE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 1; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_CURRENT_CHANNEL, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = G_SHORT_PREAMBLE; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_PREAMBLE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = AUTO_PROT; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_PROT_MECH, c_val, 1, 0, 0)) + goto _fail_; + +#ifdef SWITCH_LOG_TERMINAL + c_val[0] = AUTO_PROT; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_LOGTerminal_Switch, c_val, 1, 0, 0)) + goto _fail_; +#endif + + c_val[0] = ACTIVE_SCAN; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_SCAN_TYPE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = SITE_SURVEY_OFF; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_SITE_SURVEY, c_val, 1, 0, 0)) + goto _fail_; + + *((int *)c_val) = 0xffff; /* Never use RTS-CTS */ + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_RTS_THRESHOLD, c_val, 2, 0, 0)) + goto _fail_; + + *((int *)c_val) = 2346; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_FRAG_THRESHOLD, c_val, 2, 0, 0)) + goto _fail_; + + /* SSID */ + /* -------------------------------------------------------------- */ + /* Configuration : String with length less than 32 bytes */ + /* Values to set : Any string with length less than 32 bytes */ + /* ( In BSS Station Set SSID to "" (null string) */ + /* to enable Broadcast SSID suppport ) */ + /* -------------------------------------------------------------- */ +#ifndef USE_WIRELESS + strcpy(c_val, "nwifi"); + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_SSID, c_val, (strlen(c_val) + 1), 0, 0)) + goto _fail_; +#endif + + c_val[0] = 0; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_BCAST_SSID, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 1; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_QOS_ENABLE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = NO_POWERSAVE; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_POWER_MANAGEMENT, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = NO_ENCRYPT; /* NO_ENCRYPT, 0x79 */ + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11I_MODE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = OPEN_SYSTEM; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_AUTH_TYPE, c_val, 1, 0, 0)) + goto _fail_; + + /* WEP/802 11I Configuration */ + /* ------------------------------------------------------------------ */ + /* Configuration : WEP Key */ + /* Values (0x) : 5 byte for WEP40 and 13 bytes for WEP104 */ + /* In case more than 5 bytes are passed on for WEP 40 */ + /* only first 5 bytes will be used as the key */ + /* ------------------------------------------------------------------ */ + + strcpy(c_val, "123456790abcdef1234567890"); + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_WEP_KEY_VALUE, c_val, (strlen(c_val) + 1), 0, 0)) + goto _fail_; + + /* WEP/802 11I Configuration */ + /* ------------------------------------------------------------------ */ + /* Configuration : AES/TKIP WPA/RSNA Pre-Shared Key */ + /* Values to set : Any string with length greater than equal to 8 bytes */ + /* and less than 64 bytes */ + /* ------------------------------------------------------------------ */ + strcpy(c_val, "12345678"); + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11I_PSK, c_val, (strlen(c_val)), 0, 0)) + goto _fail_; + + /* IEEE802.1X Key Configuration */ + /* ------------------------------------------------------------------ */ + /* Configuration : Radius Server Access Secret Key */ + /* Values to set : Any string with length greater than equal to 8 bytes */ + /* and less than 65 bytes */ + /* ------------------------------------------------------------------ */ + strcpy(c_val, "password"); + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_1X_KEY, c_val, (strlen(c_val) + 1), 0, 0)) + goto _fail_; + + /* IEEE802.1X Server Address Configuration */ + /* ------------------------------------------------------------------ */ + /* Configuration : Radius Server IP Address */ + /* Values to set : Any valid IP Address */ + /* ------------------------------------------------------------------ */ + c_val[0] = 192; + c_val[1] = 168; + c_val[2] = 1; + c_val[3] = 112; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_1X_SERV_ADDR, c_val, 4, 0, 0)) + goto _fail_; + + c_val[0] = 3; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_LISTEN_INTERVAL, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 3; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_DTIM_PERIOD, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = NORMAL_ACK; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_ACK_POLICY, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 0; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_USER_CONTROL_ON_TX_POWER, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 48; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_TX_POWER_LEVEL_11A, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 28; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_TX_POWER_LEVEL_11B, c_val, 1, 0, 0)) + goto _fail_; + + /* Beacon Interval */ + /* -------------------------------------------------------------------- */ + /* Configuration : Sets the beacon interval value */ + /* Values to set : Any 16-bit value */ + /* -------------------------------------------------------------------- */ + + *((int *)c_val) = 100; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_BEACON_INTERVAL, c_val, 2, 0, 0)) + goto _fail_; + + c_val[0] = REKEY_DISABLE; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_REKEY_POLICY, c_val, 1, 0, 0)) + goto _fail_; + + /* Rekey Time (s) (Used only when the Rekey policy is 2 or 4) */ + /* -------------------------------------------------------------------- */ + /* Configuration : Sets the Rekey Time (s) */ + /* Values to set : 32-bit value */ + /* -------------------------------------------------------------------- */ + *((int *)c_val) = 84600; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_REKEY_PERIOD, c_val, 4, 0, 0)) + goto _fail_; + + /* Rekey Packet Count (in 1000s; used when Rekey Policy is 3) */ + /* -------------------------------------------------------------------- */ + /* Configuration : Sets Rekey Group Packet count */ + /* Values to set : 32-bit Value */ + /* -------------------------------------------------------------------- */ + *((int *)c_val) = 500; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_REKEY_PACKET_COUNT, c_val, 4, 0, 0)) + goto _fail_; + + c_val[0] = 1; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_SHORT_SLOT_ALLOWED, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = G_SELF_CTS_PROT; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_ERP_PROT_TYPE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 1; /* Enable N */ + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_ENABLE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = HT_MIXED_MODE; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_OPERATING_MODE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 1; /* TXOP Prot disable in N mode: No RTS-CTS on TX A-MPDUs to save air-time. */ + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_TXOP_PROT_DISABLE, c_val, 1, 0, 0)) + goto _fail_; + + memcpy(c_val, mac_add, 6); + + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_MAC_ADDR, c_val, 6, 0, 0)) + goto _fail_; + + /** + * AP only + **/ + c_val[0] = DETECT_PROTECT_REPORT; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_OBSS_NONHT_DETECTION, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = RTS_CTS_NONHT_PROT; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_HT_PROT_TYPE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 0; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_RIFS_PROT_ENABLE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = MIMO_MODE; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_SMPS_MODE, c_val, 1, 0, 0)) + goto _fail_; + + c_val[0] = 7; + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_CURRENT_TX_MCS, c_val, 1, 0, 0)) + 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, (WILC_Uint32)pstrWFIDrv)) + goto _fail_; + + return 0; + +_fail_: + return -1; +} + + +/**************************/ +void wilc1000_wlan_deinit(linux_wlan_t *nic) +{ + + if (g_linux_wlan->wilc1000_initialized) { + + printk("Deinitializing wilc1000 ...\n"); + + if (nic == NULL) { + PRINT_ER("nic is NULL\n"); + return; + } + +#if defined(PLAT_ALLWINNER_A20) || defined(PLAT_ALLWINNER_A23) || defined(PLAT_ALLWINNER_A31) + /* johnny : remove */ + PRINT_D(INIT_DBG, "skip wilc_bus_set_default_speed\n"); +#else + wilc_bus_set_default_speed(); +#endif + + PRINT_D(INIT_DBG, "Disabling IRQ\n"); + #if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO) + linux_wlan_disable_irq(IRQ_WAIT); + #else + #if defined(PLAT_ALLWINNER_A20) || defined(PLAT_ALLWINNER_A23) || defined(PLAT_ALLWINNER_A31) + + #else + linux_wlan_lock_mutex((void *)&g_linux_wlan->hif_cs); + disable_sdio_interrupt(); + linux_wlan_unlock_mutex((void *)&g_linux_wlan->hif_cs); + #endif + #endif + + + /* not sure if the following unlocks are needed or not*/ + if (&g_linux_wlan->rxq_event != NULL) { + linux_wlan_unlock(&g_linux_wlan->rxq_event); + } + + if (&g_linux_wlan->txq_event != NULL) { + linux_wlan_unlock(&g_linux_wlan->txq_event); + } + + + #if (RX_BH_TYPE == RX_BH_WORK_QUEUE) + /*Removing the work struct from the linux kernel workqueue*/ + if (&g_linux_wlan->rx_work_queue != NULL) + flush_work(&g_linux_wlan->rx_work_queue); + + #elif (RX_BH_TYPE == RX_BH_KTHREAD) + /* if(&nic->rx_sem != NULL) */ + /* linux_wlan_unlock(&nic->rx_sem); */ + #endif + + PRINT_D(INIT_DBG, "Deinitializing Threads\n"); + wlan_deinitialize_threads(nic); + + PRINT_D(INIT_DBG, "Deinitializing IRQ\n"); + deinit_irq(g_linux_wlan); + + + if (&g_linux_wlan->oup != NULL) { + if (g_linux_wlan->oup.wlan_stop != NULL) + g_linux_wlan->oup.wlan_stop(); + } + + PRINT_D(INIT_DBG, "Deinitializing WILC Wlan\n"); + wilc_wlan_deinit(nic); +#if (defined WILC_SDIO) && (!defined WILC_SDIO_IRQ_GPIO) + #if defined(PLAT_ALLWINNER_A20) || defined(PLAT_ALLWINNER_A23) || defined(PLAT_ALLWINNER_A31) + PRINT_D(INIT_DBG, "Disabling IRQ 2\n"); + + linux_wlan_lock_mutex((void *)&g_linux_wlan->hif_cs); + disable_sdio_interrupt(); + linux_wlan_unlock_mutex((void *)&g_linux_wlan->hif_cs); + #endif +#endif + + /*De-Initialize locks*/ + PRINT_D(INIT_DBG, "Deinitializing Locks\n"); + wlan_deinit_locks(g_linux_wlan); + + /* announce that wilc1000 is not initialized */ + g_linux_wlan->wilc1000_initialized = 0; + + PRINT_D(INIT_DBG, "wilc1000 deinitialization Done\n"); + + } else { + PRINT_D(INIT_DBG, "wilc1000 is not initialized\n"); + } + return; +} + +int wlan_init_locks(linux_wlan_t *p_nic) +{ + + PRINT_D(INIT_DBG, "Initializing Locks ...\n"); + + /*initialize mutexes*/ + linux_wlan_init_mutex("hif_lock/hif_cs", &g_linux_wlan->hif_cs, 1); + linux_wlan_init_mutex("rxq_lock/rxq_cs", &g_linux_wlan->rxq_cs, 1); + linux_wlan_init_mutex("txq_lock/txq_cs", &g_linux_wlan->txq_cs, 1); + + /*Added by Amr - BugID_4720*/ + linux_wlan_init_spin_lock("txq_spin_lock/txq_cs", &g_linux_wlan->txq_spinlock, 1); + + /*Added by Amr - BugID_4720*/ + linux_wlan_init_lock("txq_add_to_head_lock/txq_cs", &g_linux_wlan->txq_add_to_head_cs, 1); + + linux_wlan_init_lock("txq_wait/txq_event", &g_linux_wlan->txq_event, 0); + linux_wlan_init_lock("rxq_wait/rxq_event", &g_linux_wlan->rxq_event, 0); + + linux_wlan_init_lock("cfg_wait/cfg_event", &g_linux_wlan->cfg_event, 0); + linux_wlan_init_lock("sync_event", &g_linux_wlan->sync_event, 0); + + linux_wlan_init_lock("rxq_lock/rxq_started", &g_linux_wlan->rxq_thread_started, 0); + linux_wlan_init_lock("rxq_lock/txq_started", &g_linux_wlan->txq_thread_started, 0); + + #if (RX_BH_TYPE == RX_BH_KTHREAD) + linux_wlan_init_lock("BH_SEM", &g_linux_wlan->rx_sem, 0); + #endif + + return 0; +} + +static int wlan_deinit_locks(linux_wlan_t *nic) +{ + PRINT_D(INIT_DBG, "De-Initializing Locks\n"); + + if (&g_linux_wlan->hif_cs != NULL) + linux_wlan_deinit_mutex(&g_linux_wlan->hif_cs); + + if (&g_linux_wlan->rxq_cs != NULL) + linux_wlan_deinit_mutex(&g_linux_wlan->rxq_cs); + + if (&g_linux_wlan->txq_cs != NULL) + linux_wlan_deinit_mutex(&g_linux_wlan->txq_cs); + + /*Added by Amr - BugID_4720*/ + if (&g_linux_wlan->txq_spinlock != NULL) + linux_wlan_deinit_spin_lock(&g_linux_wlan->txq_spinlock); + + if (&g_linux_wlan->rxq_event != NULL) + linux_wlan_deinit_lock(&g_linux_wlan->rxq_event); + + if (&g_linux_wlan->txq_event != NULL) + linux_wlan_deinit_lock(&g_linux_wlan->txq_event); + + /*Added by Amr - BugID_4720*/ + if (&g_linux_wlan->txq_add_to_head_cs != NULL) + linux_wlan_deinit_lock(&g_linux_wlan->txq_add_to_head_cs); + + if (&g_linux_wlan->rxq_thread_started != NULL) + linux_wlan_deinit_lock(&g_linux_wlan->rxq_thread_started); + + if (&g_linux_wlan->txq_thread_started != NULL) + linux_wlan_deinit_lock(&g_linux_wlan->txq_thread_started); + + if (&g_linux_wlan->cfg_event != NULL) + linux_wlan_deinit_lock(&g_linux_wlan->cfg_event); + + if (&g_linux_wlan->sync_event != NULL) + linux_wlan_deinit_lock(&g_linux_wlan->sync_event); + + return 0; +} +void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) +{ + + PRINT_D(INIT_DBG, "Linux to Wlan services ...\n"); + + nwi->os_context.hif_critical_section = (void *)&g_linux_wlan->hif_cs; + nwi->os_context.os_private = (void *)nic; + nwi->os_context.tx_buffer_size = LINUX_TX_SIZE; + nwi->os_context.txq_critical_section = (void *)&g_linux_wlan->txq_cs; + + /*Added by Amr - BugID_4720*/ + nwi->os_context.txq_add_to_head_critical_section = (void *)&g_linux_wlan->txq_add_to_head_cs; + + /*Added by Amr - BugID_4720*/ + nwi->os_context.txq_spin_lock = (void *)&g_linux_wlan->txq_spinlock; + + nwi->os_context.txq_wait_event = (void *)&g_linux_wlan->txq_event; + +#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; + nwi->os_context.rxq_wait_event = (void *)&g_linux_wlan->rxq_event; + nwi->os_context.cfg_wait_event = (void *)&g_linux_wlan->cfg_event; + + nwi->os_func.os_sleep = linux_wlan_msleep; + nwi->os_func.os_atomic_sleep = linux_wlan_atomic_msleep; + nwi->os_func.os_debug = linux_wlan_dbg; + nwi->os_func.os_malloc = linux_wlan_malloc; + nwi->os_func.os_malloc_atomic = linux_wlan_malloc_atomic; + nwi->os_func.os_free = linux_wlan_free; + nwi->os_func.os_lock = linux_wlan_lock; + nwi->os_func.os_unlock = linux_wlan_unlock; + nwi->os_func.os_wait = linux_wlan_lock_timeout; + nwi->os_func.os_signal = linux_wlan_unlock; + nwi->os_func.os_enter_cs = linux_wlan_lock_mutex; + nwi->os_func.os_leave_cs = linux_wlan_unlock_mutex; + + /*Added by Amr - BugID_4720*/ + nwi->os_func.os_spin_lock = linux_wlan_spin_lock; + nwi->os_func.os_spin_unlock = linux_wlan_spin_unlock; + +#ifdef WILC_SDIO + nwi->io_func.io_type = HIF_SDIO; + nwi->io_func.io_init = linux_sdio_init; + nwi->io_func.io_deinit = linux_sdio_deinit; + nwi->io_func.u.sdio.sdio_cmd52 = linux_sdio_cmd52; + nwi->io_func.u.sdio.sdio_cmd53 = linux_sdio_cmd53; + nwi->io_func.u.sdio.sdio_set_max_speed = linux_sdio_set_max_speed; + nwi->io_func.u.sdio.sdio_set_default_speed = linux_sdio_set_default_speed; +#else + nwi->io_func.io_type = HIF_SPI; + nwi->io_func.io_init = linux_spi_init; + nwi->io_func.io_deinit = linux_spi_deinit; + nwi->io_func.u.spi.spi_tx = linux_spi_write; + nwi->io_func.u.spi.spi_rx = linux_spi_read; + nwi->io_func.u.spi.spi_trx = linux_spi_write_read; + nwi->io_func.u.spi.spi_max_speed = linux_spi_set_max_speed; +#endif + + /*for now - to be revised*/ + #ifdef WILC_FULLY_HOSTING_AP + /* incase of Fully hosted AP, all non cfg pkts are processed here*/ + nwi->net_func.rx_indicate = WILC_Process_rx_frame; + #else + nwi->net_func.rx_indicate = frmw_to_linux; + #endif + nwi->net_func.rx_complete = linux_wlan_rx_complete; + nwi->indicate_func.mac_indicate = linux_wlan_mac_indicate; +} + +int wlan_initialize_threads(perInterface_wlan_t *nic) +{ + + int ret = 0; + PRINT_D(INIT_DBG, "Initializing Threads ...\n"); + +#if (RX_BH_TYPE == RX_BH_WORK_QUEUE) + /*Initialize rx work queue task*/ + INIT_WORK(&g_linux_wlan->rx_work_queue, isr_bh_routine); +#elif (RX_BH_TYPE == RX_BH_KTHREAD) + PRINT_D(INIT_DBG, "Creating kthread for Rxq BH\n"); + g_linux_wlan->rx_bh_thread = kthread_run(isr_bh_routine, (void *)g_linux_wlan, "K_RXQ_BH"); + if (g_linux_wlan->rx_bh_thread == 0) { + PRINT_ER("couldn't create RX BH thread\n"); + ret = -ENOBUFS; + goto _fail_; + } +#endif + +#ifndef TCP_ENHANCEMENTS + /* create rx task */ + PRINT_D(INIT_DBG, "Creating kthread for reception\n"); + g_linux_wlan->rxq_thread = kthread_run(linux_wlan_rxq_task, (void *)g_linux_wlan, "K_RXQ_TASK"); + if (g_linux_wlan->rxq_thread == 0) { + PRINT_ER("couldn't create RXQ thread\n"); + ret = -ENOBUFS; + goto _fail_1; + } + + /* wait for RXQ task to start. */ + linux_wlan_lock(&g_linux_wlan->rxq_thread_started); + +#endif + + /* create tx task */ + PRINT_D(INIT_DBG, "Creating kthread for transmission\n"); + g_linux_wlan->txq_thread = kthread_run(linux_wlan_txq_task, (void *)g_linux_wlan, "K_TXQ_TASK"); + if (g_linux_wlan->txq_thread == 0) { + PRINT_ER("couldn't create TXQ thread\n"); + ret = -ENOBUFS; + goto _fail_2; + } +#ifdef DEBUG_MODE + PRINT_D(INIT_DBG, "Creating kthread for Debugging\n"); + g_linux_wlan->txq_thread = kthread_run(DebuggingThreadTask, (void *)g_linux_wlan, "DebugThread"); + if (g_linux_wlan->txq_thread == 0) { + PRINT_ER("couldn't create TXQ thread\n"); + ret = -ENOBUFS; + goto _fail_2; + } +#endif + /* wait for TXQ task to start. */ + linux_wlan_lock(&g_linux_wlan->txq_thread_started); + + return 0; + +_fail_2: + /*De-Initialize 2nd thread*/ + g_linux_wlan->close = 1; + linux_wlan_unlock(&g_linux_wlan->rxq_event); + kthread_stop(g_linux_wlan->rxq_thread); + +_fail_1: + #if (RX_BH_TYPE == RX_BH_KTHREAD) + /*De-Initialize 1st thread*/ + g_linux_wlan->close = 1; + linux_wlan_unlock(&g_linux_wlan->rx_sem); + kthread_stop(g_linux_wlan->rx_bh_thread); +_fail_: + #endif + g_linux_wlan->close = 0; + return ret; +} + +static void wlan_deinitialize_threads(linux_wlan_t *nic) +{ + + g_linux_wlan->close = 1; + PRINT_D(INIT_DBG, "Deinitializing Threads\n"); + if (&g_linux_wlan->rxq_event != NULL) + linux_wlan_unlock(&g_linux_wlan->rxq_event); + + + if (g_linux_wlan->rxq_thread != NULL) { + kthread_stop(g_linux_wlan->rxq_thread); + g_linux_wlan->rxq_thread = NULL; + } + + + if (&g_linux_wlan->txq_event != NULL) + linux_wlan_unlock(&g_linux_wlan->txq_event); + + + if (g_linux_wlan->txq_thread != NULL) { + kthread_stop(g_linux_wlan->txq_thread); + g_linux_wlan->txq_thread = NULL; + } + + #if (RX_BH_TYPE == RX_BH_KTHREAD) + if (&g_linux_wlan->rx_sem != NULL) + linux_wlan_unlock(&g_linux_wlan->rx_sem); + + if (g_linux_wlan->rx_bh_thread != NULL) { + kthread_stop(g_linux_wlan->rx_bh_thread); + g_linux_wlan->rx_bh_thread = NULL; + } + #endif +} + +#ifdef STATIC_MACADDRESS +const char *path_string[] = { + "/etc/wlan", + "/data/wlan", +}; + +static int linux_wlan_read_mac_addr(void *vp) +{ + int ret = 0; + struct file *fp = (struct file *)-ENOENT; + mm_segment_t old_fs; + loff_t pos = 0; + int index; + int array_size = sizeof(path_string) / sizeof(path_string[0]); + + /* change to KERNEL_DS address limit */ + old_fs = get_fs(); + set_fs(KERNEL_DS); + + for (index = 0; index < array_size; index++) { + fp = filp_open(path_string[index], O_WRONLY, 0640); + if (!fp) { + ret = -1; + goto exit; + } + + /*No such file or directory */ + if (IS_ERR(fp) || !fp->f_op) { + get_random_bytes(&mac_add[3], 3); + /* open file to write */ + fp = filp_open(path_string[index], O_WRONLY | O_CREAT, 0640); + + if (!fp || IS_ERR(fp)) { + ret = -1; + continue; + } else { + /* write buf to file */ + fp->f_op->write(fp, mac_add, 6, &pos); + break; + } + } else { + /* read file to buf */ + fp->f_op->read(fp, mac_add, 6, &pos); + break; + } + } + + if (index == array_size) { + PRINT_ER("random MAC\n"); + } + +exit: + if (fp && !IS_ERR(fp)) { + filp_close(fp, NULL); + } + + set_fs(old_fs); + + return ret; +} +#endif + +#ifdef COMPLEMENT_BOOT + +extern volatile int probe; +extern uint8_t core_11b_ready(void); + +#define READY_CHECK_THRESHOLD 30 +extern void wilc_wlan_global_reset(void); +uint8_t wilc1000_prepare_11b_core(wilc_wlan_inp_t *nwi, wilc_wlan_oup_t *nwo, linux_wlan_t *nic) +{ + uint8_t trials = 0; + while ((core_11b_ready() && (READY_CHECK_THRESHOLD > (trials++)))) { + PRINT_D(INIT_DBG, "11b core not ready yet: %u\n", trials); + wilc_wlan_deinit(nic); + wilc_wlan_global_reset(); + sdio_unregister_driver(&wilc_bus); + + linux_wlan_device_detection(0); + + mdelay(100); + + linux_wlan_device_detection(1); + + sdio_register_driver(&wilc_bus); + + while (!probe) { + msleep(100); + } + probe = 0; + g_linux_wlan->wilc_sdio_func = local_sdio_func; + linux_to_wlan(nwi, nic); + wilc_wlan_init(nwi, nwo); + } + + if (READY_CHECK_THRESHOLD <= trials) + return 1; + else + return 0; + +} + +int repeat_power_cycle(perInterface_wlan_t *nic) +{ + int ret = 0; + wilc_wlan_inp_t nwi; + wilc_wlan_oup_t nwo; + sdio_unregister_driver(&wilc_bus); + + linux_wlan_device_detection(0); + linux_wlan_device_power(0); + msleep(100); + linux_wlan_device_power(1); + msleep(80); + linux_wlan_device_detection(1); + msleep(20); + + sdio_register_driver(&wilc_bus); + + /* msleep(1000); */ + while (!probe) { + msleep(100); + } + probe = 0; + g_linux_wlan->wilc_sdio_func = local_sdio_func; + linux_to_wlan(&nwi, g_linux_wlan); + ret = wilc_wlan_init(&nwi, &nwo); + + g_linux_wlan->mac_status = WILC_MAC_STATUS_INIT; + #if (defined WILC_SDIO) && (!defined WILC_SDIO_IRQ_GPIO) + enable_sdio_interrupt(); + #endif + + if (linux_wlan_get_firmware(nic)) { + PRINT_ER("Can't get firmware \n"); + ret = -1; + goto __fail__; + } + + /*Download firmware*/ + ret = linux_wlan_firmware_download(g_linux_wlan); + if (ret < 0) { + PRINT_ER("Failed to download firmware\n"); + goto __fail__; + } + /* Start firmware*/ + ret = linux_wlan_start_firmware(nic); + if (ret < 0) { + PRINT_ER("Failed to start firmware\n"); + } +__fail__: + return ret; +} +#endif + +int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic) +{ + wilc_wlan_inp_t nwi; + wilc_wlan_oup_t nwo; + perInterface_wlan_t *nic = p_nic; + int ret = 0; + + if (!g_linux_wlan->wilc1000_initialized) { + g_linux_wlan->mac_status = WILC_MAC_STATUS_INIT; + g_linux_wlan->close = 0; + g_linux_wlan->wilc1000_initialized = 0; + + wlan_init_locks(g_linux_wlan); + +#ifdef STATIC_MACADDRESS + wilc_mac_thread = kthread_run(linux_wlan_read_mac_addr, NULL, "wilc_mac_thread"); + if (wilc_mac_thread < 0) { + PRINT_ER("couldn't create Mac addr thread\n"); + } +#endif + + linux_to_wlan(&nwi, g_linux_wlan); + + ret = wilc_wlan_init(&nwi, &nwo); + if (ret < 0) { + PRINT_ER("Initializing WILC_Wlan FAILED\n"); + ret = -EIO; + goto _fail_locks_; + } + memcpy(&g_linux_wlan->oup, &nwo, sizeof(wilc_wlan_oup_t)); + + /*Save the oup structre into global pointer*/ + gpstrWlanOps = &g_linux_wlan->oup; + + + ret = wlan_initialize_threads(nic); + if (ret < 0) { + PRINT_ER("Initializing Threads FAILED\n"); + ret = -EIO; + goto _fail_wilc_wlan_; + } + +#if (defined WILC_SDIO) && (defined COMPLEMENT_BOOT) + if (wilc1000_prepare_11b_core(&nwi, &nwo, g_linux_wlan)) { + PRINT_ER("11b Core is not ready\n"); + ret = -EIO; + goto _fail_threads_; + } +#endif + +#if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO) + if (init_irq(g_linux_wlan)) { + PRINT_ER("couldn't initialize IRQ\n"); + ret = -EIO; + goto _fail_threads_; + } +#endif + +#if (defined WILC_SDIO) && (!defined WILC_SDIO_IRQ_GPIO) + if (enable_sdio_interrupt()) { + PRINT_ER("couldn't initialize IRQ\n"); + ret = -EIO; + goto _fail_irq_init_; + } +#endif + + if (linux_wlan_get_firmware(nic)) { + PRINT_ER("Can't get firmware \n"); + ret = -EIO; + goto _fail_irq_enable_; + } + + + /*Download firmware*/ + ret = linux_wlan_firmware_download(g_linux_wlan); + if (ret < 0) { + PRINT_ER("Failed to download firmware\n"); + ret = -EIO; + goto _fail_irq_enable_; + } + + /* Start firmware*/ + ret = linux_wlan_start_firmware(nic); + if (ret < 0) { + PRINT_ER("Failed to start firmware\n"); + ret = -EIO; + goto _fail_irq_enable_; + } + + wilc_bus_set_max_speed(); + + if (g_linux_wlan->oup.wlan_cfg_get(1, WID_FIRMWARE_VERSION, 1, 0)) { + int size; + char Firmware_ver[20]; + size = g_linux_wlan->oup.wlan_cfg_get_value( + WID_FIRMWARE_VERSION, + Firmware_ver, sizeof(Firmware_ver)); + Firmware_ver[size] = '\0'; + PRINT_D(INIT_DBG, "***** Firmware Ver = %s *******\n", Firmware_ver); + } + /* Initialize firmware with default configuration */ + ret = linux_wlan_init_test_config(dev, g_linux_wlan); + + if (ret < 0) { + PRINT_ER("Failed to configure firmware\n"); + ret = -EIO; + goto _fail_fw_start_; + } + + g_linux_wlan->wilc1000_initialized = 1; + return 0; /*success*/ + + +_fail_fw_start_: + if (&g_linux_wlan->oup != NULL) { + if (g_linux_wlan->oup.wlan_stop != NULL) + g_linux_wlan->oup.wlan_stop(); + } + +_fail_irq_enable_: +#if (defined WILC_SDIO) && (!defined WILC_SDIO_IRQ_GPIO) + disable_sdio_interrupt(); +#endif +_fail_irq_init_: +#if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO) + deinit_irq(g_linux_wlan); + +#endif +_fail_threads_: + wlan_deinitialize_threads(g_linux_wlan); +_fail_wilc_wlan_: + wilc_wlan_deinit(g_linux_wlan); +_fail_locks_: + wlan_deinit_locks(g_linux_wlan); + PRINT_ER("WLAN Iinitialization FAILED\n"); + } else { + PRINT_D(INIT_DBG, "wilc1000 already initialized\n"); + } + return ret; +} + + +/* + * - this function will be called automatically by OS when module inserted. + */ + +#if !defined (NM73131_0_BOARD) +int mac_init_fn(struct net_device *ndev) +{ + + /*Why we do this !!!*/ + netif_start_queue(ndev); /* ma */ + netif_stop_queue(ndev); /* ma */ + + return 0; +} +#else +int mac_init_fn(struct net_device *ndev) +{ + + unsigned char mac_add[] = {0x00, 0x50, 0xc2, 0x5e, 0x10, 0x00}; + /* TODO: get MAC address whenever the source is EPROM - hardcoded and copy it to ndev*/ + memcpy(ndev->dev_addr, mac_add, 6); + + if (!is_valid_ether_addr(ndev->dev_addr)) { + PRINT_ER("Error: Wrong MAC address\n"); + return -EINVAL; + } + + return 0; +} +#endif + + +void WILC_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) +int mac_open(struct net_device *ndev) +{ + perInterface_wlan_t *nic; + + /*BugID_5213*/ + /*No need for setting mac address here anymore,*/ + /*Just set it in init_test_config()*/ + unsigned char mac_add[ETH_ALEN] = {0}; + int status; + int ret = 0; + int i = 0; + struct WILC_WFI_priv *priv; + + nic = netdev_priv(ndev); + priv = wiphy_priv(nic->wilc_netdev->ieee80211_ptr->wiphy); + PRINT_D(INIT_DBG, "MAC OPEN[%p]\n", ndev); + + #ifdef USE_WIRELESS + ret = WILC_WFI_InitHostInt(ndev); + if (ret < 0) { + PRINT_ER("Failed to initialize host interface\n"); + + return ret; + } + #endif + + /*initialize platform*/ + PRINT_D(INIT_DBG, "*** re-init ***\n"); + ret = wilc1000_wlan_init(ndev, nic); + if (ret < 0) { + PRINT_ER("Failed to initialize wilc1000\n"); + WILC_WFI_DeInitHostInt(ndev); + return ret; + } + + Set_machw_change_vir_if(WILC_FALSE); + + status = host_int_get_MacAddress(priv->hWILCWFIDrv, mac_add); + PRINT_D(INIT_DBG, "Mac address: %x:%x:%x:%x:%x:%x\n", mac_add[0], mac_add[1], mac_add[2], + mac_add[3], mac_add[4], mac_add[5]); + + /* loop through the NUM of supported devices and set the MAC address */ + 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 = (WILC_Uint32)priv->hWILCWFIDrv; + break; + } + } + + /* TODO: get MAC address whenever the source is EPROM - hardcoded and copy it to ndev*/ + memcpy(ndev->dev_addr, g_linux_wlan->strInterfaceInfo[i].aSrcAddress, ETH_ALEN); + + if (!is_valid_ether_addr(ndev->dev_addr)) { + PRINT_ER("Error: Wrong MAC address\n"); + ret = -EINVAL; + goto _err_; + } + + + WILC_WFI_frame_register(nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev, + nic->g_struct_frame_reg[0].frame_type, nic->g_struct_frame_reg[0].reg); + WILC_WFI_frame_register(nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev, + nic->g_struct_frame_reg[1].frame_type, nic->g_struct_frame_reg[1].reg); + netif_wake_queue(ndev); + g_linux_wlan->open_ifcs++; + nic->mac_opened = 1; + return 0; + +_err_: + WILC_WFI_DeInitHostInt(ndev); + wilc1000_wlan_deinit(g_linux_wlan); + return ret; +} +#else +int mac_open(struct net_device *ndev) +{ + + linux_wlan_t *nic; + nic = netdev_priv(ndev); + + /*initialize platform*/ + if (wilc1000_wlan_init(nic)) { + PRINT_ER("Failed to initialize platform\n"); + return 1; + } + /* Start the network interface queue for this device */ + PRINT_D(INIT_DBG, "Starting netifQ\n"); + netif_start_queue(ndev); +/* linux_wlan_lock(&close_exit_sync); */ + return 0; +} +#endif + +struct net_device_stats *mac_stats(struct net_device *dev) +{ + perInterface_wlan_t *nic = netdev_priv(dev); + + + return &nic->netstats; +} + +/* Setup the multicast filter */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) +static void wilc_set_multicast_list(struct net_device *dev) +{ + + struct netdev_hw_addr *ha; + struct WILC_WFI_priv *priv; + tstrWILC_WFIDrv *pstrWFIDrv; + int i = 0; + priv = wiphy_priv(dev->ieee80211_ptr->wiphy); + pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv; + + + if (!dev) + return; + + PRINT_D(INIT_DBG, "Setting Multicast List with count = %d. \n", dev->mc.count); + + if (dev->flags & IFF_PROMISC) { + /* Normally, we should configure the chip to retrive all packets + * but we don't wanna support this right now */ + /* TODO: add promiscuous mode support */ + PRINT_D(INIT_DBG, "Set promiscuous mode ON, retrive all packets \n"); + return; + } + + /* If there's more addresses than we handle, get all multicast + * packets and sort them out in software. */ + if ((dev->flags & IFF_ALLMULTI) || (dev->mc.count) > WILC_MULTICAST_TABLE_SIZE) { + PRINT_D(INIT_DBG, "Disable multicast filter, retrive all multicast packets\n"); + /* get all multicast packets */ + host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, WILC_FALSE, 0); + return; + } + + /* No multicast? Just get our own stuff */ + if ((dev->mc.count) == 0) { + PRINT_D(INIT_DBG, "Enable multicast filter, retrive directed packets only.\n"); + host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, WILC_TRUE, 0); + return; + } + + /* Store all of the multicast addresses in the hardware filter */ + netdev_for_each_mc_addr(ha, dev) + { + WILC_memcpy(gau8MulticastMacAddrList[i], ha->addr, ETH_ALEN); + PRINT_D(INIT_DBG, "Entry[%d]: %x:%x:%x:%x:%x:%x\n", i, + gau8MulticastMacAddrList[i][0], gau8MulticastMacAddrList[i][1], gau8MulticastMacAddrList[i][2], gau8MulticastMacAddrList[i][3], gau8MulticastMacAddrList[i][4], gau8MulticastMacAddrList[i][5]); + i++; + } + + host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, WILC_TRUE, (dev->mc.count)); + + return; + +} + +#else + +static void wilc_set_multicast_list(struct net_device *dev) +{ + /* BIG Warning, Beware : Uncompiled, untested... */ + struct dev_mc_list *mc_ptr; + int i = 0; + + if (!dev) + return; + + PRINT_D(INIT_DBG, "Setting Multicast List. \n"); + PRINT_D(INIT_DBG, "dev->mc_count = %d\n", dev->mc_count); + + if (dev->flags & IFF_PROMISC) { + /* Normally, we should configure the chip to retrive all packets + * but we don't wanna support this right now */ + /* TODO: add promiscuous mode support */ + PRINT_D(INIT_DBG, "Set promiscuous mode ON, retrive all packets \n"); + return; + } + + /* If there's more addresses than we handle, get all multicast + * packets and sort them out in software. */ + if ((dev->flags & IFF_ALLMULTI) || (dev->mc_count > WILC_MULTICAST_TABLE_SIZE)) { + PRINT_D(INIT_DBG, "Disable multicast filter, retrive all multicast packets\n"); + host_int_setup_multicast_filter((WILC_WFIDrvHandle)gWFiDrvHandle, WILC_FALSE, 0); + return; + } + + /* No multicast? Just get our own stuff */ + if (dev->mc_count == 0) { + PRINT_D(INIT_DBG, "Enable multicast filter, retrive directed packets only.\n"); + host_int_setup_multicast_filter((WILC_WFIDrvHandle)gWFiDrvHandle, WILC_TRUE, 0); + return; + } + + /* Store all of the multicast addresses in the hardware filter */ + + for (mc_ptr = dev->mc_list; mc_ptr; mc_ptr = mc_ptr->next, i++) { + WILC_memcpy(gau8MulticastMacAddrList[i], mc_ptr->dmi_addr, ETH_ALEN) + i++; + } + + host_int_setup_multicast_filter((WILC_WFIDrvHandle)gWFiDrvHandle, WILC_TRUE, (dev->mc_count)); + +} +#endif + +static void linux_wlan_tx_complete(void *priv, int status) +{ + + struct tx_complete_data *pv_data = (struct tx_complete_data *)priv; + if (status == 1) { + PRINT_D(TX_DBG, "Packet sent successfully - Size = %d - Address = %p - SKB = %p\n", pv_data->size, pv_data->buff, pv_data->skb); + } else { + PRINT_D(TX_DBG, "Couldn't send packet - Size = %d - Address = %p - SKB = %p\n", pv_data->size, pv_data->buff, pv_data->skb); + } + /* Free the SK Buffer, its work is done */ + dev_kfree_skb(pv_data->skb); + linux_wlan_free(pv_data); +} + +int mac_xmit(struct sk_buff *skb, struct net_device *ndev) +{ + perInterface_wlan_t *nic; + struct tx_complete_data *tx_data = NULL; + int QueueCount; + char *pu8UdpBuffer; + struct iphdr *ih; + struct ethhdr *eth_h; + nic = netdev_priv(ndev); + + PRINT_D(INT_DBG, "\n========\n IntUH: %d - IntBH: %d - IntCld: %d \n========\n", int_rcvdU, int_rcvdB, int_clrd); + PRINT_D(TX_DBG, "Sending packet just received from TCP/IP\n"); + + /* Stop the network interface queue */ + if (skb->dev != ndev) { + PRINT_ER("Packet not destined to this device\n"); + return 0; + } + + tx_data = (struct tx_complete_data *)internal_alloc(sizeof(struct tx_complete_data), GFP_ATOMIC); + if (tx_data == NULL) { + PRINT_ER("Failed to allocate memory for tx_data structure\n"); + dev_kfree_skb(skb); + netif_wake_queue(ndev); + return 0; + } + + tx_data->buff = skb->data; + tx_data->size = skb->len; + tx_data->skb = skb; + + eth_h = (struct ethhdr *)(skb->data); + if (eth_h->h_proto == 0x8e88) { + PRINT_D(INIT_DBG, "EAPOL transmitted\n"); + } + + /*get source and dest ip addresses*/ + ih = (struct iphdr *)(skb->data + sizeof(struct ethhdr)); + + pu8UdpBuffer = (char *)ih + sizeof(struct iphdr); + if ((pu8UdpBuffer[1] == 68 && pu8UdpBuffer[3] == 67) || (pu8UdpBuffer[1] == 67 && pu8UdpBuffer[3] == 68)) { + PRINT_D(GENERIC_DBG, "DHCP Message transmitted, type:%x %x %x\n", pu8UdpBuffer[248], pu8UdpBuffer[249], pu8UdpBuffer[250]); + + } + PRINT_D(TX_DBG, "Sending packet - Size = %d - Address = %p - SKB = %p\n", tx_data->size, tx_data->buff, tx_data->skb); + + /* Send packet to MAC HW - for now the tx_complete function will be just status + * indicator. still not sure if I need to suspend host transmission till the tx_complete + * function called or not? + * allocated buffer will be freed in tx_complete function. + */ + PRINT_D(TX_DBG, "Adding tx packet to TX Queue\n"); + nic->netstats.tx_packets++; + nic->netstats.tx_bytes += tx_data->size; + tx_data->pBssid = g_linux_wlan->strInterfaceInfo[nic->u8IfIdx].aBSSID; + #ifndef WILC_FULLY_HOSTING_AP + QueueCount = g_linux_wlan->oup.wlan_add_to_tx_que((void *)tx_data, + tx_data->buff, + tx_data->size, + linux_wlan_tx_complete); + #else + QueueCount = WILC_Xmit_data((void *)tx_data, HOST_TO_WLAN); + #endif /* WILC_FULLY_HOSTING_AP */ + + + if (QueueCount > FLOW_CONTROL_UPPER_THRESHOLD) { + netif_stop_queue(g_linux_wlan->strInterfaceInfo[0].wilc_netdev); + netif_stop_queue(g_linux_wlan->strInterfaceInfo[1].wilc_netdev); + } + + return 0; +} + + +int mac_close(struct net_device *ndev) +{ + struct WILC_WFI_priv *priv; + perInterface_wlan_t *nic; + tstrWILC_WFIDrv *pstrWFIDrv; + + nic = netdev_priv(ndev); + + if ((nic == NULL) || (nic->wilc_netdev == NULL) || (nic->wilc_netdev->ieee80211_ptr == NULL) || (nic->wilc_netdev->ieee80211_ptr->wiphy == NULL)) { + PRINT_ER("nic = NULL\n"); + return 0; + } + + priv = wiphy_priv(nic->wilc_netdev->ieee80211_ptr->wiphy); + + if (priv == NULL) { + PRINT_ER("priv = NULL\n"); + return 0; + } + + pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv; + + + + PRINT_D(GENERIC_DBG, "Mac close\n"); + + if (g_linux_wlan == NULL) { + PRINT_ER("g_linux_wlan = NULL\n"); + return 0; + } + + if (pstrWFIDrv == NULL) { + PRINT_ER("pstrWFIDrv = NULL\n"); + return 0; + } + + if ((g_linux_wlan->open_ifcs) > 0) { + g_linux_wlan->open_ifcs--; + } else { + PRINT_ER("ERROR: MAC close called while number of opened interfaces is zero\n"); + return 0; + } + + if (nic->wilc_netdev != NULL) { + /* Stop the network interface queue */ + netif_stop_queue(nic->wilc_netdev); + + #ifdef USE_WIRELESS + WILC_WFI_DeInitHostInt(nic->wilc_netdev); + #endif + } + + if (g_linux_wlan->open_ifcs == 0) { + PRINT_D(GENERIC_DBG, "Deinitializing wilc1000\n"); + g_linux_wlan->close = 1; + wilc1000_wlan_deinit(g_linux_wlan); + #ifdef USE_WIRELESS + #ifdef WILC_AP_EXTERNAL_MLME + WILC_WFI_deinit_mon_interface(); + #endif + #endif + } + + linux_wlan_unlock(&close_exit_sync); + nic->mac_opened = 0; + + return 0; +} + + +int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) +{ + + WILC_Uint8 *buff = NULL; + WILC_Sint8 rssi; + WILC_Uint32 size = 0, length = 0; + perInterface_wlan_t *nic; + struct WILC_WFI_priv *priv; + WILC_Sint32 s32Error = WILC_SUCCESS; + + + + /* struct iwreq *wrq = (struct iwreq *) req; // tony moved to case SIOCSIWPRIV */ + #ifdef USE_WIRELESS + nic = netdev_priv(ndev); + + if (!g_linux_wlan->wilc1000_initialized) + return 0; + + #endif + + switch (cmd) { + /* [[ added by tony for SIOCDEVPRIVATE */ + case SIOCDEVPRIVATE + 1: + { + android_wifi_priv_cmd priv_cmd; + + PRINT_INFO(GENERIC_DBG, "in SIOCDEVPRIVATE+1\n"); + + if (copy_from_user(&priv_cmd, req->ifr_data, sizeof(android_wifi_priv_cmd))) { + s32Error = -EFAULT; + goto done; + } + + buff = kmalloc(priv_cmd.total_len, GFP_KERNEL); + if (!buff) { + s32Error = -ENOMEM; + goto done; + } + + if (copy_from_user(buff, priv_cmd.buf, priv_cmd.total_len)) { + s32Error = -EFAULT; + goto done; + } + + PRINT_INFO(GENERIC_DBG, "%s: Android private cmd \"%s\" on %s\n", __FUNCTION__, buff, req->ifr_name); + + if (strncasecmp(buff, "SCAN-ACTIVE", strlen("SCAN-ACTIVE")) == 0) { + PRINT_INFO(GENERIC_DBG, "%s, SCAN-ACTIVE command\n", __FUNCTION__); + } else if (strncasecmp(buff, "SCAN-PASSIVE", strlen("SCAN-PASSIVE")) == 0) { + PRINT_INFO(GENERIC_DBG, "%s, SCAN-PASSIVE command\n", __FUNCTION__); + } else if (strncasecmp(buff, "RXFILTER-START", strlen("RXFILTER-START")) == 0) { + PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-START command\n", __FUNCTION__); + } else if (strncasecmp(buff, "RXFILTER-STOP", strlen("RXFILTER-STOP")) == 0) { + PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-STOP command\n", __FUNCTION__); + } else if (strncasecmp(buff, "RXFILTER-ADD", strlen("RXFILTER-ADD")) == 0) { + int filter_num = *(buff + strlen("RXFILTER-ADD") + 1) - '0'; + PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-ADD command, filter_num=%d\n", __FUNCTION__, filter_num); + } else if (strncasecmp(buff, "RXFILTER-REMOVE", strlen("RXFILTER-REMOVE")) == 0) { + int filter_num = *(buff + strlen("RXFILTER-REMOVE") + 1) - '0'; + PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-REMOVE command, filter_num=%d\n", __FUNCTION__, filter_num); + } else if (strncasecmp(buff, "BTCOEXSCAN-START", strlen("BTCOEXSCAN-START")) == 0) { + PRINT_INFO(GENERIC_DBG, "%s, BTCOEXSCAN-START command\n", __FUNCTION__); + } else if (strncasecmp(buff, "BTCOEXSCAN-STOP", strlen("BTCOEXSCAN-STOP")) == 0) { + PRINT_INFO(GENERIC_DBG, "%s, BTCOEXSCAN-STOP command\n", __FUNCTION__); + } else if (strncasecmp(buff, "BTCOEXMODE", strlen("BTCOEXMODE")) == 0) { + PRINT_INFO(GENERIC_DBG, "%s, BTCOEXMODE command\n", __FUNCTION__); + } else if (strncasecmp(buff, "SETBAND", strlen("SETBAND")) == 0) { + uint band = *(buff + strlen("SETBAND") + 1) - '0'; + PRINT_INFO(GENERIC_DBG, "%s, SETBAND command, band=%d\n", __FUNCTION__, band); + } else if (strncasecmp(buff, "GETBAND", strlen("GETBAND")) == 0) { + PRINT_INFO(GENERIC_DBG, "%s, GETBAND command\n", __FUNCTION__); + } else if (strncasecmp(buff, "COUNTRY", strlen("COUNTRY")) == 0) { + char *country_code = buff + strlen("COUNTRY") + 1; + PRINT_INFO(GENERIC_DBG, "%s, COUNTRY command, country_code=%s\n", __FUNCTION__, country_code); + } else { + PRINT_INFO(GENERIC_DBG, "%s, Unknown command\n", __FUNCTION__); + } + } break; + + /* ]] 2013-06-24 */ + case SIOCSIWPRIV: + { + struct iwreq *wrq = (struct iwreq *) req; /* added by tony */ + + size = wrq->u.data.length; + + if (size && wrq->u.data.pointer) { + buff = kmalloc(size, GFP_KERNEL); + if (!buff) { + s32Error = -ENOMEM; + goto done; + } + + if (copy_from_user + (buff, wrq->u.data.pointer, + wrq->u.data.length)) { + s32Error = -EFAULT; + goto done; + } + + if (strncasecmp(buff, "RSSI", length) == 0) { + + #ifdef USE_WIRELESS + priv = wiphy_priv(nic->wilc_netdev->ieee80211_ptr->wiphy); + s32Error = host_int_get_rssi(priv->hWILCWFIDrv, &(rssi)); + if (s32Error) + PRINT_ER("Failed to send get rssi param's message queue "); + #endif + PRINT_INFO(GENERIC_DBG, "RSSI :%d\n", rssi); + + /*Rounding up the rssi negative value*/ + rssi += 5; + + snprintf(buff, size, "rssi %d", rssi); + + if (copy_to_user(wrq->u.data.pointer, buff, size)) { + PRINT_ER("%s: failed to copy data to user buffer\n", __FUNCTION__); + s32Error = -EFAULT; + goto done; + } + } + } + } + break; + + default: + { + PRINT_INFO(GENERIC_DBG, "Command - %d - has been received\n", cmd); + s32Error = -EOPNOTSUPP; + goto done; + } + } + +done: + + if (buff != NULL) { + kfree(buff); + } + + return s32Error; +} + +void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset) +{ + + unsigned int frame_len = 0; + int stats; + unsigned char *buff_to_send = NULL; + struct sk_buff *skb; + char *pu8UdpBuffer; + struct iphdr *ih; + struct net_device *wilc_netdev; + perInterface_wlan_t *nic; + + wilc_netdev = GetIfHandler(buff); + if (wilc_netdev == NULL) + return; + + buff += pkt_offset; + nic = netdev_priv(wilc_netdev); + + if (size > 0) { + + frame_len = size; + buff_to_send = buff; + + + /* Need to send the packet up to the host, allocate a skb buffer */ + skb = dev_alloc_skb(frame_len); + if (skb == NULL) { + PRINT_ER("Low memory - packet droped\n"); + return; + } + + skb_reserve(skb, (unsigned int)skb->data & 0x3); + + if (g_linux_wlan == NULL || wilc_netdev == NULL) { + PRINT_ER("wilc_netdev in g_linux_wlan is NULL"); + } + skb->dev = wilc_netdev; + + if (skb->dev == NULL) { + PRINT_ER("skb->dev is NULL\n"); + } + + /* + * for(i=0;i<40;i++) + * { + * if(imonitor_flag) + * { + * WILC_WFI_monitor_rx(nic->wilc_netdev,skb); + * return; + * }*/ +#endif + skb->protocol = eth_type_trans(skb, wilc_netdev); + #ifndef TCP_ENHANCEMENTS + /*get source and dest ip addresses*/ + ih = (struct iphdr *)(skb->data + sizeof(struct ethhdr)); + + pu8UdpBuffer = (char *)ih + sizeof(struct iphdr); + if (buff_to_send[35] == 67 && buff_to_send[37] == 68) { + PRINT_D(RX_DBG, "DHCP Message received\n"); + } + if (buff_to_send[12] == 0x88 && buff_to_send[13] == 0x8e) + PRINT_D(GENERIC_DBG, "eapol received\n"); + #endif + /* Send the packet to the stack by giving it to the bridge */ + nic->netstats.rx_packets++; + nic->netstats.rx_bytes += frame_len; + skb->ip_summed = CHECKSUM_UNNECESSARY; + stats = netif_rx(skb); + PRINT_D(RX_DBG, "netif_rx ret value is: %d\n", stats); + } + #ifndef TCP_ENHANCEMENTS + else { + PRINT_ER("Discard sending packet with len = %d\n", size); + } + #endif +} + +void WILC_WFI_mgmt_rx(uint8_t *buff, uint32_t size) +{ + int i = 0; + perInterface_wlan_t *nic; + + /*BugID_5450*/ + /*Pass the frame on the monitor interface, if any.*/ + /*Otherwise, pass it on p2p0 netdev, if registered on it*/ + for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) { + nic = netdev_priv(g_linux_wlan->strInterfaceInfo[i].wilc_netdev); + if (nic->monitor_flag) { + WILC_WFI_monitor_rx(buff, size); + return; + } + } + + #ifdef WILC_P2P + nic = netdev_priv(g_linux_wlan->strInterfaceInfo[1].wilc_netdev); /* p2p0 */ + if ((buff[0] == nic->g_struct_frame_reg[0].frame_type && nic->g_struct_frame_reg[0].reg) || + (buff[0] == nic->g_struct_frame_reg[1].frame_type && nic->g_struct_frame_reg[1].reg)) { + WILC_WFI_p2p_rx(g_linux_wlan->strInterfaceInfo[1].wilc_netdev, buff, size); + } + #endif +} + +int wilc_netdev_init(void) +{ + + int i; + perInterface_wlan_t *nic; + struct net_device *ndev; + + linux_wlan_init_lock("close_exit_sync", &close_exit_sync, 0); + + /*create the common structure*/ + g_linux_wlan = (linux_wlan_t *)WILC_MALLOC(sizeof(linux_wlan_t)); + memset(g_linux_wlan, 0, sizeof(linux_wlan_t)); + + /*Reset interrupt count debug*/ + int_rcvdU = 0; + int_rcvdB = 0; + int_clrd = 0; + #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP + register_inetaddr_notifier(&g_dev_notifier); + #endif + + for (i = 0; i < NUM_CONCURRENT_IFC; i++) { + /*allocate first ethernet device with perinterface_wlan_t as its private data*/ + ndev = alloc_etherdev(sizeof(perInterface_wlan_t)); + if (!ndev) { + PRINT_ER("Failed to allocate ethernet dev\n"); + return -1; + } + + nic = netdev_priv(ndev); + memset(nic, 0, sizeof(perInterface_wlan_t)); + + /*Name the Devices*/ + if (i == 0) { + #if defined(NM73131) /* tony, 2012-09-20 */ + strcpy(ndev->name, "wilc_eth%d"); + #elif defined(PLAT_CLM9722) /* rachel */ + strcpy(ndev->name, "eth%d"); + #else /* PANDA_BOARD, PLAT_ALLWINNER_A10, PLAT_ALLWINNER_A20, PLAT_ALLWINNER_A31, PLAT_AML8726_M3 or PLAT_WMS8304 */ + strcpy(ndev->name, "wlan%d"); + #endif + } else + strcpy(ndev->name, "p2p%d"); + + nic->u8IfIdx = g_linux_wlan->u8NoIfcs; + nic->wilc_netdev = ndev; + g_linux_wlan->strInterfaceInfo[g_linux_wlan->u8NoIfcs].wilc_netdev = ndev; + g_linux_wlan->u8NoIfcs++; + wilc_set_netdev_ops(ndev); + + #ifdef USE_WIRELESS + { + struct wireless_dev *wdev; + /*Register WiFi*/ + wdev = WILC_WFI_WiphyRegister(ndev); + + #ifdef WILC_SDIO + /* set netdev, tony */ + SET_NETDEV_DEV(ndev, &local_sdio_func->dev); + #endif + + if (wdev == NULL) { + PRINT_ER("Can't register WILC Wiphy\n"); + return -1; + } + + /*linking the wireless_dev structure with the netdevice*/ + nic->wilc_netdev->ieee80211_ptr = wdev; + nic->wilc_netdev->ml_priv = nic; + wdev->netdev = nic->wilc_netdev; + nic->netstats.rx_packets = 0; + nic->netstats.tx_packets = 0; + nic->netstats.rx_bytes = 0; + nic->netstats.tx_bytes = 0; + + } + #endif + + + if (register_netdev(ndev)) { + PRINT_ER("Device couldn't be registered - %s\n", ndev->name); + return -1; /* ERROR */ + } + + nic->iftype = STATION_MODE; + nic->mac_opened = 0; + + } + + #ifndef WILC_SDIO + if (!linux_spi_init(&g_linux_wlan->wilc_spidev)) { + PRINT_ER("Can't initialize SPI \n"); + return -1; /* ERROR */ + } + g_linux_wlan->wilc_spidev = wilc_spi_dev; + #else + g_linux_wlan->wilc_sdio_func = local_sdio_func; + #endif + + return 0; +} + + +/*The 1st function called after module inserted*/ +static int __init init_wilc_driver(void) +{ + + +#if defined (WILC_DEBUGFS) + if (wilc_debugfs_init() < 0) { + PRINT_D(GENERIC_DBG, "fail to create debugfs for wilc driver\n"); + return -1; + } +#endif + + printk("IN INIT FUNCTION\n"); + printk("*** WILC1000 driver VERSION=[%s] FW_VER=[%s] ***\n", __DRIVER_VERSION__, __DRIVER_VERSION__); + + linux_wlan_device_power(1); + msleep(100); + linux_wlan_device_detection(1); + +#ifdef WILC_SDIO + { + int ret; + + ret = sdio_register_driver(&wilc_bus); + if (ret < 0) { + PRINT_D(INIT_DBG, "init_wilc_driver: Failed register sdio driver\n"); + } + + return ret; + } +#else + PRINT_D(INIT_DBG, "Initializing netdev\n"); + if (wilc_netdev_init()) { + PRINT_ER("Couldn't initialize netdev\n"); + } + return 0; +#endif +} +late_initcall(init_wilc_driver); + +static void __exit exit_wilc_driver(void) +{ + int i = 0; + perInterface_wlan_t *nic[NUM_CONCURRENT_IFC]; + #define CLOSE_TIMEOUT (12 * 1000) + + if ((g_linux_wlan != NULL) && (((g_linux_wlan->strInterfaceInfo[0].wilc_netdev) != NULL) + || ((g_linux_wlan->strInterfaceInfo[1].wilc_netdev) != NULL))) { + #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP + unregister_inetaddr_notifier(&g_dev_notifier); + #endif + + for (i = 0; i < NUM_CONCURRENT_IFC; i++) { + nic[i] = netdev_priv(g_linux_wlan->strInterfaceInfo[i].wilc_netdev); + } + } + + + if ((g_linux_wlan != NULL) && g_linux_wlan->wilc_firmware != NULL) { + release_firmware(g_linux_wlan->wilc_firmware); + g_linux_wlan->wilc_firmware = NULL; + } + + + if ((g_linux_wlan != NULL) && (((g_linux_wlan->strInterfaceInfo[0].wilc_netdev) != NULL) + || ((g_linux_wlan->strInterfaceInfo[1].wilc_netdev) != NULL))) { + PRINT_D(INIT_DBG, "Waiting for mac_close ....\n"); + + if (linux_wlan_lock_timeout(&close_exit_sync, CLOSE_TIMEOUT) < 0) + PRINT_D(INIT_DBG, "Closed TimedOUT\n"); + else + PRINT_D(INIT_DBG, "mac_closed\n"); + + + for (i = 0; i < NUM_CONCURRENT_IFC; i++) { + /* close all opened interfaces */ + if (g_linux_wlan->strInterfaceInfo[i].wilc_netdev != NULL) { + if (nic[i]->mac_opened) { + mac_close(g_linux_wlan->strInterfaceInfo[i].wilc_netdev); + } + } + } + for (i = 0; i < NUM_CONCURRENT_IFC; i++) { + PRINT_D(INIT_DBG, "Unregistering netdev %p \n", g_linux_wlan->strInterfaceInfo[i].wilc_netdev); + unregister_netdev(g_linux_wlan->strInterfaceInfo[i].wilc_netdev); + #ifdef USE_WIRELESS + PRINT_D(INIT_DBG, "Freeing Wiphy...\n"); + WILC_WFI_WiphyFree(g_linux_wlan->strInterfaceInfo[i].wilc_netdev); + #endif + PRINT_D(INIT_DBG, "Freeing netdev...\n"); + free_netdev(g_linux_wlan->strInterfaceInfo[i].wilc_netdev); + } + } + + +#ifdef USE_WIRELESS +#ifdef WILC_AP_EXTERNAL_MLME + /* Bug 4600 : WILC_WFI_deinit_mon_interface was already called at mac_close */ + /* WILC_WFI_deinit_mon_interface(); */ +#endif +#endif + + /* if(g_linux_wlan->open_ifcs==0) */ + { + #ifndef WILC_SDIO + PRINT_D(INIT_DBG, "SPI unregsiter...\n"); + spi_unregister_driver(&wilc_bus); + #else + PRINT_D(INIT_DBG, "SDIO unregsiter...\n"); + sdio_unregister_driver(&wilc_bus); + #endif + + linux_wlan_deinit_lock(&close_exit_sync); + if (g_linux_wlan != NULL) { + WILC_FREE(g_linux_wlan); + g_linux_wlan = NULL; + } + printk("Module_exit Done.\n"); + +#if defined (WILC_DEBUGFS) + wilc_debugfs_remove(); +#endif + + linux_wlan_device_detection(0); + linux_wlan_device_power(0); + } +} +module_exit(exit_wilc_driver); + +MODULE_LICENSE("GPL"); +#endif -- cgit v1.2.3-59-g8ed1b From f1a9983002cd9d849b37b88d44c89edef7a291ee Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Wed, 27 May 2015 13:02:16 -0700 Subject: staging: wilc1000: Include linux/gpio.h instead of asm/gpio.h Fix: drivers/staging/wilc1000/linux_wlan.c:18:22: fatal error: asm/gpio.h: No such file or directory Not every architecture has asm/gpio.h. Include linux/gpio.h instead. Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 49b238a05a88..18f1bd00201a 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include -- cgit v1.2.3-59-g8ed1b From e5af056149ab91c55199e6633b5e69d370b5226c Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 29 May 2015 22:52:12 +0200 Subject: staging: wilc1000: remove linux version checks For code that is integrated into mainline Linux, checks for the kernel version make no sense, because we know which version we are compiling against. This removes all checks and the associated dead code. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 88 +--- drivers/staging/wilc1000/wilc_sleep.c | 8 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 486 +--------------------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 7 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 8 - 5 files changed, 5 insertions(+), 592 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 18f1bd00201a..3f8b3c54f196 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -180,7 +180,6 @@ linux_wlan_t *g_linux_wlan; wilc_wlan_oup_t *gpstrWlanOps; WILC_Bool bEnablePS = WILC_TRUE; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) static const struct net_device_ops wilc_netdev_ops = { .ndo_init = mac_init_fn, .ndo_open = mac_open, @@ -191,37 +190,7 @@ static const struct net_device_ops wilc_netdev_ops = { .ndo_set_rx_mode = wilc_set_multicast_list, }; -#define wilc_set_netdev_ops(ndev) do { (ndev)->netdev_ops = &wilc_netdev_ops; } while (0) -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) -static const struct net_device_ops wilc_netdev_ops = { - .ndo_init = mac_init_fn, - .ndo_open = mac_open, - .ndo_stop = mac_close, - .ndo_start_xmit = mac_xmit, - .ndo_do_ioctl = mac_ioctl, - .ndo_get_stats = mac_stats, - .ndo_set_multicast_list = wilc_set_multicast_list, - -}; - -#define wilc_set_netdev_ops(ndev) do { (ndev)->netdev_ops = &wilc_netdev_ops; } while (0) - -#else - -static void wilc_set_netdev_ops(struct net_device *ndev) -{ - - ndev->init = mac_init_fn; - ndev->open = mac_open; - ndev->stop = mac_close; - ndev->hard_start_xmit = mac_xmit; - ndev->do_ioctl = mac_ioctl; - ndev->get_stats = mac_stats; - ndev->set_multicast_list = wilc_set_multicast_list, -} - -#endif #ifdef DEBUG_MODE extern volatile int timeNo; @@ -594,12 +563,7 @@ static void linux_wlan_msleep(uint32_t msc) { if (msc <= 4000000) { WILC_Uint32 u32Temp = msc * 1000; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) usleep_range(u32Temp, u32Temp); -#else - /* This is delay not sleep !!!, has to be changed*/ - msleep(msc); -#endif } else { msleep(msc); } @@ -2195,7 +2159,6 @@ struct net_device_stats *mac_stats(struct net_device *dev) } /* Setup the multicast filter */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) static void wilc_set_multicast_list(struct net_device *dev) { @@ -2251,55 +2214,6 @@ static void wilc_set_multicast_list(struct net_device *dev) } -#else - -static void wilc_set_multicast_list(struct net_device *dev) -{ - /* BIG Warning, Beware : Uncompiled, untested... */ - struct dev_mc_list *mc_ptr; - int i = 0; - - if (!dev) - return; - - PRINT_D(INIT_DBG, "Setting Multicast List. \n"); - PRINT_D(INIT_DBG, "dev->mc_count = %d\n", dev->mc_count); - - if (dev->flags & IFF_PROMISC) { - /* Normally, we should configure the chip to retrive all packets - * but we don't wanna support this right now */ - /* TODO: add promiscuous mode support */ - PRINT_D(INIT_DBG, "Set promiscuous mode ON, retrive all packets \n"); - return; - } - - /* If there's more addresses than we handle, get all multicast - * packets and sort them out in software. */ - if ((dev->flags & IFF_ALLMULTI) || (dev->mc_count > WILC_MULTICAST_TABLE_SIZE)) { - PRINT_D(INIT_DBG, "Disable multicast filter, retrive all multicast packets\n"); - host_int_setup_multicast_filter((WILC_WFIDrvHandle)gWFiDrvHandle, WILC_FALSE, 0); - return; - } - - /* No multicast? Just get our own stuff */ - if (dev->mc_count == 0) { - PRINT_D(INIT_DBG, "Enable multicast filter, retrive directed packets only.\n"); - host_int_setup_multicast_filter((WILC_WFIDrvHandle)gWFiDrvHandle, WILC_TRUE, 0); - return; - } - - /* Store all of the multicast addresses in the hardware filter */ - - for (mc_ptr = dev->mc_list; mc_ptr; mc_ptr = mc_ptr->next, i++) { - WILC_memcpy(gau8MulticastMacAddrList[i], mc_ptr->dmi_addr, ETH_ALEN) - i++; - } - - host_int_setup_multicast_filter((WILC_WFIDrvHandle)gWFiDrvHandle, WILC_TRUE, (dev->mc_count)); - -} -#endif - static void linux_wlan_tx_complete(void *priv, int status) { @@ -2765,7 +2679,7 @@ int wilc_netdev_init(void) nic->wilc_netdev = ndev; g_linux_wlan->strInterfaceInfo[g_linux_wlan->u8NoIfcs].wilc_netdev = ndev; g_linux_wlan->u8NoIfcs++; - wilc_set_netdev_ops(ndev); + ndev->netdev_ops = &wilc_netdev_ops; #ifdef USE_WIRELESS { diff --git a/drivers/staging/wilc1000/wilc_sleep.c b/drivers/staging/wilc1000/wilc_sleep.c index 368157175f40..b8f45146956b 100644 --- a/drivers/staging/wilc1000/wilc_sleep.c +++ b/drivers/staging/wilc1000/wilc_sleep.c @@ -12,11 +12,7 @@ void WILC_Sleep(WILC_Uint32 u32TimeMilliSec) { if (u32TimeMilliSec <= 4000000) { WILC_Uint32 u32Temp = u32TimeMilliSec * 1000; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) usleep_range(u32Temp, u32Temp); -#else - udelay(u32Temp); -#endif } else { msleep(u32TimeMilliSec); } @@ -27,10 +23,6 @@ void WILC_Sleep(WILC_Uint32 u32TimeMilliSec) /* #ifdef CONFIG_WILC_SLEEP_HI_RES */ void WILC_SleepMicrosec(WILC_Uint32 u32TimeMicoSec) { - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) usleep_range(u32TimeMicoSec, u32TimeMicoSec); - #else - udelay(u32TimeMicoSec); - #endif } /* #endif */ diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 648472925de0..c1d511825147 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -126,9 +126,7 @@ static struct ieee80211_supported_band WILC_WFI_band_2ghz = { /*BugID_5137*/ struct add_key_params { u8 key_idx; - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) bool pairwise; - #endif u8 *mac_addr; }; struct add_key_params g_add_gtk_key_params; @@ -202,30 +200,15 @@ void refresh_scan(void *pUserVoid, uint8_t all, WILC_Bool bDirectScan) if (pstrNetworkInfo != WILC_NULL) { - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ); - #else - s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel); - #endif - channel = ieee80211_get_channel(wiphy, s32Freq); rssi = get_rssi_avg(pstrNetworkInfo); if (WILC_memcmp("DIRECT-", pstrNetworkInfo->au8ssid, 7) || bDirectScan) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, pstrNetworkInfo->au8bssid, pstrNetworkInfo->u64Tsf, pstrNetworkInfo->u16CapInfo, pstrNetworkInfo->u16BeaconPeriod, (const u8 *)pstrNetworkInfo->pu8IEs, (size_t)pstrNetworkInfo->u16IEsLen, (((WILC_Sint32)rssi) * 100), GFP_KERNEL); -#else - bss = cfg80211_inform_bss(wiphy, channel, pstrNetworkInfo->au8bssid, pstrNetworkInfo->u64Tsf, pstrNetworkInfo->u16CapInfo, - pstrNetworkInfo->u16BeaconPeriod, (const u8 *)pstrNetworkInfo->pu8IEs, - (size_t)pstrNetworkInfo->u16IEsLen, (((WILC_Sint32)rssi) * 100), GFP_KERNEL); -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) cfg80211_put_bss(wiphy, bss); -#else - cfg80211_put_bss(bss); -#endif } } @@ -417,11 +400,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo } if (pstrNetworkInfo != WILC_NULL) { - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ); - #else - s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel); - #endif channel = ieee80211_get_channel(wiphy, s32Freq); WILC_NULLCHECK(s32Error, channel); @@ -448,20 +427,10 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo /*P2P peers are sent to WPA supplicant and added to shadow table*/ if (!(WILC_memcmp("DIRECT-", pstrNetworkInfo->au8ssid, 7))) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, pstrNetworkInfo->au8bssid, pstrNetworkInfo->u64Tsf, pstrNetworkInfo->u16CapInfo, pstrNetworkInfo->u16BeaconPeriod, (const u8 *)pstrNetworkInfo->pu8IEs, (size_t)pstrNetworkInfo->u16IEsLen, (((WILC_Sint32)pstrNetworkInfo->s8rssi) * 100), GFP_KERNEL); -#else - bss = cfg80211_inform_bss(wiphy, channel, pstrNetworkInfo->au8bssid, pstrNetworkInfo->u64Tsf, pstrNetworkInfo->u16CapInfo, - pstrNetworkInfo->u16BeaconPeriod, (const u8 *)pstrNetworkInfo->pu8IEs, - (size_t)pstrNetworkInfo->u16IEsLen, (((WILC_Sint32)pstrNetworkInfo->s8rssi) * 100), GFP_KERNEL); -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) cfg80211_put_bss(wiphy, bss); -#else - cfg80211_put_bss(bss); -#endif } @@ -730,27 +699,8 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, * @date 01 MAR 2012 * @version 1.0 */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) -/* - * struct changed from v3.8.0 - * tony, sswd, WILC-KR, 2013-10-29 - * struct cfg80211_chan_def { - * struct ieee80211_channel *chan; - * enum nl80211_chan_width width; - * u32 center_freq1; - * u32 center_freq2; - * }; - */ static int WILC_WFI_CfgSetChannel(struct wiphy *wiphy, struct cfg80211_chan_def *chandef) -#else -static int WILC_WFI_CfgSetChannel(struct wiphy *wiphy, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) - struct net_device *netdev, - #endif - struct ieee80211_channel *channel, - enum nl80211_channel_type channel_type) -#endif { WILC_Uint32 channelnum = 0; @@ -758,14 +708,8 @@ static int WILC_WFI_CfgSetChannel(struct wiphy *wiphy, WILC_Sint32 s32Error = WILC_SUCCESS; priv = wiphy_priv(wiphy); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) /* tony for v3.8.0 support */ channelnum = ieee80211_frequency_to_channel(chandef->chan->center_freq); PRINT_D(CFG80211_DBG, "Setting channel %d with frequency %d\n", channelnum, chandef->chan->center_freq); -#else - channelnum = ieee80211_frequency_to_channel(channel->center_freq); - - PRINT_D(CFG80211_DBG, "Setting channel %d with frequency %d\n", channelnum, channel->center_freq); -#endif u8CurrChannel = channelnum; s32Error = host_int_set_mac_chnl_num(priv->hWILCWFIDrv, channelnum); @@ -793,11 +737,7 @@ static int WILC_WFI_CfgSetChannel(struct wiphy *wiphy, * kernel version 3.8.8 supported * tony, sswd, WILC-KR, 2013-10-29 */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *request) -#else -static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_scan_request *request) -#endif { struct WILC_WFI_priv *priv; WILC_Uint32 i; @@ -807,10 +747,6 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct net_device *dev, struct priv = wiphy_priv(wiphy); -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) - PRINT_D(CORECONFIG_DBG, "Scan on netdev [%p] host if [%x]\n", dev, (WILC_Uint32)priv->hWILCWFIDrv); -#endif - /*if(connecting) * return -EBUSY; */ @@ -819,18 +755,10 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct net_device *dev, struct /*requests "create group" during a running scan*/ /* host_int_set_wfi_drv_handler(priv->hWILCWFIDrv); */ #if 0 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) /* tony for v3.8.0 support */ if (priv->dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP) { PRINT_D(GENERIC_DBG, "Required scan while in AP mode"); return s32Error; } -#else - if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP) { - PRINT_D(GENERIC_DBG, "Required scan while in AP mode"); - s32Error = WILC_BUSY; - return s32Error; - } -#endif #endif /* end of if 0 */ priv->pstrScanReq = request; @@ -1224,9 +1152,7 @@ static int WILC_WFI_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 * @version 1.0 */ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) bool pairwise, - #endif const u8 *mac_addr, struct key_params *params) { @@ -1316,11 +1242,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) if (!pairwise) - #else - if (!mac_addr || is_broadcast_ether_addr(mac_addr)) - #endif { if (params->cipher == WLAN_CIPHER_SUITE_TKIP) u8gmode = ENCRYPT_ENABLED | WPA | TKIP; @@ -1419,11 +1341,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k { u8mode = 0; - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) if (!pairwise) - #else - if (!mac_addr || is_broadcast_ether_addr(mac_addr)) - #endif { if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { /* swap the tx mic by rx mic */ @@ -1436,9 +1354,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k /*save keys only on interface 0 (wifi interface)*/ if (!g_gtk_keys_saved && netdev == g_linux_wlan->strInterfaceInfo[0].wilc_netdev) { g_add_gtk_key_params.key_idx = key_index; - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) g_add_gtk_key_params.pairwise = pairwise; - #endif if (!mac_addr) { g_add_gtk_key_params.mac_addr = NULL; } else { @@ -1476,9 +1392,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k /*save keys only on interface 0 (wifi interface)*/ if (!g_ptk_keys_saved && netdev == g_linux_wlan->strInterfaceInfo[0].wilc_netdev) { g_add_ptk_key_params.key_idx = key_index; - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) g_add_ptk_key_params.pairwise = pairwise; - #endif if (!mac_addr) { g_add_ptk_key_params.mac_addr = NULL; } else { @@ -1533,9 +1447,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k */ static int WILC_WFI_del_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) bool pairwise, - #endif const u8 *mac_addr) { struct WILC_WFI_priv *priv; @@ -1645,9 +1557,7 @@ static int WILC_WFI_del_key(struct wiphy *wiphy, struct net_device *netdev, * @version 1.0 */ static int WILC_WFI_get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) bool pairwise, - #endif const u8 *mac_addr, void *cookie, void (*callback)(void *cookie, struct key_params *)) { @@ -1659,11 +1569,7 @@ static int WILC_WFI_get_key(struct wiphy *wiphy, struct net_device *netdev, u8 k priv = wiphy_priv(wiphy); - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) if (!pairwise) - #else - if (!mac_addr || is_broadcast_ether_addr(mac_addr)) - #endif { PRINT_D(CFG80211_DBG, "Getting group key idx: %x\n", key_index); @@ -1700,11 +1606,8 @@ static int WILC_WFI_get_key(struct wiphy *wiphy, struct net_device *netdev, u8 k * @date 01 MAR 2012 * @version 1.0 */ -static int WILC_WFI_set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) - , bool unicast, bool multicast - #endif - ) +static int WILC_WFI_set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, + bool unicast, bool multicast) { WILC_Sint32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; @@ -1794,11 +1697,7 @@ static int WILC_WFI_get_station(struct wiphy *wiphy, struct net_device *dev, return s32Error; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) //0421 sinfo->filled |= BIT(NL80211_STA_INFO_INACTIVE_TIME); -#else - sinfo->filled |= STATION_INFO_INACTIVE_TIME; -#endif host_int_get_inactive_time(priv->hWILCWFIDrv, mac, &(inactive_time)); sinfo->inactive_time = 1000 * inactive_time; @@ -1816,26 +1715,16 @@ static int WILC_WFI_get_station(struct wiphy *wiphy, struct net_device *dev, * tx_failed introduced more than * kernel version 3.0.0 */ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) //0421 sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL) | BIT( NL80211_STA_INFO_RX_PACKETS) | BIT(NL80211_STA_INFO_TX_PACKETS) | BIT(NL80211_STA_INFO_TX_FAILED) | BIT(NL80211_STA_INFO_TX_BITRATE); - #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) - sinfo->filled |= STATION_INFO_SIGNAL | STATION_INFO_RX_PACKETS | STATION_INFO_TX_PACKETS - | STATION_INFO_TX_FAILED | STATION_INFO_TX_BITRATE; - #else - sinfo->filled |= STATION_INFO_SIGNAL | STATION_INFO_RX_PACKETS | STATION_INFO_TX_PACKETS - | STATION_INFO_TX_BITRATE; - #endif sinfo->signal = strStatistics.s8RSSI; sinfo->rx_packets = strStatistics.u32RxCount; sinfo->tx_packets = strStatistics.u32TxCount + strStatistics.u32TxFailureCount; - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) sinfo->tx_failed = strStatistics.u32TxFailureCount; - #endif sinfo->txrate.legacy = strStatistics.u8LinkSpeed * 10; #ifdef TCP_ENHANCEMENTS @@ -1846,13 +1735,8 @@ static int WILC_WFI_get_station(struct wiphy *wiphy, struct net_device *dev, } #endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) PRINT_D(CORECONFIG_DBG, "*** stats[%d][%d][%d][%d][%d]\n", sinfo->signal, sinfo->rx_packets, sinfo->tx_packets, sinfo->tx_failed, sinfo->txrate.legacy); - #else - PRINT_D(CORECONFIG_DBG, "*** stats[%d][%d][%d][%d]\n", sinfo->signal, sinfo->rx_packets, sinfo->tx_packets, - sinfo->txrate.legacy); - #endif } return s32Error; } @@ -2008,7 +1892,7 @@ static int WILC_WFI_set_wiphy_params(struct wiphy *wiphy, u32 changed) return s32Error; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + /** * @brief WILC_WFI_set_bitrate_mask * @details set the bitrate mask configuration @@ -2166,7 +2050,6 @@ static int WILC_WFI_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev) return 0; } -#endif #ifdef WILC_P2P @@ -2388,29 +2271,17 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) if (pkt_offset & IS_MANAGMEMENT_CALLBACK) { if (buff[FRAME_TYPE_ID] == IEEE80211_STYPE_PROBE_RESP) { PRINT_D(GENERIC_DBG, "Probe response ACK\n"); - #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)) - cfg80211_mgmt_tx_status(dev, priv->u64tx_cookie, buff, size, true, GFP_KERNEL); - #else cfg80211_mgmt_tx_status(priv->wdev, priv->u64tx_cookie, buff, size, true, GFP_KERNEL); - #endif return; } else { if (pkt_offset & IS_MGMT_STATUS_SUCCES) { PRINT_D(GENERIC_DBG, "Success Ack - Action frame category: %x Action Subtype: %d Dialog T: %x OR %x\n", buff[ACTION_CAT_ID], buff[ACTION_SUBTYPE_ID], buff[ACTION_SUBTYPE_ID + 1], buff[P2P_PUB_ACTION_SUBTYPE + 1]); - #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)) - cfg80211_mgmt_tx_status(dev, priv->u64tx_cookie, buff, size, true, GFP_KERNEL); - #else cfg80211_mgmt_tx_status(priv->wdev, priv->u64tx_cookie, buff, size, true, GFP_KERNEL); - #endif } else { PRINT_D(GENERIC_DBG, "Fail Ack - Action frame category: %x Action Subtype: %d Dialog T: %x OR %x\n", buff[ACTION_CAT_ID], buff[ACTION_SUBTYPE_ID], buff[ACTION_SUBTYPE_ID + 1], buff[P2P_PUB_ACTION_SUBTYPE + 1]); - #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)) - cfg80211_mgmt_tx_status(dev, priv->u64tx_cookie, buff, size, false, GFP_KERNEL); - #else cfg80211_mgmt_tx_status(priv->wdev, priv->u64tx_cookie, buff, size, false, GFP_KERNEL); - #endif } return; } @@ -2420,11 +2291,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) /*BugID_5442*/ /*Upper layer is informed that the frame is received on this freq*/ - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) s32Freq = ieee80211_channel_to_frequency(u8CurrChannel, IEEE80211_BAND_2GHZ); - #else - s32Freq = ieee80211_channel_to_frequency(u8CurrChannel); - #endif if (ieee80211_is_action(buff[FRAME_TYPE_ID])) { PRINT_D(GENERIC_DBG, "Rx Action Frame Type: %x %x\n", buff[ACTION_SUBTYPE_ID], buff[P2P_PUB_ACTION_SUBTYPE]); @@ -2478,18 +2345,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) if ((buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP) && (bWilc_ie)) { PRINT_D(GENERIC_DBG, "Sending P2P to host without extra elemnt\n"); /* extra attribute for sig_dbm: signal strength in mBm, or 0 if unknown */ - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) cfg80211_rx_mgmt(priv->wdev, s32Freq, 0, buff, size - 7, 0); - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) - cfg80211_rx_mgmt(priv->wdev, s32Freq, 0, buff, size - 7, 0, GFP_ATOMIC); - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - cfg80211_rx_mgmt(priv->wdev, s32Freq, 0, buff, size - 7, GFP_ATOMIC); - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) - cfg80211_rx_mgmt(dev, s32Freq, 0, buff, size - 7, GFP_ATOMIC); /* rachel */ - #elif (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) - cfg80211_rx_mgmt(dev, s32Freq, buff, size - 7, GFP_ATOMIC); - #endif - return; } break; @@ -2501,17 +2357,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) } } - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) cfg80211_rx_mgmt(priv->wdev, s32Freq, 0, buff, size - 7, 0); - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) - cfg80211_rx_mgmt(priv->wdev, s32Freq, 0, buff, size - 7, 0, GFP_ATOMIC); - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - cfg80211_rx_mgmt(priv->wdev, s32Freq, 0, buff, size, GFP_ATOMIC); - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) - cfg80211_rx_mgmt(dev, s32Freq, 0, buff, size, GFP_ATOMIC); - #elif (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) - cfg80211_rx_mgmt(dev, s32Freq, buff, size, GFP_ATOMIC); - #endif } } @@ -2553,20 +2399,11 @@ static void WILC_WFI_RemainOnChannelReady(void *pUserVoid) priv->bInP2PlistenState = WILC_TRUE; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) cfg80211_ready_on_channel(priv->wdev, priv->strRemainOnChanParams.u64ListenCookie, priv->strRemainOnChanParams.pstrListenChan, priv->strRemainOnChanParams.u32ListenDuration, GFP_KERNEL); -#else - cfg80211_ready_on_channel(priv->dev, - priv->strRemainOnChanParams.u64ListenCookie, - priv->strRemainOnChanParams.pstrListenChan, - priv->strRemainOnChanParams.tenuChannelType, - priv->strRemainOnChanParams.u32ListenDuration, - GFP_KERNEL); -#endif } /** @@ -2591,18 +2428,10 @@ static void WILC_WFI_RemainOnChannelExpired(void *pUserVoid, WILC_Uint32 u32Sess priv->bInP2PlistenState = WILC_FALSE; /*Inform wpas of remain-on-channel expiration*/ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) cfg80211_remain_on_channel_expired(priv->wdev, priv->strRemainOnChanParams.u64ListenCookie, priv->strRemainOnChanParams.pstrListenChan, GFP_KERNEL); - #else - cfg80211_remain_on_channel_expired(priv->dev, - priv->strRemainOnChanParams.u64ListenCookie, - priv->strRemainOnChanParams.pstrListenChan, - priv->strRemainOnChanParams.tenuChannelType, - GFP_KERNEL); - #endif } else { PRINT_D(GENERIC_DBG, "Received ID 0x%x Expected ID 0x%x (No match)\n", u32SessionID , priv->strRemainOnChanParams.u32ListenSessionID); @@ -2624,15 +2453,8 @@ static void WILC_WFI_RemainOnChannelExpired(void *pUserVoid, WILC_Uint32 u32Sess * @version 1.0 */ static int WILC_WFI_remain_on_channel(struct wiphy *wiphy, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) struct wireless_dev *wdev, -#else - struct net_device *dev, -#endif struct ieee80211_channel *chan, -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)) - enum nl80211_channel_type channel_type, -#endif unsigned int duration, u64 *cookie) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -2645,26 +2467,16 @@ static int WILC_WFI_remain_on_channel(struct wiphy *wiphy, /*This check is to handle the situation when user*/ /*requests "create group" during a running scan*/ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) if (wdev->iftype == NL80211_IFTYPE_AP) { PRINT_D(GENERIC_DBG, "Required remain-on-channel while in AP mode"); return s32Error; } -#else - if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP) { - PRINT_D(GENERIC_DBG, "Required remain-on-channel while in AP mode"); - return s32Error; - } -#endif u8CurrChannel = chan->hw_value; /*Setting params needed by WILC_WFI_RemainOnChannelExpired()*/ priv->strRemainOnChanParams.pstrListenChan = chan; priv->strRemainOnChanParams.u64ListenCookie = *cookie; - #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)) - priv->strRemainOnChanParams.tenuChannelType = channel_type; - #endif priv->strRemainOnChanParams.u32ListenDuration = duration; priv->strRemainOnChanParams.u32ListenSessionID++; @@ -2693,11 +2505,7 @@ static int WILC_WFI_remain_on_channel(struct wiphy *wiphy, * @version 1.0 */ static int WILC_WFI_cancel_remain_on_channel(struct wiphy *wiphy, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) struct wireless_dev *wdev, -#else - struct net_device *dev, -#endif u64 cookie) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -2736,57 +2544,14 @@ void WILC_WFI_add_wilcvendorspec(WILC_Uint8 *buff) extern linux_wlan_t *g_linux_wlan; extern WILC_Bool bEnablePS; int WILC_WFI_mgmt_tx(struct wiphy *wiphy, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) - struct wireless_dev *wdev, - struct ieee80211_channel *chan, - bool offchan, - unsigned int wait, - const u8 *buf, - size_t len, - bool no_cck, - bool dont_wait_for_ack, u64 *cookie) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, - struct ieee80211_channel *chan, bool offchan, - enum nl80211_channel_type channel_type, - bool channel_type valid, - unsigned int wait, const u8 *buf, - size_t len, bool no_cck, - bool dont_wait_for_ack, u64 *cookie) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) - struct net_device *dev, - struct ieee80211_channel *chan, bool offchan, - enum nl80211_channel_type channel_type, - bool channel_type_valid, - unsigned int wait, const u8 *buf, - size_t len, bool no_cck, - bool dont_wait_for_ack, u64 *cookie) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - struct net_device *dev, - struct ieee80211_channel *chan, bool offchan, - enum nl80211_channel_type channel_type, - bool channel_type_valid, - unsigned int wait, const u8 *buf, - size_t len, bool no_cck, u64 *cookie) -#else - struct net_device *dev, - struct ieee80211_channel *chan, bool offchan, - enum nl80211_channel_type channel_type, - bool channel_type_valid, - unsigned int wait, const u8 *buf, - size_t len, u64 *cookie) -#endif { - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) struct ieee80211_channel *chan = params->chan; unsigned int wait = params->wait; const u8 *buf = params->buf; size_t len = params->len; - #endif const struct ieee80211_mgmt *mgmt; struct p2p_mgmt_data *mgmt_tx; struct WILC_WFI_priv *priv; @@ -2796,11 +2561,7 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy, perInterface_wlan_t *nic; WILC_Uint32 buf_len = len + sizeof(u8P2P_vendorspec) + sizeof(u8P2Plocalrandom); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) nic = netdev_priv(wdev->netdev); -#else - nic = netdev_priv(dev); -#endif priv = wiphy_priv(wiphy); pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv; @@ -2938,11 +2699,7 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy, } int WILC_WFI_mgmt_tx_cancel_wait(struct wiphy *wiphy, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct wireless_dev *wdev, -#else - struct net_device *dev, -#endif u64 cookie) { struct WILC_WFI_priv *priv; @@ -2957,45 +2714,15 @@ int WILC_WFI_mgmt_tx_cancel_wait(struct wiphy *wiphy, if (priv->bInP2PlistenState == WILC_FALSE) { /* Bug 5504: This is just to avoid connection failure when getting stuck when the supplicant * considers the driver falsely that it is in Listen state */ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) cfg80211_remain_on_channel_expired(priv->wdev, priv->strRemainOnChanParams.u64ListenCookie, priv->strRemainOnChanParams.pstrListenChan, GFP_KERNEL); - #else - cfg80211_remain_on_channel_expired(priv->dev, - priv->strRemainOnChanParams.u64ListenCookie, - priv->strRemainOnChanParams.pstrListenChan, - priv->strRemainOnChanParams.tenuChannelType, - GFP_KERNEL); - #endif - } return 0; } -/** - * @brief WILC_WFI_action - * @details Transmit an action frame - * @param[in] - * @return int : Return 0 on Success. - * @author mdaftedar - * @date 01 JUL 2012 - * @version 1.0 - * */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) -int WILC_WFI_action(struct wiphy *wiphy, struct net_device *dev, - struct ieee80211_channel *chan, enum nl80211_channel_type channel_type, - const u8 *buf, size_t len, u64 *cookie) -{ - PRINT_D(HOSTAPD_DBG, "In action function\n"); - return WILC_SUCCESS; -} -#endif -#else - /** * @brief WILC_WFI_frame_register * @details Notify driver that a management frame type was @@ -3008,11 +2735,7 @@ int WILC_WFI_action(struct wiphy *wiphy, struct net_device *dev, * @version */ void WILC_WFI_frame_register(struct wiphy *wiphy, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) struct wireless_dev *wdev, -#else - struct net_device *dev, -#endif u16 frame_type, bool reg) { @@ -3060,7 +2783,6 @@ void WILC_WFI_frame_register(struct wiphy *wiphy, } -#endif #endif /*WILC_P2P*/ /** @@ -3107,11 +2829,7 @@ static int WILC_WFI_dump_station(struct wiphy *wiphy, struct net_device *dev, priv = wiphy_priv(wiphy); /* priv = netdev_priv(priv->wdev->netdev); */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) //0421 sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL); -#else - sinfo->filled |= STATION_INFO_SIGNAL; -#endif host_int_get_rssi(priv->hWILCWFIDrv, &(sinfo->signal)); @@ -3279,18 +2997,14 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy, g_linux_wlan->strInterfaceInfo[0].wilc_netdev, g_add_ptk_key_params.key_idx, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) g_add_ptk_key_params.pairwise, - #endif g_add_ptk_key_params.mac_addr, (struct key_params *)(&g_key_ptk_params)); WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy, g_linux_wlan->strInterfaceInfo[0].wilc_netdev, g_add_gtk_key_params.key_idx, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) g_add_gtk_key_params.pairwise, - #endif g_add_gtk_key_params.mac_addr, (struct key_params *)(&g_key_gtk_params)); } @@ -3372,18 +3086,14 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy, g_linux_wlan->strInterfaceInfo[0].wilc_netdev, g_add_ptk_key_params.key_idx, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) g_add_ptk_key_params.pairwise, - #endif g_add_ptk_key_params.mac_addr, (struct key_params *)(&g_key_ptk_params)); WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy, g_linux_wlan->strInterfaceInfo[0].wilc_netdev, g_add_gtk_key_params.key_idx, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) g_add_gtk_key_params.pairwise, - #endif g_add_gtk_key_params.mac_addr, (struct key_params *)(&g_key_gtk_params)); } @@ -3531,18 +3241,14 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy, g_linux_wlan->strInterfaceInfo[0].wilc_netdev, g_add_ptk_key_params.key_idx, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) g_add_ptk_key_params.pairwise, - #endif g_add_ptk_key_params.mac_addr, (struct key_params *)(&g_key_ptk_params)); WILC_WFI_add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy, g_linux_wlan->strInterfaceInfo[0].wilc_netdev, g_add_gtk_key_params.key_idx, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) g_add_gtk_key_params.pairwise, - #endif g_add_gtk_key_params.mac_addr, (struct key_params *)(&g_key_gtk_params)); #endif @@ -3574,7 +3280,6 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev return s32Error; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) /* (austin.2013-07-23) * * To support revised cfg80211_ops @@ -3614,12 +3319,10 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev, PRINT_D(HOSTAPD_DBG, "Interval = %d \n DTIM period = %d\n Head length = %d Tail length = %d\n", settings->beacon_interval, settings->dtim_period, beacon->head_len, beacon->tail_len); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) s32Error = WILC_WFI_CfgSetChannel(wiphy, &settings->chandef); if (s32Error != WILC_SUCCESS) PRINT_ER("Error in setting channel\n"); -#endif linux_wlan_set_bssid(dev, g_linux_wlan->strInterfaceInfo[0].aSrcAddress); @@ -3718,116 +3421,6 @@ static int WILC_WFI_stop_ap(struct wiphy *wiphy, struct net_device *dev) return s32Error; } -#else /* here belows are original for < kernel 3.3 (austin.2013-07-23) */ - -/** - * @brief WILC_WFI_add_beacon - * @details Add a beacon with given parameters, @head, @interval - * and @dtim_period will be valid, @tail is optional. - * @param[in] wiphy - * @param[in] dev The net device structure - * @param[in] info Parameters for the beacon to be added - * @return int : Return 0 on Success. - * @author mdaftedar - * @date 01 MAR 2012 - * @version 1.0 - */ -static int WILC_WFI_add_beacon(struct wiphy *wiphy, struct net_device *dev, - struct beacon_parameters *info) -{ - WILC_Sint32 s32Error = WILC_SUCCESS; - struct WILC_WFI_priv *priv; - - - - priv = wiphy_priv(wiphy); - PRINT_D(HOSTAPD_DBG, "Adding Beacon\n"); - - PRINT_D(HOSTAPD_DBG, "Interval = %d \n DTIM period = %d\n Head length = %d Tail length = %d\n", info->interval, info->dtim_period, info->head_len, info->tail_len); - - linux_wlan_set_bssid(dev, g_linux_wlan->strInterfaceInfo[0].aSrcAddress); - - #ifndef WILC_FULLY_HOSTING_AP - s32Error = host_int_add_beacon(priv->hWILCWFIDrv, info->interval, - info->dtim_period, - info->head_len, info->head, - info->tail_len, info->tail); - - #else - s32Error = host_add_beacon(priv->hWILCWFIDrv, info->interval, - info->dtim_period, - info->head_len, info->head, - info->tail_len, info->tail); - #endif - - return s32Error; -} - -/** - * @brief WILC_WFI_set_beacon - * @details Change the beacon parameters for an access point mode - * interface. This should reject the call when no beacon has been - * configured. - * @param[in] - * @return int : Return 0 on Success. - * @author mdaftedar - * @date 01 MAR 2012 - * @version 1.0 - */ -static int WILC_WFI_set_beacon(struct wiphy *wiphy, struct net_device *dev, - struct beacon_parameters *info) -{ - WILC_Sint32 s32Error = WILC_SUCCESS; - - - PRINT_D(HOSTAPD_DBG, "Setting beacon\n"); - - s32Error = WILC_WFI_add_beacon(wiphy, dev, info); - - return s32Error; -} - -/** - * @brief WILC_WFI_del_beacon - * @details Remove beacon configuration and stop sending the beacon. - * @param[in] - * @return int : Return 0 on Success. - * @author mdaftedar - * @date 01 MAR 2012 - * @version 1.0 - */ -static int WILC_WFI_del_beacon(struct wiphy *wiphy, struct net_device *dev) -{ - WILC_Sint32 s32Error = WILC_SUCCESS; - struct WILC_WFI_priv *priv; - WILC_Uint8 NullBssid[ETH_ALEN] = {0}; - - - WILC_NULLCHECK(s32Error, wiphy); - - priv = wiphy_priv(wiphy); - - PRINT_D(HOSTAPD_DBG, "Deleting beacon\n"); - - /*BugID_5188*/ - linux_wlan_set_bssid(dev, NullBssid); - - #ifndef WILC_FULLY_HOSTING_AP - s32Error = host_int_del_beacon(priv->hWILCWFIDrv); - #else - s32Error = host_del_beacon(priv->hWILCWFIDrv); - #endif - - WILC_ERRORCHECK(s32Error); - - WILC_CATCH(s32Error) - { - } - return s32Error; -} - -#endif /* linux kernel 3.4+ (austin.2013-07-23) */ - /** * @brief WILC_WFI_add_station * @details Add a new station. @@ -3923,15 +3516,9 @@ static int WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev, * @version 1.0 */ static int WILC_WFI_del_station(struct wiphy *wiphy, struct net_device *dev, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) struct station_del_parameters *params) -#else - u8 *mac) -#endif { - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) u8 *mac = params->mac; - #endif WILC_Sint32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; perInterface_wlan_t *nic; @@ -4055,35 +3642,14 @@ static int WILC_WFI_change_station(struct wiphy *wiphy, struct net_device *dev, * @date 01 JUL 2012 * @version 1.0 */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) struct wireless_dev *WILC_WFI_add_virt_intf(struct wiphy *wiphy, const char *name, unsigned char name_assign_type, enum nl80211_iftype type, u32 *flags, struct vif_params *params) -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) /* tony for v3.8 support */ -struct wireless_dev *WILC_WFI_add_virt_intf(struct wiphy *wiphy, const char *name, - enum nl80211_iftype type, u32 *flags, - struct vif_params *params) -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) /* tony for v3.6 support */ -struct wireless_dev *WILC_WFI_add_virt_intf(struct wiphy *wiphy, char *name, - enum nl80211_iftype type, u32 *flags, - struct vif_params *params) -#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) -int WILC_WFI_add_virt_intf(struct wiphy *wiphy, char *name, - enum nl80211_iftype type, u32 *flags, - struct vif_params *params) -#else -struct net_device *WILC_WFI_add_virt_intf(struct wiphy *wiphy, char *name, - enum nl80211_iftype type, u32 *flags, - struct vif_params *params) -#endif { perInterface_wlan_t *nic; struct WILC_WFI_priv *priv; /* struct WILC_WFI_mon_priv* mon_priv; */ - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - WILC_Sint32 s32Error = WILC_SUCCESS; - #endif struct net_device *new_ifc = NULL; priv = wiphy_priv(wiphy); @@ -4110,16 +3676,7 @@ struct net_device *WILC_WFI_add_virt_intf(struct wiphy *wiphy, char *name, } else PRINT_ER("Error in initializing monitor interface\n "); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) /* tony for v3.8 support */ return priv->wdev; -#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - return s32Error; -#else - /* return priv->wdev->netdev; */ - PRINT_D(HOSTAPD_DBG, "IFC[%p] created\n", new_ifc); - return new_ifc; -#endif - } /** @@ -4131,11 +3688,7 @@ struct net_device *WILC_WFI_add_virt_intf(struct wiphy *wiphy, char *name, * @date 01 JUL 2012 * @version 1.0 */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) int WILC_WFI_del_virt_intf(struct wiphy *wiphy, struct wireless_dev *wdev) /* tony for v3.8 support */ -#else -int WILC_WFI_del_virt_intf(struct wiphy *wiphy, struct net_device *dev) -#endif { PRINT_D(HOSTAPD_DBG, "Deleting virtual interface\n"); return WILC_SUCCESS; @@ -4146,16 +3699,7 @@ int WILC_WFI_del_virt_intf(struct wiphy *wiphy, struct net_device *dev) #endif /*WILC_AP_EXTERNAL_MLME*/ static struct cfg80211_ops WILC_WFI_cfg80211_ops = { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) - /* - * replaced set_channel by set_monitor_channel - * from v3.6 - * tony, 2013-10-29 - */ .set_monitor_channel = WILC_WFI_CfgSetChannel, -#else - .set_channel = WILC_WFI_CfgSetChannel, -#endif .scan = WILC_WFI_CfgScan, .connect = WILC_WFI_CfgConnect, .disconnect = WILC_WFI_disconnect, @@ -4163,24 +3707,15 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = { .del_key = WILC_WFI_del_key, .get_key = WILC_WFI_get_key, .set_default_key = WILC_WFI_set_default_key, -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) /* .dump_survey = WILC_WFI_dump_survey, */ -#endif #ifdef WILC_AP_EXTERNAL_MLME .add_virtual_intf = WILC_WFI_add_virt_intf, .del_virtual_intf = WILC_WFI_del_virt_intf, .change_virtual_intf = WILC_WFI_change_virt_intf, -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) - .add_beacon = WILC_WFI_add_beacon, - .set_beacon = WILC_WFI_set_beacon, - .del_beacon = WILC_WFI_del_beacon, -#else - /* supports kernel 3.4+ change. austin.2013-07-23 */ .start_ap = WILC_WFI_start_ap, .change_beacon = WILC_WFI_change_beacon, .stop_ap = WILC_WFI_stop_ap, -#endif .add_station = WILC_WFI_add_station, .del_station = WILC_WFI_del_station, .change_station = WILC_WFI_change_station, @@ -4196,7 +3731,6 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = { /* .disassoc = WILC_WFI_disassoc, */ .set_wiphy_params = WILC_WFI_set_wiphy_params, -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) /* .set_bitrate_mask = WILC_WFI_set_bitrate_mask, */ .set_pmksa = WILC_WFI_set_pmksa, .del_pmksa = WILC_WFI_del_pmksa, @@ -4205,15 +3739,8 @@ static struct cfg80211_ops WILC_WFI_cfg80211_ops = { .remain_on_channel = WILC_WFI_remain_on_channel, .cancel_remain_on_channel = WILC_WFI_cancel_remain_on_channel, .mgmt_tx_cancel_wait = WILC_WFI_mgmt_tx_cancel_wait, - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) - .action = WILC_WFI_action, - #endif - #else .mgmt_tx = WILC_WFI_mgmt_tx, .mgmt_frame_register = WILC_WFI_frame_register, - #endif -#endif /* .mgmt_tx_cancel_wait = WILC_WFI_mgmt_tx_cancel_wait, */ .set_power_mgmt = WILC_WFI_set_power_mgmt, .set_cqm_rssi_config = WILC_WFI_set_cqm_rssi_config, @@ -4378,11 +3905,9 @@ struct wireless_dev *WILC_WFI_WiphyRegister(struct net_device *net) /*Maximum number of probed ssid to be added by user for the scan request*/ wdev->wiphy->max_scan_ssids = MAX_NUM_PROBED_SSID; - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) /*Maximum number of pmkids to be cashed*/ wdev->wiphy->max_num_pmkids = WILC_MAX_NUM_PMKIDS; PRINT_INFO(CFG80211_DBG, "Max number of PMKIDs = %d\n", wdev->wiphy->max_num_pmkids); - #endif wdev->wiphy->max_scan_ie_len = 1000; @@ -4392,20 +3917,15 @@ struct wireless_dev *WILC_WFI_WiphyRegister(struct net_device *net) /*Set the availaible cipher suites*/ wdev->wiphy->cipher_suites = cipher_suites; wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) /*Setting default managment types: for register action frame: */ wdev->wiphy->mgmt_stypes = wilc_wfi_cfg80211_mgmt_types; -#endif #ifdef WILC_P2P wdev->wiphy->max_remain_on_channel_duration = 500; /*Setting the wiphy interfcae mode and type before registering the wiphy*/ wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP) | BIT(NL80211_IFTYPE_MONITOR) | BIT(NL80211_IFTYPE_P2P_GO) | BIT(NL80211_IFTYPE_P2P_CLIENT); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) - wdev->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; -#endif #else wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP) | BIT(NL80211_IFTYPE_MONITOR); #endif diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h index 9eb8f37542d0..508db6a3f6dd 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h @@ -68,7 +68,6 @@ #define nl80211_SCAN_RESULT_EXPIRE (3 * HZ) #define SCAN_RESULT_EXPIRE (40 * HZ) -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 30) static const u32 cipher_suites[] = { WLAN_CIPHER_SUITE_WEP40, WLAN_CIPHER_SUITE_WEP104, @@ -76,11 +75,7 @@ static const u32 cipher_suites[] = { WLAN_CIPHER_SUITE_CCMP, WLAN_CIPHER_SUITE_AES_CMAC, }; -#endif - - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) static const struct ieee80211_txrx_stypes wilc_wfi_cfg80211_mgmt_types[NL80211_IFTYPE_MAX] = { [NL80211_IFTYPE_STATION] = { @@ -110,7 +105,7 @@ static const struct ieee80211_txrx_stypes BIT(IEEE80211_STYPE_DEAUTH >> 4) } }; -#endif + /* Time to stay on the channel */ #define WILC_WFI_DWELL_PASSIVE 100 #define WILC_WFI_DWELL_ACTIVE 40 diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index aa30de932ca4..0abe653acc66 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -49,12 +49,7 @@ #include #include "host_interface.h" #include "wilc_wlan.h" -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30) -#include -#else #include /* tony, 2013-06-12 */ -#endif - #define FLOW_CONTROL_LOWER_THRESHOLD 128 #define FLOW_CONTROL_UPPER_THRESHOLD 256 @@ -163,9 +158,6 @@ struct WILC_WFI_priv { tstrHostIFpmkidAttr pmkid_list; struct WILC_WFI_stats netstats; WILC_Uint8 WILC_WFI_wep_default; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) -#define WLAN_KEY_LEN_WEP104 13 -#endif WILC_Uint8 WILC_WFI_wep_key[4][WLAN_KEY_LEN_WEP104]; WILC_Uint8 WILC_WFI_wep_key_len[4]; struct net_device *real_ndev; /* The real interface that the monitor is on */ -- cgit v1.2.3-59-g8ed1b From 691f1a2f035d345c5a908c5c1e2a158dde6c93fa Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 29 May 2015 22:52:15 +0200 Subject: staging: wilc1000: remove __DRIVER_VERSION__ macro The driver version is meaningless, and in particular does not have to be passed from the Makefile. This removes the macros, but leaves the behavior of printing the 10.2 version untouched for the moment. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/Makefile | 6 ------ drivers/staging/wilc1000/linux_wlan.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index 4aa5f6764df4..13e3ed8ef31e 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -32,9 +32,3 @@ wilc1000-objs := wilc_wfi_netdevice.o wilc_wfi_cfgoperations.o linux_wlan.o linu wilc1000-$(CONFIG_WILC1000_SDIO) += linux_wlan_sdio.o wilc1000-$(CONFIG_WILC1000_SPI) += linux_wlan_spi.o - -WILC1000_SRC_VERSION = 10.0 -PATCHLEVEL = 2 -WILC1000_FW_VERSION = 0 - -ccflags-y += -D__DRIVER_VERSION__=\"$(WILC1000_SRC_VERSION).$(PATCHLEVEL)\" diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 3f8b3c54f196..2a74441af09e 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2747,7 +2747,7 @@ static int __init init_wilc_driver(void) #endif printk("IN INIT FUNCTION\n"); - printk("*** WILC1000 driver VERSION=[%s] FW_VER=[%s] ***\n", __DRIVER_VERSION__, __DRIVER_VERSION__); + printk("*** WILC1000 driver VERSION=[10.2] FW_VER=[10.2] ***\n"); linux_wlan_device_power(1); msleep(100); -- cgit v1.2.3-59-g8ed1b From 7a8fd84175d245c8ade80404c53f7ed83e03b256 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 1 Jun 2015 21:06:45 +0200 Subject: staging: wilc1000: fix compiler warnings This avoids the remaining warnings that one gets on a normal build: unused variables, unused labels, and invalid printk format strings. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 8 ++++++-- drivers/staging/wilc1000/linux_wlan_spi.c | 3 --- drivers/staging/wilc1000/wilc_spi.c | 4 ++-- drivers/staging/wilc1000/wilc_wlan.c | 6 ++---- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 2a74441af09e..46c7e4f3471d 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1025,7 +1025,6 @@ int repeat_power_cycle(perInterface_wlan_t *nic); static int linux_wlan_start_firmware(perInterface_wlan_t *nic) { - static int timeout = 5; int ret = 0; /* start firmware */ PRINT_D(INIT_DBG, "Starting Firmware ...\n"); @@ -1040,6 +1039,7 @@ static int linux_wlan_start_firmware(perInterface_wlan_t *nic) ret = linux_wlan_lock_timeout(&g_linux_wlan->sync_event, 5000); if (ret) { #ifdef COMPLEMENT_BOOT + static int timeout = 5; if (timeout--) { PRINT_D(INIT_DBG, "repeat power cycle[%d]", timeout); @@ -1675,7 +1675,9 @@ _fail_2: linux_wlan_unlock(&g_linux_wlan->rxq_event); kthread_stop(g_linux_wlan->rxq_thread); +#ifndef TCP_ENHANCEMENTS _fail_1: +#endif #if (RX_BH_TYPE == RX_BH_KTHREAD) /*De-Initialize 1st thread*/ g_linux_wlan->close = 1; @@ -1999,8 +2001,8 @@ _fail_fw_start_: _fail_irq_enable_: #if (defined WILC_SDIO) && (!defined WILC_SDIO_IRQ_GPIO) disable_sdio_interrupt(); -#endif _fail_irq_init_: +#endif #if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO) deinit_irq(g_linux_wlan); @@ -2522,8 +2524,10 @@ void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset) int stats; unsigned char *buff_to_send = NULL; struct sk_buff *skb; +#ifndef TCP_ENHANCEMENTS char *pu8UdpBuffer; struct iphdr *ih; +#endif struct net_device *wilc_netdev; perInterface_wlan_t *nic; diff --git a/drivers/staging/wilc1000/linux_wlan_spi.c b/drivers/staging/wilc1000/linux_wlan_spi.c index 0c30bbb5fa65..e5d794590f00 100644 --- a/drivers/staging/wilc1000/linux_wlan_spi.c +++ b/drivers/staging/wilc1000/linux_wlan_spi.c @@ -102,9 +102,6 @@ int linux_spi_init(void *vp) if (called == 0) { called++; - if (&wilc_bus == NULL) { - PRINT_ER("wilc_bus address is NULL\n"); - } ret = spi_register_driver(&wilc_bus); } diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 2f38ddabc654..d0e761080ca5 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -1194,10 +1194,10 @@ static int spi_init(wilc_wlan_inp_t *inp, wilc_debug_func func) /* Read failed. Try with CRC off. This might happen when module * is removed but chip isn't reset*/ g_spi.crc_off = 1; - PRINT_ER("[wilc spi]: Failed internal read protocol with CRC on, retyring with CRC off...\n", __LINE__); + PRINT_ER("[wilc spi]: Failed internal read protocol with CRC on, retyring with CRC off...\n"); if (!spi_internal_read(WILC_SPI_PROTOCOL_OFFSET, ®)) { /* Reaad failed with both CRC on and off, something went bad */ - PRINT_ER("[wilc spi]: Failed internal read protocol...\n", __LINE__); + PRINT_ER("[wilc spi]: Failed internal read protocol...\n"); return 0; } } diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 92ed42ad49ac..badc8743dd1a 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -894,8 +894,6 @@ INLINE void chip_wakeup(void) #endif void chip_sleep_manually(WILC_Uint32 u32SleepTime) { - uint32_t val32; - if (genuChipPSstate != CHIP_WAKEDUP) { /* chip is already sleeping. Do nothing */ return; @@ -2302,7 +2300,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) #else g_wlan.tx_buffer = (uint8_t *)g_wlan.os_func.os_malloc(g_wlan.tx_buffer_size); #endif - PRINT_D(TX_DBG, "g_wlan.tx_buffer = 0x%x\n", g_wlan.tx_buffer); + PRINT_D(TX_DBG, "g_wlan.tx_buffer = %p\n", g_wlan.tx_buffer); if (g_wlan.tx_buffer == WILC_NULL) { /* ENOBUFS 105 */ @@ -2319,7 +2317,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) #else g_wlan.rx_buffer = (uint8_t *)g_wlan.os_func.os_malloc(g_wlan.rx_buffer_size); #endif - PRINT_D(TX_DBG, "g_wlan.rx_buffer =0x%x\n", g_wlan.rx_buffer); + PRINT_D(TX_DBG, "g_wlan.rx_buffer =%p\n", g_wlan.rx_buffer); if (g_wlan.rx_buffer == WILC_NULL) { /* ENOBUFS 105 */ ret = -105; -- cgit v1.2.3-59-g8ed1b From b1413b6084faa677bc122549aba50e38e11343d3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 2 Jun 2015 14:11:12 +0900 Subject: staging: wilc100: remove WILC_NULL usage Use the "real" NULL value, don't try to be cute and define your own value for something that the compiler obviously supports. Cc: Johnny Kim Cc: Rachel Kim Cc: Dean Lee Cc: Chris Park Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigurator.c | 22 +- drivers/staging/wilc1000/host_interface.c | 298 +++++++++++----------- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_errorsupport.h | 2 +- drivers/staging/wilc1000/wilc_memory.c | 6 +- drivers/staging/wilc1000/wilc_memory.h | 30 +-- drivers/staging/wilc1000/wilc_oswrapper.h | 2 - drivers/staging/wilc1000/wilc_strutils.c | 6 +- drivers/staging/wilc1000/wilc_strutils.h | 6 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 46 ++-- drivers/staging/wilc1000/wilc_wlan.c | 16 +- 11 files changed, 217 insertions(+), 219 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index bf444825711f..832230a51b02 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -771,7 +771,7 @@ WILC_Uint8 get_current_channel(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen) WILC_Sint32 ParseNetworkInfo(WILC_Uint8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) { WILC_Sint32 s32Error = WILC_SUCCESS; - tstrNetworkInfo *pstrNetworkInfo = WILC_NULL; + tstrNetworkInfo *pstrNetworkInfo = NULL; WILC_Uint8 u8MsgType = 0; WILC_Uint8 u8MsgID = 0; WILC_Uint16 u16MsgLen = 0; @@ -894,16 +894,16 @@ WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo) { WILC_Sint32 s32Error = WILC_SUCCESS; - if (pstrNetworkInfo != WILC_NULL) { - if (pstrNetworkInfo->pu8IEs != WILC_NULL) { + if (pstrNetworkInfo != NULL) { + if (pstrNetworkInfo->pu8IEs != NULL) { WILC_FREE(pstrNetworkInfo->pu8IEs); - pstrNetworkInfo->pu8IEs = WILC_NULL; + pstrNetworkInfo->pu8IEs = NULL; } else { s32Error = WILC_FAIL; } WILC_FREE(pstrNetworkInfo); - pstrNetworkInfo = WILC_NULL; + pstrNetworkInfo = NULL; } else { s32Error = WILC_FAIL; @@ -927,7 +927,7 @@ WILC_Sint32 ParseAssocRespInfo(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32BufferLen, tstrConnectRespInfo **ppstrConnectRespInfo) { WILC_Sint32 s32Error = WILC_SUCCESS; - tstrConnectRespInfo *pstrConnectRespInfo = WILC_NULL; + tstrConnectRespInfo *pstrConnectRespInfo = NULL; WILC_Uint16 u16AssocRespLen = 0; WILC_Uint8 *pu8IEs = 0; WILC_Uint16 u16IEsLen = 0; @@ -979,16 +979,16 @@ WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo) { WILC_Sint32 s32Error = WILC_SUCCESS; - if (pstrConnectRespInfo != WILC_NULL) { - if (pstrConnectRespInfo->pu8RespIEs != WILC_NULL) { + if (pstrConnectRespInfo != NULL) { + if (pstrConnectRespInfo->pu8RespIEs != NULL) { WILC_FREE(pstrConnectRespInfo->pu8RespIEs); - pstrConnectRespInfo->pu8RespIEs = WILC_NULL; + pstrConnectRespInfo->pu8RespIEs = NULL; } else { s32Error = WILC_FAIL; } WILC_FREE(pstrConnectRespInfo); - pstrConnectRespInfo = WILC_NULL; + pstrConnectRespInfo = NULL; } else { s32Error = WILC_FAIL; @@ -1060,7 +1060,7 @@ WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults) { WILC_Sint32 s32Error = WILC_SUCCESS; - if (pstrSurveyResults != WILC_NULL) { + if (pstrSurveyResults != NULL) { WILC_FREE(pstrSurveyResults); } diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 6d9bd4983e90..462bb10e930b 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -537,8 +537,8 @@ typedef enum { /*****************************************************************************/ -tstrWILC_WFIDrv *terminated_handle = WILC_NULL; -tstrWILC_WFIDrv *gWFiDrvHandle = WILC_NULL; +tstrWILC_WFIDrv *terminated_handle = NULL; +tstrWILC_WFIDrv *gWFiDrvHandle = NULL; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP WILC_Bool g_obtainingIP = WILC_FALSE; #endif @@ -1299,7 +1299,7 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs } pu8HdnNtwrksWidVal = WILC_MALLOC(valuesize + 1); strWIDList[u32WidsCount].ps8WidVal = pu8HdnNtwrksWidVal; - if (strWIDList[u32WidsCount].ps8WidVal != WILC_NULL) { + if (strWIDList[u32WidsCount].ps8WidVal != NULL) { pu8Buffer = strWIDList[u32WidsCount].ps8WidVal; *pu8Buffer++ = pstrHostIFscanAttr->strHiddenNetwork.u8ssidnum; @@ -1383,7 +1383,7 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs WILC_CATCH(s32Error) { - WILC_TimerStop(&(pstrWFIDrv->hScanTimer), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hScanTimer), NULL); /*if there is an ongoing scan request*/ Handle_ScanDone(drvHandler, SCAN_EVENT_ABORTED); } @@ -1467,7 +1467,7 @@ static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) /*if there is an ongoing scan request*/ if (pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult) { - pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult(enuEvent, WILC_NULL, + pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult(enuEvent, NULL, pstrWFIDrv->strWILC_UsrScanReq.u32UserScanPvoid, NULL); /*delete current scan request*/ pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult = NULL; @@ -1497,9 +1497,9 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH WILC_Sint32 s32Err = WILC_SUCCESS; WILC_Uint32 i; WILC_Uint8 u8bssDscListIndex; - wid_site_survey_reslts_s *pstrSurveyResults = WILC_NULL; + wid_site_survey_reslts_s *pstrSurveyResults = NULL; #else - WILC_Uint8 *pu8CurrByte = WILC_NULL; + WILC_Uint8 *pu8CurrByte = NULL; /*Bug4218: Parsing Join Param*/ #ifdef WILC_PARSE_SCAN_IN_HOST tstrJoinBssParam *ptstrJoinBssParam; @@ -1799,7 +1799,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH strWIDList[u32WidsCount].s32ValueSize = MAX_SSID_LEN + 7; strWIDList[u32WidsCount].ps8WidVal = WILC_MALLOC(strWIDList[u32WidsCount].s32ValueSize); - if (strWIDList[u32WidsCount].ps8WidVal == WILC_NULL) { + if (strWIDList[u32WidsCount].ps8WidVal == NULL) { WILC_ERRORREPORT(s32Error, WILC_NO_MEM); } @@ -1838,7 +1838,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH gu32FlushedJoinReqSize = strWIDList[u32WidsCount].s32ValueSize; gu8FlushedJoinReq = WILC_MALLOC(gu32FlushedJoinReqSize); } - if (strWIDList[u32WidsCount].ps8WidVal == WILC_NULL) { + if (strWIDList[u32WidsCount].ps8WidVal == NULL) { WILC_ERRORREPORT(s32Error, WILC_NO_MEM); } @@ -2004,7 +2004,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH { tstrConnectInfo strConnectInfo; - WILC_TimerStop(&(pstrWFIDrv->hConnectTimer), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hConnectTimer), NULL); PRINT_D(HOSTINF_DBG, "could not start connecting to the required network\n"); @@ -2060,7 +2060,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH pstrHostIFconnectAttr->pu8IEs = NULL; } - if (pu8CurrByte != WILC_NULL) { + if (pu8CurrByte != NULL) { WILC_FREE(pu8CurrByte); } return s32Error; @@ -2082,7 +2082,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWIDList[5]; WILC_Uint32 u32WidsCount = 0; - WILC_Uint8 *pu8CurrByte = WILC_NULL; + WILC_Uint8 *pu8CurrByte = NULL; /* IEs to be inserted in Association Request */ @@ -2276,7 +2276,7 @@ static WILC_Sint32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *p PRINT_D(HOSTINF_DBG, "State: Scanning, parsing network information received\n"); ParseNetworkInfo(pstrRcvdNetworkInfo->pu8Buffer, &pstrNetworkInfo); if ((pstrNetworkInfo == NULL) - || (pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult == WILC_NULL)) { + || (pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult == NULL)) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -2358,9 +2358,9 @@ done: } /*free structure allocated*/ - if (pstrNetworkInfo != WILC_NULL) { + if (pstrNetworkInfo != NULL) { DeallocateNetworkInfo(pstrNetworkInfo); - pstrNetworkInfo = WILC_NULL; + pstrNetworkInfo = NULL; } return s32Error; @@ -2402,7 +2402,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI (pstrWFIDrv->enuHostIFstate == HOST_IF_CONNECTED) || pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult) { if ((pstrRcvdGnrlAsyncInfo->pu8Buffer == NULL) || - (pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult == WILC_NULL)) { + (pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult == NULL)) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -2518,7 +2518,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI } - WILC_TimerStop(&(pstrWFIDrv->hConnectTimer), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hConnectTimer), NULL); pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult(CONN_DISCONN_EVENT_CONN_RESP, &strConnectInfo, u8MacStatus, @@ -2542,7 +2542,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP PRINT_D(GENERIC_DBG, "Obtaining an IP, Disable Scan\n"); g_obtainingIP = WILC_TRUE; - WILC_TimerStart(&hDuringIpTimer, 10000, WILC_NULL, WILC_NULL); + WILC_TimerStart(&hDuringIpTimer, 10000, NULL, NULL); #endif #ifdef WILC_PARSE_SCAN_IN_HOST @@ -2597,7 +2597,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI if (pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult) { PRINT_D(HOSTINF_DBG, "\n\n<< Abort the running OBSS Scan >> \n\n"); - WILC_TimerStop(&(pstrWFIDrv->hScanTimer), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hScanTimer), NULL); Handle_ScanDone((void *)pstrWFIDrv, SCAN_EVENT_ABORTED); } @@ -2674,7 +2674,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI PRINT_D(HOSTINF_DBG, "Received MAC_DISCONNECTED from the FW while scanning\n"); PRINT_D(HOSTINF_DBG, "\n\n<< Abort the running Scan >> \n\n"); /*Abort the running scan*/ - WILC_TimerStop(&(pstrWFIDrv->hScanTimer), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hScanTimer), NULL); if (pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult) { Handle_ScanDone((void *)pstrWFIDrv, SCAN_EVENT_ABORTED); @@ -3110,11 +3110,11 @@ static void Handle_Disconnect(void *drvHandler) strDisconnectNotifInfo.ie_len = 0; if (pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult) { - WILC_TimerStop(&(pstrWFIDrv->hScanTimer), WILC_NULL); - pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_ABORTED, WILC_NULL, + WILC_TimerStop(&(pstrWFIDrv->hScanTimer), NULL); + pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_ABORTED, NULL, pstrWFIDrv->strWILC_UsrScanReq.u32UserScanPvoid, NULL); - pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult = WILC_NULL; + pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult = NULL; } if (pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult != NULL) { @@ -3123,7 +3123,7 @@ static void Handle_Disconnect(void *drvHandler) /*Stop connect timer, if connection in progress*/ if (pstrWFIDrv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) { PRINT_D(HOSTINF_DBG, "Upper layer requested termination of connection\n"); - WILC_TimerStop(&(pstrWFIDrv->hConnectTimer), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hConnectTimer), NULL); } pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult(CONN_DISCONN_EVENT_DISCONN_NOTIF, NULL, @@ -3187,7 +3187,7 @@ void resolve_disconnect_aberration(void *drvHandler) tstrWILC_WFIDrv *pstrWFIDrv; pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - if (pstrWFIDrv == WILC_NULL) + if (pstrWFIDrv == NULL) return; if ((pstrWFIDrv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) || (pstrWFIDrv->enuHostIFstate == HOST_IF_CONNECTING)) { PRINT_D(HOSTINF_DBG, "\n\n<< correcting Supplicant state machine >>\n\n"); @@ -3879,7 +3879,7 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos strWID.s32ValueSize = 2; strWID.ps8WidVal = (WILC_Sint8 *)WILC_MALLOC(strWID.s32ValueSize); - if (strWID.ps8WidVal == WILC_NULL) { + if (strWID.ps8WidVal == NULL) { WILC_ERRORREPORT(s32Error, WILC_NO_MEM); } @@ -3895,7 +3895,7 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos WILC_CATCH(-1) { P2P_LISTEN_STATE = 1; - WILC_TimerStart(&(pstrWFIDrv->hRemainOnChannel), pstrHostIfRemainOnChan->u32duration, (void *)pstrWFIDrv, WILC_NULL); + WILC_TimerStart(&(pstrWFIDrv->hRemainOnChannel), pstrHostIfRemainOnChan->u32duration, (void *)pstrWFIDrv, NULL); /*Calling CFG ready_on_channel*/ if (pstrWFIDrv->strHostIfRemainOnChan.pRemainOnChanReady) { @@ -3989,7 +3989,7 @@ static WILC_Uint32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainO strWID.s32ValueSize = 2; strWID.ps8WidVal = WILC_MALLOC(strWID.s32ValueSize); - if (strWID.ps8WidVal == WILC_NULL) { + if (strWID.ps8WidVal == NULL) { PRINT_ER("Failed to allocate memory\n"); } @@ -4033,7 +4033,7 @@ static void ListenTimerCB(void *pvArg) tstrHostIFmsg strHostIFmsg; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)pvArg; /*Stopping remain-on-channel timer*/ - WILC_TimerStop(&(pstrWFIDrv->hRemainOnChannel), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hRemainOnChannel), NULL); /* prepare the Timer Callback message */ WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); @@ -4042,7 +4042,7 @@ static void ListenTimerCB(void *pvArg) strHostIFmsg.uniHostIFmsgBody.strHostIfRemainOnChan.u32ListenSessionID = pstrWFIDrv->strHostIfRemainOnChan.u32ListenSessionID; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -4379,7 +4379,7 @@ static int hostIFthread(void *pvArg) WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); while (1) { - WILC_MsgQueueRecv(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), &u32Ret, WILC_NULL); + WILC_MsgQueueRecv(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), &u32Ret, NULL); pstrWFIDrv = (tstrWILC_WFIDrv *)strHostIFmsg.drvHandler; if (strHostIFmsg.u16MsgId == HOST_IF_MSG_EXIT) { PRINT_D(GENERIC_DBG, "THREAD: Exiting HostIfThread\n"); @@ -4391,13 +4391,13 @@ static int hostIFthread(void *pvArg) if ((!g_wilc_initialized)) { PRINT_D(GENERIC_DBG, "--WAIT--"); WILC_Sleep(200); - WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); continue; } if (strHostIFmsg.u16MsgId == HOST_IF_MSG_CONNECT && pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult != NULL) { PRINT_D(HOSTINF_DBG, "Requeue connect request till scan done received\n"); - WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); WILC_Sleep(2); continue; } @@ -4446,7 +4446,7 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_RCVD_SCAN_COMPLETE: - WILC_TimerStop(&(pstrWFIDrv->hScanTimer), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hScanTimer), NULL); PRINT_D(HOSTINF_DBG, "scan completed successfully\n"); /*BugID_5213*/ @@ -4604,7 +4604,7 @@ static void TimerCB_Scan(void *pvArg) strHostIFmsg.u16MsgId = HOST_IF_MSG_SCAN_TIMER_FIRED; /* send the message */ - WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); } static void TimerCB_Connect(void *pvArg) @@ -4617,7 +4617,7 @@ static void TimerCB_Connect(void *pvArg) strHostIFmsg.u16MsgId = HOST_IF_MSG_CONNECT_TIMER_FIRED; /* send the message */ - WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); } @@ -4670,7 +4670,7 @@ WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8keyI tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -4689,7 +4689,7 @@ WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8keyI uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8keyIdx; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Error in sending message queue : Request to remove WEP key \n"); down(&(pstrWFIDrv->hSemTestKeyBlock)); @@ -4720,7 +4720,7 @@ WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -4738,7 +4738,7 @@ WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Index; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Error in sending message queue : Default key index\n"); down(&(pstrWFIDrv->hSemTestKeyBlock)); @@ -4777,7 +4777,7 @@ WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const WILC_U tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -4806,7 +4806,7 @@ WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const WILC_U uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Keyidx; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Error in sending message queue :WEP Key\n"); down(&(pstrWFIDrv->hSemTestKeyBlock)); @@ -4844,7 +4844,7 @@ WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const WILC_Ui tstrHostIFmsg strHostIFmsg; WILC_Uint8 i; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -4882,7 +4882,7 @@ WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const WILC_Ui strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr. uniHostIFkeyAttr.strHostIFwepAttr.tenuAuth_type = tenuAuth_type; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Error in sending message queue :WEP Key\n"); @@ -4920,7 +4920,7 @@ WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, WILC_U tstrHostIFmsg strHostIFmsg; WILC_Uint8 u8KeyLen = u8PtkKeylen; WILC_Uint32 i; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } if (pu8RxMic != NULL) { @@ -4983,7 +4983,7 @@ WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, WILC_U strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Error in sending message queue: PTK Key\n"); @@ -5023,7 +5023,7 @@ WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, W tstrHostIFmsg strHostIFmsg; WILC_Uint8 u8KeyLen = u8GtkKeylen; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } /* prepare the Key Message */ @@ -5089,7 +5089,7 @@ WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, W /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Error in sending message queue: RX GTK\n"); /* ////////////// */ @@ -5126,7 +5126,7 @@ WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8KeyLen, tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -5146,7 +5146,7 @@ WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8KeyLen, strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen = u8KeyLen; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Error in sending message queue: TX GTK\n"); @@ -5190,7 +5190,7 @@ WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAt WILC_Uint32 i; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -5212,7 +5212,7 @@ WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAt } /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER(" Error in sending messagequeue: PMKID Info\n"); @@ -5316,7 +5316,7 @@ WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8Ma strHostIFmsg.uniHostIFmsgBody.strHostIfGetMacAddress.u8MacAddress = pu8MacAddress; strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Failed to send get mac address\n"); return WILC_FAIL; @@ -5350,7 +5350,7 @@ WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8Ma WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIfSetMacAddress.u8MacAddress, pu8MacAddress, ETH_ALEN); strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Failed to send message queue: Set mac address\n"); WILC_ERRORREPORT(s32Error, s32Error); @@ -5543,7 +5543,7 @@ WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8bssi tstrHostIFmsg strHostIFmsg; tenuScanConnTimer enuScanConnTimer; - if (pstrWFIDrv == WILC_NULL || pfConnectResult == WILC_NULL) { + if (pstrWFIDrv == NULL || pfConnectResult == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -5603,14 +5603,14 @@ WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8bssi PRINT_D(GENERIC_DBG, "Don't set state to 'connecting' as state is %d\n", pstrWFIDrv->enuHostIFstate); /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Failed to send message queue: Set join request\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); } enuScanConnTimer = CONNECT_TIMER; - WILC_TimerStart(&(pstrWFIDrv->hConnectTimer), HOST_IF_CONNECT_TIMEOUT, (void *) hWFIDrv, WILC_NULL); + WILC_TimerStart(&(pstrWFIDrv->hConnectTimer), HOST_IF_CONNECT_TIMEOUT, (void *) hWFIDrv, NULL); WILC_CATCH(s32Error) { @@ -5643,7 +5643,7 @@ WILC_Sint32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv) } - if (hWFIDrv == WILC_NULL) { + if (hWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -5652,7 +5652,7 @@ WILC_Sint32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv) strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Failed to send message queue: Flush join request\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -5682,7 +5682,7 @@ WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16Reason tstrHostIFmsg strHostIFmsg; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { PRINT_ER("Driver not initialized: pstrWFIDrv = NULL \n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -5699,7 +5699,7 @@ WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16Reason strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Failed to send message queue: disconnect\n"); /* ////////////// */ @@ -5799,7 +5799,7 @@ WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *p tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { PRINT_ER("Driver not initialized: pstrWFIDrv = NULL \n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -5879,7 +5879,7 @@ WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8Ch tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -5889,7 +5889,7 @@ WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8Ch strHostIFmsg.uniHostIFmsgBody.strHostIFSetChan.u8SetChan = u8ChNum; strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -5912,7 +5912,7 @@ WILC_Sint32 host_int_wait_msg_queue_idle(void) WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); strHostIFmsg.u16MsgId = HOST_IF_MSG_Q_IDLE; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -5942,7 +5942,7 @@ WILC_Sint32 host_int_set_wfi_drv_handler(WILC_Uint32 u32address) strHostIFmsg.uniHostIFmsgBody.strHostIfSetDrvHandler.u32Address = u32address; /* strHostIFmsg.drvHandler=hWFIDrv; */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -5970,7 +5970,7 @@ WILC_Sint32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u strHostIFmsg.uniHostIFmsgBody.strHostIfSetOperationMode.u32Mode = u32mode; strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -6003,7 +6003,7 @@ WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { PRINT_ER("Driver not initialized: pstrWFIDrv = NULL \n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -6015,7 +6015,7 @@ WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Failed to send get host channel param's message queue "); down(&(pstrWFIDrv->hSemGetCHNL)); @@ -6050,7 +6050,7 @@ WILC_Sint32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32 tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { PRINT_ER("Driver not initialized: pstrWFIDrv = NULL \n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -6096,7 +6096,7 @@ WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { PRINT_ER("Driver not initialized: pstrWFIDrv = NULL \n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -6111,7 +6111,7 @@ WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) PRINT_ER("Failed to send get host channel param's message queue "); @@ -6144,7 +6144,7 @@ WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 *pu tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { PRINT_ER("Driver not initialized: pstrWFIDrv = NULL \n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -6199,7 +6199,7 @@ WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8Rssi) strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Failed to send get host channel param's message queue "); return WILC_FAIL; @@ -6236,7 +6236,7 @@ WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8ln strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Failed to send GET_LINKSPEED to message queue "); return WILC_FAIL; @@ -6270,7 +6270,7 @@ WILC_Sint32 host_int_get_statistics(WILC_WFIDrvHandle hWFIDrv, tstrStatistics *p strHostIFmsg.uniHostIFmsgBody.pUserData = (WILC_Char *)pstrStatistics; strHostIFmsg.drvHandler = hWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Failed to send get host channel param's message queue "); return WILC_FAIL; @@ -6308,7 +6308,7 @@ WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8ScanSource, tstrHostIFmsg strHostIFmsg; tenuScanConnTimer enuScanConnTimer; - if (pstrWFIDrv == WILC_NULL || ScanResult == WILC_NULL) { + if (pstrWFIDrv == NULL || ScanResult == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -6342,7 +6342,7 @@ WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8ScanSource, pu8IEs, IEsLen); /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Error in sending message queue scanning parameters: Error(%d)\n", s32Error); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -6350,7 +6350,7 @@ WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8ScanSource, enuScanConnTimer = SCAN_TIMER; PRINT_D(HOSTINF_DBG, ">> Starting the SCAN timer\n"); - WILC_TimerStart(&(pstrWFIDrv->hScanTimer), HOST_IF_SCAN_TIMEOUT, (void *) hWFIDrv, WILC_NULL); + WILC_TimerStart(&(pstrWFIDrv->hScanTimer), HOST_IF_SCAN_TIMEOUT, (void *) hWFIDrv, NULL); WILC_CATCH(s32Error) @@ -6380,7 +6380,7 @@ WILC_Sint32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParam tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } /* prepare the WiphyParams Message */ @@ -6389,7 +6389,7 @@ WILC_Sint32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParam strHostIFmsg.uniHostIFmsgBody.strHostIFCfgParamAttr.pstrCfgParamVal = *pstrCfgParamVal; strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); WILC_CATCH(s32Error) { @@ -6420,7 +6420,7 @@ WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint down(&(pstrWFIDrv->gtOsCfgValuesSem)); - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { PRINT_ER("Driver not initialized: pstrWFIDrv = NULL \n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -6567,7 +6567,7 @@ void GetPeriodicRSSI(void *pvArg) strHostIFmsg.drvHandler = pstrWFIDrv; /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Failed to send get host channel param's message queue "); return; @@ -6615,7 +6615,7 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) /*Allocate host interface private structure*/ pstrWFIDrv = (tstrWILC_WFIDrv *)WILC_MALLOC(sizeof(tstrWILC_WFIDrv)); - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { /* WILC_ERRORREPORT(s32Error,WILC_NO_MEM); */ s32Error = WILC_NO_MEM; PRINT_ER("Failed to allocate memory\n"); @@ -6655,7 +6655,7 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) if (clients_count == 0) { - s32Error = WILC_MsgQueueCreate(&gMsgQHostIF, WILC_NULL); + s32Error = WILC_MsgQueueCreate(&gMsgQHostIF, NULL); if (s32Error < 0) { @@ -6669,7 +6669,7 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) s32Error = WILC_FAIL; goto _fail_mq_; } - s32Error = WILC_TimerCreate(&(g_hPeriodicRSSI), GetPeriodicRSSI, WILC_NULL); + s32Error = WILC_TimerCreate(&(g_hPeriodicRSSI), GetPeriodicRSSI, NULL); if (s32Error < 0) { PRINT_ER("Failed to creat Timer\n"); goto _fail_timer_1; @@ -6679,13 +6679,13 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) } - s32Error = WILC_TimerCreate(&(pstrWFIDrv->hScanTimer), TimerCB_Scan, WILC_NULL); + s32Error = WILC_TimerCreate(&(pstrWFIDrv->hScanTimer), TimerCB_Scan, NULL); if (s32Error < 0) { PRINT_ER("Failed to creat Timer\n"); goto _fail_thread_; } - s32Error = WILC_TimerCreate(&(pstrWFIDrv->hConnectTimer), TimerCB_Connect, WILC_NULL); + s32Error = WILC_TimerCreate(&(pstrWFIDrv->hConnectTimer), TimerCB_Connect, NULL); if (s32Error < 0) { PRINT_ER("Failed to creat Timer\n"); goto _fail_timer_1; @@ -6694,7 +6694,7 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) #ifdef WILC_P2P /*Remain on channel timer*/ - s32Error = WILC_TimerCreate(&(pstrWFIDrv->hRemainOnChannel), ListenTimerCB, WILC_NULL); + s32Error = WILC_TimerCreate(&(pstrWFIDrv->hRemainOnChannel), ListenTimerCB, NULL); if (s32Error < 0) { PRINT_ER("Failed to creat Remain-on-channel Timer\n"); goto _fail_timer_3; @@ -6757,21 +6757,21 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) _fail_mem_: - if (pstrWFIDrv != WILC_NULL) + if (pstrWFIDrv != NULL) WILC_FREE(pstrWFIDrv); #ifdef WILC_P2P _fail_timer_3: - WILC_TimerDestroy(&(pstrWFIDrv->hRemainOnChannel), WILC_NULL); + WILC_TimerDestroy(&(pstrWFIDrv->hRemainOnChannel), NULL); #endif _fail_timer_2: up(&(pstrWFIDrv->gtOsCfgValuesSem)); - WILC_TimerDestroy(&(pstrWFIDrv->hConnectTimer), WILC_NULL); + WILC_TimerDestroy(&(pstrWFIDrv->hConnectTimer), NULL); _fail_timer_1: - WILC_TimerDestroy(&(pstrWFIDrv->hScanTimer), WILC_NULL); + WILC_TimerDestroy(&(pstrWFIDrv->hScanTimer), NULL); _fail_thread_: kthread_stop(HostIFthreadHandler); _fail_mq_: - WILC_MsgQueueDestroy(&gMsgQHostIF, WILC_NULL); + WILC_MsgQueueDestroy(&gMsgQHostIF, NULL); _fail_: return s32Error; @@ -6816,37 +6816,37 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) /*BugID_5348*/ /*Destroy all timers before acquiring hSemDeinitDrvHandle*/ /*to guarantee handling all messages befor proceeding*/ - if (WILC_TimerDestroy(&(pstrWFIDrv->hScanTimer), WILC_NULL)) { + if (WILC_TimerDestroy(&(pstrWFIDrv->hScanTimer), NULL)) { PRINT_D(HOSTINF_DBG, ">> Scan timer is active \n"); /* msleep(HOST_IF_SCAN_TIMEOUT+1000); */ } - if (WILC_TimerDestroy(&(pstrWFIDrv->hConnectTimer), WILC_NULL)) { + if (WILC_TimerDestroy(&(pstrWFIDrv->hConnectTimer), NULL)) { PRINT_D(HOSTINF_DBG, ">> Connect timer is active \n"); /* msleep(HOST_IF_CONNECT_TIMEOUT+1000); */ } - if (WILC_TimerDestroy(&(g_hPeriodicRSSI), WILC_NULL)) { + if (WILC_TimerDestroy(&(g_hPeriodicRSSI), NULL)) { PRINT_D(HOSTINF_DBG, ">> Connect timer is active \n"); /* msleep(HOST_IF_CONNECT_TIMEOUT+1000); */ } #ifdef WILC_P2P /*Destroy Remain-onchannel Timer*/ - WILC_TimerDestroy(&(pstrWFIDrv->hRemainOnChannel), WILC_NULL); + WILC_TimerDestroy(&(pstrWFIDrv->hRemainOnChannel), NULL); #endif - host_int_set_wfi_drv_handler((WILC_Uint32)WILC_NULL); + host_int_set_wfi_drv_handler((WILC_Uint32)NULL); down(&hSemDeinitDrvHandle); /*Calling the CFG80211 scan done function with the abort flag set to true*/ if (pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult) { - pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_ABORTED, WILC_NULL, + pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_ABORTED, NULL, pstrWFIDrv->strWILC_UsrScanReq.u32UserScanPvoid, NULL); - pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult = WILC_NULL; + pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult = NULL; } /*deinit configurator and simulator*/ #ifdef SIMULATION @@ -6864,7 +6864,7 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); if (clients_count == 1) { - if (WILC_TimerDestroy(&g_hPeriodicRSSI, WILC_NULL)) { + if (WILC_TimerDestroy(&g_hPeriodicRSSI, NULL)) { PRINT_D(HOSTINF_DBG, ">> Connect timer is active \n"); /* msleep(HOST_IF_CONNECT_TIMEOUT+1000); */ } @@ -6872,7 +6872,7 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error != WILC_SUCCESS) { PRINT_ER("Error in sending deinit's message queue message function: Error(%d)\n", s32Error); } @@ -6881,7 +6881,7 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) - WILC_MsgQueueDestroy(&gMsgQHostIF, WILC_NULL); + WILC_MsgQueueDestroy(&gMsgQHostIF, NULL); msgQ_created = 0; } @@ -6890,14 +6890,14 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) /*Setting the gloabl driver handler with NULL*/ u32Intialized = 0; /* gWFiDrvHandle = NULL; */ - if (pstrWFIDrv != WILC_NULL) { + if (pstrWFIDrv != NULL) { WILC_FREE(pstrWFIDrv); - /* pstrWFIDrv=WILC_NULL; */ + /* pstrWFIDrv=NULL; */ } clients_count--; /* Decrease number of created entities */ - terminated_handle = WILC_NULL; + terminated_handle = NULL; up(&hSemHostIntDeinit); return s32Error; } @@ -6919,7 +6919,7 @@ void NetworkInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; WILC_Uint32 drvHandler; - tstrWILC_WFIDrv *pstrWFIDrv = WILC_NULL; + tstrWILC_WFIDrv *pstrWFIDrv = NULL; drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24)); pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -6927,7 +6927,7 @@ void NetworkInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) - if (pstrWFIDrv == WILC_NULL || pstrWFIDrv == terminated_handle) { + if (pstrWFIDrv == NULL || pstrWFIDrv == terminated_handle) { PRINT_ER("NetworkInfo received but driver not init[%x]\n", (WILC_Uint32)pstrWFIDrv); return; } @@ -6944,7 +6944,7 @@ void NetworkInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) pu8Buffer, u32Length); /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Error in sending network info message queue message parameters: Error(%d)\n", s32Error); } @@ -6969,7 +6969,7 @@ void GnrlAsyncInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; WILC_Uint32 drvHandler; - tstrWILC_WFIDrv *pstrWFIDrv = WILC_NULL; + tstrWILC_WFIDrv *pstrWFIDrv = NULL; /*BugID_5348*/ down(&hSemHostIntDeinit); @@ -6986,7 +6986,7 @@ void GnrlAsyncInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) return; } - if (pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult == WILC_NULL) { + if (pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult == NULL) { /* received mac status is not needed when there is no current Connect Request */ PRINT_ER("Received mac status is not needed when there is no current Connect Reques\n"); /*BugID_5348*/ @@ -7008,7 +7008,7 @@ void GnrlAsyncInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) pu8Buffer, u32Length); /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Error in sending message queue asynchronous message info: Error(%d)\n", s32Error); } @@ -7032,7 +7032,7 @@ void host_int_ScanCompleteReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; WILC_Uint32 drvHandler; - tstrWILC_WFIDrv *pstrWFIDrv = WILC_NULL; + tstrWILC_WFIDrv *pstrWFIDrv = NULL; drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24)); pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -7061,7 +7061,7 @@ void host_int_ScanCompleteReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) * pu8Buffer, u32Length); */ /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { PRINT_ER("Error in sending message queue scan complete parameters: Error(%d)\n", s32Error); } @@ -7093,7 +7093,7 @@ WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u3 tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7110,7 +7110,7 @@ WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u3 strHostIFmsg.uniHostIFmsgBody.strHostIfRemainOnChan.u32ListenSessionID = u32SessionID; strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7142,12 +7142,12 @@ WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } /*Stopping remain-on-channel timer*/ - WILC_TimerStop(&(pstrWFIDrv->hRemainOnChannel), WILC_NULL); + WILC_TimerStop(&(pstrWFIDrv->hRemainOnChannel), NULL); /* prepare the timer fire Message */ WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); @@ -7155,7 +7155,7 @@ WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u strHostIFmsg.drvHandler = hWFIDrv; strHostIFmsg.uniHostIFmsgBody.strHostIfRemainOnChan.u32ListenSessionID = u32SessionID; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7180,7 +7180,7 @@ WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16Fr tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7207,7 +7207,7 @@ WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16Fr strHostIFmsg.uniHostIFmsgBody.strHostIfRegisterFrame.bReg = bReg; strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7244,7 +7244,7 @@ WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interv tstrHostIFmsg strHostIFmsg; tstrHostIFSetBeacon *pstrSetBeaconParam = &strHostIFmsg.uniHostIFmsgBody.strHostIFSetBeacon; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7277,7 +7277,7 @@ WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interv pstrSetBeaconParam->pu8Tail = NULL; } - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7313,7 +7313,7 @@ WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7322,7 +7322,7 @@ WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) strHostIFmsg.drvHandler = hWFIDrv; PRINT_D(HOSTINF_DBG, "Setting deleting beacon message queue params\n"); - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); WILC_ERRORCHECK(s32Error); WILC_CATCH(s32Error) @@ -7349,7 +7349,7 @@ WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam tstrWILC_AddStaParam *pstrAddStationMsg = &strHostIFmsg.uniHostIFmsgBody.strAddStaParam; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7372,7 +7372,7 @@ WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam } - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7399,7 +7399,7 @@ WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr tstrHostIFmsg strHostIFmsg; tstrHostIFDelSta *pstrDelStationMsg = &strHostIFmsg.uniHostIFmsgBody.strDelStaParam; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7414,12 +7414,12 @@ WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr strHostIFmsg.drvHandler = hWFIDrv; /*BugID_4795: Handling situation of deleting all stations*/ - if (pu8MacAddr == WILC_NULL) + if (pu8MacAddr == NULL) WILC_memset(pstrDelStationMsg->au8MacAddr, 255, ETH_ALEN); else WILC_memcpy(pstrDelStationMsg->au8MacAddr, pu8MacAddr, ETH_ALEN); - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7449,7 +7449,7 @@ WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][E WILC_Uint8 u8AssocNumb = 0; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7476,7 +7476,7 @@ WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][E } pstrDelAllStationMsg->u8Num_AssocSta = u8AssocNumb; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { @@ -7509,7 +7509,7 @@ WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaPara tstrHostIFmsg strHostIFmsg; tstrWILC_AddStaParam *pstrAddStationMsg = &strHostIFmsg.uniHostIFmsgBody.strAddStaParam; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7530,7 +7530,7 @@ WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaPara pstrAddStationMsg->pu8Rates = rates; } - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7551,7 +7551,7 @@ WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnab PRINT_INFO(HOSTINF_DBG, "\n\n>> Setting PS to %d << \n\n", bIsEnabled); - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7568,7 +7568,7 @@ WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnab pstrPowerMgmtParam->u32Timeout = u32Timeout; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7587,7 +7587,7 @@ WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool tstrHostIFSetMulti *pstrMulticastFilterParam = &strHostIFmsg.uniHostIFmsgBody.strHostIfSetMulti; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7603,7 +7603,7 @@ WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool pstrMulticastFilterParam->bIsEnabled = bIsEnabled; pstrMulticastFilterParam->u32count = u32count; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7858,7 +7858,7 @@ static int host_int_addBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char T tstrHostIFmsg strHostIFmsg; tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7873,7 +7873,7 @@ static int host_int_addBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char T pBASessionInfo->u16SessionTimeout = SessionTimeout; strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7893,7 +7893,7 @@ WILC_Sint32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char tstrHostIFmsg strHostIFmsg; tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7906,7 +7906,7 @@ WILC_Sint32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char pBASessionInfo->u8Ted = TID; strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7928,7 +7928,7 @@ WILC_Sint32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSI tstrHostIFmsg strHostIFmsg; tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7941,7 +7941,7 @@ WILC_Sint32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSI pBASessionInfo->u8Ted = TID; strHostIFmsg.drvHandler = hWFIDrv; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -7973,7 +7973,7 @@ WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *u16i /* TODO: Enable This feature on softap firmware */ return 0; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -7986,7 +7986,7 @@ WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *u16i strHostIFmsg.drvHandler = hWFIDrv; strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.idx = idx; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } @@ -8014,7 +8014,7 @@ WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *u16ipa tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - if (pstrWFIDrv == WILC_NULL) { + if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -8027,7 +8027,7 @@ WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *u16ipa strHostIFmsg.drvHandler=hWFIDrv; strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.idx= idx; - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), WILC_NULL); + s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { WILC_ERRORREPORT(s32Error, s32Error); } diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 46c7e4f3471d..b92626ed02e1 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -304,7 +304,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) { pstrWFIDrv->IFC_UP = 1; g_obtainingIP = WILC_FALSE; - WILC_TimerStop(&hDuringIpTimer, WILC_NULL); + WILC_TimerStop(&hDuringIpTimer, NULL); PRINT_D(GENERIC_DBG, "IP obtained , enable scan\n"); } diff --git a/drivers/staging/wilc1000/wilc_errorsupport.h b/drivers/staging/wilc1000/wilc_errorsupport.h index 4da657d17020..dd8affabc80d 100644 --- a/drivers/staging/wilc1000/wilc_errorsupport.h +++ b/drivers/staging/wilc1000/wilc_errorsupport.h @@ -55,7 +55,7 @@ typedef WILC_Sint32 WILC_ErrNo; } while (0) #define WILC_NULLCHECK(__status__, __ptr__) do { \ - if (__ptr__ == WILC_NULL) { \ + if (__ptr__ == NULL) { \ WILC_ERRORREPORT(__status__, WILC_NULL_PTR); \ } \ } while (0) diff --git a/drivers/staging/wilc1000/wilc_memory.c b/drivers/staging/wilc1000/wilc_memory.c index f5f4b7acc993..f44827528667 100644 --- a/drivers/staging/wilc1000/wilc_memory.c +++ b/drivers/staging/wilc1000/wilc_memory.c @@ -12,7 +12,7 @@ void *WILC_MemoryAlloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, if (u32Size > 0) { return kmalloc(u32Size, GFP_ATOMIC); } else { - return WILC_NULL; + return NULL; } } @@ -37,8 +37,8 @@ void *WILC_MemoryRealloc(void *pvOldBlock, WILC_Uint32 u32NewSize, { if (u32NewSize == 0) { kfree(pvOldBlock); - return WILC_NULL; - } else if (pvOldBlock == WILC_NULL) { + return NULL; + } else if (pvOldBlock == NULL) { return kmalloc(u32NewSize, GFP_KERNEL); } else { return krealloc(pvOldBlock, u32NewSize, GFP_KERNEL); diff --git a/drivers/staging/wilc1000/wilc_memory.h b/drivers/staging/wilc1000/wilc_memory.h index 4038e1f3e30b..6f404ac272a1 100644 --- a/drivers/staging/wilc1000/wilc_memory.h +++ b/drivers/staging/wilc1000/wilc_memory.h @@ -121,27 +121,27 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, */ #define WILC_MALLOC_EX(__size__, __attrs__) \ (WILC_MemoryAlloc( \ - (__size__), __attrs__, WILC_NULL, 0)) + (__size__), __attrs__, NULL, 0)) /*! * @brief standrad calloc wrapper with custom attributes */ #define WILC_CALLOC_EX(__size__, __attrs__) \ (WILC_MemoryCalloc( \ - (__size__), __attrs__, WILC_NULL, 0)) + (__size__), __attrs__, NULL, 0)) /*! * @brief standrad realloc wrapper with custom attributes */ #define WILC_REALLOC_EX(__ptr__, __new_size__, __attrs__) \ (WILC_MemoryRealloc( \ - (__ptr__), (__new_size__), __attrs__, WILC_NULL, 0)) + (__ptr__), (__new_size__), __attrs__, NULL, 0)) /*! * @brief standrad free wrapper with custom attributes */ #define WILC_FREE_EX(__ptr__, __attrs__) \ (WILC_MemoryFree( \ - (__ptr__), __attrs__, WILC_NULL, 0)) + (__ptr__), __attrs__, NULL, 0)) /*! * @brief Allocates a block (with custom attributes) of given type and number of @@ -164,9 +164,9 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, * to NULL */ #define WILC_FREE_SET_NULL_EX(__ptr__, __attrs__) do { \ - if (__ptr__ != WILC_NULL) { \ + if (__ptr__ != NULL) { \ WILC_FREE_EX(__ptr__, __attrs__); \ - __ptr__ = WILC_NULL; \ + __ptr__ = NULL; \ } \ } while (0) @@ -175,7 +175,7 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, * to true */ #define WILC_FREE_IF_TRUE_EX(__ptr__, __attrs__) do { \ - if (__ptr__ != WILC_NULL) { \ + if (__ptr__ != NULL) { \ WILC_FREE_EX(__ptr__, __attrs__); \ } \ } while (0) @@ -184,53 +184,53 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, * @brief standrad malloc wrapper with default attributes */ #define WILC_MALLOC(__size__) \ - WILC_MALLOC_EX(__size__, WILC_NULL) + WILC_MALLOC_EX(__size__, NULL) /*! * @brief standrad calloc wrapper with default attributes */ #define WILC_CALLOC(__size__) \ - WILC_CALLOC_EX(__size__, WILC_NULL) + WILC_CALLOC_EX(__size__, NULL) /*! * @brief standrad realloc wrapper with default attributes */ #define WILC_REALLOC(__ptr__, __new_size__) \ - WILC_REALLOC_EX(__ptr__, __new_size__, WILC_NULL) + WILC_REALLOC_EX(__ptr__, __new_size__, NULL) /*! * @brief standrad free wrapper with default attributes */ #define WILC_FREE(__ptr__) \ - WILC_FREE_EX(__ptr__, WILC_NULL) + WILC_FREE_EX(__ptr__, NULL) /*! * @brief Allocates a block (with default attributes) of given type and number of * elements */ #define WILC_NEW(__struct_type__, __n_structs__) \ - WILC_NEW_EX(__struct_type__, __n_structs__, WILC_NULL) + WILC_NEW_EX(__struct_type__, __n_structs__, NULL) /*! * @brief Allocates a block (with default attributes) of given type and number of * elements and Zero-fills it */ #define WILC_NEW_0(__struct_type__, __n_structs__) \ - WILC_NEW_O_EX(__struct_type__, __n_structs__, WILC_NULL) + WILC_NEW_O_EX(__struct_type__, __n_structs__, NULL) /*! * @brief Frees a block (with default attributes), also setting the original pointer * to NULL */ #define WILC_FREE_SET_NULL(__ptr__) \ - WILC_FREE_SET_NULL_EX(__ptr__, WILC_NULL) + WILC_FREE_SET_NULL_EX(__ptr__, NULL) /*! * @brief Frees a block (with default attributes) if the pointer expression evaluates * to true */ #define WILC_FREE_IF_TRUE(__ptr__) \ - WILC_FREE_IF_TRUE_EX(__ptr__, WILC_NULL) + WILC_FREE_IF_TRUE_EX(__ptr__, NULL) #endif diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h index a2ccf43a4a96..3cdc05305109 100644 --- a/drivers/staging/wilc1000/wilc_oswrapper.h +++ b/drivers/staging/wilc1000/wilc_oswrapper.h @@ -32,8 +32,6 @@ typedef enum { /* Character types */ typedef char WILC_Char; -#define WILC_NULL ((void *)0) - /* Os Configuration File */ #include "wilc_osconfig.h" #include "wilc_platform.h" diff --git a/drivers/staging/wilc1000/wilc_strutils.c b/drivers/staging/wilc1000/wilc_strutils.c index f452fc57f71d..d349eaa2b51f 100644 --- a/drivers/staging/wilc1000/wilc_strutils.c +++ b/drivers/staging/wilc1000/wilc_strutils.c @@ -51,11 +51,11 @@ WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, { WILC_Sint32 s32Result; - if (pcStr1 == WILC_NULL && pcStr2 == WILC_NULL) { + if (pcStr1 == NULL && pcStr2 == NULL) { s32Result = 0; - } else if (pcStr1 == WILC_NULL) { + } else if (pcStr1 == NULL) { s32Result = -1; - } else if (pcStr2 == WILC_NULL) { + } else if (pcStr2 == NULL) { s32Result = 1; } else { s32Result = strncmp(pcStr1, pcStr2, u32Count); diff --git a/drivers/staging/wilc1000/wilc_strutils.h b/drivers/staging/wilc1000/wilc_strutils.h index 62bd1af9e039..8795d56adc4a 100644 --- a/drivers/staging/wilc1000/wilc_strutils.h +++ b/drivers/staging/wilc1000/wilc_strutils.h @@ -97,13 +97,13 @@ WILC_Char *WILC_strncpy(WILC_Char *pcTarget, const WILC_Char *pcSource, /*! * @brief Compares two strings up to u32Count characters - * @details Compares 2 strings reporting which is bigger, WILC_NULL is considered + * @details Compares 2 strings reporting which is bigger, NULL is considered * the smallest string, then a zero length string then all other * strings depending on thier ascii characters order with small case * converted to uppder case - * @param[in] pcStr1 the first string, WILC_NULL is valid and considered smaller + * @param[in] pcStr1 the first string, NULL is valid and considered smaller * than any other non-NULL string (incliding zero lenght strings) - * @param[in] pcStr2 the second string, WILC_NULL is valid and considered smaller + * @param[in] pcStr2 the second string, NULL is valid and considered smaller * than any other non-NULL string (incliding zero lenght strings) * @param[in] u32Count copying will proceed until a null character in pcStr1 or * pcStr2 is encountered or u32Count of bytes copied diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e9ab2cb35381..aa71b2708569 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -148,7 +148,7 @@ void clear_shadow_scan(void *pUserVoid) int i; priv = (struct WILC_WFI_priv *)pUserVoid; if (op_ifcs == 0) { - WILC_TimerDestroy(&hAgingTimer, WILC_NULL); + WILC_TimerDestroy(&hAgingTimer, NULL); PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n"); for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { @@ -198,7 +198,7 @@ void refresh_scan(void *pUserVoid, uint8_t all, WILC_Bool bDirectScan) WILC_Sint32 s32Freq; struct ieee80211_channel *channel; - if (pstrNetworkInfo != WILC_NULL) { + if (pstrNetworkInfo != NULL) { s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ); channel = ieee80211_get_channel(wiphy, s32Freq); @@ -266,7 +266,7 @@ void remove_network_from_shadow(void *pUserVoid) PRINT_D(CFG80211_DBG, "Number of cached networks: %d\n", u32LastScannedNtwrksCountShadow); if (u32LastScannedNtwrksCountShadow != 0) - WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, WILC_NULL); + WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL); else PRINT_D(CFG80211_DBG, "No need to restart Aging timer\n"); } @@ -288,7 +288,7 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid) priv = (struct WILC_WFI_priv *)pUserVoid; if (u32LastScannedNtwrksCountShadow == 0) { PRINT_D(CFG80211_DBG, "Starting Aging timer\n"); - WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, WILC_NULL); + WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL); state = -1; } else { /* Linear search for now */ @@ -399,7 +399,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo WILC_ERRORREPORT(s32Error, WILC_FAIL); } - if (pstrNetworkInfo != WILC_NULL) { + if (pstrNetworkInfo != NULL) { s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ); channel = ieee80211_get_channel(wiphy, s32Freq); @@ -464,11 +464,11 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo down(&(priv->hSemScanReq)); - if (priv->pstrScanReq != WILC_NULL) { + if (priv->pstrScanReq != NULL) { cfg80211_scan_done(priv->pstrScanReq, WILC_FALSE); priv->u32RcvdChCount = 0; priv->bCfgScanning = WILC_FALSE; - priv->pstrScanReq = WILC_NULL; + priv->pstrScanReq = NULL; } up(&(priv->hSemScanReq)); @@ -478,14 +478,14 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo down(&(priv->hSemScanReq)); PRINT_D(CFG80211_DBG, "Scan Aborted \n"); - if (priv->pstrScanReq != WILC_NULL) { + if (priv->pstrScanReq != NULL) { update_scan_time(priv); refresh_scan(priv, 1, WILC_FALSE); cfg80211_scan_done(priv->pstrScanReq, WILC_FALSE); priv->bCfgScanning = WILC_FALSE; - priv->pstrScanReq = WILC_NULL; + priv->pstrScanReq = NULL; } up(&(priv->hSemScanReq)); } @@ -1230,14 +1230,14 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k if (priv->wilc_gtk[key_index] == NULL) { priv->wilc_gtk[key_index] = (struct wilc_wfi_key *)WILC_MALLOC(sizeof(struct wilc_wfi_key)); - priv->wilc_gtk[key_index]->key = WILC_NULL; - priv->wilc_gtk[key_index]->seq = WILC_NULL; + priv->wilc_gtk[key_index]->key = NULL; + priv->wilc_gtk[key_index]->seq = NULL; } if (priv->wilc_ptk[key_index] == NULL) { priv->wilc_ptk[key_index] = (struct wilc_wfi_key *)WILC_MALLOC(sizeof(struct wilc_wfi_key)); - priv->wilc_ptk[key_index]->key = WILC_NULL; - priv->wilc_ptk[key_index]->seq = WILC_NULL; + priv->wilc_ptk[key_index]->key = NULL; + priv->wilc_ptk[key_index]->seq = NULL; } @@ -2867,11 +2867,11 @@ int WILC_WFI_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, struct WILC_WFI_priv *priv; PRINT_D(CFG80211_DBG, " Power save Enabled= %d , TimeOut = %d\n", enabled, timeout); - if (wiphy == WILC_NULL) + if (wiphy == NULL) return -ENOENT; priv = wiphy_priv(wiphy); - if (priv->hWILCWFIDrv == WILC_NULL) { + if (priv->hWILCWFIDrv == NULL) { PRINT_ER("Driver is NULL\n"); return -EIO; } @@ -2922,7 +2922,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP g_obtainingIP = WILC_FALSE; - WILC_TimerStop(&hDuringIpTimer, WILC_NULL); + WILC_TimerStop(&hDuringIpTimer, NULL); PRINT_D(GENERIC_DBG, "Changing virtual interface, enable scan\n"); #endif /*BugID_5137*/ @@ -3165,7 +3165,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP g_obtainingIP = WILC_TRUE; - WILC_TimerStart(&hDuringIpTimer, duringIP_TIME, WILC_NULL, WILC_NULL); + WILC_TimerStart(&hDuringIpTimer, duringIP_TIME, NULL, NULL); #endif host_int_set_power_mgmt(priv->hWILCWFIDrv, 0, 0); /*BugID_5222*/ @@ -3460,7 +3460,7 @@ static int WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev, PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.u16AssocID); PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n", strStaParams.u8NumRates); - if (params->ht_capa == WILC_NULL) { + if (params->ht_capa == NULL) { strStaParams.bIsHTSupported = WILC_FALSE; } else { strStaParams.bIsHTSupported = WILC_TRUE; @@ -3533,7 +3533,7 @@ static int WILC_WFI_del_station(struct wiphy *wiphy, struct net_device *dev, PRINT_D(HOSTAPD_DBG, "Deleting station\n"); - if (mac == WILC_NULL) { + if (mac == NULL) { PRINT_D(HOSTAPD_DBG, "All associated stations \n"); s32Error = host_int_del_allstation(priv->hWILCWFIDrv, priv->assoc_stainfo.au8Sta_AssociatedBss); } else { @@ -3592,7 +3592,7 @@ static int WILC_WFI_change_station(struct wiphy *wiphy, struct net_device *dev, PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.u16AssocID); PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n", strStaParams.u8NumRates); - if (params->ht_capa == WILC_NULL) { + if (params->ht_capa == NULL) { strStaParams.bIsHTSupported = WILC_FALSE; } else { strStaParams.bIsHTSupported = WILC_TRUE; @@ -3994,9 +3994,9 @@ int WILC_WFI_InitHostInt(struct net_device *net) PRINT_D(INIT_DBG, "Host[%p][%p]\n", net, net->ieee80211_ptr); priv = wdev_priv(net->ieee80211_ptr); if (op_ifcs == 0) { - s32Error = WILC_TimerCreate(&(hAgingTimer), remove_network_from_shadow, WILC_NULL); + s32Error = WILC_TimerCreate(&(hAgingTimer), remove_network_from_shadow, NULL); #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP - s32Error = WILC_TimerCreate(&(hDuringIpTimer), clear_duringIP, WILC_NULL); + s32Error = WILC_TimerCreate(&(hDuringIpTimer), clear_duringIP, NULL); #endif } op_ifcs++; @@ -4048,7 +4048,7 @@ int WILC_WFI_DeInitHostInt(struct net_device *net) #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP if (op_ifcs == 0) { PRINT_D(CORECONFIG_DBG, "destroy during ip\n"); - WILC_TimerDestroy(&hDuringIpTimer, WILC_NULL); + WILC_TimerDestroy(&hDuringIpTimer, NULL); } #endif diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index badc8743dd1a..4055962fac81 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1899,12 +1899,12 @@ static void wilc_wlan_cleanup(void) #ifdef MEMORY_STATIC if (p->rx_buffer) { p->os_func.os_free(p->rx_buffer); - p->rx_buffer = WILC_NULL; + p->rx_buffer = NULL; } #endif if (p->tx_buffer) { p->os_func.os_free(p->tx_buffer); - p->tx_buffer = WILC_NULL; + p->tx_buffer = NULL; } #endif @@ -2294,7 +2294,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) - if (g_wlan.tx_buffer == WILC_NULL) + if (g_wlan.tx_buffer == NULL) #if (defined WILC_PREALLOC_AT_BOOT) g_wlan.tx_buffer = (uint8_t *)get_tx_buffer(); #else @@ -2302,7 +2302,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) #endif PRINT_D(TX_DBG, "g_wlan.tx_buffer = %p\n", g_wlan.tx_buffer); - if (g_wlan.tx_buffer == WILC_NULL) { + if (g_wlan.tx_buffer == NULL) { /* ENOBUFS 105 */ ret = -105; PRINT_ER("Can't allocate Tx Buffer"); @@ -2311,14 +2311,14 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) /* rx_buffer is not used unless we activate USE_MEM STATIC which is not applicable, allocating such memory is useless*/ #if defined (MEMORY_STATIC) - if (g_wlan.rx_buffer == WILC_NULL) + if (g_wlan.rx_buffer == NULL) #if (defined WILC_PREALLOC_AT_BOOT) g_wlan.rx_buffer = (uint8_t *)get_rx_buffer(); #else g_wlan.rx_buffer = (uint8_t *)g_wlan.os_func.os_malloc(g_wlan.rx_buffer_size); #endif PRINT_D(TX_DBG, "g_wlan.rx_buffer =%p\n", g_wlan.rx_buffer); - if (g_wlan.rx_buffer == WILC_NULL) { + if (g_wlan.rx_buffer == NULL) { /* ENOBUFS 105 */ ret = -105; PRINT_ER("Can't allocate Rx Buffer"); @@ -2375,12 +2375,12 @@ _fail_: #ifdef MEMORY_STATIC if (g_wlan.rx_buffer) { g_wlan.os_func.os_free(g_wlan.rx_buffer); - g_wlan.rx_buffer = WILC_NULL; + g_wlan.rx_buffer = NULL; } #endif if (g_wlan.tx_buffer) { g_wlan.os_func.os_free(g_wlan.tx_buffer); - g_wlan.tx_buffer = WILC_NULL; + g_wlan.tx_buffer = NULL; } #endif -- cgit v1.2.3-59-g8ed1b From 63d03e47730818afd09d499c3385e56cda5a513e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 2 Jun 2015 14:16:04 +0900 Subject: staging: wilc1000: remove WILC_Uint8 Just use u8, as that's what you really want in a kernel driver. Cc: Johnny Kim Cc: Rachel Kim Cc: Dean Lee Cc: Chris Park Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigurator.c | 210 +++++------ drivers/staging/wilc1000/coreconfigurator.h | 52 +-- drivers/staging/wilc1000/fifo_buffer.c | 4 +- drivers/staging/wilc1000/fifo_buffer.h | 8 +- drivers/staging/wilc1000/host_interface.c | 438 +++++++++++----------- drivers/staging/wilc1000/host_interface.h | 150 ++++---- drivers/staging/wilc1000/linux_mon.c | 12 +- drivers/staging/wilc1000/linux_wlan.c | 8 +- drivers/staging/wilc1000/wilc_msgqueue.h | 2 +- drivers/staging/wilc1000/wilc_oswrapper.h | 1 - drivers/staging/wilc1000/wilc_strutils.c | 2 +- drivers/staging/wilc1000/wilc_strutils.h | 10 +- drivers/staging/wilc1000/wilc_timer.h | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 100 ++--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 16 +- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 16 files changed, 508 insertions(+), 509 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 832230a51b02..e3e3f204624e 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -158,9 +158,9 @@ typedef struct { /* Extern Function Declarations */ /*****************************************************************************/ extern WILC_Sint32 SendRawPacket(WILC_Sint8 *ps8Packet, WILC_Sint32 s32PacketLen); -extern void NetworkInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length); -extern void GnrlAsyncInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length); -extern void host_int_ScanCompleteReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length); +extern void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); +extern void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); +extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); /*****************************************************************************/ /* Global Variables */ /*****************************************************************************/ @@ -171,13 +171,13 @@ static WILC_Sint8 *gps8ConfigPacket; static tstrConfigPktInfo gstrConfigPktInfo; -static WILC_Uint8 g_seqno; +static u8 g_seqno; static WILC_Sint16 g_wid_num = -1; static WILC_Uint16 Res_Len; -static WILC_Uint8 g_oper_mode = SET_CFG; +static u8 g_oper_mode = SET_CFG; /* WID Switches */ static tstrWID gastrWIDs[] = { @@ -318,7 +318,7 @@ WILC_Uint16 g_num_total_switches = (sizeof(gastrWIDs) / sizeof(tstrWID)); /*****************************************************************************/ /* Functions */ /*****************************************************************************/ -INLINE WILC_Uint8 ascii_hex_to_dec(WILC_Uint8 num) +INLINE u8 ascii_hex_to_dec(u8 num) { if ((num >= '0') && (num <= '9')) return (num - '0'); @@ -330,16 +330,16 @@ INLINE WILC_Uint8 ascii_hex_to_dec(WILC_Uint8 num) return INVALID; } -INLINE WILC_Uint8 get_hex_char(WILC_Uint8 inp) +INLINE u8 get_hex_char(u8 inp) { - WILC_Uint8 *d2htab = "0123456789ABCDEF"; + u8 *d2htab = "0123456789ABCDEF"; return d2htab[inp & 0xF]; } /* This function extracts the MAC address held in a string in standard format */ /* into another buffer as integers. */ -INLINE WILC_Uint16 extract_mac_addr(WILC_Char *str, WILC_Uint8 *buff) +INLINE WILC_Uint16 extract_mac_addr(WILC_Char *str, u8 *buff) { *buff = 0; while (*str != '\0') { @@ -356,14 +356,14 @@ INLINE WILC_Uint16 extract_mac_addr(WILC_Char *str, WILC_Uint8 *buff) /* This function creates MAC address in standard format from a buffer of */ /* integers. */ -INLINE void create_mac_addr(WILC_Uint8 *str, WILC_Uint8 *buff) +INLINE void create_mac_addr(u8 *str, u8 *buff) { WILC_Uint32 i = 0; WILC_Uint32 j = 0; for (i = 0; i < MAC_ADDR_LEN; i++) { - str[j++] = get_hex_char((WILC_Uint8)((buff[i] >> 4) & 0x0F)); - str[j++] = get_hex_char((WILC_Uint8)(buff[i] & 0x0F)); + str[j++] = get_hex_char((u8)((buff[i] >> 4) & 0x0F)); + str[j++] = get_hex_char((u8)(buff[i] & 0x0F)); str[j++] = ':'; } str[--j] = '\0'; @@ -375,10 +375,10 @@ INLINE void create_mac_addr(WILC_Uint8 *str, WILC_Uint8 *buff) /* inet_addr is platform independent. */ /* ips=>IP Address String in dotted decimal format */ /* ipn=>Pointer to IP Address in integer format */ -INLINE WILC_Uint8 conv_ip_to_int(WILC_Uint8 *ips, WILC_Uint32 *ipn) +INLINE u8 conv_ip_to_int(u8 *ips, WILC_Uint32 *ipn) { - WILC_Uint8 i = 0; - WILC_Uint8 ipb = 0; + u8 i = 0; + u8 ipb = 0; *ipn = 0; /* Integer to string for each component */ while (ips[i] != '\0') { @@ -402,12 +402,12 @@ INLINE WILC_Uint8 conv_ip_to_int(WILC_Uint8 *ips, WILC_Uint32 *ipn) /* decimal string format. Alternative to std library fn inet_ntoa(). */ /* ips=>Buffer to hold IP Address String dotted decimal format (Min 17B) */ /* ipn=>IP Address in integer format */ -INLINE WILC_Uint8 conv_int_to_ip(WILC_Uint8 *ips, WILC_Uint32 ipn) +INLINE u8 conv_int_to_ip(u8 *ips, WILC_Uint32 ipn) { - WILC_Uint8 i = 0; - WILC_Uint8 ipb = 0; - WILC_Uint8 cnt = 0; - WILC_Uint8 ipbsize = 0; + u8 i = 0; + u8 ipb = 0; + u8 cnt = 0; + u8 ipbsize = 0; for (cnt = 4; cnt > 0; cnt--) { ipb = (ipn >> (8 * (cnt - 1))) & 0xFF; @@ -475,7 +475,7 @@ INLINE tenuWIDtype get_wid_type(WILC_Uint32 wid_num) /* This function extracts the beacon period field from the beacon or probe */ /* response frame. */ -INLINE WILC_Uint16 get_beacon_period(WILC_Uint8 *data) +INLINE WILC_Uint16 get_beacon_period(u8 *data) { WILC_Uint16 bcn_per = 0; @@ -485,7 +485,7 @@ INLINE WILC_Uint16 get_beacon_period(WILC_Uint8 *data) return bcn_per; } -INLINE WILC_Uint32 get_beacon_timestamp_lo(WILC_Uint8 *data) +INLINE WILC_Uint32 get_beacon_timestamp_lo(u8 *data) { WILC_Uint32 time_stamp = 0; WILC_Uint32 index = MAC_HDR_LEN; @@ -514,7 +514,7 @@ INLINE UWORD32 get_beacon_timestamp_hi(UWORD8 *data) /* This function extracts the 'frame type' bits from the MAC header of the */ /* input frame. */ /* Returns the value in the LSB of the returned value. */ -INLINE tenuBasicFrmType get_type(WILC_Uint8 *header) +INLINE tenuBasicFrmType get_type(u8 *header) { return ((tenuBasicFrmType)(header[0] & 0x0C)); } @@ -522,7 +522,7 @@ INLINE tenuBasicFrmType get_type(WILC_Uint8 *header) /* This function extracts the 'frame type and sub type' bits from the MAC */ /* header of the input frame. */ /* Returns the value in the LSB of the returned value. */ -INLINE tenuFrmSubtype get_sub_type(WILC_Uint8 *header) +INLINE tenuFrmSubtype get_sub_type(u8 *header) { return ((tenuFrmSubtype)(header[0] & 0xFC)); } @@ -530,7 +530,7 @@ INLINE tenuFrmSubtype get_sub_type(WILC_Uint8 *header) /* This function extracts the 'to ds' bit from the MAC header of the input */ /* frame. */ /* Returns the value in the LSB of the returned value. */ -INLINE WILC_Uint8 get_to_ds(WILC_Uint8 *header) +INLINE u8 get_to_ds(u8 *header) { return (header[1] & 0x01); } @@ -538,28 +538,28 @@ INLINE WILC_Uint8 get_to_ds(WILC_Uint8 *header) /* This function extracts the 'from ds' bit from the MAC header of the input */ /* frame. */ /* Returns the value in the LSB of the returned value. */ -INLINE WILC_Uint8 get_from_ds(WILC_Uint8 *header) +INLINE u8 get_from_ds(u8 *header) { return ((header[1] & 0x02) >> 1); } /* This function extracts the MAC Address in 'address1' field of the MAC */ /* header and updates the MAC Address in the allocated 'addr' variable. */ -INLINE void get_address1(WILC_Uint8 *pu8msa, WILC_Uint8 *addr) +INLINE void get_address1(u8 *pu8msa, u8 *addr) { WILC_memcpy(addr, pu8msa + 4, 6); } /* This function extracts the MAC Address in 'address2' field of the MAC */ /* header and updates the MAC Address in the allocated 'addr' variable. */ -INLINE void get_address2(WILC_Uint8 *pu8msa, WILC_Uint8 *addr) +INLINE void get_address2(u8 *pu8msa, u8 *addr) { WILC_memcpy(addr, pu8msa + 10, 6); } /* This function extracts the MAC Address in 'address3' field of the MAC */ /* header and updates the MAC Address in the allocated 'addr' variable. */ -INLINE void get_address3(WILC_Uint8 *pu8msa, WILC_Uint8 *addr) +INLINE void get_address3(u8 *pu8msa, u8 *addr) { WILC_memcpy(addr, pu8msa + 16, 6); } @@ -567,7 +567,7 @@ INLINE void get_address3(WILC_Uint8 *pu8msa, WILC_Uint8 *addr) /* This function extracts the BSSID from the incoming WLAN packet based on */ /* the 'from ds' bit, and updates the MAC Address in the allocated 'addr' */ /* variable. */ -INLINE void get_BSSID(WILC_Uint8 *data, WILC_Uint8 *bssid) +INLINE void get_BSSID(u8 *data, u8 *bssid) { if (get_from_ds(data) == 1) get_address2(data, bssid); @@ -578,11 +578,11 @@ INLINE void get_BSSID(WILC_Uint8 *data, WILC_Uint8 *bssid) } /* This function extracts the SSID from a beacon/probe response frame */ -INLINE void get_ssid(WILC_Uint8 *data, WILC_Uint8 *ssid, WILC_Uint8 *p_ssid_len) +INLINE void get_ssid(u8 *data, u8 *ssid, u8 *p_ssid_len) { - WILC_Uint8 len = 0; - WILC_Uint8 i = 0; - WILC_Uint8 j = 0; + u8 len = 0; + u8 i = 0; + u8 j = 0; len = data[MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN + 1]; @@ -604,7 +604,7 @@ INLINE void get_ssid(WILC_Uint8 *data, WILC_Uint8 *ssid, WILC_Uint8 *p_ssid_len) /* This function extracts the capability info field from the beacon or probe */ /* response frame. */ -INLINE WILC_Uint16 get_cap_info(WILC_Uint8 *data) +INLINE WILC_Uint16 get_cap_info(u8 *data) { WILC_Uint16 cap_info = 0; WILC_Uint16 index = MAC_HDR_LEN; @@ -625,7 +625,7 @@ INLINE WILC_Uint16 get_cap_info(WILC_Uint8 *data) /* This function extracts the capability info field from the Association */ /* response frame. */ -INLINE WILC_Uint16 get_assoc_resp_cap_info(WILC_Uint8 *data) +INLINE WILC_Uint16 get_assoc_resp_cap_info(u8 *data) { WILC_Uint16 cap_info = 0; @@ -637,7 +637,7 @@ INLINE WILC_Uint16 get_assoc_resp_cap_info(WILC_Uint8 *data) /* This funcion extracts the association status code from the incoming */ /* association response frame and returns association status code */ -INLINE WILC_Uint16 get_asoc_status(WILC_Uint8 *data) +INLINE WILC_Uint16 get_asoc_status(u8 *data) { WILC_Uint16 asoc_status = 0; @@ -649,7 +649,7 @@ INLINE WILC_Uint16 get_asoc_status(WILC_Uint8 *data) /* This function extracts association ID from the incoming association */ /* response frame */ -INLINE WILC_Uint16 get_asoc_id(WILC_Uint8 *data) +INLINE WILC_Uint16 get_asoc_id(u8 *data) { WILC_Uint16 asoc_id = 0; @@ -691,7 +691,7 @@ _fail_: return s32Error; } -WILC_Uint8 *get_tim_elm(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen, WILC_Uint16 u16TagParamOffset) +u8 *get_tim_elm(u8 *pu8msa, WILC_Uint16 u16RxLen, WILC_Uint16 u16TagParamOffset) { WILC_Uint16 u16index = 0; @@ -721,7 +721,7 @@ WILC_Uint8 *get_tim_elm(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen, WILC_Uint16 u1 /* This function gets the current channel information from * the 802.11n beacon/probe response frame */ -WILC_Uint8 get_current_channel_802_11n(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen) +u8 get_current_channel_802_11n(u8 *pu8msa, WILC_Uint16 u16RxLen) { WILC_Uint16 index; @@ -740,7 +740,7 @@ WILC_Uint8 get_current_channel_802_11n(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen) return 0; /* no MIB here */ } -WILC_Uint8 get_current_channel(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen) +u8 get_current_channel(u8 *pu8msa, WILC_Uint16 u16RxLen) { #ifdef PHY_802_11n #ifdef FIVE_GHZ_BAND @@ -768,17 +768,17 @@ WILC_Uint8 get_current_channel(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen) * @date 1 Mar 2012 * @version 1.0 */ -WILC_Sint32 ParseNetworkInfo(WILC_Uint8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) +WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrNetworkInfo *pstrNetworkInfo = NULL; - WILC_Uint8 u8MsgType = 0; - WILC_Uint8 u8MsgID = 0; + u8 u8MsgType = 0; + u8 u8MsgID = 0; WILC_Uint16 u16MsgLen = 0; WILC_Uint16 u16WidID = (WILC_Uint16)WID_NIL; WILC_Uint16 u16WidLen = 0; - WILC_Uint8 *pu8WidVal = 0; + u8 *pu8WidVal = 0; u8MsgType = pu8MsgBuffer[0]; @@ -805,12 +805,12 @@ WILC_Sint32 ParseNetworkInfo(WILC_Uint8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNe /* parse the WID value of the WID "WID_NEWORK_INFO" */ { - WILC_Uint8 *pu8msa = 0; + u8 *pu8msa = 0; WILC_Uint16 u16RxLen = 0; - WILC_Uint8 *pu8TimElm = 0; - WILC_Uint8 *pu8IEs = 0; + u8 *pu8TimElm = 0; + u8 *pu8IEs = 0; WILC_Uint16 u16IEsLen = 0; - WILC_Uint8 u8index = 0; + u8 u8index = 0; WILC_Uint32 u32Tsf_Lo; WILC_Uint32 u32Tsf_Hi; @@ -865,7 +865,7 @@ WILC_Sint32 ParseNetworkInfo(WILC_Uint8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNe u16IEsLen = u16RxLen - (MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN); if (u16IEsLen > 0) { - pstrNetworkInfo->pu8IEs = (WILC_Uint8 *)WILC_MALLOC(u16IEsLen); + pstrNetworkInfo->pu8IEs = (u8 *)WILC_MALLOC(u16IEsLen); WILC_memset((void *)(pstrNetworkInfo->pu8IEs), 0, u16IEsLen); WILC_memcpy(pstrNetworkInfo->pu8IEs, pu8IEs, u16IEsLen); @@ -923,13 +923,13 @@ WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo) * @date 2 Apr 2012 * @version 1.0 */ -WILC_Sint32 ParseAssocRespInfo(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32BufferLen, +WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, WILC_Uint32 u32BufferLen, tstrConnectRespInfo **ppstrConnectRespInfo) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrConnectRespInfo *pstrConnectRespInfo = NULL; WILC_Uint16 u16AssocRespLen = 0; - WILC_Uint8 *pu8IEs = 0; + u8 *pu8IEs = 0; WILC_Uint16 u16IEsLen = 0; pstrConnectRespInfo = (tstrConnectRespInfo *)WILC_MALLOC(sizeof(tstrConnectRespInfo)); @@ -952,7 +952,7 @@ WILC_Sint32 ParseAssocRespInfo(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32BufferLen, pu8IEs = &pu8Buffer[CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN]; u16IEsLen = u16AssocRespLen - (CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN); - pstrConnectRespInfo->pu8RespIEs = (WILC_Uint8 *)WILC_MALLOC(u16IEsLen); + pstrConnectRespInfo->pu8RespIEs = (u8 *)WILC_MALLOC(u16IEsLen); WILC_memset((void *)(pstrConnectRespInfo->pu8RespIEs), 0, u16IEsLen); WILC_memcpy(pstrConnectRespInfo->pu8RespIEs, pu8IEs, u16IEsLen); @@ -998,7 +998,7 @@ WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo) } #ifndef CONNECT_DIRECT -WILC_Sint32 ParseSurveyResults(WILC_Uint8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], +WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], wid_site_survey_reslts_s **ppstrSurveyResults, WILC_Uint32 *pu32SurveyResultsCount) { @@ -1006,9 +1006,9 @@ WILC_Sint32 ParseSurveyResults(WILC_Uint8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY wid_site_survey_reslts_s *pstrSurveyResults = NULL; WILC_Uint32 u32SurveyResultsCount = 0; WILC_Uint32 u32SurveyBytesLength = 0; - WILC_Uint8 *pu8BufferPtr; + u8 *pu8BufferPtr; WILC_Uint32 u32RcvdSurveyResultsNum = 2; - WILC_Uint8 u8ReadSurveyResFragNum; + u8 u8ReadSurveyResFragNum; WILC_Uint32 i; WILC_Uint32 j; @@ -1098,8 +1098,8 @@ WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults) void ProcessCharWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, tstrWID *pstrWID, WILC_Sint8 *ps8WidVal) { - WILC_Uint8 *pu8val = (WILC_Uint8 *)ps8WidVal; - WILC_Uint8 u8val = 0; + u8 *pu8val = (u8 *)ps8WidVal; + u8 u8val = 0; WILC_Sint32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set CHAR val 0x%x ,NULL structure\n", u8val); @@ -1107,13 +1107,13 @@ void ProcessCharWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, } /* WID */ - pcPacket[s32PktLen++] = (WILC_Uint8)(pstrWID->u16WIDid & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)(pstrWID->u16WIDid >> 8) & 0xFF; + pcPacket[s32PktLen++] = (u8)(pstrWID->u16WIDid & 0xFF); + pcPacket[s32PktLen++] = (u8)(pstrWID->u16WIDid >> 8) & 0xFF; if (g_oper_mode == SET_CFG) { u8val = *pu8val; /* Length */ - pcPacket[s32PktLen++] = sizeof(WILC_Uint8); + pcPacket[s32PktLen++] = sizeof(u8); /* Value */ @@ -1161,8 +1161,8 @@ void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, } /* WID */ - pcPacket[s32PktLen++] = (WILC_Uint8)(pstrWID->u16WIDid & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((pstrWID->u16WIDid >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)(pstrWID->u16WIDid & 0xFF); + pcPacket[s32PktLen++] = (u8)((pstrWID->u16WIDid >> 8) & 0xFF); if (g_oper_mode == SET_CFG) { u16val = *pu16val; @@ -1171,8 +1171,8 @@ void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, pcPacket[s32PktLen++] = sizeof(WILC_Uint16); /* Value */ - pcPacket[s32PktLen++] = (WILC_Uint8)(u16val & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((u16val >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)(u16val & 0xFF); + pcPacket[s32PktLen++] = (u8)((u16val >> 8) & 0xFF); } *ps32PktLen = s32PktLen; } @@ -1216,8 +1216,8 @@ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, } /* WID */ - pcPacket[s32PktLen++] = (WILC_Uint8)(pstrWID->u16WIDid & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((pstrWID->u16WIDid >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)(pstrWID->u16WIDid & 0xFF); + pcPacket[s32PktLen++] = (u8)((pstrWID->u16WIDid >> 8) & 0xFF); if (g_oper_mode == SET_CFG) { u32val = *pu32val; @@ -1226,10 +1226,10 @@ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, pcPacket[s32PktLen++] = sizeof(WILC_Uint32); /* Value */ - pcPacket[s32PktLen++] = (WILC_Uint8)(u32val & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((u32val >> 8) & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((u32val >> 16) & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((u32val >> 24) & 0xFF); + pcPacket[s32PktLen++] = (u8)(u32val & 0xFF); + pcPacket[s32PktLen++] = (u8)((u32val >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)((u32val >> 16) & 0xFF); + pcPacket[s32PktLen++] = (u8)((u32val >> 24) & 0xFF); } *ps32PktLen = s32PktLen; } @@ -1263,7 +1263,7 @@ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /*****************************************************************************/ void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, WILC_Uint8 *pu8ip) + tstrWID *pstrWID, u8 *pu8ip) { WILC_Uint32 u32val = 0; WILC_Sint32 s32PktLen = *ps32PktLen; @@ -1274,8 +1274,8 @@ void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, } /* WID */ - pcPacket[s32PktLen++] = (WILC_Uint8)(pstrWID->u16WIDid & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((pstrWID->u16WIDid >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)(pstrWID->u16WIDid & 0xFF); + pcPacket[s32PktLen++] = (u8)((pstrWID->u16WIDid >> 8) & 0xFF); if (g_oper_mode == SET_CFG) { /* Length */ @@ -1285,10 +1285,10 @@ void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, conv_ip_to_int(pu8ip, &u32val); /* Value */ - pcPacket[s32PktLen++] = (WILC_Uint8)(u32val & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((u32val >> 8) & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((u32val >> 16) & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((u32val >> 24) & 0xFF); + pcPacket[s32PktLen++] = (u8)(u32val & 0xFF); + pcPacket[s32PktLen++] = (u8)((u32val >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)((u32val >> 16) & 0xFF); + pcPacket[s32PktLen++] = (u8)((u32val >> 24) & 0xFF); } *ps32PktLen = s32PktLen; } @@ -1321,7 +1321,7 @@ void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /*****************************************************************************/ void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, WILC_Uint8 *pu8val, WILC_Sint32 s32ValueSize) + tstrWID *pstrWID, u8 *pu8val, WILC_Sint32 s32ValueSize) { WILC_Uint16 u16MsgLen = 0; WILC_Uint16 idx = 0; @@ -1332,8 +1332,8 @@ void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, } /* WID */ - pcPacket[s32PktLen++] = (WILC_Uint8)(pstrWID->u16WIDid & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((pstrWID->u16WIDid >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)(pstrWID->u16WIDid & 0xFF); + pcPacket[s32PktLen++] = (u8)((pstrWID->u16WIDid >> 8) & 0xFF); if (g_oper_mode == SET_CFG) { /* Message Length */ @@ -1341,7 +1341,7 @@ void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, u16MsgLen = (WILC_Uint16)s32ValueSize; /* Length */ - pcPacket[s32PktLen++] = (WILC_Uint8)u16MsgLen; + pcPacket[s32PktLen++] = (u8)u16MsgLen; /* Value */ for (idx = 0; idx < u16MsgLen; idx++) @@ -1378,7 +1378,7 @@ void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /*****************************************************************************/ void ProcessAdrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, WILC_Uint8 *pu8val) + tstrWID *pstrWID, u8 *pu8val) { WILC_Uint16 u16MsgLen = 0; WILC_Sint32 s32PktLen = *ps32PktLen; @@ -1389,15 +1389,15 @@ void ProcessAdrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, } /* WID */ - pcPacket[s32PktLen++] = (WILC_Uint8)(pstrWID->u16WIDid & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((pstrWID->u16WIDid >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)(pstrWID->u16WIDid & 0xFF); + pcPacket[s32PktLen++] = (u8)((pstrWID->u16WIDid >> 8) & 0xFF); if (g_oper_mode == SET_CFG) { /* Message Length */ u16MsgLen = MAC_ADDR_LEN; /* Length */ - pcPacket[s32PktLen++] = (WILC_Uint8)u16MsgLen; + pcPacket[s32PktLen++] = (u8)u16MsgLen; /* Value */ extract_mac_addr(pu8val, pcPacket + s32PktLen); @@ -1442,14 +1442,14 @@ void ProcessAdrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /*****************************************************************************/ void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, WILC_Uint8 *pu8val, WILC_Sint32 s32ValueSize) + tstrWID *pstrWID, u8 *pu8val, WILC_Sint32 s32ValueSize) { /* WILC_ERROR("processing Binary WIDs is not supported \n"); */ WILC_Uint16 u16MsgLen = 0; WILC_Uint16 idx = 0; WILC_Sint32 s32PktLen = *ps32PktLen; - WILC_Uint8 u8checksum = 0; + u8 u8checksum = 0; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set BIN val, NULL structure\n"); @@ -1457,17 +1457,17 @@ void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, } /* WID */ - pcPacket[s32PktLen++] = (WILC_Uint8)(pstrWID->u16WIDid & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((pstrWID->u16WIDid >> 8) & 0xFF); + pcPacket[s32PktLen++] = (u8)(pstrWID->u16WIDid & 0xFF); + pcPacket[s32PktLen++] = (u8)((pstrWID->u16WIDid >> 8) & 0xFF); if (g_oper_mode == SET_CFG) { /* Message Length */ u16MsgLen = (WILC_Uint16)s32ValueSize; /* Length */ - /* pcPacket[s32PktLen++] = (WILC_Uint8)u16MsgLen; */ - pcPacket[s32PktLen++] = (WILC_Uint8)(u16MsgLen & 0xFF); - pcPacket[s32PktLen++] = (WILC_Uint8)((u16MsgLen >> 8) & 0xFF); + /* pcPacket[s32PktLen++] = (u8)u16MsgLen; */ + pcPacket[s32PktLen++] = (u8)(u16MsgLen & 0xFF); + pcPacket[s32PktLen++] = (u8)((u16MsgLen >> 8) & 0xFF); /* Value */ for (idx = 0; idx < u16MsgLen; idx++) @@ -1516,7 +1516,7 @@ void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /* */ /*****************************************************************************/ -WILC_Sint32 further_process_response(WILC_Uint8 *resp, +WILC_Sint32 further_process_response(u8 *resp, WILC_Uint16 u16WIDid, WILC_Uint16 cfg_len, WILC_Bool process_wid_num, @@ -1525,10 +1525,10 @@ WILC_Sint32 further_process_response(WILC_Uint8 *resp, { WILC_Uint32 retval = 0; WILC_Uint32 idx = 0; - WILC_Uint8 cfg_chr = 0; + u8 cfg_chr = 0; WILC_Uint16 cfg_sht = 0; WILC_Uint32 cfg_int = 0; - WILC_Uint8 cfg_str[256] = {0}; + u8 cfg_str[256] = {0}; tenuWIDtype enuWIDtype = WID_UNDEF; if (process_wid_num) { @@ -1621,7 +1621,7 @@ WILC_Sint32 further_process_response(WILC_Uint8 *resp, case WID_BIN_DATA: #if 0 /* FILE *fp_bin = NULL; */ - WILC_Uint8 first_bin_wid = 1; + u8 first_bin_wid = 1; if (first_bin_wid) { /* fp_bin = fopen("wid_response.bin","wb"); */ first_bin_wid = 0; @@ -1686,7 +1686,7 @@ WILC_Sint32 further_process_response(WILC_Uint8 *resp, /* */ /*****************************************************************************/ -WILC_Sint32 ParseResponse(WILC_Uint8 *resp, tstrWID *pstrWIDcfgResult) +WILC_Sint32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) { WILC_Uint16 u16RespLen = 0; WILC_Uint16 u16WIDid = 0; @@ -1759,7 +1759,7 @@ WILC_Sint32 ParseResponse(WILC_Uint8 *resp, tstrWID *pstrWIDcfgResult) * @version 1.0 */ -WILC_Sint32 ParseWriteResponse(WILC_Uint8 *pu8RespBuffer) +WILC_Sint32 ParseWriteResponse(u8 *pu8RespBuffer) { WILC_Sint32 s32Error = WILC_FAIL; WILC_Uint16 u16RespLen = 0; @@ -1834,8 +1834,8 @@ WILC_Sint32 CreatePacketHeader(WILC_Char *pcpacket, WILC_Sint32 *ps32PacketLengt pcpacket[u16MsgInd++] = g_seqno++; /* Message Length */ - pcpacket[u16MsgInd++] = (WILC_Uint8)(u16MsgLen & 0xFF); - pcpacket[u16MsgInd++] = (WILC_Uint8)((u16MsgLen >> 8) & 0xFF); + pcpacket[u16MsgInd++] = (u8)(u16MsgLen & 0xFF); + pcpacket[u16MsgInd++] = (u8)((u16MsgLen >> 8) & 0xFF); *ps32PacketLength = u16MsgLen; @@ -1948,7 +1948,7 @@ WILC_Sint32 ConfigWaitResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32MaxRespBu * @version 1.0 */ #ifdef SIMULATION -WILC_Sint32 SendConfigPkt(WILC_Uint8 u8Mode, tstrWID *pstrWIDs, +WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -2049,10 +2049,10 @@ WILC_Sint32 ConfigProvideResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32RespLe * @version 1.0 */ -WILC_Sint32 ConfigPktReceived(WILC_Uint8 *pu8RxPacket, WILC_Sint32 s32RxPacketLen) +WILC_Sint32 ConfigPktReceived(u8 *pu8RxPacket, WILC_Sint32 s32RxPacketLen) { WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint8 u8MsgType = 0; + u8 u8MsgType = 0; u8MsgType = pu8RxPacket[0]; @@ -2127,7 +2127,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps; * @date 1 Mar 2012 * @version 1.0 */ -WILC_Sint32 SendConfigPkt(WILC_Uint8 u8Mode, tstrWID *pstrWIDs, +WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler) { WILC_Sint32 counter = 0, ret = 0; diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 9cdfa2ac8fca..73cdbef653ab 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -402,30 +402,30 @@ typedef struct { } tstrWID; typedef struct { - WILC_Uint8 u8Full; - WILC_Uint8 u8Index; + u8 u8Full; + u8 u8Index; WILC_Sint8 as8RSSI[NUM_RSSI]; } tstrRSSI; /* This structure is used to support parsing of the received 'N' message */ typedef struct { WILC_Sint8 s8rssi; WILC_Uint16 u16CapInfo; - WILC_Uint8 au8ssid[MAX_SSID_LEN]; - WILC_Uint8 u8SsidLen; - WILC_Uint8 au8bssid[6]; + u8 au8ssid[MAX_SSID_LEN]; + u8 u8SsidLen; + u8 au8bssid[6]; WILC_Uint16 u16BeaconPeriod; - WILC_Uint8 u8DtimPeriod; - WILC_Uint8 u8channel; + u8 u8DtimPeriod; + u8 u8channel; unsigned long u32TimeRcvdInScanCached; /* of type unsigned long to be accepted by the linux kernel macro time_after() */ unsigned long u32TimeRcvdInScan; WILC_Bool bNewNetwork; #ifdef AGING_ALG - WILC_Uint8 u8Found; + u8 u8Found; #endif #ifdef WILC_P2P WILC_Uint32 u32Tsf; /* time-stamp [Low only 32 bit] */ #endif - WILC_Uint8 *pu8IEs; + u8 *pu8IEs; WILC_Uint16 u16IEsLen; void *pJoinParams; tstrRSSI strRssi; @@ -437,16 +437,16 @@ typedef struct { WILC_Uint16 u16capability; WILC_Uint16 u16ConnectStatus; WILC_Uint16 u16AssocID; - WILC_Uint8 *pu8RespIEs; + u8 *pu8RespIEs; WILC_Uint16 u16RespIEsLen; } tstrConnectRespInfo; typedef struct { - WILC_Uint8 au8bssid[6]; - WILC_Uint8 *pu8ReqIEs; + u8 au8bssid[6]; + u8 *pu8ReqIEs; size_t ReqIEsLen; - WILC_Uint8 *pu8RespIEs; + u8 *pu8RespIEs; WILC_Uint16 u16RespIEsLen; WILC_Uint16 u16ConnectStatus; } tstrConnectInfo; @@ -455,19 +455,19 @@ typedef struct { typedef struct { WILC_Uint16 u16reason; - WILC_Uint8 *ie; + u8 *ie; size_t ie_len; } tstrDisconnectNotifInfo; #ifndef CONNECT_DIRECT typedef struct wid_site_survey_reslts { WILC_Char SSID[MAX_SSID_LEN]; - WILC_Uint8 BssType; - WILC_Uint8 Channel; - WILC_Uint8 SecurityStatus; - WILC_Uint8 BSSID[6]; + u8 BssType; + u8 Channel; + u8 SecurityStatus; + u8 BSSID[6]; WILC_Char RxPower; - WILC_Uint8 Reserved; + u8 Reserved; } wid_site_survey_reslts_s; #endif @@ -475,24 +475,24 @@ typedef struct wid_site_survey_reslts { extern WILC_Sint32 CoreConfiguratorInit(void); extern WILC_Sint32 CoreConfiguratorDeInit(void); -extern WILC_Sint32 SendConfigPkt(WILC_Uint8 u8Mode, tstrWID *pstrWIDs, +extern WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler); -extern WILC_Sint32 ParseNetworkInfo(WILC_Uint8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); +extern WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); extern WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); -extern WILC_Sint32 ParseAssocRespInfo(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32BufferLen, +extern WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, WILC_Uint32 u32BufferLen, tstrConnectRespInfo **ppstrConnectRespInfo); extern WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo); #ifndef CONNECT_DIRECT -extern WILC_Sint32 ParseSurveyResults(WILC_Uint8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], +extern WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], wid_site_survey_reslts_s **ppstrSurveyResults, WILC_Uint32 *pu32SurveyResultsCount); extern WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults); #endif extern WILC_Sint32 SendRawPacket(WILC_Sint8 *pspacket, WILC_Sint32 s32PacketLen); -extern void NetworkInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length); -void GnrlAsyncInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length); -void host_int_ScanCompleteReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length); +extern void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); +void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); +void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); #endif diff --git a/drivers/staging/wilc1000/fifo_buffer.c b/drivers/staging/wilc1000/fifo_buffer.c index e23d11130728..f807bfb72539 100644 --- a/drivers/staging/wilc1000/fifo_buffer.c +++ b/drivers/staging/wilc1000/fifo_buffer.c @@ -45,7 +45,7 @@ WILC_Uint32 FIFO_DeInit(tHANDLE hFifo) return u32Error; } -WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, WILC_Uint8 *pu8Buffer, WILC_Uint32 u32BytesToRead, WILC_Uint32 *pu32BytesRead) +WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToRead, WILC_Uint32 *pu32BytesRead) { WILC_Uint32 u32Error = 0; tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; @@ -86,7 +86,7 @@ WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, WILC_Uint8 *pu8Buffer, WILC_Uint32 u32 return u32Error; } -WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, WILC_Uint8 *pu8Buffer, WILC_Uint32 u32BytesToWrite, WILC_Bool bForceOverWrite) +WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToWrite, WILC_Bool bForceOverWrite) { WILC_Uint32 u32Error = 0; tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; diff --git a/drivers/staging/wilc1000/fifo_buffer.h b/drivers/staging/wilc1000/fifo_buffer.h index c7e140be8fab..4d120503c4b2 100644 --- a/drivers/staging/wilc1000/fifo_buffer.h +++ b/drivers/staging/wilc1000/fifo_buffer.h @@ -5,7 +5,7 @@ #define tHANDLE void * typedef struct { - WILC_Uint8 *pu8Buffer; + u8 *pu8Buffer; WILC_Uint32 u32BufferLength; WILC_Uint32 u32WriteOffset; WILC_Uint32 u32ReadOffset; @@ -17,7 +17,7 @@ typedef struct { extern WILC_Uint32 FIFO_InitBuffer(tHANDLE *hBuffer, WILC_Uint32 u32BufferLength); extern WILC_Uint32 FIFO_DeInit(tHANDLE hFifo); -extern WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, WILC_Uint8 *pu8Buffer, +extern WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToRead, WILC_Uint32 *pu32BytesRead); -extern WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, WILC_Uint8 *pu8Buffer, - WILC_Uint32 u32BytesToWrite, WILC_Bool bForceOverWrite); \ No newline at end of file +extern WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, + WILC_Uint32 u32BytesToWrite, WILC_Bool bForceOverWrite); diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 462bb10e930b..afe5126f3655 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -5,7 +5,7 @@ extern WILC_Sint32 TransportInit(void); extern WILC_Sint32 TransportDeInit(void); -extern WILC_Uint8 connecting; +extern u8 connecting; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP extern WILC_TimerHandle hDuringIpTimer; @@ -13,7 +13,7 @@ extern WILC_TimerHandle hDuringIpTimer; extern WILC_Bool bEnablePS; /*BugID_5137*/ -extern WILC_Uint8 g_wilc_initialized; +extern u8 g_wilc_initialized; /*****************************************************************************/ /* Macros */ /*****************************************************************************/ @@ -96,13 +96,13 @@ typedef struct _tstrHostIFCfgParamAttr { * @version 1.0 */ typedef struct _tstrHostIFwpaAttr { - WILC_Uint8 *pu8key; - const WILC_Uint8 *pu8macaddr; - WILC_Uint8 *pu8seq; - WILC_Uint8 u8seqlen; - WILC_Uint8 u8keyidx; - WILC_Uint8 u8Keylen; - WILC_Uint8 u8Ciphermode; + u8 *pu8key; + const u8 *pu8macaddr; + u8 *pu8seq; + u8 u8seqlen; + u8 u8keyidx; + u8 u8Keylen; + u8 u8Ciphermode; } tstrHostIFwpaAttr; @@ -117,10 +117,10 @@ typedef struct _tstrHostIFwpaAttr { * @version 1.0 */ typedef struct _tstrHostIFwepAttr { - WILC_Uint8 *pu8WepKey; - WILC_Uint8 u8WepKeylen; - WILC_Uint8 u8Wepidx; - WILC_Uint8 u8mode; + u8 *pu8WepKey; + u8 u8WepKeylen; + u8 u8Wepidx; + u8 u8mode; AUTHTYPE_T tenuAuth_type; } tstrHostIFwepAttr; @@ -153,7 +153,7 @@ typedef union _tuniHostIFkeyAttr { */ typedef struct _tstrHostIFkeyAttr { tenuKeyType enuKeyType; - WILC_Uint8 u8KeyAction; + u8 u8KeyAction; tuniHostIFkeyAttr uniHostIFkeyAttr; } tstrHostIFkeyAttr; @@ -171,11 +171,11 @@ typedef struct _tstrHostIFkeyAttr { * @version 1.0 */ typedef struct _tstrHostIFscanAttr { - WILC_Uint8 u8ScanSource; - WILC_Uint8 u8ScanType; - WILC_Uint8 *pu8ChnlFreqList; - WILC_Uint8 u8ChnlListLen; - WILC_Uint8 *pu8IEs; + u8 u8ScanSource; + u8 u8ScanType; + u8 *pu8ChnlFreqList; + u8 u8ChnlListLen; + u8 *pu8IEs; size_t IEsLen; tWILCpfScanResult pfScanResult; void *pvUserArg; @@ -195,16 +195,16 @@ typedef struct _tstrHostIFscanAttr { * @version 1.0 */ typedef struct _tstrHostIFconnectAttr { - WILC_Uint8 *pu8bssid; - WILC_Uint8 *pu8ssid; + u8 *pu8bssid; + u8 *pu8ssid; size_t ssidLen; - WILC_Uint8 *pu8IEs; + u8 *pu8IEs; size_t IEsLen; - WILC_Uint8 u8security; + u8 u8security; tWILCpfConnectResult pfConnectResult; void *pvUserArg; AUTHTYPE_T tenuAuth_type; - WILC_Uint8 u8channel; + u8 u8channel; void *pJoinParams; } tstrHostIFconnectAttr; @@ -219,7 +219,7 @@ typedef struct _tstrHostIFconnectAttr { * @version 1.0 */ typedef struct _tstrRcvdGnrlAsyncInfo { - WILC_Uint8 *pu8Buffer; + u8 *pu8Buffer; WILC_Uint32 u32Length; } tstrRcvdGnrlAsyncInfo; @@ -234,7 +234,7 @@ typedef struct _tstrRcvdGnrlAsyncInfo { * @version 1.0 */ typedef struct _tstrHostIFSetChan { - WILC_Uint8 u8SetChan; + u8 u8SetChan; } tstrHostIFSetChan; /*! @@ -248,7 +248,7 @@ typedef struct _tstrHostIFSetChan { * @version 1.0 */ typedef struct _tstrHostIFGetChan { - WILC_Uint8 u8GetChan; + u8 u8GetChan; } tstrHostIFGetChan; /*bug3819: Add Scan acomplete notification to host*/ @@ -264,7 +264,7 @@ typedef struct _tstrHostIFGetChan { */ /*typedef struct _tstrScanComplete * { - * WILC_Uint8* pu8Buffer; + * u8* pu8Buffer; * WILC_Uint32 u32Length; * } tstrScanComplete;*/ @@ -283,10 +283,10 @@ typedef struct _tstrHostIFSetBeacon { WILC_Uint32 u32DTIMPeriod; /*!< DTIM Period. Indicates how many Beacon frames * (including the current frame) appear before the next DTIM */ WILC_Uint32 u32HeadLen; /*!< Length of the head buffer in bytes */ - WILC_Uint8 *pu8Head; /*!< Pointer to the beacon's head buffer. Beacon's head is the part + u8 *pu8Head; /*!< Pointer to the beacon's head buffer. Beacon's head is the part * from the beacon's start till the TIM element, NOT including the TIM */ WILC_Uint32 u32TailLen; /*!< Length of the tail buffer in bytes */ - WILC_Uint8 *pu8Tail; /*!< Pointer to the beacon's tail buffer. Beacon's tail starts just + u8 *pu8Tail; /*!< Pointer to the beacon's tail buffer. Beacon's tail starts just * after the TIM inormation element */ } tstrHostIFSetBeacon; @@ -303,7 +303,7 @@ typedef struct _tstrHostIFSetBeacon { * @version 1.0 */ typedef struct _tstrHostIFDelBeacon { - WILC_Uint8 u8dummy; + u8 u8dummy; } tstrHostIFDelBeacon; /*! @@ -334,8 +334,8 @@ typedef struct { */ typedef struct { - WILC_Uint8 au8Sta_DelAllSta[MAX_NUM_STA][ETH_ALEN]; - WILC_Uint8 u8Num_AssocSta; + u8 au8Sta_DelAllSta[MAX_NUM_STA][ETH_ALEN]; + u8 u8Num_AssocSta; } tstrHostIFDelAllSta; /*! @@ -350,7 +350,7 @@ typedef struct { */ typedef struct { - WILC_Uint8 au8MacAddr[ETH_ALEN]; + u8 au8MacAddr[ETH_ALEN]; } tstrHostIFDelSta; /*! @@ -395,8 +395,8 @@ typedef struct { */ typedef struct { - WILC_Uint8 *au8IPAddr; - WILC_Uint8 idx; + u8 *au8IPAddr; + u8 idx; } tstrHostIFSetIPAddr; /*! @@ -410,7 +410,7 @@ typedef struct { * @version 1.0 */ typedef struct { - WILC_Uint8 mac[6]; + u8 mac[6]; } tstrHostIfStaInactiveT; /**/ @@ -476,8 +476,8 @@ typedef struct _tstrHostIFmsg { #ifdef CONNECT_DIRECT typedef struct _tstrWidJoinReqExt { WILC_Char SSID[MAX_SSID_LEN]; - WILC_Uint8 u8channel; - WILC_Uint8 BSSID[6]; + u8 u8channel; + u8 BSSID[6]; } tstrWidJoinReqExt; #endif @@ -486,39 +486,39 @@ typedef struct _tstrWidJoinReqExt { /*Struct containg joinParam of each AP*/ typedef struct _tstrJoinBssParam { BSSTYPE_T bss_type; - WILC_Uint8 dtim_period; + u8 dtim_period; WILC_Uint16 beacon_period; WILC_Uint16 cap_info; - WILC_Uint8 au8bssid[6]; + u8 au8bssid[6]; WILC_Char ssid[MAX_SSID_LEN]; - WILC_Uint8 ssidLen; - WILC_Uint8 supp_rates[MAX_RATES_SUPPORTED + 1]; - WILC_Uint8 ht_capable; - WILC_Uint8 wmm_cap; - WILC_Uint8 uapsd_cap; + u8 ssidLen; + u8 supp_rates[MAX_RATES_SUPPORTED + 1]; + u8 ht_capable; + u8 wmm_cap; + u8 uapsd_cap; WILC_Bool rsn_found; - WILC_Uint8 rsn_grp_policy; - WILC_Uint8 mode_802_11i; - WILC_Uint8 rsn_pcip_policy[3]; - WILC_Uint8 rsn_auth_policy[3]; - WILC_Uint8 rsn_cap[2]; + u8 rsn_grp_policy; + u8 mode_802_11i; + u8 rsn_pcip_policy[3]; + u8 rsn_auth_policy[3]; + u8 rsn_cap[2]; struct _tstrJoinParam *nextJoinBss; #ifdef WILC_P2P WILC_Uint32 tsf; - WILC_Uint8 u8NoaEnbaled; - WILC_Uint8 u8OppEnable; - WILC_Uint8 u8CtWindow; - WILC_Uint8 u8Count; - WILC_Uint8 u8Index; - WILC_Uint8 au8Duration[4]; - WILC_Uint8 au8Interval[4]; - WILC_Uint8 au8StartTime[4]; + u8 u8NoaEnbaled; + u8 u8OppEnable; + u8 u8CtWindow; + u8 u8Count; + u8 u8Index; + u8 au8Duration[4]; + u8 au8Interval[4]; + u8 au8StartTime[4]; #endif } tstrJoinBssParam; /*Bug4218: Parsing Join Param*/ /*a linked list table containing needed join parameters entries for each AP found in most recent scan*/ typedef struct _tstrBssTable { - WILC_Uint8 u8noBssEntries; + u8 u8noBssEntries; tstrJoinBssParam *head; tstrJoinBssParam *tail; } tstrBssTable; @@ -542,7 +542,7 @@ tstrWILC_WFIDrv *gWFiDrvHandle = NULL; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP WILC_Bool g_obtainingIP = WILC_FALSE; #endif -WILC_Uint8 P2P_LISTEN_STATE; +u8 P2P_LISTEN_STATE; static struct task_struct *HostIFthreadHandler; static WILC_MsgQueueHandle gMsgQHostIF; static struct semaphore hSemHostIFthrdEnd; @@ -554,34 +554,34 @@ WILC_TimerHandle g_hPeriodicRSSI; -WILC_Uint8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; +u8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; #ifndef CONNECT_DIRECT -static WILC_Uint8 gapu8RcvdSurveyResults[2][MAX_SURVEY_RESULT_FRAG_SIZE]; +static u8 gapu8RcvdSurveyResults[2][MAX_SURVEY_RESULT_FRAG_SIZE]; #endif -static WILC_Uint8 gapu8RcvdAssocResp[MAX_ASSOC_RESP_FRAME_SIZE]; +static u8 gapu8RcvdAssocResp[MAX_ASSOC_RESP_FRAME_SIZE]; WILC_Bool gbScanWhileConnected = WILC_FALSE; static WILC_Sint8 gs8Rssi; static WILC_Sint8 gs8lnkspd; -static WILC_Uint8 gu8Chnl; -static WILC_Uint8 gs8SetIP[2][4]; -static WILC_Uint8 gs8GetIP[2][4]; +static u8 gu8Chnl; +static u8 gs8SetIP[2][4]; +static u8 gs8GetIP[2][4]; #ifdef WILC_AP_EXTERNAL_MLME static WILC_Uint32 gu32InactiveTime; -static WILC_Uint8 gu8DelBcn; +static u8 gu8DelBcn; #endif #ifndef SIMULATION static WILC_Uint32 gu32WidConnRstHack; #endif /*BugID_5137*/ -WILC_Uint8 *gu8FlushedJoinReq; -WILC_Uint8 *gu8FlushedInfoElemAsoc; -WILC_Uint8 gu8Flushed11iMode; -WILC_Uint8 gu8FlushedAuthType; +u8 *gu8FlushedJoinReq; +u8 *gu8FlushedInfoElemAsoc; +u8 gu8Flushed11iMode; +u8 gu8FlushedAuthType; WILC_Uint32 gu32FlushedJoinReqSize; WILC_Uint32 gu32FlushedInfoElemAsocSize; WILC_Uint32 gu8FlushedJoinReqDrvHandler; @@ -728,13 +728,13 @@ static WILC_Sint32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperat /** * @brief host_int_set_IPAddress * @details Setting IP address params in message queue - * @param[in] WILC_WFIDrvHandle hWFIDrv, WILC_Uint8* pu8IPAddr + * @param[in] WILC_WFIDrvHandle hWFIDrv, u8* pu8IPAddr * @return Error code. * @author * @date * @version 1.0 */ -WILC_Sint32 Handle_set_IPAddress(void *drvHandler, WILC_Uint8 *pu8IPAddr, WILC_Uint8 idx) +WILC_Sint32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -752,7 +752,7 @@ WILC_Sint32 Handle_set_IPAddress(void *drvHandler, WILC_Uint8 *pu8IPAddr, WILC_U /*prepare configuration packet*/ strWID.u16WIDid = (WILC_Uint16)WID_IP_ADDRESS; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Uint8 *)pu8IPAddr; + strWID.ps8WidVal = (u8 *)pu8IPAddr; strWID.s32ValueSize = IP_ALEN; s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); @@ -780,13 +780,13 @@ WILC_Sint32 Handle_set_IPAddress(void *drvHandler, WILC_Uint8 *pu8IPAddr, WILC_U /** * @brief Handle_get_IPAddress * @details Setting IP address params in message queue - * @param[in] WILC_WFIDrvHandle hWFIDrv, WILC_Uint8* pu8IPAddr + * @param[in] WILC_WFIDrvHandle hWFIDrv, u8* pu8IPAddr * @return Error code. * @author * @date * @version 1.0 */ -WILC_Sint32 Handle_get_IPAddress(void *drvHandler, WILC_Uint8 *pu8IPAddr, WILC_Uint8 idx) +WILC_Sint32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -796,12 +796,12 @@ WILC_Sint32 Handle_get_IPAddress(void *drvHandler, WILC_Uint8 *pu8IPAddr, WILC_U /*prepare configuration packet*/ strWID.u16WIDid = (WILC_Uint16)WID_IP_ADDRESS; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Uint8 *)WILC_MALLOC(IP_ALEN); + strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN); strWID.s32ValueSize = IP_ALEN; s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); - PRINT_INFO(HOSTINF_DBG, "%d.%d.%d.%d\n", (WILC_Uint8)(strWID.ps8WidVal[0]), (WILC_Uint8)(strWID.ps8WidVal[1]), (WILC_Uint8)(strWID.ps8WidVal[2]), (WILC_Uint8)(strWID.ps8WidVal[3])); + PRINT_INFO(HOSTINF_DBG, "%d.%d.%d.%d\n", (u8)(strWID.ps8WidVal[0]), (u8)(strWID.ps8WidVal[1]), (u8)(strWID.ps8WidVal[2]), (u8)(strWID.ps8WidVal[3])); WILC_memcpy(gs8GetIP[idx], strWID.ps8WidVal, IP_ALEN); @@ -845,7 +845,7 @@ static WILC_Sint32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddres WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - WILC_Uint8 *mac_buf = (WILC_Uint8 *)WILC_MALLOC(ETH_ALEN); + u8 *mac_buf = (u8 *)WILC_MALLOC(ETH_ALEN); if (mac_buf == NULL) { PRINT_ER("No buffer to send mac address\n"); return WILC_FAIL; @@ -925,7 +925,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWIDList[32]; - WILC_Uint8 u8WidCnt = 0; + u8 u8WidCnt = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -946,7 +946,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.bss_type; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); - pstrWFIDrv->strCfgValues.bss_type = (WILC_Uint8)strHostIFCfgParamAttr->pstrCfgParamVal.bss_type; + pstrWFIDrv->strCfgValues.bss_type = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.bss_type; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -964,7 +964,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.auth_type; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); - pstrWFIDrv->strCfgValues.auth_type = (WILC_Uint8)strHostIFCfgParamAttr->pstrCfgParamVal.auth_type; + pstrWFIDrv->strCfgValues.auth_type = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.auth_type; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -996,7 +996,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.power_mgmt_mode; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); - pstrWFIDrv->strCfgValues.power_mgmt_mode = (WILC_Uint8)strHostIFCfgParamAttr->pstrCfgParamVal.power_mgmt_mode; + pstrWFIDrv->strCfgValues.power_mgmt_mode = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.power_mgmt_mode; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -1078,7 +1078,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.short_slot_allowed; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); - pstrWFIDrv->strCfgValues.short_slot_allowed = (WILC_Uint8)strHostIFCfgParamAttr->pstrCfgParamVal.short_slot_allowed; + pstrWFIDrv->strCfgValues.short_slot_allowed = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.short_slot_allowed; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -1094,7 +1094,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.txop_prot_disabled; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); - pstrWFIDrv->strCfgValues.txop_prot_disabled = (WILC_Uint8)strHostIFCfgParamAttr->pstrCfgParamVal.txop_prot_disabled; + pstrWFIDrv->strCfgValues.txop_prot_disabled = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.txop_prot_disabled; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -1137,7 +1137,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_enabled; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); - pstrWFIDrv->strCfgValues.site_survey_enabled = (WILC_Uint8)strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_enabled; + pstrWFIDrv->strCfgValues.site_survey_enabled = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_enabled; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -1199,7 +1199,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&curr_tx_rate; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); - pstrWFIDrv->strCfgValues.curr_tx_rate = (WILC_Uint8)curr_tx_rate; + pstrWFIDrv->strCfgValues.curr_tx_rate = (u8)curr_tx_rate; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -1251,9 +1251,9 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs tstrWID strWIDList[5]; WILC_Uint32 u32WidsCount = 0; WILC_Uint32 i; - WILC_Uint8 *pu8Buffer; - WILC_Uint8 valuesize = 0; - WILC_Uint8 *pu8HdnNtwrksWidVal = NULL; + u8 *pu8Buffer; + u8 valuesize = 0; + u8 *pu8HdnNtwrksWidVal = NULL; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; PRINT_D(HOSTINF_DBG, "Setting SCAN params\n"); @@ -1433,7 +1433,7 @@ static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - WILC_Uint8 u8abort_running_scan; + u8 u8abort_running_scan; tstrWID strWID; @@ -1485,7 +1485,7 @@ static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) * @date * @version 1.0 */ -WILC_Uint8 u8ConnectedSSID[6] = {0}; +u8 u8ConnectedSSID[6] = {0}; static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFconnectAttr) { tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; @@ -1496,10 +1496,10 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH #ifndef CONNECT_DIRECT WILC_Sint32 s32Err = WILC_SUCCESS; WILC_Uint32 i; - WILC_Uint8 u8bssDscListIndex; + u8 u8bssDscListIndex; wid_site_survey_reslts_s *pstrSurveyResults = NULL; #else - WILC_Uint8 *pu8CurrByte = NULL; + u8 *pu8CurrByte = NULL; /*Bug4218: Parsing Join Param*/ #ifdef WILC_PARSE_SCAN_IN_HOST tstrJoinBssParam *ptstrJoinBssParam; @@ -1576,13 +1576,13 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH PRINT_INFO(HOSTINF_DBG, "Saving connection parameters in global structure\n"); if (pstrHostIFconnectAttr->pu8bssid != NULL) { - pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = (WILC_Uint8 *)WILC_MALLOC(6); + pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = (u8 *)WILC_MALLOC(6); WILC_memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8bssid, pstrHostIFconnectAttr->pu8bssid, 6); } pstrWFIDrv->strWILC_UsrConnReq.ssidLen = pstrHostIFconnectAttr->ssidLen; if (pstrHostIFconnectAttr->pu8ssid != NULL) { - pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = (WILC_Uint8 *)WILC_MALLOC(pstrHostIFconnectAttr->ssidLen + 1); + pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = (u8 *)WILC_MALLOC(pstrHostIFconnectAttr->ssidLen + 1); WILC_memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ssid, pstrHostIFconnectAttr->pu8ssid, pstrHostIFconnectAttr->ssidLen); pstrWFIDrv->strWILC_UsrConnReq.pu8ssid[pstrHostIFconnectAttr->ssidLen] = '\0'; @@ -1590,7 +1590,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen = pstrHostIFconnectAttr->IEsLen; if (pstrHostIFconnectAttr->pu8IEs != NULL) { - pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs = (WILC_Uint8 *)WILC_MALLOC(pstrHostIFconnectAttr->IEsLen); + pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs = (u8 *)WILC_MALLOC(pstrHostIFconnectAttr->IEsLen); WILC_memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs, pstrHostIFconnectAttr->pu8IEs, pstrHostIFconnectAttr->IEsLen); } @@ -1696,13 +1696,13 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH #endif if (pstrHostIFconnectAttr->pu8bssid != NULL) { - pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = (WILC_Uint8 *)WILC_MALLOC(6); + pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = (u8 *)WILC_MALLOC(6); WILC_memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8bssid, pstrHostIFconnectAttr->pu8bssid, 6); } pstrWFIDrv->strWILC_UsrConnReq.ssidLen = pstrHostIFconnectAttr->ssidLen; if (pstrHostIFconnectAttr->pu8ssid != NULL) { - pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = (WILC_Uint8 *)WILC_MALLOC(pstrHostIFconnectAttr->ssidLen + 1); + pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = (u8 *)WILC_MALLOC(pstrHostIFconnectAttr->ssidLen + 1); WILC_memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ssid, pstrHostIFconnectAttr->pu8ssid, pstrHostIFconnectAttr->ssidLen); pstrWFIDrv->strWILC_UsrConnReq.pu8ssid[pstrHostIFconnectAttr->ssidLen] = '\0'; @@ -1710,7 +1710,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen = pstrHostIFconnectAttr->IEsLen; if (pstrHostIFconnectAttr->pu8IEs != NULL) { - pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs = (WILC_Uint8 *)WILC_MALLOC(pstrHostIFconnectAttr->IEsLen); + pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs = (u8 *)WILC_MALLOC(pstrHostIFconnectAttr->IEsLen); WILC_memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs, pstrHostIFconnectAttr->pu8IEs, pstrHostIFconnectAttr->IEsLen); } @@ -1778,7 +1778,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH /*BugID_5137*/ if (WILC_memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7)) - gu8FlushedAuthType = (WILC_Uint8)pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type; + gu8FlushedAuthType = (u8)pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type; PRINT_INFO(HOSTINF_DBG, "Authentication Type = %x\n", pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); /* @@ -2017,7 +2017,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH if (pstrHostIFconnectAttr->pu8IEs != NULL) { strConnectInfo.ReqIEsLen = pstrHostIFconnectAttr->IEsLen; - strConnectInfo.pu8ReqIEs = (WILC_Uint8 *)WILC_MALLOC(pstrHostIFconnectAttr->IEsLen); + strConnectInfo.pu8ReqIEs = (u8 *)WILC_MALLOC(pstrHostIFconnectAttr->IEsLen); WILC_memcpy(strConnectInfo.pu8ReqIEs, pstrHostIFconnectAttr->pu8IEs, pstrHostIFconnectAttr->IEsLen); @@ -2082,7 +2082,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWIDList[5]; WILC_Uint32 u32WidsCount = 0; - WILC_Uint8 *pu8CurrByte = NULL; + u8 *pu8CurrByte = NULL; /* IEs to be inserted in Association Request */ @@ -2176,7 +2176,7 @@ static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) if (pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs != NULL) { strConnectInfo.ReqIEsLen = pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen; - strConnectInfo.pu8ReqIEs = (WILC_Uint8 *)WILC_MALLOC(pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen); + strConnectInfo.pu8ReqIEs = (u8 *)WILC_MALLOC(pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen); WILC_memcpy(strConnectInfo.pu8ReqIEs, pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs, pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen); @@ -2380,14 +2380,14 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI /* TODO: mostafa: till now, this function just handles only the received mac status msg, */ /* which carries only 1 WID which have WID ID = WID_STATUS */ WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint8 u8MsgType = 0; - WILC_Uint8 u8MsgID = 0; + u8 u8MsgType = 0; + u8 u8MsgID = 0; WILC_Uint16 u16MsgLen = 0; WILC_Uint16 u16WidID = (WILC_Uint16)WID_NIL; - WILC_Uint8 u8WidLen = 0; - WILC_Uint8 u8MacStatus; - WILC_Uint8 u8MacStatusReasonCode; - WILC_Uint8 u8MacStatusAdditionalInfo; + u8 u8WidLen = 0; + u8 u8MacStatus; + u8 u8MacStatusReasonCode; + u8 u8MacStatusAdditionalInfo; tstrConnectInfo strConnectInfo; tstrDisconnectNotifInfo strDisconnectNotifInfo; WILC_Sint32 s32Err = WILC_SUCCESS; @@ -2467,7 +2467,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI strConnectInfo.u16RespIEsLen = pstrConnectRespInfo->u16RespIEsLen; - strConnectInfo.pu8RespIEs = (WILC_Uint8 *)WILC_MALLOC(pstrConnectRespInfo->u16RespIEsLen); + strConnectInfo.pu8RespIEs = (u8 *)WILC_MALLOC(pstrConnectRespInfo->u16RespIEsLen); WILC_memcpy(strConnectInfo.pu8RespIEs, pstrConnectRespInfo->pu8RespIEs, pstrConnectRespInfo->u16RespIEsLen); } @@ -2511,7 +2511,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI if (pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs != NULL) { strConnectInfo.ReqIEsLen = pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen; - strConnectInfo.pu8ReqIEs = (WILC_Uint8 *)WILC_MALLOC(pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen); + strConnectInfo.pu8ReqIEs = (u8 *)WILC_MALLOC(pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen); WILC_memcpy(strConnectInfo.pu8ReqIEs, pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs, pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen); @@ -2713,8 +2713,8 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) #ifdef WILC_AP_EXTERNAL_MLME tstrWID strWIDList[5]; #endif - WILC_Uint8 i; - WILC_Uint8 *pu8keybuf; + u8 i; + u8 *pu8keybuf; WILC_Sint8 s8idxarray[1]; WILC_Sint8 ret = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -2747,7 +2747,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[2].s32ValueSize = sizeof(WILC_Char); - pu8keybuf = (WILC_Uint8 *)WILC_MALLOC(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen); + pu8keybuf = (u8 *)WILC_MALLOC(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen); if (pu8keybuf == NULL) { @@ -2776,7 +2776,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) if (pstrHostIFkeyAttr->u8KeyAction & ADDKEY) { PRINT_D(HOSTINF_DBG, "Handling WEP key\n"); - pu8keybuf = (WILC_Uint8 *)WILC_MALLOC(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2); + pu8keybuf = (u8 *)WILC_MALLOC(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2); if (pu8keybuf == NULL) { PRINT_ER("No buffer to send Key\n"); return -1; @@ -2824,7 +2824,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) case WPARxGtk: #ifdef WILC_AP_EXTERNAL_MLME if (pstrHostIFkeyAttr->u8KeyAction & ADDKEY_AP) { - pu8keybuf = (WILC_Uint8 *)WILC_MALLOC(RX_MIC_KEY_MSG_LEN); + pu8keybuf = (u8 *)WILC_MALLOC(RX_MIC_KEY_MSG_LEN); if (pu8keybuf == NULL) { PRINT_ER("No buffer to send RxGTK Key\n"); ret = -1; @@ -2875,7 +2875,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) if (pstrHostIFkeyAttr->u8KeyAction & ADDKEY) { PRINT_D(HOSTINF_DBG, "Handling group key(Rx) function\n"); - pu8keybuf = (WILC_Uint8 *)WILC_MALLOC(RX_MIC_KEY_MSG_LEN); + pu8keybuf = (u8 *)WILC_MALLOC(RX_MIC_KEY_MSG_LEN); if (pu8keybuf == NULL) { PRINT_ER("No buffer to send RxGTK Key\n"); ret = -1; @@ -2930,7 +2930,7 @@ _WPARxGtk_end_case_: if (pstrHostIFkeyAttr->u8KeyAction & ADDKEY_AP) { - pu8keybuf = (WILC_Uint8 *)WILC_MALLOC(PTK_KEY_MSG_LEN + 1); + pu8keybuf = (u8 *)WILC_MALLOC(PTK_KEY_MSG_LEN + 1); @@ -2977,7 +2977,7 @@ _WPARxGtk_end_case_: if (pstrHostIFkeyAttr->u8KeyAction & ADDKEY) { - pu8keybuf = (WILC_Uint8 *)WILC_MALLOC(PTK_KEY_MSG_LEN); + pu8keybuf = (u8 *)WILC_MALLOC(PTK_KEY_MSG_LEN); @@ -3027,7 +3027,7 @@ _WPAPtk_end_case_: PRINT_D(HOSTINF_DBG, "Handling PMKSA key\n"); - pu8keybuf = (WILC_Uint8 *)WILC_MALLOC((pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1); + pu8keybuf = (u8 *)WILC_MALLOC((pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1); if (pu8keybuf == NULL) { PRINT_ER("No buffer to send PMKSA Key\n"); return -1; @@ -3407,7 +3407,7 @@ static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInacti { WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint8 *stamac; + u8 *stamac; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3415,7 +3415,7 @@ static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInacti strWID.u16WIDid = (WILC_Uint16)WID_SET_STA_MAC_INACTIVE_TIME; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = ETH_ALEN; - strWID.ps8WidVal = (WILC_Uint8 *)WILC_MALLOC(strWID.s32ValueSize); + strWID.ps8WidVal = (u8 *)WILC_MALLOC(strWID.s32ValueSize); stamac = strWID.ps8WidVal; @@ -3476,7 +3476,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Adding BEACON\n"); @@ -3548,7 +3548,7 @@ static void Handle_DelBeacon(void *drvHandler, tstrHostIFDelBeacon *pstrDelBeaco { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (WILC_Uint16)WID_DEL_BEACON; strWID.enuWIDtype = WID_CHAR; @@ -3581,15 +3581,15 @@ static void Handle_DelBeacon(void *drvHandler, tstrHostIFDelBeacon *pstrDelBeaco /** * @brief WILC_HostIf_PackStaParam * @details Handling packing of the station params in a buffer - * @param[in] WILC_Uint8* pu8Buffer, tstrWILC_AddStaParam* pstrStationParam + * @param[in] u8* pu8Buffer, tstrWILC_AddStaParam* pstrStationParam * @return NONE * @author * @date * @version 1.0 */ -static WILC_Uint32 WILC_HostIf_PackStaParam(WILC_Uint8 *pu8Buffer, tstrWILC_AddStaParam *pstrStationParam) +static WILC_Uint32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, tstrWILC_AddStaParam *pstrStationParam) { - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; pu8CurrByte = pu8Buffer; @@ -3646,7 +3646,7 @@ static void Handle_AddStation(void *drvHandler, tstrWILC_AddStaParam *pstrStatio { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Handling add station\n"); strWID.u16WIDid = (WILC_Uint16)WID_ADD_STA; @@ -3689,9 +3689,9 @@ static void Handle_DelAllSta(void *drvHandler, tstrHostIFDelAllSta *pstrDelAllSt { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - WILC_Uint8 i; + u8 i; UWORD8 au8Zero_Buff[6] = {0}; strWID.u16WIDid = (WILC_Uint16)WID_DEL_ALL_STA; strWID.enuWIDtype = WID_STR; @@ -3747,7 +3747,7 @@ static void Handle_DelStation(void *drvHandler, tstrHostIFDelSta *pstrDelStaPara { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (WILC_Uint16)WID_REMOVE_STA; @@ -3793,7 +3793,7 @@ static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStati { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (WILC_Uint16)WID_EDIT_STA; @@ -3838,7 +3838,7 @@ static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStati static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan) { WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint8 u8remain_on_chan_flag; + u8 u8remain_on_chan_flag; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; @@ -3921,7 +3921,7 @@ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrH { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Handling frame register Flag : %d FrameType: %d\n", pstrHostIfRegisterFrame->bReg, pstrHostIfRegisterFrame->u16FrameType); @@ -3972,7 +3972,7 @@ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrH #define FALSE_FRMWR_CHANNEL 100 static WILC_Uint32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan) { - WILC_Uint8 u8remain_on_chan_flag; + u8 u8remain_on_chan_flag; tstrWID strWID; WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; @@ -4108,7 +4108,7 @@ static void Handle_SetMulticastFilter(void *drvHandler, tstrHostIFSetMulti *strH { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Uint8 *pu8CurrByte; + u8 *pu8CurrByte; PRINT_D(HOSTINF_DBG, "Setup Multicast Filter\n"); @@ -4177,7 +4177,7 @@ static WILC_Sint32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo strWID.u16WIDid = (WILC_Uint16)WID_11E_P_ACTION_REQ; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Uint8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); + strWID.ps8WidVal = (u8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); strWID.s32ValueSize = BLOCK_ACK_REQ_SIZE; ptr = strWID.ps8WidVal; /* *ptr++ = 0x14; */ @@ -4262,7 +4262,7 @@ static WILC_Sint32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo strWID.u16WIDid = (WILC_Uint16)WID_11E_P_ACTION_REQ; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Uint8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); + strWID.ps8WidVal = (u8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); strWID.s32ValueSize = BLOCK_ACK_REQ_SIZE; ptr = strWID.ps8WidVal; /* *ptr++ = 0x14; */ @@ -4332,7 +4332,7 @@ static WILC_Sint32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessi strWID.u16WIDid = (WILC_Uint16)WID_DEL_ALL_RX_BA; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Uint8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); + strWID.ps8WidVal = (u8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); strWID.s32ValueSize = BLOCK_ACK_REQ_SIZE; ptr = strWID.ps8WidVal; *ptr++ = 0x14; @@ -4634,7 +4634,7 @@ static void TimerCB_Connect(void *pvArg) * @version 1.0 */ /* Check implementation in core adding 9 bytes to the input! */ -WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const WILC_Uint8 *pu8StaAddress) +WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddress) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -4663,7 +4663,7 @@ WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const WILC_Uint8 *pu8 * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8keyIdx) +WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, u8 u8keyIdx) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -4713,7 +4713,7 @@ WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8keyI * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8Index) +WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, u8 u8Index) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -4770,7 +4770,7 @@ WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const WILC_Uint8 *pu8WepKey, WILC_Uint8 u8WepKeylen, WILC_Uint8 u8Keyidx) +WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -4793,7 +4793,7 @@ WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const WILC_U strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr. - uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = (WILC_Uint8 *)WILC_MALLOC(u8WepKeylen); + uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = (u8 *)WILC_MALLOC(u8WepKeylen); WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, pu8WepKey, u8WepKeylen); @@ -4836,13 +4836,13 @@ WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const WILC_U * @date 28 FEB 2013 * @version 1.0 */ -WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const WILC_Uint8 *pu8WepKey, WILC_Uint8 u8WepKeylen, WILC_Uint8 u8Keyidx, WILC_Uint8 u8mode, AUTHTYPE_T tenuAuth_type) +WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, AUTHTYPE_T tenuAuth_type) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - WILC_Uint8 i; + u8 i; if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -4863,7 +4863,7 @@ WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const WILC_Ui strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr. - uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = (WILC_Uint8 *)WILC_MALLOC((u8WepKeylen)); + uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = (u8 *)WILC_MALLOC((u8WepKeylen)); WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, @@ -4912,13 +4912,13 @@ WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const WILC_Ui * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, WILC_Uint8 u8PtkKeylen, - const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, WILC_Uint8 mode, WILC_Uint8 u8Ciphermode, WILC_Uint8 u8Idx) +WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen, + const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - WILC_Uint8 u8KeyLen = u8PtkKeylen; + u8 u8KeyLen = u8PtkKeylen; WILC_Uint32 i; if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -4948,7 +4948,7 @@ WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, WILC_U strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = (WILC_Uint8 *)WILC_MALLOC(u8PtkKeylen); + uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = (u8 *)WILC_MALLOC(u8PtkKeylen); WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, @@ -5014,14 +5014,14 @@ WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, WILC_U * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, WILC_Uint8 u8GtkKeylen, - WILC_Uint8 u8KeyIdx, WILC_Uint32 u32KeyRSClen, const u8 *KeyRSC, - const u8 *pu8RxMic, const u8 *pu8TxMic, WILC_Uint8 mode, WILC_Uint8 u8Ciphermode) +WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen, + u8 u8KeyIdx, WILC_Uint32 u32KeyRSClen, const u8 *KeyRSC, + const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - WILC_Uint8 u8KeyLen = u8GtkKeylen; + u8 u8KeyLen = u8GtkKeylen; if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -5038,7 +5038,7 @@ WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, W } if (KeyRSC != NULL) { strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq = (WILC_Uint8 *)WILC_MALLOC(u32KeyRSClen); + uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq = (u8 *)WILC_MALLOC(u32KeyRSClen); WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq, KeyRSC, u32KeyRSClen); @@ -5060,7 +5060,7 @@ WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, W strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = (WILC_Uint8 *)WILC_MALLOC(u8KeyLen); + uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = (u8 *)WILC_MALLOC(u8KeyLen); WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, pu8RxGtk, u8GtkKeylen); @@ -5120,7 +5120,7 @@ WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, W * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8KeyLen, WILC_Uint8 *pu8TxGtk, WILC_Uint8 u8KeyIdx) +WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -5138,7 +5138,7 @@ WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8KeyLen, strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.u8KeyAction = ADDKEY; strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = (WILC_Uint8 *)WILC_MALLOC(u8KeyLen); + uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = (u8 *)WILC_MALLOC(u8KeyLen); WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, pu8TxGtk, u8KeyLen); @@ -5245,7 +5245,7 @@ WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAt * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8PmkidInfoArray, +WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoArray, WILC_Uint32 u32PmkidInfoLen) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -5274,14 +5274,14 @@ WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8Pm * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8PassPhrase, - WILC_Uint8 u8Psklength) +WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PassPhrase, + u8 u8Psklength) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - /* WILC_Uint8 u8Psklength = WILC_strlen(pu8PassPhrase); */ + /* u8 u8Psklength = WILC_strlen(pu8PassPhrase); */ /*validating psk length*/ if ((u8Psklength > 7) && (u8Psklength < 65)) { strWID.u16WIDid = (WILC_Uint16)WID_11I_PSK; @@ -5303,7 +5303,7 @@ WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, WILC * @date 19 April 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8MacAddress) +WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -5337,7 +5337,7 @@ WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8Ma * @date 16 July 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8MacAddress) +WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -5379,7 +5379,7 @@ WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8Ma * @version 1.0 */ WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, - WILC_Uint8 *pu8PassPhrase, WILC_Uint8 u8Psklength) + u8 *pu8PassPhrase, u8 u8Psklength) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -5426,7 +5426,7 @@ WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, */ #ifndef CONNECT_DIRECT WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, - WILC_Uint8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], + u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], WILC_Uint32 u32MaxSiteSrvyFragLen) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -5475,7 +5475,7 @@ WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 scanSource) +WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -5505,7 +5505,7 @@ WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 sc * @version 1.0 */ -WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8ScanSource) +WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSource) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -5530,12 +5530,12 @@ WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *p * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8bssid, +WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8bssid, const u8 *pu8ssid, size_t ssidLen, - const WILC_Uint8 *pu8IEs, size_t IEsLen, + const u8 *pu8IEs, size_t IEsLen, tWILCpfConnectResult pfConnectResult, void *pvUserArg, - WILC_Uint8 u8security, AUTHTYPE_T tenuAuth_type, - WILC_Uint8 u8channel, + u8 u8security, AUTHTYPE_T tenuAuth_type, + u8 u8channel, void *pJoinParams) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -5578,14 +5578,14 @@ WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8bssi strHostIFmsg.drvHandler = hWFIDrv; if (pu8bssid != NULL) { - strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8bssid = (WILC_Uint8 *)WILC_MALLOC(6); /* will be deallocated by the receiving thread */ + strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8bssid = (u8 *)WILC_MALLOC(6); /* will be deallocated by the receiving thread */ WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8bssid, pu8bssid, 6); } if (pu8ssid != NULL) { strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.ssidLen = ssidLen; - strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8ssid = (WILC_Uint8 *)WILC_MALLOC(ssidLen); /* will be deallocated by the receiving thread */ + strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8ssid = (u8 *)WILC_MALLOC(ssidLen); /* will be deallocated by the receiving thread */ WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8ssid, pu8ssid, ssidLen); @@ -5593,7 +5593,7 @@ WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8bssi if (pu8IEs != NULL) { strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.IEsLen = IEsLen; - strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8IEs = (WILC_Uint8 *)WILC_MALLOC(IEsLen); /* will be deallocated by the receiving thread */ + strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8IEs = (u8 *)WILC_MALLOC(IEsLen); /* will be deallocated by the receiving thread */ WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr.pu8IEs, pu8IEs, IEsLen); } @@ -5725,7 +5725,7 @@ WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16Reason * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 assoc_id) +WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -5765,7 +5765,7 @@ WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 as * @version 1.0 */ -WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8AssocReqInfo, +WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocReqInfo, WILC_Uint32 u32AssocReqInfoLen) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -5792,7 +5792,7 @@ WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *p * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8AssocRespInfo, +WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo, WILC_Uint32 u32MaxAssocRespInfoLen, WILC_Uint32 *pu32RcvdAssocRespInfoLen) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -5842,7 +5842,7 @@ WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *p * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8RxPowerLevel, +WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowerLevel, WILC_Uint32 u32RxPowerLevelLen) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -5873,7 +5873,7 @@ WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *p * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8ChNum) +WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 u8ChNum) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -5997,7 +5997,7 @@ WILC_Sint32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8ChNo) +WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -6297,9 +6297,9 @@ WILC_Sint32 host_int_get_statistics(WILC_WFIDrvHandle hWFIDrv, tstrStatistics *p * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8ScanSource, - WILC_Uint8 u8ScanType, WILC_Uint8 *pu8ChnlFreqList, - WILC_Uint8 u8ChnlListLen, const WILC_Uint8 *pu8IEs, +WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, u8 u8ScanSource, + u8 u8ScanType, u8 *pu8ChnlFreqList, + u8 u8ChnlListLen, const u8 *pu8IEs, size_t IEsLen, tWILCpfScanResult ScanResult, void *pvUserArg, tstrHiddenNetwork *pstrHiddenNetwork) { @@ -6332,12 +6332,12 @@ WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8ScanSource, strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.pvUserArg = pvUserArg; strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.u8ChnlListLen = u8ChnlListLen; - strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.pu8ChnlFreqList = (WILC_Uint8 *)WILC_MALLOC(u8ChnlListLen); /* will be deallocated by the receiving thread */ + strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.pu8ChnlFreqList = (u8 *)WILC_MALLOC(u8ChnlListLen); /* will be deallocated by the receiving thread */ WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.pu8ChnlFreqList, pu8ChnlFreqList, u8ChnlListLen); strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.IEsLen = IEsLen; - strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.pu8IEs = (WILC_Uint8 *)WILC_MALLOC(IEsLen); /* will be deallocated by the receiving thread */ + strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.pu8IEs = (u8 *)WILC_MALLOC(IEsLen); /* will be deallocated by the receiving thread */ WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFscanAttr.pu8IEs, pu8IEs, IEsLen); @@ -6531,7 +6531,7 @@ WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint * @version 1.0 */ void host_int_send_join_leave_info_to_host - (WILC_Uint16 assocId, WILC_Uint8 *stationAddr, WILC_Bool joining) + (WILC_Uint16 assocId, u8 *stationAddr, WILC_Bool joining) { } /** @@ -6578,7 +6578,7 @@ void GetPeriodicRSSI(void *pvArg) void host_int_send_network_info_to_host - (WILC_Uint8 *macStartAddress, WILC_Uint16 u16RxFrameLen, WILC_Sint8 s8Rssi) + (u8 *macStartAddress, WILC_Uint16 u16RxFrameLen, WILC_Sint8 s8Rssi) { } /** @@ -6914,7 +6914,7 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) * @date 1 Mar 2012 * @version 1.0 */ -void NetworkInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) +void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -6939,7 +6939,7 @@ void NetworkInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) strHostIFmsg.drvHandler = pstrWFIDrv; strHostIFmsg.uniHostIFmsgBody.strRcvdNetworkInfo.u32Length = u32Length; - strHostIFmsg.uniHostIFmsgBody.strRcvdNetworkInfo.pu8Buffer = (WILC_Uint8 *)WILC_MALLOC(u32Length); /* will be deallocated by the receiving thread */ + strHostIFmsg.uniHostIFmsgBody.strRcvdNetworkInfo.pu8Buffer = (u8 *)WILC_MALLOC(u32Length); /* will be deallocated by the receiving thread */ WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strRcvdNetworkInfo.pu8Buffer, pu8Buffer, u32Length); @@ -6964,7 +6964,7 @@ void NetworkInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) * @date 15 Mar 2012 * @version 1.0 */ -void GnrlAsyncInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) +void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -7003,7 +7003,7 @@ void GnrlAsyncInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) strHostIFmsg.uniHostIFmsgBody.strRcvdGnrlAsyncInfo.u32Length = u32Length; - strHostIFmsg.uniHostIFmsgBody.strRcvdGnrlAsyncInfo.pu8Buffer = (WILC_Uint8 *)WILC_MALLOC(u32Length); /* will be deallocated by the receiving thread */ + strHostIFmsg.uniHostIFmsgBody.strRcvdGnrlAsyncInfo.pu8Buffer = (u8 *)WILC_MALLOC(u32Length); /* will be deallocated by the receiving thread */ WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strRcvdGnrlAsyncInfo.pu8Buffer, pu8Buffer, u32Length); @@ -7021,13 +7021,13 @@ void GnrlAsyncInfoReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) /** * @brief host_int_ScanCompleteReceived * @details Setting scan complete received notifcation in message queue - * @param[in] WILC_Uint8* pu8Buffer, WILC_Uint32 u32Length + * @param[in] u8* pu8Buffer, WILC_Uint32 u32Length * @return Error code. * @author * @date * @version 1.0 */ -void host_int_ScanCompleteReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) +void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -7056,7 +7056,7 @@ void host_int_ScanCompleteReceived(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32Length) /*no need to send message body*/ /*strHostIFmsg.uniHostIFmsgBody.strScanComplete.u32Length = u32Length; - * strHostIFmsg.uniHostIFmsgBody.strScanComplete.pu8Buffer = (WILC_Uint8*)WILC_MALLOC(u32Length); + * strHostIFmsg.uniHostIFmsgBody.strScanComplete.pu8Buffer = (u8*)WILC_MALLOC(u32Length); * WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strScanComplete.pu8Buffer, * pu8Buffer, u32Length); */ @@ -7227,8 +7227,8 @@ WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16Fr * @brief host_int_add_beacon * @details Setting add beacon params in message queue * @param[in] WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interval, - * WILC_Uint32 u32DTIMPeriod,WILC_Uint32 u32HeadLen, WILC_Uint8* pu8Head, - * WILC_Uint32 u32TailLen, WILC_Uint8* pu8Tail + * WILC_Uint32 u32DTIMPeriod,WILC_Uint32 u32HeadLen, u8* pu8Head, + * WILC_Uint32 u32TailLen, u8* pu8Tail * @return Error code. * @author * @date @@ -7236,8 +7236,8 @@ WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16Fr */ WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interval, WILC_Uint32 u32DTIMPeriod, - WILC_Uint32 u32HeadLen, WILC_Uint8 *pu8Head, - WILC_Uint32 u32TailLen, WILC_Uint8 *pu8Tail) + WILC_Uint32 u32HeadLen, u8 *pu8Head, + WILC_Uint32 u32TailLen, u8 *pu8Tail) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7259,7 +7259,7 @@ WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interv pstrSetBeaconParam->u32Interval = u32Interval; pstrSetBeaconParam->u32DTIMPeriod = u32DTIMPeriod; pstrSetBeaconParam->u32HeadLen = u32HeadLen; - pstrSetBeaconParam->pu8Head = (WILC_Uint8 *)WILC_MALLOC(u32HeadLen); + pstrSetBeaconParam->pu8Head = (u8 *)WILC_MALLOC(u32HeadLen); if (pstrSetBeaconParam->pu8Head == NULL) { WILC_ERRORREPORT(s32Error, WILC_NO_MEM); } @@ -7268,7 +7268,7 @@ WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interv /* Bug 4599 : if tail length = 0 skip allocating & copying */ if (u32TailLen > 0) { - pstrSetBeaconParam->pu8Tail = (WILC_Uint8 *)WILC_MALLOC(u32TailLen); + pstrSetBeaconParam->pu8Tail = (u8 *)WILC_MALLOC(u32TailLen); if (pstrSetBeaconParam->pu8Tail == NULL) { WILC_ERRORREPORT(s32Error, WILC_NO_MEM); } @@ -7386,7 +7386,7 @@ WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam /** * @brief host_int_del_station * @details Setting delete station params in message queue - * @param[in] WILC_WFIDrvHandle hWFIDrv, WILC_Uint8* pu8MacAddr + * @param[in] WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr * @return Error code. * @author * @date @@ -7432,7 +7432,7 @@ WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr /** * @brief host_int_del_allstation * @details Setting del station params in message queue - * @param[in] WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 pu8MacAddr[][ETH_ALEN]s + * @param[in] WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]s * @return Error code. * @author * @date @@ -7444,9 +7444,9 @@ WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][E tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrHostIFDelAllSta *pstrDelAllStationMsg = &strHostIFmsg.uniHostIFmsgBody.strHostIFDelAllSta; - WILC_Uint8 au8Zero_Buff[ETH_ALEN] = {0}; + u8 au8Zero_Buff[ETH_ALEN] = {0}; WILC_Uint32 i; - WILC_Uint8 u8AssocNumb = 0; + u8 u8AssocNumb = 0; if (pstrWFIDrv == NULL) { @@ -7630,17 +7630,17 @@ WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) { tstrJoinBssParam *pNewJoinBssParam = NULL; - WILC_Uint8 *pu8IEs; + u8 *pu8IEs; WILC_Uint16 u16IEsLen; WILC_Uint16 index = 0; - WILC_Uint8 suppRatesNo = 0; - WILC_Uint8 extSuppRatesNo; + u8 suppRatesNo = 0; + u8 extSuppRatesNo; WILC_Uint16 jumpOffset; - WILC_Uint8 pcipherCount; - WILC_Uint8 authCount; - WILC_Uint8 pcipherTotalCount = 0; - WILC_Uint8 authTotalCount = 0; - WILC_Uint8 i, j; + u8 pcipherCount; + u8 authCount; + u8 pcipherTotalCount = 0; + u8 authTotalCount = 0; + u8 i, j; pu8IEs = ptstrNetworkInfo->pu8IEs; u16IEsLen = ptstrNetworkInfo->u16IEsLen; @@ -7654,7 +7654,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) WILC_memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->au8bssid, 6); /*for(i=0; i<6;i++) * PRINT_D(HOSTINF_DBG,"%c",pNewJoinBssParam->au8bssid[i]);*/ - WILC_memcpy((WILC_Uint8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->au8ssid, ptstrNetworkInfo->u8SsidLen + 1); + WILC_memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->au8ssid, ptstrNetworkInfo->u8SsidLen + 1); pNewJoinBssParam->ssidLen = ptstrNetworkInfo->u8SsidLen; WILC_memset(pNewJoinBssParam->rsn_pcip_policy, 0xFF, 3); WILC_memset(pNewJoinBssParam->rsn_auth_policy, 0xFF, 3); @@ -7964,7 +7964,7 @@ WILC_Sint32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSI * @author Abdelrahman Sobhy * @date * @version 1.0*/ -WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *u16ipadd, WILC_Uint8 idx) +WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 idx) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -8008,7 +8008,7 @@ WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *u16i * @author Abdelrahman Sobhy * @date * @version 1.0*/ -WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *u16ipadd, WILC_Uint8 idx) +WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 idx) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 5c17076d10f6..d03a5753cb33 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -132,7 +132,7 @@ typedef struct { } cfg_param_t; typedef struct _tstrStatistics { - WILC_Uint8 u8LinkSpeed; + u8 u8LinkSpeed; WILC_Sint8 s8RSSI; WILC_Uint32 u32TxCount; WILC_Uint32 u32RxCount; @@ -152,12 +152,12 @@ typedef enum { } tenuHostIFstate; typedef struct _tstrHostIFpmkid { - WILC_Uint8 bssid[ETH_ALEN]; - WILC_Uint8 pmkid[PMKID_LEN]; + u8 bssid[ETH_ALEN]; + u8 pmkid[PMKID_LEN]; } tstrHostIFpmkid; typedef struct _tstrHostIFpmkidAttr { - WILC_Uint8 numpmkid; + u8 numpmkid; tstrHostIFpmkid pmkidlist[WILC_MAX_NUM_PMKIDS]; } tstrHostIFpmkidAttr; #if 0 @@ -190,23 +190,23 @@ typedef enum { typedef struct { WILC_Uint32 u32SetCfgFlag; - WILC_Uint8 ht_enable; - WILC_Uint8 bss_type; - WILC_Uint8 auth_type; + u8 ht_enable; + u8 bss_type; + u8 auth_type; WILC_Uint16 auth_timeout; - WILC_Uint8 power_mgmt_mode; + u8 power_mgmt_mode; WILC_Uint16 short_retry_limit; WILC_Uint16 long_retry_limit; WILC_Uint16 frag_threshold; WILC_Uint16 rts_threshold; WILC_Uint16 preamble_type; - WILC_Uint8 short_slot_allowed; - WILC_Uint8 txop_prot_disabled; + u8 short_slot_allowed; + u8 txop_prot_disabled; WILC_Uint16 beacon_interval; WILC_Uint16 dtim_period; SITE_SURVEY_T site_survey_enabled; WILC_Uint16 site_survey_scan_time; - WILC_Uint8 scan_source; + u8 scan_source; WILC_Uint16 active_scan_time; WILC_Uint16 passive_scan_time; CURRENT_TX_RATE_T curr_tx_rate; @@ -236,7 +236,7 @@ typedef enum { } tenuCfgParam; typedef struct { - WILC_Uint8 au8bssid[6]; + u8 au8bssid[6]; WILC_Sint8 s8rssi; } tstrFoundNetworkInfo; @@ -266,7 +266,7 @@ typedef void (*tWILCpfScanResult)(tenuScanEvent, tstrNetworkInfo *, void *, void /*Connect callBack function definition*/ typedef void (*tWILCpfConnectResult)(tenuConnDisconnEvent, tstrConnectInfo *, - WILC_Uint8, + u8, tstrDisconnectNotifInfo *, void *); @@ -291,21 +291,21 @@ typedef struct { * @version 1.0 */ typedef struct _tstrRcvdNetworkInfo { - WILC_Uint8 *pu8Buffer; + u8 *pu8Buffer; WILC_Uint32 u32Length; } tstrRcvdNetworkInfo; /*BugID_4156*/ typedef struct _tstrHiddenNetworkInfo { - WILC_Uint8 *pu8ssid; - WILC_Uint8 u8ssidlen; + u8 *pu8ssid; + u8 u8ssidlen; } tstrHiddenNetworkInfo; typedef struct _tstrHiddenNetwork { /* MAX_SSID_LEN */ tstrHiddenNetworkInfo *pstrHiddenNetworkInfo; - WILC_Uint8 u8ssidnum; + u8 u8ssidnum; } tstrHiddenNetwork; @@ -321,12 +321,12 @@ typedef struct { } tstrWILC_UsrScanReq; typedef struct { - WILC_Uint8 *pu8bssid; - WILC_Uint8 *pu8ssid; - WILC_Uint8 u8security; + u8 *pu8bssid; + u8 *pu8ssid; + u8 u8security; AUTHTYPE_T tenuAuth_type; size_t ssidLen; - WILC_Uint8 *pu8ConnReqIEs; + u8 *pu8ConnReqIEs; size_t ConnReqIEsLen; /* Connect user call back function */ tWILCpfConnectResult pfUserConnectResult; @@ -345,18 +345,18 @@ typedef struct { /*BugID_5077*/ typedef struct { - WILC_Uint8 u8MacAddress[ETH_ALEN]; + u8 u8MacAddress[ETH_ALEN]; } tstrHostIfSetMacAddress; /*BugID_5213*/ typedef struct { - WILC_Uint8 *u8MacAddress; + u8 *u8MacAddress; } tstrHostIfGetMacAddress; /*BugID_5222*/ typedef struct { - WILC_Uint8 au8Bssid[ETH_ALEN]; - WILC_Uint8 u8Ted; + u8 au8Bssid[ETH_ALEN]; + u8 u8Ted; WILC_Uint16 u16BufferSize; WILC_Uint16 u16SessionTimeout; } tstrHostIfBASessionInfo; @@ -375,7 +375,7 @@ typedef struct { WILC_Bool bReg; WILC_Uint16 u16FrameType; - WILC_Uint8 u8Regid; + u8 u8Regid; } tstrHostIfRegisterFrame; @@ -405,9 +405,9 @@ typedef struct { #ifdef WILC_P2P /*Remain on channel struvture*/ tstrHostIfRemainOnChan strHostIfRemainOnChan; - WILC_Uint8 u8RemainOnChan_pendingreq; + u8 u8RemainOnChan_pendingreq; WILC_Uint64 u64P2p_MgmtTimeout; - WILC_Uint8 u8P2PConnect; + u8 u8P2PConnect; #endif tenuHostIFstate enuHostIFstate; @@ -419,7 +419,7 @@ typedef struct { wid_site_survey_reslts_s astrSurveyResults[MAX_NUM_SCANNED_NETWORKS]; #endif - WILC_Uint8 au8AssociatedBSSID[ETH_ALEN]; + u8 au8AssociatedBSSID[ETH_ALEN]; tstrCfgParamVal strCfgValues; /* semaphores */ struct semaphore gtOsCfgValuesSem; @@ -461,22 +461,22 @@ typedef enum { } tenuWILC_StaFlag; typedef struct { - WILC_Uint8 au8BSSID[ETH_ALEN]; + u8 au8BSSID[ETH_ALEN]; WILC_Uint16 u16AssocID; - WILC_Uint8 u8NumRates; + u8 u8NumRates; const u8 *pu8Rates; WILC_Bool bIsHTSupported; WILC_Uint16 u16HTCapInfo; - WILC_Uint8 u8AmpduParams; - WILC_Uint8 au8SuppMCsSet[16]; + u8 u8AmpduParams; + u8 au8SuppMCsSet[16]; WILC_Uint16 u16HTExtParams; WILC_Uint32 u32TxBeamformingCap; - WILC_Uint8 u8ASELCap; + u8 u8ASELCap; WILC_Uint16 u16FlagsMask; /**/ WILC_Uint16 u16FlagsSet; /*buff; + u8 *buf = pv_data->buff; @@ -418,7 +418,7 @@ void WILC_mgm_HOSTAPD_ACK(void *priv, WILC_Bool bStatus) struct wilc_wfi_radiotap_cb_hdr *cb_hdr; struct tx_complete_mon_data *pv_data = (struct tx_complete_mon_data *)priv; - WILC_Uint8 *buf = pv_data->buff; + u8 *buf = pv_data->buff; /* len of the original frame without the added pointer at the tail */ WILC_Uint16 u16len = (pv_data->size) - sizeof(struct tx_complete_mon_data *); @@ -502,7 +502,7 @@ static void WILC_WFI_mon_setup(struct net_device *dev) /* u8 * mac_add; */ unsigned char mac_add[] = {0x00, 0x50, 0xc2, 0x5e, 0x10, 0x8f}; /* priv = wiphy_priv(priv->dev->ieee80211_ptr->wiphy); */ - /* mac_add = (WILC_Uint8*)WILC_MALLOC(ETH_ALEN); */ + /* mac_add = (u8*)WILC_MALLOC(ETH_ALEN); */ /* status = host_int_get_MacAddress(priv->hWILCWFIDrv,mac_add); */ /* mac_add[ETH_ALEN-1]+=1; */ memcpy(dev->dev_addr, mac_add, ETH_ALEN); diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index b92626ed02e1..b033eb879ca1 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -69,7 +69,7 @@ extern WILC_Bool g_obtainingIP; #endif extern WILC_Uint16 Set_machw_change_vir_if(WILC_Bool bValue); extern void resolve_disconnect_aberration(void *drvHandler); -extern WILC_Uint8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; +extern u8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; void wilc1000_wlan_deinit(linux_wlan_t *nic); #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP extern WILC_TimerHandle hDuringIpTimer; @@ -258,10 +258,10 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event struct WILC_WFI_priv *priv; tstrWILC_WFIDrv *pstrWFIDrv; struct net_device *dev; - WILC_Uint8 *pIP_Add_buff; + u8 *pIP_Add_buff; WILC_Sint32 s32status = WILC_FAIL; perInterface_wlan_t *nic; - WILC_Uint8 null_ip[4] = {0}; + u8 null_ip[4] = {0}; char wlan_dev_name[5] = "wlan0"; if (dev_iface == NULL || dev_iface->ifa_dev == NULL || dev_iface->ifa_dev->dev == NULL) { @@ -2377,7 +2377,7 @@ int mac_close(struct net_device *ndev) int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) { - WILC_Uint8 *buff = NULL; + u8 *buff = NULL; WILC_Sint8 rssi; WILC_Uint32 size = 0, length = 0; perInterface_wlan_t *nic; diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h index 84157368335d..d7e4b1ce3497 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.h +++ b/drivers/staging/wilc1000/wilc_msgqueue.h @@ -19,7 +19,7 @@ */ typedef struct { /* a dummy member to avoid compiler errors*/ - WILC_Uint8 dummy; + u8 dummy; } tstrWILC_MsgQueueAttrs; diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h index 3cdc05305109..4b4cfa202043 100644 --- a/drivers/staging/wilc1000/wilc_oswrapper.h +++ b/drivers/staging/wilc1000/wilc_oswrapper.h @@ -14,7 +14,6 @@ #define WILC_OSW_INTERFACE_VER 2 /* Integer Types */ -typedef unsigned char WILC_Uint8; typedef unsigned short WILC_Uint16; typedef unsigned int WILC_Uint32; typedef unsigned long long WILC_Uint64; diff --git a/drivers/staging/wilc1000/wilc_strutils.c b/drivers/staging/wilc1000/wilc_strutils.c index d349eaa2b51f..c6af13cba543 100644 --- a/drivers/staging/wilc1000/wilc_strutils.c +++ b/drivers/staging/wilc1000/wilc_strutils.c @@ -30,7 +30,7 @@ void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, WILC_Uint32 u32C * @date 18 Aug 2010 * @version 1.0 */ -void *WILC_memset(void *pvTarget, WILC_Uint8 u8SetValue, WILC_Uint32 u32Count) +void *WILC_memset(void *pvTarget, u8 u8SetValue, WILC_Uint32 u32Count) { return memset(pvTarget, u8SetValue, u32Count); } diff --git a/drivers/staging/wilc1000/wilc_strutils.h b/drivers/staging/wilc1000/wilc_strutils.h index 8795d56adc4a..ddc54ab21f67 100644 --- a/drivers/staging/wilc1000/wilc_strutils.h +++ b/drivers/staging/wilc1000/wilc_strutils.h @@ -53,11 +53,11 @@ void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, WILC_Uint32 u32C static WILC_ErrNo WILC_memcpy(void *pvTarget, const void *pvSource, WILC_Uint32 u32Count) { if ( - (((WILC_Uint8 *)pvTarget <= (WILC_Uint8 *)pvSource) - && (((WILC_Uint8 *)pvTarget + u32Count) > (WILC_Uint8 *)pvSource)) + (((u8 *)pvTarget <= (u8 *)pvSource) + && (((u8 *)pvTarget + u32Count) > (u8 *)pvSource)) - || (((WILC_Uint8 *)pvSource <= (WILC_Uint8 *)pvTarget) - && (((WILC_Uint8 *)pvSource + u32Count) > (WILC_Uint8 *)pvTarget)) + || (((u8 *)pvSource <= (u8 *)pvTarget) + && (((u8 *)pvSource + u32Count) > (u8 *)pvTarget)) ) { /* ovelapped memory, return Error */ return WILC_FAIL; @@ -78,7 +78,7 @@ static WILC_ErrNo WILC_memcpy(void *pvTarget, const void *pvSource, WILC_Uint32 * @date 18 Aug 2010 * @version 1.0 */ -void *WILC_memset(void *pvTarget, WILC_Uint8 u8SetValue, WILC_Uint32 u32Count); +void *WILC_memset(void *pvTarget, u8 u8SetValue, WILC_Uint32 u32Count); /*! * @brief copies the contents of source string into the target string diff --git a/drivers/staging/wilc1000/wilc_timer.h b/drivers/staging/wilc1000/wilc_timer.h index 41c6784ab8e1..72b27155293e 100644 --- a/drivers/staging/wilc1000/wilc_timer.h +++ b/drivers/staging/wilc1000/wilc_timer.h @@ -21,7 +21,7 @@ typedef void (*tpfWILC_TimerFunction)(void *); */ typedef struct { /* a dummy member to avoid compiler errors*/ - WILC_Uint8 dummy; + u8 dummy; } tstrWILC_TimerAttrs; /*! diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index aa71b2708569..f5eff0933e7d 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -36,11 +36,11 @@ WILC_Uint32 u32LastScannedNtwrksCountShadow; WILC_TimerHandle hDuringIpTimer; #endif WILC_TimerHandle hAgingTimer; -static WILC_Uint8 op_ifcs; -extern WILC_Uint8 u8ConnectedSSID[6]; +static u8 op_ifcs; +extern u8 u8ConnectedSSID[6]; /*BugID_5137*/ -WILC_Uint8 g_wilc_initialized = 1; +u8 g_wilc_initialized = 1; extern linux_wlan_t *g_linux_wlan; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP extern WILC_Bool g_obtainingIP; @@ -103,15 +103,15 @@ struct p2p_mgmt_data { }; /*Global variable used to state the current connected STA channel*/ -WILC_Uint8 u8WLANChannel = INVALID_CHANNEL; +u8 u8WLANChannel = INVALID_CHANNEL; /*BugID_5442*/ -WILC_Uint8 u8CurrChannel; +u8 u8CurrChannel; -WILC_Uint8 u8P2P_oui[] = {0x50, 0x6f, 0x9A, 0x09}; -WILC_Uint8 u8P2Plocalrandom = 0x01; -WILC_Uint8 u8P2Precvrandom = 0x00; -WILC_Uint8 u8P2P_vendorspec[] = {0xdd, 0x05, 0x00, 0x08, 0x40, 0x03}; +u8 u8P2P_oui[] = {0x50, 0x6f, 0x9A, 0x09}; +u8 u8P2Plocalrandom = 0x01; +u8 u8P2Precvrandom = 0x00; +u8 u8P2P_vendorspec[] = {0xdd, 0x05, 0x00, 0x08, 0x40, 0x03}; WILC_Bool bWilc_ie = WILC_FALSE; #endif @@ -134,7 +134,7 @@ struct wilc_wfi_key g_key_gtk_params; struct add_key_params g_add_ptk_key_params; struct wilc_wfi_key g_key_ptk_params; struct wilc_wfi_wep_key g_key_wep_params; -WILC_Uint8 g_flushing_in_progress; +u8 g_flushing_in_progress; WILC_Bool g_ptk_keys_saved = WILC_FALSE; WILC_Bool g_gtk_keys_saved = WILC_FALSE; WILC_Bool g_wep_keys_saved = WILC_FALSE; @@ -349,7 +349,7 @@ void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid, vo if (ap_found != -1) WILC_FREE(astrLastScannedNtwrksShadow[ap_index].pu8IEs); astrLastScannedNtwrksShadow[ap_index].pu8IEs = - (WILC_Uint8 *)WILC_MALLOC(pstrNetworkInfo->u16IEsLen); /* will be deallocated by the WILC_WFI_CfgScan() function */ + (u8 *)WILC_MALLOC(pstrNetworkInfo->u16IEsLen); /* will be deallocated by the WILC_WFI_CfgScan() function */ WILC_memcpy(astrLastScannedNtwrksShadow[ap_index].pu8IEs, pstrNetworkInfo->pu8IEs, pstrNetworkInfo->u16IEsLen); @@ -507,7 +507,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo * @date 01 MAR 2012 * @version 1.0 */ -int WILC_WFI_Set_PMKSA(WILC_Uint8 *bssid, struct WILC_WFI_priv *priv) +int WILC_WFI_Set_PMKSA(u8 *bssid, struct WILC_WFI_priv *priv) { WILC_Uint32 i; WILC_Sint32 s32Error = WILC_SUCCESS; @@ -542,7 +542,7 @@ int linux_wlan_set_bssid(struct net_device *wilc_netdev, uint8_t *pBSSID); * @param[in] tenuConnDisconnEvent enuConnDisconnEvent: Type of connection response either * connection response or disconnection notification. * tstrConnectInfo* pstrConnectInfo: COnnection information. - * WILC_Uint8 u8MacStatus: Mac Status from firmware + * u8 u8MacStatus: Mac Status from firmware * tstrDisconnectNotifInfo* pstrDisconnectNotifInfo: Disconnection Notification * void* pUserVoid: Private data associated with wireless interface * @return NONE @@ -554,7 +554,7 @@ int connecting; static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, tstrConnectInfo *pstrConnectInfo, - WILC_Uint8 u8MacStatus, + u8 u8MacStatus, tstrDisconnectNotifInfo *pstrDisconnectNotifInfo, void *pUserVoid) { @@ -563,7 +563,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, #ifdef WILC_P2P tstrWILC_WFIDrv *pstrWFIDrv; #endif - WILC_Uint8 NullBssid[ETH_ALEN] = {0}; + u8 NullBssid[ETH_ALEN] = {0}; connecting = 0; priv = (struct WILC_WFI_priv *)pUserVoid; @@ -742,7 +742,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r struct WILC_WFI_priv *priv; WILC_Uint32 i; WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint8 au8ScanChanList[MAX_NUM_SCANNED_NETWORKS]; + u8 au8ScanChanList[MAX_NUM_SCANNED_NETWORKS]; tstrHiddenNetwork strHiddenNetwork; priv = wiphy_priv(wiphy); @@ -773,7 +773,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r if (request->n_channels <= MAX_NUM_SCANNED_NETWORKS) { /* TODO: mostafa: to be replaced by */ /* max_scan_ssids */ for (i = 0; i < request->n_channels; i++) { - au8ScanChanList[i] = (WILC_Uint8)ieee80211_frequency_to_channel(request->channels[i]->center_freq); + au8ScanChanList[i] = (u8)ieee80211_frequency_to_channel(request->channels[i]->center_freq); PRINT_INFO(CFG80211_DBG, "ScanChannel List[%d] = %d,", i, au8ScanChanList[i]); } @@ -804,13 +804,13 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r PRINT_D(CFG80211_DBG, "Trigger Scan Request \n"); s32Error = host_int_scan(priv->hWILCWFIDrv, USER_SCAN, ACTIVE_SCAN, au8ScanChanList, request->n_channels, - (const WILC_Uint8 *)request->ie, request->ie_len, + (const u8 *)request->ie, request->ie_len, CfgScanResult, (void *)priv, &strHiddenNetwork); } else { PRINT_D(CFG80211_DBG, "Trigger Scan Request \n"); s32Error = host_int_scan(priv->hWILCWFIDrv, USER_SCAN, ACTIVE_SCAN, au8ScanChanList, request->n_channels, - (const WILC_Uint8 *)request->ie, request->ie_len, + (const u8 *)request->ie, request->ie_len, CfgScanResult, (void *)priv, NULL); } @@ -845,7 +845,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, WILC_Sint32 s32Error = WILC_SUCCESS; WILC_Uint32 i; /* SECURITY_T tenuSecurity_t = NO_SECURITY; */ - WILC_Uint8 u8security = NO_ENCRYPT; + u8 u8security = NO_ENCRYPT; AUTHTYPE_T tenuAuth_type = ANY; WILC_Char *pcgroup_encrypt_val; WILC_Char *pccipher_group; @@ -1161,10 +1161,10 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k struct WILC_WFI_priv *priv; const u8 *pu8RxMic = NULL; const u8 *pu8TxMic = NULL; - WILC_Uint8 u8mode = NO_ENCRYPT; + u8 u8mode = NO_ENCRYPT; #ifdef WILC_AP_EXTERNAL_MLME - WILC_Uint8 u8gmode = NO_ENCRYPT; - WILC_Uint8 u8pmode = NO_ENCRYPT; + u8 u8gmode = NO_ENCRYPT; + u8 u8pmode = NO_ENCRYPT; AUTHTYPE_T tenuAuth_type = ANY; #endif @@ -1261,7 +1261,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k if (priv->wilc_gtk[key_index]->key) WILC_FREE(priv->wilc_gtk[key_index]->key); - priv->wilc_gtk[key_index]->key = (WILC_Uint8 *)WILC_MALLOC(params->key_len); + priv->wilc_gtk[key_index]->key = (u8 *)WILC_MALLOC(params->key_len); WILC_memcpy(priv->wilc_gtk[key_index]->key, params->key, params->key_len); /* if there has been previous allocation for the same index through its seq, free that memory and allocate again*/ @@ -1269,7 +1269,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k WILC_FREE(priv->wilc_gtk[key_index]->seq); if ((params->seq_len) > 0) { - priv->wilc_gtk[key_index]->seq = (WILC_Uint8 *)WILC_MALLOC(params->seq_len); + priv->wilc_gtk[key_index]->seq = (u8 *)WILC_MALLOC(params->seq_len); WILC_memcpy(priv->wilc_gtk[key_index]->seq, params->seq, params->seq_len); } @@ -1307,13 +1307,13 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k if (priv->wilc_ptk[key_index]->key) WILC_FREE(priv->wilc_ptk[key_index]->key); - priv->wilc_ptk[key_index]->key = (WILC_Uint8 *)WILC_MALLOC(params->key_len); + priv->wilc_ptk[key_index]->key = (u8 *)WILC_MALLOC(params->key_len); if (priv->wilc_ptk[key_index]->seq) WILC_FREE(priv->wilc_ptk[key_index]->seq); if ((params->seq_len) > 0) - priv->wilc_ptk[key_index]->seq = (WILC_Uint8 *)WILC_MALLOC(params->seq_len); + priv->wilc_ptk[key_index]->seq = (u8 *)WILC_MALLOC(params->seq_len); if (INFO) { for (i = 0; i < params->key_len; i++) @@ -1943,7 +1943,7 @@ static int WILC_WFI_set_pmksa(struct wiphy *wiphy, struct net_device *netdev, { WILC_Uint32 i; WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint8 flag = 0; + u8 flag = 0; struct WILC_WFI_priv *priv = wiphy_priv(wiphy); @@ -1993,7 +1993,7 @@ static int WILC_WFI_del_pmksa(struct wiphy *wiphy, struct net_device *netdev, { WILC_Uint32 i; - WILC_Uint8 flag = 0; + u8 flag = 0; WILC_Sint32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv = wiphy_priv(wiphy); @@ -2067,19 +2067,19 @@ static int WILC_WFI_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev) * @version */ -void WILC_WFI_CfgParseRxAction(WILC_Uint8 *buf, WILC_Uint32 len) +void WILC_WFI_CfgParseRxAction(u8 *buf, WILC_Uint32 len) { WILC_Uint32 index = 0; WILC_Uint32 i = 0, j = 0; /*BugID_5460*/ #ifdef USE_SUPPLICANT_GO_INTENT - WILC_Uint8 intent; - WILC_Uint8 tie_breaker; + u8 intent; + u8 tie_breaker; WILC_Bool is_wilc_go = WILC_TRUE; #endif - WILC_Uint8 op_channel_attr_index = 0; - WILC_Uint8 channel_list_attr_index = 0; + u8 op_channel_attr_index = 0; + u8 channel_list_attr_index = 0; while (index < len) { if (buf[index] == GO_INTENT_ATTR_ID) { @@ -2163,13 +2163,13 @@ void WILC_WFI_CfgParseRxAction(WILC_Uint8 *buf, WILC_Uint32 len) * @date 12 DEC 2012 * @version */ -void WILC_WFI_CfgParseTxAction(WILC_Uint8 *buf, WILC_Uint32 len, WILC_Bool bOperChan, WILC_Uint8 iftype) +void WILC_WFI_CfgParseTxAction(u8 *buf, WILC_Uint32 len, WILC_Bool bOperChan, u8 iftype) { WILC_Uint32 index = 0; WILC_Uint32 i = 0, j = 0; - WILC_Uint8 op_channel_attr_index = 0; - WILC_Uint8 channel_list_attr_index = 0; + u8 op_channel_attr_index = 0; + u8 channel_list_attr_index = 0; #ifdef USE_SUPPLICANT_GO_INTENT WILC_Bool is_wilc_go = WILC_FALSE; @@ -2521,13 +2521,13 @@ static int WILC_WFI_cancel_remain_on_channel(struct wiphy *wiphy, * @brief WILC_WFI_add_wilcvendorspec * @details Adding WILC information elemet to allow two WILC devices to * identify each other and connect - * @param[in] WILC_Uint8 * buf + * @param[in] u8 * buf * @return void * @author mdaftedar * @date 01 JAN 2014 * @version 1.0 */ -void WILC_WFI_add_wilcvendorspec(WILC_Uint8 *buff) +void WILC_WFI_add_wilcvendorspec(u8 *buff) { WILC_memcpy(buff, u8P2P_vendorspec, sizeof(u8P2P_vendorspec)); } @@ -2904,10 +2904,10 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev struct WILC_WFI_priv *priv; /* struct WILC_WFI_mon_priv* mon_priv; */ perInterface_wlan_t *nic; - WILC_Uint8 interface_type; + u8 interface_type; WILC_Uint16 TID = 0; #ifdef WILC_P2P - WILC_Uint8 i; + u8 i; #endif nic = netdev_priv(dev); @@ -3330,14 +3330,14 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev, s32Error = host_int_add_beacon(priv->hWILCWFIDrv, settings->beacon_interval, settings->dtim_period, - beacon->head_len, (WILC_Uint8 *)beacon->head, - beacon->tail_len, (WILC_Uint8 *)beacon->tail); + beacon->head_len, (u8 *)beacon->head, + beacon->tail_len, (u8 *)beacon->tail); #else s32Error = host_add_beacon(priv->hWILCWFIDrv, settings->beacon_interval, settings->dtim_period, - beacon->head_len, (WILC_Uint8 *)beacon->head, - beacon->tail_len, (WILC_Uint8 *)beacon->tail); + beacon->head_len, (u8 *)beacon->head, + beacon->tail_len, (u8 *)beacon->tail); #endif return s32Error; @@ -3369,14 +3369,14 @@ static int WILC_WFI_change_beacon(struct wiphy *wiphy, struct net_device *dev, s32Error = host_int_add_beacon(priv->hWILCWFIDrv, 0, 0, - beacon->head_len, (WILC_Uint8 *)beacon->head, - beacon->tail_len, (WILC_Uint8 *)beacon->tail); + beacon->head_len, (u8 *)beacon->head, + beacon->tail_len, (u8 *)beacon->tail); #else s32Error = host_add_beacon(priv->hWILCWFIDrv, 0, 0, - beacon->head_len, (WILC_Uint8 *)beacon->head, - beacon->tail_len, (WILC_Uint8 *)beacon->tail); + beacon->head_len, (u8 *)beacon->head, + beacon->tail_len, (u8 *)beacon->tail); #endif return s32Error; @@ -3395,7 +3395,7 @@ static int WILC_WFI_stop_ap(struct wiphy *wiphy, struct net_device *dev) { WILC_Sint32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; - WILC_Uint8 NullBssid[ETH_ALEN] = {0}; + u8 NullBssid[ETH_ALEN] = {0}; WILC_NULLCHECK(s32Error, wiphy); diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 0fc383b272aa..b322f0f956ea 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -109,7 +109,7 @@ struct wilc_wfi_wep_key { }; struct sta_info { - WILC_Uint8 au8Sta_AssociatedBss[MAX_NUM_STA][ETH_ALEN]; + u8 au8Sta_AssociatedBss[MAX_NUM_STA][ETH_ALEN]; }; #ifdef WILC_P2P @@ -139,10 +139,10 @@ struct WILC_WFI_priv { - WILC_Uint8 au8AssociatedBss[ETH_ALEN]; + u8 au8AssociatedBss[ETH_ALEN]; struct sta_info assoc_stainfo; struct net_device_stats stats; - WILC_Uint8 monitor_flag; + u8 monitor_flag; int status; struct WILC_WFI_packet *ppool; struct WILC_WFI_packet *rx_queue; /* List of incoming packets */ @@ -157,13 +157,13 @@ struct WILC_WFI_priv { WILC_WFIDrvHandle hWILCWFIDrv_2; tstrHostIFpmkidAttr pmkid_list; struct WILC_WFI_stats netstats; - WILC_Uint8 WILC_WFI_wep_default; - WILC_Uint8 WILC_WFI_wep_key[4][WLAN_KEY_LEN_WEP104]; - WILC_Uint8 WILC_WFI_wep_key_len[4]; + u8 WILC_WFI_wep_default; + u8 WILC_WFI_wep_key[4][WLAN_KEY_LEN_WEP104]; + u8 WILC_WFI_wep_key_len[4]; struct net_device *real_ndev; /* The real interface that the monitor is on */ struct wilc_wfi_key *wilc_gtk[MAX_NUM_STA]; struct wilc_wfi_key *wilc_ptk[MAX_NUM_STA]; - WILC_Uint8 wilc_groupkey; + u8 wilc_groupkey; /* semaphores */ struct semaphore SemHandleUpdateStats; struct semaphore hSemScanReq; @@ -250,7 +250,7 @@ typedef struct { typedef struct { uint8_t u8IfIdx; - WILC_Uint8 iftype; + u8 iftype; int monitor_flag; int mac_opened; #ifdef WILC_P2P diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 4055962fac81..e63788f17b5b 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -21,7 +21,7 @@ extern wilc_hif_func_t hif_sdio; extern wilc_hif_func_t hif_spi; extern wilc_cfg_func_t mac_cfg; #if defined(PLAT_RK3026_TCHIP) -extern WILC_Uint8 g_wilc_initialized; /* AMR : 0422 RK3026 Crash issue */ +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); -- cgit v1.2.3-59-g8ed1b From 0feae20091dd4a1c79e085ce1c0572affdbe6247 Mon Sep 17 00:00:00 2001 From: Chaitanya Dhere Date: Tue, 2 Jun 2015 09:58:50 +0000 Subject: staging: wilc1000: Modification in code to use ARRAY_SIZE macro In this patch, ARRAY_SIZE() macro is used to determine the size. This change was detected with the help of coccinelle tool. Signed-off-by: Chaitanya Dhere Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index b033eb879ca1..592b8aec40e9 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1737,7 +1737,7 @@ static int linux_wlan_read_mac_addr(void *vp) mm_segment_t old_fs; loff_t pos = 0; int index; - int array_size = sizeof(path_string) / sizeof(path_string[0]); + int array_size = ARRAY_SIZE(path_string); /* change to KERNEL_DS address limit */ old_fs = get_fs(); -- cgit v1.2.3-59-g8ed1b From 21175ef7e0db27989f37096ff5121255ac201c12 Mon Sep 17 00:00:00 2001 From: Madhusudhanan Ravindran Date: Tue, 9 Jun 2015 11:19:06 +0000 Subject: staging: wilc1000: remove unused variables removed few variables which are assigned but never used. Signed-off-by: Madhusudhanan Ravindran Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 592b8aec40e9..860f3361314f 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -259,7 +259,6 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event tstrWILC_WFIDrv *pstrWFIDrv; struct net_device *dev; u8 *pIP_Add_buff; - WILC_Sint32 s32status = WILC_FAIL; perInterface_wlan_t *nic; u8 null_ip[4] = {0}; char wlan_dev_name[5] = "wlan0"; @@ -317,7 +316,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event pIP_Add_buff = (char *) (&(dev_iface->ifa_address)); PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d \n", pIP_Add_buff[0], pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]); - s32status = host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx); + host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx); break; @@ -341,7 +340,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event pIP_Add_buff = null_ip; PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d \n", pIP_Add_buff[0], pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]); - s32status = host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx); + host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx); break; @@ -1102,7 +1101,6 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n #ifndef STATIC_MACADDRESS unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xff}; #endif - unsigned int chipid = 0; /*BugID_5077*/ struct WILC_WFI_priv *priv; @@ -1118,7 +1116,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n PRINT_D(INIT_DBG, "Host = %x\n", (WILC_Uint32)pstrWFIDrv); PRINT_D(INIT_DBG, "MAC address is : %02x-%02x-%02x-%02x-%02x-%02x\n", mac_add[0], mac_add[1], mac_add[2], mac_add[3], mac_add[4], mac_add[5]); - chipid = wilc_get_chipid(0); + wilc_get_chipid(0); if (g_linux_wlan->oup.wlan_cfg_set == NULL) { @@ -2066,7 +2064,6 @@ int mac_open(struct net_device *ndev) /*No need for setting mac address here anymore,*/ /*Just set it in init_test_config()*/ unsigned char mac_add[ETH_ALEN] = {0}; - int status; int ret = 0; int i = 0; struct WILC_WFI_priv *priv; @@ -2095,7 +2092,7 @@ int mac_open(struct net_device *ndev) Set_machw_change_vir_if(WILC_FALSE); - status = host_int_get_MacAddress(priv->hWILCWFIDrv, mac_add); + host_int_get_MacAddress(priv->hWILCWFIDrv, mac_add); PRINT_D(INIT_DBG, "Mac address: %x:%x:%x:%x:%x:%x\n", mac_add[0], mac_add[1], mac_add[2], mac_add[3], mac_add[4], mac_add[5]); -- cgit v1.2.3-59-g8ed1b From 8a14330f6ded9b22a9d8231ac988963a402ea067 Mon Sep 17 00:00:00 2001 From: Johnny Kim Date: Wed, 10 Jun 2015 17:06:46 +0900 Subject: staging: wilc1000: modify printk format This remove compile warnings about printk format. Signed-off-by: Johnny Kim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/host_interface.c | 8 ++++---- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index afe5126f3655..1ecb37341780 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -703,7 +703,7 @@ static WILC_Sint32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperat strWID.s32ValueSize = sizeof(WILC_Uint32); /*Sending Cfg*/ - PRINT_INFO(HOSTINF_DBG, "(WILC_Uint32)pstrWFIDrv= %x \n", (WILC_Uint32)pstrWFIDrv); + PRINT_INFO(HOSTINF_DBG, "(size_t)pstrWFIDrv= %p \n", pstrWFIDrv); s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); @@ -6631,7 +6631,7 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) g_obtainingIP = WILC_FALSE; #endif - PRINT_D(HOSTINF_DBG, "Global handle pointer value=%x\n", (WILC_Uint32)pstrWFIDrv); + PRINT_D(HOSTINF_DBG, "Global handle pointer value=%p\n", pstrWFIDrv); /* /////////////////////////////////////// */ if (clients_count == 0) { sema_init(&hSemHostIFthrdEnd, 0); @@ -6928,7 +6928,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) if (pstrWFIDrv == NULL || pstrWFIDrv == terminated_handle) { - PRINT_ER("NetworkInfo received but driver not init[%x]\n", (WILC_Uint32)pstrWFIDrv); + PRINT_ER("NetworkInfo received but driver not init[%p]\n", pstrWFIDrv); return; } @@ -7037,7 +7037,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - PRINT_D(GENERIC_DBG, "Scan notification received %x\n", (WILC_Uint32)pstrWFIDrv); + PRINT_D(GENERIC_DBG, "Scan notification received %p\n", pstrWFIDrv); if (pstrWFIDrv == NULL || pstrWFIDrv == terminated_handle) { return; diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 860f3361314f..3956c701c689 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1113,7 +1113,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n #endif priv = wiphy_priv(dev->ieee80211_ptr->wiphy); pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv; - PRINT_D(INIT_DBG, "Host = %x\n", (WILC_Uint32)pstrWFIDrv); + PRINT_D(INIT_DBG, "Host = %p\n", pstrWFIDrv); PRINT_D(INIT_DBG, "MAC address is : %02x-%02x-%02x-%02x-%02x-%02x\n", mac_add[0], mac_add[1], mac_add[2], mac_add[3], mac_add[4], mac_add[5]); wilc_get_chipid(0); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 0441d7b23485..61f1f2010645 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -844,7 +844,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, host_int_set_wfi_drv_handler((WILC_Uint32)priv->hWILCWFIDrv); - PRINT_D(CFG80211_DBG, "Connecting to SSID [%s] on netdev [%p] host if [%x]\n", sme->ssid, dev, (WILC_Uint32)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 if (!(WILC_strncmp(sme->ssid, "DIRECT-", 7))) { PRINT_D(CFG80211_DBG, "Connected to Direct network,OBSS disabled\n"); @@ -1147,7 +1147,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k PRINT_D(CFG80211_DBG, "Adding key with cipher suite = %x\n", params->cipher); /*BugID_5137*/ - PRINT_D(CFG80211_DBG, "%x %x %d\n", (WILC_Uint32)wiphy, (WILC_Uint32)netdev, key_index); + PRINT_D(CFG80211_DBG, "%p %p %d\n", wiphy, netdev, key_index); PRINT_D(CFG80211_DBG, "key %x %x %x\n", params->key[0], params->key[1], @@ -3062,7 +3062,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev dev->ieee80211_ptr->iftype = type; priv->wdev->iftype = type; nic->iftype = AP_MODE; - PRINT_D(CORECONFIG_DBG, "(WILC_Uint32)priv->hWILCWFIDrv[%x]\n", (WILC_Uint32)priv->hWILCWFIDrv); + PRINT_D(CORECONFIG_DBG, "priv->hWILCWFIDrv[%p]\n", priv->hWILCWFIDrv); #ifndef SIMULATION PRINT_D(HOSTAPD_DBG, "Downloading AP firmware\n"); @@ -3108,7 +3108,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev dev->ieee80211_ptr->iftype = type; priv->wdev->iftype = type; - PRINT_D(CORECONFIG_DBG, "(WILC_Uint32)priv->hWILCWFIDrv[%x]\n", (WILC_Uint32)priv->hWILCWFIDrv); + PRINT_D(CORECONFIG_DBG, "priv->hWILCWFIDrv[%p]\n", priv->hWILCWFIDrv); #ifndef SIMULATION #ifdef WILC_P2P -- cgit v1.2.3-59-g8ed1b From 842f1d71f6a00aa3d0a6fa277585cd7713122e3f Mon Sep 17 00:00:00 2001 From: Johnny Kim Date: Wed, 10 Jun 2015 17:06:47 +0900 Subject: staging: wilc1000: remove uninitialized warnings This patch is for the initialization of the local variables. Signed-off-by: Johnny Kim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 3956c701c689..e92ba59382ef 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2778,7 +2778,7 @@ late_initcall(init_wilc_driver); static void __exit exit_wilc_driver(void) { int i = 0; - perInterface_wlan_t *nic[NUM_CONCURRENT_IFC]; + perInterface_wlan_t *nic[NUM_CONCURRENT_IFC] = {NULL,}; #define CLOSE_TIMEOUT (12 * 1000) if ((g_linux_wlan != NULL) && (((g_linux_wlan->strInterfaceInfo[0].wilc_netdev) != NULL) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 61f1f2010645..5844eba90b91 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -829,9 +829,9 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, WILC_Uint32 i; u8 u8security = NO_ENCRYPT; AUTHTYPE_T tenuAuth_type = ANY; - WILC_Char *pcgroup_encrypt_val; - WILC_Char *pccipher_group; - WILC_Char *pcwpa_version; + WILC_Char *pcgroup_encrypt_val = NULL; + WILC_Char *pccipher_group = NULL; + WILC_Char *pcwpa_version = NULL; struct WILC_WFI_priv *priv; tstrWILC_WFIDrv *pstrWFIDrv; -- cgit v1.2.3-59-g8ed1b From d85f5326e4a4b1606a0dbb3f8a320a0359fdb2d8 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Thu, 11 Jun 2015 14:35:54 +0900 Subject: staging: wilc1000: remove WILC_Uint16 Use u16 instead of WILC_Uint16. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigurator.c | 98 +++---- drivers/staging/wilc1000/coreconfigurator.h | 26 +- drivers/staging/wilc1000/host_interface.c | 302 +++++++++++----------- drivers/staging/wilc1000/host_interface.h | 56 ++-- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_oswrapper.h | 1 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 8 +- 10 files changed, 252 insertions(+), 253 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index d3a006937619..cc4455f47309 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -176,7 +176,7 @@ static u8 g_seqno; static WILC_Sint16 g_wid_num = -1; -static WILC_Uint16 Res_Len; +static u16 Res_Len; static u8 g_oper_mode = SET_CFG; @@ -309,7 +309,7 @@ static tstrWID gastrWIDs[] = { #endif /* MAC_802_11N */ }; -WILC_Uint16 g_num_total_switches = (sizeof(gastrWIDs) / sizeof(tstrWID)); +u16 g_num_total_switches = (sizeof(gastrWIDs) / sizeof(tstrWID)); /*****************************************************************************/ /* Static Function Declarations */ /*****************************************************************************/ @@ -340,7 +340,7 @@ INLINE u8 get_hex_char(u8 inp) /* This function extracts the MAC address held in a string in standard format */ /* into another buffer as integers. */ -INLINE WILC_Uint16 extract_mac_addr(WILC_Char *str, u8 *buff) +INLINE u16 extract_mac_addr(WILC_Char *str, u8 *buff) { *buff = 0; while (*str != '\0') { @@ -476,9 +476,9 @@ INLINE tenuWIDtype get_wid_type(WILC_Uint32 wid_num) /* This function extracts the beacon period field from the beacon or probe */ /* response frame. */ -INLINE WILC_Uint16 get_beacon_period(u8 *data) +INLINE u16 get_beacon_period(u8 *data) { - WILC_Uint16 bcn_per = 0; + u16 bcn_per = 0; bcn_per = data[0]; bcn_per |= (data[1] << 8); @@ -605,10 +605,10 @@ INLINE void get_ssid(u8 *data, u8 *ssid, u8 *p_ssid_len) /* This function extracts the capability info field from the beacon or probe */ /* response frame. */ -INLINE WILC_Uint16 get_cap_info(u8 *data) +INLINE u16 get_cap_info(u8 *data) { - WILC_Uint16 cap_info = 0; - WILC_Uint16 index = MAC_HDR_LEN; + u16 cap_info = 0; + u16 index = MAC_HDR_LEN; tenuFrmSubtype st = BEACON; st = get_sub_type(data); @@ -626,9 +626,9 @@ INLINE WILC_Uint16 get_cap_info(u8 *data) /* This function extracts the capability info field from the Association */ /* response frame. */ -INLINE WILC_Uint16 get_assoc_resp_cap_info(u8 *data) +INLINE u16 get_assoc_resp_cap_info(u8 *data) { - WILC_Uint16 cap_info = 0; + u16 cap_info = 0; cap_info = data[0]; cap_info |= (data[1] << 8); @@ -638,9 +638,9 @@ INLINE WILC_Uint16 get_assoc_resp_cap_info(u8 *data) /* This funcion extracts the association status code from the incoming */ /* association response frame and returns association status code */ -INLINE WILC_Uint16 get_asoc_status(u8 *data) +INLINE u16 get_asoc_status(u8 *data) { - WILC_Uint16 asoc_status = 0; + u16 asoc_status = 0; asoc_status = data[3]; asoc_status = (asoc_status << 8) | data[2]; @@ -650,9 +650,9 @@ INLINE WILC_Uint16 get_asoc_status(u8 *data) /* This function extracts association ID from the incoming association */ /* response frame */ -INLINE WILC_Uint16 get_asoc_id(u8 *data) +INLINE u16 get_asoc_id(u8 *data) { - WILC_Uint16 asoc_id = 0; + u16 asoc_id = 0; asoc_id = data[4]; asoc_id |= (data[5] << 8); @@ -692,9 +692,9 @@ _fail_: return s32Error; } -u8 *get_tim_elm(u8 *pu8msa, WILC_Uint16 u16RxLen, WILC_Uint16 u16TagParamOffset) +u8 *get_tim_elm(u8 *pu8msa, u16 u16RxLen, u16 u16TagParamOffset) { - WILC_Uint16 u16index = 0; + u16 u16index = 0; /*************************************************************************/ /* Beacon Frame - Frame Body */ @@ -722,9 +722,9 @@ u8 *get_tim_elm(u8 *pu8msa, WILC_Uint16 u16RxLen, WILC_Uint16 u16TagParamOffset) /* This function gets the current channel information from * the 802.11n beacon/probe response frame */ -u8 get_current_channel_802_11n(u8 *pu8msa, WILC_Uint16 u16RxLen) +u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen) { - WILC_Uint16 index; + u16 index; index = TAG_PARAM_OFFSET; while (index < (u16RxLen - FCS_LEN)) { @@ -741,7 +741,7 @@ u8 get_current_channel_802_11n(u8 *pu8msa, WILC_Uint16 u16RxLen) return 0; /* no MIB here */ } -u8 get_current_channel(u8 *pu8msa, WILC_Uint16 u16RxLen) +u8 get_current_channel(u8 *pu8msa, u16 u16RxLen) { #ifdef PHY_802_11n #ifdef FIVE_GHZ_BAND @@ -775,10 +775,10 @@ WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInf tstrNetworkInfo *pstrNetworkInfo = NULL; u8 u8MsgType = 0; u8 u8MsgID = 0; - WILC_Uint16 u16MsgLen = 0; + u16 u16MsgLen = 0; - WILC_Uint16 u16WidID = (WILC_Uint16)WID_NIL; - WILC_Uint16 u16WidLen = 0; + u16 u16WidID = (u16)WID_NIL; + u16 u16WidLen = 0; u8 *pu8WidVal = 0; u8MsgType = pu8MsgBuffer[0]; @@ -807,10 +807,10 @@ WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInf /* parse the WID value of the WID "WID_NEWORK_INFO" */ { u8 *pu8msa = 0; - WILC_Uint16 u16RxLen = 0; + u16 u16RxLen = 0; u8 *pu8TimElm = 0; u8 *pu8IEs = 0; - WILC_Uint16 u16IEsLen = 0; + u16 u16IEsLen = 0; u8 u8index = 0; WILC_Uint32 u32Tsf_Lo; WILC_Uint32 u32Tsf_Hi; @@ -929,15 +929,15 @@ WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, WILC_Uint32 u32BufferLen, { WILC_Sint32 s32Error = WILC_SUCCESS; tstrConnectRespInfo *pstrConnectRespInfo = NULL; - WILC_Uint16 u16AssocRespLen = 0; + u16 u16AssocRespLen = 0; u8 *pu8IEs = 0; - WILC_Uint16 u16IEsLen = 0; + u16 u16IEsLen = 0; pstrConnectRespInfo = (tstrConnectRespInfo *)WILC_MALLOC(sizeof(tstrConnectRespInfo)); WILC_memset((void *)(pstrConnectRespInfo), 0, sizeof(tstrConnectRespInfo)); /* u16AssocRespLen = pu8Buffer[0]; */ - u16AssocRespLen = (WILC_Uint16)u32BufferLen; + u16AssocRespLen = (u16)u32BufferLen; /* get the status code */ pstrConnectRespInfo->u16ConnectStatus = get_asoc_status(pu8Buffer); @@ -1153,8 +1153,8 @@ void ProcessCharWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, tstrWID *pstrWID, WILC_Sint8 *ps8WidVal) { - WILC_Uint16 *pu16val = (WILC_Uint16 *)ps8WidVal; - WILC_Uint16 u16val = 0; + u16 *pu16val = (u16 *)ps8WidVal; + u16 u16val = 0; WILC_Sint32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set SHORT val 0x%x ,NULL structure\n", u16val); @@ -1169,7 +1169,7 @@ void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, u16val = *pu16val; /* Length */ - pcPacket[s32PktLen++] = sizeof(WILC_Uint16); + pcPacket[s32PktLen++] = sizeof(u16); /* Value */ pcPacket[s32PktLen++] = (u8)(u16val & 0xFF); @@ -1324,8 +1324,8 @@ void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, tstrWID *pstrWID, u8 *pu8val, WILC_Sint32 s32ValueSize) { - WILC_Uint16 u16MsgLen = 0; - WILC_Uint16 idx = 0; + u16 u16MsgLen = 0; + u16 idx = 0; WILC_Sint32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set STR val, NULL structure\n"); @@ -1339,7 +1339,7 @@ void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, if (g_oper_mode == SET_CFG) { /* Message Length */ /* u16MsgLen = WILC_strlen(pu8val); */ - u16MsgLen = (WILC_Uint16)s32ValueSize; + u16MsgLen = (u16)s32ValueSize; /* Length */ pcPacket[s32PktLen++] = (u8)u16MsgLen; @@ -1381,7 +1381,7 @@ void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, void ProcessAdrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, tstrWID *pstrWID, u8 *pu8val) { - WILC_Uint16 u16MsgLen = 0; + u16 u16MsgLen = 0; WILC_Sint32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { @@ -1447,8 +1447,8 @@ void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, { /* WILC_ERROR("processing Binary WIDs is not supported\n"); */ - WILC_Uint16 u16MsgLen = 0; - WILC_Uint16 idx = 0; + u16 u16MsgLen = 0; + u16 idx = 0; WILC_Sint32 s32PktLen = *ps32PktLen; u8 u8checksum = 0; @@ -1463,7 +1463,7 @@ void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, if (g_oper_mode == SET_CFG) { /* Message Length */ - u16MsgLen = (WILC_Uint16)s32ValueSize; + u16MsgLen = (u16)s32ValueSize; /* Length */ /* pcPacket[s32PktLen++] = (u8)u16MsgLen; */ @@ -1518,8 +1518,8 @@ void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /*****************************************************************************/ WILC_Sint32 further_process_response(u8 *resp, - WILC_Uint16 u16WIDid, - WILC_Uint16 cfg_len, + u16 u16WIDid, + u16 cfg_len, WILC_Bool process_wid_num, WILC_Uint32 cnt, tstrWID *pstrWIDresult) @@ -1527,7 +1527,7 @@ WILC_Sint32 further_process_response(u8 *resp, WILC_Uint32 retval = 0; WILC_Uint32 idx = 0; u8 cfg_chr = 0; - WILC_Uint16 cfg_sht = 0; + u16 cfg_sht = 0; WILC_Uint32 cfg_int = 0; u8 cfg_str[256] = {0}; tenuWIDtype enuWIDtype = WID_UNDEF; @@ -1548,7 +1548,7 @@ WILC_Sint32 further_process_response(u8 *resp, case WID_SHORT: { - WILC_Uint16 *pu16val = (WILC_Uint16 *)(pstrWIDresult->ps8WidVal); + u16 *pu16val = (u16 *)(pstrWIDresult->ps8WidVal); cfg_sht = MAKE_WORD16(resp[idx], resp[idx + 1]); /*Set local copy of WID*/ /* pstrWIDresult->ps8WidVal = (WILC_Sint8*)(WILC_Sint32)cfg_sht; */ @@ -1689,9 +1689,9 @@ WILC_Sint32 further_process_response(u8 *resp, WILC_Sint32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) { - WILC_Uint16 u16RespLen = 0; - WILC_Uint16 u16WIDid = 0; - WILC_Uint16 cfg_len = 0; + u16 u16RespLen = 0; + u16 u16WIDid = 0; + u16 cfg_len = 0; tenuWIDtype enuWIDtype = WID_UNDEF; WILC_Bool num_wid_processed = WILC_FALSE; WILC_Uint32 cnt = 0; @@ -1713,7 +1713,7 @@ WILC_Sint32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) /* Incase of Bin Type Wid, the length is given by two byte field */ enuWIDtype = get_wid_type(u16WIDid); if (WID_BIN_DATA == enuWIDtype) { - cfg_len |= ((WILC_Uint16)resp[idx + 3] << 8) & 0xFF00; + cfg_len |= ((u16)resp[idx + 3] << 8) & 0xFF00; idx++; } idx += 3; @@ -1763,8 +1763,8 @@ WILC_Sint32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) WILC_Sint32 ParseWriteResponse(u8 *pu8RespBuffer) { WILC_Sint32 s32Error = WILC_FAIL; - WILC_Uint16 u16RespLen = 0; - WILC_Uint16 u16WIDtype = (WILC_Uint16)WID_NIL; + u16 u16RespLen = 0; + u16 u16WIDtype = (u16)WID_NIL; /* Check whether the received frame is a valid response */ if (RESP_MSG_TYPE != pu8RespBuffer[0]) { @@ -1806,8 +1806,8 @@ WILC_Sint32 ParseWriteResponse(u8 *pu8RespBuffer) WILC_Sint32 CreatePacketHeader(WILC_Char *pcpacket, WILC_Sint32 *ps32PacketLength) { WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint16 u16MsgLen = (WILC_Uint16)(*ps32PacketLength); - WILC_Uint16 u16MsgInd = 0; + u16 u16MsgLen = (u16)(*ps32PacketLength); + u16 u16MsgInd = 0; /* The format of the message is: */ /* +-------------------------------------------------------------------+ */ diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index b8e52414ebcc..640dc50860f9 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -31,7 +31,7 @@ #define NUM_11N_HUT_SWITCHES 0 #endif /* MAC_802_11N */ -extern WILC_Uint16 g_num_total_switches; +extern u16 g_num_total_switches; #define MAC_HDR_LEN 24 /* No Address4 - non-ESS */ #define MAX_SSID_LEN 33 @@ -65,7 +65,7 @@ extern WILC_Uint16 g_num_total_switches; /*****************************************************************************/ /* Function Macros */ /*****************************************************************************/ -#define MAKE_WORD16(lsb, msb) ((((WILC_Uint16)(msb) << 8) & 0xFF00) | (lsb)) +#define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb)) #define MAKE_WORD32(lsw, msw) ((((WILC_Uint32)(msw) << 16) & 0xFFFF0000) | (lsw)) @@ -394,7 +394,7 @@ typedef enum { } tenuConnectSts; typedef struct { - WILC_Uint16 u16WIDid; + u16 u16WIDid; tenuWIDtype enuWIDtype; WILC_Sint32 s32ValueSize; WILC_Sint8 *ps8WidVal; @@ -409,11 +409,11 @@ typedef struct { /* This structure is used to support parsing of the received 'N' message */ typedef struct { WILC_Sint8 s8rssi; - WILC_Uint16 u16CapInfo; + u16 u16CapInfo; u8 au8ssid[MAX_SSID_LEN]; u8 u8SsidLen; u8 au8bssid[6]; - WILC_Uint16 u16BeaconPeriod; + u16 u16BeaconPeriod; u8 u8DtimPeriod; u8 u8channel; unsigned long u32TimeRcvdInScanCached; /* of type unsigned long to be accepted by the linux kernel macro time_after() */ @@ -426,7 +426,7 @@ typedef struct { WILC_Uint32 u32Tsf; /* time-stamp [Low only 32 bit] */ #endif u8 *pu8IEs; - WILC_Uint16 u16IEsLen; + u16 u16IEsLen; void *pJoinParams; tstrRSSI strRssi; WILC_Uint64 u64Tsf; /* time-stamp [Low and High 64 bit] */ @@ -434,11 +434,11 @@ typedef struct { /* This structure is used to support parsing of the received Association Response frame */ typedef struct { - WILC_Uint16 u16capability; - WILC_Uint16 u16ConnectStatus; - WILC_Uint16 u16AssocID; + u16 u16capability; + u16 u16ConnectStatus; + u16 u16AssocID; u8 *pu8RespIEs; - WILC_Uint16 u16RespIEsLen; + u16 u16RespIEsLen; } tstrConnectRespInfo; @@ -447,14 +447,14 @@ typedef struct { u8 *pu8ReqIEs; size_t ReqIEsLen; u8 *pu8RespIEs; - WILC_Uint16 u16RespIEsLen; - WILC_Uint16 u16ConnectStatus; + u16 u16RespIEsLen; + u16 u16ConnectStatus; } tstrConnectInfo; typedef struct { - WILC_Uint16 u16reason; + u16 u16reason; u8 *ie; size_t ie_len; } tstrDisconnectNotifInfo; diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index b2bbb45143d1..4b6265c21c6f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -19,46 +19,46 @@ extern u8 g_wilc_initialized; /*****************************************************************************/ /* Message types of the Host IF Message Queue*/ -#define HOST_IF_MSG_SCAN ((WILC_Uint16)0) -#define HOST_IF_MSG_CONNECT ((WILC_Uint16)1) -#define HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO ((WILC_Uint16)2) -#define HOST_IF_MSG_KEY ((WILC_Uint16)3) -#define HOST_IF_MSG_RCVD_NTWRK_INFO ((WILC_Uint16)4) -#define HOST_IF_MSG_RCVD_SCAN_COMPLETE ((WILC_Uint16)5) -#define HOST_IF_MSG_CFG_PARAMS ((WILC_Uint16)6) -#define HOST_IF_MSG_SET_CHANNEL ((WILC_Uint16)7) -#define HOST_IF_MSG_DISCONNECT ((WILC_Uint16)8) -#define HOST_IF_MSG_GET_RSSI ((WILC_Uint16)9) -#define HOST_IF_MSG_GET_CHNL ((WILC_Uint16)10) -#define HOST_IF_MSG_ADD_BEACON ((WILC_Uint16)11) -#define HOST_IF_MSG_DEL_BEACON ((WILC_Uint16)12) -#define HOST_IF_MSG_ADD_STATION ((WILC_Uint16)13) -#define HOST_IF_MSG_DEL_STATION ((WILC_Uint16)14) -#define HOST_IF_MSG_EDIT_STATION ((WILC_Uint16)15) -#define HOST_IF_MSG_SCAN_TIMER_FIRED ((WILC_Uint16)16) -#define HOST_IF_MSG_CONNECT_TIMER_FIRED ((WILC_Uint16)17) -#define HOST_IF_MSG_POWER_MGMT ((WILC_Uint16)18) -#define HOST_IF_MSG_GET_INACTIVETIME ((WILC_Uint16)19) -#define HOST_IF_MSG_REMAIN_ON_CHAN ((WILC_Uint16)20) -#define HOST_IF_MSG_REGISTER_FRAME ((WILC_Uint16)21) -#define HOST_IF_MSG_LISTEN_TIMER_FIRED ((WILC_Uint16)22) -#define HOST_IF_MSG_GET_LINKSPEED ((WILC_Uint16)23) -#define HOST_IF_MSG_SET_WFIDRV_HANDLER ((WILC_Uint16)24) -#define HOST_IF_MSG_SET_MAC_ADDRESS ((WILC_Uint16)25) -#define HOST_IF_MSG_GET_MAC_ADDRESS ((WILC_Uint16)26) -#define HOST_IF_MSG_SET_OPERATION_MODE ((WILC_Uint16)27) -#define HOST_IF_MSG_SET_IPADDRESS ((WILC_Uint16)28) -#define HOST_IF_MSG_GET_IPADDRESS ((WILC_Uint16)29) -#define HOST_IF_MSG_FLUSH_CONNECT ((WILC_Uint16)30) -#define HOST_IF_MSG_GET_STATISTICS ((WILC_Uint16)31) -#define HOST_IF_MSG_SET_MULTICAST_FILTER ((WILC_Uint16)32) -#define HOST_IF_MSG_ADD_BA_SESSION ((WILC_Uint16)33) -#define HOST_IF_MSG_DEL_BA_SESSION ((WILC_Uint16)34) -#define HOST_IF_MSG_Q_IDLE ((WILC_Uint16)35) -#define HOST_IF_MSG_DEL_ALL_STA ((WILC_Uint16)36) -#define HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS ((WILC_Uint16)34) - -#define HOST_IF_MSG_EXIT ((WILC_Uint16)100) +#define HOST_IF_MSG_SCAN ((u16)0) +#define HOST_IF_MSG_CONNECT ((u16)1) +#define HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO ((u16)2) +#define HOST_IF_MSG_KEY ((u16)3) +#define HOST_IF_MSG_RCVD_NTWRK_INFO ((u16)4) +#define HOST_IF_MSG_RCVD_SCAN_COMPLETE ((u16)5) +#define HOST_IF_MSG_CFG_PARAMS ((u16)6) +#define HOST_IF_MSG_SET_CHANNEL ((u16)7) +#define HOST_IF_MSG_DISCONNECT ((u16)8) +#define HOST_IF_MSG_GET_RSSI ((u16)9) +#define HOST_IF_MSG_GET_CHNL ((u16)10) +#define HOST_IF_MSG_ADD_BEACON ((u16)11) +#define HOST_IF_MSG_DEL_BEACON ((u16)12) +#define HOST_IF_MSG_ADD_STATION ((u16)13) +#define HOST_IF_MSG_DEL_STATION ((u16)14) +#define HOST_IF_MSG_EDIT_STATION ((u16)15) +#define HOST_IF_MSG_SCAN_TIMER_FIRED ((u16)16) +#define HOST_IF_MSG_CONNECT_TIMER_FIRED ((u16)17) +#define HOST_IF_MSG_POWER_MGMT ((u16)18) +#define HOST_IF_MSG_GET_INACTIVETIME ((u16)19) +#define HOST_IF_MSG_REMAIN_ON_CHAN ((u16)20) +#define HOST_IF_MSG_REGISTER_FRAME ((u16)21) +#define HOST_IF_MSG_LISTEN_TIMER_FIRED ((u16)22) +#define HOST_IF_MSG_GET_LINKSPEED ((u16)23) +#define HOST_IF_MSG_SET_WFIDRV_HANDLER ((u16)24) +#define HOST_IF_MSG_SET_MAC_ADDRESS ((u16)25) +#define HOST_IF_MSG_GET_MAC_ADDRESS ((u16)26) +#define HOST_IF_MSG_SET_OPERATION_MODE ((u16)27) +#define HOST_IF_MSG_SET_IPADDRESS ((u16)28) +#define HOST_IF_MSG_GET_IPADDRESS ((u16)29) +#define HOST_IF_MSG_FLUSH_CONNECT ((u16)30) +#define HOST_IF_MSG_GET_STATISTICS ((u16)31) +#define HOST_IF_MSG_SET_MULTICAST_FILTER ((u16)32) +#define HOST_IF_MSG_ADD_BA_SESSION ((u16)33) +#define HOST_IF_MSG_DEL_BA_SESSION ((u16)34) +#define HOST_IF_MSG_Q_IDLE ((u16)35) +#define HOST_IF_MSG_DEL_ALL_STA ((u16)36) +#define HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS ((u16)34) + +#define HOST_IF_MSG_EXIT ((u16)100) #define HOST_IF_SCAN_TIMEOUT 4000 #define HOST_IF_CONNECT_TIMEOUT 9500 @@ -468,7 +468,7 @@ typedef union _tuniHostIFmsgBody { * @version 1.0 */ typedef struct _tstrHostIFmsg { - WILC_Uint16 u16MsgId; /*!< Message ID */ + u16 u16MsgId; /*!< Message ID */ tuniHostIFmsgBody uniHostIFmsgBody; /*!< Message body */ void *drvHandler; } tstrHostIFmsg; @@ -487,8 +487,8 @@ typedef struct _tstrWidJoinReqExt { typedef struct _tstrJoinBssParam { BSSTYPE_T bss_type; u8 dtim_period; - WILC_Uint16 beacon_period; - WILC_Uint16 cap_info; + u16 beacon_period; + u16 cap_info; u8 au8bssid[6]; WILC_Char ssid[MAX_SSID_LEN]; u8 ssidLen; @@ -615,7 +615,7 @@ static WILC_Sint32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHo tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_CURRENT_CHANNEL; + strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Char *)&(pstrHostIFSetChan->u8SetChan); strWID.s32ValueSize = sizeof(WILC_Char); @@ -652,7 +652,7 @@ static WILC_Sint32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSe /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_SET_DRV_HANDLER; + strWID.u16WIDid = (u16)WID_SET_DRV_HANDLER; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Sint8 *)&(pstrHostIfSetDrvHandler->u32Address); strWID.s32ValueSize = sizeof(WILC_Uint32); @@ -697,7 +697,7 @@ static WILC_Sint32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperat /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_SET_OPERATION_MODE; + strWID.u16WIDid = (u16)WID_SET_OPERATION_MODE; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Sint8 *)&(pstrHostIfSetOperationMode->u32Mode); strWID.s32ValueSize = sizeof(WILC_Uint32); @@ -750,7 +750,7 @@ WILC_Sint32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) WILC_memcpy(gs8SetIP[idx], pu8IPAddr, IP_ALEN); /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_IP_ADDRESS; + strWID.u16WIDid = (u16)WID_IP_ADDRESS; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (u8 *)pu8IPAddr; strWID.s32ValueSize = IP_ALEN; @@ -794,7 +794,7 @@ WILC_Sint32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_IP_ADDRESS; + strWID.u16WIDid = (u16)WID_IP_ADDRESS; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN); strWID.s32ValueSize = IP_ALEN; @@ -853,7 +853,7 @@ static WILC_Sint32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddres WILC_memcpy(mac_buf, pstrHostIfSetMacAddress->u8MacAddress, ETH_ALEN); /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_MAC_ADDR; + strWID.u16WIDid = (u16)WID_MAC_ADDR; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = mac_buf; strWID.s32ValueSize = ETH_ALEN; @@ -891,7 +891,7 @@ static WILC_Sint32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddres tstrWID strWID; /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_MAC_ADDR; + strWID.u16WIDid = (u16)WID_MAC_ADDR; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = pstrHostIfGetMacAddress->u8MacAddress; strWID.s32ValueSize = ETH_ALEN; @@ -976,7 +976,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_AUTH_TIMEOUT; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.auth_timeout; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.auth_timeout = strHostIFCfgParamAttr->pstrCfgParamVal.auth_timeout; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1008,7 +1008,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_SHORT_RETRY_LIMIT; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.short_retry_limit; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.short_retry_limit = strHostIFCfgParamAttr->pstrCfgParamVal.short_retry_limit; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1022,7 +1022,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.long_retry_limit; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.long_retry_limit = strHostIFCfgParamAttr->pstrCfgParamVal.long_retry_limit; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1035,7 +1035,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_FRAG_THRESHOLD; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.frag_threshold; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.frag_threshold = strHostIFCfgParamAttr->pstrCfgParamVal.frag_threshold; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1048,7 +1048,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_RTS_THRESHOLD; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.rts_threshold; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.rts_threshold = strHostIFCfgParamAttr->pstrCfgParamVal.rts_threshold; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1106,7 +1106,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_BEACON_INTERVAL; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.beacon_interval; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.beacon_interval = strHostIFCfgParamAttr->pstrCfgParamVal.beacon_interval; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1149,7 +1149,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_SITE_SURVEY_SCAN_TIME; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_scan_time; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.site_survey_scan_time = strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_scan_time; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1162,7 +1162,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_ACTIVE_SCAN_TIME; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.active_scan_time; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.active_scan_time = strHostIFCfgParamAttr->pstrCfgParamVal.active_scan_time; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1175,7 +1175,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_PASSIVE_SCAN_TIME; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.passive_scan_time; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.passive_scan_time = strHostIFCfgParamAttr->pstrCfgParamVal.passive_scan_time; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1198,7 +1198,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str strWIDList[u8WidCnt].u16WIDid = WID_CURRENT_TX_RATE; strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&curr_tx_rate; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; - strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Uint16); + strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.curr_tx_rate = (u8)curr_tx_rate; } else { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); @@ -1291,7 +1291,7 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs pstrWFIDrv->strWILC_UsrScanReq.u32RcvdChCount = 0; /*BugID_4189*/ - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_SSID_PROBE_REQ; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_SSID_PROBE_REQ; strWIDList[u32WidsCount].enuWIDtype = WID_STR; for (i = 0; i < pstrHostIFscanAttr->strHiddenNetwork.u8ssidnum; i++) { @@ -1444,7 +1444,7 @@ static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) if (enuEvent == SCAN_EVENT_ABORTED) { PRINT_D(GENERIC_DBG, "Abort running scan\n"); u8abort_running_scan = 1; - strWID.u16WIDid = (WILC_Uint16)WID_ABORT_RUNNING_SCAN; + strWID.u16WIDid = (u16)WID_ABORT_RUNNING_SCAN; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Sint8 *)&u8abort_running_scan; strWID.s32ValueSize = sizeof(WILC_Char); @@ -1611,7 +1611,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH strWIDList[u32WidsCount].s32ValueSize = pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen; u32WidsCount++; } - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_11I_MODE; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_MODE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrWFIDrv->strWILC_UsrConnReq.u8security)); @@ -1619,7 +1619,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH PRINT_INFO(HOSTINF_DBG, "Encrypt Mode = %x\n", pstrWFIDrv->strWILC_UsrConnReq.u8security); - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_AUTH_TYPE; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_AUTH_TYPE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); @@ -1627,14 +1627,14 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH PRINT_INFO(HOSTINF_DBG, "Authentication Type = %x\n", pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); /* - * strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_11I_PSK; + * strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_PSK; * strWIDList[u32WidsCount].enuWIDtype = WID_STR; * strWIDList[u32WidsCount].s32ValueSize = sizeof(passphrase); * strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8*)(passphrase); * u32WidsCount++; */ - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_JOIN_REQ; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)&u8bssDscListIndex; @@ -1757,7 +1757,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH gu32FlushedInfoElemAsocSize); } } - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_11I_MODE; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_MODE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrWFIDrv->strWILC_UsrConnReq.u8security)); @@ -1770,7 +1770,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH PRINT_INFO(HOSTINF_DBG, "Encrypt Mode = %x\n", pstrWFIDrv->strWILC_UsrConnReq.u8security); - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_AUTH_TYPE; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_AUTH_TYPE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); @@ -1782,7 +1782,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH PRINT_INFO(HOSTINF_DBG, "Authentication Type = %x\n", pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); /* - * strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_11I_PSK; + * strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_PSK; * strWIDList[u32WidsCount].enuWIDtype = WID_STR; * strWIDList[u32WidsCount].s32ValueSize = sizeof(passphrase); * strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8*)(passphrase); @@ -1794,7 +1794,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH #ifndef WILC_PARSE_SCAN_IN_HOST - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_JOIN_REQ_EXTENDED; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ_EXTENDED; strWIDList[u32WidsCount].enuWIDtype = WID_STR; strWIDList[u32WidsCount].s32ValueSize = MAX_SSID_LEN + 7; strWIDList[u32WidsCount].ps8WidVal = WILC_MALLOC(strWIDList[u32WidsCount].s32ValueSize); @@ -1826,7 +1826,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH #else - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_JOIN_REQ_EXTENDED; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ_EXTENDED; strWIDList[u32WidsCount].enuWIDtype = WID_STR; /*Sending NoA attributes during connection*/ @@ -2092,7 +2092,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) strWIDList[u32WidsCount].s32ValueSize = gu32FlushedInfoElemAsocSize; u32WidsCount++; - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_11I_MODE; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_MODE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(gu8Flushed11iMode)); @@ -2100,7 +2100,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_AUTH_TYPE; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_AUTH_TYPE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&gu8FlushedAuthType); @@ -2108,7 +2108,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) #ifdef WILC_PARSE_SCAN_IN_HOST - strWIDList[u32WidsCount].u16WIDid = (WILC_Uint16)WID_JOIN_REQ_EXTENDED; + strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ_EXTENDED; strWIDList[u32WidsCount].enuWIDtype = WID_STR; strWIDList[u32WidsCount].s32ValueSize = gu32FlushedJoinReqSize; strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)gu8FlushedJoinReq; @@ -2149,7 +2149,7 @@ static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) WILC_Sint32 s32Error = WILC_SUCCESS; tstrConnectInfo strConnectInfo; tstrWID strWID; - WILC_Uint16 u16DummyReasonCode = 0; + u16 u16DummyReasonCode = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; if (pstrWFIDrv == NULL) { @@ -2199,7 +2199,7 @@ static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) /* Here we will notify our firmware also with the Connection failure {through sending to it Cfg packet carrying * WID_DISCONNECT} */ - strWID.u16WIDid = (WILC_Uint16)WID_DISCONNECT; + strWID.u16WIDid = (u16)WID_DISCONNECT; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Sint8 *)&u16DummyReasonCode; strWID.s32ValueSize = sizeof(WILC_Char); @@ -2382,8 +2382,8 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI WILC_Sint32 s32Error = WILC_SUCCESS; u8 u8MsgType = 0; u8 u8MsgID = 0; - WILC_Uint16 u16MsgLen = 0; - WILC_Uint16 u16WidID = (WILC_Uint16)WID_NIL; + u16 u16MsgLen = 0; + u16 u16WidID = (u16)WID_NIL; u8 u8WidLen = 0; u8 u8MacStatus; u8 u8MacStatusReasonCode; @@ -2730,7 +2730,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) PRINT_D(HOSTINF_DBG, "Handling WEP key\n"); PRINT_D(GENERIC_DBG, "ID Hostint is %d\n", (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); - strWIDList[0].u16WIDid = (WILC_Uint16)WID_11I_MODE; + strWIDList[0].u16WIDid = (u16)WID_11I_MODE; strWIDList[0].enuWIDtype = WID_CHAR; strWIDList[0].s32ValueSize = sizeof(WILC_Char); strWIDList[0].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8mode)); @@ -2740,7 +2740,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[1].s32ValueSize = sizeof(WILC_Char); strWIDList[1].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.tenuAuth_type)); - strWIDList[2].u16WIDid = (WILC_Uint16)WID_KEY_ID; + strWIDList[2].u16WIDid = (u16)WID_KEY_ID; strWIDList[2].enuWIDtype = WID_CHAR; strWIDList[2].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); @@ -2761,7 +2761,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) WILC_FREE(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey); - strWIDList[3].u16WIDid = (WILC_Uint16)WID_WEP_KEY_VALUE; + strWIDList[3].u16WIDid = (u16)WID_WEP_KEY_VALUE; strWIDList[3].enuWIDtype = WID_STR; strWIDList[3].s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen; strWIDList[3].ps8WidVal = (WILC_Sint8 *)pu8keybuf; @@ -2790,7 +2790,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) WILC_FREE(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey); - strWID.u16WIDid = (WILC_Uint16)WID_ADD_WEP_KEY; + strWID.u16WIDid = (u16)WID_ADD_WEP_KEY; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWID.s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2; @@ -2800,7 +2800,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) } else if (pstrHostIFkeyAttr->u8KeyAction & REMOVEKEY) { PRINT_D(HOSTINF_DBG, "Removing key\n"); - strWID.u16WIDid = (WILC_Uint16)WID_REMOVE_WEP_KEY; + strWID.u16WIDid = (u16)WID_REMOVE_WEP_KEY; strWID.enuWIDtype = WID_STR; s8idxarray[0] = (WILC_Sint8)pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx; @@ -2809,7 +2809,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); } else { - strWID.u16WIDid = (WILC_Uint16)WID_KEY_ID; + strWID.u16WIDid = (u16)WID_KEY_ID; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); strWID.s32ValueSize = sizeof(WILC_Char); @@ -2852,12 +2852,12 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) WILC_memcpy(pu8keybuf + 16, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen); /* pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode = 0X51; */ - strWIDList[0].u16WIDid = (WILC_Uint16)WID_11I_MODE; + strWIDList[0].u16WIDid = (u16)WID_11I_MODE; strWIDList[0].enuWIDtype = WID_CHAR; strWIDList[0].s32ValueSize = sizeof(WILC_Char); strWIDList[0].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode)); - strWIDList[1].u16WIDid = (WILC_Uint16)WID_ADD_RX_GTK; + strWIDList[1].u16WIDid = (u16)WID_ADD_RX_GTK; strWIDList[1].enuWIDtype = WID_STR; strWIDList[1].ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWIDList[1].s32ValueSize = RX_MIC_KEY_MSG_LEN; @@ -2904,7 +2904,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) WILC_memcpy(pu8keybuf + 16, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen); - strWID.u16WIDid = (WILC_Uint16)WID_ADD_RX_GTK; + strWID.u16WIDid = (u16)WID_ADD_RX_GTK; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWID.s32ValueSize = RX_MIC_KEY_MSG_LEN; @@ -2956,12 +2956,12 @@ _WPARxGtk_end_case_: pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen); - strWIDList[0].u16WIDid = (WILC_Uint16)WID_11I_MODE; + strWIDList[0].u16WIDid = (u16)WID_11I_MODE; strWIDList[0].enuWIDtype = WID_CHAR; strWIDList[0].s32ValueSize = sizeof(WILC_Char); strWIDList[0].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode)); - strWIDList[1].u16WIDid = (WILC_Uint16)WID_ADD_PTK; + strWIDList[1].u16WIDid = (u16)WID_ADD_PTK; strWIDList[1].enuWIDtype = WID_STR; strWIDList[1].ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWIDList[1].s32ValueSize = PTK_KEY_MSG_LEN + 1; @@ -3002,7 +3002,7 @@ _WPARxGtk_end_case_: pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen); - strWID.u16WIDid = (WILC_Uint16)WID_ADD_PTK; + strWID.u16WIDid = (u16)WID_ADD_PTK; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWID.s32ValueSize = PTK_KEY_MSG_LEN; @@ -3041,7 +3041,7 @@ _WPAPtk_end_case_: WILC_memcpy(pu8keybuf + ((PMKSA_KEY_LEN * i) + ETH_ALEN + 1), pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.pmkidlist[i].pmkid, PMKID_LEN); } - strWID.u16WIDid = (WILC_Uint16)WID_PMKID_INFO; + strWID.u16WIDid = (u16)WID_PMKID_INFO; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWID.s32ValueSize = (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1; @@ -3074,11 +3074,11 @@ static void Handle_Disconnect(void *drvHandler) tstrWID strWID; WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint16 u16DummyReasonCode = 0; + u16 u16DummyReasonCode = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_DISCONNECT; + strWID.u16WIDid = (u16)WID_DISCONNECT; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Sint8 *)&u16DummyReasonCode; strWID.s32ValueSize = sizeof(WILC_Char); @@ -3203,7 +3203,7 @@ static WILC_Sint32 Switch_Log_Terminal(void *drvHandler) static char dummy = 9; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_LOGTerminal_Switch; + strWID.u16WIDid = (u16)WID_LOGTerminal_Switch; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = &dummy; strWID.s32ValueSize = sizeof(WILC_Char); @@ -3245,7 +3245,7 @@ static WILC_Sint32 Handle_GetChnl(void *drvHandler) tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_CURRENT_CHANNEL; + strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Sint8 *)&gu8Chnl; strWID.s32ValueSize = sizeof(WILC_Char); @@ -3288,7 +3288,7 @@ static void Handle_GetRssi(void *drvHandler) tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_RSSI; + strWID.u16WIDid = (u16)WID_RSSI; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = &gs8Rssi; strWID.s32ValueSize = sizeof(WILC_Char); @@ -3320,7 +3320,7 @@ static void Handle_GetLinkspeed(void *drvHandler) gs8lnkspd = 0; - strWID.u16WIDid = (WILC_Uint16)WID_LINKSPEED; + strWID.u16WIDid = (u16)WID_LINKSPEED; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = &gs8lnkspd; strWID.s32ValueSize = sizeof(WILC_Char); @@ -3412,7 +3412,7 @@ static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInacti tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_SET_STA_MAC_INACTIVE_TIME; + strWID.u16WIDid = (u16)WID_SET_STA_MAC_INACTIVE_TIME; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = ETH_ALEN; strWID.ps8WidVal = (u8 *)WILC_MALLOC(strWID.s32ValueSize); @@ -3433,7 +3433,7 @@ static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInacti } - strWID.u16WIDid = (WILC_Uint16)WID_GET_INACTIVE_TIME; + strWID.u16WIDid = (u16)WID_GET_INACTIVE_TIME; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Sint8 *)&gu32InactiveTime; strWID.s32ValueSize = sizeof(WILC_Uint32); @@ -3480,7 +3480,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Adding BEACON\n"); - strWID.u16WIDid = (WILC_Uint16)WID_ADD_BEACON; + strWID.u16WIDid = (u16)WID_ADD_BEACON; strWID.enuWIDtype = WID_BIN; strWID.s32ValueSize = pstrSetBeaconParam->u32HeadLen + pstrSetBeaconParam->u32TailLen + 16; strWID.ps8WidVal = WILC_MALLOC(strWID.s32ValueSize); @@ -3550,7 +3550,7 @@ static void Handle_DelBeacon(void *drvHandler, tstrHostIFDelBeacon *pstrDelBeaco tstrWID strWID; u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_DEL_BEACON; + strWID.u16WIDid = (u16)WID_DEL_BEACON; strWID.enuWIDtype = WID_CHAR; strWID.s32ValueSize = sizeof(WILC_Char); strWID.ps8WidVal = &gu8DelBcn; @@ -3649,7 +3649,7 @@ static void Handle_AddStation(void *drvHandler, tstrWILC_AddStaParam *pstrStatio u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; PRINT_D(HOSTINF_DBG, "Handling add station\n"); - strWID.u16WIDid = (WILC_Uint16)WID_ADD_STA; + strWID.u16WIDid = (u16)WID_ADD_STA; strWID.enuWIDtype = WID_BIN; strWID.s32ValueSize = WILC_ADD_STA_LENGTH + pstrStationParam->u8NumRates; @@ -3693,7 +3693,7 @@ static void Handle_DelAllSta(void *drvHandler, tstrHostIFDelAllSta *pstrDelAllSt tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; u8 i; u8 au8Zero_Buff[6] = {0}; - strWID.u16WIDid = (WILC_Uint16)WID_DEL_ALL_STA; + strWID.u16WIDid = (u16)WID_DEL_ALL_STA; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = (pstrDelAllStaParam->u8Num_AssocSta * ETH_ALEN) + 1; @@ -3750,7 +3750,7 @@ static void Handle_DelStation(void *drvHandler, tstrHostIFDelSta *pstrDelStaPara u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_REMOVE_STA; + strWID.u16WIDid = (u16)WID_REMOVE_STA; strWID.enuWIDtype = WID_BIN; strWID.s32ValueSize = ETH_ALEN; @@ -3796,7 +3796,7 @@ static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStati u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_EDIT_STA; + strWID.u16WIDid = (u16)WID_EDIT_STA; strWID.enuWIDtype = WID_BIN; strWID.s32ValueSize = WILC_ADD_STA_LENGTH + pstrStationParam->u8NumRates; @@ -3874,7 +3874,7 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos PRINT_D(HOSTINF_DBG, "Setting channel :%d\n", pstrHostIfRemainOnChan->u16Channel); u8remain_on_chan_flag = WILC_TRUE; - strWID.u16WIDid = (WILC_Uint16)WID_REMAIN_ON_CHAN; + strWID.u16WIDid = (u16)WID_REMAIN_ON_CHAN; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = 2; strWID.ps8WidVal = (WILC_Sint8 *)WILC_MALLOC(strWID.s32ValueSize); @@ -3927,9 +3927,9 @@ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrH PRINT_D(HOSTINF_DBG, "Handling frame register Flag : %d FrameType: %d\n", pstrHostIfRegisterFrame->bReg, pstrHostIfRegisterFrame->u16FrameType); /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_REGISTER_FRAME; + strWID.u16WIDid = (u16)WID_REGISTER_FRAME; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = WILC_MALLOC(sizeof(WILC_Uint16) + 2); + strWID.ps8WidVal = WILC_MALLOC(sizeof(u16) + 2); if (strWID.ps8WidVal == NULL) { WILC_ERRORREPORT(s32Error, WILC_NO_MEM); } @@ -3938,10 +3938,10 @@ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrH *pu8CurrByte++ = pstrHostIfRegisterFrame->bReg; *pu8CurrByte++ = pstrHostIfRegisterFrame->u8Regid; - WILC_memcpy(pu8CurrByte, &(pstrHostIfRegisterFrame->u16FrameType), sizeof(WILC_Uint16)); + WILC_memcpy(pu8CurrByte, &(pstrHostIfRegisterFrame->u16FrameType), sizeof(u16)); - strWID.s32ValueSize = sizeof(WILC_Uint16) + 2; + strWID.s32ValueSize = sizeof(u16) + 2; /*Sending Cfg*/ @@ -3984,7 +3984,7 @@ static WILC_Uint32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainO /*This is to handle duplicate expiry messages (listen timer fired and supplicant called cancel_remain_on_channel())*/ if (P2P_LISTEN_STATE) { u8remain_on_chan_flag = WILC_FALSE; - strWID.u16WIDid = (WILC_Uint16)WID_REMAIN_ON_CHAN; + strWID.u16WIDid = (u16)WID_REMAIN_ON_CHAN; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = 2; strWID.ps8WidVal = WILC_MALLOC(strWID.s32ValueSize); @@ -4069,7 +4069,7 @@ static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *s tstrWID strWID; WILC_Sint8 s8PowerMode; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; - strWID.u16WIDid = (WILC_Uint16)WID_POWER_MANAGEMENT; + strWID.u16WIDid = (u16)WID_POWER_MANAGEMENT; if (strPowerMgmtParam->bIsEnabled == WILC_TRUE) { s8PowerMode = MIN_FAST_PS; @@ -4112,7 +4112,7 @@ static void Handle_SetMulticastFilter(void *drvHandler, tstrHostIFSetMulti *strH PRINT_D(HOSTINF_DBG, "Setup Multicast Filter\n"); - strWID.u16WIDid = (WILC_Uint16)WID_SETUP_MULTICAST_FILTER; + strWID.u16WIDid = (u16)WID_SETUP_MULTICAST_FILTER; strWID.enuWIDtype = WID_BIN; strWID.s32ValueSize = sizeof(tstrHostIFSetMulti) + ((strHostIfSetMulti->u32count) * ETH_ALEN); strWID.ps8WidVal = WILC_MALLOC(strWID.s32ValueSize); @@ -4175,7 +4175,7 @@ static WILC_Sint32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo strHostIfBASessionInfo->u16SessionTimeout, strHostIfBASessionInfo->u8Ted); - strWID.u16WIDid = (WILC_Uint16)WID_11E_P_ACTION_REQ; + strWID.u16WIDid = (u16)WID_11E_P_ACTION_REQ; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (u8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); strWID.s32ValueSize = BLOCK_ACK_REQ_SIZE; @@ -4208,7 +4208,7 @@ static WILC_Sint32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo PRINT_D(HOSTINF_DBG, "Couldn't open BA Session\n"); - strWID.u16WIDid = (WILC_Uint16)WID_11E_P_ACTION_REQ; + strWID.u16WIDid = (u16)WID_11E_P_ACTION_REQ; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = 15; ptr = strWID.ps8WidVal; @@ -4260,7 +4260,7 @@ static WILC_Sint32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo strHostIfBASessionInfo->au8Bssid[2], strHostIfBASessionInfo->u8Ted); - strWID.u16WIDid = (WILC_Uint16)WID_11E_P_ACTION_REQ; + strWID.u16WIDid = (u16)WID_11E_P_ACTION_REQ; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (u8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); strWID.s32ValueSize = BLOCK_ACK_REQ_SIZE; @@ -4282,7 +4282,7 @@ static WILC_Sint32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n"); - strWID.u16WIDid = (WILC_Uint16)WID_11E_P_ACTION_REQ; + strWID.u16WIDid = (u16)WID_11E_P_ACTION_REQ; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = 15; ptr = strWID.ps8WidVal; @@ -4330,7 +4330,7 @@ static WILC_Sint32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessi strHostIfBASessionInfo->au8Bssid[2], strHostIfBASessionInfo->u8Ted); - strWID.u16WIDid = (WILC_Uint16)WID_DEL_ALL_RX_BA; + strWID.u16WIDid = (u16)WID_DEL_ALL_RX_BA; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (u8 *)WILC_MALLOC(BLOCK_ACK_REQ_SIZE); strWID.s32ValueSize = BLOCK_ACK_REQ_SIZE; @@ -4640,7 +4640,7 @@ WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddre tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - strWID.u16WIDid = (WILC_Uint16)WID_REMOVE_KEY; + strWID.u16WIDid = (u16)WID_REMOVE_KEY; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = (WILC_Sint8 *)pu8StaAddress; strWID.s32ValueSize = 6; @@ -5252,7 +5252,7 @@ WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoA tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - strWID.u16WIDid = (WILC_Uint16)WID_PMKID_INFO; + strWID.u16WIDid = (u16)WID_PMKID_INFO; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = u32PmkidInfoLen; strWID.ps8WidVal = pu8PmkidInfoArray; @@ -5284,7 +5284,7 @@ WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 * /* u8 u8Psklength = WILC_strlen(pu8PassPhrase); */ /*validating psk length*/ if ((u8Psklength > 7) && (u8Psklength < 65)) { - strWID.u16WIDid = (WILC_Uint16)WID_11I_PSK; + strWID.u16WIDid = (u16)WID_11I_PSK; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = pu8PassPhrase; strWID.s32ValueSize = u8Psklength; @@ -5385,7 +5385,7 @@ WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - strWID.u16WIDid = (WILC_Uint16)WID_11I_PSK; + strWID.u16WIDid = (u16)WID_11I_PSK; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = u8Psklength; strWID.ps8WidVal = pu8PassPhrase; @@ -5433,12 +5433,12 @@ WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, tstrWID astrWIDList[2]; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; - astrWIDList[0].u16WIDid = (WILC_Uint16)WID_SITE_SURVEY_RESULTS; + astrWIDList[0].u16WIDid = (u16)WID_SITE_SURVEY_RESULTS; astrWIDList[0].enuWIDtype = WID_STR; astrWIDList[0].ps8WidVal = ppu8RcvdSiteSurveyResults[0]; astrWIDList[0].s32ValueSize = u32MaxSiteSrvyFragLen; - astrWIDList[1].u16WIDid = (WILC_Uint16)WID_SITE_SURVEY_RESULTS; + astrWIDList[1].u16WIDid = (u16)WID_SITE_SURVEY_RESULTS; astrWIDList[1].enuWIDtype = WID_STR; astrWIDList[1].ps8WidVal = ppu8RcvdSiteSurveyResults[1]; astrWIDList[1].s32ValueSize = u32MaxSiteSrvyFragLen; @@ -5481,7 +5481,7 @@ WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - strWID.u16WIDid = (WILC_Uint16)WID_START_SCAN_REQ; + strWID.u16WIDid = (u16)WID_START_SCAN_REQ; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Sint8 *)&scanSource; strWID.s32ValueSize = sizeof(WILC_Char); @@ -5511,7 +5511,7 @@ WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSo tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - strWID.u16WIDid = (WILC_Uint16)WID_START_SCAN_REQ; + strWID.u16WIDid = (u16)WID_START_SCAN_REQ; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Sint8 *)pu8ScanSource; strWID.s32ValueSize = sizeof(WILC_Char); @@ -5676,7 +5676,7 @@ WILC_Sint32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv) * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16ReasonCode) +WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, u16 u16ReasonCode) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -5731,7 +5731,7 @@ WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id) tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - strWID.u16WIDid = (WILC_Uint16)WID_DISCONNECT; + strWID.u16WIDid = (u16)WID_DISCONNECT; strWID.enuWIDtype = WID_CHAR; strWID.ps8WidVal = (WILC_Sint8 *)&assoc_id; strWID.s32ValueSize = sizeof(WILC_Char); @@ -5772,7 +5772,7 @@ WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - strWID.u16WIDid = (WILC_Uint16)WID_ASSOC_REQ_INFO; + strWID.u16WIDid = (u16)WID_ASSOC_REQ_INFO; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = pu8AssocReqInfo; strWID.s32ValueSize = u32AssocReqInfoLen; @@ -5804,7 +5804,7 @@ WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } - strWID.u16WIDid = (WILC_Uint16)WID_ASSOC_RES_INFO; + strWID.u16WIDid = (u16)WID_ASSOC_RES_INFO; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = pu8AssocRespInfo; strWID.s32ValueSize = u32MaxAssocRespInfoLen; @@ -5849,7 +5849,7 @@ WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowe tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - strWID.u16WIDid = (WILC_Uint16)WID_RX_POWER_LEVEL; + strWID.u16WIDid = (u16)WID_RX_POWER_LEVEL; strWID.enuWIDtype = WID_STR; strWID.ps8WidVal = pu8RxPowerLevel; strWID.s32ValueSize = u32RxPowerLevelLen; @@ -6056,7 +6056,7 @@ WILC_Sint32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32 } /*prepare configuration packet*/ - strWID.u16WIDid = (WILC_Uint16)WID_MEMORY_ADDRESS; + strWID.u16WIDid = (u16)WID_MEMORY_ADDRESS; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Char *)&u32TestMemAddr; strWID.s32ValueSize = sizeof(WILC_Uint32); @@ -6149,7 +6149,7 @@ WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 *pu WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } - strWID.u16WIDid = (WILC_Uint16)WID_MEMORY_ADDRESS; + strWID.u16WIDid = (u16)WID_MEMORY_ADDRESS; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Sint8 *)pu32TestMemAddr; strWID.s32ValueSize = sizeof(WILC_Uint32); @@ -6413,7 +6413,7 @@ WILC_Sint32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParam * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint16 *pu16WID_Value) +WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, u16 u16WID, u16 *pu16WID_Value) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -6428,11 +6428,11 @@ WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint switch (u16WID) { case WID_BSS_TYPE: - *pu16WID_Value = (WILC_Uint16)pstrWFIDrv->strCfgValues.bss_type; + *pu16WID_Value = (u16)pstrWFIDrv->strCfgValues.bss_type; break; case WID_AUTH_TYPE: - *pu16WID_Value = (WILC_Uint16)pstrWFIDrv->strCfgValues.auth_type; + *pu16WID_Value = (u16)pstrWFIDrv->strCfgValues.auth_type; break; case WID_AUTH_TIMEOUT: @@ -6440,7 +6440,7 @@ WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint break; case WID_POWER_MANAGEMENT: - *pu16WID_Value = (WILC_Uint16)pstrWFIDrv->strCfgValues.power_mgmt_mode; + *pu16WID_Value = (u16)pstrWFIDrv->strCfgValues.power_mgmt_mode; break; case WID_SHORT_RETRY_LIMIT: @@ -6460,15 +6460,15 @@ WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint break; case WID_PREAMBLE: - *pu16WID_Value = (WILC_Uint16)pstrWFIDrv->strCfgValues.preamble_type; + *pu16WID_Value = (u16)pstrWFIDrv->strCfgValues.preamble_type; break; case WID_SHORT_SLOT_ALLOWED: - *pu16WID_Value = (WILC_Uint16) pstrWFIDrv->strCfgValues.short_slot_allowed; + *pu16WID_Value = (u16) pstrWFIDrv->strCfgValues.short_slot_allowed; break; case WID_11N_TXOP_PROT_DISABLE: - *pu16WID_Value = (WILC_Uint16)pstrWFIDrv->strCfgValues.txop_prot_disabled; + *pu16WID_Value = (u16)pstrWFIDrv->strCfgValues.txop_prot_disabled; break; case WID_BEACON_INTERVAL: @@ -6476,11 +6476,11 @@ WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint break; case WID_DTIM_PERIOD: - *pu16WID_Value = (WILC_Uint16)pstrWFIDrv->strCfgValues.dtim_period; + *pu16WID_Value = (u16)pstrWFIDrv->strCfgValues.dtim_period; break; case WID_SITE_SURVEY: - *pu16WID_Value = (WILC_Uint16)pstrWFIDrv->strCfgValues.site_survey_enabled; + *pu16WID_Value = (u16)pstrWFIDrv->strCfgValues.site_survey_enabled; break; case WID_SITE_SURVEY_SCAN_TIME: @@ -6531,7 +6531,7 @@ WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint * @version 1.0 */ void host_int_send_join_leave_info_to_host - (WILC_Uint16 assocId, u8 *stationAddr, WILC_Bool joining) + (u16 assocId, u8 *stationAddr, WILC_Bool joining) { } /** @@ -6578,7 +6578,7 @@ void GetPeriodicRSSI(void *pvArg) void host_int_send_network_info_to_host - (u8 *macStartAddress, WILC_Uint16 u16RxFrameLen, WILC_Sint8 s8Rssi) + (u8 *macStartAddress, u16 u16RxFrameLen, WILC_Sint8 s8Rssi) { } /** @@ -7087,7 +7087,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) * @date * @version 1.0 */ -WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32SessionID, WILC_Uint32 u32duration, WILC_Uint16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg) +WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32SessionID, WILC_Uint32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7174,7 +7174,7 @@ WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u * @author * @date * @version 1.0*/ -WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16FrameType, WILC_Bool bReg) +WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, WILC_Bool bReg) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7631,11 +7631,11 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) { tstrJoinBssParam *pNewJoinBssParam = NULL; u8 *pu8IEs; - WILC_Uint16 u16IEsLen; - WILC_Uint16 index = 0; + u16 u16IEsLen; + u16 index = 0; u8 suppRatesNo = 0; u8 extSuppRatesNo; - WILC_Uint16 jumpOffset; + u16 jumpOffset; u8 pcipherCount; u8 authCount; u8 pcipherTotalCount = 0; @@ -7723,7 +7723,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) (pu8IEs[index + 2] == 0x50) && (pu8IEs[index + 3] == 0x6f) && (pu8IEs[index + 4] == 0x9a) && /* OUI */ (pu8IEs[index + 5] == 0x09) && (pu8IEs[index + 6] == 0x0c)) { /* OUI Type */ - WILC_Uint16 u16P2P_count; + u16 u16P2P_count; pNewJoinBssParam->tsf = ptstrNetworkInfo->u32Tsf; pNewJoinBssParam->u8NoaEnbaled = 1; pNewJoinBssParam->u8Index = pu8IEs[index + 9]; @@ -7759,7 +7759,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) ((pu8IEs[index] == WPA_IE) && (pu8IEs[index + 2] == 0x00) && (pu8IEs[index + 3] == 0x50) && (pu8IEs[index + 4] == 0xF2) && (pu8IEs[index + 5] == 0x01))) { - WILC_Uint16 rsnIndex = index; + u16 rsnIndex = index; /*PRINT_D(HOSTINF_DBG,"RSN IE Length:%d\n",pu8IEs[rsnIndex+1]); * for(i=0; i*/ - WILC_Uint16 u16FlagsSet; /**/ + u16 u16FlagsSet; /*buff; /* len of the original frame without the added pointer at the tail */ - WILC_Uint16 u16len = (pv_data->size) - sizeof(struct tx_complete_mon_data *); + u16 u16len = (pv_data->size) - sizeof(struct tx_complete_mon_data *); /*if(bStatus == 1){ diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index e92ba59382ef..70df3a1e7546 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -67,7 +67,7 @@ unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xb2}; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP extern WILC_Bool g_obtainingIP; #endif -extern WILC_Uint16 Set_machw_change_vir_if(WILC_Bool bValue); +extern u16 Set_machw_change_vir_if(WILC_Bool bValue); extern void resolve_disconnect_aberration(void *drvHandler); extern u8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; void wilc1000_wlan_deinit(linux_wlan_t *nic); diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h index 4b4cfa202043..2e873b6942b6 100644 --- a/drivers/staging/wilc1000/wilc_oswrapper.h +++ b/drivers/staging/wilc1000/wilc_oswrapper.h @@ -14,7 +14,6 @@ #define WILC_OSW_INTERFACE_VER 2 /* Integer Types */ -typedef unsigned short WILC_Uint16; typedef unsigned int WILC_Uint32; typedef unsigned long long WILC_Uint64; typedef signed char WILC_Sint8; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 5844eba90b91..a2047e3b6050 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -25,7 +25,7 @@ extern void linux_wlan_free(void *vp); extern int linux_wlan_get_firmware(perInterface_wlan_t *p_nic); extern void linux_wlan_unlock(void *vp); -extern WILC_Uint16 Set_machw_change_vir_if(WILC_Bool bValue); +extern u16 Set_machw_change_vir_if(WILC_Bool bValue); extern int mac_open(struct net_device *ndev); extern int mac_close(struct net_device *ndev); @@ -574,7 +574,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, if (enuConnDisconnEvent == CONN_DISCONN_EVENT_CONN_RESP) { /*Initialization*/ - WILC_Uint16 u16ConnectStatus = WLAN_STATUS_SUCCESS; + u16 u16ConnectStatus = WLAN_STATUS_SUCCESS; u16ConnectStatus = pstrConnectInfo->u16ConnectStatus; @@ -2549,7 +2549,7 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy, /*Save the current channel after we tune to it*/ u8CurrChannel = chan->hw_value; } else if (ieee80211_is_action(mgmt->frame_control)) { - PRINT_D(GENERIC_DBG, "ACTION FRAME:%x\n", (WILC_Uint16)mgmt->frame_control); + PRINT_D(GENERIC_DBG, "ACTION FRAME:%x\n", (u16)mgmt->frame_control); /*BugID_4847*/ @@ -2845,7 +2845,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev struct WILC_WFI_priv *priv; perInterface_wlan_t *nic; u8 interface_type; - WILC_Uint16 TID = 0; + u16 TID = 0; #ifdef WILC_P2P u8 i; #endif diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index b322f0f956ea..d07216a237a0 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -175,7 +175,7 @@ struct WILC_WFI_priv { }; typedef struct { - WILC_Uint16 frame_type; + u16 frame_type; WILC_Bool reg; } struct_frame_reg; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 9edc851cb705..2a015e8e7038 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -27,7 +27,7 @@ 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); -WILC_Uint16 Set_machw_change_vir_if(WILC_Bool bValue); +u16 Set_machw_change_vir_if(WILC_Bool bValue); @@ -2325,9 +2325,9 @@ _fail_: } #define BIT31 (1 << 31) -WILC_Uint16 Set_machw_change_vir_if(WILC_Bool bValue) +u16 Set_machw_change_vir_if(WILC_Bool bValue) { - WILC_Uint16 ret; + u16 ret; WILC_Uint32 reg; /*Reset WILC_CHANGING_VIR_IF register to allow adding futrue keys to CE H/W*/ @@ -2354,7 +2354,7 @@ WILC_Uint16 Set_machw_change_vir_if(WILC_Bool bValue) } #ifdef WILC_FULLY_HOSTING_AP -wilc_wlan_dev_t *Get_wlan_context(WILC_Uint16 *pu16size) +wilc_wlan_dev_t *Get_wlan_context(u16 *pu16size) { *pu16size = sizeof(wilc_wlan_dev_t); return &g_wlan; -- cgit v1.2.3-59-g8ed1b From 4e4467fdd6e89fbbc5208636a85177e4b973ded9 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Thu, 11 Jun 2015 14:35:55 +0900 Subject: staging: wilc1000: remove WILC_Uint32 Use u32 instead of WILC_Uint32. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigurator.c | 74 +++--- drivers/staging/wilc1000/coreconfigurator.h | 16 +- drivers/staging/wilc1000/fifo_buffer.c | 20 +- drivers/staging/wilc1000/fifo_buffer.h | 22 +- drivers/staging/wilc1000/host_interface.c | 266 +++++++++++----------- drivers/staging/wilc1000/host_interface.h | 70 +++--- drivers/staging/wilc1000/linux_mon.c | 4 +- drivers/staging/wilc1000/linux_wlan.c | 12 +- drivers/staging/wilc1000/wilc_memory.c | 14 +- drivers/staging/wilc1000/wilc_memory.h | 18 +- drivers/staging/wilc1000/wilc_msgqueue.c | 6 +- drivers/staging/wilc1000/wilc_msgqueue.h | 6 +- drivers/staging/wilc1000/wilc_oswrapper.h | 1 - drivers/staging/wilc1000/wilc_platform.h | 4 +- drivers/staging/wilc1000/wilc_sleep.c | 4 +- drivers/staging/wilc1000/wilc_sleep.h | 2 +- drivers/staging/wilc1000/wilc_strutils.c | 14 +- drivers/staging/wilc1000/wilc_strutils.h | 14 +- drivers/staging/wilc1000/wilc_timer.c | 2 +- drivers/staging/wilc1000/wilc_timer.h | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 54 ++--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 6 +- drivers/staging/wilc1000/wilc_wlan.c | 6 +- drivers/staging/wilc1000/wilc_wlan_cfg.c | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 4 +- 25 files changed, 321 insertions(+), 322 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index cc4455f47309..2bb513dde065 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -159,9 +159,9 @@ typedef struct { /* Extern Function Declarations */ /*****************************************************************************/ extern WILC_Sint32 SendRawPacket(WILC_Sint8 *ps8Packet, WILC_Sint32 s32PacketLen); -extern void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); -extern void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); -extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); +extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length); +extern void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length); +extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); /*****************************************************************************/ /* Global Variables */ /*****************************************************************************/ @@ -359,8 +359,8 @@ INLINE u16 extract_mac_addr(WILC_Char *str, u8 *buff) /* integers. */ INLINE void create_mac_addr(u8 *str, u8 *buff) { - WILC_Uint32 i = 0; - WILC_Uint32 j = 0; + u32 i = 0; + u32 j = 0; for (i = 0; i < MAC_ADDR_LEN; i++) { str[j++] = get_hex_char((u8)((buff[i] >> 4) & 0x0F)); @@ -376,7 +376,7 @@ INLINE void create_mac_addr(u8 *str, u8 *buff) /* inet_addr is platform independent. */ /* ips=>IP Address String in dotted decimal format */ /* ipn=>Pointer to IP Address in integer format */ -INLINE u8 conv_ip_to_int(u8 *ips, WILC_Uint32 *ipn) +INLINE u8 conv_ip_to_int(u8 *ips, u32 *ipn) { u8 i = 0; u8 ipb = 0; @@ -403,7 +403,7 @@ INLINE u8 conv_ip_to_int(u8 *ips, WILC_Uint32 *ipn) /* decimal string format. Alternative to std library fn inet_ntoa(). */ /* ips=>Buffer to hold IP Address String dotted decimal format (Min 17B) */ /* ipn=>IP Address in integer format */ -INLINE u8 conv_int_to_ip(u8 *ips, WILC_Uint32 ipn) +INLINE u8 conv_int_to_ip(u8 *ips, u32 ipn) { u8 i = 0; u8 ipb = 0; @@ -442,7 +442,7 @@ INLINE u8 conv_int_to_ip(u8 *ips, WILC_Uint32 ipn) return i; } -INLINE tenuWIDtype get_wid_type(WILC_Uint32 wid_num) +INLINE tenuWIDtype get_wid_type(u32 wid_num) { /* Check for iconfig specific WID types first */ if ((wid_num == WID_BSSID) || @@ -486,10 +486,10 @@ INLINE u16 get_beacon_period(u8 *data) return bcn_per; } -INLINE WILC_Uint32 get_beacon_timestamp_lo(u8 *data) +INLINE u32 get_beacon_timestamp_lo(u8 *data) { - WILC_Uint32 time_stamp = 0; - WILC_Uint32 index = MAC_HDR_LEN; + u32 time_stamp = 0; + u32 index = MAC_HDR_LEN; time_stamp |= data[index++]; time_stamp |= (data[index++] << 8); @@ -812,8 +812,8 @@ WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInf u8 *pu8IEs = 0; u16 u16IEsLen = 0; u8 u8index = 0; - WILC_Uint32 u32Tsf_Lo; - WILC_Uint32 u32Tsf_Hi; + u32 u32Tsf_Lo; + u32 u32Tsf_Hi; pstrNetworkInfo = (tstrNetworkInfo *)WILC_MALLOC(sizeof(tstrNetworkInfo)); WILC_memset((void *)(pstrNetworkInfo), 0, sizeof(tstrNetworkInfo)); @@ -924,7 +924,7 @@ WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo) * @date 2 Apr 2012 * @version 1.0 */ -WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, WILC_Uint32 u32BufferLen, +WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, tstrConnectRespInfo **ppstrConnectRespInfo) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -1001,17 +1001,17 @@ WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo) #ifndef CONNECT_DIRECT WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], wid_site_survey_reslts_s **ppstrSurveyResults, - WILC_Uint32 *pu32SurveyResultsCount) + u32 *pu32SurveyResultsCount) { WILC_Sint32 s32Error = WILC_SUCCESS; wid_site_survey_reslts_s *pstrSurveyResults = NULL; - WILC_Uint32 u32SurveyResultsCount = 0; - WILC_Uint32 u32SurveyBytesLength = 0; + u32 u32SurveyResultsCount = 0; + u32 u32SurveyBytesLength = 0; u8 *pu8BufferPtr; - WILC_Uint32 u32RcvdSurveyResultsNum = 2; + u32 u32RcvdSurveyResultsNum = 2; u8 u8ReadSurveyResFragNum; - WILC_Uint32 i; - WILC_Uint32 j; + u32 i; + u32 j; for (i = 0; i < u32RcvdSurveyResultsNum; i++) { u32SurveyBytesLength = ppu8RcvdSiteSurveyResults[i][0]; @@ -1208,8 +1208,8 @@ void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, tstrWID *pstrWID, WILC_Sint8 *ps8WidVal) { - WILC_Uint32 *pu32val = (WILC_Uint32 *)ps8WidVal; - WILC_Uint32 u32val = 0; + u32 *pu32val = (u32 *)ps8WidVal; + u32 u32val = 0; WILC_Sint32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set INT val 0x%x , NULL structure\n", u32val); @@ -1224,7 +1224,7 @@ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, u32val = *pu32val; /* Length */ - pcPacket[s32PktLen++] = sizeof(WILC_Uint32); + pcPacket[s32PktLen++] = sizeof(u32); /* Value */ pcPacket[s32PktLen++] = (u8)(u32val & 0xFF); @@ -1266,7 +1266,7 @@ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, tstrWID *pstrWID, u8 *pu8ip) { - WILC_Uint32 u32val = 0; + u32 u32val = 0; WILC_Sint32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { @@ -1280,7 +1280,7 @@ void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, if (g_oper_mode == SET_CFG) { /* Length */ - pcPacket[s32PktLen++] = sizeof(WILC_Uint32); + pcPacket[s32PktLen++] = sizeof(u32); /* Convert the IP Address String to Integer */ conv_ip_to_int(pu8ip, &u32val); @@ -1521,14 +1521,14 @@ WILC_Sint32 further_process_response(u8 *resp, u16 u16WIDid, u16 cfg_len, WILC_Bool process_wid_num, - WILC_Uint32 cnt, + u32 cnt, tstrWID *pstrWIDresult) { - WILC_Uint32 retval = 0; - WILC_Uint32 idx = 0; + u32 retval = 0; + u32 idx = 0; u8 cfg_chr = 0; u16 cfg_sht = 0; - WILC_Uint32 cfg_int = 0; + u32 cfg_int = 0; u8 cfg_str[256] = {0}; tenuWIDtype enuWIDtype = WID_UNDEF; @@ -1558,7 +1558,7 @@ WILC_Sint32 further_process_response(u8 *resp, case WID_INT: { - WILC_Uint32 *pu32val = (WILC_Uint32 *)(pstrWIDresult->ps8WidVal); + u32 *pu32val = (u32 *)(pstrWIDresult->ps8WidVal); cfg_int = MAKE_WORD32( MAKE_WORD16(resp[idx], resp[idx + 1]), MAKE_WORD16(resp[idx + 2], resp[idx + 3]) @@ -1694,9 +1694,9 @@ WILC_Sint32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) u16 cfg_len = 0; tenuWIDtype enuWIDtype = WID_UNDEF; WILC_Bool num_wid_processed = WILC_FALSE; - WILC_Uint32 cnt = 0; - WILC_Uint32 idx = 0; - WILC_Uint32 ResCnt = 0; + u32 cnt = 0; + u32 idx = 0; + u32 ResCnt = 0; /* Check whether the received frame is a valid response */ if (RESP_MSG_TYPE != resp[0]) { PRINT_INFO(CORECONFIG_DBG, "Received Message format incorrect.\n"); @@ -1858,10 +1858,10 @@ WILC_Sint32 CreatePacketHeader(WILC_Char *pcpacket, WILC_Sint32 *ps32PacketLengt */ WILC_Sint32 CreateConfigPacket(WILC_Sint8 *ps8packet, WILC_Sint32 *ps32PacketLength, - tstrWID *pstrWIDs, WILC_Uint32 u32WIDsCount) + tstrWID *pstrWIDs, u32 u32WIDsCount) { WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint32 u32idx = 0; + u32 u32idx = 0; *ps32PacketLength = MSG_HEADER_LEN; for (u32idx = 0; u32idx < u32WIDsCount; u32idx++) { switch (pstrWIDs[u32idx].enuWIDtype) { @@ -1950,7 +1950,7 @@ WILC_Sint32 ConfigWaitResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32MaxRespBu */ #ifdef SIMULATION WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, - WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler) + u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler) { WILC_Sint32 s32Error = WILC_SUCCESS; WILC_Sint32 err = WILC_SUCCESS; @@ -2129,7 +2129,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps; * @version 1.0 */ WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, - WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler) + u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler) { WILC_Sint32 counter = 0, ret = 0; if (gpstrWlanOps == NULL) { diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 640dc50860f9..c2a6d5b00bf7 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -66,7 +66,7 @@ extern u16 g_num_total_switches; /* Function Macros */ /*****************************************************************************/ #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb)) -#define MAKE_WORD32(lsw, msw) ((((WILC_Uint32)(msw) << 16) & 0xFFFF0000) | (lsw)) +#define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw)) /*****************************************************************************/ @@ -423,7 +423,7 @@ typedef struct { u8 u8Found; #endif #ifdef WILC_P2P - WILC_Uint32 u32Tsf; /* time-stamp [Low only 32 bit] */ + u32 u32Tsf; /* time-stamp [Low only 32 bit] */ #endif u8 *pu8IEs; u16 u16IEsLen; @@ -476,23 +476,23 @@ extern WILC_Sint32 CoreConfiguratorInit(void); extern WILC_Sint32 CoreConfiguratorDeInit(void); extern WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, - WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler); + u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler); extern WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); extern WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); -extern WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, WILC_Uint32 u32BufferLen, +extern WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, tstrConnectRespInfo **ppstrConnectRespInfo); extern WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo); #ifndef CONNECT_DIRECT extern WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], - wid_site_survey_reslts_s **ppstrSurveyResults, WILC_Uint32 *pu32SurveyResultsCount); + wid_site_survey_reslts_s **ppstrSurveyResults, u32 *pu32SurveyResultsCount); extern WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults); #endif extern WILC_Sint32 SendRawPacket(WILC_Sint8 *pspacket, WILC_Sint32 s32PacketLen); -extern void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); -void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); -void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length); +extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length); +void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length); +void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); #endif diff --git a/drivers/staging/wilc1000/fifo_buffer.c b/drivers/staging/wilc1000/fifo_buffer.c index f807bfb72539..788398ca76e5 100644 --- a/drivers/staging/wilc1000/fifo_buffer.c +++ b/drivers/staging/wilc1000/fifo_buffer.c @@ -5,9 +5,9 @@ -WILC_Uint32 FIFO_InitBuffer(tHANDLE *hBuffer, WILC_Uint32 u32BufferLength) +u32 FIFO_InitBuffer(tHANDLE *hBuffer, u32 u32BufferLength) { - WILC_Uint32 u32Error = 0; + u32 u32Error = 0; tstrFifoHandler *pstrFifoHandler = WILC_MALLOC (sizeof (tstrFifoHandler)); if (pstrFifoHandler) { WILC_memset (pstrFifoHandler, 0, sizeof (tstrFifoHandler)); @@ -27,9 +27,9 @@ WILC_Uint32 FIFO_InitBuffer(tHANDLE *hBuffer, WILC_Uint32 u32BufferLength) } return u32Error; } -WILC_Uint32 FIFO_DeInit(tHANDLE hFifo) +u32 FIFO_DeInit(tHANDLE hFifo) { - WILC_Uint32 u32Error = 0; + u32 u32Error = 0; tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; if (pstrFifoHandler) { if (pstrFifoHandler->pu8Buffer) { @@ -45,9 +45,9 @@ WILC_Uint32 FIFO_DeInit(tHANDLE hFifo) return u32Error; } -WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToRead, WILC_Uint32 *pu32BytesRead) +u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32BytesRead) { - WILC_Uint32 u32Error = 0; + u32 u32Error = 0; tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; if (pstrFifoHandler && pu32BytesRead) { if (pstrFifoHandler->u32TotalBytes) { @@ -66,7 +66,7 @@ WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToR pstrFifoHandler->u32TotalBytes -= u32BytesToRead; } else { - WILC_Uint32 u32FirstPart = + u32 u32FirstPart = pstrFifoHandler->u32BufferLength - pstrFifoHandler->u32ReadOffset; WILC_memcpy(pu8Buffer, pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32ReadOffset, u32FirstPart); @@ -86,9 +86,9 @@ WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToR return u32Error; } -WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToWrite, WILC_Bool bForceOverWrite) +u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToWrite, WILC_Bool bForceOverWrite) { - WILC_Uint32 u32Error = 0; + u32 u32Error = 0; tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; if (pstrFifoHandler) { if (u32BytesToWrite < pstrFifoHandler->u32BufferLength) { @@ -103,7 +103,7 @@ WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesTo pstrFifoHandler->u32TotalBytes += u32BytesToWrite; } else { - WILC_Uint32 u32FirstPart = + u32 u32FirstPart = pstrFifoHandler->u32BufferLength - pstrFifoHandler->u32WriteOffset; WILC_memcpy(pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32WriteOffset, pu8Buffer, u32FirstPart); diff --git a/drivers/staging/wilc1000/fifo_buffer.h b/drivers/staging/wilc1000/fifo_buffer.h index 4d120503c4b2..912a33327bc7 100644 --- a/drivers/staging/wilc1000/fifo_buffer.h +++ b/drivers/staging/wilc1000/fifo_buffer.h @@ -6,18 +6,18 @@ typedef struct { u8 *pu8Buffer; - WILC_Uint32 u32BufferLength; - WILC_Uint32 u32WriteOffset; - WILC_Uint32 u32ReadOffset; - WILC_Uint32 u32TotalBytes; + u32 u32BufferLength; + u32 u32WriteOffset; + u32 u32ReadOffset; + u32 u32TotalBytes; struct semaphore SemBuffer; } tstrFifoHandler; -extern WILC_Uint32 FIFO_InitBuffer(tHANDLE *hBuffer, - WILC_Uint32 u32BufferLength); -extern WILC_Uint32 FIFO_DeInit(tHANDLE hFifo); -extern WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, - WILC_Uint32 u32BytesToRead, WILC_Uint32 *pu32BytesRead); -extern WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, - WILC_Uint32 u32BytesToWrite, WILC_Bool bForceOverWrite); +extern u32 FIFO_InitBuffer(tHANDLE *hBuffer, + u32 u32BufferLength); +extern u32 FIFO_DeInit(tHANDLE hFifo); +extern u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, + u32 u32BytesToRead, u32 *pu32BytesRead); +extern u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, + u32 u32BytesToWrite, WILC_Bool bForceOverWrite); diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 4b6265c21c6f..75effdb22a02 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -220,7 +220,7 @@ typedef struct _tstrHostIFconnectAttr { */ typedef struct _tstrRcvdGnrlAsyncInfo { u8 *pu8Buffer; - WILC_Uint32 u32Length; + u32 u32Length; } tstrRcvdGnrlAsyncInfo; /*! @@ -265,7 +265,7 @@ typedef struct _tstrHostIFGetChan { /*typedef struct _tstrScanComplete * { * u8* pu8Buffer; - * WILC_Uint32 u32Length; + * u32 u32Length; * } tstrScanComplete;*/ /*! @@ -279,13 +279,13 @@ typedef struct _tstrHostIFGetChan { * @version 1.0 */ typedef struct _tstrHostIFSetBeacon { - WILC_Uint32 u32Interval; /*!< Beacon Interval. Period between two successive beacons on air */ - WILC_Uint32 u32DTIMPeriod; /*!< DTIM Period. Indicates how many Beacon frames + 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 */ - WILC_Uint32 u32HeadLen; /*!< Length of the head buffer in bytes */ + u32 u32HeadLen; /*!< Length of the head buffer in bytes */ u8 *pu8Head; /*!< Pointer to the beacon's head buffer. Beacon's head is the part * from the beacon's start till the TIM element, NOT including the TIM */ - WILC_Uint32 u32TailLen; /*!< Length of the tail buffer in bytes */ + u32 u32TailLen; /*!< Length of the tail buffer in bytes */ u8 *pu8Tail; /*!< Pointer to the beacon's tail buffer. Beacon's tail starts just * after the TIM inormation element */ } tstrHostIFSetBeacon; @@ -319,7 +319,7 @@ typedef struct _tstrHostIFDelBeacon { typedef struct { WILC_Bool bIsEnabled; - WILC_Uint32 u32count; + u32 u32count; } tstrHostIFSetMulti; /*! @@ -380,7 +380,7 @@ typedef struct _tstrTimerCb { typedef struct { WILC_Bool bIsEnabled; - WILC_Uint32 u32Timeout; + u32 u32Timeout; } tstrHostIfPowerMgmtParam; /*! @@ -504,7 +504,7 @@ typedef struct _tstrJoinBssParam { u8 rsn_cap[2]; struct _tstrJoinParam *nextJoinBss; #ifdef WILC_P2P - WILC_Uint32 tsf; + u32 tsf; u8 u8NoaEnbaled; u8 u8OppEnable; u8 u8CtWindow; @@ -570,11 +570,11 @@ static u8 gu8Chnl; static u8 gs8SetIP[2][4]; static u8 gs8GetIP[2][4]; #ifdef WILC_AP_EXTERNAL_MLME -static WILC_Uint32 gu32InactiveTime; +static u32 gu32InactiveTime; static u8 gu8DelBcn; #endif #ifndef SIMULATION -static WILC_Uint32 gu32WidConnRstHack; +static u32 gu32WidConnRstHack; #endif /*BugID_5137*/ @@ -582,9 +582,9 @@ u8 *gu8FlushedJoinReq; u8 *gu8FlushedInfoElemAsoc; u8 gu8Flushed11iMode; u8 gu8FlushedAuthType; -WILC_Uint32 gu32FlushedJoinReqSize; -WILC_Uint32 gu32FlushedInfoElemAsocSize; -WILC_Uint32 gu8FlushedJoinReqDrvHandler; +u32 gu32FlushedJoinReqSize; +u32 gu32FlushedInfoElemAsocSize; +u32 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 */ @@ -595,7 +595,7 @@ WILC_Uint32 gu8FlushedJoinReqDrvHandler; static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo); #endif /*WILC_PARSE_SCAN_IN_HOST*/ -extern void chip_sleep_manually(WILC_Uint32 u32SleepTime); +extern void chip_sleep_manually(u32 u32SleepTime); extern int linux_wlan_get_num_conn_ifcs(void); /** @@ -622,7 +622,7 @@ static WILC_Sint32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHo PRINT_D(HOSTINF_DBG, "Setting channel\n"); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to set channel\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -655,14 +655,14 @@ static WILC_Sint32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSe strWID.u16WIDid = (u16)WID_SET_DRV_HANDLER; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Sint8 *)&(pstrHostIfSetDrvHandler->u32Address); - strWID.s32ValueSize = sizeof(WILC_Uint32); + strWID.s32ValueSize = sizeof(u32); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); - if ((pstrHostIfSetDrvHandler->u32Address) == (WILC_Uint32)NULL) { + if ((pstrHostIfSetDrvHandler->u32Address) == (u32)NULL) { up(&hSemDeinitDrvHandle); } @@ -700,15 +700,15 @@ static WILC_Sint32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperat strWID.u16WIDid = (u16)WID_SET_OPERATION_MODE; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Sint8 *)&(pstrHostIfSetOperationMode->u32Mode); - strWID.s32ValueSize = sizeof(WILC_Uint32); + strWID.s32ValueSize = sizeof(u32); /*Sending Cfg*/ PRINT_INFO(HOSTINF_DBG, "(size_t)pstrWFIDrv= %p \n", pstrWFIDrv); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); - if ((pstrHostIfSetOperationMode->u32Mode) == (WILC_Uint32)NULL) { + if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL) { up(&hSemDeinitDrvHandle); } @@ -755,7 +755,7 @@ WILC_Sint32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) strWID.ps8WidVal = (u8 *)pu8IPAddr; strWID.s32ValueSize = IP_ALEN; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); @@ -799,7 +799,7 @@ WILC_Sint32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN); strWID.s32ValueSize = IP_ALEN; - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); PRINT_INFO(HOSTINF_DBG, "%d.%d.%d.%d\n", (u8)(strWID.ps8WidVal[0]), (u8)(strWID.ps8WidVal[1]), (u8)(strWID.ps8WidVal[2]), (u8)(strWID.ps8WidVal[3])); @@ -859,7 +859,7 @@ static WILC_Sint32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddres 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, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to set mac address\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -897,7 +897,7 @@ static WILC_Sint32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddres strWID.s32ValueSize = ETH_ALEN; /*Sending Cfg*/ - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)drvHandler); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_FALSE, (u32)drvHandler); if (s32Error) { PRINT_ER("Failed to get mac address\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -1205,7 +1205,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str } u8WidCnt++; } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Error in setting CFG params\n"); @@ -1249,8 +1249,8 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWIDList[5]; - WILC_Uint32 u32WidsCount = 0; - WILC_Uint32 i; + u32 u32WidsCount = 0; + u32 i; u8 *pu8Buffer; u8 valuesize = 0; u8 *pu8HdnNtwrksWidVal = NULL; @@ -1372,7 +1372,7 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs gbScanWhileConnected = WILC_FALSE; } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send scan paramters config packet\n"); @@ -1450,7 +1450,7 @@ static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) strWID.s32ValueSize = sizeof(WILC_Char); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to set abort running scan\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -1491,11 +1491,11 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWIDList[8]; - WILC_Uint32 u32WidsCount = 0, dummyval = 0; + u32 u32WidsCount = 0, dummyval = 0; /* char passphrase[] = "12345678"; */ #ifndef CONNECT_DIRECT WILC_Sint32 s32Err = WILC_SUCCESS; - WILC_Uint32 i; + u32 i; u8 u8bssDscListIndex; wid_site_survey_reslts_s *pstrSurveyResults = NULL; #else @@ -1649,7 +1649,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH /* ////////////////////// */ #endif - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Handle_Connect()] failed to send config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -1722,19 +1722,19 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH strWIDList[u32WidsCount].u16WIDid = WID_SUCCESS_FRAME_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; - strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Uint32); + strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(dummyval)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_RECEIVED_FRAGMENT_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; - strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Uint32); + strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(dummyval)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_FAILED_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; - strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Uint32); + strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(dummyval)); u32WidsCount++; @@ -1978,7 +1978,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH /*BugID_5137*/ if (WILC_memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7)) { memcpy(gu8FlushedJoinReq, pu8CurrByte, gu32FlushedJoinReqSize); - gu8FlushedJoinReqDrvHandler = (WILC_Uint32)pstrWFIDrv; + gu8FlushedJoinReqDrvHandler = (u32)pstrWFIDrv; } PRINT_D(GENERIC_DBG, "send HOST_IF_WAITING_CONN_RESP\n"); @@ -1990,7 +1990,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH PRINT_D(GENERIC_DBG, "save bssid = %x:%x:%x:%x:%x:%x\n", (u8ConnectedSSID[0]), (u8ConnectedSSID[1]), (u8ConnectedSSID[2]), (u8ConnectedSSID[3]), (u8ConnectedSSID[4]), (u8ConnectedSSID[5])); } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Handle_Connect()] failed to send config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -2081,7 +2081,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWIDList[5]; - WILC_Uint32 u32WidsCount = 0; + u32 u32WidsCount = 0; u8 *pu8CurrByte = NULL; @@ -2206,7 +2206,7 @@ static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) PRINT_D(HOSTINF_DBG, "Sending disconnect request\n"); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send dissconect config packet\n"); } @@ -2232,11 +2232,11 @@ static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) WILC_memset(u8ConnectedSSID, 0, ETH_ALEN); /*BugID_5213*/ /*Freeing flushed join request params on connect timeout*/ - if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (WILC_Uint32)drvHandler) { + if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { WILC_FREE(gu8FlushedJoinReq); gu8FlushedJoinReq = NULL; } - if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (WILC_Uint32)drvHandler) { + if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { WILC_FREE(gu8FlushedInfoElemAsoc); gu8FlushedInfoElemAsoc = NULL; } @@ -2255,7 +2255,7 @@ static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) */ static WILC_Sint32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdNetworkInfo) { - WILC_Uint32 i; + u32 i; WILC_Bool bNewNtwrkFound; @@ -2433,7 +2433,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI PRINT_INFO(HOSTINF_DBG, "Recieved MAC status = %d with Reason = %d , Info = %d\n", u8MacStatus, u8MacStatusReasonCode, u8MacStatusAdditionalInfo); if (pstrWFIDrv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) { /* our station had sent Association Request frame, so here it will get the Association Response frame then parse it */ - WILC_Uint32 u32RcvdAssocRespInfoLen; + u32 u32RcvdAssocRespInfoLen; tstrConnectRespInfo *pstrConnectRespInfo = NULL; PRINT_D(HOSTINF_DBG, "Recieved MAC status = %d with Reason = %d , Code = %d\n", u8MacStatus, u8MacStatusReasonCode, u8MacStatusAdditionalInfo); @@ -2657,11 +2657,11 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI /*BugID_5213*/ /*Freeing flushed join request params on receiving*/ /*MAC_DISCONNECTED while connected*/ - if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (WILC_Uint32)drvHandler) { + if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { WILC_FREE(gu8FlushedJoinReq); gu8FlushedJoinReq = NULL; } - if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (WILC_Uint32)drvHandler) { + if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { WILC_FREE(gu8FlushedInfoElemAsoc); gu8FlushedInfoElemAsoc = NULL; } @@ -2767,7 +2767,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[3].ps8WidVal = (WILC_Sint8 *)pu8keybuf; - s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, WILC_TRUE, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); @@ -2795,7 +2795,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWID.s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); } else if (pstrHostIFkeyAttr->u8KeyAction & REMOVEKEY) { @@ -2807,7 +2807,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.ps8WidVal = s8idxarray; strWID.s32ValueSize = 1; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); } else { strWID.u16WIDid = (u16)WID_KEY_ID; strWID.enuWIDtype = WID_CHAR; @@ -2816,7 +2816,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) PRINT_D(HOSTINF_DBG, "Setting default key index\n"); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); } up(&(pstrWFIDrv->hSemTestKeyBlock)); break; @@ -2862,7 +2862,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[1].ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWIDList[1].s32ValueSize = RX_MIC_KEY_MSG_LEN; - s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, WILC_TRUE, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); @@ -2909,7 +2909,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWID.s32ValueSize = RX_MIC_KEY_MSG_LEN; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); @@ -2966,7 +2966,7 @@ _WPARxGtk_end_case_: strWIDList[1].ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWIDList[1].s32ValueSize = PTK_KEY_MSG_LEN + 1; - s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, WILC_TRUE, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); /* ////////////////////////// */ @@ -3007,7 +3007,7 @@ _WPARxGtk_end_case_: strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWID.s32ValueSize = PTK_KEY_MSG_LEN; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); /* ////////////////////////// */ @@ -3046,7 +3046,7 @@ _WPAPtk_end_case_: strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; strWID.s32ValueSize = (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); break; @@ -3095,7 +3095,7 @@ static void Handle_Disconnect(void *drvHandler) WILC_memset(u8ConnectedSSID, 0, ETH_ALEN); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send dissconect config packet\n"); @@ -3159,11 +3159,11 @@ static void Handle_Disconnect(void *drvHandler) /*BugID_5137*/ - if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (WILC_Uint32)drvHandler) { + if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { WILC_FREE(gu8FlushedJoinReq); gu8FlushedJoinReq = NULL; } - if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (WILC_Uint32)drvHandler) { + if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) { WILC_FREE(gu8FlushedInfoElemAsoc); gu8FlushedInfoElemAsoc = NULL; } @@ -3208,7 +3208,7 @@ static WILC_Sint32 Switch_Log_Terminal(void *drvHandler) strWID.ps8WidVal = &dummy; strWID.s32ValueSize = sizeof(WILC_Char); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { @@ -3252,7 +3252,7 @@ static WILC_Sint32 Handle_GetChnl(void *drvHandler) PRINT_D(HOSTINF_DBG, "Getting channel value\n"); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { PRINT_ER("Failed to get channel number\n"); @@ -3296,7 +3296,7 @@ static void Handle_GetRssi(void *drvHandler) /*Sending Cfg*/ PRINT_D(HOSTINF_DBG, "Getting RSSI value\n"); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to get RSSI value\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -3327,7 +3327,7 @@ static void Handle_GetLinkspeed(void *drvHandler) /*Sending Cfg*/ PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n"); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to get LINKSPEED value\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -3361,23 +3361,23 @@ WILC_Sint32 Handle_GetStatistics(void *drvHandler, tstrStatistics *pstrStatistic strWIDList[u32WidsCount].u16WIDid = WID_SUCCESS_FRAME_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; - strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Uint32); + strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrStatistics->u32TxCount)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_RECEIVED_FRAGMENT_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; - strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Uint32); + strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrStatistics->u32RxCount)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_FAILED_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; - strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Uint32); + strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrStatistics->u32TxFailureCount)); u32WidsCount++; - s32Error = SendConfigPkt(GET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (WILC_Uint32)drvHandler); + s32Error = SendConfigPkt(GET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)drvHandler); if (s32Error) { PRINT_ER("Failed to send scan paramters config packet\n"); @@ -3425,7 +3425,7 @@ static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInacti PRINT_D(CFG80211_DBG, "SETING STA inactive time\n"); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { PRINT_ER("Failed to SET incative time\n"); @@ -3436,10 +3436,10 @@ static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInacti strWID.u16WIDid = (u16)WID_GET_INACTIVE_TIME; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Sint8 *)&gu32InactiveTime; - strWID.s32ValueSize = sizeof(WILC_Uint32); + strWID.s32ValueSize = sizeof(u32); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { PRINT_ER("Failed to get incative time\n"); @@ -3520,7 +3520,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send add beacon config packet\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -3565,7 +3565,7 @@ static void Handle_DelBeacon(void *drvHandler, tstrHostIFDelBeacon *pstrDelBeaco /* TODO: build del beacon message*/ /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send delete beacon config packet\n"); @@ -3587,7 +3587,7 @@ static void Handle_DelBeacon(void *drvHandler, tstrHostIFDelBeacon *pstrDelBeaco * @date * @version 1.0 */ -static WILC_Uint32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, tstrWILC_AddStaParam *pstrStationParam) +static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, tstrWILC_AddStaParam *pstrStationParam) { u8 *pu8CurrByte; @@ -3662,7 +3662,7 @@ static void Handle_AddStation(void *drvHandler, tstrWILC_AddStaParam *pstrStatio pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to send add station config packet\n"); @@ -3718,7 +3718,7 @@ static void Handle_DelAllSta(void *drvHandler, tstrHostIFDelAllSta *pstrDelAllSt } /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send add station config packe\n"); @@ -3766,7 +3766,7 @@ static void Handle_DelStation(void *drvHandler, tstrHostIFDelSta *pstrDelStaPara WILC_memcpy(pu8CurrByte, pstrDelStaParam->au8MacAddr, ETH_ALEN); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send add station config packe\n"); @@ -3810,7 +3810,7 @@ static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStati pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send edit station config packet\n"); @@ -3887,7 +3887,7 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos strWID.ps8WidVal[1] = (WILC_Sint8)pstrHostIfRemainOnChan->u16Channel; /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to set remain on channel\n"); } @@ -3945,7 +3945,7 @@ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrH /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to frame register config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -3970,7 +3970,7 @@ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrH * @version 1.0 */ #define FALSE_FRMWR_CHANNEL 100 -static WILC_Uint32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan) +static u32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan) { u8 u8remain_on_chan_flag; tstrWID strWID; @@ -3997,7 +3997,7 @@ static WILC_Uint32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainO strWID.ps8WidVal[1] = FALSE_FRMWR_CHANNEL; /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to set remain on channel\n"); goto _done_; @@ -4083,7 +4083,7 @@ static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *s PRINT_D(HOSTINF_DBG, "Handling Power Management\n"); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send power management config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -4135,7 +4135,7 @@ static void Handle_SetMulticastFilter(void *drvHandler, tstrHostIFSetMulti *strH memcpy(pu8CurrByte, gau8MulticastMacAddrList, ((strHostIfSetMulti->u32count) * ETH_ALEN)); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (WILC_Uint32)drvHandler); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)drvHandler); if (s32Error) { PRINT_ER("Failed to send setup multicast config packet\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -4203,7 +4203,7 @@ static WILC_Sint32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo /* Group Buffer Timeout */ *ptr++ = 0; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) PRINT_D(HOSTINF_DBG, "Couldn't open BA Session\n"); @@ -4227,7 +4227,7 @@ static WILC_Sint32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo *ptr++ = ((strHostIfBASessionInfo->u16SessionTimeout >> 16) & 0xFF); /*Ack-Policy */ *ptr++ = 3; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (strWID.ps8WidVal != NULL) WILC_FREE(strWID.ps8WidVal); @@ -4277,7 +4277,7 @@ static WILC_Sint32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo /* Delba Reason */ *ptr++ = 32; /* Unspecific QOS reason */ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n"); @@ -4295,7 +4295,7 @@ static WILC_Sint32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo /* TID*/ *ptr++ = strHostIfBASessionInfo->u8Ted; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (strWID.ps8WidVal != NULL) WILC_FREE(strWID.ps8WidVal); @@ -4346,7 +4346,7 @@ static WILC_Sint32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessi /* Delba Reason */ *ptr++ = 32; /* Unspecific QOS reason */ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n"); @@ -4372,7 +4372,7 @@ static WILC_Sint32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessi */ static int hostIFthread(void *pvArg) { - WILC_Uint32 u32Ret; + u32 u32Ret; tstrHostIFmsg strHostIFmsg; tstrWILC_WFIDrv *pstrWFIDrv; @@ -4919,7 +4919,7 @@ WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8P tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; u8 u8KeyLen = u8PtkKeylen; - WILC_Uint32 i; + u32 i; if (pstrWFIDrv == NULL) { WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); } @@ -5015,7 +5015,7 @@ WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8P * @version 1.0 */ WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen, - u8 u8KeyIdx, WILC_Uint32 u32KeyRSClen, const u8 *KeyRSC, + u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -5187,7 +5187,7 @@ WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAt WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; - WILC_Uint32 i; + u32 i; if (pstrWFIDrv == NULL) { @@ -5246,7 +5246,7 @@ WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAt * @version 1.0 */ WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoArray, - WILC_Uint32 u32PmkidInfoLen) + u32 u32PmkidInfoLen) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -5427,7 +5427,7 @@ WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, #ifndef CONNECT_DIRECT WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], - WILC_Uint32 u32MaxSiteSrvyFragLen) + u32 u32MaxSiteSrvyFragLen) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID astrWIDList[2]; @@ -5443,7 +5443,7 @@ WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, astrWIDList[1].ps8WidVal = ppu8RcvdSiteSurveyResults[1]; astrWIDList[1].s32ValueSize = u32MaxSiteSrvyFragLen; - s32Error = SendConfigPkt(GET_CFG, astrWIDList, 2, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, astrWIDList, 2, WILC_TRUE, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { @@ -5766,7 +5766,7 @@ WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id) */ WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocReqInfo, - WILC_Uint32 u32AssocReqInfoLen) + u32 u32AssocReqInfoLen) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -5793,7 +5793,7 @@ WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR * @version 1.0 */ WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo, - WILC_Uint32 u32MaxAssocRespInfoLen, WILC_Uint32 *pu32RcvdAssocRespInfoLen) + u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -5811,7 +5811,7 @@ WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR /* Sending Configuration packet */ - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send association response config packet\n"); *pu32RcvdAssocRespInfoLen = 0; @@ -5843,7 +5843,7 @@ WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR * @version 1.0 */ WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowerLevel, - WILC_Uint32 u32RxPowerLevelLen) + u32 u32RxPowerLevelLen) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -5928,7 +5928,7 @@ WILC_Sint32 host_int_wait_msg_queue_idle(void) } -WILC_Sint32 host_int_set_wfi_drv_handler(WILC_Uint32 u32address) +WILC_Sint32 host_int_set_wfi_drv_handler(u32 u32address) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -5956,7 +5956,7 @@ WILC_Sint32 host_int_set_wfi_drv_handler(WILC_Uint32 u32address) -WILC_Sint32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32mode) +WILC_Sint32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -6036,14 +6036,14 @@ WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo) /** * @brief host_int_test_set_int_wid * @details Test function for setting wids - * @param[in,out] WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32TestMemAddr + * @param[in,out] WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemAddr * @return Error code indicating success/failure * @note * @author zsalah * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32TestMemAddr) +WILC_Sint32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemAddr) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; @@ -6059,10 +6059,10 @@ WILC_Sint32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32 strWID.u16WIDid = (u16)WID_MEMORY_ADDRESS; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Char *)&u32TestMemAddr; - strWID.s32ValueSize = sizeof(WILC_Uint32); + strWID.s32ValueSize = sizeof(u32); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Test Function: Failed to set wid value\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -6090,7 +6090,7 @@ WILC_Sint32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32 * @date * @version 1.0 */ -WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, WILC_Uint32 *pu32InactiveTime) +WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, u32 *pu32InactiveTime) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -6129,14 +6129,14 @@ WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, /** * @brief host_int_test_get_int_wid * @details Test function for getting wids - * @param[in,out] WILC_WFIDrvHandle hWFIDrv, WILC_Uint32* pu32TestMemAddr + * @param[in,out] WILC_WFIDrvHandle hWFIDrv, u32* pu32TestMemAddr * @return Error code indicating success/failure * @note * @author zsalah * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 *pu32TestMemAddr) +WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMemAddr) { WILC_Sint32 s32Error = WILC_SUCCESS; @@ -6152,9 +6152,9 @@ WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 *pu strWID.u16WIDid = (u16)WID_MEMORY_ADDRESS; strWID.enuWIDtype = WID_INT; strWID.ps8WidVal = (WILC_Sint8 *)pu32TestMemAddr; - strWID.s32ValueSize = sizeof(WILC_Uint32); + strWID.s32ValueSize = sizeof(u32); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (WILC_Uint32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { PRINT_ER("Test Function: Failed to get wid value\n"); @@ -6590,9 +6590,9 @@ void host_int_send_network_info_to_host * @date 8 March 2012 * @version 1.0 */ -static WILC_Uint32 u32Intialized; -static WILC_Uint32 msgQ_created; -static WILC_Uint32 clients_count; +static u32 u32Intialized; +static u32 msgQ_created; +static u32 clients_count; WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) { @@ -6837,7 +6837,7 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) WILC_TimerDestroy(&(pstrWFIDrv->hRemainOnChannel), NULL); #endif - host_int_set_wfi_drv_handler((WILC_Uint32)NULL); + host_int_set_wfi_drv_handler((u32)NULL); down(&hSemDeinitDrvHandle); @@ -6914,11 +6914,11 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) * @date 1 Mar 2012 * @version 1.0 */ -void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) +void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; - WILC_Uint32 drvHandler; + u32 drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24)); @@ -6964,11 +6964,11 @@ void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) * @date 15 Mar 2012 * @version 1.0 */ -void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) +void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; - WILC_Uint32 drvHandler; + u32 drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; /*BugID_5348*/ @@ -7021,17 +7021,17 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) /** * @brief host_int_ScanCompleteReceived * @details Setting scan complete received notifcation in message queue - * @param[in] u8* pu8Buffer, WILC_Uint32 u32Length + * @param[in] u8* pu8Buffer, u32 u32Length * @return Error code. * @author * @date * @version 1.0 */ -void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) +void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; - WILC_Uint32 drvHandler; + u32 drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24)); pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -7087,7 +7087,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length) * @date * @version 1.0 */ -WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32SessionID, WILC_Uint32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg) +WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7136,7 +7136,7 @@ WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u3 * @date * @version 1.0 */ -WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32SessionID) +WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7226,18 +7226,18 @@ WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, /** * @brief host_int_add_beacon * @details Setting add beacon params in message queue - * @param[in] WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interval, - * WILC_Uint32 u32DTIMPeriod,WILC_Uint32 u32HeadLen, u8* pu8Head, - * WILC_Uint32 u32TailLen, u8* pu8Tail + * @param[in] WILC_WFIDrvHandle hWFIDrv, u32 u32Interval, + * u32 u32DTIMPeriod,u32 u32HeadLen, u8* pu8Head, + * u32 u32TailLen, u8* pu8Tail * @return Error code. * @author * @date * @version 1.0 */ -WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interval, - WILC_Uint32 u32DTIMPeriod, - WILC_Uint32 u32HeadLen, u8 *pu8Head, - WILC_Uint32 u32TailLen, u8 *pu8Tail) +WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 u32Interval, + u32 u32DTIMPeriod, + u32 u32HeadLen, u8 *pu8Head, + u32 u32TailLen, u8 *pu8Tail) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7445,7 +7445,7 @@ WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][E tstrHostIFmsg strHostIFmsg; tstrHostIFDelAllSta *pstrDelAllStationMsg = &strHostIFmsg.uniHostIFmsgBody.strHostIFDelAllSta; u8 au8Zero_Buff[ETH_ALEN] = {0}; - WILC_Uint32 i; + u32 i; u8 u8AssocNumb = 0; @@ -7542,7 +7542,7 @@ WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaPara #endif /*WILC_AP_EXTERNAL_MLME*/ uint32_t wilc_get_chipid(uint8_t); -WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, WILC_Uint32 u32Timeout) +WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7578,7 +7578,7 @@ WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnab return s32Error; } -WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, WILC_Uint32 u32count) +WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32count) { WILC_Sint32 s32Error = WILC_SUCCESS; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index c6ff07aa1df8..85eb3f40e9d0 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -62,9 +62,9 @@ #define IP_ALEN 4 -#define BIT2 ((WILC_Uint32)(1 << 2)) -#define BIT1 ((WILC_Uint32)(1 << 1)) -#define BIT0 ((WILC_Uint32)(1 << 0)) +#define BIT2 ((u32)(1 << 2)) +#define BIT1 ((u32)(1 << 1)) +#define BIT0 ((u32)(1 << 0)) #define AP_MODE 0x01 #define STATION_MODE 0x02 @@ -134,9 +134,9 @@ typedef struct { typedef struct _tstrStatistics { u8 u8LinkSpeed; WILC_Sint8 s8RSSI; - WILC_Uint32 u32TxCount; - WILC_Uint32 u32RxCount; - WILC_Uint32 u32TxFailureCount; + u32 u32TxCount; + u32 u32RxCount; + u32 u32TxFailureCount; } tstrStatistics; @@ -189,7 +189,7 @@ typedef enum { } CURRENT_TX_RATE_T; typedef struct { - WILC_Uint32 u32SetCfgFlag; + u32 u32SetCfgFlag; u8 ht_enable; u8 bss_type; u8 auth_type; @@ -271,11 +271,11 @@ typedef void (*tWILCpfConnectResult)(tenuConnDisconnEvent, void *); #ifdef WILC_P2P -typedef void (*tWILCpfRemainOnChanExpired)(void *, WILC_Uint32); /*Remain on channel expiration callback function*/ +typedef void (*tWILCpfRemainOnChanExpired)(void *, u32); /*Remain on channel expiration callback function*/ typedef void (*tWILCpfRemainOnChanReady)(void *); /*Remain on channel callback function*/ #endif -/* typedef WILC_Uint32 WILC_WFIDrvHandle; */ +/* typedef u32 WILC_WFIDrvHandle; */ typedef struct { WILC_Sint32 s32Dummy; } *WILC_WFIDrvHandle; @@ -292,7 +292,7 @@ typedef struct { */ typedef struct _tstrRcvdNetworkInfo { u8 *pu8Buffer; - WILC_Uint32 u32Length; + u32 u32Length; } tstrRcvdNetworkInfo; /*BugID_4156*/ @@ -316,7 +316,7 @@ typedef struct { /* User specific parameter to be delivered through the Scan User Callback function */ void *u32UserScanPvoid; - WILC_Uint32 u32RcvdChCount; + u32 u32RcvdChCount; tstrFoundNetworkInfo astrFoundNetworkInfo[MAX_NUM_SCANNED_NETWORKS]; } tstrWILC_UsrScanReq; @@ -336,11 +336,11 @@ typedef struct { } tstrWILC_UsrConnReq; typedef struct { - WILC_Uint32 u32Address; + u32 u32Address; } tstrHostIfSetDrvHandler; typedef struct { - WILC_Uint32 u32Mode; + u32 u32Mode; } tstrHostIfSetOperationMode; /*BugID_5077*/ @@ -364,11 +364,11 @@ typedef struct { #ifdef WILC_P2P typedef struct { u16 u16Channel; - WILC_Uint32 u32duration; + u32 u32duration; tWILCpfRemainOnChanExpired pRemainOnChanExpired; tWILCpfRemainOnChanReady pRemainOnChanReady; void *pVoid; - WILC_Uint32 u32ListenSessionID; + u32 u32ListenSessionID; } tstrHostIfRemainOnChan; typedef struct { @@ -415,7 +415,7 @@ typedef struct { /* WILC_Bool bPendingConnRequest; */ #ifndef CONNECT_DIRECT - WILC_Uint32 u32SurveyResultsCount; + u32 u32SurveyResultsCount; wid_site_survey_reslts_s astrSurveyResults[MAX_NUM_SCANNED_NETWORKS]; #endif @@ -470,7 +470,7 @@ typedef struct { u8 u8AmpduParams; u8 au8SuppMCsSet[16]; u16 u16HTExtParams; - WILC_Uint32 u32TxBeamformingCap; + u32 u32TxBeamformingCap; u8 u8ASELCap; u16 u16FlagsMask; /**/ u16 u16FlagsSet; /*oup.wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0)) goto _fail_; @@ -1364,7 +1364,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, (WILC_Uint32)pstrWFIDrv)) + if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_IMMEDIATE_BA_ENABLED, c_val, 1, 1, (u32)pstrWFIDrv)) goto _fail_; return 0; @@ -2100,7 +2100,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 = (WILC_Uint32)priv->hWILCWFIDrv; + g_linux_wlan->strInterfaceInfo[i].drvHandler = (u32)priv->hWILCWFIDrv; break; } } @@ -2376,7 +2376,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) u8 *buff = NULL; WILC_Sint8 rssi; - WILC_Uint32 size = 0, length = 0; + u32 size = 0, length = 0; perInterface_wlan_t *nic; struct WILC_WFI_priv *priv; WILC_Sint32 s32Error = WILC_SUCCESS; diff --git a/drivers/staging/wilc1000/wilc_memory.c b/drivers/staging/wilc1000/wilc_memory.c index f44827528667..2282951eb574 100644 --- a/drivers/staging/wilc1000/wilc_memory.c +++ b/drivers/staging/wilc1000/wilc_memory.c @@ -6,8 +6,8 @@ * @date 18 Aug 2010 * @version 1.0 */ -void *WILC_MemoryAlloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, - WILC_Char *pcFileName, WILC_Uint32 u32LineNo) +void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs, + WILC_Char *pcFileName, u32 u32LineNo) { if (u32Size > 0) { return kmalloc(u32Size, GFP_ATOMIC); @@ -21,8 +21,8 @@ void *WILC_MemoryAlloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, * @date 18 Aug 2010 * @version 1.0 */ -void *WILC_MemoryCalloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, - WILC_Char *pcFileName, WILC_Uint32 u32LineNo) +void *WILC_MemoryCalloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs, + WILC_Char *pcFileName, u32 u32LineNo) { return kcalloc(u32Size, 1, GFP_KERNEL); } @@ -32,8 +32,8 @@ void *WILC_MemoryCalloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, * @date 18 Aug 2010 * @version 1.0 */ -void *WILC_MemoryRealloc(void *pvOldBlock, WILC_Uint32 u32NewSize, - tstrWILC_MemoryAttrs *strAttrs, WILC_Char *pcFileName, WILC_Uint32 u32LineNo) +void *WILC_MemoryRealloc(void *pvOldBlock, u32 u32NewSize, + tstrWILC_MemoryAttrs *strAttrs, WILC_Char *pcFileName, u32 u32LineNo) { if (u32NewSize == 0) { kfree(pvOldBlock); @@ -52,7 +52,7 @@ void *WILC_MemoryRealloc(void *pvOldBlock, WILC_Uint32 u32NewSize, * @version 1.0 */ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, - WILC_Char *pcFileName, WILC_Uint32 u32LineNo) + WILC_Char *pcFileName, u32 u32LineNo) { kfree(pvBlock); } diff --git a/drivers/staging/wilc1000/wilc_memory.h b/drivers/staging/wilc1000/wilc_memory.h index 6f404ac272a1..8a2be8ae7739 100644 --- a/drivers/staging/wilc1000/wilc_memory.h +++ b/drivers/staging/wilc1000/wilc_memory.h @@ -41,8 +41,8 @@ typedef struct { * @date 16 Aug 2010 * @version 1.0 */ -void *WILC_MemoryAlloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, - WILC_Char *pcFileName, WILC_Uint32 u32LineNo); +void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs, + WILC_Char *pcFileName, u32 u32LineNo); /*! * @brief Allocates a given size of bytes and zero filling it @@ -65,8 +65,8 @@ void *WILC_MemoryAlloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, * @date 16 Aug 2010 * @version 1.0 */ -void *WILC_MemoryCalloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, - WILC_Char *pcFileName, WILC_Uint32 u32LineNo); +void *WILC_MemoryCalloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs, + WILC_Char *pcFileName, u32 u32LineNo); /*! * @brief Reallocates a given block to a new size @@ -93,8 +93,8 @@ void *WILC_MemoryCalloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs, * @date 16 Aug 2010 * @version 1.0 */ -void *WILC_MemoryRealloc(void *pvOldBlock, WILC_Uint32 u32NewSize, - tstrWILC_MemoryAttrs *strAttrs, WILC_Char *pcFileName, WILC_Uint32 u32LineNo); +void *WILC_MemoryRealloc(void *pvOldBlock, u32 u32NewSize, + tstrWILC_MemoryAttrs *strAttrs, WILC_Char *pcFileName, u32 u32LineNo); /*! * @brief Frees given block @@ -114,7 +114,7 @@ void *WILC_MemoryRealloc(void *pvOldBlock, WILC_Uint32 u32NewSize, * @version 1.0 */ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, - WILC_Char *pcFileName, WILC_Uint32 u32LineNo); + WILC_Char *pcFileName, u32 u32LineNo); /*! * @brief standrad malloc wrapper with custom attributes @@ -149,7 +149,7 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, */ #define WILC_NEW_EX(__struct_type__, __n_structs__, __attrs__) \ ((__struct_type__ *)WILC_MALLOC_EX( \ - sizeof(__struct_type__) * (WILC_Uint32)(__n_structs__), __attrs__)) + sizeof(__struct_type__) * (u32)(__n_structs__), __attrs__)) /*! * @brief Allocates a block (with custom attributes) of given type and number of @@ -157,7 +157,7 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, */ #define WILC_NEW_0_EX(__struct_type__, __n_structs__, __attrs__) \ ((__struct_type__ *)WILC_CALLOC_EX( \ - sizeof(__struct_type__) * (WILC_Uint32)(__n_structs__), __attrs__)) + sizeof(__struct_type__) * (u32)(__n_structs__), __attrs__)) /*! * @brief Frees a block (with custom attributes), also setting the original pointer diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index ebbba8b24de0..8531bf1adb78 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -53,7 +53,7 @@ WILC_ErrNo WILC_MsgQueueDestroy(WILC_MsgQueueHandle *pHandle, * @version 1.0 */ WILC_ErrNo WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle, - const void *pvSendBuffer, WILC_Uint32 u32SendBufferSize, + const void *pvSendBuffer, u32 u32SendBufferSize, tstrWILC_MsgQueueAttrs *pstrAttrs) { WILC_ErrNo s32RetStatus = WILC_SUCCESS; @@ -118,8 +118,8 @@ WILC_ErrNo WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle, * @version 1.0 */ WILC_ErrNo WILC_MsgQueueRecv(WILC_MsgQueueHandle *pHandle, - void *pvRecvBuffer, WILC_Uint32 u32RecvBufferSize, - WILC_Uint32 *pu32ReceivedLength, + void *pvRecvBuffer, u32 u32RecvBufferSize, + u32 *pu32ReceivedLength, tstrWILC_MsgQueueAttrs *pstrAttrs) { diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h index d7e4b1ce3497..2ca02db95ee2 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.h +++ b/drivers/staging/wilc1000/wilc_msgqueue.h @@ -58,7 +58,7 @@ WILC_ErrNo WILC_MsgQueueCreate(WILC_MsgQueueHandle *pHandle, * @version 1.0 */ WILC_ErrNo WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle, - const void *pvSendBuffer, WILC_Uint32 u32SendBufferSize, + const void *pvSendBuffer, u32 u32SendBufferSize, tstrWILC_MsgQueueAttrs *pstrAttrs); @@ -80,8 +80,8 @@ WILC_ErrNo WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle, * @version 1.0 */ WILC_ErrNo WILC_MsgQueueRecv(WILC_MsgQueueHandle *pHandle, - void *pvRecvBuffer, WILC_Uint32 u32RecvBufferSize, - WILC_Uint32 *pu32ReceivedLength, + void *pvRecvBuffer, u32 u32RecvBufferSize, + u32 *pu32ReceivedLength, tstrWILC_MsgQueueAttrs *pstrAttrs); diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h index 2e873b6942b6..964e818b24a8 100644 --- a/drivers/staging/wilc1000/wilc_oswrapper.h +++ b/drivers/staging/wilc1000/wilc_oswrapper.h @@ -14,7 +14,6 @@ #define WILC_OSW_INTERFACE_VER 2 /* Integer Types */ -typedef unsigned int WILC_Uint32; typedef unsigned long long WILC_Uint64; typedef signed char WILC_Sint8; typedef signed short WILC_Sint16; diff --git a/drivers/staging/wilc1000/wilc_platform.h b/drivers/staging/wilc1000/wilc_platform.h index ae42bbcbd5eb..e185eb32024b 100644 --- a/drivers/staging/wilc1000/wilc_platform.h +++ b/drivers/staging/wilc1000/wilc_platform.h @@ -23,7 +23,7 @@ typedef struct timer_list WILC_TimerHandle; /* Message Queue type is a structure */ typedef struct __Message_struct { void *pvBuffer; - WILC_Uint32 u32Length; + u32 u32Length; struct __Message_struct *pstrNext; } Message; @@ -31,7 +31,7 @@ typedef struct __MessageQueue_struct { struct semaphore hSem; spinlock_t strCriticalSection; WILC_Bool bExiting; - WILC_Uint32 u32ReceiversCount; + u32 u32ReceiversCount; Message *pstrMessageList; } WILC_MsgQueueHandle; diff --git a/drivers/staging/wilc1000/wilc_sleep.c b/drivers/staging/wilc1000/wilc_sleep.c index 98a079f3d6c9..569b833a71e9 100644 --- a/drivers/staging/wilc1000/wilc_sleep.c +++ b/drivers/staging/wilc1000/wilc_sleep.c @@ -6,10 +6,10 @@ * @date 10 Aug 2010 * @version 1.0 */ -void WILC_Sleep(WILC_Uint32 u32TimeMilliSec) +void WILC_Sleep(u32 u32TimeMilliSec) { if (u32TimeMilliSec <= 4000000) { - WILC_Uint32 u32Temp = u32TimeMilliSec * 1000; + u32 u32Temp = u32TimeMilliSec * 1000; usleep_range(u32Temp, u32Temp); } else { msleep(u32TimeMilliSec); diff --git a/drivers/staging/wilc1000/wilc_sleep.h b/drivers/staging/wilc1000/wilc_sleep.h index 2865c8e44346..261f4ede338c 100644 --- a/drivers/staging/wilc1000/wilc_sleep.h +++ b/drivers/staging/wilc1000/wilc_sleep.h @@ -12,6 +12,6 @@ * sleep, for accurate high resolution sleep use u32TimeMicoSec */ /* TODO: remove and open-code in callers */ -void WILC_Sleep(WILC_Uint32 u32TimeMilliSec); +void WILC_Sleep(u32 u32TimeMilliSec); #endif diff --git a/drivers/staging/wilc1000/wilc_strutils.c b/drivers/staging/wilc1000/wilc_strutils.c index c6af13cba543..52df793e0a37 100644 --- a/drivers/staging/wilc1000/wilc_strutils.c +++ b/drivers/staging/wilc1000/wilc_strutils.c @@ -9,7 +9,7 @@ * @date 18 Aug 2010 * @version 1.0 */ -WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, WILC_Uint32 u32Count) +WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, u32 u32Count) { return memcmp(pvArg1, pvArg2, u32Count); } @@ -20,7 +20,7 @@ WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, WILC_Uint32 u32C * @date 18 Aug 2010 * @version 1.0 */ -void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, WILC_Uint32 u32Count) +void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, u32 u32Count) { memcpy(pvTarget, pvSource, u32Count); } @@ -30,7 +30,7 @@ void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, WILC_Uint32 u32C * @date 18 Aug 2010 * @version 1.0 */ -void *WILC_memset(void *pvTarget, u8 u8SetValue, WILC_Uint32 u32Count) +void *WILC_memset(void *pvTarget, u8 u8SetValue, u32 u32Count) { return memset(pvTarget, u8SetValue, u32Count); } @@ -41,13 +41,13 @@ void *WILC_memset(void *pvTarget, u8 u8SetValue, WILC_Uint32 u32Count) * @version 1.0 */ WILC_Char *WILC_strncpy(WILC_Char *pcTarget, const WILC_Char *pcSource, - WILC_Uint32 u32Count) + u32 u32Count) { return strncpy(pcTarget, pcSource, u32Count); } WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, - WILC_Uint32 u32Count) + u32 u32Count) { WILC_Sint32 s32Result; @@ -74,7 +74,7 @@ WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, * @date 18 Aug 2010 * @version 1.0 */ -WILC_Uint32 WILC_strlen(const WILC_Char *pcStr) +u32 WILC_strlen(const WILC_Char *pcStr) { - return (WILC_Uint32)strlen(pcStr); + return (u32)strlen(pcStr); } diff --git a/drivers/staging/wilc1000/wilc_strutils.h b/drivers/staging/wilc1000/wilc_strutils.h index ddc54ab21f67..6d9b400ecc18 100644 --- a/drivers/staging/wilc1000/wilc_strutils.h +++ b/drivers/staging/wilc1000/wilc_strutils.h @@ -22,7 +22,7 @@ * @date 18 Aug 2010 * @version 1.0 */ -WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, WILC_Uint32 u32Count); +WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, u32 u32Count); /*! * @brief Internal implementation for memory copy @@ -34,7 +34,7 @@ WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, WILC_Uint32 u32C * @date 18 Aug 2010 * @version 1.0 */ -void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, WILC_Uint32 u32Count); +void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, u32 u32Count); /*! * @brief Copies the contents of a memory buffer into another @@ -50,7 +50,7 @@ void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, WILC_Uint32 u32C * @date 18 Aug 2010 * @version 1.0 */ -static WILC_ErrNo WILC_memcpy(void *pvTarget, const void *pvSource, WILC_Uint32 u32Count) +static WILC_ErrNo WILC_memcpy(void *pvTarget, const void *pvSource, u32 u32Count) { if ( (((u8 *)pvTarget <= (u8 *)pvSource) @@ -78,7 +78,7 @@ static WILC_ErrNo WILC_memcpy(void *pvTarget, const void *pvSource, WILC_Uint32 * @date 18 Aug 2010 * @version 1.0 */ -void *WILC_memset(void *pvTarget, u8 u8SetValue, WILC_Uint32 u32Count); +void *WILC_memset(void *pvTarget, u8 u8SetValue, u32 u32Count); /*! * @brief copies the contents of source string into the target string @@ -93,7 +93,7 @@ void *WILC_memset(void *pvTarget, u8 u8SetValue, WILC_Uint32 u32Count); * @version 1.0 */ WILC_Char *WILC_strncpy(WILC_Char *pcTarget, const WILC_Char *pcSource, - WILC_Uint32 u32Count); + u32 u32Count); /*! * @brief Compares two strings up to u32Count characters @@ -114,7 +114,7 @@ WILC_Char *WILC_strncpy(WILC_Char *pcTarget, const WILC_Char *pcSource, * @version 1.0 */ WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, - WILC_Uint32 u32Count); + u32 u32Count); /*! * @brief gets the length of a string @@ -125,6 +125,6 @@ WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, * @date 18 Aug 2010 * @version 1.0 */ -WILC_Uint32 WILC_strlen(const WILC_Char *pcStr); +u32 WILC_strlen(const WILC_Char *pcStr); #endif diff --git a/drivers/staging/wilc1000/wilc_timer.c b/drivers/staging/wilc1000/wilc_timer.c index 7d2e6f19c00b..c31bf0c5e590 100644 --- a/drivers/staging/wilc1000/wilc_timer.c +++ b/drivers/staging/wilc1000/wilc_timer.c @@ -23,7 +23,7 @@ WILC_ErrNo WILC_TimerDestroy(WILC_TimerHandle *pHandle, } -WILC_ErrNo WILC_TimerStart(WILC_TimerHandle *pHandle, WILC_Uint32 u32Timeout, +WILC_ErrNo WILC_TimerStart(WILC_TimerHandle *pHandle, u32 u32Timeout, void *pvArg, tstrWILC_TimerAttrs *pstrAttrs) { WILC_ErrNo s32RetStatus = WILC_FAIL; diff --git a/drivers/staging/wilc1000/wilc_timer.h b/drivers/staging/wilc1000/wilc_timer.h index 72b27155293e..72efa85ade2d 100644 --- a/drivers/staging/wilc1000/wilc_timer.h +++ b/drivers/staging/wilc1000/wilc_timer.h @@ -96,7 +96,7 @@ WILC_ErrNo WILC_TimerDestroy(WILC_TimerHandle *pHandle, * @date 16 Aug 2010 * @version 1.0 */ -WILC_ErrNo WILC_TimerStart(WILC_TimerHandle *pHandle, WILC_Uint32 u32Timeout, void *pvArg, +WILC_ErrNo WILC_TimerStart(WILC_TimerHandle *pHandle, u32 u32Timeout, void *pvArg, tstrWILC_TimerAttrs *pstrAttrs); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index a2047e3b6050..f330876e465b 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -31,7 +31,7 @@ extern int mac_open(struct net_device *ndev); extern int mac_close(struct net_device *ndev); tstrNetworkInfo astrLastScannedNtwrksShadow[MAX_NUM_SCANNED_NETWORKS_SHADOW]; -WILC_Uint32 u32LastScannedNtwrksCountShadow; +u32 u32LastScannedNtwrksCountShadow; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP WILC_TimerHandle hDuringIpTimer; #endif @@ -438,7 +438,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo PRINT_ER("Discovered networks exceeded the max limit\n"); } } else { - WILC_Uint32 i; + u32 i; /* So this network is discovered before, we'll just update its RSSI */ for (i = 0; i < priv->u32RcvdChCount; i++) { if (WILC_memcmp(astrLastScannedNtwrksShadow[i].au8bssid, pstrNetworkInfo->au8bssid, 6) == 0) { @@ -509,7 +509,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo */ int WILC_WFI_Set_PMKSA(u8 *bssid, struct WILC_WFI_priv *priv) { - WILC_Uint32 i; + u32 i; WILC_Sint32 s32Error = WILC_SUCCESS; @@ -600,7 +600,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, if (u16ConnectStatus == WLAN_STATUS_SUCCESS) { WILC_Bool bNeedScanRefresh = WILC_FALSE; - WILC_Uint32 i; + u32 i; PRINT_INFO(CFG80211_DBG, "Connection Successful:: BSSID: %x%x%x%x%x%x\n", pstrConnectInfo->au8bssid[0], pstrConnectInfo->au8bssid[1], pstrConnectInfo->au8bssid[2], pstrConnectInfo->au8bssid[3], pstrConnectInfo->au8bssid[4], pstrConnectInfo->au8bssid[5]); @@ -699,7 +699,7 @@ static int WILC_WFI_CfgSetChannel(struct wiphy *wiphy, struct cfg80211_chan_def *chandef) { - WILC_Uint32 channelnum = 0; + u32 channelnum = 0; struct WILC_WFI_priv *priv; WILC_Sint32 s32Error = WILC_SUCCESS; priv = wiphy_priv(wiphy); @@ -736,7 +736,7 @@ static int WILC_WFI_CfgSetChannel(struct wiphy *wiphy, static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *request) { struct WILC_WFI_priv *priv; - WILC_Uint32 i; + u32 i; WILC_Sint32 s32Error = WILC_SUCCESS; u8 au8ScanChanList[MAX_NUM_SCANNED_NETWORKS]; tstrHiddenNetwork strHiddenNetwork; @@ -747,7 +747,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r priv->u32RcvdChCount = 0; - host_int_set_wfi_drv_handler((WILC_Uint32)priv->hWILCWFIDrv); + host_int_set_wfi_drv_handler((u32)priv->hWILCWFIDrv); reset_shadow_found(priv); @@ -826,7 +826,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme) { WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Uint32 i; + u32 i; u8 u8security = NO_ENCRYPT; AUTHTYPE_T tenuAuth_type = ANY; WILC_Char *pcgroup_encrypt_val = NULL; @@ -842,7 +842,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((WILC_Uint32)priv->hWILCWFIDrv); + host_int_set_wfi_drv_handler((u32)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 @@ -1131,7 +1131,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k { WILC_Sint32 s32Error = WILC_SUCCESS, KeyLen = params->key_len; - WILC_Uint32 i; + u32 i; struct WILC_WFI_priv *priv; const u8 *pu8RxMic = NULL; const u8 *pu8TxMic = NULL; @@ -1538,7 +1538,7 @@ static int WILC_WFI_get_key(struct wiphy *wiphy, struct net_device *netdev, u8 k struct WILC_WFI_priv *priv; struct key_params key_params; - WILC_Uint32 i; + u32 i; priv = wiphy_priv(wiphy); @@ -1641,9 +1641,9 @@ static int WILC_WFI_get_station(struct wiphy *wiphy, struct net_device *dev, struct WILC_WFI_priv *priv; perInterface_wlan_t *nic; #ifdef WILC_AP_EXTERNAL_MLME - WILC_Uint32 i = 0; - WILC_Uint32 associatedsta = 0; - WILC_Uint32 inactive_time = 0; + u32 i = 0; + u32 associatedsta = 0; + u32 inactive_time = 0; #endif priv = wiphy_priv(wiphy); nic = netdev_priv(dev); @@ -1899,7 +1899,7 @@ static int WILC_WFI_set_bitrate_mask(struct wiphy *wiphy, static int WILC_WFI_set_pmksa(struct wiphy *wiphy, struct net_device *netdev, struct cfg80211_pmksa *pmksa) { - WILC_Uint32 i; + u32 i; WILC_Sint32 s32Error = WILC_SUCCESS; u8 flag = 0; @@ -1950,7 +1950,7 @@ static int WILC_WFI_del_pmksa(struct wiphy *wiphy, struct net_device *netdev, struct cfg80211_pmksa *pmksa) { - WILC_Uint32 i; + u32 i; u8 flag = 0; WILC_Sint32 s32Error = WILC_SUCCESS; @@ -2023,10 +2023,10 @@ static int WILC_WFI_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev) * @version */ -void WILC_WFI_CfgParseRxAction(u8 *buf, WILC_Uint32 len) +void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len) { - WILC_Uint32 index = 0; - WILC_Uint32 i = 0, j = 0; + u32 index = 0; + u32 i = 0, j = 0; /*BugID_5460*/ #ifdef USE_SUPPLICANT_GO_INTENT @@ -2119,10 +2119,10 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, WILC_Uint32 len) * @date 12 DEC 2012 * @version */ -void WILC_WFI_CfgParseTxAction(u8 *buf, WILC_Uint32 len, WILC_Bool bOperChan, u8 iftype) +void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, WILC_Bool bOperChan, u8 iftype) { - WILC_Uint32 index = 0; - WILC_Uint32 i = 0, j = 0; + u32 index = 0; + u32 i = 0, j = 0; u8 op_channel_attr_index = 0; u8 channel_list_attr_index = 0; @@ -2210,9 +2210,9 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) { struct WILC_WFI_priv *priv; - WILC_Uint32 header, pkt_offset; + u32 header, pkt_offset; tstrWILC_WFIDrv *pstrWFIDrv; - WILC_Uint32 i = 0; + u32 i = 0; WILC_Sint32 s32Freq; priv = wiphy_priv(dev->ieee80211_ptr->wiphy); pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv; @@ -2372,7 +2372,7 @@ static void WILC_WFI_RemainOnChannelReady(void *pUserVoid) * @version */ -static void WILC_WFI_RemainOnChannelExpired(void *pUserVoid, WILC_Uint32 u32SessionID) +static void WILC_WFI_RemainOnChannelExpired(void *pUserVoid, u32 u32SessionID) { struct WILC_WFI_priv *priv; priv = (struct WILC_WFI_priv *)pUserVoid; @@ -2513,9 +2513,9 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy, struct WILC_WFI_priv *priv; WILC_Sint32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv; - WILC_Uint32 i; + u32 i; perInterface_wlan_t *nic; - WILC_Uint32 buf_len = len + sizeof(u8P2P_vendorspec) + sizeof(u8P2Plocalrandom); + u32 buf_len = len + sizeof(u8P2P_vendorspec) + sizeof(u8P2Plocalrandom); nic = netdev_priv(wdev->netdev); priv = wiphy_priv(wiphy); diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index d07216a237a0..108d4533c4e4 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -117,9 +117,9 @@ struct sta_info { struct wilc_wfi_p2pListenParams { struct ieee80211_channel *pstrListenChan; enum nl80211_channel_type tenuChannelType; - WILC_Uint32 u32ListenDuration; + u32 u32ListenDuration; WILC_Uint64 u64ListenCookie; - WILC_Uint32 u32ListenSessionID; + u32 u32ListenSessionID; }; #endif /*WILC_P2P*/ @@ -135,7 +135,7 @@ struct WILC_WFI_priv { #endif WILC_Bool bCfgScanning; - WILC_Uint32 u32RcvdChCount; + u32 u32RcvdChCount; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 2a015e8e7038..a456d0d140c1 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -852,7 +852,7 @@ INLINE void chip_wakeup(void) genuChipPSstate = CHIP_WAKEDUP; } #endif -void chip_sleep_manually(WILC_Uint32 u32SleepTime) +void chip_sleep_manually(u32 u32SleepTime) { if (genuChipPSstate != CHIP_WAKEDUP) { /* chip is already sleeping. Do nothing */ @@ -1869,7 +1869,7 @@ static int wilc_wlan_cfg_commit(int type, uint32_t 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 = (WILC_Uint32)drvHandler; + int driver_handler = (u32)drvHandler; /** @@ -2328,7 +2328,7 @@ _fail_: u16 Set_machw_change_vir_if(WILC_Bool bValue) { u16 ret; - WILC_Uint32 reg; + u32 reg; /*Reset WILC_CHANGING_VIR_IF register to allow adding futrue keys to CE H/W*/ (&g_wlan)->os_func.os_enter_cs((&g_wlan)->hif_lock); diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index a627c5870960..d7e7e92536f6 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -541,7 +541,7 @@ static int wilc_wlan_cfg_indicate_rx(uint8_t *frame, int size, wilc_cfg_rsp_t *r uint8_t msg_id; uint16_t msg_len; #ifdef WILC_FULLY_HOSTING_AP - WILC_Uint32 *ptru32Frame; + u32 *ptru32Frame; WILC_Bool bStatus = frame[2]; #ifdef BIG_ENDIAN diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index dd86ca7dd3f3..ea0ec412b907 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -92,7 +92,7 @@ typedef struct { void (*os_free)(void *); void (*os_lock)(void *); void (*os_unlock)(void *); - int (*os_wait)(void *, WILC_Uint32); + int (*os_wait)(void *, u32); void (*os_signal)(void *); void (*os_enter_cs)(void *); void (*os_leave_cs)(void *); @@ -238,7 +238,7 @@ typedef struct { #define MAX_SSID_LEN 33 #define MAX_RATES_SUPPORTED 12 -#define INFINITE_SLEEP_TIME ((WILC_Uint32)0xFFFFFFFF) +#define INFINITE_SLEEP_TIME ((u32)0xFFFFFFFF) #ifdef WILC_PARSE_SCAN_IN_HOST typedef enum { -- cgit v1.2.3-59-g8ed1b From ca356ada7cf4668bf3eaa65a6a25671f185c2229 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Thu, 11 Jun 2015 14:35:57 +0900 Subject: staging: wilc1000: remove WILC_Sint8 Use s8 instead of WILC_Sint8. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigurator.c | 18 ++-- drivers/staging/wilc1000/coreconfigurator.h | 8 +- drivers/staging/wilc1000/host_interface.c | 148 ++++++++++++++-------------- drivers/staging/wilc1000/host_interface.h | 12 +-- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_oswrapper.h | 1 - 6 files changed, 94 insertions(+), 95 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 0a030806844a..f51bfa48028e 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -158,7 +158,7 @@ typedef struct { /*****************************************************************************/ /* Extern Function Declarations */ /*****************************************************************************/ -extern WILC_Sint32 SendRawPacket(WILC_Sint8 *ps8Packet, WILC_Sint32 s32PacketLen); +extern WILC_Sint32 SendRawPacket(s8 *ps8Packet, WILC_Sint32 s32PacketLen); extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length); extern void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length); extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); @@ -168,7 +168,7 @@ extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); static struct semaphore SemHandleSendPkt; static struct semaphore SemHandlePktResp; -static WILC_Sint8 *gps8ConfigPacket; +static s8 *gps8ConfigPacket; static tstrConfigPktInfo gstrConfigPktInfo; @@ -678,7 +678,7 @@ WILC_Sint32 CoreConfiguratorInit(void) sema_init(&SemHandleSendPkt, 1); sema_init(&SemHandlePktResp, 0); - gps8ConfigPacket = (WILC_Sint8 *)WILC_MALLOC(MAX_PACKET_BUFF_SIZE); + gps8ConfigPacket = (s8 *)WILC_MALLOC(MAX_PACKET_BUFF_SIZE); if (gps8ConfigPacket == NULL) { PRINT_ER("failed in gps8ConfigPacket allocation\n"); s32Error = WILC_NO_MEM; @@ -1097,7 +1097,7 @@ WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults) /*****************************************************************************/ void ProcessCharWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, WILC_Sint8 *ps8WidVal) + tstrWID *pstrWID, s8 *ps8WidVal) { u8 *pu8val = (u8 *)ps8WidVal; u8 u8val = 0; @@ -1151,7 +1151,7 @@ void ProcessCharWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /*****************************************************************************/ void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, WILC_Sint8 *ps8WidVal) + tstrWID *pstrWID, s8 *ps8WidVal) { u16 *pu16val = (u16 *)ps8WidVal; u16 u16val = 0; @@ -1206,7 +1206,7 @@ void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /*****************************************************************************/ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, WILC_Sint8 *ps8WidVal) + tstrWID *pstrWID, s8 *ps8WidVal) { u32 *pu32val = (u32 *)ps8WidVal; u32 u32val = 0; @@ -1551,7 +1551,7 @@ WILC_Sint32 further_process_response(u8 *resp, u16 *pu16val = (u16 *)(pstrWIDresult->ps8WidVal); cfg_sht = MAKE_WORD16(resp[idx], resp[idx + 1]); /*Set local copy of WID*/ - /* pstrWIDresult->ps8WidVal = (WILC_Sint8*)(WILC_Sint32)cfg_sht; */ + /* pstrWIDresult->ps8WidVal = (s8*)(WILC_Sint32)cfg_sht; */ *pu16val = cfg_sht; break; } @@ -1564,7 +1564,7 @@ WILC_Sint32 further_process_response(u8 *resp, MAKE_WORD16(resp[idx + 2], resp[idx + 3]) ); /*Set local copy of WID*/ - /* pstrWIDresult->ps8WidVal = (WILC_Sint8*)cfg_int; */ + /* pstrWIDresult->ps8WidVal = (s8*)cfg_int; */ *pu32val = cfg_int; break; } @@ -1857,7 +1857,7 @@ WILC_Sint32 CreatePacketHeader(WILC_Char *pcpacket, WILC_Sint32 *ps32PacketLengt * @version 1.0 */ -WILC_Sint32 CreateConfigPacket(WILC_Sint8 *ps8packet, WILC_Sint32 *ps32PacketLength, +WILC_Sint32 CreateConfigPacket(s8 *ps8packet, WILC_Sint32 *ps32PacketLength, tstrWID *pstrWIDs, u32 u32WIDsCount) { WILC_Sint32 s32Error = WILC_SUCCESS; diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 6d16bba79902..44941cdbd3e2 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -397,18 +397,18 @@ typedef struct { u16 u16WIDid; tenuWIDtype enuWIDtype; WILC_Sint32 s32ValueSize; - WILC_Sint8 *ps8WidVal; + s8 *ps8WidVal; } tstrWID; typedef struct { u8 u8Full; u8 u8Index; - WILC_Sint8 as8RSSI[NUM_RSSI]; + s8 as8RSSI[NUM_RSSI]; } tstrRSSI; /* This structure is used to support parsing of the received 'N' message */ typedef struct { - WILC_Sint8 s8rssi; + s8 s8rssi; u16 u16CapInfo; u8 au8ssid[MAX_SSID_LEN]; u8 u8SsidLen; @@ -490,7 +490,7 @@ extern WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_ extern WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults); #endif -extern WILC_Sint32 SendRawPacket(WILC_Sint8 *pspacket, WILC_Sint32 s32PacketLen); +extern WILC_Sint32 SendRawPacket(s8 *pspacket, WILC_Sint32 s32PacketLen); extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length); void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length); void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 75effdb22a02..ce8e5b36b398 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -564,8 +564,8 @@ static u8 gapu8RcvdAssocResp[MAX_ASSOC_RESP_FRAME_SIZE]; WILC_Bool gbScanWhileConnected = WILC_FALSE; -static WILC_Sint8 gs8Rssi; -static WILC_Sint8 gs8lnkspd; +static s8 gs8Rssi; +static s8 gs8lnkspd; static u8 gu8Chnl; static u8 gs8SetIP[2][4]; static u8 gs8GetIP[2][4]; @@ -654,7 +654,7 @@ static WILC_Sint32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSe /*prepare configuration packet*/ strWID.u16WIDid = (u16)WID_SET_DRV_HANDLER; strWID.enuWIDtype = WID_INT; - strWID.ps8WidVal = (WILC_Sint8 *)&(pstrHostIfSetDrvHandler->u32Address); + strWID.ps8WidVal = (s8 *)&(pstrHostIfSetDrvHandler->u32Address); strWID.s32ValueSize = sizeof(u32); /*Sending Cfg*/ @@ -699,7 +699,7 @@ static WILC_Sint32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperat /*prepare configuration packet*/ strWID.u16WIDid = (u16)WID_SET_OPERATION_MODE; strWID.enuWIDtype = WID_INT; - strWID.ps8WidVal = (WILC_Sint8 *)&(pstrHostIfSetOperationMode->u32Mode); + strWID.ps8WidVal = (s8 *)&(pstrHostIfSetOperationMode->u32Mode); strWID.s32ValueSize = sizeof(u32); /*Sending Cfg*/ @@ -943,7 +943,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* validate input then copy>> need to check value 4 and 5 */ if (strHostIFCfgParamAttr->pstrCfgParamVal.bss_type < 6) { strWIDList[u8WidCnt].u16WIDid = WID_BSS_TYPE; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.bss_type; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.bss_type; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); pstrWFIDrv->strCfgValues.bss_type = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.bss_type; @@ -961,7 +961,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /*validate Possible values*/ if ((strHostIFCfgParamAttr->pstrCfgParamVal.auth_type) == 1 || (strHostIFCfgParamAttr->pstrCfgParamVal.auth_type) == 2 || (strHostIFCfgParamAttr->pstrCfgParamVal.auth_type) == 5) { strWIDList[u8WidCnt].u16WIDid = WID_AUTH_TYPE; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.auth_type; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.auth_type; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); pstrWFIDrv->strCfgValues.auth_type = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.auth_type; @@ -974,7 +974,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range is 1 to 65535. */ if (strHostIFCfgParamAttr->pstrCfgParamVal.auth_timeout > 0 && strHostIFCfgParamAttr->pstrCfgParamVal.auth_timeout < 65536) { strWIDList[u8WidCnt].u16WIDid = WID_AUTH_TIMEOUT; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.auth_timeout; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.auth_timeout; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.auth_timeout = strHostIFCfgParamAttr->pstrCfgParamVal.auth_timeout; @@ -993,7 +993,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /*----------------------------------------------------------*/ if (strHostIFCfgParamAttr->pstrCfgParamVal.power_mgmt_mode < 5) { strWIDList[u8WidCnt].u16WIDid = WID_POWER_MANAGEMENT; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.power_mgmt_mode; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.power_mgmt_mode; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); pstrWFIDrv->strCfgValues.power_mgmt_mode = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.power_mgmt_mode; @@ -1006,7 +1006,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range from 1 to 256 */ if ((strHostIFCfgParamAttr->pstrCfgParamVal.short_retry_limit > 0) && (strHostIFCfgParamAttr->pstrCfgParamVal.short_retry_limit < 256)) { strWIDList[u8WidCnt].u16WIDid = WID_SHORT_RETRY_LIMIT; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.short_retry_limit; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.short_retry_limit; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.short_retry_limit = strHostIFCfgParamAttr->pstrCfgParamVal.short_retry_limit; @@ -1019,7 +1019,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range from 1 to 256 */ if ((strHostIFCfgParamAttr->pstrCfgParamVal.long_retry_limit > 0) && (strHostIFCfgParamAttr->pstrCfgParamVal.long_retry_limit < 256)) { strWIDList[u8WidCnt].u16WIDid = WID_LONG_RETRY_LIMIT; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.long_retry_limit; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.long_retry_limit; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); @@ -1033,7 +1033,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str if (strHostIFCfgParamAttr->pstrCfgParamVal.frag_threshold > 255 && strHostIFCfgParamAttr->pstrCfgParamVal.frag_threshold < 7937) { strWIDList[u8WidCnt].u16WIDid = WID_FRAG_THRESHOLD; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.frag_threshold; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.frag_threshold; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.frag_threshold = strHostIFCfgParamAttr->pstrCfgParamVal.frag_threshold; @@ -1046,7 +1046,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range 256 to 65535 */ if (strHostIFCfgParamAttr->pstrCfgParamVal.rts_threshold > 255 && strHostIFCfgParamAttr->pstrCfgParamVal.rts_threshold < 65536) { strWIDList[u8WidCnt].u16WIDid = WID_RTS_THRESHOLD; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.rts_threshold; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.rts_threshold; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.rts_threshold = strHostIFCfgParamAttr->pstrCfgParamVal.rts_threshold; @@ -1063,7 +1063,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /*------------------------------------------------------*/ if (strHostIFCfgParamAttr->pstrCfgParamVal.preamble_type < 3) { strWIDList[u8WidCnt].u16WIDid = WID_PREAMBLE; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.preamble_type; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.preamble_type; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); pstrWFIDrv->strCfgValues.preamble_type = strHostIFCfgParamAttr->pstrCfgParamVal.preamble_type; @@ -1075,7 +1075,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str if (strHostIFCfgParamAttr->pstrCfgParamVal.u32SetCfgFlag & SHORT_SLOT_ALLOWED) { if (strHostIFCfgParamAttr->pstrCfgParamVal.short_slot_allowed < 2) { strWIDList[u8WidCnt].u16WIDid = WID_SHORT_SLOT_ALLOWED; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.short_slot_allowed; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.short_slot_allowed; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); pstrWFIDrv->strCfgValues.short_slot_allowed = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.short_slot_allowed; @@ -1091,7 +1091,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /*Input Values: 1 for enable and 0 for disable. */ if (strHostIFCfgParamAttr->pstrCfgParamVal.txop_prot_disabled < 2) { strWIDList[u8WidCnt].u16WIDid = WID_11N_TXOP_PROT_DISABLE; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.txop_prot_disabled; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.txop_prot_disabled; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); pstrWFIDrv->strCfgValues.txop_prot_disabled = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.txop_prot_disabled; @@ -1104,7 +1104,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range is 1 to 65535. */ if (strHostIFCfgParamAttr->pstrCfgParamVal.beacon_interval > 0 && strHostIFCfgParamAttr->pstrCfgParamVal.beacon_interval < 65536) { strWIDList[u8WidCnt].u16WIDid = WID_BEACON_INTERVAL; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.beacon_interval; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.beacon_interval; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.beacon_interval = strHostIFCfgParamAttr->pstrCfgParamVal.beacon_interval; @@ -1117,7 +1117,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range is 1 to 255. */ if (strHostIFCfgParamAttr->pstrCfgParamVal.dtim_period > 0 && strHostIFCfgParamAttr->pstrCfgParamVal.dtim_period < 256) { strWIDList[u8WidCnt].u16WIDid = WID_DTIM_PERIOD; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.dtim_period; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.dtim_period; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); pstrWFIDrv->strCfgValues.dtim_period = strHostIFCfgParamAttr->pstrCfgParamVal.dtim_period; @@ -1134,7 +1134,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /*----------------------------------------------------------------------*/ if (strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_enabled < 3) { strWIDList[u8WidCnt].u16WIDid = WID_SITE_SURVEY; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_enabled; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_enabled; strWIDList[u8WidCnt].enuWIDtype = WID_CHAR; strWIDList[u8WidCnt].s32ValueSize = sizeof(WILC_Char); pstrWFIDrv->strCfgValues.site_survey_enabled = (u8)strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_enabled; @@ -1147,7 +1147,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range is 1 to 65535. */ if (strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_scan_time > 0 && strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_scan_time < 65536) { strWIDList[u8WidCnt].u16WIDid = WID_SITE_SURVEY_SCAN_TIME; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_scan_time; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_scan_time; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.site_survey_scan_time = strHostIFCfgParamAttr->pstrCfgParamVal.site_survey_scan_time; @@ -1160,7 +1160,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range is 1 to 65535. */ if (strHostIFCfgParamAttr->pstrCfgParamVal.active_scan_time > 0 && strHostIFCfgParamAttr->pstrCfgParamVal.active_scan_time < 65536) { strWIDList[u8WidCnt].u16WIDid = WID_ACTIVE_SCAN_TIME; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.active_scan_time; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.active_scan_time; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.active_scan_time = strHostIFCfgParamAttr->pstrCfgParamVal.active_scan_time; @@ -1173,7 +1173,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str /* range is 1 to 65535. */ if (strHostIFCfgParamAttr->pstrCfgParamVal.passive_scan_time > 0 && strHostIFCfgParamAttr->pstrCfgParamVal.passive_scan_time < 65536) { strWIDList[u8WidCnt].u16WIDid = WID_PASSIVE_SCAN_TIME; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.passive_scan_time; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&strHostIFCfgParamAttr->pstrCfgParamVal.passive_scan_time; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.passive_scan_time = strHostIFCfgParamAttr->pstrCfgParamVal.passive_scan_time; @@ -1196,7 +1196,7 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str || curr_tx_rate == MBPS_18 || curr_tx_rate == MBPS_24 || curr_tx_rate == MBPS_36 || curr_tx_rate == MBPS_48 || curr_tx_rate == MBPS_54) { strWIDList[u8WidCnt].u16WIDid = WID_CURRENT_TX_RATE; - strWIDList[u8WidCnt].ps8WidVal = (WILC_Sint8 *)&curr_tx_rate; + strWIDList[u8WidCnt].ps8WidVal = (s8 *)&curr_tx_rate; strWIDList[u8WidCnt].enuWIDtype = WID_SHORT; strWIDList[u8WidCnt].s32ValueSize = sizeof(u16); pstrWFIDrv->strCfgValues.curr_tx_rate = (u8)curr_tx_rate; @@ -1334,7 +1334,7 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs strWIDList[u32WidsCount].u16WIDid = WID_SCAN_TYPE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFscanAttr->u8ScanType)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrHostIFscanAttr->u8ScanType)); u32WidsCount++; /*list of channels to be scanned*/ @@ -1360,7 +1360,7 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs strWIDList[u32WidsCount].u16WIDid = WID_START_SCAN_REQ; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFscanAttr->u8ScanSource)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrHostIFscanAttr->u8ScanSource)); u32WidsCount++; /*keep the state as is , no need to change it*/ @@ -1446,7 +1446,7 @@ static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) u8abort_running_scan = 1; strWID.u16WIDid = (u16)WID_ABORT_RUNNING_SCAN; strWID.enuWIDtype = WID_CHAR; - strWID.ps8WidVal = (WILC_Sint8 *)&u8abort_running_scan; + strWID.ps8WidVal = (s8 *)&u8abort_running_scan; strWID.s32ValueSize = sizeof(WILC_Char); /*Sending Cfg*/ @@ -1614,7 +1614,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_MODE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrWFIDrv->strWILC_UsrConnReq.u8security)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrWFIDrv->strWILC_UsrConnReq.u8security)); u32WidsCount++; PRINT_INFO(HOSTINF_DBG, "Encrypt Mode = %x\n", pstrWFIDrv->strWILC_UsrConnReq.u8security); @@ -1622,7 +1622,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH strWIDList[u32WidsCount].u16WIDid = (u16)WID_AUTH_TYPE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); u32WidsCount++; PRINT_INFO(HOSTINF_DBG, "Authentication Type = %x\n", pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); @@ -1630,14 +1630,14 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH * strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_PSK; * strWIDList[u32WidsCount].enuWIDtype = WID_STR; * strWIDList[u32WidsCount].s32ValueSize = sizeof(passphrase); - * strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8*)(passphrase); + * strWIDList[u32WidsCount].ps8WidVal = (s8*)(passphrase); * u32WidsCount++; */ strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)&u8bssDscListIndex; + strWIDList[u32WidsCount].ps8WidVal = (s8 *)&u8bssDscListIndex; u32WidsCount++; #ifndef SIMULATION @@ -1723,19 +1723,19 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH strWIDList[u32WidsCount].u16WIDid = WID_SUCCESS_FRAME_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(dummyval)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(dummyval)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_RECEIVED_FRAGMENT_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(dummyval)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(dummyval)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_FAILED_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(dummyval)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(dummyval)); u32WidsCount++; /* if((gWFiDrvHandle->strWILC_UsrConnReq.pu8ConnReqIEs != NULL) && */ @@ -1760,7 +1760,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_MODE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrWFIDrv->strWILC_UsrConnReq.u8security)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrWFIDrv->strWILC_UsrConnReq.u8security)); u32WidsCount++; /*BugID_5137*/ @@ -1773,7 +1773,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH strWIDList[u32WidsCount].u16WIDid = (u16)WID_AUTH_TYPE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); u32WidsCount++; /*BugID_5137*/ @@ -1785,7 +1785,7 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH * strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_PSK; * strWIDList[u32WidsCount].enuWIDtype = WID_STR; * strWIDList[u32WidsCount].s32ValueSize = sizeof(passphrase); - * strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8*)(passphrase); + * strWIDList[u32WidsCount].ps8WidVal = (s8*)(passphrase); * u32WidsCount++; */ @@ -2095,7 +2095,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) strWIDList[u32WidsCount].u16WIDid = (u16)WID_11I_MODE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(gu8Flushed11iMode)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(gu8Flushed11iMode)); u32WidsCount++; @@ -2103,7 +2103,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) strWIDList[u32WidsCount].u16WIDid = (u16)WID_AUTH_TYPE; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&gu8FlushedAuthType); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&gu8FlushedAuthType); u32WidsCount++; @@ -2111,7 +2111,7 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ_EXTENDED; strWIDList[u32WidsCount].enuWIDtype = WID_STR; strWIDList[u32WidsCount].s32ValueSize = gu32FlushedJoinReqSize; - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)gu8FlushedJoinReq; + strWIDList[u32WidsCount].ps8WidVal = (s8 *)gu8FlushedJoinReq; pu8CurrByte = strWIDList[u32WidsCount].ps8WidVal; pu8CurrByte += FLUSHED_BYTE_POS; @@ -2201,7 +2201,7 @@ static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) * WID_DISCONNECT} */ strWID.u16WIDid = (u16)WID_DISCONNECT; strWID.enuWIDtype = WID_CHAR; - strWID.ps8WidVal = (WILC_Sint8 *)&u16DummyReasonCode; + strWID.ps8WidVal = (s8 *)&u16DummyReasonCode; strWID.s32ValueSize = sizeof(WILC_Char); PRINT_D(HOSTINF_DBG, "Sending disconnect request\n"); @@ -2715,8 +2715,8 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) #endif u8 i; u8 *pu8keybuf; - WILC_Sint8 s8idxarray[1]; - WILC_Sint8 ret = 0; + s8 s8idxarray[1]; + s8 ret = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -2733,17 +2733,17 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[0].u16WIDid = (u16)WID_11I_MODE; strWIDList[0].enuWIDtype = WID_CHAR; strWIDList[0].s32ValueSize = sizeof(WILC_Char); - strWIDList[0].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8mode)); + strWIDList[0].ps8WidVal = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8mode)); strWIDList[1].u16WIDid = WID_AUTH_TYPE; strWIDList[1].enuWIDtype = WID_CHAR; strWIDList[1].s32ValueSize = sizeof(WILC_Char); - strWIDList[1].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.tenuAuth_type)); + strWIDList[1].ps8WidVal = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.tenuAuth_type)); strWIDList[2].u16WIDid = (u16)WID_KEY_ID; strWIDList[2].enuWIDtype = WID_CHAR; - strWIDList[2].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); + strWIDList[2].ps8WidVal = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); strWIDList[2].s32ValueSize = sizeof(WILC_Char); @@ -2764,7 +2764,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[3].u16WIDid = (u16)WID_WEP_KEY_VALUE; strWIDList[3].enuWIDtype = WID_STR; strWIDList[3].s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen; - strWIDList[3].ps8WidVal = (WILC_Sint8 *)pu8keybuf; + strWIDList[3].ps8WidVal = (s8 *)pu8keybuf; s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, WILC_TRUE, (u32)pstrWFIDrv); @@ -2792,7 +2792,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.u16WIDid = (u16)WID_ADD_WEP_KEY; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; + strWID.ps8WidVal = (s8 *)pu8keybuf; strWID.s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2; s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); @@ -2803,7 +2803,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.u16WIDid = (u16)WID_REMOVE_WEP_KEY; strWID.enuWIDtype = WID_STR; - s8idxarray[0] = (WILC_Sint8)pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx; + s8idxarray[0] = (s8)pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx; strWID.ps8WidVal = s8idxarray; strWID.s32ValueSize = 1; @@ -2811,7 +2811,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) } else { strWID.u16WIDid = (u16)WID_KEY_ID; strWID.enuWIDtype = WID_CHAR; - strWID.ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); + strWID.ps8WidVal = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); strWID.s32ValueSize = sizeof(WILC_Char); PRINT_D(HOSTINF_DBG, "Setting default key index\n"); @@ -2855,11 +2855,11 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[0].u16WIDid = (u16)WID_11I_MODE; strWIDList[0].enuWIDtype = WID_CHAR; strWIDList[0].s32ValueSize = sizeof(WILC_Char); - strWIDList[0].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode)); + strWIDList[0].ps8WidVal = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode)); strWIDList[1].u16WIDid = (u16)WID_ADD_RX_GTK; strWIDList[1].enuWIDtype = WID_STR; - strWIDList[1].ps8WidVal = (WILC_Sint8 *)pu8keybuf; + strWIDList[1].ps8WidVal = (s8 *)pu8keybuf; strWIDList[1].s32ValueSize = RX_MIC_KEY_MSG_LEN; s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, WILC_TRUE, (u32)pstrWFIDrv); @@ -2906,7 +2906,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.u16WIDid = (u16)WID_ADD_RX_GTK; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; + strWID.ps8WidVal = (s8 *)pu8keybuf; strWID.s32ValueSize = RX_MIC_KEY_MSG_LEN; s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); @@ -2959,11 +2959,11 @@ _WPARxGtk_end_case_: strWIDList[0].u16WIDid = (u16)WID_11I_MODE; strWIDList[0].enuWIDtype = WID_CHAR; strWIDList[0].s32ValueSize = sizeof(WILC_Char); - strWIDList[0].ps8WidVal = (WILC_Sint8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode)); + strWIDList[0].ps8WidVal = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode)); strWIDList[1].u16WIDid = (u16)WID_ADD_PTK; strWIDList[1].enuWIDtype = WID_STR; - strWIDList[1].ps8WidVal = (WILC_Sint8 *)pu8keybuf; + strWIDList[1].ps8WidVal = (s8 *)pu8keybuf; strWIDList[1].s32ValueSize = PTK_KEY_MSG_LEN + 1; s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, WILC_TRUE, (u32)pstrWFIDrv); @@ -3004,7 +3004,7 @@ _WPARxGtk_end_case_: strWID.u16WIDid = (u16)WID_ADD_PTK; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; + strWID.ps8WidVal = (s8 *)pu8keybuf; strWID.s32ValueSize = PTK_KEY_MSG_LEN; s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); @@ -3043,7 +3043,7 @@ _WPAPtk_end_case_: strWID.u16WIDid = (u16)WID_PMKID_INFO; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Sint8 *)pu8keybuf; + strWID.ps8WidVal = (s8 *)pu8keybuf; strWID.s32ValueSize = (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1; s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); @@ -3080,7 +3080,7 @@ static void Handle_Disconnect(void *drvHandler) strWID.u16WIDid = (u16)WID_DISCONNECT; strWID.enuWIDtype = WID_CHAR; - strWID.ps8WidVal = (WILC_Sint8 *)&u16DummyReasonCode; + strWID.ps8WidVal = (s8 *)&u16DummyReasonCode; strWID.s32ValueSize = sizeof(WILC_Char); @@ -3247,7 +3247,7 @@ static WILC_Sint32 Handle_GetChnl(void *drvHandler) tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL; strWID.enuWIDtype = WID_CHAR; - strWID.ps8WidVal = (WILC_Sint8 *)&gu8Chnl; + strWID.ps8WidVal = (s8 *)&gu8Chnl; strWID.s32ValueSize = sizeof(WILC_Char); PRINT_D(HOSTINF_DBG, "Getting channel value\n"); @@ -3350,31 +3350,31 @@ WILC_Sint32 Handle_GetStatistics(void *drvHandler, tstrStatistics *pstrStatistic strWIDList[u32WidsCount].u16WIDid = WID_LINKSPEED; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrStatistics->u8LinkSpeed)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrStatistics->u8LinkSpeed)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_RSSI; strWIDList[u32WidsCount].enuWIDtype = WID_CHAR; strWIDList[u32WidsCount].s32ValueSize = sizeof(WILC_Char); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrStatistics->s8RSSI)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrStatistics->s8RSSI)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_SUCCESS_FRAME_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrStatistics->u32TxCount)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrStatistics->u32TxCount)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_RECEIVED_FRAGMENT_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrStatistics->u32RxCount)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrStatistics->u32RxCount)); u32WidsCount++; strWIDList[u32WidsCount].u16WIDid = WID_FAILED_COUNT; strWIDList[u32WidsCount].enuWIDtype = WID_INT; strWIDList[u32WidsCount].s32ValueSize = sizeof(u32); - strWIDList[u32WidsCount].ps8WidVal = (WILC_Sint8 *)(&(pstrStatistics->u32TxFailureCount)); + strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrStatistics->u32TxFailureCount)); u32WidsCount++; s32Error = SendConfigPkt(GET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)drvHandler); @@ -3435,7 +3435,7 @@ static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInacti strWID.u16WIDid = (u16)WID_GET_INACTIVE_TIME; strWID.enuWIDtype = WID_INT; - strWID.ps8WidVal = (WILC_Sint8 *)&gu32InactiveTime; + strWID.ps8WidVal = (s8 *)&gu32InactiveTime; strWID.s32ValueSize = sizeof(u32); @@ -3877,14 +3877,14 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos strWID.u16WIDid = (u16)WID_REMAIN_ON_CHAN; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = 2; - strWID.ps8WidVal = (WILC_Sint8 *)WILC_MALLOC(strWID.s32ValueSize); + strWID.ps8WidVal = (s8 *)WILC_MALLOC(strWID.s32ValueSize); if (strWID.ps8WidVal == NULL) { WILC_ERRORREPORT(s32Error, WILC_NO_MEM); } strWID.ps8WidVal[0] = u8remain_on_chan_flag; - strWID.ps8WidVal[1] = (WILC_Sint8)pstrHostIfRemainOnChan->u16Channel; + strWID.ps8WidVal[1] = (s8)pstrHostIfRemainOnChan->u16Channel; /*Sending Cfg*/ s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); @@ -4067,7 +4067,7 @@ static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *s { WILC_Sint32 s32Error = WILC_SUCCESS; tstrWID strWID; - WILC_Sint8 s8PowerMode; + s8 s8PowerMode; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (u16)WID_POWER_MANAGEMENT; @@ -4642,7 +4642,7 @@ WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddre strWID.u16WIDid = (u16)WID_REMOVE_KEY; strWID.enuWIDtype = WID_STR; - strWID.ps8WidVal = (WILC_Sint8 *)pu8StaAddress; + strWID.ps8WidVal = (s8 *)pu8StaAddress; strWID.s32ValueSize = 6; return s32Error; @@ -5483,7 +5483,7 @@ WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource strWID.u16WIDid = (u16)WID_START_SCAN_REQ; strWID.enuWIDtype = WID_CHAR; - strWID.ps8WidVal = (WILC_Sint8 *)&scanSource; + strWID.ps8WidVal = (s8 *)&scanSource; strWID.s32ValueSize = sizeof(WILC_Char); return s32Error; @@ -5513,7 +5513,7 @@ WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSo strWID.u16WIDid = (u16)WID_START_SCAN_REQ; strWID.enuWIDtype = WID_CHAR; - strWID.ps8WidVal = (WILC_Sint8 *)pu8ScanSource; + strWID.ps8WidVal = (s8 *)pu8ScanSource; strWID.s32ValueSize = sizeof(WILC_Char); return s32Error; @@ -5733,7 +5733,7 @@ WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id) strWID.u16WIDid = (u16)WID_DISCONNECT; strWID.enuWIDtype = WID_CHAR; - strWID.ps8WidVal = (WILC_Sint8 *)&assoc_id; + strWID.ps8WidVal = (s8 *)&assoc_id; strWID.s32ValueSize = sizeof(WILC_Char); return s32Error; @@ -6151,7 +6151,7 @@ WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMe strWID.u16WIDid = (u16)WID_MEMORY_ADDRESS; strWID.enuWIDtype = WID_INT; - strWID.ps8WidVal = (WILC_Sint8 *)pu32TestMemAddr; + strWID.ps8WidVal = (s8 *)pu32TestMemAddr; strWID.s32ValueSize = sizeof(u32); s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); @@ -6185,7 +6185,7 @@ WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMe * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8Rssi) +WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, s8 *ps8Rssi) { WILC_Sint32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -6220,7 +6220,7 @@ WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8Rssi) return s32Error; } -WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8lnkspd) +WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, s8 *ps8lnkspd) { tstrHostIFmsg strHostIFmsg; WILC_Sint32 s32Error = WILC_SUCCESS; @@ -6578,7 +6578,7 @@ void GetPeriodicRSSI(void *pvArg) void host_int_send_network_info_to_host - (u8 *macStartAddress, u16 u16RxFrameLen, WILC_Sint8 s8Rssi) + (u8 *macStartAddress, u16 u16RxFrameLen, s8 s8Rssi) { } /** diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index a75efbfb1929..1f107d0b2ce0 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -128,12 +128,12 @@ typedef enum {WID_CHAR = 0, typedef struct { u16 cfg_wid; WID_TYPE_T cfg_type; - WILC_Sint8 *pu8Para; + s8 *pu8Para; } cfg_param_t; typedef struct _tstrStatistics { u8 u8LinkSpeed; - WILC_Sint8 s8RSSI; + s8 s8RSSI; u32 u32TxCount; u32 u32RxCount; u32 u32TxFailureCount; @@ -237,7 +237,7 @@ typedef enum { typedef struct { u8 au8bssid[6]; - WILC_Sint8 s8rssi; + s8 s8rssi; } tstrFoundNetworkInfo; typedef enum {SCAN_EVENT_NETWORK_FOUND = 0, @@ -989,8 +989,8 @@ WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8Rssi); -WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8lnkspd); +WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, s8 *ps8Rssi); +WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, s8 *ps8lnkspd); /** * @brief scans a set of channels * @details @@ -1074,7 +1074,7 @@ void host_int_send_join_leave_info_to_host * @version 1.0 */ void host_int_send_network_info_to_host - (u8 *macStartAddress, u16 u16RxFrameLen, WILC_Sint8 s8Rssi); + (u8 *macStartAddress, u16 u16RxFrameLen, s8 s8Rssi); /** * @brief host interface initialization function diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index de576b58128b..6b8001da31c6 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2375,7 +2375,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) { u8 *buff = NULL; - WILC_Sint8 rssi; + s8 rssi; u32 size = 0, length = 0; perInterface_wlan_t *nic; struct WILC_WFI_priv *priv; diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h index 3af48da5751d..7e84475e2278 100644 --- a/drivers/staging/wilc1000/wilc_oswrapper.h +++ b/drivers/staging/wilc1000/wilc_oswrapper.h @@ -14,7 +14,6 @@ #define WILC_OSW_INTERFACE_VER 2 /* Integer Types */ -typedef signed char WILC_Sint8; typedef signed short WILC_Sint16; typedef signed int WILC_Sint32; typedef signed long long WILC_Sint64; -- cgit v1.2.3-59-g8ed1b From fb4ec9caa464666c200ca95069cf135bb199b855 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Thu, 11 Jun 2015 14:35:59 +0900 Subject: staging: wilc1000: remove WILC_Sint32 Use s32 instead of WILC_Sint32. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigsimulator.h | 4 +- drivers/staging/wilc1000/coreconfigurator.c | 114 +++---- drivers/staging/wilc1000/coreconfigurator.h | 22 +- drivers/staging/wilc1000/host_interface.c | 362 +++++++++++----------- drivers/staging/wilc1000/host_interface.h | 124 ++++---- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_errorsupport.h | 2 +- drivers/staging/wilc1000/wilc_oswrapper.h | 1 - drivers/staging/wilc1000/wilc_strutils.c | 6 +- drivers/staging/wilc1000/wilc_strutils.h | 4 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 78 ++--- 11 files changed, 359 insertions(+), 360 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigsimulator.h b/drivers/staging/wilc1000/coreconfigsimulator.h index 6c3f431314fa..25e3c2ce2278 100644 --- a/drivers/staging/wilc1000/coreconfigsimulator.h +++ b/drivers/staging/wilc1000/coreconfigsimulator.h @@ -13,8 +13,8 @@ #define CORECONFIGSIMULATOR_H -extern WILC_Sint32 CoreConfigSimulatorInit (void); -extern WILC_Sint32 CoreConfigSimulatorDeInit (void); +extern s32 CoreConfigSimulatorInit (void); +extern s32 CoreConfigSimulatorDeInit (void); #endif \ No newline at end of file diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index cff3ff8f3604..c9cc817e7dca 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -143,8 +143,8 @@ typedef enum { typedef struct { WILC_Char *pcRespBuffer; - WILC_Sint32 s32MaxRespBuffLen; - WILC_Sint32 s32BytesRead; + s32 s32MaxRespBuffLen; + s32 s32BytesRead; WILC_Bool bRespRequired; } tstrConfigPktInfo; @@ -158,7 +158,7 @@ typedef struct { /*****************************************************************************/ /* Extern Function Declarations */ /*****************************************************************************/ -extern WILC_Sint32 SendRawPacket(s8 *ps8Packet, WILC_Sint32 s32PacketLen); +extern s32 SendRawPacket(s8 *ps8Packet, s32 s32PacketLen); extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length); extern void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length); extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); @@ -670,9 +670,9 @@ INLINE u16 get_asoc_id(u8 *data) * @version 1.0 */ -WILC_Sint32 CoreConfiguratorInit(void) +s32 CoreConfiguratorInit(void) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; PRINT_D(CORECONFIG_DBG, "CoreConfiguratorInit()\n"); sema_init(&SemHandleSendPkt, 1); @@ -769,9 +769,9 @@ u8 get_current_channel(u8 *pu8msa, u16 u16RxLen) * @date 1 Mar 2012 * @version 1.0 */ -WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) +s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrNetworkInfo *pstrNetworkInfo = NULL; u8 u8MsgType = 0; u8 u8MsgID = 0; @@ -891,9 +891,9 @@ ERRORHANDLER: * @date 1 Mar 2012 * @version 1.0 */ -WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo) +s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; if (pstrNetworkInfo != NULL) { if (pstrNetworkInfo->pu8IEs != NULL) { @@ -924,10 +924,10 @@ WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo) * @date 2 Apr 2012 * @version 1.0 */ -WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, +s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, tstrConnectRespInfo **ppstrConnectRespInfo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrConnectRespInfo *pstrConnectRespInfo = NULL; u16 u16AssocRespLen = 0; u8 *pu8IEs = 0; @@ -976,9 +976,9 @@ WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, * @date 2 Apr 2012 * @version 1.0 */ -WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo) +s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; if (pstrConnectRespInfo != NULL) { if (pstrConnectRespInfo->pu8RespIEs != NULL) { @@ -999,11 +999,11 @@ WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo) } #ifndef CONNECT_DIRECT -WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], +s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], wid_site_survey_reslts_s **ppstrSurveyResults, u32 *pu32SurveyResultsCount) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; wid_site_survey_reslts_s *pstrSurveyResults = NULL; u32 u32SurveyResultsCount = 0; u32 u32SurveyBytesLength = 0; @@ -1057,9 +1057,9 @@ ERRORHANDLER: } -WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults) +s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; if (pstrSurveyResults != NULL) { WILC_FREE(pstrSurveyResults); @@ -1096,12 +1096,12 @@ WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults) /* */ /*****************************************************************************/ -void ProcessCharWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, +void ProcessCharWid(WILC_Char *pcPacket, s32 *ps32PktLen, tstrWID *pstrWID, s8 *ps8WidVal) { u8 *pu8val = (u8 *)ps8WidVal; u8 u8val = 0; - WILC_Sint32 s32PktLen = *ps32PktLen; + s32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set CHAR val 0x%x ,NULL structure\n", u8val); return; @@ -1150,12 +1150,12 @@ void ProcessCharWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /* */ /*****************************************************************************/ -void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, +void ProcessShortWid(WILC_Char *pcPacket, s32 *ps32PktLen, tstrWID *pstrWID, s8 *ps8WidVal) { u16 *pu16val = (u16 *)ps8WidVal; u16 u16val = 0; - WILC_Sint32 s32PktLen = *ps32PktLen; + s32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set SHORT val 0x%x ,NULL structure\n", u16val); return; @@ -1205,12 +1205,12 @@ void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /* */ /*****************************************************************************/ -void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, +void ProcessIntWid(WILC_Char *pcPacket, s32 *ps32PktLen, tstrWID *pstrWID, s8 *ps8WidVal) { u32 *pu32val = (u32 *)ps8WidVal; u32 u32val = 0; - WILC_Sint32 s32PktLen = *ps32PktLen; + s32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set INT val 0x%x , NULL structure\n", u32val); return; @@ -1263,11 +1263,11 @@ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /* */ /*****************************************************************************/ -void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, +void ProcessIPwid(WILC_Char *pcPacket, s32 *ps32PktLen, tstrWID *pstrWID, u8 *pu8ip) { u32 u32val = 0; - WILC_Sint32 s32PktLen = *ps32PktLen; + s32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set IP Addr , NULL structure\n"); @@ -1321,12 +1321,12 @@ void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /* */ /*****************************************************************************/ -void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, u8 *pu8val, WILC_Sint32 s32ValueSize) +void ProcessStrWid(WILC_Char *pcPacket, s32 *ps32PktLen, + tstrWID *pstrWID, u8 *pu8val, s32 s32ValueSize) { u16 u16MsgLen = 0; u16 idx = 0; - WILC_Sint32 s32PktLen = *ps32PktLen; + s32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set STR val, NULL structure\n"); return; @@ -1378,11 +1378,11 @@ void ProcessStrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /* */ /*****************************************************************************/ -void ProcessAdrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, +void ProcessAdrWid(WILC_Char *pcPacket, s32 *ps32PktLen, tstrWID *pstrWID, u8 *pu8val) { u16 u16MsgLen = 0; - WILC_Sint32 s32PktLen = *ps32PktLen; + s32 s32PktLen = *ps32PktLen; if (pstrWID == NULL) { PRINT_WRN(CORECONFIG_DBG, "Can't set Addr WID, NULL structure\n"); @@ -1442,14 +1442,14 @@ void ProcessAdrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /* */ /*****************************************************************************/ -void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, - tstrWID *pstrWID, u8 *pu8val, WILC_Sint32 s32ValueSize) +void ProcessBinWid(WILC_Char *pcPacket, s32 *ps32PktLen, + tstrWID *pstrWID, u8 *pu8val, s32 s32ValueSize) { /* WILC_ERROR("processing Binary WIDs is not supported\n"); */ u16 u16MsgLen = 0; u16 idx = 0; - WILC_Sint32 s32PktLen = *ps32PktLen; + s32 s32PktLen = *ps32PktLen; u8 u8checksum = 0; if (pstrWID == NULL) { @@ -1517,7 +1517,7 @@ void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, /* */ /*****************************************************************************/ -WILC_Sint32 further_process_response(u8 *resp, +s32 further_process_response(u8 *resp, u16 u16WIDid, u16 cfg_len, WILC_Bool process_wid_num, @@ -1551,7 +1551,7 @@ WILC_Sint32 further_process_response(u8 *resp, u16 *pu16val = (u16 *)(pstrWIDresult->ps8WidVal); cfg_sht = MAKE_WORD16(resp[idx], resp[idx + 1]); /*Set local copy of WID*/ - /* pstrWIDresult->ps8WidVal = (s8*)(WILC_Sint32)cfg_sht; */ + /* pstrWIDresult->ps8WidVal = (s8*)(s32)cfg_sht; */ *pu16val = cfg_sht; break; } @@ -1687,7 +1687,7 @@ WILC_Sint32 further_process_response(u8 *resp, /* */ /*****************************************************************************/ -WILC_Sint32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) +s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) { u16 u16RespLen = 0; u16 u16WIDid = 0; @@ -1760,9 +1760,9 @@ WILC_Sint32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) * @version 1.0 */ -WILC_Sint32 ParseWriteResponse(u8 *pu8RespBuffer) +s32 ParseWriteResponse(u8 *pu8RespBuffer) { - WILC_Sint32 s32Error = WILC_FAIL; + s32 s32Error = WILC_FAIL; u16 u16RespLen = 0; u16 u16WIDtype = (u16)WID_NIL; @@ -1803,9 +1803,9 @@ WILC_Sint32 ParseWriteResponse(u8 *pu8RespBuffer) * @version 1.0 */ -WILC_Sint32 CreatePacketHeader(WILC_Char *pcpacket, WILC_Sint32 *ps32PacketLength) +s32 CreatePacketHeader(WILC_Char *pcpacket, s32 *ps32PacketLength) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u16 u16MsgLen = (u16)(*ps32PacketLength); u16 u16MsgInd = 0; @@ -1857,10 +1857,10 @@ WILC_Sint32 CreatePacketHeader(WILC_Char *pcpacket, WILC_Sint32 *ps32PacketLengt * @version 1.0 */ -WILC_Sint32 CreateConfigPacket(s8 *ps8packet, WILC_Sint32 *ps32PacketLength, +s32 CreateConfigPacket(s8 *ps8packet, s32 *ps32PacketLength, tstrWID *pstrWIDs, u32 u32WIDsCount) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u32 u32idx = 0; *ps32PacketLength = MSG_HEADER_LEN; for (u32idx = 0; u32idx < u32WIDsCount; u32idx++) { @@ -1912,10 +1912,10 @@ WILC_Sint32 CreateConfigPacket(s8 *ps8packet, WILC_Sint32 *ps32PacketLength, return s32Error; } -WILC_Sint32 ConfigWaitResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32MaxRespBuffLen, WILC_Sint32 *ps32BytesRead, +s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 *ps32BytesRead, WILC_Bool bRespRequired) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; /*bug 3878*/ /*removed to caller function*/ /*gstrConfigPktInfo.pcRespBuffer = pcRespBuffer; @@ -1949,13 +1949,13 @@ WILC_Sint32 ConfigWaitResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32MaxRespBu * @version 1.0 */ #ifdef SIMULATION -WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, +s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; - WILC_Sint32 err = WILC_SUCCESS; - WILC_Sint32 s32ConfigPacketLen = 0; - WILC_Sint32 s32RcvdRespLen = 0; + s32 s32Error = WILC_SUCCESS; + s32 err = WILC_SUCCESS; + s32 s32ConfigPacketLen = 0; + s32 s32RcvdRespLen = 0; down(&SemHandleSendPkt); @@ -2017,9 +2017,9 @@ End_ConfigPkt: return s32Error; } #endif -WILC_Sint32 ConfigProvideResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32RespLen) +s32 ConfigProvideResponse(WILC_Char *pcRespBuffer, s32 s32RespLen) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; if (gstrConfigPktInfo.bRespRequired == WILC_TRUE) { if (s32RespLen <= gstrConfigPktInfo.s32MaxRespBuffLen) { @@ -2050,9 +2050,9 @@ WILC_Sint32 ConfigProvideResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32RespLe * @version 1.0 */ -WILC_Sint32 ConfigPktReceived(u8 *pu8RxPacket, WILC_Sint32 s32RxPacketLen) +s32 ConfigPktReceived(u8 *pu8RxPacket, s32 s32RxPacketLen) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u8 u8MsgType = 0; u8MsgType = pu8RxPacket[0]; @@ -2094,9 +2094,9 @@ WILC_Sint32 ConfigPktReceived(u8 *pu8RxPacket, WILC_Sint32 s32RxPacketLen) * @version 1.0 */ -WILC_Sint32 CoreConfiguratorDeInit(void) +s32 CoreConfiguratorDeInit(void) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; PRINT_D(CORECONFIG_DBG, "CoreConfiguratorDeInit()\n"); @@ -2128,10 +2128,10 @@ extern wilc_wlan_oup_t *gpstrWlanOps; * @date 1 Mar 2012 * @version 1.0 */ -WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, +s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler) { - WILC_Sint32 counter = 0, ret = 0; + s32 counter = 0, ret = 0; if (gpstrWlanOps == NULL) { PRINT_D(CORECONFIG_DBG, "Net Dev is still not initialized\n"); return 1; diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 44941cdbd3e2..63db151fa752 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -396,7 +396,7 @@ typedef enum { typedef struct { u16 u16WIDid; tenuWIDtype enuWIDtype; - WILC_Sint32 s32ValueSize; + s32 s32ValueSize; s8 *ps8WidVal; } tstrWID; @@ -472,25 +472,25 @@ typedef struct wid_site_survey_reslts { } wid_site_survey_reslts_s; #endif -extern WILC_Sint32 CoreConfiguratorInit(void); -extern WILC_Sint32 CoreConfiguratorDeInit(void); +extern s32 CoreConfiguratorInit(void); +extern s32 CoreConfiguratorDeInit(void); -extern WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, +extern s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler); -extern WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); -extern WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); +extern s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); +extern s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); -extern WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, +extern s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, tstrConnectRespInfo **ppstrConnectRespInfo); -extern WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo); +extern s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo); #ifndef CONNECT_DIRECT -extern WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], +extern s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], wid_site_survey_reslts_s **ppstrSurveyResults, u32 *pu32SurveyResultsCount); -extern WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults); +extern s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults); #endif -extern WILC_Sint32 SendRawPacket(s8 *pspacket, WILC_Sint32 s32PacketLen); +extern s32 SendRawPacket(s8 *pspacket, s32 s32PacketLen); extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length); void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length); void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index ce8e5b36b398..9207d222787a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -3,8 +3,8 @@ #include "itypes.h" #include "coreconfigurator.h" -extern WILC_Sint32 TransportInit(void); -extern WILC_Sint32 TransportDeInit(void); +extern s32 TransportInit(void); +extern s32 TransportDeInit(void); extern u8 connecting; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP @@ -607,10 +607,10 @@ extern int linux_wlan_get_num_conn_ifcs(void); * @date * @version 1.0 */ -static WILC_Sint32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHostIFSetChan) +static s32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHostIFSetChan) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -643,10 +643,10 @@ static WILC_Sint32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHo * @date * @version 1.0 */ -static WILC_Sint32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHandler) +static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)((pstrHostIfSetDrvHandler->u32Address)); @@ -688,10 +688,10 @@ static WILC_Sint32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSe * @date * @version 1.0 */ -static WILC_Sint32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode *pstrHostIfSetOperationMode) +static s32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode *pstrHostIfSetOperationMode) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -734,10 +734,10 @@ static WILC_Sint32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperat * @date * @version 1.0 */ -WILC_Sint32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) +s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; char firmwareIPAddress[4] = {0}; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -786,10 +786,10 @@ WILC_Sint32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) * @date * @version 1.0 */ -WILC_Sint32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) +s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -839,10 +839,10 @@ WILC_Sint32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) * @date November 2013 * @version 7.0 */ -static WILC_Sint32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrHostIfSetMacAddress) +static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrHostIfSetMacAddress) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; u8 *mac_buf = (u8 *)WILC_MALLOC(ETH_ALEN); @@ -884,10 +884,10 @@ static WILC_Sint32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddres * @date JAN 2013 * @version 8.0 */ -static WILC_Sint32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddress *pstrHostIfGetMacAddress) +static s32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddress *pstrHostIfGetMacAddress) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /*prepare configuration packet*/ @@ -921,9 +921,9 @@ static WILC_Sint32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddres * @date * @version 1.0 */ -static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *strHostIFCfgParamAttr) +static s32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *strHostIFCfgParamAttr) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWIDList[32]; u8 u8WidCnt = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -1228,9 +1228,9 @@ static WILC_Sint32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *str * @date * @version 1.0 */ -static WILC_Sint32 Handle_wait_msg_q_empty(void) +static s32 Handle_wait_msg_q_empty(void) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; g_wilc_initialized = 0; up(&hWaitResponse); return s32Error; @@ -1245,9 +1245,9 @@ static WILC_Sint32 Handle_wait_msg_q_empty(void) * @date * @version 1.0 */ -static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr) +static s32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWIDList[5]; u32 u32WidsCount = 0; u32 i; @@ -1314,7 +1314,7 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs - strWIDList[u32WidsCount].s32ValueSize = (WILC_Sint32)(valuesize + 1); + strWIDList[u32WidsCount].s32ValueSize = (s32)(valuesize + 1); u32WidsCount++; } @@ -1426,9 +1426,9 @@ static WILC_Sint32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFs * @date * @version 1.0 */ -static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) +static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -1486,15 +1486,15 @@ static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) * @version 1.0 */ u8 u8ConnectedSSID[6] = {0}; -static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFconnectAttr) +static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFconnectAttr) { tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWIDList[8]; u32 u32WidsCount = 0, dummyval = 0; /* char passphrase[] = "12345678"; */ #ifndef CONNECT_DIRECT - WILC_Sint32 s32Err = WILC_SUCCESS; + s32 s32Err = WILC_SUCCESS; u32 i; u8 u8bssDscListIndex; wid_site_survey_reslts_s *pstrSurveyResults = NULL; @@ -2077,9 +2077,9 @@ static WILC_Sint32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrH * @version 8.0 */ -static WILC_Sint32 Handle_FlushConnect(void *drvHandler) +static s32 Handle_FlushConnect(void *drvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWIDList[5]; u32 u32WidsCount = 0; u8 *pu8CurrByte = NULL; @@ -2144,9 +2144,9 @@ static WILC_Sint32 Handle_FlushConnect(void *drvHandler) * @date * @version 1.0 */ -static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) +static s32 Handle_ConnectTimeout(void *drvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrConnectInfo strConnectInfo; tstrWID strWID; u16 u16DummyReasonCode = 0; @@ -2253,14 +2253,14 @@ static WILC_Sint32 Handle_ConnectTimeout(void *drvHandler) * @date * @version 1.0 */ -static WILC_Sint32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdNetworkInfo) +static s32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdNetworkInfo) { u32 i; WILC_Bool bNewNtwrkFound; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrNetworkInfo *pstrNetworkInfo = NULL; void *pJoinParams = NULL; @@ -2375,11 +2375,11 @@ done: * @date * @version 1.0 */ -static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pstrRcvdGnrlAsyncInfo) +static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pstrRcvdGnrlAsyncInfo) { /* TODO: mostafa: till now, this function just handles only the received mac status msg, */ /* which carries only 1 WID which have WID ID = WID_STATUS */ - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u8 u8MsgType = 0; u8 u8MsgID = 0; u16 u16MsgLen = 0; @@ -2390,7 +2390,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI u8 u8MacStatusAdditionalInfo; tstrConnectInfo strConnectInfo; tstrDisconnectNotifInfo strDisconnectNotifInfo; - WILC_Sint32 s32Err = WILC_SUCCESS; + s32 s32Err = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; if (pstrWFIDrv == NULL) { PRINT_ER("Driver handler is NULL\n"); @@ -2708,7 +2708,7 @@ static WILC_Sint32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncI */ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; #ifdef WILC_AP_EXTERNAL_MLME tstrWID strWIDList[5]; @@ -3073,7 +3073,7 @@ static void Handle_Disconnect(void *drvHandler) { tstrWID strWID; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u16 u16DummyReasonCode = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3194,11 +3194,11 @@ void resolve_disconnect_aberration(void *drvHandler) host_int_disconnect((WILC_WFIDrvHandle)pstrWFIDrv, 1); } } -static WILC_Sint32 Switch_Log_Terminal(void *drvHandler) +static s32 Switch_Log_Terminal(void *drvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; static char dummy = 9; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3238,10 +3238,10 @@ static WILC_Sint32 Switch_Log_Terminal(void *drvHandler) * @date * @version 1.0 */ -static WILC_Sint32 Handle_GetChnl(void *drvHandler) +static s32 Handle_GetChnl(void *drvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3284,7 +3284,7 @@ static WILC_Sint32 Handle_GetChnl(void *drvHandler) */ static void Handle_GetRssi(void *drvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3314,7 +3314,7 @@ static void Handle_GetRssi(void *drvHandler) static void Handle_GetLinkspeed(void *drvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3342,7 +3342,7 @@ static void Handle_GetLinkspeed(void *drvHandler) } -WILC_Sint32 Handle_GetStatistics(void *drvHandler, tstrStatistics *pstrStatistics) +s32 Handle_GetStatistics(void *drvHandler, tstrStatistics *pstrStatistics) { tstrWID strWIDList[5]; uint32_t u32WidsCount = 0, s32Error = 0; @@ -3403,10 +3403,10 @@ WILC_Sint32 Handle_GetStatistics(void *drvHandler, tstrStatistics *pstrStatistic * @date * @version 1.0 */ -static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInactiveT *strHostIfStaInactiveT) +static s32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInactiveT *strHostIfStaInactiveT) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u8 *stamac; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3474,7 +3474,7 @@ static WILC_Sint32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInacti */ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaconParam) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3546,7 +3546,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco */ static void Handle_DelBeacon(void *drvHandler, tstrHostIFDelBeacon *pstrDelBeacon) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3644,7 +3644,7 @@ static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, tstrWILC_AddStaParam *pstrSta */ static void Handle_AddStation(void *drvHandler, tstrWILC_AddStaParam *pstrStationParam) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3687,7 +3687,7 @@ static void Handle_AddStation(void *drvHandler, tstrWILC_AddStaParam *pstrStatio */ static void Handle_DelAllSta(void *drvHandler, tstrHostIFDelAllSta *pstrDelAllStaParam) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3745,7 +3745,7 @@ static void Handle_DelAllSta(void *drvHandler, tstrHostIFDelAllSta *pstrDelAllSt */ static void Handle_DelStation(void *drvHandler, tstrHostIFDelSta *pstrDelStaParam) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3791,7 +3791,7 @@ static void Handle_DelStation(void *drvHandler, tstrHostIFDelSta *pstrDelStaPara */ static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStationParam) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3837,7 +3837,7 @@ static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStati */ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u8 u8remain_on_chan_flag; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; @@ -3919,7 +3919,7 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos */ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrHostIfRegisterFrame) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -3974,7 +3974,7 @@ static u32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainOnChan *p { u8 u8remain_on_chan_flag; tstrWID strWID; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; PRINT_D(HOSTINF_DBG, "CANCEL REMAIN ON CHAN\n"); @@ -4029,7 +4029,7 @@ _done_: */ static void ListenTimerCB(void *pvArg) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)pvArg; /*Stopping remain-on-channel timer*/ @@ -4065,7 +4065,7 @@ static void ListenTimerCB(void *pvArg) */ static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *strPowerMgmtParam) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; s8 s8PowerMode; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -4106,7 +4106,7 @@ static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *s */ static void Handle_SetMulticastFilter(void *drvHandler, tstrHostIFSetMulti *strHostIfSetMulti) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; u8 *pu8CurrByte; @@ -4159,9 +4159,9 @@ static void Handle_SetMulticastFilter(void *drvHandler, tstrHostIFSetMulti *strH * @date Feb. 2014 * @version 9.0 */ -static WILC_Sint32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo) +static s32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; int AddbaTimeout = 100; char *ptr = NULL; @@ -4247,9 +4247,9 @@ static WILC_Sint32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo * @date Feb. 2013 * @version 9.0 */ -static WILC_Sint32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo) +static s32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; char *ptr = NULL; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -4317,9 +4317,9 @@ static WILC_Sint32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo * @date Feb. 2013 * @version 9.0 */ -static WILC_Sint32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo) +static s32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; char *ptr = NULL; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; @@ -4634,9 +4634,9 @@ static void TimerCB_Connect(void *pvArg) * @version 1.0 */ /* Check implementation in core adding 9 bytes to the input! */ -WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddress) +s32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddress) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -4663,9 +4663,9 @@ WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddre * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, u8 u8keyIdx) +s32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, u8 u8keyIdx) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -4713,9 +4713,9 @@ WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, u8 u8keyIdx) * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, u8 u8Index) +s32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, u8 u8Index) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -4770,10 +4770,10 @@ WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, u8 u8Index) * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx) +s32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -4836,10 +4836,10 @@ WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const u8 *pu * @date 28 FEB 2013 * @version 1.0 */ -WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, AUTHTYPE_T tenuAuth_type) +s32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, AUTHTYPE_T tenuAuth_type) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; u8 i; @@ -4912,10 +4912,10 @@ WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8 * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen, +s32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen, const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; u8 u8KeyLen = u8PtkKeylen; @@ -5014,11 +5014,11 @@ WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8P * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen, +s32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen, u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; u8 u8KeyLen = u8GtkKeylen; @@ -5120,9 +5120,9 @@ WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx) +s32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -5182,9 +5182,9 @@ WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, u8 u8KeyLen, u8 *pu8T * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAttr *pu8PmkidInfoArray) +s32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAttr *pu8PmkidInfoArray) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; u32 i; @@ -5245,10 +5245,10 @@ WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAt * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoArray, +s32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoArray, u32 u32PmkidInfoLen) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -5274,10 +5274,10 @@ WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoA * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PassPhrase, +s32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PassPhrase, u8 u8Psklength) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -5303,9 +5303,9 @@ WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 * * @date 19 April 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress) +s32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -5337,9 +5337,9 @@ WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress * @date 16 July 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress) +s32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; PRINT_D(GENERIC_DBG, "mac addr = %x:%x:%x\n", pu8MacAddress[0], pu8MacAddress[1], pu8MacAddress[2]); @@ -5378,10 +5378,10 @@ WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, +s32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PassPhrase, u8 u8Psklength) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -5425,11 +5425,11 @@ WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, * @version 1.0 */ #ifndef CONNECT_DIRECT -WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, +s32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], u32 u32MaxSiteSrvyFragLen) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID astrWIDList[2]; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -5475,9 +5475,9 @@ WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource) +s32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -5505,9 +5505,9 @@ WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource * @version 1.0 */ -WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSource) +s32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSource) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -5530,7 +5530,7 @@ WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSo * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8bssid, +s32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8bssid, const u8 *pu8ssid, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen, tWILCpfConnectResult pfConnectResult, void *pvUserArg, @@ -5538,7 +5538,7 @@ WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8bssid, u8 u8channel, void *pJoinParams) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tenuScanConnTimer enuScanConnTimer; @@ -5632,9 +5632,9 @@ WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8bssid, * @version 8.0 */ -WILC_Sint32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv) +s32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; if (!gu8FlushedJoinReq) { @@ -5676,9 +5676,9 @@ WILC_Sint32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv) * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, u16 u16ReasonCode) +s32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, u16 u16ReasonCode) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -5725,9 +5725,9 @@ WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, u16 u16ReasonCode) * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id) +s32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -5765,10 +5765,10 @@ WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id) * @version 1.0 */ -WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocReqInfo, +s32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocReqInfo, u32 u32AssocReqInfoLen) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -5792,10 +5792,10 @@ WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo, +s32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo, u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -5842,10 +5842,10 @@ WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowerLevel, +s32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowerLevel, u32 u32RxPowerLevelLen) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ @@ -5873,9 +5873,9 @@ WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowe * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 u8ChNum) +s32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 u8ChNum) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -5902,9 +5902,9 @@ WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 u8ChNum) } -WILC_Sint32 host_int_wait_msg_queue_idle(void) +s32 host_int_wait_msg_queue_idle(void) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -5928,9 +5928,9 @@ WILC_Sint32 host_int_wait_msg_queue_idle(void) } -WILC_Sint32 host_int_set_wfi_drv_handler(u32 u32address) +s32 host_int_set_wfi_drv_handler(u32 u32address) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -5956,9 +5956,9 @@ WILC_Sint32 host_int_set_wfi_drv_handler(u32 u32address) -WILC_Sint32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode) +s32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -5997,9 +5997,9 @@ WILC_Sint32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode) * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo) +s32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -6043,9 +6043,9 @@ WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo) * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemAddr) +s32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemAddr) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -6090,9 +6090,9 @@ WILC_Sint32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemA * @date * @version 1.0 */ -WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, u32 *pu32InactiveTime) +s32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, u32 *pu32InactiveTime) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -6136,10 +6136,10 @@ WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMemAddr) +s32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMemAddr) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWID strWID; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -6185,9 +6185,9 @@ WILC_Sint32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMe * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, s8 *ps8Rssi) +s32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, s8 *ps8Rssi) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -6220,10 +6220,10 @@ WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, s8 *ps8Rssi) return s32Error; } -WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, s8 *ps8lnkspd) +s32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, s8 *ps8lnkspd) { tstrHostIFmsg strHostIFmsg; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -6257,9 +6257,9 @@ WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, s8 *ps8lnkspd) return s32Error; } -WILC_Sint32 host_int_get_statistics(WILC_WFIDrvHandle hWFIDrv, tstrStatistics *pstrStatistics) +s32 host_int_get_statistics(WILC_WFIDrvHandle hWFIDrv, tstrStatistics *pstrStatistics) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -6297,13 +6297,13 @@ WILC_Sint32 host_int_get_statistics(WILC_WFIDrvHandle hWFIDrv, tstrStatistics *p * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, u8 u8ScanSource, +s32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, u8 u8ScanSource, u8 u8ScanType, u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs, size_t IEsLen, tWILCpfScanResult ScanResult, void *pvUserArg, tstrHiddenNetwork *pstrHiddenNetwork) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tenuScanConnTimer enuScanConnTimer; @@ -6371,10 +6371,10 @@ WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, u8 u8ScanSource, * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParamVal) +s32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParamVal) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -6413,9 +6413,9 @@ WILC_Sint32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParam * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, u16 u16WID, u16 *pu16WID_Value) +s32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, u16 u16WID, u16 *pu16WID_Value) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; down(&(pstrWFIDrv->gtOsCfgValuesSem)); @@ -6557,7 +6557,7 @@ void GetPeriodicRSSI(void *pvArg) } if (pstrWFIDrv->enuHostIFstate == HOST_IF_CONNECTED) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; /* prepare the Get RSSI Message */ @@ -6594,9 +6594,9 @@ static u32 u32Intialized; static u32 msgQ_created; static u32 clients_count; -WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) +s32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv; /*if(u32Intialized == 1) @@ -6787,9 +6787,9 @@ _fail_: * @version 1.0 */ -WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) +s32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; @@ -6916,7 +6916,7 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) */ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; u32 drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; @@ -6966,7 +6966,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length) */ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; u32 drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; @@ -7029,7 +7029,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length) */ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; u32 drvHandler; tstrWILC_WFIDrv *pstrWFIDrv = NULL; @@ -7087,9 +7087,9 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length) * @date * @version 1.0 */ -WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg) +s32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -7136,9 +7136,9 @@ WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, u32 u32Session * @date * @version 1.0 */ -WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID) +s32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -7174,9 +7174,9 @@ WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32Sessio * @author * @date * @version 1.0*/ -WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, WILC_Bool bReg) +s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, WILC_Bool bReg) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -7234,12 +7234,12 @@ WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, * @date * @version 1.0 */ -WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 u32Interval, +s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 u32Interval, u32 u32DTIMPeriod, u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrHostIFSetBeacon *pstrSetBeaconParam = &strHostIFmsg.uniHostIFmsgBody.strHostIFSetBeacon; @@ -7307,9 +7307,9 @@ WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 u32Interval, * @date * @version 1.0 */ -WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) +s32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -7341,9 +7341,9 @@ WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) * @date * @version 1.0 */ -WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams) +s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrWILC_AddStaParam *pstrAddStationMsg = &strHostIFmsg.uniHostIFmsgBody.strAddStaParam; @@ -7392,9 +7392,9 @@ WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam * @date * @version 1.0 */ -WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr) +s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrHostIFDelSta *pstrDelStationMsg = &strHostIFmsg.uniHostIFmsgBody.strDelStaParam; @@ -7438,9 +7438,9 @@ WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr * @date * @version 1.0 */ -WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]) +s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrHostIFDelAllSta *pstrDelAllStationMsg = &strHostIFmsg.uniHostIFmsgBody.strHostIFDelAllSta; @@ -7502,9 +7502,9 @@ WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][E * @date * @version 1.0 */ -WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams) +s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrWILC_AddStaParam *pstrAddStationMsg = &strHostIFmsg.uniHostIFmsgBody.strAddStaParam; @@ -7542,9 +7542,9 @@ WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaPara #endif /*WILC_AP_EXTERNAL_MLME*/ uint32_t wilc_get_chipid(uint8_t); -WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout) +s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrHostIfPowerMgmtParam *pstrPowerMgmtParam = &strHostIFmsg.uniHostIFmsgBody.strPowerMgmtparam; @@ -7578,9 +7578,9 @@ WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnab return s32Error; } -WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32count) +s32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32count) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -7853,7 +7853,7 @@ void host_int_freeJoinParams(void *pJoinParams) static int host_int_addBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID, short int BufferSize, short int SessionTimeout, void *drvHandler) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo; @@ -7886,9 +7886,9 @@ static int host_int_addBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char T } -WILC_Sint32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID) +s32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo; @@ -7921,9 +7921,9 @@ WILC_Sint32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char return s32Error; } -WILC_Sint32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID) +s32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo; @@ -7964,9 +7964,9 @@ WILC_Sint32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSI * @author Abdelrahman Sobhy * @date * @version 1.0*/ -WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 idx) +s32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 idx) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; @@ -8008,9 +8008,9 @@ WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 * @author Abdelrahman Sobhy * @date * @version 1.0*/ -WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 idx) +s32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 idx) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; tstrHostIFmsg strHostIFmsg; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 1f107d0b2ce0..afe92063f44f 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -277,7 +277,7 @@ typedef void (*tWILCpfRemainOnChanReady)(void *); /*Remain on channel callback f /* typedef u32 WILC_WFIDrvHandle; */ typedef struct { - WILC_Sint32 s32Dummy; + s32 s32Dummy; } *WILC_WFIDrvHandle; /*! @@ -496,7 +496,7 @@ typedef struct { * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddress); +s32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddress); /** * @brief removes WEP key * @details valid only in BSS STA mode if External Supplicant support is enabled. @@ -511,7 +511,7 @@ WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8StaAddre * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, u8 u8Index); +s32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, u8 u8Index); /** * @brief sets WEP deafault key * @details Sets the index of the WEP encryption key in use, @@ -524,7 +524,7 @@ WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, u8 u8Index); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, u8 u8Index); +s32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, u8 u8Index); /** * @brief sets WEP deafault key @@ -545,7 +545,7 @@ WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, u8 u8Index); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx); +s32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx); /** * @brief host_int_add_wep_key_bss_ap * @details valid only in AP mode if External Supplicant support is enabled. @@ -560,7 +560,7 @@ WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const u8 *pu * @date 28 Feb 2013 * @version 1.0 */ -WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, AUTHTYPE_T tenuAuth_type); +s32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, AUTHTYPE_T tenuAuth_type); /** * @brief adds ptk Key @@ -578,7 +578,7 @@ WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8 * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen, +s32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen, const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx); /** @@ -593,7 +593,7 @@ WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8Ptk, u8 u8P * @date 15 April 2013 * @version 1.0 */ -WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, u32 *pu32InactiveTime); +s32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, u32 *pu32InactiveTime); /** * @brief adds Rx GTk Key @@ -611,7 +611,7 @@ WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, const u8 *mac, * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen, +s32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen, u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode); @@ -632,7 +632,7 @@ WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx); +s32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx); /** * @brief caches the pmkid @@ -655,7 +655,7 @@ WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, u8 u8KeyLen, u8 *pu8T * @version 1.0 */ -WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAttr *pu8PmkidInfoArray); +s32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAttr *pu8PmkidInfoArray); /** * @brief gets the cached the pmkid info * @details valid only in BSS STA mode if External Supplicant @@ -679,7 +679,7 @@ WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAt * @version 1.0 */ -WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoArray, +s32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoArray, u32 u32PmkidInfoLen); /** @@ -696,7 +696,7 @@ WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PmkidInfoA * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PassPhrase, +s32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PassPhrase, u8 u8Psklength); /** * @brief gets the pass phrase @@ -712,7 +712,7 @@ WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 * * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, +s32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, u8 *pu8PassPhrase, u8 u8Psklength); /** @@ -726,7 +726,7 @@ WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, * @date 19 April 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress); +s32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress); /** * @brief sets mac address @@ -739,7 +739,7 @@ WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress * @date 16 July 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress); +s32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress); /** * @brief wait until msg q is empty @@ -752,7 +752,7 @@ WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8MacAddress * @date 19 march 2014 * @version 1.0 */ -WILC_Sint32 host_int_wait_msg_queue_idle(void); +s32 host_int_wait_msg_queue_idle(void); /** * @brief gets the site survey results @@ -784,7 +784,7 @@ WILC_Sint32 host_int_wait_msg_queue_idle(void); * @version 1.0 */ #ifndef CONNECT_DIRECT -WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, +s32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], u32 u32MaxSiteSrvyFragLen); #endif @@ -805,7 +805,7 @@ WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, * @version 1.0 */ -WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource); +s32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource); /** * @brief gets scan source of the last scan * @details @@ -821,7 +821,7 @@ WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 scanSource * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSource); +s32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSource); /** * @brief sets a join request @@ -835,7 +835,7 @@ WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ScanSo * @version 1.0 */ -WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8bssid, +s32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8bssid, const u8 *pu8ssid, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen, tWILCpfConnectResult pfConnectResult, void *pvUserArg, @@ -855,7 +855,7 @@ WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, u8 *pu8bssid, * @version 8.0 */ -WILC_Sint32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv); +s32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv); /** @@ -869,7 +869,7 @@ WILC_Sint32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, u16 u16ReasonCode); +s32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, u16 u16ReasonCode); /** * @brief disconnects a sta @@ -882,7 +882,7 @@ WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, u16 u16ReasonCode); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id); +s32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id); /** * @brief gets a Association request info * @details @@ -909,7 +909,7 @@ WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, u8 assoc_id); * @version 1.0 */ -WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocReqInfo, +s32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocReqInfo, u32 u32AssocReqInfoLen); /** * @brief gets a Association Response info @@ -923,7 +923,7 @@ WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR * @version 1.0 */ -WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo, +s32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo, u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen); /** * @brief gets a Association Response info @@ -940,7 +940,7 @@ WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocR * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowerLevel, +s32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowerLevel, u32 u32RxPowerLevelLen); /** @@ -958,7 +958,7 @@ WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, u8 *pu8RxPowe * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 u8ChNum); +s32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 u8ChNum); /** * @brief gets the current channel index @@ -975,7 +975,7 @@ WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 u8ChNum); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo); +s32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo); /** * @brief gets the sta rssi * @details gets the currently maintained RSSI value for the station. @@ -989,8 +989,8 @@ WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, u8 *pu8ChNo); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, s8 *ps8Rssi); -WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, s8 *ps8lnkspd); +s32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, s8 *ps8Rssi); +s32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, s8 *ps8lnkspd); /** * @brief scans a set of channels * @details @@ -1008,7 +1008,7 @@ WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, s8 *ps8lnkspd); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, u8 u8ScanSource, +s32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, u8 u8ScanSource, u8 u8ScanType, u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs, size_t IEsLen, tWILCpfScanResult ScanResult, @@ -1024,7 +1024,7 @@ WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, u8 u8ScanSource, * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParamVal); +s32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParamVal); /** * @brief gets configuration wids values @@ -1038,7 +1038,7 @@ WILC_Sint32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParam * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, u16 u16WID, u16 *pu16WID_Value); +s32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, u16 u16WID, u16 *pu16WID_Value); /*****************************************************************************/ /* Notification Functions */ /*****************************************************************************/ @@ -1085,7 +1085,7 @@ void host_int_send_network_info_to_host * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv); +s32 host_int_init(WILC_WFIDrvHandle *phWFIDrv); /** * @brief host interface initialization function @@ -1096,11 +1096,11 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv); * @date 8 March 2012 * @version 1.0 */ -WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv); +s32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv); /*! - * @fn WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv,u8 u8Index) + * @fn s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv,u8 u8Index) * @brief Sends a beacon to the firmware to be transmitted over the air * @details * @param[in,out] hWFIDrv handle to the wifi driver @@ -1121,14 +1121,14 @@ WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv); * @version 1.0 Description * */ -WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 u32Interval, +s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 u32Interval, u32 u32DTIMPeriod, u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8tail); /*! - * @fn WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) + * @fn s32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) * @brief Removes the beacon and stops trawilctting it over the air * @details * @param[in,out] hWFIDrv handle to the wifi driver @@ -1139,10 +1139,10 @@ WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 u32Interval, * @date 10 Julys 2012 * @version 1.0 Description */ -WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv); +s32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv); /*! - * @fn WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam strStaParams) + * @fn s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam strStaParams) * @brief Notifies the firmware with a new associated stations * @details * @param[in,out] hWFIDrv handle to the wifi driver @@ -1154,10 +1154,10 @@ WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv); * @date 12 July 2012 * @version 1.0 Description */ -WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams); +s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams); /*! - * @fn WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, const u8* pu8MacAddr) + * @fn s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, const u8* pu8MacAddr) * @brief Deauthenticates clients when group is terminating * @details * @param[in,out] hWFIDrv handle to the wifi driver @@ -1169,10 +1169,10 @@ WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam * @date 09 April 2014 * @version 1.0 Description */ -WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]); +s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]); /*! - * @fn WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr) + * @fn s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr) * @brief Notifies the firmware with a new deleted station * @details * @param[in,out] hWFIDrv handle to the wifi driver @@ -1184,10 +1184,10 @@ WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, u8 pu8MacAddr[][E * @date 15 July 2012 * @version 1.0 Description */ -WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr); +s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr); /*! - * @fn WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam strStaParams) + * @fn s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam strStaParams) * @brief Notifies the firmware with new parameters of an already associated station * @details * @param[in,out] hWFIDrv handle to the wifi driver @@ -1199,10 +1199,10 @@ WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr * @date 15 July 2012 * @version 1.0 Description */ -WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams); +s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams); /*! - * @fn WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout) + * @fn s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout) * @brief Set the power management mode to enabled or disabled * @details * @param[in,out] hWFIDrv handle to the wifi driver @@ -1216,7 +1216,7 @@ WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaPara * @date 24 November 2012 * @version 1.0 Description */ -WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout); +s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout); /* @param[in,out] hWFIDrv handle to the wifi driver * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise * @param[in] u8count count of mac address entries in the filter table @@ -1228,7 +1228,7 @@ WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnab * @date 24 November 2012 * @version 1.0 Description */ -WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32count); +s32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32count); /** * @brief host_int_setup_ipaddress * @details set IP address on firmware @@ -1238,7 +1238,7 @@ WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool * @date * @version 1.0 */ -WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8IPAddr, u8 idx); +s32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8IPAddr, u8 idx); /** @@ -1250,7 +1250,7 @@ WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8IPAddr, u * @date * @version 1.0 */ -WILC_Sint32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID); +s32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID); /** * @brief host_int_delBASession @@ -1261,7 +1261,7 @@ WILC_Sint32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char * @date * @version 1.0 */ -WILC_Sint32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID); +s32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID); /** @@ -1273,7 +1273,7 @@ WILC_Sint32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSI * @date * @version 1.0 */ -WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8IPAddr, u8 idx); +s32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8IPAddr, u8 idx); #ifdef WILC_P2P /** @@ -1285,7 +1285,7 @@ WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *pu8IPAddr, u8 * @date * @version 1.0 */ -WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg); +s32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg); /** * @brief host_int_ListenStateExpired @@ -1301,7 +1301,7 @@ WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, u32 u32Session * @date * @version 1.0 */ -WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID); +s32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID); /** * @brief host_int_frame_register @@ -1312,7 +1312,7 @@ WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32Sessio * @date * @version 1.0 */ -WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, WILC_Bool bReg); +s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, WILC_Bool bReg); #endif /** * @brief host_int_set_wfi_drv_handler @@ -1323,10 +1323,10 @@ WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, * @date * @version 1.0 */ -WILC_Sint32 host_int_set_wfi_drv_handler(u32 u32address); -WILC_Sint32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode); +s32 host_int_set_wfi_drv_handler(u32 u32address); +s32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode); -static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent); +static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent); static int host_int_addBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID, short int BufferSize, short int SessionTimeout, void *drvHandler); @@ -1334,7 +1334,7 @@ static int host_int_addBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char T void host_int_freeJoinParams(void *pJoinParams); -WILC_Sint32 host_int_get_statistics(WILC_WFIDrvHandle hWFIDrv, tstrStatistics *pstrStatistics); +s32 host_int_get_statistics(WILC_WFIDrvHandle hWFIDrv, tstrStatistics *pstrStatistics); /*****************************************************************************/ /* */ diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 6b8001da31c6..3aa9a4b6b4f0 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2379,7 +2379,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) u32 size = 0, length = 0; perInterface_wlan_t *nic; struct WILC_WFI_priv *priv; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; diff --git a/drivers/staging/wilc1000/wilc_errorsupport.h b/drivers/staging/wilc1000/wilc_errorsupport.h index dd8affabc80d..6963a4694d3f 100644 --- a/drivers/staging/wilc1000/wilc_errorsupport.h +++ b/drivers/staging/wilc1000/wilc_errorsupport.h @@ -37,7 +37,7 @@ /* Error type */ -typedef WILC_Sint32 WILC_ErrNo; +typedef s32 WILC_ErrNo; #define WILC_IS_ERR(__status__) (__status__ < WILC_SUCCESS) diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h index 6deec34646a6..f9a5a3afffe9 100644 --- a/drivers/staging/wilc1000/wilc_oswrapper.h +++ b/drivers/staging/wilc1000/wilc_oswrapper.h @@ -14,7 +14,6 @@ #define WILC_OSW_INTERFACE_VER 2 /* Integer Types */ -typedef signed int WILC_Sint32; typedef signed long long WILC_Sint64; /* Boolean type */ diff --git a/drivers/staging/wilc1000/wilc_strutils.c b/drivers/staging/wilc1000/wilc_strutils.c index 52df793e0a37..e9f487a3b956 100644 --- a/drivers/staging/wilc1000/wilc_strutils.c +++ b/drivers/staging/wilc1000/wilc_strutils.c @@ -9,7 +9,7 @@ * @date 18 Aug 2010 * @version 1.0 */ -WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, u32 u32Count) +s32 WILC_memcmp(const void *pvArg1, const void *pvArg2, u32 u32Count) { return memcmp(pvArg1, pvArg2, u32Count); } @@ -46,10 +46,10 @@ WILC_Char *WILC_strncpy(WILC_Char *pcTarget, const WILC_Char *pcSource, return strncpy(pcTarget, pcSource, u32Count); } -WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, +s32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, u32 u32Count) { - WILC_Sint32 s32Result; + s32 s32Result; if (pcStr1 == NULL && pcStr2 == NULL) { s32Result = 0; diff --git a/drivers/staging/wilc1000/wilc_strutils.h b/drivers/staging/wilc1000/wilc_strutils.h index 6d9b400ecc18..75670a2800bc 100644 --- a/drivers/staging/wilc1000/wilc_strutils.h +++ b/drivers/staging/wilc1000/wilc_strutils.h @@ -22,7 +22,7 @@ * @date 18 Aug 2010 * @version 1.0 */ -WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, u32 u32Count); +s32 WILC_memcmp(const void *pvArg1, const void *pvArg2, u32 u32Count); /*! * @brief Internal implementation for memory copy @@ -113,7 +113,7 @@ WILC_Char *WILC_strncpy(WILC_Char *pcTarget, const WILC_Char *pcSource, * @date 7 Dec 2010 * @version 1.0 */ -WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, +s32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2, u32 u32Count); /*! diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index f330876e465b..fde2a649e758 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -195,19 +195,19 @@ void refresh_scan(void *pUserVoid, uint8_t all, WILC_Bool bDirectScan) if ((!pstrNetworkInfo->u8Found) || all) { - WILC_Sint32 s32Freq; + s32 s32Freq; struct ieee80211_channel *channel; if (pstrNetworkInfo != NULL) { - s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ); + s32Freq = ieee80211_channel_to_frequency((s32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ); channel = ieee80211_get_channel(wiphy, s32Freq); rssi = get_rssi_avg(pstrNetworkInfo); if (WILC_memcmp("DIRECT-", pstrNetworkInfo->au8ssid, 7) || bDirectScan) { bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, pstrNetworkInfo->au8bssid, pstrNetworkInfo->u64Tsf, pstrNetworkInfo->u16CapInfo, pstrNetworkInfo->u16BeaconPeriod, (const u8 *)pstrNetworkInfo->pu8IEs, - (size_t)pstrNetworkInfo->u16IEsLen, (((WILC_Sint32)rssi) * 100), GFP_KERNEL); + (size_t)pstrNetworkInfo->u16IEsLen, (((s32)rssi) * 100), GFP_KERNEL); cfg80211_put_bss(wiphy, bss); } } @@ -380,9 +380,9 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo { struct WILC_WFI_priv *priv; struct wiphy *wiphy; - WILC_Sint32 s32Freq; + s32 s32Freq; struct ieee80211_channel *channel; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct cfg80211_bss *bss = NULL; priv = (struct WILC_WFI_priv *)pUserVoid; @@ -392,21 +392,21 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo WILC_NULLCHECK(s32Error, wiphy); if (wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && - ((((WILC_Sint32)pstrNetworkInfo->s8rssi) * 100) < 0 + ((((s32)pstrNetworkInfo->s8rssi) * 100) < 0 || - (((WILC_Sint32)pstrNetworkInfo->s8rssi) * 100) > 100) + (((s32)pstrNetworkInfo->s8rssi) * 100) > 100) ) { WILC_ERRORREPORT(s32Error, WILC_FAIL); } if (pstrNetworkInfo != NULL) { - s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ); + s32Freq = ieee80211_channel_to_frequency((s32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ); channel = ieee80211_get_channel(wiphy, s32Freq); WILC_NULLCHECK(s32Error, channel); PRINT_INFO(CFG80211_DBG, "Network Info:: CHANNEL Frequency: %d, RSSI: %d, CapabilityInfo: %d," - "BeaconPeriod: %d \n", channel->center_freq, (((WILC_Sint32)pstrNetworkInfo->s8rssi) * 100), + "BeaconPeriod: %d \n", channel->center_freq, (((s32)pstrNetworkInfo->s8rssi) * 100), pstrNetworkInfo->u16CapInfo, pstrNetworkInfo->u16BeaconPeriod); if (pstrNetworkInfo->bNewNetwork == WILC_TRUE) { @@ -429,7 +429,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo if (!(WILC_memcmp("DIRECT-", pstrNetworkInfo->au8ssid, 7))) { bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, pstrNetworkInfo->au8bssid, pstrNetworkInfo->u64Tsf, pstrNetworkInfo->u16CapInfo, pstrNetworkInfo->u16BeaconPeriod, (const u8 *)pstrNetworkInfo->pu8IEs, - (size_t)pstrNetworkInfo->u16IEsLen, (((WILC_Sint32)pstrNetworkInfo->s8rssi) * 100), GFP_KERNEL); + (size_t)pstrNetworkInfo->u16IEsLen, (((s32)pstrNetworkInfo->s8rssi) * 100), GFP_KERNEL); cfg80211_put_bss(wiphy, bss); } @@ -510,7 +510,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo int WILC_WFI_Set_PMKSA(u8 *bssid, struct WILC_WFI_priv *priv) { u32 i; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; for (i = 0; i < priv->pmkid_list.numpmkid; i++) { @@ -701,7 +701,7 @@ static int WILC_WFI_CfgSetChannel(struct wiphy *wiphy, u32 channelnum = 0; struct WILC_WFI_priv *priv; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; priv = wiphy_priv(wiphy); channelnum = ieee80211_frequency_to_channel(chandef->chan->center_freq); @@ -737,7 +737,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r { struct WILC_WFI_priv *priv; u32 i; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u8 au8ScanChanList[MAX_NUM_SCANNED_NETWORKS]; tstrHiddenNetwork strHiddenNetwork; @@ -825,7 +825,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u32 i; u8 u8security = NO_ENCRYPT; AUTHTYPE_T tenuAuth_type = ANY; @@ -1079,7 +1079,7 @@ done: */ static int WILC_WFI_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; #ifdef WILC_P2P tstrWILC_WFIDrv *pstrWFIDrv; @@ -1130,7 +1130,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k const u8 *mac_addr, struct key_params *params) { - WILC_Sint32 s32Error = WILC_SUCCESS, KeyLen = params->key_len; + s32 s32Error = WILC_SUCCESS, KeyLen = params->key_len; u32 i; struct WILC_WFI_priv *priv; const u8 *pu8RxMic = NULL; @@ -1424,7 +1424,7 @@ static int WILC_WFI_del_key(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac_addr) { struct WILC_WFI_priv *priv; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; priv = wiphy_priv(wiphy); @@ -1534,7 +1534,7 @@ static int WILC_WFI_get_key(struct wiphy *wiphy, struct net_device *netdev, u8 k const u8 *mac_addr, void *cookie, void (*callback)(void *cookie, struct key_params *)) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; struct key_params key_params; @@ -1582,7 +1582,7 @@ static int WILC_WFI_get_key(struct wiphy *wiphy, struct net_device *netdev, u8 k static int WILC_WFI_set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, bool unicast, bool multicast) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; @@ -1610,7 +1610,7 @@ static int WILC_WFI_set_default_key(struct wiphy *wiphy, struct net_device *netd static int WILC_WFI_dump_survey(struct wiphy *wiphy, struct net_device *netdev, int idx, struct survey_info *info) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; if (idx != 0) { @@ -1637,7 +1637,7 @@ extern uint32_t Statisitcs_totalAcks, Statisitcs_DroppedAcks; static int WILC_WFI_get_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_info *sinfo) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; perInterface_wlan_t *nic; #ifdef WILC_AP_EXTERNAL_MLME @@ -1819,7 +1819,7 @@ static int WILC_WFI_disassoc(struct wiphy *wiphy, struct net_device *dev, */ static int WILC_WFI_set_wiphy_params(struct wiphy *wiphy, u32 changed) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrCfgParamVal pstrCfgParamVal; struct WILC_WFI_priv *priv; @@ -1878,7 +1878,7 @@ static int WILC_WFI_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev, const u8 *peer, const struct cfg80211_bitrate_mask *mask) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; PRINT_D(CFG80211_DBG, "Setting Bitrate mask function\n"); return s32Error; @@ -1900,7 +1900,7 @@ static int WILC_WFI_set_pmksa(struct wiphy *wiphy, struct net_device *netdev, struct cfg80211_pmksa *pmksa) { u32 i; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; u8 flag = 0; struct WILC_WFI_priv *priv = wiphy_priv(wiphy); @@ -1952,7 +1952,7 @@ static int WILC_WFI_del_pmksa(struct wiphy *wiphy, struct net_device *netdev, u32 i; u8 flag = 0; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv = wiphy_priv(wiphy); @@ -2213,7 +2213,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) u32 header, pkt_offset; tstrWILC_WFIDrv *pstrWFIDrv; u32 i = 0; - WILC_Sint32 s32Freq; + s32 s32Freq; priv = wiphy_priv(dev->ieee80211_ptr->wiphy); pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv; @@ -2413,7 +2413,7 @@ static int WILC_WFI_remain_on_channel(struct wiphy *wiphy, struct ieee80211_channel *chan, unsigned int duration, u64 *cookie) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; priv = wiphy_priv(wiphy); @@ -2464,7 +2464,7 @@ static int WILC_WFI_cancel_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; priv = wiphy_priv(wiphy); @@ -2511,7 +2511,7 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy, const struct ieee80211_mgmt *mgmt; struct p2p_mgmt_data *mgmt_tx; struct WILC_WFI_priv *priv; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv; u32 i; perInterface_wlan_t *nic; @@ -2841,7 +2841,7 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic); static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev, enum nl80211_iftype type, u32 *flags, struct vif_params *params) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; perInterface_wlan_t *nic; u8 interface_type; @@ -3229,7 +3229,7 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev, { struct cfg80211_beacon_data *beacon = &(settings->beacon); struct WILC_WFI_priv *priv; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; priv = wiphy_priv(wiphy); PRINT_D(HOSTAPD_DBG, "Starting ap\n"); @@ -3277,7 +3277,7 @@ static int WILC_WFI_change_beacon(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_beacon_data *beacon) { struct WILC_WFI_priv *priv; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; priv = wiphy_priv(wiphy); PRINT_D(HOSTAPD_DBG, "Setting beacon\n"); @@ -3311,7 +3311,7 @@ static int WILC_WFI_change_beacon(struct wiphy *wiphy, struct net_device *dev, */ static int WILC_WFI_stop_ap(struct wiphy *wiphy, struct net_device *dev) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; u8 NullBssid[ETH_ALEN] = {0}; @@ -3351,7 +3351,7 @@ static int WILC_WFI_stop_ap(struct wiphy *wiphy, struct net_device *dev) static int WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; tstrWILC_AddStaParam strStaParams = {{0}}; perInterface_wlan_t *nic; @@ -3437,7 +3437,7 @@ static int WILC_WFI_del_station(struct wiphy *wiphy, struct net_device *dev, struct station_del_parameters *params) { const u8 *mac = params->mac; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; perInterface_wlan_t *nic; WILC_NULLCHECK(s32Error, wiphy); @@ -3482,7 +3482,7 @@ static int WILC_WFI_del_station(struct wiphy *wiphy, struct net_device *dev, static int WILC_WFI_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; tstrWILC_AddStaParam strStaParams = {{0}}; perInterface_wlan_t *nic; @@ -3767,7 +3767,7 @@ struct wireless_dev *WILC_WFI_WiphyRegister(struct net_device *net) { struct WILC_WFI_priv *priv; struct wireless_dev *wdev; - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; PRINT_D(CFG80211_DBG, "Registering wifi device\n"); @@ -3849,7 +3849,7 @@ struct wireless_dev *WILC_WFI_WiphyRegister(struct net_device *net) int WILC_WFI_InitHostInt(struct net_device *net) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; @@ -3890,7 +3890,7 @@ int WILC_WFI_InitHostInt(struct net_device *net) */ int WILC_WFI_DeInitHostInt(struct net_device *net) { - WILC_Sint32 s32Error = WILC_SUCCESS; + s32 s32Error = WILC_SUCCESS; struct WILC_WFI_priv *priv; priv = wdev_priv(net->ieee80211_ptr); -- cgit v1.2.3-59-g8ed1b From 4a01f1c3abd6aa65bef32d14ba7b37a237c894d4 Mon Sep 17 00:00:00 2001 From: Hari Prasath Gujulan Elango Date: Thu, 11 Jun 2015 07:48:13 +0000 Subject: staging: wilc1000: use memdup_user This patch replaces the kmalloc followed by copy_from_user by the wrapper routine memdup_user. Signed-off-by: Hari Prasath Gujulan Elango Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 3aa9a4b6b4f0..387d4ecc2f2c 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2459,16 +2459,10 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) size = wrq->u.data.length; if (size && wrq->u.data.pointer) { - buff = kmalloc(size, GFP_KERNEL); - if (!buff) { - s32Error = -ENOMEM; - goto done; - } - if (copy_from_user - (buff, wrq->u.data.pointer, - wrq->u.data.length)) { - s32Error = -EFAULT; + buff = memdup_user(wrq->u.data.pointer, wrq->u.data.length); + if (IS_ERR(buff)) { + s32Error = PTR_ERR(buff); goto done; } -- cgit v1.2.3-59-g8ed1b From 72ed4dc73dd7e67bdf37266e5d188fd01bcb32e1 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Fri, 12 Jun 2015 14:11:44 +0900 Subject: staging: wilc1000: change WILC_BOOL to bool change own data type(WILC_BOOL) to common data type(bool) but that's contain true/false value. so change with them. Signed-off-by: Dean Lee Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigurator.c | 26 ++-- drivers/staging/wilc1000/coreconfigurator.h | 4 +- drivers/staging/wilc1000/fifo_buffer.c | 2 +- drivers/staging/wilc1000/fifo_buffer.h | 2 +- drivers/staging/wilc1000/host_interface.c | 166 +++++++++++----------- drivers/staging/wilc1000/host_interface.h | 20 +-- drivers/staging/wilc1000/linux_mon.c | 6 +- drivers/staging/wilc1000/linux_wlan.c | 20 +-- drivers/staging/wilc1000/wilc_msgqueue.c | 8 +- drivers/staging/wilc1000/wilc_oswrapper.h | 6 - drivers/staging/wilc1000/wilc_platform.h | 2 +- drivers/staging/wilc1000/wilc_spi.c | 1 - drivers/staging/wilc1000/wilc_timer.h | 4 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 136 +++++++++--------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.c | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 8 +- drivers/staging/wilc1000/wilc_wlan.c | 34 ++--- drivers/staging/wilc1000/wilc_wlan_cfg.c | 4 +- 19 files changed, 223 insertions(+), 230 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index c9cc817e7dca..9abc73d3646d 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -145,7 +145,7 @@ typedef struct { WILC_Char *pcRespBuffer; s32 s32MaxRespBuffLen; s32 s32BytesRead; - WILC_Bool bRespRequired; + bool bRespRequired; } tstrConfigPktInfo; @@ -1520,7 +1520,7 @@ void ProcessBinWid(WILC_Char *pcPacket, s32 *ps32PktLen, s32 further_process_response(u8 *resp, u16 u16WIDid, u16 cfg_len, - WILC_Bool process_wid_num, + bool process_wid_num, u32 cnt, tstrWID *pstrWIDresult) { @@ -1693,7 +1693,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) u16 u16WIDid = 0; u16 cfg_len = 0; tenuWIDtype enuWIDtype = WID_UNDEF; - WILC_Bool num_wid_processed = WILC_FALSE; + bool num_wid_processed = false; u32 cnt = 0; u32 idx = 0; u32 ResCnt = 0; @@ -1717,17 +1717,17 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) idx++; } idx += 3; - if ((u16WIDid == g_wid_num) && (num_wid_processed == WILC_FALSE)) { - num_wid_processed = WILC_TRUE; + if ((u16WIDid == g_wid_num) && (num_wid_processed == false)) { + num_wid_processed = true; - if (-2 == further_process_response(&resp[idx], u16WIDid, cfg_len, WILC_TRUE, 0, &pstrWIDcfgResult[ResCnt])) { + if (-2 == further_process_response(&resp[idx], u16WIDid, cfg_len, true, 0, &pstrWIDcfgResult[ResCnt])) { return -2; } ResCnt++; } else { for (cnt = 0; cnt < g_num_total_switches; cnt++) { if (gastrWIDs[cnt].u16WIDid == u16WIDid) { - if (-2 == further_process_response(&resp[idx], u16WIDid, cfg_len, WILC_FALSE, cnt, + if (-2 == further_process_response(&resp[idx], u16WIDid, cfg_len, false, cnt, &pstrWIDcfgResult[ResCnt])) { return -2; } @@ -1913,7 +1913,7 @@ s32 CreateConfigPacket(s8 *ps8packet, s32 *ps32PacketLength, } s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 *ps32BytesRead, - WILC_Bool bRespRequired) + bool bRespRequired) { s32 s32Error = WILC_SUCCESS; /*bug 3878*/ @@ -1923,7 +1923,7 @@ s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 *ps32 * gstrConfigPktInfo.bRespRequired = bRespRequired;*/ - if (gstrConfigPktInfo.bRespRequired == WILC_TRUE) { + if (gstrConfigPktInfo.bRespRequired == true) { down(&SemHandlePktResp); *ps32BytesRead = gstrConfigPktInfo.s32BytesRead; @@ -1950,7 +1950,7 @@ s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 *ps32 */ #ifdef SIMULATION s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, - u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler) + u32 u32WIDsCount, bool bRespRequired, u32 drvHandler) { s32 s32Error = WILC_SUCCESS; s32 err = WILC_SUCCESS; @@ -1984,7 +1984,7 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, ConfigWaitResponse(gps8ConfigPacket, MAX_PACKET_BUFF_SIZE, &s32RcvdRespLen, bRespRequired); - if (bRespRequired == WILC_TRUE) { + if (bRespRequired == true) { /* 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) { @@ -2021,7 +2021,7 @@ s32 ConfigProvideResponse(WILC_Char *pcRespBuffer, s32 s32RespLen) { s32 s32Error = WILC_SUCCESS; - if (gstrConfigPktInfo.bRespRequired == WILC_TRUE) { + if (gstrConfigPktInfo.bRespRequired == true) { if (s32RespLen <= gstrConfigPktInfo.s32MaxRespBuffLen) { WILC_memcpy(gstrConfigPktInfo.pcRespBuffer, pcRespBuffer, s32RespLen); gstrConfigPktInfo.s32BytesRead = s32RespLen; @@ -2129,7 +2129,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps; * @version 1.0 */ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, - u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler) + u32 u32WIDsCount, bool bRespRequired, u32 drvHandler) { s32 counter = 0, ret = 0; if (gpstrWlanOps == NULL) { diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 63db151fa752..6ed82e2b4fc9 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -418,7 +418,7 @@ typedef struct { u8 u8channel; unsigned long u32TimeRcvdInScanCached; /* of type unsigned long to be accepted by the linux kernel macro time_after() */ unsigned long u32TimeRcvdInScan; - WILC_Bool bNewNetwork; + bool bNewNetwork; #ifdef AGING_ALG u8 u8Found; #endif @@ -476,7 +476,7 @@ extern s32 CoreConfiguratorInit(void); extern s32 CoreConfiguratorDeInit(void); extern s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, - u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler); + u32 u32WIDsCount, bool bRespRequired, u32 drvHandler); extern s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); extern s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); diff --git a/drivers/staging/wilc1000/fifo_buffer.c b/drivers/staging/wilc1000/fifo_buffer.c index 788398ca76e5..c801406d1aa8 100644 --- a/drivers/staging/wilc1000/fifo_buffer.c +++ b/drivers/staging/wilc1000/fifo_buffer.c @@ -86,7 +86,7 @@ u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32By return u32Error; } -u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToWrite, WILC_Bool bForceOverWrite) +u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToWrite, bool bForceOverWrite) { u32 u32Error = 0; tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; diff --git a/drivers/staging/wilc1000/fifo_buffer.h b/drivers/staging/wilc1000/fifo_buffer.h index 912a33327bc7..57f7732db2da 100644 --- a/drivers/staging/wilc1000/fifo_buffer.h +++ b/drivers/staging/wilc1000/fifo_buffer.h @@ -20,4 +20,4 @@ extern u32 FIFO_DeInit(tHANDLE hFifo); extern u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32BytesRead); extern u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, - u32 u32BytesToWrite, WILC_Bool bForceOverWrite); + u32 u32BytesToWrite, bool bForceOverWrite); diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 8ee71ee16d40..17ab5cdfcf12 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -11,7 +11,7 @@ extern u8 connecting; extern WILC_TimerHandle hDuringIpTimer; #endif -extern WILC_Bool bEnablePS; +extern bool bEnablePS; /*BugID_5137*/ extern u8 g_wilc_initialized; /*****************************************************************************/ @@ -318,7 +318,7 @@ typedef struct _tstrHostIFDelBeacon { */ typedef struct { - WILC_Bool bIsEnabled; + bool bIsEnabled; u32 u32count; } tstrHostIFSetMulti; @@ -379,7 +379,7 @@ typedef struct _tstrTimerCb { */ typedef struct { - WILC_Bool bIsEnabled; + bool bIsEnabled; u32 u32Timeout; } tstrHostIfPowerMgmtParam; @@ -496,7 +496,7 @@ typedef struct _tstrJoinBssParam { u8 ht_capable; u8 wmm_cap; u8 uapsd_cap; - WILC_Bool rsn_found; + bool rsn_found; u8 rsn_grp_policy; u8 mode_802_11i; u8 rsn_pcip_policy[3]; @@ -540,7 +540,7 @@ typedef enum { tstrWILC_WFIDrv *terminated_handle = NULL; tstrWILC_WFIDrv *gWFiDrvHandle = NULL; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP -WILC_Bool g_obtainingIP = WILC_FALSE; +bool g_obtainingIP = false; #endif u8 P2P_LISTEN_STATE; static struct task_struct *HostIFthreadHandler; @@ -562,7 +562,7 @@ static u8 gapu8RcvdSurveyResults[2][MAX_SURVEY_RESULT_FRAG_SIZE]; static u8 gapu8RcvdAssocResp[MAX_ASSOC_RESP_FRAME_SIZE]; -WILC_Bool gbScanWhileConnected = WILC_FALSE; +bool gbScanWhileConnected = false; static s8 gs8Rssi; static s8 gs8lnkspd; @@ -622,7 +622,7 @@ static s32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHostIFSetC PRINT_D(HOSTINF_DBG, "Setting channel\n"); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to set channel\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -659,7 +659,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if ((pstrHostIfSetDrvHandler->u32Address) == (u32)NULL) { @@ -705,7 +705,7 @@ static s32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode /*Sending Cfg*/ PRINT_INFO(HOSTINF_DBG, "pstrWFIDrv= %p \n", pstrWFIDrv); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL) { @@ -755,7 +755,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) strWID.ps8WidVal = (u8 *)pu8IPAddr; strWID.s32ValueSize = IP_ALEN; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); @@ -799,7 +799,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN); strWID.s32ValueSize = IP_ALEN; - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); PRINT_INFO(HOSTINF_DBG, "%d.%d.%d.%d\n", (u8)(strWID.ps8WidVal[0]), (u8)(strWID.ps8WidVal[1]), (u8)(strWID.ps8WidVal[2]), (u8)(strWID.ps8WidVal[3])); @@ -859,7 +859,7 @@ static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrH 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, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to set mac address\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -897,7 +897,7 @@ static s32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddress *pstrH strWID.s32ValueSize = ETH_ALEN; /*Sending Cfg*/ - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_FALSE, (u32)drvHandler); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, false, (u32)drvHandler); if (s32Error) { PRINT_ER("Failed to get mac address\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -1205,7 +1205,7 @@ static s32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *strHostIFCf } u8WidCnt++; } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Error in setting CFG params\n"); @@ -1367,12 +1367,12 @@ static s32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr) /* gWFiDrvHandle->enuHostIFstate = HOST_IF_SCANNING; */ if (pstrWFIDrv->enuHostIFstate == HOST_IF_CONNECTED) { - gbScanWhileConnected = WILC_TRUE; + gbScanWhileConnected = true; } else if (pstrWFIDrv->enuHostIFstate == HOST_IF_IDLE) { - gbScanWhileConnected = WILC_FALSE; + gbScanWhileConnected = false; } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send scan paramters config packet\n"); @@ -1450,7 +1450,7 @@ static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent) strWID.s32ValueSize = sizeof(WILC_Char); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to set abort running scan\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -1649,7 +1649,7 @@ static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFcon /* ////////////////////// */ #endif - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Handle_Connect()] failed to send config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -1990,7 +1990,7 @@ static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFcon PRINT_D(GENERIC_DBG, "save bssid = %x:%x:%x:%x:%x:%x\n", (u8ConnectedSSID[0]), (u8ConnectedSSID[1]), (u8ConnectedSSID[2]), (u8ConnectedSSID[3]), (u8ConnectedSSID[4]), (u8ConnectedSSID[5])); } - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Handle_Connect()] failed to send config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -2121,7 +2121,7 @@ static s32 Handle_FlushConnect(void *drvHandler) #endif - s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, WILC_FALSE, gu8FlushedJoinReqDrvHandler); + s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, gu8FlushedJoinReqDrvHandler); if (s32Error) { PRINT_ER("Handle_Flush_Connect()] failed to send config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -2159,7 +2159,7 @@ static s32 Handle_ConnectTimeout(void *drvHandler) pstrWFIDrv->enuHostIFstate = HOST_IF_IDLE; - gbScanWhileConnected = WILC_FALSE; + gbScanWhileConnected = false; WILC_memset(&strConnectInfo, 0, sizeof(tstrConnectInfo)); @@ -2206,7 +2206,7 @@ static s32 Handle_ConnectTimeout(void *drvHandler) PRINT_D(HOSTINF_DBG, "Sending disconnect request\n"); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send dissconect config packet\n"); } @@ -2256,7 +2256,7 @@ static s32 Handle_ConnectTimeout(void *drvHandler) static s32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdNetworkInfo) { u32 i; - WILC_Bool bNewNtwrkFound; + bool bNewNtwrkFound; @@ -2268,7 +2268,7 @@ static s32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdN - bNewNtwrkFound = WILC_TRUE; + bNewNtwrkFound = true; PRINT_INFO(HOSTINF_DBG, "Handling received network info\n"); /*if there is a an ongoing scan request*/ @@ -2297,14 +2297,14 @@ static s32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdN * the rssi for this cached network and send this updated network to the upper layer but * don't add a new record for it */ pstrWFIDrv->strWILC_UsrScanReq.astrFoundNetworkInfo[i].s8rssi = pstrNetworkInfo->s8rssi; - bNewNtwrkFound = WILC_FALSE; + bNewNtwrkFound = false; break; } } } } - if (bNewNtwrkFound == WILC_TRUE) { + if (bNewNtwrkFound == true) { /* here it is confirmed that it is a new discovered network, * so add its record then call the User CallBack function */ @@ -2320,7 +2320,7 @@ static s32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdN pstrWFIDrv->strWILC_UsrScanReq.u32RcvdChCount++; - pstrNetworkInfo->bNewNetwork = WILC_TRUE; + pstrNetworkInfo->bNewNetwork = true; /*Bug4218: Parsing Join Param*/ /* add new BSS to JoinBssTable */ #ifdef WILC_PARSE_SCAN_IN_HOST @@ -2337,7 +2337,7 @@ static s32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdN PRINT_WRN(HOSTINF_DBG, "Discovered networks exceeded max. limit \n"); } } else { - pstrNetworkInfo->bNewNetwork = WILC_FALSE; + pstrNetworkInfo->bNewNetwork = false; /* just call the User CallBack function to send the same discovered network with its updated RSSI */ pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo, pstrWFIDrv->strWILC_UsrScanReq.u32UserScanPvoid, NULL); @@ -2541,7 +2541,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pst #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP PRINT_D(GENERIC_DBG, "Obtaining an IP, Disable Scan\n"); - g_obtainingIP = WILC_TRUE; + g_obtainingIP = true; WILC_TimerStart(&hDuringIpTimer, 10000, NULL, NULL); #endif @@ -2556,7 +2556,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pst } else { PRINT_D(HOSTINF_DBG, "MAC status : %d and Connect Status : %d\n", u8MacStatus, strConnectInfo.u16ConnectStatus); pstrWFIDrv->enuHostIFstate = HOST_IF_IDLE; - gbScanWhileConnected = WILC_FALSE; + gbScanWhileConnected = false; } /* Deallocation */ @@ -2608,7 +2608,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pst if (pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult != NULL) { #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP - g_obtainingIP = WILC_FALSE; + g_obtainingIP = false; host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0); #endif @@ -2667,7 +2667,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pst } pstrWFIDrv->enuHostIFstate = HOST_IF_IDLE; - gbScanWhileConnected = WILC_FALSE; + gbScanWhileConnected = false; } else if ((u8MacStatus == MAC_DISCONNECTED) && (pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult != NULL)) { @@ -2767,7 +2767,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[3].ps8WidVal = (s8 *)pu8keybuf; - s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, true, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); @@ -2795,7 +2795,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.ps8WidVal = (s8 *)pu8keybuf; strWID.s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); } else if (pstrHostIFkeyAttr->u8KeyAction & REMOVEKEY) { @@ -2807,7 +2807,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.ps8WidVal = s8idxarray; strWID.s32ValueSize = 1; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); } else { strWID.u16WIDid = (u16)WID_KEY_ID; strWID.enuWIDtype = WID_CHAR; @@ -2816,7 +2816,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) PRINT_D(HOSTINF_DBG, "Setting default key index\n"); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); } up(&(pstrWFIDrv->hSemTestKeyBlock)); break; @@ -2862,7 +2862,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWIDList[1].ps8WidVal = (s8 *)pu8keybuf; strWIDList[1].s32ValueSize = RX_MIC_KEY_MSG_LEN; - s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); @@ -2909,7 +2909,7 @@ static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr) strWID.ps8WidVal = (s8 *)pu8keybuf; strWID.s32ValueSize = RX_MIC_KEY_MSG_LEN; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); @@ -2966,7 +2966,7 @@ _WPARxGtk_end_case_: strWIDList[1].ps8WidVal = (s8 *)pu8keybuf; strWIDList[1].s32ValueSize = PTK_KEY_MSG_LEN + 1; - s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); /* ////////////////////////// */ @@ -3007,7 +3007,7 @@ _WPARxGtk_end_case_: strWID.ps8WidVal = (s8 *)pu8keybuf; strWID.s32ValueSize = PTK_KEY_MSG_LEN; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); /* ////////////////////////// */ @@ -3046,7 +3046,7 @@ _WPAPtk_end_case_: strWID.ps8WidVal = (s8 *)pu8keybuf; strWID.s32ValueSize = (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); WILC_FREE(pu8keybuf); break; @@ -3089,13 +3089,13 @@ static void Handle_Disconnect(void *drvHandler) #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP - g_obtainingIP = WILC_FALSE; + g_obtainingIP = false; host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0); #endif WILC_memset(u8ConnectedSSID, 0, ETH_ALEN); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send dissconect config packet\n"); @@ -3132,7 +3132,7 @@ static void Handle_Disconnect(void *drvHandler) PRINT_ER("strWILC_UsrConnReq.pfUserConnectResult = NULL \n"); } - gbScanWhileConnected = WILC_FALSE; + gbScanWhileConnected = false; pstrWFIDrv->enuHostIFstate = HOST_IF_IDLE; @@ -3208,7 +3208,7 @@ static s32 Switch_Log_Terminal(void *drvHandler) strWID.ps8WidVal = &dummy; strWID.s32ValueSize = sizeof(WILC_Char); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { @@ -3252,7 +3252,7 @@ static s32 Handle_GetChnl(void *drvHandler) PRINT_D(HOSTINF_DBG, "Getting channel value\n"); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { PRINT_ER("Failed to get channel number\n"); @@ -3296,7 +3296,7 @@ static void Handle_GetRssi(void *drvHandler) /*Sending Cfg*/ PRINT_D(HOSTINF_DBG, "Getting RSSI value\n"); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to get RSSI value\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -3327,7 +3327,7 @@ static void Handle_GetLinkspeed(void *drvHandler) /*Sending Cfg*/ PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n"); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to get LINKSPEED value\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -3377,7 +3377,7 @@ s32 Handle_GetStatistics(void *drvHandler, tstrStatistics *pstrStatistics) strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrStatistics->u32TxFailureCount)); u32WidsCount++; - s32Error = SendConfigPkt(GET_CFG, strWIDList, u32WidsCount, WILC_FALSE, (u32)drvHandler); + s32Error = SendConfigPkt(GET_CFG, strWIDList, u32WidsCount, false, (u32)drvHandler); if (s32Error) { PRINT_ER("Failed to send scan paramters config packet\n"); @@ -3425,7 +3425,7 @@ static s32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInactiveT *str PRINT_D(CFG80211_DBG, "SETING STA inactive time\n"); - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { PRINT_ER("Failed to SET incative time\n"); @@ -3439,7 +3439,7 @@ static s32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInactiveT *str strWID.s32ValueSize = sizeof(u32); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { PRINT_ER("Failed to get incative time\n"); @@ -3520,7 +3520,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send add beacon config packet\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -3565,7 +3565,7 @@ static void Handle_DelBeacon(void *drvHandler, tstrHostIFDelBeacon *pstrDelBeaco /* TODO: build del beacon message*/ /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send delete beacon config packet\n"); @@ -3662,7 +3662,7 @@ static void Handle_AddStation(void *drvHandler, tstrWILC_AddStaParam *pstrStatio pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to send add station config packet\n"); @@ -3718,7 +3718,7 @@ static void Handle_DelAllSta(void *drvHandler, tstrHostIFDelAllSta *pstrDelAllSt } /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send add station config packe\n"); @@ -3766,7 +3766,7 @@ static void Handle_DelStation(void *drvHandler, tstrHostIFDelSta *pstrDelStaPara WILC_memcpy(pu8CurrByte, pstrDelStaParam->au8MacAddr, ETH_ALEN); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send add station config packe\n"); @@ -3810,7 +3810,7 @@ static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStati pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send edit station config packet\n"); @@ -3873,7 +3873,7 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos PRINT_D(HOSTINF_DBG, "Setting channel :%d\n", pstrHostIfRemainOnChan->u16Channel); - u8remain_on_chan_flag = WILC_TRUE; + u8remain_on_chan_flag = true; strWID.u16WIDid = (u16)WID_REMAIN_ON_CHAN; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = 2; @@ -3887,7 +3887,7 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos strWID.ps8WidVal[1] = (s8)pstrHostIfRemainOnChan->u16Channel; /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to set remain on channel\n"); } @@ -3945,7 +3945,7 @@ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrH /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to frame register config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -3983,7 +3983,7 @@ static u32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainOnChan *p /*Make sure we are already in listen state*/ /*This is to handle duplicate expiry messages (listen timer fired and supplicant called cancel_remain_on_channel())*/ if (P2P_LISTEN_STATE) { - u8remain_on_chan_flag = WILC_FALSE; + u8remain_on_chan_flag = false; strWID.u16WIDid = (u16)WID_REMAIN_ON_CHAN; strWID.enuWIDtype = WID_STR; strWID.s32ValueSize = 2; @@ -3997,7 +3997,7 @@ static u32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainOnChan *p strWID.ps8WidVal[1] = FALSE_FRMWR_CHANNEL; /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error != WILC_SUCCESS) { PRINT_ER("Failed to set remain on channel\n"); goto _done_; @@ -4071,7 +4071,7 @@ static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *s tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; strWID.u16WIDid = (u16)WID_POWER_MANAGEMENT; - if (strPowerMgmtParam->bIsEnabled == WILC_TRUE) { + if (strPowerMgmtParam->bIsEnabled == true) { s8PowerMode = MIN_FAST_PS; } else { s8PowerMode = NO_POWERSAVE; @@ -4083,7 +4083,7 @@ static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *s PRINT_D(HOSTINF_DBG, "Handling Power Management\n"); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send power management config packet\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -4135,7 +4135,7 @@ static void Handle_SetMulticastFilter(void *drvHandler, tstrHostIFSetMulti *strH memcpy(pu8CurrByte, gau8MulticastMacAddrList, ((strHostIfSetMulti->u32count) * ETH_ALEN)); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_FALSE, (u32)drvHandler); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)drvHandler); if (s32Error) { PRINT_ER("Failed to send setup multicast config packet\n"); WILC_ERRORREPORT(s32Error, WILC_FAIL); @@ -4203,7 +4203,7 @@ static s32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo *strHos /* Group Buffer Timeout */ *ptr++ = 0; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) PRINT_D(HOSTINF_DBG, "Couldn't open BA Session\n"); @@ -4227,7 +4227,7 @@ static s32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo *strHos *ptr++ = ((strHostIfBASessionInfo->u16SessionTimeout >> 16) & 0xFF); /*Ack-Policy */ *ptr++ = 3; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (strWID.ps8WidVal != NULL) WILC_FREE(strWID.ps8WidVal); @@ -4277,7 +4277,7 @@ static s32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo *strHos /* Delba Reason */ *ptr++ = 32; /* Unspecific QOS reason */ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n"); @@ -4295,7 +4295,7 @@ static s32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo *strHos /* TID*/ *ptr++ = strHostIfBASessionInfo->u8Ted; - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (strWID.ps8WidVal != NULL) WILC_FREE(strWID.ps8WidVal); @@ -4346,7 +4346,7 @@ static s32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessionInfo * /* Delba Reason */ *ptr++ = 32; /* Unspecific QOS reason */ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n"); @@ -5443,7 +5443,7 @@ s32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, astrWIDList[1].ps8WidVal = ppu8RcvdSiteSurveyResults[1]; astrWIDList[1].s32ValueSize = u32MaxSiteSrvyFragLen; - s32Error = SendConfigPkt(GET_CFG, astrWIDList, 2, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, astrWIDList, 2, true, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { @@ -5811,7 +5811,7 @@ s32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo, /* Sending Configuration packet */ - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Failed to send association response config packet\n"); *pu32RcvdAssocRespInfoLen = 0; @@ -6062,7 +6062,7 @@ s32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemAddr) strWID.s32ValueSize = sizeof(u32); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); if (s32Error) { PRINT_ER("Test Function: Failed to set wid value\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -6154,7 +6154,7 @@ s32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMemAddr) strWID.ps8WidVal = (s8 *)pu32TestMemAddr; strWID.s32ValueSize = sizeof(u32); - s32Error = SendConfigPkt(GET_CFG, &strWID, 1, WILC_TRUE, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); /*get the value by searching the local copy*/ if (s32Error) { PRINT_ER("Test Function: Failed to get wid value\n"); @@ -6531,7 +6531,7 @@ s32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, u16 u16WID, u16 *pu16WID_Value) * @version 1.0 */ void host_int_send_join_leave_info_to_host - (u16 assocId, u8 *stationAddr, WILC_Bool joining) + (u16 assocId, u8 *stationAddr, bool joining) { } /** @@ -6607,7 +6607,7 @@ s32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) * } */ PRINT_D(HOSTINF_DBG, "Initializing host interface for client %d\n", clients_count + 1); - gbScanWhileConnected = WILC_FALSE; + gbScanWhileConnected = false; sema_init(&hWaitResponse, 0); @@ -6628,7 +6628,7 @@ s32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP - g_obtainingIP = WILC_FALSE; + g_obtainingIP = false; #endif PRINT_D(HOSTINF_DBG, "Global handle pointer value=%p\n", pstrWFIDrv); @@ -6711,7 +6711,7 @@ s32 host_int_init(WILC_WFIDrvHandle *phWFIDrv) #endif pstrWFIDrv->enuHostIFstate = HOST_IF_IDLE; - /* gWFiDrvHandle->bPendingConnRequest = WILC_FALSE; */ + /* gWFiDrvHandle->bPendingConnRequest = false; */ /*Initialize CFG WIDS Defualt Values*/ @@ -6859,7 +6859,7 @@ s32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv) pstrWFIDrv->enuHostIFstate = HOST_IF_IDLE; - gbScanWhileConnected = WILC_FALSE; + gbScanWhileConnected = false; WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); @@ -7174,7 +7174,7 @@ s32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID) * @author * @date * @version 1.0*/ -s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, WILC_Bool bReg) +s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, bool bReg) { s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7542,7 +7542,7 @@ s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrS #endif /*WILC_AP_EXTERNAL_MLME*/ uint32_t wilc_get_chipid(uint8_t); -s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout) +s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout) { s32 s32Error = WILC_SUCCESS; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; @@ -7578,7 +7578,7 @@ s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 return s32Error; } -s32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32count) +s32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32count) { s32 s32Error = WILC_SUCCESS; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index afe92063f44f..dcd127575409 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -330,7 +330,7 @@ typedef struct { size_t ConnReqIEsLen; /* Connect user call back function */ tWILCpfConnectResult pfUserConnectResult; - WILC_Bool IsHTCapable; + bool IsHTCapable; /* User specific parameter to be delivered through the Connect User Callback function */ void *u32UserConnectPvoid; } tstrWILC_UsrConnReq; @@ -373,7 +373,7 @@ typedef struct { typedef struct { - WILC_Bool bReg; + bool bReg; u16 u16FrameType; u8 u8Regid; @@ -412,7 +412,7 @@ typedef struct { tenuHostIFstate enuHostIFstate; - /* WILC_Bool bPendingConnRequest; */ + /* bool bPendingConnRequest; */ #ifndef CONNECT_DIRECT u32 u32SurveyResultsCount; @@ -437,7 +437,7 @@ typedef struct { WILC_TimerHandle hRemainOnChannel; #endif - WILC_Bool IFC_UP; + bool IFC_UP; } tstrWILC_WFIDrv; /*! @@ -465,7 +465,7 @@ typedef struct { u16 u16AssocID; u8 u8NumRates; const u8 *pu8Rates; - WILC_Bool bIsHTSupported; + bool bIsHTSupported; u16 u16HTCapInfo; u8 u8AmpduParams; u8 au8SuppMCsSet[16]; @@ -1058,7 +1058,7 @@ s32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, u16 u16WID, u16 *pu16WID_Value); * @version 1.0 */ void host_int_send_join_leave_info_to_host - (u16 assocId, u8 *stationAddr, WILC_Bool joining); + (u16 assocId, u8 *stationAddr, bool joining); /** * @brief notifies host with stations found in scan @@ -1202,7 +1202,7 @@ s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8MacAddr); s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams); /*! - * @fn s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout) + * @fn s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout) * @brief Set the power management mode to enabled or disabled * @details * @param[in,out] hWFIDrv handle to the wifi driver @@ -1216,7 +1216,7 @@ s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrS * @date 24 November 2012 * @version 1.0 Description */ -s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32Timeout); +s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout); /* @param[in,out] hWFIDrv handle to the wifi driver * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise * @param[in] u8count count of mac address entries in the filter table @@ -1228,7 +1228,7 @@ s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 * @date 24 November 2012 * @version 1.0 Description */ -s32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, u32 u32count); +s32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32count); /** * @brief host_int_setup_ipaddress * @details set IP address on firmware @@ -1312,7 +1312,7 @@ s32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, u32 u32SessionID); * @date * @version 1.0 */ -s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, WILC_Bool bReg); +s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, bool bReg); #endif /** * @brief host_int_set_wfi_drv_handler diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 708e3213532c..d5860ce749e0 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -274,7 +274,7 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len) memcpy((mgmt_tx->buff) + (len - sizeof(struct tx_complete_mon_data *)), &mgmt_tx, sizeof(struct tx_complete_mon_data *)); /* filter data frames to handle it's PS */ - if (filter_monitor_data_frames((mgmt_tx->buff), len) == WILC_TRUE) { + if (filter_monitor_data_frames((mgmt_tx->buff), len) == true) { return; } @@ -412,7 +412,7 @@ static const struct net_device_ops wilc_wfi_netdev_ops = { * @date 9 May 2013 * @version 1.0 */ -void WILC_mgm_HOSTAPD_ACK(void *priv, WILC_Bool bStatus) +void WILC_mgm_HOSTAPD_ACK(void *priv, bool bStatus) { struct sk_buff *skb; struct wilc_wfi_radiotap_cb_hdr *cb_hdr; @@ -452,7 +452,7 @@ void WILC_mgm_HOSTAPD_ACK(void *priv, WILC_Bool bStatus) cb_hdr->rate = 5; /* txrate->bitrate / 5; */ - if (WILC_TRUE == bStatus) { + if (true == bStatus) { /* success */ cb_hdr->tx_flags = IEEE80211_RADIOTAP_F_TX_RTS; } else { diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 387d4ecc2f2c..5f871485d973 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -65,9 +65,9 @@ unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xb2}; #endif #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP -extern WILC_Bool g_obtainingIP; +extern bool g_obtainingIP; #endif -extern u16 Set_machw_change_vir_if(WILC_Bool bValue); +extern u16 Set_machw_change_vir_if(bool bValue); extern void resolve_disconnect_aberration(void *drvHandler); extern u8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN]; void wilc1000_wlan_deinit(linux_wlan_t *nic); @@ -178,7 +178,7 @@ static void wilc_set_multicast_list(struct net_device *dev); */ linux_wlan_t *g_linux_wlan; wilc_wlan_oup_t *gpstrWlanOps; -WILC_Bool bEnablePS = WILC_TRUE; +bool bEnablePS = true; static const struct net_device_ops wilc_netdev_ops = { .ndo_init = mac_init_fn, @@ -302,14 +302,14 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event /*If we are in station mode or client mode*/ if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) { pstrWFIDrv->IFC_UP = 1; - g_obtainingIP = WILC_FALSE; + g_obtainingIP = false; WILC_TimerStop(&hDuringIpTimer, NULL); PRINT_D(GENERIC_DBG, "IP obtained , enable scan\n"); } - if (bEnablePS == WILC_TRUE) + if (bEnablePS == true) host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 1, 0); PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label); @@ -326,7 +326,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event PRINT_INFO(GENERIC_DBG, "\n ============== IP Address Released ===============\n\n"); if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) { pstrWFIDrv->IFC_UP = 0; - g_obtainingIP = WILC_FALSE; + g_obtainingIP = false; } if (memcmp(dev_iface->ifa_label, wlan_dev_name, 5) == 0) @@ -2090,7 +2090,7 @@ int mac_open(struct net_device *ndev) return ret; } - Set_machw_change_vir_if(WILC_FALSE); + Set_machw_change_vir_if(false); host_int_get_MacAddress(priv->hWILCWFIDrv, mac_add); PRINT_D(INIT_DBG, "Mac address: %x:%x:%x:%x:%x:%x\n", mac_add[0], mac_add[1], mac_add[2], @@ -2187,14 +2187,14 @@ static void wilc_set_multicast_list(struct net_device *dev) if ((dev->flags & IFF_ALLMULTI) || (dev->mc.count) > WILC_MULTICAST_TABLE_SIZE) { PRINT_D(INIT_DBG, "Disable multicast filter, retrive all multicast packets\n"); /* get all multicast packets */ - host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, WILC_FALSE, 0); + host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, false, 0); return; } /* No multicast? Just get our own stuff */ if ((dev->mc.count) == 0) { PRINT_D(INIT_DBG, "Enable multicast filter, retrive directed packets only.\n"); - host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, WILC_TRUE, 0); + host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, true, 0); return; } @@ -2207,7 +2207,7 @@ static void wilc_set_multicast_list(struct net_device *dev) i++; } - host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, WILC_TRUE, (dev->mc.count)); + host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, true, (dev->mc.count)); return; diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index 8531bf1adb78..04fe5a59de5c 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -15,7 +15,7 @@ WILC_ErrNo WILC_MsgQueueCreate(WILC_MsgQueueHandle *pHandle, sema_init(&pHandle->hSem, 0); pHandle->pstrMessageList = NULL; pHandle->u32ReceiversCount = 0; - pHandle->bExiting = WILC_FALSE; + pHandle->bExiting = false; return WILC_SUCCESS; } @@ -29,7 +29,7 @@ WILC_ErrNo WILC_MsgQueueDestroy(WILC_MsgQueueHandle *pHandle, tstrWILC_MsgQueueAttrs *pstrAttrs) { - pHandle->bExiting = WILC_TRUE; + pHandle->bExiting = true; /* Release any waiting receiver thread. */ while (pHandle->u32ReceiversCount > 0) { @@ -64,7 +64,7 @@ WILC_ErrNo WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle, WILC_ERRORREPORT(s32RetStatus, WILC_INVALID_ARGUMENT); } - if (pHandle->bExiting == WILC_TRUE) { + if (pHandle->bExiting == true) { WILC_ERRORREPORT(s32RetStatus, WILC_FAIL); } @@ -131,7 +131,7 @@ WILC_ErrNo WILC_MsgQueueRecv(WILC_MsgQueueHandle *pHandle, WILC_ERRORREPORT(s32RetStatus, WILC_INVALID_ARGUMENT); } - if (pHandle->bExiting == WILC_TRUE) { + if (pHandle->bExiting == true) { WILC_ERRORREPORT(s32RetStatus, WILC_FAIL); } diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h index 016f964c1335..d5835d6b09f8 100644 --- a/drivers/staging/wilc1000/wilc_oswrapper.h +++ b/drivers/staging/wilc1000/wilc_oswrapper.h @@ -13,12 +13,6 @@ /* OS Wrapper interface version */ #define WILC_OSW_INTERFACE_VER 2 -/* Boolean type */ -typedef enum { - WILC_FALSE = 0, - WILC_TRUE = 1 -} WILC_Bool; - /* Character types */ typedef char WILC_Char; diff --git a/drivers/staging/wilc1000/wilc_platform.h b/drivers/staging/wilc1000/wilc_platform.h index e185eb32024b..7ddea8336af6 100644 --- a/drivers/staging/wilc1000/wilc_platform.h +++ b/drivers/staging/wilc1000/wilc_platform.h @@ -30,7 +30,7 @@ typedef struct __Message_struct { typedef struct __MessageQueue_struct { struct semaphore hSem; spinlock_t strCriticalSection; - WILC_Bool bExiting; + bool bExiting; u32 u32ReceiversCount; Message *pstrMessageList; } WILC_MsgQueueHandle; diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index a43dc9b5f43a..ba9b30acfb57 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -1472,4 +1472,3 @@ wilc_hif_func_t hif_spi = { spi_max_bus_speed, spi_default_bus_speed, }; - diff --git a/drivers/staging/wilc1000/wilc_timer.h b/drivers/staging/wilc1000/wilc_timer.h index 72efa85ade2d..a0f91545240e 100644 --- a/drivers/staging/wilc1000/wilc_timer.h +++ b/drivers/staging/wilc1000/wilc_timer.h @@ -82,8 +82,8 @@ WILC_ErrNo WILC_TimerDestroy(WILC_TimerHandle *pHandle, * @details This function will move the timer to the PENDING state until the * given time expires (in msec) then the callback function will be * executed (timer in EXECUTING state) after execution is dene the - * timer either goes to IDLE (if bPeriodicTimer==WILC_FALSE) or - * PENDING with same timeout value (if bPeriodicTimer==WILC_TRUE) + * timer either goes to IDLE (if bPeriodicTimer==false) or + * PENDING with same timeout value (if bPeriodicTimer==true) * @param[in] pHandle handle to the timer object * @param[in] u32Timeout timeout value in msec after witch the callback * function will be executed. Timeout value of 0 is not allowed for diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index fde2a649e758..2293949031df 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -25,7 +25,7 @@ extern void linux_wlan_free(void *vp); extern int linux_wlan_get_firmware(perInterface_wlan_t *p_nic); extern void linux_wlan_unlock(void *vp); -extern u16 Set_machw_change_vir_if(WILC_Bool bValue); +extern u16 Set_machw_change_vir_if(bool bValue); extern int mac_open(struct net_device *ndev); extern int mac_close(struct net_device *ndev); @@ -43,7 +43,7 @@ extern u8 u8ConnectedSSID[6]; u8 g_wilc_initialized = 1; extern linux_wlan_t *g_linux_wlan; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP -extern WILC_Bool g_obtainingIP; +extern bool g_obtainingIP; #endif #define CHAN2G(_channel, _freq, _flags) { \ @@ -112,7 +112,7 @@ u8 u8P2P_oui[] = {0x50, 0x6f, 0x9A, 0x09}; u8 u8P2Plocalrandom = 0x01; u8 u8P2Precvrandom = 0x00; u8 u8P2P_vendorspec[] = {0xdd, 0x05, 0x00, 0x08, 0x40, 0x03}; -WILC_Bool bWilc_ie = WILC_FALSE; +bool bWilc_ie = false; #endif static struct ieee80211_supported_band WILC_WFI_band_2ghz = { @@ -135,9 +135,9 @@ struct add_key_params g_add_ptk_key_params; struct wilc_wfi_key g_key_ptk_params; struct wilc_wfi_wep_key g_key_wep_params; u8 g_flushing_in_progress; -WILC_Bool g_ptk_keys_saved = WILC_FALSE; -WILC_Bool g_gtk_keys_saved = WILC_FALSE; -WILC_Bool g_wep_keys_saved = WILC_FALSE; +bool g_ptk_keys_saved = false; +bool g_gtk_keys_saved = false; +bool g_wep_keys_saved = false; #define AGING_TIME (9 * 1000) #define duringIP_TIME 15000 @@ -178,7 +178,7 @@ uint32_t get_rssi_avg(tstrNetworkInfo *pstrNetworkInfo) return rssi_v; } -void refresh_scan(void *pUserVoid, uint8_t all, WILC_Bool bDirectScan) +void refresh_scan(void *pUserVoid, uint8_t all, bool bDirectScan) { struct WILC_WFI_priv *priv; struct wiphy *wiphy; @@ -275,7 +275,7 @@ void remove_network_from_shadow(void *pUserVoid) void clear_duringIP(void *pUserVoid) { PRINT_D(GENERIC_DBG, "GO:IP Obtained , enable scan\n"); - g_obtainingIP = WILC_FALSE; + g_obtainingIP = false; } #endif @@ -386,7 +386,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo struct cfg80211_bss *bss = NULL; priv = (struct WILC_WFI_priv *)pUserVoid; - if (priv->bCfgScanning == WILC_TRUE) { + if (priv->bCfgScanning == true) { if (enuScanEvent == SCAN_EVENT_NETWORK_FOUND) { wiphy = priv->dev->ieee80211_ptr->wiphy; WILC_NULLCHECK(s32Error, wiphy); @@ -409,7 +409,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo "BeaconPeriod: %d \n", channel->center_freq, (((s32)pstrNetworkInfo->s8rssi) * 100), pstrNetworkInfo->u16CapInfo, pstrNetworkInfo->u16BeaconPeriod); - if (pstrNetworkInfo->bNewNetwork == WILC_TRUE) { + if (pstrNetworkInfo->bNewNetwork == true) { if (priv->u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) { /* TODO: mostafa: to be replaced by */ /* max_scan_ssids */ PRINT_D(CFG80211_DBG, "Network %s found\n", pstrNetworkInfo->au8ssid); @@ -454,7 +454,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo } else if (enuScanEvent == SCAN_EVENT_DONE) { PRINT_D(CFG80211_DBG, "Scan Done[%p] \n", priv->dev); PRINT_D(CFG80211_DBG, "Refreshing Scan ... \n"); - refresh_scan(priv, 1, WILC_FALSE); + refresh_scan(priv, 1, false); if (priv->u32RcvdChCount > 0) { PRINT_D(CFG80211_DBG, "%d Network(s) found \n", priv->u32RcvdChCount); @@ -465,9 +465,9 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo down(&(priv->hSemScanReq)); if (priv->pstrScanReq != NULL) { - cfg80211_scan_done(priv->pstrScanReq, WILC_FALSE); + cfg80211_scan_done(priv->pstrScanReq, false); priv->u32RcvdChCount = 0; - priv->bCfgScanning = WILC_FALSE; + priv->bCfgScanning = false; priv->pstrScanReq = NULL; } up(&(priv->hSemScanReq)); @@ -481,10 +481,10 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo if (priv->pstrScanReq != NULL) { update_scan_time(priv); - refresh_scan(priv, 1, WILC_FALSE); + refresh_scan(priv, 1, false); - cfg80211_scan_done(priv->pstrScanReq, WILC_FALSE); - priv->bCfgScanning = WILC_FALSE; + cfg80211_scan_done(priv->pstrScanReq, false); + priv->bCfgScanning = false; priv->pstrScanReq = NULL; } up(&(priv->hSemScanReq)); @@ -599,7 +599,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, } if (u16ConnectStatus == WLAN_STATUS_SUCCESS) { - WILC_Bool bNeedScanRefresh = WILC_FALSE; + bool bNeedScanRefresh = false; u32 i; PRINT_INFO(CFG80211_DBG, "Connection Successful:: BSSID: %x%x%x%x%x%x\n", pstrConnectInfo->au8bssid[0], @@ -617,17 +617,17 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, if (time_after(now, astrLastScannedNtwrksShadow[i].u32TimeRcvdInScanCached + (unsigned long)(nl80211_SCAN_RESULT_EXPIRE - (1 * HZ)))) { - bNeedScanRefresh = WILC_TRUE; + bNeedScanRefresh = true; } break; } } - if (bNeedScanRefresh == WILC_TRUE) { + if (bNeedScanRefresh == true) { /*BugID_5418*/ /*Also, refrsh DIRECT- results if */ - refresh_scan(priv, 1, WILC_TRUE); + refresh_scan(priv, 1, true); } @@ -645,13 +645,13 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, /* be replaced by pstrConnectInfo->u16ConnectStatus */ } else if (enuConnDisconnEvent == CONN_DISCONN_EVENT_DISCONN_NOTIF) { #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP - g_obtainingIP = WILC_FALSE; + g_obtainingIP = false; #endif PRINT_ER("Received MAC_DISCONNECTED from firmware with reason %d on dev [%p]\n", pstrDisconnectNotifInfo->u16reason, priv->dev); u8P2Plocalrandom = 0x01; u8P2Precvrandom = 0x00; - bWilc_ie = WILC_FALSE; + bWilc_ie = false; WILC_memset(priv->au8AssociatedBss, 0, ETH_ALEN); linux_wlan_set_bssid(priv->dev, NullBssid); WILC_memset(u8ConnectedSSID, 0, ETH_ALEN); @@ -752,7 +752,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r reset_shadow_found(priv); - priv->bCfgScanning = WILC_TRUE; + priv->bCfgScanning = true; if (request->n_channels <= MAX_NUM_SCANNED_NETWORKS) { /* TODO: mostafa: to be replaced by */ /* max_scan_ssids */ for (i = 0; i < request->n_channels; i++) { @@ -935,7 +935,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, g_key_wep_params.key = WILC_MALLOC(sme->key_len); memcpy(g_key_wep_params.key, sme->key, sme->key_len); g_key_wep_params.key_idx = sme->key_idx; - g_wep_keys_saved = WILC_TRUE; + g_wep_keys_saved = true; host_int_set_WEPDefaultKeyID(priv->hWILCWFIDrv, sme->key_idx); host_int_add_wep_key_bss_sta(priv->hWILCWFIDrv, sme->key, sme->key_len, sme->key_idx); @@ -953,7 +953,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, g_key_wep_params.key = WILC_MALLOC(sme->key_len); memcpy(g_key_wep_params.key, sme->key, sme->key_len); g_key_wep_params.key_idx = sme->key_idx; - g_wep_keys_saved = WILC_TRUE; + g_wep_keys_saved = true; host_int_set_WEPDefaultKeyID(priv->hWILCWFIDrv, sme->key_idx); host_int_add_wep_key_bss_sta(priv->hWILCWFIDrv, sme->key, sme->key_len, sme->key_idx); @@ -1101,7 +1101,7 @@ static int WILC_WFI_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 u8P2Plocalrandom = 0x01; u8P2Precvrandom = 0x00; - bWilc_ie = WILC_FALSE; + bWilc_ie = false; #ifdef WILC_P2P pstrWFIDrv->u64P2p_MgmtTimeout = 0; #endif @@ -1348,7 +1348,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k PRINT_D(CFG80211_DBG, "key %x %x %x\n", g_key_gtk_params.key[0], g_key_gtk_params.key[1], g_key_gtk_params.key[2]); - g_gtk_keys_saved = WILC_TRUE; + g_gtk_keys_saved = true; } host_int_add_rx_gtk(priv->hWILCWFIDrv, params->key, KeyLen, @@ -1385,7 +1385,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k PRINT_D(CFG80211_DBG, "key %x %x %x\n", g_key_ptk_params.key[0], g_key_ptk_params.key[1], g_key_ptk_params.key[2]); - g_ptk_keys_saved = WILC_TRUE; + g_ptk_keys_saved = true; } host_int_add_ptk(priv->hWILCWFIDrv, params->key, KeyLen, mac_addr, @@ -1431,9 +1431,9 @@ static int WILC_WFI_del_key(struct wiphy *wiphy, struct net_device *netdev, /*BugID_5137*/ /*delete saved keys, if any*/ if (netdev == g_linux_wlan->strInterfaceInfo[0].wilc_netdev) { - g_ptk_keys_saved = WILC_FALSE; - g_gtk_keys_saved = WILC_FALSE; - g_wep_keys_saved = WILC_FALSE; + g_ptk_keys_saved = false; + g_gtk_keys_saved = false; + g_wep_keys_saved = false; /*Delete saved WEP keys params, if any*/ if (g_key_wep_params.key != NULL) { @@ -1499,7 +1499,7 @@ static int WILC_WFI_del_key(struct wiphy *wiphy, struct net_device *netdev, } /*Reset WILC_CHANGING_VIR_IF register to allow adding futrue keys to CE H/W*/ - Set_machw_change_vir_if(WILC_FALSE); + Set_machw_change_vir_if(false); } if (key_index >= 0 && key_index <= 3) { @@ -1702,9 +1702,9 @@ static int WILC_WFI_get_station(struct wiphy *wiphy, struct net_device *dev, #ifdef TCP_ENHANCEMENTS if ((strStatistics.u8LinkSpeed > TCP_ACK_FILTER_LINK_SPEED_THRESH) && (strStatistics.u8LinkSpeed != DEFAULT_LINK_SPEED)) { - Enable_TCP_ACK_Filter(WILC_TRUE); + Enable_TCP_ACK_Filter(true); } else if (strStatistics.u8LinkSpeed != DEFAULT_LINK_SPEED) { - Enable_TCP_ACK_Filter(WILC_FALSE); + Enable_TCP_ACK_Filter(false); } #endif @@ -2032,7 +2032,7 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len) #ifdef USE_SUPPLICANT_GO_INTENT u8 intent; u8 tie_breaker; - WILC_Bool is_wilc_go = WILC_TRUE; + bool is_wilc_go = true; #endif u8 op_channel_attr_index = 0; u8 channel_list_attr_index = 0; @@ -2048,10 +2048,10 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len) if (intent > SUPPLICANT_GO_INTENT || (intent == SUPPLICANT_GO_INTENT && tie_breaker == 1)) { PRINT_D(GENERIC_DBG, "WILC will be client (intent %d tie breaker %d)\n", intent, tie_breaker); - is_wilc_go = WILC_FALSE; + is_wilc_go = false; } else { PRINT_D(GENERIC_DBG, "WILC will be GO (intent %d tie breaker %d)\n", intent, tie_breaker); - is_wilc_go = WILC_TRUE; + is_wilc_go = true; } #else /* USE_SUPPLICANT_GO_INTENT */ @@ -2070,7 +2070,7 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len) PRINT_D(GENERIC_DBG, "Group BSSID: %2x:%2x:%2x\n", buf[index + 3] , buf[index + 4] , buf[index + 5]); - is_wilc_go = WILC_FALSE; + is_wilc_go = false; } #endif /* USE_SUPPLICANT_GO_INTENT */ @@ -2119,7 +2119,7 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len) * @date 12 DEC 2012 * @version */ -void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, WILC_Bool bOperChan, u8 iftype) +void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype) { u32 index = 0; u32 i = 0, j = 0; @@ -2127,7 +2127,7 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, WILC_Bool bOperChan, u8 iftype) u8 op_channel_attr_index = 0; u8 channel_list_attr_index = 0; #ifdef USE_SUPPLICANT_GO_INTENT - WILC_Bool is_wilc_go = WILC_FALSE; + bool is_wilc_go = false; /*BugID_5460*/ /*Case 1: If we are already p2p client, no need to modify channels attributes*/ @@ -2145,7 +2145,7 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, WILC_Bool bOperChan, u8 iftype) PRINT_D(GENERIC_DBG, "Group BSSID: %2x:%2x:%2x\n", buf[index + 3] , buf[index + 4] , buf[index + 5]); - is_wilc_go = WILC_TRUE; + is_wilc_go = true; } #else /* USE_SUPPLICANT_GO_INTENT */ @@ -2252,7 +2252,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) if (ieee80211_is_action(buff[FRAME_TYPE_ID])) { PRINT_D(GENERIC_DBG, "Rx Action Frame Type: %x %x\n", buff[ACTION_SUBTYPE_ID], buff[P2P_PUB_ACTION_SUBTYPE]); - if (priv->bCfgScanning == WILC_TRUE && time_after_eq(jiffies, (unsigned long)pstrWFIDrv->u64P2p_MgmtTimeout)) { + if (priv->bCfgScanning == true && time_after_eq(jiffies, (unsigned long)pstrWFIDrv->u64P2p_MgmtTimeout)) { PRINT_D(GENERIC_DBG, "Receiving action frames from wrong channels\n"); return; } @@ -2276,7 +2276,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) for (i = P2P_PUB_ACTION_SUBTYPE; i < size; i++) { if (!WILC_memcmp(u8P2P_vendorspec, &buff[i], 6)) { u8P2Precvrandom = buff[i + 6]; - bWilc_ie = WILC_TRUE; + bWilc_ie = true; PRINT_D(GENERIC_DBG, "WILC Vendor specific IE:%02x\n", u8P2Precvrandom); break; } @@ -2353,7 +2353,7 @@ static void WILC_WFI_RemainOnChannelReady(void *pUserVoid) PRINT_D(HOSTINF_DBG, "Remain on channel ready \n"); - priv->bInP2PlistenState = WILC_TRUE; + priv->bInP2PlistenState = true; cfg80211_ready_on_channel(priv->wdev, priv->strRemainOnChanParams.u64ListenCookie, @@ -2381,7 +2381,7 @@ static void WILC_WFI_RemainOnChannelExpired(void *pUserVoid, u32 u32SessionID) if (u32SessionID == priv->strRemainOnChanParams.u32ListenSessionID) { PRINT_D(GENERIC_DBG, "Remain on channel expired \n"); - priv->bInP2PlistenState = WILC_FALSE; + priv->bInP2PlistenState = false; /*Inform wpas of remain-on-channel expiration*/ cfg80211_remain_on_channel_expired(priv->wdev, @@ -2498,7 +2498,7 @@ void WILC_WFI_add_wilcvendorspec(u8 *buff) * @version */ extern linux_wlan_t *g_linux_wlan; -extern WILC_Bool bEnablePS; +extern bool bEnablePS; int WILC_WFI_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, @@ -2602,14 +2602,14 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy, for (i = P2P_PUB_ACTION_SUBTYPE + 2; i < len; i++) { if (buf[i] == P2PELEM_ATTR_ID && !(WILC_memcmp(u8P2P_oui, &buf[i + 2], 4))) { if (buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP) - WILC_WFI_CfgParseTxAction(&mgmt_tx->buff[i + 6], len - (i + 6), WILC_TRUE, nic->iftype); + WILC_WFI_CfgParseTxAction(&mgmt_tx->buff[i + 6], len - (i + 6), true, nic->iftype); /*BugID_5460*/ /*If using supplicant go intent, no need at all*/ /*to parse transmitted negotiation frames*/ #ifndef USE_SUPPLICANT_GO_INTENT else - WILC_WFI_CfgParseTxAction(&mgmt_tx->buff[i + 6], len - (i + 6), WILC_FALSE, nic->iftype); + WILC_WFI_CfgParseTxAction(&mgmt_tx->buff[i + 6], len - (i + 6), false, nic->iftype); #endif break; } @@ -2667,7 +2667,7 @@ int WILC_WFI_mgmt_tx_cancel_wait(struct wiphy *wiphy, PRINT_D(GENERIC_DBG, "Tx Cancel wait :%lu\n", jiffies); pstrWFIDrv->u64P2p_MgmtTimeout = jiffies; - if (priv->bInP2PlistenState == WILC_FALSE) { + if (priv->bInP2PlistenState == false) { /* Bug 5504: This is just to avoid connection failure when getting stuck when the supplicant * considers the driver falsely that it is in Listen state */ cfg80211_remain_on_channel_expired(priv->wdev, @@ -2817,7 +2817,7 @@ int WILC_WFI_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, return -EIO; } - if (bEnablePS == WILC_TRUE) + if (bEnablePS == true) host_int_set_power_mgmt(priv->hWILCWFIDrv, enabled, timeout); @@ -2858,17 +2858,17 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev u8P2Plocalrandom = 0x01; u8P2Precvrandom = 0x00; - bWilc_ie = WILC_FALSE; + bWilc_ie = false; #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP - g_obtainingIP = WILC_FALSE; + g_obtainingIP = false; WILC_TimerStop(&hDuringIpTimer, NULL); PRINT_D(GENERIC_DBG, "Changing virtual interface, enable scan\n"); #endif /*BugID_5137*/ /*Set WILC_CHANGING_VIR_IF register to disallow adding futrue keys to CE H/W*/ if (g_ptk_keys_saved && g_gtk_keys_saved) { - Set_machw_change_vir_if(WILC_TRUE); + Set_machw_change_vir_if(true); } switch (type) { @@ -2960,7 +2960,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev } } - bEnablePS = WILC_TRUE; + bEnablePS = true; host_int_set_power_mgmt(priv->hWILCWFIDrv, 1, 0); } #endif @@ -2968,7 +2968,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev break; case NL80211_IFTYPE_P2P_CLIENT: - bEnablePS = WILC_FALSE; + bEnablePS = false; host_int_set_power_mgmt(priv->hWILCWFIDrv, 0, 0); connecting = 0; PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_P2P_CLIENT\n"); @@ -3037,8 +3037,8 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev } /*Refresh scan, to refresh the scan results to the wpa_supplicant. Set MachHw to false to enable further key installments*/ - refresh_scan(priv, 1, WILC_TRUE); - Set_machw_change_vir_if(WILC_FALSE); + refresh_scan(priv, 1, true); + Set_machw_change_vir_if(false); /*BugID_4847: registered frames in firmware are now lost * due to mac close. So re-register those frames */ @@ -3057,7 +3057,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev break; case NL80211_IFTYPE_AP: - bEnablePS = WILC_FALSE; + bEnablePS = false; PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_AP %d\n", type); dev->ieee80211_ptr->iftype = type; priv->wdev->iftype = type; @@ -3093,7 +3093,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev PRINT_D(GENERIC_DBG, "start duringIP timer\n"); #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP - g_obtainingIP = WILC_TRUE; + g_obtainingIP = true; WILC_TimerStart(&hDuringIpTimer, duringIP_TIME, NULL, NULL); #endif host_int_set_power_mgmt(priv->hWILCWFIDrv, 0, 0); @@ -3103,7 +3103,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev /*hWaitResponse semaphore, which allows previous config*/ /*packets to actually take action on old FW*/ host_int_del_All_Rx_BASession(priv->hWILCWFIDrv, g_linux_wlan->strInterfaceInfo[0].aBSSID, TID); - bEnablePS = WILC_FALSE; + bEnablePS = false; PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_GO\n"); dev->ieee80211_ptr->iftype = type; priv->wdev->iftype = type; @@ -3379,9 +3379,9 @@ static int WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev, PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n", strStaParams.u8NumRates); if (params->ht_capa == NULL) { - strStaParams.bIsHTSupported = WILC_FALSE; + strStaParams.bIsHTSupported = false; } else { - strStaParams.bIsHTSupported = WILC_TRUE; + strStaParams.bIsHTSupported = true; strStaParams.u16HTCapInfo = params->ht_capa->cap_info; strStaParams.u8AmpduParams = params->ht_capa->ampdu_params_info; WILC_memcpy(strStaParams.au8SuppMCsSet, ¶ms->ht_capa->mcs, WILC_SUPP_MCS_SET_SIZE); @@ -3509,9 +3509,9 @@ static int WILC_WFI_change_station(struct wiphy *wiphy, struct net_device *dev, PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n", strStaParams.u8NumRates); if (params->ht_capa == NULL) { - strStaParams.bIsHTSupported = WILC_FALSE; + strStaParams.bIsHTSupported = false; } else { - strStaParams.bIsHTSupported = WILC_TRUE; + strStaParams.bIsHTSupported = true; strStaParams.u16HTCapInfo = params->ht_capa->cap_info; strStaParams.u8AmpduParams = params->ht_capa->ampdu_params_info; WILC_memcpy(strStaParams.au8SuppMCsSet, ¶ms->ht_capa->mcs, WILC_SUPP_MCS_SET_SIZE); @@ -3867,9 +3867,9 @@ int WILC_WFI_InitHostInt(struct net_device *net) return s32Error; } - priv->gbAutoRateAdjusted = WILC_FALSE; + priv->gbAutoRateAdjusted = false; - priv->bInP2PlistenState = WILC_FALSE; + priv->bInP2PlistenState = false; sema_init(&(priv->hSemScanReq), 1); s32Error = host_int_init(&priv->hWILCWFIDrv); @@ -3895,9 +3895,9 @@ int WILC_WFI_DeInitHostInt(struct net_device *net) struct WILC_WFI_priv *priv; priv = wdev_priv(net->ieee80211_ptr); - priv->gbAutoRateAdjusted = WILC_FALSE; + priv->gbAutoRateAdjusted = false; - priv->bInP2PlistenState = WILC_FALSE; + priv->bInP2PlistenState = false; op_ifcs--; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h index f45a15f4650f..c25350cb58c8 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h @@ -123,7 +123,7 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi #ifdef TCP_ENHANCEMENTS #define TCP_ACK_FILTER_LINK_SPEED_THRESH 54 #define DEFAULT_LINK_SPEED 72 -extern void Enable_TCP_ACK_Filter(WILC_Bool value); +extern void Enable_TCP_ACK_Filter(bool value); #endif #endif diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.c b/drivers/staging/wilc1000/wilc_wfi_netdevice.c index fbc4b857aa35..f6974a6b116f 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.c +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.c @@ -931,7 +931,7 @@ int WILC_WFI_InitModule(void) /* priv[1]->monitor_flag = 1; */ } - priv[0]->bCfgScanning = WILC_FALSE; + priv[0]->bCfgScanning = false; priv[0]->u32RcvdChCount = 0; WILC_memset(priv[0]->au8AssociatedBss, 0xFF, ETH_ALEN); diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 10e6b1a22fd6..2331a006ec0e 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -134,7 +134,7 @@ struct WILC_WFI_priv { #endif - WILC_Bool bCfgScanning; + bool bCfgScanning; u32 u32RcvdChCount; @@ -168,15 +168,15 @@ struct WILC_WFI_priv { struct semaphore SemHandleUpdateStats; struct semaphore hSemScanReq; /* */ - WILC_Bool gbAutoRateAdjusted; + bool gbAutoRateAdjusted; - WILC_Bool bInP2PlistenState; + bool bInP2PlistenState; }; typedef struct { u16 frame_type; - WILC_Bool reg; + bool reg; } struct_frame_reg; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index a456d0d140c1..762470c4e052 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -27,7 +27,7 @@ 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(WILC_Bool bValue); +u16 Set_machw_change_vir_if(bool bValue); @@ -487,14 +487,14 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(void) #endif #ifdef TCP_ENHANCEMENTS -WILC_Bool EnableTCPAckFilter = WILC_FALSE; +bool EnableTCPAckFilter = false; -void Enable_TCP_ACK_Filter(WILC_Bool value) +void Enable_TCP_ACK_Filter(bool value) { EnableTCPAckFilter = value; } -WILC_Bool is_TCP_ACK_Filter_Enabled(void) +bool is_TCP_ACK_Filter_Enabled(void) { return EnableTCPAckFilter; } @@ -559,7 +559,7 @@ static int wilc_wlan_txq_add_net_pkt(void *priv, uint8_t *buffer, uint32_t buffe #ifdef TCP_ACK_FILTER tqe->tcp_PendingAck_index = NOT_TCP_ACK; #ifdef TCP_ENHANCEMENTS - if (is_TCP_ACK_Filter_Enabled() == WILC_TRUE) + if (is_TCP_ACK_Filter_Enabled() == true) #endif tcp_process(tqe); #endif @@ -738,12 +738,12 @@ INLINE void chip_wakeup(void) WILC_Sleep(2); /* Make sure chip is awake. This is an extra step that can be removed */ /* later to avoid the bus access overhead */ - if ((wilc_get_chipid(WILC_TRUE) == 0)) { + if ((wilc_get_chipid(true) == 0)) { wilc_debug(N_ERR, "Couldn't read chip id. Wake up failed\n"); } - } while ((wilc_get_chipid(WILC_TRUE) == 0) && ((++trials % 3) == 0)); + } while ((wilc_get_chipid(true) == 0) && ((++trials % 3) == 0)); - } while (wilc_get_chipid(WILC_TRUE) == 0); + } while (wilc_get_chipid(true) == 0); } else if ((g_wlan.io_func.io_type & 0x1) == HIF_SDIO) { g_wlan.hif_func.hif_read_reg(0xf0, ®); do { @@ -782,7 +782,7 @@ INLINE void chip_wakeup(void) reg &= ~(1 << 0); g_wlan.hif_func.hif_write_reg(0x1C0C, reg); - if (wilc_get_chipid(WILC_FALSE) >= 0x1002b0) { + if (wilc_get_chipid(false) >= 0x1002b0) { /* Enable PALDO back right after wakeup */ uint32_t val32; g_wlan.hif_func.hif_read_reg(0x1e1c, &val32); @@ -825,19 +825,19 @@ INLINE void chip_wakeup(void) /* Make sure chip is awake. This is an extra step that can be removed */ /* later to avoid the bus access overhead */ - if ((wilc_get_chipid(WILC_TRUE) == 0)) { + if ((wilc_get_chipid(true) == 0)) { wilc_debug(N_ERR, "Couldn't read chip id. Wake up failed\n"); } - } while ((wilc_get_chipid(WILC_TRUE) == 0) && ((++trials % 3) == 0)); + } while ((wilc_get_chipid(true) == 0) && ((++trials % 3) == 0)); - } while (wilc_get_chipid(WILC_TRUE) == 0); + } while (wilc_get_chipid(true) == 0); if (genuChipPSstate == CHIP_SLEEPING_MANUAL) { g_wlan.hif_func.hif_read_reg(0x1C0C, ®); reg &= ~(1 << 0); g_wlan.hif_func.hif_write_reg(0x1C0C, reg); - if (wilc_get_chipid(WILC_FALSE) >= 0x1002b0) { + if (wilc_get_chipid(false) >= 0x1002b0) { /* Enable PALDO back right after wakeup */ uint32_t val32; g_wlan.hif_func.hif_read_reg(0x1e1c, &val32); @@ -1354,7 +1354,7 @@ static void wilc_pllupdate_isr_ext(uint32_t int_stats) g_wlan.os_func.os_atomic_sleep(WILC_PLL_TO); /* poll till read a valid data */ - while (!(ISWILC1000(wilc_get_chipid(WILC_TRUE)) && --trials)) { + while (!(ISWILC1000(wilc_get_chipid(true)) && --trials)) { PRINT_D(TX_DBG, "PLL update retrying\n"); g_wlan.os_func.os_atomic_sleep(1); } @@ -2012,7 +2012,7 @@ uint32_t init_chip(void) acquire_bus(ACQUIRE_ONLY); #endif - chipid = wilc_get_chipid(WILC_TRUE); + chipid = wilc_get_chipid(true); @@ -2325,7 +2325,7 @@ _fail_: } #define BIT31 (1 << 31) -u16 Set_machw_change_vir_if(WILC_Bool bValue) +u16 Set_machw_change_vir_if(bool bValue) { u16 ret; u32 reg; @@ -2337,7 +2337,7 @@ u16 Set_machw_change_vir_if(WILC_Bool bValue) PRINT_ER("Error while Reading reg WILC_CHANGING_VIR_IF\n"); } - if (bValue == WILC_TRUE) { + if (bValue == true) { reg |= (BIT31); } else { reg &= ~(BIT31); diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index d7e7e92536f6..9631b18c0bb7 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -14,7 +14,7 @@ #ifdef WILC_FULLY_HOSTING_AP #include "wilc_host_ap.h" -void WILC_mgm_HOSTAPD_ACK(void *priv, WILC_Bool bStatus); +void WILC_mgm_HOSTAPD_ACK(void *priv, bool bStatus); #endif /******************************************** @@ -542,7 +542,7 @@ static int wilc_wlan_cfg_indicate_rx(uint8_t *frame, int size, wilc_cfg_rsp_t *r uint16_t msg_len; #ifdef WILC_FULLY_HOSTING_AP u32 *ptru32Frame; - WILC_Bool bStatus = frame[2]; + bool bStatus = frame[2]; #ifdef BIG_ENDIAN ptru32Frame = (frame[4] << 24) | (frame[5] << 16) | (frame[6] << 8) | frame[7]; -- cgit v1.2.3-59-g8ed1b From 30ef5c8b97d9dd381f94a919c21096afe6553f5d Mon Sep 17 00:00:00 2001 From: ChengYi He Date: Tue, 16 Jun 2015 03:04:59 +0800 Subject: staging: wilc1000: remove unnecessary cast kmalloc() returns void pointer. Signed-off-by: ChengYi He Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index d5860ce749e0..bc7feb459a7a 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -258,7 +258,7 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len) len += sizeof(struct tx_complete_mon_data *); #endif - mgmt_tx->buff = (char *)kmalloc(len, GFP_ATOMIC); + mgmt_tx->buff = kmalloc(len, GFP_ATOMIC); if (mgmt_tx->buff == NULL) { PRINT_ER("Failed to allocate memory for mgmt_tx buff\n"); return WILC_FAIL; diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 5f871485d973..c1e92722a471 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -580,7 +580,7 @@ static void linux_wlan_dbg(uint8_t *buff) static void *linux_wlan_malloc_atomic(uint32_t sz) { char *pntr = NULL; - pntr = (char *)kmalloc(sz, GFP_ATOMIC); + pntr = kmalloc(sz, GFP_ATOMIC); PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr); return (void *)pntr; @@ -588,7 +588,7 @@ static void *linux_wlan_malloc_atomic(uint32_t sz) static void *linux_wlan_malloc(uint32_t sz) { char *pntr = NULL; - pntr = (char *)kmalloc(sz, GFP_KERNEL); + pntr = kmalloc(sz, GFP_KERNEL); PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr); return (void *)pntr; } @@ -605,7 +605,7 @@ void linux_wlan_free(void *vp) static void *internal_alloc(uint32_t size, uint32_t flag) { char *pntr = NULL; - pntr = (char *)kmalloc(size, flag); + pntr = kmalloc(size, flag); PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", size, pntr); return (void *)pntr; } -- cgit v1.2.3-59-g8ed1b From 5a66bf20b8e17ed3abb1d115049ab9d636bd2d35 Mon Sep 17 00:00:00 2001 From: Abdul Hussain Date: Tue, 16 Jun 2015 09:44:06 +0000 Subject: Staging: wilc1000: Boolean tests don't need comparisons This patch removes unwanted true and false from boolean tests. Signed-off-by: Abdul Hussain Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigurator.c | 8 ++++---- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- drivers/staging/wilc1000/wilc_wlan.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index bbb32318b2c3..523c863b22ac 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -1716,7 +1716,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) idx++; } idx += 3; - if ((u16WIDid == g_wid_num) && (num_wid_processed == false)) { + if ((u16WIDid == g_wid_num) && (!num_wid_processed)) { num_wid_processed = true; if (-2 == further_process_response(&resp[idx], u16WIDid, cfg_len, true, 0, &pstrWIDcfgResult[ResCnt])) { @@ -1922,7 +1922,7 @@ s32 ConfigWaitResponse(char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 *ps32Bytes * gstrConfigPktInfo.bRespRequired = bRespRequired;*/ - if (gstrConfigPktInfo.bRespRequired == true) { + if (gstrConfigPktInfo.bRespRequired) { down(&SemHandlePktResp); *ps32BytesRead = gstrConfigPktInfo.s32BytesRead; @@ -1983,7 +1983,7 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, ConfigWaitResponse(gps8ConfigPacket, MAX_PACKET_BUFF_SIZE, &s32RcvdRespLen, bRespRequired); - if (bRespRequired == true) { + 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) { @@ -2020,7 +2020,7 @@ s32 ConfigProvideResponse(char *pcRespBuffer, s32 s32RespLen) { s32 s32Error = WILC_SUCCESS; - if (gstrConfigPktInfo.bRespRequired == true) { + if (gstrConfigPktInfo.bRespRequired) { if (s32RespLen <= gstrConfigPktInfo.s32MaxRespBuffLen) { WILC_memcpy(gstrConfigPktInfo.pcRespBuffer, pcRespBuffer, s32RespLen); gstrConfigPktInfo.s32BytesRead = s32RespLen; diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index bc7feb459a7a..aaac9a08fe64 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -452,7 +452,7 @@ void WILC_mgm_HOSTAPD_ACK(void *priv, bool bStatus) cb_hdr->rate = 5; /* txrate->bitrate / 5; */ - if (true == bStatus) { + if (bStatus) { /* success */ cb_hdr->tx_flags = IEEE80211_RADIOTAP_F_TX_RTS; } else { diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index c1e92722a471..c1cf5be312a4 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -309,7 +309,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event - if (bEnablePS == true) + if (bEnablePS) host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 1, 0); PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 9dcb3268d20c..92064db9eb05 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -624,7 +624,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, } } - if (bNeedScanRefresh == true) { + if (bNeedScanRefresh) { /*BugID_5418*/ /*Also, refrsh DIRECT- results if */ refresh_scan(priv, 1, true); @@ -2817,7 +2817,7 @@ int WILC_WFI_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, return -EIO; } - if (bEnablePS == true) + if (bEnablePS) host_int_set_power_mgmt(priv->hWILCWFIDrv, enabled, timeout); diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 762470c4e052..db9e7173c957 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -559,7 +559,7 @@ static int wilc_wlan_txq_add_net_pkt(void *priv, uint8_t *buffer, uint32_t buffe #ifdef TCP_ACK_FILTER tqe->tcp_PendingAck_index = NOT_TCP_ACK; #ifdef TCP_ENHANCEMENTS - if (is_TCP_ACK_Filter_Enabled() == true) + if (is_TCP_ACK_Filter_Enabled()) #endif tcp_process(tqe); #endif @@ -2337,7 +2337,7 @@ u16 Set_machw_change_vir_if(bool bValue) PRINT_ER("Error while Reading reg WILC_CHANGING_VIR_IF\n"); } - if (bValue == true) { + if (bValue) { reg |= (BIT31); } else { reg &= ~(BIT31); -- cgit v1.2.3-59-g8ed1b From f0feeaff9c60bfb3dbadf09da15d70cf35700f29 Mon Sep 17 00:00:00 2001 From: Hari Prasath Gujulan Elango Date: Tue, 16 Jun 2015 07:38:02 +0000 Subject: staging: wilc1000: remove unwanted code This patch removes SIOCDEVPRIVATE + 1 ioctl. It currently is just a stub which does some useless printks and returns. In the original code, if the user passes priv_cmd.total_len == 0 then it will Oops. Also it leaks memory every time it's called. In the future, we will implement this functionality using generic API functions Signed-off-by: Hari Prasath Gujulan Elango Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 57 ----------------------------------- 1 file changed, 57 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index c1cf5be312a4..8ecbb2d50900 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2393,63 +2393,6 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) #endif switch (cmd) { - /* [[ added by tony for SIOCDEVPRIVATE */ - case SIOCDEVPRIVATE + 1: - { - android_wifi_priv_cmd priv_cmd; - - PRINT_INFO(GENERIC_DBG, "in SIOCDEVPRIVATE+1\n"); - - if (copy_from_user(&priv_cmd, req->ifr_data, sizeof(android_wifi_priv_cmd))) { - s32Error = -EFAULT; - goto done; - } - - buff = kmalloc(priv_cmd.total_len, GFP_KERNEL); - if (!buff) { - s32Error = -ENOMEM; - goto done; - } - - if (copy_from_user(buff, priv_cmd.buf, priv_cmd.total_len)) { - s32Error = -EFAULT; - goto done; - } - - PRINT_INFO(GENERIC_DBG, "%s: Android private cmd \"%s\" on %s\n", __FUNCTION__, buff, req->ifr_name); - - if (strncasecmp(buff, "SCAN-ACTIVE", strlen("SCAN-ACTIVE")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, SCAN-ACTIVE command\n", __FUNCTION__); - } else if (strncasecmp(buff, "SCAN-PASSIVE", strlen("SCAN-PASSIVE")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, SCAN-PASSIVE command\n", __FUNCTION__); - } else if (strncasecmp(buff, "RXFILTER-START", strlen("RXFILTER-START")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-START command\n", __FUNCTION__); - } else if (strncasecmp(buff, "RXFILTER-STOP", strlen("RXFILTER-STOP")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-STOP command\n", __FUNCTION__); - } else if (strncasecmp(buff, "RXFILTER-ADD", strlen("RXFILTER-ADD")) == 0) { - int filter_num = *(buff + strlen("RXFILTER-ADD") + 1) - '0'; - PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-ADD command, filter_num=%d\n", __FUNCTION__, filter_num); - } else if (strncasecmp(buff, "RXFILTER-REMOVE", strlen("RXFILTER-REMOVE")) == 0) { - int filter_num = *(buff + strlen("RXFILTER-REMOVE") + 1) - '0'; - PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-REMOVE command, filter_num=%d\n", __FUNCTION__, filter_num); - } else if (strncasecmp(buff, "BTCOEXSCAN-START", strlen("BTCOEXSCAN-START")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, BTCOEXSCAN-START command\n", __FUNCTION__); - } else if (strncasecmp(buff, "BTCOEXSCAN-STOP", strlen("BTCOEXSCAN-STOP")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, BTCOEXSCAN-STOP command\n", __FUNCTION__); - } else if (strncasecmp(buff, "BTCOEXMODE", strlen("BTCOEXMODE")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, BTCOEXMODE command\n", __FUNCTION__); - } else if (strncasecmp(buff, "SETBAND", strlen("SETBAND")) == 0) { - uint band = *(buff + strlen("SETBAND") + 1) - '0'; - PRINT_INFO(GENERIC_DBG, "%s, SETBAND command, band=%d\n", __FUNCTION__, band); - } else if (strncasecmp(buff, "GETBAND", strlen("GETBAND")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, GETBAND command\n", __FUNCTION__); - } else if (strncasecmp(buff, "COUNTRY", strlen("COUNTRY")) == 0) { - char *country_code = buff + strlen("COUNTRY") + 1; - PRINT_INFO(GENERIC_DBG, "%s, COUNTRY command, country_code=%s\n", __FUNCTION__, country_code); - } else { - PRINT_INFO(GENERIC_DBG, "%s, Unknown command\n", __FUNCTION__); - } - } break; /* ]] 2013-06-24 */ case SIOCSIWPRIV: -- cgit v1.2.3-59-g8ed1b From 61500fbd77eee4a27c59e3c930f03f5191db9da1 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Thu, 18 Jun 2015 14:46:05 +0900 Subject: staging: wilc1000: remove commented code Remove the commented codes using #if 0. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/coreconfigurator.c | 30 --- drivers/staging/wilc1000/coreconfigurator.h | 300 -------------------------- drivers/staging/wilc1000/host_interface.c | 76 ------- drivers/staging/wilc1000/host_interface.h | 65 +----- drivers/staging/wilc1000/linux_mon.c | 45 ---- drivers/staging/wilc1000/linux_wlan.c | 22 -- drivers/staging/wilc1000/wilc_sdio.c | 44 ---- drivers/staging/wilc1000/wilc_spi.c | 70 +----- drivers/staging/wilc1000/wilc_wfi_netdevice.c | 9 - drivers/staging/wilc1000/wilc_wlan.c | 31 --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 26 --- drivers/staging/wilc1000/wilc_wlan_if.h | 22 -- 12 files changed, 2 insertions(+), 738 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 523c863b22ac..ed6ac45c0385 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -210,9 +210,6 @@ static tstrWID gastrWIDs[] = { {WID_REKEY_POLICY, WID_CHAR}, {WID_REKEY_PERIOD, WID_INT}, {WID_REKEY_PACKET_COUNT, WID_INT}, -#if 0 - {WID_WEP_KEY_VALUE0, WID_STR}, -#endif {WID_11I_PSK, WID_STR}, {WID_1X_KEY, WID_STR}, {WID_1X_SERV_ADDR, WID_IP}, @@ -1619,26 +1616,6 @@ s32 further_process_response(u8 *resp, break; case WID_BIN_DATA: - #if 0 - /* FILE *fp_bin = NULL; */ - u8 first_bin_wid = 1; - if (first_bin_wid) { - /* fp_bin = fopen("wid_response.bin","wb"); */ - first_bin_wid = 0; - } else { - /* fp_bin = fopen("wid_response.bin","ab"); */ - } - - if (/*fp_bin == NULL*/ 0) { - PRINT_ER("Error: Could not open wid_response.bin for write\n"); - return -2; - } - - /* fwrite(resp + idx, cfg_len, 1, fp_bin); */ - - /* fclose(fp_bin); */ - #endif - if (pstrWIDresult->s32ValueSize >= cfg_len) { WILC_memcpy(pstrWIDresult->ps8WidVal, resp + idx, cfg_len); pstrWIDresult->s32ValueSize = cfg_len; @@ -1884,13 +1861,6 @@ s32 CreateConfigPacket(s8 *ps8packet, s32 *ps32PacketLength, pstrWIDs[u32idx].ps8WidVal, pstrWIDs[u32idx].s32ValueSize); break; - #if 0 - case WID_ADR: - ProcessAdrWid(ps8packet, ps32PacketLength, &pstrWIDs[u32idx], - pstrWIDs[u32idx].ps8WidVal); - break; - - #endif case WID_IP: ProcessIPwid(ps8packet, ps32PacketLength, &pstrWIDs[u32idx], pstrWIDs[u32idx].ps8WidVal); diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 3ca067ebe157..9059c8df7ce5 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -71,306 +71,6 @@ extern u16 g_num_total_switches; /*****************************************************************************/ /* Type Definitions */ /*****************************************************************************/ -/* WID Data Types */ -#if 0 -typedef enum { - WID_CHAR = 0, - WID_SHORT = 1, - WID_INT = 2, - WID_STR = 3, - WID_ADR = 4, - WID_BIN = 5, - WID_IP = 6, - WID_UNDEF = 7, - WID_TYPE_FORCE_32BIT = 0xFFFFFFFF -} tenuWIDtype; - -/* WLAN Identifiers */ -typedef enum { - WID_NIL = -1, - /* EMAC Character WID list */ - WID_BSS_TYPE = 0x0000, - WID_CURRENT_TX_RATE = 0x0001, - WID_CURRENT_CHANNEL = 0x0002, - WID_PREAMBLE = 0x0003, - WID_11G_OPERATING_MODE = 0x0004, - WID_STATUS = 0x0005, - WID_11G_PROT_MECH = 0x0006, - WID_SCAN_TYPE = 0x0007, - WID_PRIVACY_INVOKED = 0x0008, - WID_KEY_ID = 0x0009, - WID_QOS_ENABLE = 0x000A, - WID_POWER_MANAGEMENT = 0x000B, - WID_11I_MODE = 0x000C, - WID_AUTH_TYPE = 0x000D, - WID_SITE_SURVEY = 0x000E, - WID_LISTEN_INTERVAL = 0x000F, - WID_DTIM_PERIOD = 0x0010, - WID_ACK_POLICY = 0x0011, - WID_RESET = 0x0012, - WID_PCF_MODE = 0x0013, - WID_CFP_PERIOD = 0x0014, - WID_BCAST_SSID = 0x0015, - WID_PHY_TEST_PATTERN = 0x0016, - WID_DISCONNECT = 0x0016, - WID_READ_ADDR_SDRAM = 0x0017, - WID_TX_POWER_LEVEL_11A = 0x0018, - WID_REKEY_POLICY = 0x0019, - WID_SHORT_SLOT_ALLOWED = 0x001A, - WID_PHY_ACTIVE_REG = 0x001B, - WID_PHY_ACTIVE_REG_VAL = 0x001C, - WID_TX_POWER_LEVEL_11B = 0x001D, - WID_START_SCAN_REQ = 0x001E, - WID_RSSI = 0x001F, - WID_JOIN_REQ = 0x0020, - WID_ANTENNA_SELECTION = 0x0021, - WID_USER_CONTROL_ON_TX_POWER = 0x0027, - WID_MEMORY_ACCESS_8BIT = 0x0029, - WID_UAPSD_SUPPORT_AP = 0x002A, - WID_CURRENT_MAC_STATUS = 0x0031, - WID_AUTO_RX_SENSITIVITY = 0x0032, - WID_DATAFLOW_CONTROL = 0x0033, - WID_SCAN_FILTER = 0x0036, - WID_LINK_LOSS_THRESHOLD = 0x0037, - WID_AUTORATE_TYPE = 0x0038, - WID_CCA_THRESHOLD = 0x0039, - WID_802_11H_DFS_MODE = 0x003B, - WID_802_11H_TPC_MODE = 0x003C, - WID_DEVICE_READY = 0x003D, - WID_PM_NULL_FRAME_INTERVAL = 0x003E, - WID_PM_ACTIVITY_TIMER = 0x003F, - WID_PM_NULL_FRAME_WAIT_ENABLE = 0x0040, - WID_SCAN_WAIT_TIME = 0x0041, - WID_WSC_IE_EN = 0x0042, - WID_WPS_START = 0x0043, - WID_WPS_DEV_MODE = 0x0044, - WID_BT_COEXISTENCE = 0x0050, - WID_TRACKING_ROAMING = 0x0070, - WID_NUM_PKTS_FOR_RSSI_AVG = 0x0071, - WID_FHSS_SCAN_CHAN_INDEX = 0x0072, - WID_FHSS_SCAN_STEP_INDEX = 0x0073, - - /* NMAC Character WID list */ - WID_11N_PROT_MECH = 0x0080, - WID_11N_ERP_PROT_TYPE = 0x0081, - WID_11N_ENABLE = 0x0082, - WID_11N_OPERATING_MODE = 0x0083, - WID_11N_OBSS_NONHT_DETECTION = 0x0084, - WID_11N_HT_PROT_TYPE = 0x0085, - WID_11N_RIFS_PROT_ENABLE = 0x0086, - WID_11N_SMPS_MODE = 0x0087, - WID_11N_CURRENT_TX_MCS = 0x0088, - WID_11N_PRINT_STATS = 0x0089, - WID_HUT_FCS_CORRUPT_MODE = 0x008A, - WID_HUT_RESTART = 0x008B, - WID_HUT_TX_FORMAT = 0x008C, - WID_11N_SHORT_GI_20MHZ_ENABLE = 0x008D, - WID_HUT_BANDWIDTH = 0x008E, - WID_HUT_OP_BAND = 0x008F, - WID_HUT_STBC = 0x0090, - WID_HUT_ESS = 0x0091, - WID_HUT_ANTSET = 0x0092, - WID_HUT_HT_OP_MODE = 0x0093, - WID_HUT_RIFS_MODE = 0x0094, - WID_HUT_SMOOTHING_REC = 0x0095, - WID_HUT_SOUNDING_PKT = 0x0096, - WID_HUT_HT_CODING = 0x0097, - WID_HUT_TEST_DIR = 0x0098, - WID_HUT_CAPTURE_MODE = 0x0099, - WID_HUT_PHY_TEST_MODE = 0x009A, - WID_HUT_PHY_TEST_RATE_HI = 0x009B, - WID_HUT_PHY_TEST_RATE_LO = 0x009C, - WID_HUT_DISABLE_RXQ_REPLENISH = 0x009D, - WID_HUT_KEY_ORIGIN = 0x009E, - WID_HUT_BCST_PERCENT = 0x009F, - WID_HUT_GROUP_CIPHER_TYPE = 0x00A0, - WID_TX_ABORT_CONFIG = 0x00A1, - WID_HOST_DATA_IF_TYPE = 0x00A2, - WID_HOST_CONFIG_IF_TYPE = 0x00A3, - WID_HUT_TSF_TEST_MODE = 0x00A4, - WID_HUT_TSSI_VALUE = 0x00A5, - WID_HUT_PKT_TSSI_VALUE = 0x00A5, - WID_REG_TSSI_11B_VALUE = 0x00A6, - WID_REG_TSSI_11G_VALUE = 0x00A7, - WID_REG_TSSI_11N_VALUE = 0x00A8, - WID_TX_CALIBRATION = 0x00A9, - WID_DSCR_TSSI_11B_VALUE = 0x00AA, - WID_DSCR_TSSI_11G_VALUE = 0x00AB, - WID_DSCR_TSSI_11N_VALUE = 0x00AC, - WID_HUT_RSSI_EX = 0x00AD, - WID_HUT_ADJ_RSSI_EX = 0x00AE, - WID_11N_IMMEDIATE_BA_ENABLED = 0x00AF, - WID_11N_TXOP_PROT_DISABLE = 0x00B0, - WID_TX_POWER_LEVEL_11N = 0x00B1, - WID_HUT_MGMT_PERCENT = 0x00B3, - WID_HUT_MGMT_BCST_PERCENT = 0x00B4, - WID_HUT_MGMT_ALLOW_HT = 0x00B5, - WID_HUT_UC_MGMT_TYPE = 0x00B6, - WID_HUT_BC_MGMT_TYPE = 0x00B7, - WID_HUT_11W_MFP_REQUIRED_TX = 0x00B8, - WID_HUT_11W_MFP_PEER_CAPABLE = 0x00B9, - WID_HUT_11W_TX_IGTK_ID = 0x00BA, - WID_11W_ENABLE = 0x00BB, - WID_11W_MGMT_PROT_REQ = 0x00BC, - WID_USER_SEC_CHANNEL_OFFSET = 0x00C0, - WID_2040_COEXISTENCE = 0x00C1, - WID_HUT_FC_TXOP_MOD = 0x00C2, - WID_HUT_FC_PROT_TYPE = 0x00C3, - WID_HUT_SEC_CCA_ASSERT = 0x00C4, - WID_2040_ENABLE = 0x00C5, - WID_2040_CURR_CHANNEL_OFFSET = 0x00C6, - WID_2040_40MHZ_INTOLERANT = 0x00C7, - - - /* Custom Character WID list */ - WID_POWER_SAVE = 0x0100, - WID_WAKE_STATUS = 0x0101, - WID_WAKE_CONTROL = 0x0102, - WID_CCA_BUSY_START = 0x0103, - - /* EMAC Short WID list */ - WID_RTS_THRESHOLD = 0x1000, - WID_FRAG_THRESHOLD = 0x1001, - WID_SHORT_RETRY_LIMIT = 0x1002, - WID_LONG_RETRY_LIMIT = 0x1003, - WID_CFP_MAX_DUR = 0x1004, - WID_PHY_TEST_FRAME_LEN = 0x1005, - WID_BEACON_INTERVAL = 0x1006, - WID_MEMORY_ACCESS_16BIT = 0x1008, - WID_RX_SENSE = 0x100B, - WID_ACTIVE_SCAN_TIME = 0x100C, - WID_PASSIVE_SCAN_TIME = 0x100D, - WID_SITE_SURVEY_SCAN_TIME = 0x100E, - WID_JOIN_START_TIMEOUT = 0x100F, - WID_AUTH_TIMEOUT = 0x1010, - WID_ASOC_TIMEOUT = 0x1011, - WID_11I_PROTOCOL_TIMEOUT = 0x1012, - WID_EAPOL_RESPONSE_TIMEOUT = 0x1013, - WID_WPS_PASS_ID = 0x1017, - WID_WPS_CONFIG_METHOD = 0x1018, - WID_FHSS_INIT_SCAN_TIME = 0x1070, - WID_FHSS_ROAM_SCAN_TIME = 0x1071, - - /* NMAC Short WID list */ - WID_11N_RF_REG_VAL = 0x1080, - WID_HUT_FRAME_LEN = 0x1081, - WID_HUT_TXOP_LIMIT = 0x1082, - WID_HUT_SIG_QUAL_AVG = 0x1083, - WID_HUT_SIG_QUAL_AVG_CNT = 0x1084, - WID_11N_SIG_QUAL_VAL = 0x1085, - WID_HUT_RSSI_EX_COUNT = 0x1086, - WID_HUT_UC_MGMT_FRAME_LEN = 0x1088, - WID_HUT_BC_MGMT_FRAME_LEN = 0x1089, - - /* Custom Short WID list */ - - WID_CCA_BUSY_STATUS = 0x1100, - - /* EMAC Integer WID list */ - WID_FAILED_COUNT = 0x2000, - WID_RETRY_COUNT = 0x2001, - WID_MULTIPLE_RETRY_COUNT = 0x2002, - WID_FRAME_DUPLICATE_COUNT = 0x2003, - WID_ACK_FAILURE_COUNT = 0x2004, - WID_RECEIVED_FRAGMENT_COUNT = 0x2005, - WID_MCAST_RECEIVED_FRAME_COUNT = 0x2006, - WID_FCS_ERROR_COUNT = 0x2007, - WID_SUCCESS_FRAME_COUNT = 0x2008, - WID_PHY_TEST_PKT_CNT = 0x2009, - WID_HUT_TX_COUNT = 0x200A, - WID_TX_FRAGMENT_COUNT = 0x200B, - WID_TX_MULTICAST_FRAME_COUNT = 0x200C, - WID_RTS_SUCCESS_COUNT = 0x200D, - WID_RTS_FAILURE_COUNT = 0x200E, - WID_WEP_UNDECRYPTABLE_COUNT = 0x200F, - WID_REKEY_PERIOD = 0x2010, - WID_REKEY_PACKET_COUNT = 0x2011, - WID_1X_SERV_ADDR = 0x2012, - WID_STACK_IP_ADDR = 0x2013, - WID_STACK_NETMASK_ADDR = 0x2014, - WID_HW_RX_COUNT = 0x2015, - WID_MEMORY_ADDRESS = 0x201E, - WID_MEMORY_ACCESS_32BIT = 0x201F, - WID_RF_REG_VAL = 0x2021, - WID_FIRMWARE_INFO = 0x2023, - WID_DEV_OS_VERSION = 0x2025, - WID_ROAM_RSSI_THESHOLDS = 0x2070, - WID_TRACK_INTERVAL_SEC = 0x2071, - WID_FHSS_HOPPING_PARAMS = 0x2072, - WID_FHSS_HOP_DWELL_TIME = 0x2073, - - /* NMAC Integer WID list */ - WID_11N_PHY_ACTIVE_REG_VAL = 0x2080, - WID_HUT_NUM_TX_PKTS = 0x2081, - WID_HUT_TX_TIME_TAKEN = 0x2082, - WID_HUT_TX_TEST_TIME = 0x2083, - WID_HUT_LOG_INTERVAL = 0x2084, - - /* EMAC String WID list */ - WID_SSID = 0x3000, - WID_FIRMWARE_VERSION = 0x3001, - WID_OPERATIONAL_RATE_SET = 0x3002, - WID_BSSID = 0x3003, - #if 0 - WID_WEP_KEY_VALUE0 = 0x3004, - #endif - WID_11I_PSK = 0x3008, - WID_11E_P_ACTION_REQ = 0x3009, - WID_1X_KEY = 0x300A, - WID_HARDWARE_VERSION = 0x300B, - WID_MAC_ADDR = 0x300C, - WID_HUT_DEST_ADDR = 0x300D, - /*WID_HUT_STATS = 0x300E,*/ - WID_PHY_VERSION = 0x300F, - WID_SUPP_USERNAME = 0x3010, - WID_SUPP_PASSWORD = 0x3011, - WID_SITE_SURVEY_RESULTS = 0x3012, - WID_RX_POWER_LEVEL = 0x3013, - WID_MANUFACTURER = 0x3026, /*Added for CAPI tool */ - WID_MODEL_NAME = 0x3027, /*Added for CAPI tool */ - WID_MODEL_NUM = 0x3028, /*Added for CAPI tool */ - WID_DEVICE_NAME = 0x3029, /*Added for CAPI tool */ - - WID_ASSOC_RES_INFO = 0x3020, - - /* NMAC String WID list */ - WID_11N_P_ACTION_REQ = 0x3080, - WID_HUT_TEST_ID = 0x3081, - WID_PMKID_INFO = 0x3082, - - /* Custom String WID list */ - WID_FLASH_DATA = 0x3100, - WID_EEPROM_DATA = 0x3101, - WID_SERIAL_NUMBER = 0x3102, - - /* EMAC Binary WID list */ - WID_UAPSD_CONFIG = 0x4001, - WID_UAPSD_STATUS = 0x4002, - WID_AC_PARAMS_AP = 0x4003, - WID_AC_PARAMS_STA = 0x4004, - WID_NEWORK_INFO = 0x4005, - WID_WPS_CRED_LIST = 0x4006, - WID_PRIM_DEV_TYPE = 0x4007, - WID_STA_JOIN_INFO = 0x4008, - WID_CONNECTED_STA_LIST = 0x4009, - - /* NMAC Binary WID list */ - WID_11N_AUTORATE_TABLE = 0x4080, - WID_HUT_TX_PATTERN = 0x4081, - WID_HUT_STATS = 0x4082, - WID_HUT_LOG_STATS = 0x4083, - - /*BugID_3746 WID to add IE to be added in next probe request*/ - WID_INFO_ELEMENT_PROBE = 0x4085, - /*BugID_3746 WID to add IE to be added in next associate request*/ - WID_INFO_ELEMENT_ASSOCIATE = 0x4086, - - /* Miscellaneous WIDs */ - WID_ALL = 0x7FFE, - WID_MAX = 0xFFFF -} tenuWIDid; -#endif - /* Status Codes for Authentication and Association Frames */ typedef enum { SUCCESSFUL_STATUSCODE = 0, diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 3228824697f9..808b61b5df04 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1261,13 +1261,6 @@ static s32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr) pstrWFIDrv->strWILC_UsrScanReq.u32UserScanPvoid = pstrHostIFscanAttr->pvUserArg; #ifdef WILC_P2P - #if 0 - if (pstrWFIDrv->enuHostIFstate == HOST_IF_P2P_LISTEN || (pstrWFIDrv->enuHostIFstate == HOST_IF_CONNECTED && pstrWFIDrv->u8P2PConnect)) { - PRINT_INFO(GENERIC_DBG, "Busy: State: %d\n", pstrWFIDrv->enuHostIFstate); - PRINT_INFO(GENERIC_DBG, "Current Jiffies: %lu Timeout:%llu\n", jiffies, pstrWFIDrv->u64P2p_MgmtTimeout); - WILC_ERRORREPORT(s32Error, WILC_BUSY); - } - #endif #endif if ((pstrWFIDrv->enuHostIFstate >= HOST_IF_SCANNING) && (pstrWFIDrv->enuHostIFstate < HOST_IF_CONNECTED)) { @@ -1682,17 +1675,6 @@ static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFcon } #endif /*WILC_PARSE_SCAN_IN_HOST*/ -#if 0 - /* if we try to connect to an already connected AP then discard the request */ - PRINT_D(GENERIC_DBG, "Bssid = %x:%x:%x:%x:%x:%x\n", (pstrHostIFconnectAttr->pu8bssid[0]), (pstrHostIFconnectAttr->pu8bssid[1]), (pstrHostIFconnectAttr->pu8bssid[2]), (pstrHostIFconnectAttr->pu8bssid[3]), (pstrHostIFconnectAttr->pu8bssid[4]), (pstrHostIFconnectAttr->pu8bssid[5])); - PRINT_D(GENERIC_DBG, "bssid = %x:%x:%x:%x:%x:%x\n", (u8ConnectedSSID[0]), (u8ConnectedSSID[1]), (u8ConnectedSSID[2]), (u8ConnectedSSID[3]), (u8ConnectedSSID[4]), (u8ConnectedSSID[5])); - if (WILC_memcmp(pstrHostIFconnectAttr->pu8bssid, u8ConnectedSSID, ETH_ALEN) == 0) { - PRINT_ER("Discard connect request\n"); - s32Error = WILC_FAIL; - return s32Error; - } -#endif - if (pstrHostIFconnectAttr->pu8bssid != NULL) { pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = (u8 *)WILC_MALLOC(6); WILC_memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8bssid, pstrHostIFconnectAttr->pu8bssid, 6); @@ -5101,65 +5083,7 @@ s32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkK } return s32Error; } -#if 0 -/** - * @brief host_int_add_tx_gtk - * @details adds Tx GTk Key - * @param[in,out] handle to the wifi driver - * @param[in] message containing Tx GTK Key in the following format - *|----------------------------------------------------| - | KeyID | Key Length | Temporal Key | Tx Michael Key | - ||-------|------------|--------------|----------------| - ||1 byte | 1 byte | 16 bytes | 8 bytes | - ||----------------------------------------------------| - * @return Error code indicating success/failure - * @note - * @author zsalah - * @date 8 March 2012 - * @version 1.0 - */ -s32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx) -{ - s32 s32Error = WILC_SUCCESS; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; - tstrHostIFmsg strHostIFmsg; - - if (pstrWFIDrv == NULL) { - WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT); - } - /* prepare the Key Message */ - WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); - - strHostIFmsg.u16MsgId = HOST_IF_MSG_KEY; - strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.enuKeyType = WPATxGtk; - strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.u8KeyAction = ADDKEY; - - strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = (u8 *)WILC_MALLOC(u8KeyLen); - - WILC_memcpy(strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, - pu8TxGtk, u8KeyLen); - - strHostIFmsg.uniHostIFmsgBody.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen = u8KeyLen; - - /* send the message */ - s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); - if (s32Error) - PRINT_ER("Error in sending message queue: TX GTK\n"); - - /* ////////////// */ - down(&hSemTestKeyBlock); - WILC_Sleep(100); - /* /////// */ - - WILC_CATCH(s32Error) - { - - } - return s32Error; -} -#endif /** * @brief host_int_set_pmkid_info * @details caches the pmkid valid only in BSS STA mode if External Supplicant diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index dcd127575409..38db740745cd 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -15,48 +15,6 @@ /*****************************************************************************/ /* Macros */ /*****************************************************************************/ -#if 0 -#define WID_BSS_TYPE 0x0000 -#define WID_CURRENT_TX_RATE 0x0001 -#define WID_CURRENT_CHANNEL 0x0002 -#define WID_PREAMBLE 0x0003 -#define WID_STATUS 0x0005 -#define WID_SCAN_TYPE 0x0007 -#define WID_KEY_ID 0x0009 -#define WID_DTIM_PERIOD 0x0010 -#define WID_POWER_MANAGEMENT 0x000B -#define WID_AUTH_TYPE 0x000D -#define WID_SITE_SURVEY 0x000E -#define WID_DTIM_PERIOD 0x0010 -#define WID_DISCONNECT 0x0016 -#define WID_SHORT_SLOT_ALLOWED 0x001A -#define WID_START_SCAN_REQ 0x001E -#define WID_RSSI 0x001F -#define WID_JOIN_REQ 0x0020 -#define WID_11N_TXOP_PROT_DISABLE 0x00B0 -#define WID_RTS_THRESHOLD 0x1000 -#define WID_FRAG_THRESHOLD 0x1001 -#define WID_SHORT_RETRY_LIMIT 0x1002 -#define WID_LONG_RETRY_LIMIT 0x1003 -#define WID_BEACON_INTERVAL 0x1006 -#define WID_ACTIVE_SCAN_TIME 0x100C -#define WID_PASSIVE_SCAN_TIME 0x100D -#define WID_SITE_SURVEY_SCAN_TIME 0x100E -#define WID_AUTH_TIMEOUT 0x1010 -#define WID_11I_PSK 0x3008 -#define WID_SITE_SURVEY_RESULTS 0x3012 -#define WID_ADD_PTK 0x301B -#define WID_ADD_RX_GTK 0x301C -#define WID_ADD_TX_GTK 0x301D -#define WID_ADD_WEP_KEY 0x3019 -#define WID_REMOVE_WEP_KEY 0x301A -#define WID_REMOVE_KEY 0x301E -#define WID_ASSOC_REQ_INFO 0x301F -#define WID_ASSOC_RES_INFO 0x3020 -#define WID_PMKID_INFO 0x3082 -#define WID_SCAN_CHANNEL_LIST 0x4084 -#define WID_11I_MODE 0x000C -#endif #define FAIL 0x0000 #define SUCCESS 0x0001 @@ -115,16 +73,6 @@ /* typedef unsigned long uint32; */ /* typedef uint32 Bool; */ -#if 0 -typedef enum {WID_CHAR = 0, - WID_SHORT = 1, - WID_INT = 2, - WID_STR = 3, - WID_ADR = 4, - WID_BIN = 5, - WID_IP = 6, - WID_UNDEF = 7} WID_TYPE_T; -#endif typedef struct { u16 cfg_wid; WID_TYPE_T cfg_type; @@ -160,18 +108,7 @@ typedef struct _tstrHostIFpmkidAttr { u8 numpmkid; tstrHostIFpmkid pmkidlist[WILC_MAX_NUM_PMKIDS]; } tstrHostIFpmkidAttr; -#if 0 -/* Scan type parameter for scan request */ -typedef enum { - PASSIVE_SCAN = 0, - ACTIVE_SCAN = 1, - NUM_SCANTYPE -} tenuScanType; - -typedef enum {SITE_SURVEY_1CH = 0, - SITE_SURVEY_ALL_CH = 1, - SITE_SURVEY_OFF = 2} SITE_SURVEY_T; -#endif + typedef enum { AUTORATE = 0, MBPS_1 = 1, diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 30d1c76e89c2..f5296f53a3d2 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -533,51 +533,6 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi if (wilc_wfi_mon) { return wilc_wfi_mon; } -#if 0 - wilc_wfi_mon = alloc_netdev(sizeof(struct WILC_WFI_mon_priv), name, WILC_WFI_mon_setup); - if (wilc_wfi_mon == NULL) { - PRINT_ER("Failed to allocate netdevice\n"); - goto failed; - } - - /* rtnl_lock(); */ - PRINT_INFO(HOSTAPD_DBG, "Monitor interface name %s\n", wilc_wfi_mon->name); - - - ret = dev_alloc_name(wilc_wfi_mon, wilc_wfi_mon->name); - if (ret < 0) - goto failed_mon; - - - priv = netdev_priv(wilc_wfi_mon); - if (priv == NULL) { - PRINT_ER("private structure is NULL\n"); - return WILC_FAIL; - } - - priv->real_ndev = real_dev; - - - ret = register_netdevice(wilc_wfi_mon); - - - if (ret < 0) { - PRINT_ER("Failed to register netdevice\n"); - goto failed_mon; - } - - - return WILC_SUCCESS; - /* rtnl_unlock(); */ - -failed: - return ret; - -failed_mon: - /* rtnl_unlock(); */ - free_netdev(wilc_wfi_mon); - return ret; -#endif wilc_wfi_mon = alloc_etherdev(sizeof(struct WILC_WFI_mon_priv)); if (!wilc_wfi_mon) { diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 8ecbb2d50900..c46f088656d2 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -756,28 +756,6 @@ static void linux_wlan_mac_indicate(int flag) } if (pd->mac_status == WILC_MAC_STATUS_CONNECT) { /* Connect */ -#if 0 - /** - * get the mac and bssid address - **/ - PRINT_D(RX_DBG, "Calling cfg_get to get MAC_ADDR\n"); - pd->oup.wlan_cfg_get(1, WID_MAC_ADDR, 0); - PRINT_D(RX_DBG, "Calling cfg_get to get BSSID\n"); - pd->oup.wlan_cfg_get(0, WID_BSSID, 1); - - /** - * get the value - **/ - pd->oup.wlan_cfg_get_value(WID_MAC_ADDR, pd->eth_src_address, 6); - pd->oup.wlan_cfg_get_value(WID_BSSID, pd->eth_dst_address, 6); - - PRINT_D(GENERIC_DBG, "Source Address = %s", pd->eth_src_address); - PRINT_D(GENERIC_DBG, "Destiation Address = %s", pd->eth_dst_address); - - /** - * launch ndis - **/ -#endif } } else if (flag == WILC_MAC_INDICATE_SCAN) { diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index d96abb05a83e..897e47e317ff 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -294,13 +294,6 @@ static int sdio_write_reg(uint32_t addr, uint32_t data) g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53, write reg (%08x)...\n", addr); goto _fail_; } - -#if 0 - if (!sdio_check_bs()) - goto _fail_; -#else - /* g_sdio.os_func.os_sleep(1); */ -#endif } return 1; @@ -463,14 +456,6 @@ static int sdio_write(uint32_t addr, uint8_t *buf, uint32_t size) buf += nblk * block_size; #endif /* platform */ - -#if 0 - if (!sdio_check_bs()) - goto _fail_; -#else - /* g_sdio.os_func.os_sleep(1); */ -#endif - } @@ -490,13 +475,6 @@ static int sdio_write(uint32_t addr, uint8_t *buf, uint32_t size) g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], bytes send...\n", addr); goto _fail_; } - -#if 0 - if (!sdio_check_bs()) - goto _fail_; -#else - /* g_sdio.os_func.os_sleep(1); */ -#endif } return 1; @@ -539,13 +517,6 @@ static int sdio_read_reg(uint32_t addr, uint32_t *data) g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53, read reg (%08x)...\n", addr); goto _fail_; } - -#if 0 - if (!sdio_check_bs()) - goto _fail_; -#else - /* g_sdio.os_func.os_sleep(1); */ -#endif } #ifdef BIG_ENDIAN @@ -712,14 +683,6 @@ static int sdio_read(uint32_t addr, uint8_t *buf, uint32_t size) buf += nblk * block_size; #endif /* platform */ - -#if 0 - if (!sdio_check_bs()) - goto _fail_; -#else - /* g_sdio.os_func.os_sleep(1); */ -#endif - } /* if (nblk > 0) */ if (nleft > 0) { @@ -738,13 +701,6 @@ static int sdio_read(uint32_t addr, uint8_t *buf, uint32_t size) g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], bytes read...\n", addr); goto _fail_; } - -#if 0 - if (!sdio_check_bs()) - goto _fail_; -#else - /* g_sdio.os_func.os_sleep(1); */ -#endif } return 1; diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index ba9b30acfb57..abea5df656d7 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -421,42 +421,6 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, return result; } -#if 0 - { - int jj; - PRINT_D(BUS_DBG, "--- cnd = %x, len=%d, len2=%d\n", cmd, len, len2); - for (jj = 0; jj < sizeof(wb) / sizeof(wb[0]); jj++) { - - if (jj >= len2) - break; - if (((jj + 1) % 16) != 0) { - if ((jj % 16) == 0) { - PRINT_D(BUS_DBG, "wb[%02x]: %02x ", jj, wb[jj]); - } else { - PRINT_D(BUS_DBG, "%02x ", wb[jj]); - } - } else { - PRINT_D(BUS_DBG, "%02x\n", wb[jj]); - } - } - - for (jj = 0; jj < sizeof(rb) / sizeof(rb[0]); jj++) { - - if (jj >= len2) - break; - if (((jj + 1) % 16) != 0) { - if ((jj % 16) == 0) { - PRINT_D(BUS_DBG, "rb[%02x]: %02x ", jj, rb[jj]); - } else { - PRINT_D(BUS_DBG, "%02x ", rb[jj]); - } - } else { - PRINT_D(BUS_DBG, "%02x\n", rb[jj]); - } - } - } -#endif - /** * Command/Control response **/ @@ -552,10 +516,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, for (ix = 0; (rix < len2) && (ix < sz); ) { b[ix++] = rb[rix++]; } -#if 0 - if (ix) - PRINT_D(BUS_DBG, "ttt %d %d\n", sz, ix); -#endif + sz -= ix; if (sz > 0) { @@ -596,9 +557,6 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, while (sz > 0) { int nbytes; -#if 0 - PRINT_INFO(BUS_DBG, "rrr %d %d\n", sz, ix); -#endif if (sz <= DATA_PKT_SZ) { nbytes = sz; } else { @@ -788,32 +746,6 @@ static int spi_data_write(uint8_t *b, uint32_t sz) /** * No need to wait for response **/ -#if 0 - /** - * Respnose - **/ - if (!g_spi.spi_rx(&rsp, 1)) { - PRINT_ER("[wilc spi]: Failed data block write, response read, bus error...\n"); - result = N_FAIL; - break; - } - - if (((rsp >> 4) & 0xf) != 0xc) { - result = N_FAIL; - PRINT_ER("[wilc spi]: Failed data block write response...(%02x)\n", rsp); - break; - } - - /** - * State - **/ - if (!g_spi.spi_rx(&rsp, 1)) { - PRINT_ER("[wilc spi]: Failed data block write, read state, bus error...\n"); - result = N_FAIL; - break; - } -#endif - ix += nbytes; sz -= nbytes; } while (sz); diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.c b/drivers/staging/wilc1000/wilc_wfi_netdevice.c index f6974a6b116f..ab66ce4bd790 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.c +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.c @@ -332,15 +332,6 @@ void WILC_WFI_Rx(struct net_device *dev, struct WILC_WFI_packet *pkt) WILC_WFI_monitor_rx(dev, skb); return; } -#if 0 - PRINT_D(RX_DBG, "In RX NORMAl Device name %s\n", dev->name); - /* Write metadata, and then pass to the receive level */ - skb->dev = dev; - skb->protocol = eth_type_trans(skb, dev); - skb->ip_summed = CHECKSUM_UNNECESSARY; /* don't check it */ - WILC_WFI_update_stats(priv->dev->ieee80211_ptr->wiphy, pkt->datalen, WILC_WFI_RX_PKT); - netif_rx(skb); -#endif out: return; } diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index db9e7173c957..3af91f770485 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -2044,37 +2044,6 @@ uint32_t init_chip(void) } } - - #if 0 - if ((chipid & 0xfff) < 0xf0) { - /* Setting MUX to probe sleep signal on pin 6 of J216*/ - g_wlan.hif_func.hif_write_reg(0x1060, 0x1); - g_wlan.hif_func.hif_write_reg(0x1180, 0x33333333); - g_wlan.hif_func.hif_write_reg(0x1184, 0x33333333); - g_wlan.hif_func.hif_read_reg(0x1408, ®); - /* set MUX for GPIO_4 (pin 4) to cortus GPIO*/ - reg &= ~((0x7 << 16)); - g_wlan.hif_func.hif_write_reg(0x1408, (reg | (0x7 << 12))); - } else { - /* Enable test bus*/ - g_wlan.hif_func.hif_write_reg(0x1060, 0x1); - /* Rotate bus signals to get sleep signal on pin 6 like it was on previous chips*/ - g_wlan.hif_func.hif_write_reg(0x1188, 0x70); - /* Set output of pin 6 to test bus 0x1*/ - /* Set output of pin 9 to test bus 0x2*/ - g_wlan.hif_func.hif_write_reg(0x1180, 0x200100); - g_wlan.hif_func.hif_read_reg(0x1408, ®); - - /* set MUX for GPIO_4 (pin 4) to cortus GPIO*/ - reg &= ~((0x7 << 16)); - /* set MUX for GPIO_3 (pin 6) to test bus*/ - reg |= (0x7 << 12) | (0x7 << 24); - g_wlan.hif_func.hif_write_reg(0x1408, reg); - } - #endif - - - release_bus(RELEASE_ONLY); return ret; diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index 9631b18c0bb7..3cffe55b3a93 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -374,11 +374,6 @@ static int wilc_wlan_parse_info_frame(uint8_t *info, int size) int type = WILC_CFG_RSP_STATUS; wid = info[0] | (info[1] << 8); -#if 0 -#ifdef BIG_ENDIAN - wid = BYTE_SWAP(wid); -#endif -#endif len = info[2]; PRINT_INFO(GENERIC_DBG, "Status Len = %d Id= %d\n", len, wid); @@ -390,27 +385,6 @@ static int wilc_wlan_parse_info_frame(uint8_t *info, int size) return type; } -#if 0 -static int wilc_wlan_parse_network_frame(uint8_t *info, int size) -{ - wilc_mac_cfg_t *priv = (wilc_mac_cfg_t *)&g_mac; - uint32_t wid, len; - - wid = info[0] | (info[1] << 8); - len = info[2] | (info[3] << 8); - - /** - * Review: this message is only for AP mode. - * TBD - **/ - if (wid == WID_NETWORK_INFO) { /* not send by the firmware */ - - } - - return; -} -#endif - /******************************************** * * Configuration Exported Functions diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index ea0ec412b907..8ed51e385118 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -169,28 +169,6 @@ typedef struct { wilc_wlan_indicate_func_t indicate_func; } wilc_wlan_inp_t; -#if 0 -typedef struct { - int start; - uint32_t id; - void *buffer; - uint32_t buffer_size; - int commit; -} wilc_wlan_cfg_set_t; - -typedef struct { - int start; - uint32_t id; - int commit; -} wilc_wlan_cfg_get_t; - -typedef struct { - uint32_t id; - void *buffer; - uint32_t buffer_size; -} wilc_wlan_cfg_val_t; -#endif - struct tx_complete_data { #ifdef WILC_FULLY_HOSTING_AP struct tx_complete_data *next; -- cgit v1.2.3-59-g8ed1b From 60cb1e20c4732c2704d7a5a2b9fd291b6b548671 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Fri, 19 Jun 2015 09:06:28 +0900 Subject: staging: wilc1000: fix checkpatch warning Fix warning founded by checkpatch.pl. WARNING: __func__ should be used instead of gcc specific __FUNCTION__ Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/linux_wlan_common.h | 16 ++++++++-------- drivers/staging/wilc1000/wilc_platform.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/staging/wilc1000/linux_wlan.c') diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index c46f088656d2..b352c504a77d 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2403,7 +2403,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) snprintf(buff, size, "rssi %d", rssi); if (copy_to_user(wrq->u.data.pointer, buff, size)) { - PRINT_ER("%s: failed to copy data to user buffer\n", __FUNCTION__); + PRINT_ER("%s: failed to copy data to user buffer\n", __func__); s32Error = -EFAULT; goto done; } diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h index 830d96a1f84e..2476bfda1b46 100644 --- a/drivers/staging/wilc1000/linux_wlan_common.h +++ b/drivers/staging/wilc1000/linux_wlan_common.h @@ -54,7 +54,7 @@ extern atomic_t DEBUG_LEVEL; do { \ if ((atomic_read(&DEBUG_LEVEL) & DEBUG) && \ ((atomic_read(®ION)) & (region))) { \ - printk("DBG [%s: %d]", __FUNCTION__, __LINE__); \ + printk("DBG [%s: %d]", __func__, __LINE__); \ printk(__VA_ARGS__); \ } \ } while (0) @@ -63,7 +63,7 @@ extern atomic_t DEBUG_LEVEL; do { \ if ((atomic_read(&DEBUG_LEVEL) & INFO) && \ ((atomic_read(®ION)) & (region))) { \ - printk("INFO [%s]", __FUNCTION__); \ + printk("INFO [%s]", __func__); \ printk(__VA_ARGS__); \ } \ } while (0) @@ -72,7 +72,7 @@ extern atomic_t DEBUG_LEVEL; do { \ if ((atomic_read(&DEBUG_LEVEL) & WRN) && \ ((atomic_read(®ION)) & (region))) { \ - printk("WRN [%s: %d]", __FUNCTION__, __LINE__); \ + printk("WRN [%s: %d]", __func__, __LINE__); \ printk(__VA_ARGS__); \ } \ } while (0) @@ -80,7 +80,7 @@ extern atomic_t DEBUG_LEVEL; #define PRINT_ER(...) \ do { \ if ((atomic_read(&DEBUG_LEVEL) & ERR)) { \ - printk("ERR [%s: %d]", __FUNCTION__, __LINE__); \ + printk("ERR [%s: %d]", __func__, __LINE__); \ printk(__VA_ARGS__); \ } \ } while (0) @@ -96,7 +96,7 @@ extern atomic_t DEBUG_LEVEL; #define PRINT_D(region, ...) \ do { \ if (DEBUG == 1 && ((REGION)&(region))) { \ - printk("DBG [%s: %d]", __FUNCTION__, __LINE__); \ + printk("DBG [%s: %d]", __func__, __LINE__); \ printk(__VA_ARGS__); \ } \ } while (0) @@ -104,7 +104,7 @@ extern atomic_t DEBUG_LEVEL; #define PRINT_INFO(region, ...) \ do { \ if (INFO == 1 && ((REGION)&(region))) { \ - printk("INFO [%s]", __FUNCTION__); \ + printk("INFO [%s]", __func__); \ printk(__VA_ARGS__); \ } \ } while (0) @@ -112,14 +112,14 @@ extern atomic_t DEBUG_LEVEL; #define PRINT_WRN(region, ...) \ do { \ if (WRN == 1 && ((REGION)&(region))) { \ - printk("WRN [%s: %d]", __FUNCTION__, __LINE__); \ + printk("WRN [%s: %d]", __func__, __LINE__); \ printk(__VA_ARGS__); \ } \ } while (0) #define PRINT_ER(...) \ do { \ - printk("ERR [%s: %d]", __FUNCTION__, __LINE__); \ + printk("ERR [%s: %d]", __func__, __LINE__); \ printk(__VA_ARGS__); \ } while (0) #endif diff --git a/drivers/staging/wilc1000/wilc_platform.h b/drivers/staging/wilc1000/wilc_platform.h index 7ddea8336af6..d03532cc3af2 100644 --- a/drivers/staging/wilc1000/wilc_platform.h +++ b/drivers/staging/wilc1000/wilc_platform.h @@ -47,6 +47,6 @@ typedef time_t WILC_Time; /* Generic printf function */ #define __WILC_FILE__ __FILE__ -#define __WILC_FUNCTION__ __FUNCTION__ +#define __WILC_FUNCTION__ __func__ #define __WILC_LINE__ __LINE__ #endif -- cgit v1.2.3-59-g8ed1b