summaryrefslogtreecommitdiff
path: root/drivers/staging/wilc1000/wilc_wfi_netdevice.h
AgeCommit message (Collapse)AuthorFilesLines
2016-02-22staging: wilc1000: wilc_wfi_netdevice: Remove header filesAmitoj Kaur Chawla1-2/+0
Remove duplicate header files. Found using includecheck. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: removes wilc_dbg()Leo Kim1-2/+0
This patch removes wilc_dbg function because it's not any more. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: wilc1000: remove unnecessary wilc_rx_complete functionChris Park1-1/+0
This patch remove unnecessary wilc_rx_complete function because this function only print unused log message. remove unused has_packet variable nomore. Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: wilc1000: renames u8IfIdx of wilc_vif structureLeo Kim1-1/+1
This patch renames u8IfIdx variable of wilc_vif structure to idx to avoid camelcase. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: wilc1000: rename hWILCWFIDrv of wilc_priv structureLeo Kim1-1/+1
This patch renames hWILCWFIDrv pointer variable of wilc_priv structure to hif_drv to avoid camelcase. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: wilc1000: fix WEP security bugGlen Lee1-1/+0
Station cannot connect to soft AP mode wilc when it is configured for WEP security. This patch fixes it by setting the key index within the key value and change the last else condition with DEFAULTKEY action case, and also do not use WILC_WFI_wep_default index to set wep key id. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: wilc1000: increase link speedGlen Lee1-0/+2
This patch increases throughput by enabling tcp ack filter base on checking statistics and also handling tcp session. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-04staging: wilc1000: set bssid with modeGlen Lee1-1/+2
This patch add new argument mode to wilc_wlan_set_bssid and define mode in struct wilc_vif also. The mode is used by get_if_handler function to get proper netdevice for each mode. The get_if_handler is changed together. Remove invalid handle codes and add mode condition to get netdevice for the mode. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-04staging: wilc1000: remove wilc_set_machw_change_vir_ifGlen Lee1-1/+0
wilc_set_machw_change_vir_if is not used anymore since we use one unified firmware. Instead, wilc_set_operation_mode is called when wilc_mac_open to let the wilc use the proper firmware. Remove wilc_set_machw_change_vir_if and it's functions calls. In the later patch, mac index will be passed to wilc device. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-04staging: wilc1000: add sdio resume/suspendGlen Lee1-0/+1
This patch introduces sdio device suspend and resume functionality. sdio_reset function is added to reset sdio. Remove static inline keyword from chip_allow_sleep and chip_wakeup, and export symbols. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-22staging: wilc1000: remove duplicate netdevGlen Lee1-1/+0
There are two net_device pointer which is the same because two structures are merged into wilc_vif in previous patch. Remove wilc_netdev and change with ndev. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-22staging: wilc1000: change vif to pointer to refence real private dataGlen Lee1-1/+1
vif of struct has it's own memory which is not necessary because we have allocated vif from netdev_priv. Change vif to pointer type and assign vif which is netdev private data. Change it's operator on related codes as well. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-22staging: wilc1000: move perInterface_wlan_t to wilc_vifGlen Lee1-12/+9
perInterface_wlan_t and wilc_vif are all about interface control informations. We will combine those two structures and maintain as one network interface control information. Move all the members of perInterface_wlan_t to wilc_vif and remove the structure. Rename perInterace_wlan_t to wilc_vif and rename variable name nic to vif which is proper name for it. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-22staging: wilc1000: remove unneeded extern variableGlen Lee1-1/+0
This patch removes unnedded extern variable WILC_WFI_devs[] which is not used. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-22staging: wilc1000: move all of wilc_wlan_dev_t to struct wilcGlen Lee1-0/+22
linux_wlan.c and wilc_wlan.c was separated into two part at the beginning to support various platforms. They are in charge of send/receive control and packet data, so they will be merged into one file wlan.c later. First of all, wilc_wlan_dev_t which is used as global variable of wilc_wlan.c will be moved into struct wilc. This patch moves all members of wilc_wlan_dev_t to struct wilc and use wilc instead of g_wlan. Finally remove wilc_wlan_dev_t and g_wlan. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-22staging: wilc1000: wilc_wlan.c: remove hif_func of wilc_wlan_dev_tGlen Lee1-1/+1
hif_func of wilc_wlan_dev_t is duplicate because we have same struct wilc_hif_func ops of struct wilc which is available in wilc_wlan.c. Rename ops of struct wilc with hif_func and remove hif_func of wilc_wlan_dev_t, and use wilc->hif_func instead of g_wlan.hif_func in all functions. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging: wilc1000: use wilc instead of wilc_dev and remove wilc_devGlen Lee1-1/+0
This patch changes wilc_dev with wilc in the function call wilc_wlan_get_num_conn_ifcs, and remove wilc_dev and it's related codes. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging: wilc1000: wilc_dbg: remove wilcGlen Lee1-1/+1
This patch remove parameter struct wilc since it is not used and also wilc_dev will be removed. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: pass struct wilc to most linux_wlan.c functionsArnd Bergmann1-5/+7
We want to get rid of all global variables in this driver, and instead pass device structures from one function to another. This changes the linux_wlan.c and wilc_wlan.c to do this for the most part. There are a few exceptions where these functions are themselves called from another part of the driver that does not have an instance pointer at hand. Changing those would be a follow-up step. There are a few other globals that will have to get moved into struct wilc at a later point. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: pass hif operations through initializationArnd Bergmann1-1/+3
The wilc_hif_spi and wilc_hif_sdio structures are part of the bus specific code, and the generic code should have no knowledge of their addresses. This changes the code to reference them only from the bus specific initialization code, which we can then use to split up the driver into separate modules. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIOArnd Bergmann1-4/+3
Whether the SDIO function uses an internal or external interrupt should not be a compiletime decision but be determined at runtime. This changes the code to pass a GPIO number from the init code as early as possible, and leaves just one #ifdef WILC_SDIO_IRQ_GPIO to preserve the previous behavior. All other locations that check for the interrupt method are turned into runtime checks based on the gpio number (>=0) or the interrupt number (>0). Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: pass io_type to wilc_netdev_initArnd Bergmann1-1/+1
In order to avoid some of the #ifdefs, this passes the io_type and device pointer as an argument to wilc_netdev_init. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: unify device pointerArnd Bergmann1-5/+1
struct wilc has two pointers to store the device, one for sdio_func and one for spi_device. By changing the pointer to a 'struct device', we can simplify the logic and avoid a few #ifdefs. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: move init/exit functions to driver filesArnd Bergmann1-1/+1
The driver interfaces are in linux_wlan_sdio.c and linux_wlan_spi.c, so this is where the init and exit functions should be. Splitting this up enables further cleanups, including eventually allowing both modules to be built together. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: move wilc_wlan_inp_t into struct wilcArnd Bergmann1-0/+1
wilc_wlan_inp_t is an unnecessary indirection and requires linux_wlan.c to have knowledge of the specific sdio and spi front-ends. This removes the structure and places io_type directly inside the struct wilc. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: move extern declarations to headersArnd Bergmann1-0/+2
'extern' declarations belong into a header file rather than a .c file, to ensure that the definition matches the declaration. This moves all declarations into a header file that seems most appropriate for it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19staging/wilc1000: use proper naming for global symbolsArnd Bergmann1-4/+4
There are many global symbols in the wilc1000 driver, some of them with names like "DEBUG_LEVEL" or "probe" that are not acceptable for globals in the linux kernel as they may easily conflict with other (equally broken) drivers. This renames all the globals that do not already start with wilc or a variation of that to start with wilc_ and to follow the usual naming conventions. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: rename bValue in set_machw_change_vir_if functionLeo Kim1-1/+1
This patch rename bValue to value that is second argument of set_machw_change_vir_if function to avoid camelcase. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: rename Set_machw_change_vir_if functionLeo Kim1-1/+1
This patch rename Set_machw_change_vir_if function to set_machw_change_vir_if to avoid CamelCase naming convention. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: rename pBSSID of function linux_wlan_set_bssidLeo Kim1-0/+1
This patch renames pBSSID of function linux_wlan_set_bssid to bssid to avoid CamelCase naming convention. Also, prototype linux_wlan_set_bssid in wilc_wfi_cfgoperations.c is moved to wilc_wfi_netdevice.h. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: wl_wlan_cleanup: add argument struct wilcGlen Lee1-1/+1
This patch adds new argument struct wilc and use it instead of g_linux_wlan. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: linux_wlan_get_firmware: change argument p_nic with devGlen Lee1-0/+1
This patch changes argument perInterface_wlan_t *p_nic with struct net_device *dev and use netdev private data nic and it's member wilc instead of g_linux_wlan. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: wilc1000: Set_machw_change_vir_if: add argument struct net_deviceGlen Lee1-0/+1
Add new argument net_device and use netdev private data member wilc instead of g_linux_wlan. Pass argument dev to the function as well. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: wilc1000: frmw_to_linux: add argument struct wilcGlen Lee1-1/+1
This patch adds new argument struct wilc and use it instead of g_linux_wlan. Pass argument wilc to the function as well. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: wilc1000: WILC_WFI_mgmt_rx: add argument wilc and use itGlen Lee1-0/+1
This patch add new argument wilc and use it instead of g_wlan_linux. Declare the function in wilc_wfi_netdevice.h. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: wilc1000: linux_wlan_mac_indicate: add argument and use wilcGlen Lee1-1/+1
This patch adds argument wilc and pass the function wilc. Use wilc instead of g_linux_wlan and pd. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: wilc1000_wlan_deinit: change argument and use wilcGlen Lee1-0/+1
This patch changes function argument wilc with net_device and use nic->wilc instead of global variable g_linux_wlan. The null check codes should be placed before it is used so move it. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: add wilc to netdev private data structureGlen Lee1-1/+1
This patch add wilc to struct perInterface_wlan_t which is netdev private data to access wilc via netdev_priv function. Assign wilc to nic->wilc. The global variable g_linux_wlan will be replaced with netdev private data member wilc step by step. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: assign pointer of g_linux_wlan to sdio device dataTony Cho1-0/+1
This patch assigns wl pointer to sdio device data. The global variable g_linux_wlan will be removed finally. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: rename wilc_firmware in the struct wilcTony Cho1-1/+1
This patch renames wilc_firmware in the struct wilc to the firmware. In addition, null assignments to the wl->firmware after release_firmware are removed because it is not necessary. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: move clean up codes into wl_wlan_cleanup functionTony Cho1-1/+1
This patch moves clean up codes from exit_wilc_driver into the wl_wlan_cleanup newly introduced in this patch. In addition, it is called by linux_sdio_remove function. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: rename wilc_netdev in the struct wilc_vifTony Cho1-1/+1
This patch renames wilc_netdev in the struct wilc_vif to the ndev. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: rename drvHandler in the struct wilc_vifTony Cho1-1/+1
This patch renames drvHandler in the struct wilc_vif to the hif_drv. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: rename aBSSID in the sturct wilc_vifTony Cho1-1/+1
This patch renames aBSSID in the struct wilc_vif to the bssid. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: rename aSrcAddress in the struct wilc_vifTony Cho1-1/+1
This patch renames aSrcAddress in the struct wilc_vif to the src_addr. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: rename strInterfaceInfo in the sturct wilcTony Cho1-1/+1
This patch renames strInterfaceInfo in the struct wilc to the vif. In addition, unnecessary print statements around it are removed in this patch. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: rename u8NoIfcs in the struct wilcTony Cho1-1/+1
This patch renames u8NoIfcs of the struct wilc to the vif_num to avoid CamelCase naming convention. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: wilc1000: change the type of wilc1000_initializedTony Cho1-1/+1
This patch changes the type of wilc1000_initialized in the struc wilc from int to bool and also renames it to the initialized. In addition, unnecessary wilc1000_initialized codes are removed in this patch. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: wilc1000: remove typedef from the tstrInterfaceInfoTony Cho1-3/+3
This patch removes typedef from the tstrInterfaceInfo and renames it to the wilc_vif. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: wilc1000: remove typedef from the linux_wlan_tTony Cho1-4/+4
This patch removes typedef from the struct linux_wlan_t and renames it to the wilc. In addition, all of linux_wlan_t is replaced with struct wilc and memory allocation style is changed with preferred form as well like the following: p = kmalloc(sizeof(*p), ...) where "struct wilc" is used Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>