1
0
Fork 0
Commit Graph

170 Commits (458e303bdc395909360f65178ea9830ac5c4cc69)

Author SHA1 Message Date
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
Chaehyun Lim 51e825f70b staging: wilc1000: use u8 instead of uint8_t
This patch replaces uint8_t with u8 that is a preferred kernel type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:51:02 -07:00
Chaehyun Lim 2726887c56 staging: wilc1000: rename WILC_WFI_priv
This patch replaces WILC_WFI_priv with wilc_priv to avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15 06:50:38 -07:00
Kim, Leo e89419bc9c staging: wilc1000: remove unused NM73131_0_BOARD
This patch removes the preprocessor definition, NM73131_0_BOARD which is
not used anymore.

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-09-12 18:24:46 -07:00
Johnny Kim d42ab0838d staging: wilc1000: use id value as argument
The driver communicates with the chipset via the address of handlers
to distinguish async data frame. The SendConfigPkt function gets the
pointer address indicating the handlers as the last argument, but this
requires redundant typecasting and does not support the 64 bit machine.

This patch adds the function which assigns ID values instead of pointer
representing the driver handler to the address and then uses the ID
instead of pointer as the last argument of SendConfigPkt. The driver
also gets the handler's address from the ID in the data frame when it
receives them.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:42 -07:00
Greg Kroah-Hartman 8990d856f5 staging: wilc1000: remove wrappers around semaphore usage
Just call up/down directly, no need for a wrapper function that hides
what is really happening.  Fix up some variable types to be the correct
structure pointers, not void *.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:41 -07:00
Greg Kroah-Hartman 642768eec5 staging: wilc1000: remove wrappers around sema_init()
Just call the function directly.  Also remove a pointless "deinit"
function that was empty to match the init function.

This also fixes a bug where txq_add_to_head_cs was a mutex structure
being used as a semaphore.  See the fun things that happen when you use
void pointers instead of "real" types?  Amazing that this worked at all,
someone got _very_ lucky.  Whoever "Amr" is, they really didn't fix
BugID_4720 correctly :(

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:41 -07:00
Johnny Kim 218dc407d4 staging: wilc1000: replace WILC_WFIDrvHandle by tstrWILC_WFIDrv
The structure, WILC_WFIDrvHandle is used to save the pointer address
for the driver handler which is used throughout the driver but it's
not easy to understand what it means. In addition, it doesn't support
the 64 bit machine and also causes the warnings for the 64 bit build.

This patch replaces the WILC_WFIDrvHandle by the tstrWILC_WFIDrv
because the tstrWILC_WFIDrv is real structure to represent the driver
handler and reduces the 64 bit compile warnings. Also, typecasting to
WILC_WFIDrvHandle is not needed by using tstrWILC_WFIDrv as is.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:00:49 -07:00
Sunghoon Cho 70e59d9225 staging: wilc1000: remove the warnings on the line over 80 characters
This patch removes the warnings reported by checkpatch.pl on the line
over 80 characters.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Sunghoon Cho 36901b690d staging: wilc1000: add a blank line after struct declaration
This patch adds a blank line right after a struct declaration.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Sunghoon Cho 69176e1cbd staging: wilc1000: remove the warnings on the prohibited spaces
This patch removes the warnings reported by checkpatch.pl regarding
prohibited spaces between function name and open parenthesis.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Sunghoon Cho 1d1c5b24f9 staging: wilc1000: add a blank line
This adds a blank line after struct declaration, WILC_WFI_mon_priv.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Sunghoon Cho 9f5e9a2bdf staging: wilc1000: remove unnecessary blank line.
This patch removes blank line which is not necesssary after an open
brace.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Sunghoon Cho 93f822bbe8 staging: wilc1000: remove the warnings on the multiple blank lines.
This patch removes the warnings reported by checkpatch.pl regarding on
the multiple blank line uses.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Dean Lee 72ed4dc73d 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 <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:37:18 -07:00
Chaehyun Lim 57b298f54e staging: wilc1000: remove WILC_Uint64
Use u64 instead of WILC_Uint64.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim 4e4467fdd6 staging: wilc1000: remove WILC_Uint32
Use u32 instead of WILC_Uint32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim d85f5326e4 staging: wilc1000: remove WILC_Uint16
Use u16 instead of WILC_Uint16.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:59 -07:00
Greg Kroah-Hartman 63d03e4773 staging: wilc1000: remove WILC_Uint8
Just use u8, as that's what you really want in a kernel driver.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Arnd Bergmann 83383ea33c staging: wilc1000: remove semaphore wrapper
The various semaphore functions all directly translate into
sema_init(), down() and up(), so we can just remove the API.

This is a mostly automated conversion using simple sed scripts,
plus some manual changes to account for down() returning no
error.

As a positive side-effect, down() no longer hangs after
receiving a signal, as the original code did by looping around
down_interruptible.

The semaphores still need to be turned into mutexes as a
follow-up step.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann e5af056149 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 <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:56 +09:00
Johnny Kim c5c77ba18e 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 <johnny.kim@atmel.com>
Signed-off-by: Rachel Kim <rachel.kim@atmel.com>
Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Chris Park <chris.park@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:36:53 -07:00