1
0
Fork 0
Commit Graph

71 Commits (857c7b00d2400b2f8a825b4710e9c3d2ebef4aa1)

Author SHA1 Message Date
Arnd Bergmann 857c7b00d2 staging/wilc1000: move init/exit functions to driver files
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-18 14:19:20 -08:00
Arnd Bergmann 4bd7baf04d staging/wilc1000: move wilc_wlan_inp_t into struct wilc
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-18 14:19:20 -08:00
Arnd Bergmann 491880eb47 staging/wilc1000: move extern declarations to headers
'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-18 14:19:20 -08:00
Arnd Bergmann 0e1af73dde staging/wilc1000: use proper naming for global symbols
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-12-18 14:19:20 -08:00
Leo Kim aa313be3c5 staging: wilc1000: rename bValue in set_machw_change_vir_if function
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-15 20:02:47 -08:00
Leo Kim 2ad8c47d5c staging: wilc1000: rename Set_machw_change_vir_if function
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-15 20:02:47 -08:00
Leo Kim f66dee7bfd staging: wilc1000: rename pBSSID of function linux_wlan_set_bssid
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-15 20:02:47 -08:00
Glen Lee 90b984c855 staging: wilc1000: wl_wlan_cleanup: add argument struct wilc
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-15 20:02:47 -08:00
Glen Lee 65c8adcfd8 staging: wilc1000: linux_wlan_get_firmware: change argument p_nic with dev
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-11-15 20:02:47 -08:00
Glen Lee 178c383f54 staging: wilc1000: Set_machw_change_vir_if: add argument struct net_device
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-29 08:11:23 +09:00
Glen Lee cb1991aca9 staging: wilc1000: frmw_to_linux: add argument struct wilc
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-29 08:11:23 +09:00
Glen Lee 11f4b2eee7 staging: wilc1000: WILC_WFI_mgmt_rx: add argument wilc and use it
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-29 08:11:23 +09:00
Glen Lee 64f2b71b60 staging: wilc1000: linux_wlan_mac_indicate: add argument and use wilc
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-29 08:08:47 +09:00
Glen Lee 53dc0cfea3 staging: wilc1000: wilc1000_wlan_deinit: change argument and use wilc
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-24 18:16:57 -07:00
Glen Lee 38b3001de9 staging: wilc1000: add wilc to netdev private data structure
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-24 18:15:40 -07:00
Tony Cho 12ba5416dc staging: wilc1000: assign pointer of g_linux_wlan to sdio device data
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-24 18:14:35 -07:00
Tony Cho 8b8ad7bc90 staging: wilc1000: rename wilc_firmware in the struct wilc
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-24 18:14:35 -07:00
Tony Cho 4875c499dc staging: wilc1000: move clean up codes into wl_wlan_cleanup function
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-24 18:14:35 -07:00
Tony Cho 817f3fb988 staging: wilc1000: rename wilc_netdev in the struct wilc_vif
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-24 18:14:35 -07:00
Tony Cho 3134a57875 staging: wilc1000: rename drvHandler in the struct wilc_vif
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-24 18:14:35 -07:00
Tony Cho 7201cd2ca5 staging: wilc1000: rename aBSSID in the sturct wilc_vif
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-24 18:14:35 -07:00
Tony Cho 7e7fa470ef staging: wilc1000: rename aSrcAddress in the struct wilc_vif
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-24 18:14:35 -07:00
Tony Cho 8259a53e1c staging: wilc1000: rename strInterfaceInfo in the sturct wilc
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-24 18:14:35 -07:00
Tony Cho c1b30f6a34 staging: wilc1000: rename u8NoIfcs in the struct wilc
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-24 18:14:35 -07:00
Tony Cho 080f11bb37 staging: wilc1000: change the type of wilc1000_initialized
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-24 18:14:35 -07:00
Tony Cho 1a08bc43c4 staging: wilc1000: remove typedef from the tstrInterfaceInfo
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-16 21:34:12 -07:00
Tony Cho f61c5aff3b staging: wilc1000: remove typedef from the linux_wlan_t
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>
2015-10-16 21:34:12 -07:00
Leo Kim 441dc609da staging: wilc1000: remove typedef from tstrWILC_WFIDrv
This patch removes typedef from the struct tstrWILC_WFIDrv and
rename it to host_if_drv.
This patch includes the removal of the comment for tstrWILC_WFIDrv as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:58:01 -07:00
Leo Kim a949f9095d staging: wilc1000: remove typedef from tstrHostIFpmkidAttr
This patch removes typedef from the struct tstrHostIFpmkidAttr.
And rename it to host_if_pmkid_attr.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:56:03 +01:00
Chaehyun Lim 30b2ba099c staging: wilc1000: remove unnecessary comment
This patch removes unnecessary comment.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 331d80c53b staging: wilc1000: remove commented codes
This patch removes commented codes that is not used in this driver.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:03:42 +02:00
Glen Lee 9cdf6e7bd3 staging: wilc1000: remove unused variable real_ndev
This patch removes unused variable real_ndev.

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-02 12:02:15 +02:00
Glen Lee 28dedb8070 staging: wilc1000: wilc_wfi_netdevice.h: remove unused variables
This patch removes unused variable already_claim and hWILCWFIDrv_2.

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-02 12:02:15 +02:00
Glen Lee c9d4834d94 staging: wilc1000: remove function pointer wlan_add_mgmt_to_tx_que
This patch removes function pointer wlan_add_mgmt_to_tx_que and just call
the function wilc_wlan_txq_add_mgmt_pkt.
Remove structure wilc_wlan_oup_t also because no members in it. Since
wilc_wlan_oup_t is deleted, it's variable, function parameters and related
codes are also deleted.
- deleted variables
gpstrWlanOps
oup
- modified functions
wilc1000_prepare_11b_core
wilc_wlan_init

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-02 11:59:52 +02:00
Anish Bhatt ffda203c0c wilc1000 : Use BIT() macro where possible
Replace (1 << x) by BIT(x) as recommended by
checkpatch.pl

Signed-off-by: Anish Bhatt <anish@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 04:57:43 +02:00
Glen Lee b002e20d53 staging: wilc1000: remove function pointer os_wait
This patch removes function pointer os_wait which is pointer of
linux_wlan_lock_timeout and just call the real name function directly.
Remove also static from linux_wlan_lock_timeout declaration.
As os_wait is deleted, structure wilc_wlan_os_func_t is useless. Delete
wilc_wlan_os_func_t, os_func and it's related codes.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:39:59 +02:00
Glen Lee d2bfac009c staging: wilc1000: remove mutex txq_cs and it's related codes
mutex txq_cs is never used in the driver. txq_cs, txq_critical_section and
txq_lock have same pointer so just delete them and it's related codes.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:39:59 +02:00
Glen Lee 85e57567f2 staging: wilc1000: use g_linux_wlan->txq_spinlock not the pointer of it
Use spinlock variable g_linux_wlan->txq_spinlock itself instead of
g_wlan.txq_spinlock which is pointer of g_linux_wlan->txq_spinlock.
Delete os_context.txq_spin_lock, g_wlan.txq_spinlock and it's related codes.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:39:58 +02:00
Glen Lee ef2b784c30 staging: wilc1000: remove function pointer os_debug
This patch removes os_debug and call linux_wlan_dbg function instead of
os_debug. Delete static from the linux_wlan_dbg.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:39:58 +02:00
Glen Lee c0cadaa4ab staging: wilc1000: remove function pointer rx_complete
just call the function linux_wlan_rx_complete directly. No need for a pointer
to the functions. Remove rx_complete, wilc_wlan_net_func_t and net_func which
are not used anymore.
Finally remove static from the function linux_wlan_rx_complete.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:39:57 +02:00
Glen Lee 4417d3daf8 staging: wilc1000: remove function pointer mac_indicate
No need for a pointer to a function. Just call linux_wlan_mac_indicate.
Remove mac_indicate and also wilc_wlan_indicate_func_t since no members in it.
Variable indicate_func is not used so delete it and related codes.
Finally remove static from the function linux_wlan_mac_indicate.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:39:57 +02:00
Glen Lee 6361167037 staging: wilc1000: remove function pointer rx_indicate
This patch removes function pointer rx_indicate and call the function
frmw_to_linux directly.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 02:39:57 +02:00
Chaehyun Lim c3ca63728a staging: wilc1000: remove useless comment
This patch removes useless comment that is containing "BugXXXX"

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:02:11 -07:00
Glen Lee a87d792b35 staging: wilc1000: remove define RX_BH_TYPE
This patch removes the preprocessor definition, RX_BH_TYPE and uses the
request_threaded_irq instead of kernel thread to execute the interrupt
handler.

As a result, linux_wlan_enable_irq() and linux_wlan_disable_irq() are also
removed from the linux_wlan.c file.

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-09-18 19:48:30 -07:00
Chaehyun Lim 5af6b85b9e staging: wilc1000: remove useless comment
This patch removes useless comment that is included "BugID_xxxx"

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18 19:46:42 -07:00
Glen Lee d7ed06a384 staging: wilc1000: remove unused variable rxq_thread
The rxq_thread never runs since it's kthread_run code was delete in a previous
patch. Remove kthread_run and it's related codes.

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-09-16 21:43:06 -07:00
Glen Lee 85718c2d6b staging: wilc1000: remove unused semaphore and it's related codes
Variable rxq_event, rxq_wait_event and rxq_wait have the same pointer.

nwi->os_context.rxq_wait_event = (void *)&g_linux_wlan->rxq_event;
g_wlan.rxq_wait = inp->os_context.rxq_wait_event;

They are never aquired(down) since down function was only called in
linux_wlan_rxq_task which was deleted in a previous patch.
So delete variable rxq_event, rxq_wait_event, rxq_wait and it's related codes.

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-09-16 21:43:06 -07:00
Glen Lee 51f8a39911 staging: wilc1000: remove variable rxq_thread_started
rxq_thread_started is initiallized but never used in the driver. Remove
the variable and init code line.

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-09-16 21:43:06 -07:00
Glen Lee fcc6ef9230 staging: wilc1000: remove define WILC_P2P and ifdef line
WILC_P2P is always used in the driver. So delete define WILC_P2P and ifdef line.

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-09-16 21:43:06 -07:00
Tony Cho 2b4738c0b4 staging: wilc1000: remove PANDA_BOARD
This patch removes one of the platform dependencies, PANDA_BOARD from the
driver codes. The device tree will provide the platform dependencies in
the future commits.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16 21:34:44 -07:00