Commit Graph

205 Commits (f134759955bbb5bf28a8d2c6fe5aa201d1ffb860)

Author SHA1 Message Date
Pekka Enberg 92ce470392 Staging: w35und: Convert typedef RadioOff to struct radio_off
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:32 -08:00
Pekka Enberg 1bc5e65129 Staging: w35und: Convert typedef LOCAL_PARA to struct wb_local_para
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:32 -08:00
Greg Kroah-Hartman 049e62614a Staging: wireless drivers Kconfig change
Change the wireless drivers to depend on CONFIG_WLAN instead of
CONFIG_WLAN_80211 which is going away soon.


Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-30 14:47:44 -07:00
Jeff Mahoney 6d7fd647c2 Staging: winbond: implement prepare_multicast and fix API usage
This patch adds a prepare_multicast callback for the winbond driver
to properly receive mc_count in ->configure_filter.

This also fixes incompatible pointer assignment build errors because
->configure_filter had changed.

This is build tested only, but that's more than the original code received.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09 13:47:24 -07:00
Pekka Enberg 4074e77ca3 Staging: w35und: Fix ->beacon_int breakage
Commit f424afa178 ("mac80211: remove
deprecated API") removed ->beacon_int from struct ieee80211_conf. Fix
breakage in w35und by setting beacon period in ->add_interface to
bss_conf.beacon_int.

Cc: Jiri Benc <jbenc@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09 13:47:23 -07:00
Pekka Enberg 9dccc61c83 Staging: w35und: Remove some write-only struct members
There's no point in keeping around struct members that are only written
to but never read.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:17 -07:00
Pekka Enberg a95c69cfe4 Staging: w35und: Convert typedef MTO_PARAMETERS to struct wb35_mto_param
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:17 -07:00
Pekka Enberg 58b32cba16 Staging: w35und: Remove unused struct _STATISTICS_INFO
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:17 -07:00
Pekka Enberg 27d4642105 Staging: w35und: Convert typedef DESCRIPTOR to struct wb35_descriptor
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:17 -07:00
Pekka Enberg ef3bf091f3 Staging: w35und: Cleanup the mlmetxrx_f.h header file
This patch removes the unused MLMEProcThread and MLMEReturnPacket
declarations and indents the header file.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:17 -07:00
Pekka Enberg 27f362e769 Staging: w35und: Remove unused struct _RXBUFFER
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:17 -07:00
Pekka Enberg b7caf94fb8 Staging: w35und: Convert MDS typedef to struct w35_mds
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:17 -07:00
Johannes Berg f1d58c2521 mac80211: push rx status into skb->cb
Within mac80211, we often need to copy the rx status into
skb->cb. This is wasteful, as drivers could be building it
in there to start with. This patch changes the API so that
drivers are expected to pass the RX status in skb->cb, now
accessible as IEEE80211_SKB_RXCB(skb). It also updates all
drivers to pass the rx status in there, but only by making
them memcpy() it into place before the call to the receive
function (ieee80211_rx(_irqsafe)). Each driver can now be
optimised on its own schedule.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10 14:57:54 -04:00
Tim Gardner 24b8a9dfc7 Staging: winbond: mac80211 - unify config_interface and bss_info_changed
The commit 'mac80211: unify config_interface and bss_info_changed' from
Johannes Berg <johannes@sipsolutions.net> removed the config_interface structure
tag from struct ieee80211_ops. The BSSID detection functionality migrated to
ieee80211_ops.bss_info_changed.

Since wbsoft_config_interface() was largely empty, there wasn't much to do
other then to remove the function itself. There is currently no support
for BSSID change detection.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:38 -07:00
Pekka Enberg dd68e1b4ff Staging: w35und: merge rest of wbhal.c to phy_calibration.c
Impact: cleanup

The remaining functions are local to phy_calibration.c so move them
there and remove wbhal.c.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:38 -07:00
Pekka Enberg 40abfccbc7 Staging: w35und: inline hal_set_rf_power() to mto.c
Impact: cleanup

It's a trivial wrapper that is used in only one place, so lets inline it.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:38 -07:00
Pekka Enberg 22a82bcd5b Staging: w35und: merge wbhal.c to wbusb.c
Impact: cleanup

This patch moves all the functions in wbhal.c that are used only in
wbusb.c to the latter file.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:38 -07:00
Pekka Enberg c6e523c0cb Staging: w35und: reformat wbhal.c
Impact: cleanup

In preparation for merging wbhal.c with wbusb.c, use Lindet to reformat
the file.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:38 -07:00
Pekka Enberg 833d0cd39e Staging: w35und: make led lookup tables static
Impact: cleanup

No need to keep read-only data on the stack.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:38 -07:00
Pekka Enberg 7c49a0ac12 Staging: w35und: remove MODULE_AUTHOR
Impact: cleanup

The contact details in MODULE_AUTHOR do not reflect current state of
affairs so remove it.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:38 -07:00
Pekka Enberg a32b9810d9 Staging: w35und: reformat wbusb.c
Impact: cleanup

Use scripts/Lindent on the file and clean up the rest by hand.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:38 -07:00
Pekka Enberg 9ca748ce51 Staging: w35und: inline hal_set_phy_type() to wb35_hw_init()
Impact: cleanup

The hal_set_phy_type() is called in wb35_hw_init() only so inline the
function there. Also remove a redundant assignment of ->phy_type to
RF_WB_242_1.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg bdbb883956 Staging: w35und: clean up comments in wbusb.c
Impact: cleanup

Remove some useless comments and clean up others.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg f592a859b2 Staging: w35und: simplify hal_init_hardware() and hal_halt()
Impact: cleanup

Now that hal_halt() is called from wb35_hw_halt() only where
->InitialResource is always set to 4, we can simplify
hal_init_hardware() and hal_halt().

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg a39ee67174 Staging: w35und: more simplify hal_init_hardware() error handling
Impact: fix, cleanup

If initialization in hal_init_hardware() fails, we call hal_halt() to
clean up and release resource. However, hal_halt() will attempt to
call del_timer_sync() on ->LEDTimer on "stage 3" although it's not
initialized at that point. Fix that up by simplifying error handling
logic in hal_init_hardware() with gotos.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg 00e2e05dd0 Staging: w35und: simplify hal_init_hardware() error handling
Impact: cleanup

Use gotos to simplify the deep if-statement nesting in
hal_init_hardware().

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg cfe31f81e1 Staging: w35und: simplify error handling in wb35_hw_init()
Impact: cleanup

Change hal_init_hardware() to return an error code rather than a boolean
to simplify error handling in wb35_hw_init().

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg 80767e6e1e Staging: w35und: move hal_init_hardware() and hal_halt() int wbusb.c
Impact: cleanup

The hal_init_hardware() and hal_halt() functions are only used in
wbusb.c so move them there.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg 2659851122 Staging: w35und: replace switch error handling with gotos in wb35_hw_init()
Impact: cleanup

This patch replaces the switch-based error handling in wb35_hw_init()
with regular gotos.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg 6ab3212720 Staging: w35und: remove unused code from wbsoft_configure_filter()
We don't initialize hardware multicast filter in the driver nor do we know how
to do that. Therefore, remove some code that isn't actually used from
wbsoft_configure_filter().

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Diego Liziero 290d4c2350 Staging winbond: boolean negation and bitwise operation in wrong order
The semantic patch that makes this change is:
(http://www.emn.fr/x-info/coccinelle/)

@@ expression E; constant C; @@
(
- !E == C
+ E != C
)

Signed-off-by: Diego Liziero <diegoliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:37 -07:00
Pekka Enberg 82fbb01cf3 Staging: w35und: unregister device from the ieee80211 stack upon ->disconnect()
Impact: fix module removal

This patch fixes an oops when the w35und module is removed from the
kernel and added back.

Reported-by: luoyi <luoyi.ly@gmail.com>
Tested-by: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-05-08 19:39:27 -07:00
Pekka Enberg 4bb5a7ec76 Staging: w35und: remove gl_80211.h header
The gl_80211.h header file contains only two definitions that are actually
used. Move them to mds_s.h and remove the otherwise unused file.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:16 -07:00
Pekka Enberg 3b055748d8 Staging: w35und: remove ds_tkip.h header
The ds_tkip.h header file contains declarations of a function that is not
actually defined anywhere.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
2009-04-03 14:53:16 -07:00
Pekka Enberg d2443c53ee Staging: w35und: remove unused bssdscpt.h header
The bssdscpt.h header file contains definitions that are not actually used for
anything.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:16 -07:00
Pekka Enberg 57a944435f Staging: w35und: Remove MTO_FUNC_INPUT macro obfuscation
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:16 -07:00
Pekka Enberg 8e41b4b65d Staging: w35und: remove hw_data_t typedef
As this typedef is used everywhere in the driver, remove it in a separate
patch.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:16 -07:00
Pekka Enberg eb62f3eaf7 Staging: w35und: typedef removal
This patch removes some typedefs from the driver code. I also removed some
unused structs I spotted while removing the typedefs.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:16 -07:00
Pekka Enberg 0c59dbaadf Staging: w35und: kill WBDEBUG and remove common.h header file
The only remaining thing in common.h header file is the WBDEBUG() macro which
is unconditionally defined as printk(). Kill the macro and remove the header
file.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:16 -07:00
Pekka Enberg 132e755aed Staging: w35und: remove useless macro from common.h
The DebugUsbdStatusInformation macro doesn't do anything useful so remove the
definition and the two users of it from driver code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:16 -07:00
Pekka Enberg bd37b7fddf Staging: w35und: convert code to use ETH_ALEN
As suggested by Harvey Harrison, convert driver to use ETH_ALEN and kill a
private macro from common.h that is used for the same thing.

Acked-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Pekka Enberg 64328c8711 Staging: w35und: unify mto.h and mto_f.h header files
No need to keep function definitions separate from the rest so unify mto.h and
mto_f.h header files.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Pekka Enberg 91da3d337a Staging: w35und: remove crazy commented out includes
I have no idea why the driver would want to include OpenGL headers in the first
place but lets just remove the crazy includes.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Pekka Enberg 7e797abfb8 Staging: w35und: remove unnecessary os_common.h header file
Convert code to include sysdef.h directly and remove unnecessary os_common.h
header file.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Pekka Enberg b93abb660a Staging: w35und: remove unused header files
The header files are not included anywhere so we can just remove them.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Pekka Enberg acfa5110b8 Staging: w35und: fix usb_control_msg() error handling in wb35_probe()
If successful, the usb_control_msg() function returns the number of
bytes transferred. Fix up wb35_probe() to only bail out if the function returns
a negative number. Also, fix up ieee80211_alloc_hw() error code to ENOMEM;
otherwise GCC complains that err might be undefined (and is right about that).

Acked-by: Pavel Machek <pavel@suse.cz>
Reported-and-tested-by: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-27 12:56:24 -08:00
Pavel Machek 05e361cae5 Staging: w35und: fix registration with wlan stack
Initialize few more fields in wireless device structure so that
wireless core actually accepts our registration.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-27 12:56:24 -08:00
Greg Kroah-Hartman f02466fc19 Staging: w35und: fix config build warnings
the wireless config function has changed with commit
e8975581f6 so fix up the wbusb driver to
work properly with that change.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:52 -08:00
Pavel Machek 310d465d83 Staging: w35und: fix Kconfig
4KSTACK dependency was needed when driver carried its own softmac
layer. That layer is gone, and functions have reasonably small stack
footprint -> dependency can be removed.

Add better description of hardware this driver is targetted at (now
with fixed whitespace)

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:52 -08:00
Pekka Enberg a3f245a2df Staging: w35und: remove rxisr.c as dead code
The vRxTimerStart() function is never called nor does the timer do anything
useful so remove the code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:52 -08:00
Pekka Enberg 82321c2b56 Staging: w35und: remove dead code from wbhal.c
Remove tons of unused code from wbhal.c.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg 5c58093e63 Staging: w35und: make functions local to wb35tx.c static
While there are no functional changes, the diff is quite large because we need
to shuffle code around to avoid forward declarations.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg c139a814ab Staging: w35und: make functions local to wb35rx.c static
While there are no functional changes, the diff is quite large because we need
to shuffle code around to avoid forward declarations.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg a22517fec0 Staging: w35und: remove dead code from mto.c
Remove lots of code that's never used.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg 7cd5613fdf Staging: w35und: make functions local to mlmetxrx.c static
Convert functions that don't have external references to static and remove the
ones that are not used at all.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg 6261ab3a63 Staging: w35und: make functions local to mds.c static
The functions have no external references so make them static after shuffling
the code around a bit to avoid forward declarations.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2009-01-06 13:51:51 -08:00
Pekka Enberg 54369cc69c Staging: w35und: remove ->shutdown from struct wbsoft_priv
It's not actually used for anything, so remove it.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg 72e202d00e Staging: w35und: remove ->skb_array from struct wbsoft_priv
It's not actually used for anything, so remove it.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg 3cae503bf6 Staging: w35und: move packet_came() to wb35rx.c
The function no longer has dependencies to wbusb.c so we can move it to
wb35rx.c and make it static now.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg c930e0c008 Staging: w35und: move global wbsoft_enabled to struct wbsoft_priv
This is a preparational step for moving packet_came() to wb35rx.c().

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg 82f8c2cd46 Staging: w35und: remove unused ->ShutDowned member from struct LOCAL_PARA
It's not actually read by anyone so we might as well remove it.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg 912b209f50 Staging: w35und: clean up wblinux.c a bit
This patch removes wrapper functions from wblinux.c and moves the hardware init
and halt functions to wbusb.c which has the only callers of them.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:49 -08:00
Pekka Enberg 7b9a79bf48 Staging: w35und: inline DRIVER_AUTHOR and DRIVER_DESC macros
They're used in one place so we can inline them.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:49 -08:00
Pekka Enberg 7fff1316b9 Staging: w35und: remove global struct ieee80211_hw
Remove the my_dev global variable from wbusb.c by passing a pointer to struct
ieee80211_hw around so that packet_came() gets it.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:49 -08:00
Pekka Enberg 1e8a2b6033 Staging: w35und: merge struct wb35_adapter to struct wbsoft_priv
This patch merges struct wb35_adapter to struct wbsoft_priv. Now we can finally
start passing a pointer to struct ieee80211_hw around where necessary.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:49 -08:00
Pekka Enberg ac418b8faa Staging: w35und: clean up adapter.h a bit
This patch cleans up adapter.h a bit in preparation for merging struct
wb35_adapter to struct wbsoft_priv.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:48 -08:00
Pekka Enberg 42c84bb460 Staging: w35und: remove ->adapter from struct _HW_DATA_T
Eventually we want to pass a pointer to struct ieee80211_hw around in the
driver, so remove the bidirectional link between struct wb35_adapter and struct
_HW_DATA_T to simplify the code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:48 -08:00
Pekka Enberg cc18071068 Staging: w35und: move struct wbsoft_priv to core.h and use it
This patch removes my_adapter global variable from wbusb.c by adding a
->adapter member to struct wbsoft_priv.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:48 -08:00
Pekka Enberg 9ce922fde7 Staging: w35und: move source files to one directory
As we're trying to get rid of the "compatability layer" in the driver, move
everything under one directory. Keeping some of the files under
drivers/staging/winbond/linux is a major pain in the ass whenever you're
cleaning up the driver.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:47 -08:00
Pekka Enberg 8421513d9a Staging: w35und: remove some dead code
This patch removes the WBLinux_ReceivePacket(), WBLINUX_GetNextPacket(),
WBLINUX_GetNextPacketCompleted, and sme_get_rssi() functions, which execute
BUG() unconditionally, and related dead code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:47 -08:00
Pekka Enberg 80aba53616 Staging: w35und: #include cleanup
This patch moves #includes from sysdef.h and common.h to the files which
actually need them. This makes the dependencies less complex and allows us to
move code around much easily.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2009-01-06 13:51:47 -08:00
Pekka Enberg 8971280fb2 Staging: w35und: remove unused link status code
The WBLINUX_ConnectStatus() and related code is not used anywhere so remove
them from the driver.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:46 -08:00
Pekka Enberg 350e858868 Staging: w35und: remove unused macros from common.h
The macros are not used anywhere so remove them from driver code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:46 -08:00
Pekka Enberg 4460a0b4d5 Staging: w35und: remove abs() and BIT() macros
We can use the kernel built-in abs() and BIT() macros the just fine.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:46 -08:00
Pekka Enberg fc68c7efea Staging: w35und: remove memcpy/memcmp wrappers
The OS_MEMORY_CLEAR macro is not used so remove it. Also convert the one
call-site that uses OS_MEMORY_COMPARE to use memcmp() directly and remove the
wrapper macro.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:45 -08:00
Pekka Enberg 44e8541c5e Staging: w35und: remove atomic op wrappers
Use the kernel provided atomic op functions and remove the OS_ATOMIC and
related wrapper macros.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:45 -08:00
Pekka Enberg deee7c8164 Staging: w35und: remove timer wrappers
This patch removes the OS_TIMER and related wrappers from driver code. The
patch also changes the code to use msecs_to_jiffies() for setting up
timer->expires.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:45 -08:00
Pekka Enberg a36e0894bf Staging: w35und: move supported band initialization out of wb35_probe()
This patch moves the static struct ieee80211_supported_band initialization out
of w35_probe() because it's really global read-only configuration data.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:45 -08:00
Pekka Enberg 16d3659fcd Staging: w35und: plug memory leak in wbsoft_tx()
There's no reason to duplicate the skb in wbsoft_tx() and leak GFP_ATOMIC
memory as the contents are copied to ->TxBuffer in MdxTx() anyway before
MLMESendFrame() returns.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:44 -08:00
Pekka Enberg 3c01ec0d82 Staging: w35und: remove macro magic from MLME_GetNextPacket()
This removes the macro magic from MLME_GetNextPacket() to de-obfuscate the
code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:44 -08:00
Pekka Enberg 4af12e55a5 Staging: w35und: usb_put_dev() is missing from wb35_disconnect()
The wb35_probe() function does usb_get_dev() so add a missing usb_put_dev() to
the wb35_disconnect() function. Also fix error handling paths in wb35_probe()
to call usb_put_dev() as well.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:44 -08:00
Pekka Enberg c8b2b70b43 Staging: w35und: OS_MEMORY_ALLOC wrapper removal
This patch removes the rather scary OS_MEMORY_ALLOC macro.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:44 -08:00
Pekka Enberg 279b6ccc00 Staging: w35und: remove true/false boolean macros
Use the kernel built-in true and false boolean values instead of duplicating
them in the driver code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:43 -08:00
Pekka Enberg 9ce9ed5d8d w35und: remove dead code from wbusb_f.h
Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
remove it completely.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:43 -08:00
Greg Kroah-Hartman f3d201886d Staging: w35und: remove usb_alloc_urb wrapper function
No need for a simple wrapper here.


Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:42 -08:00
Greg Kroah-Hartman 7c12604380 Staging: w35und: remove usb_submit_urb wrapper function
No need for a simple wrapper here.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:42 -08:00
Pekka Enberg 1523ddc482 Staging: w35und: wb35_probe() cleanup
Fix error handling in wb35_probe() function and clean it up a bit.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:41 -08:00
Pekka Enberg 581f67cf3c Staging: w35und: merge wblinux struct to adapter
Zaps another compatability layer from the driver code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:41 -08:00
Pekka Enberg 88ebc4b950 Staging: w35und: padapter struct typedef removal
Remove the PADAPTER typedef and its strange variants. Also fix up variable
names that use the type while we're at it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:41 -08:00
Pekka Enberg 65144de798 Staging: w35und: wb35reg struct typedef removal
This patch removes the WB35REG struct typedefs and fixes up variable names that
use the type.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:41 -08:00
Pekka Enberg f37435ce86 Staging: w35und: reg queue struct typedef removal
This patch removes the struct typedefs for reg queues.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:40 -08:00
Pekka Enberg a55a89b175 Staging: w35und: purb typedef removal
This patch removes the struct urb pointer typedef from the driver code and
fixes up variable names that use the typedef while we're at it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:40 -08:00
Pekka Enberg 3e855b2a08 Staging: w35und: remove the no-op pa_stall_execution macro
The pa_stall_execution() macro doesn't do anything so remove it from driver
code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:40 -08:00
Pekka Enberg 34222e0a7b Staging: w35und: use msleep() and udelay()
This patch removes the OS_SLEEP() wrapper and changes the call-sites to use
msleep() and udelay() where appropriate.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:39 -08:00
Pekka Enberg 4fc838fe40 Staging: w35und: remove unused wb35_open() and wb35_close() functions
The functions are not used anywhere so remove them.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:39 -08:00
Pekka Enberg 302bae8548 Staging: w35und: make wb35_probe() and wb35_disconnect() funtions static
The wb35_probe() and wb35_disconnect() functions are only used in wbusb.c so
make them static and remove them from a header file.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:39 -08:00
Wang Chen 5a001a070e staging-winbond: Kill directly reference of netdev->priv
This driver is not yet finished.
At this time, we don't know how netdev be created and how
private data be allocated.
So, simply use netdev_priv() now and leave some temp comment.

Compile test only.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-08 01:13:25 -08:00
Greg Kroah-Hartman 68ab0c960f Staging: wbusb: fix a bunch of compiler warnings
First cut at removing some obvious compiler warnings.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:40 -07:00
Pekka Enberg dd38da4617 Staging: w35und: module init cleanup
This patch cleans up the module init functions a bit and removes the redundant
device ID check from wb35_probe() function.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:39 -07:00
Pekka Enberg dc7e04fe28 Staging: w35und: use gotos for error handling
The driver code uses do { } while (0) together with the break statement to
emulate gotos for error handling. Fix that up by using the goto statement
instead.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:39 -07:00
Pekka Enberg a1eb2ba6be Staging: w35und: remove spinlock wrappers
This patch removes the OS_SPIN_LOCK and related wrappers from the driver code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:38 -07:00
Pekka Enberg 8b384e0c3f Staging: w35und: remove some typedefs
This patch removes some obfuscating typedefs from the driver code.

Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:32 -07:00
Greg Kroah-Hartman 19cbd3d7d5 Staging: document 4k stack problem for winbond driver
As noticed by Arjan

Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:29 -07:00
Geert Uytterhoeven 88f0aee6bd Staging: W35UND should depend on USB
W35UND should depend on USB

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:28 -07:00
Pavel Machek 66101de109 Staging: add w35und wifi driver
This is driver for w35und usb wifi -- also in kohjinsha
subnotebook. It should work well enough to associate and ping, but it
obviously needs to be rewritten two more times...

OTOH worst horrors (like embedded wifi stack) should have been fixed
already...

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:09 -07:00