aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/winbond
AgeCommit message (Collapse)Author
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-04Staging: winbond: fix up wireless api errorsGreg Kroah-Hartman
The wireless core made a number of api changes that caused the winbond driver to break. This patch fixes those errors by making the needed changes to the driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03staging: make USB device id constantNémeth Márton
The id_table field of the struct usb_device_id is constant in <linux/usb.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Németh Márton <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: w35und: Remove unused typedefs MLME_DEAUTHREQ_PARA and ↵Pekka Enberg
MLME_DISASSOCREQ_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-03Staging: w35und: Remove unused typedef RXLAYER1Pekka Enberg
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-03Staging: w35und: Remove unused typedef TXRETRY_RECPekka Enberg
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-03Staging: w35und: Remove unused typedef CHAN_LISTPekka Enberg
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-03Staging: w35und: Convert typedef ChanInfo to struct chan_infoPekka Enberg
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-03Staging: w35und: Remove unused typedef _EVENTLOGPekka Enberg
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-03Staging: w35und: Convert typedef RadioOff to struct radio_offPekka Enberg
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-03Staging: w35und: Convert typedef LOCAL_PARA to struct wb_local_paraPekka Enberg
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-10-30Staging: wireless drivers Kconfig changeGreg Kroah-Hartman
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-09Staging: winbond: implement prepare_multicast and fix API usageJeff Mahoney
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-09Staging: w35und: Fix ->beacon_int breakagePekka Enberg
Commit f424afa17899408cbd267a4c4534ca6fc9d8f71c ("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-09-15Staging: w35und: Remove some write-only struct membersPekka Enberg
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-15Staging: w35und: Convert typedef MTO_PARAMETERS to struct wb35_mto_paramPekka Enberg
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-15Staging: w35und: Remove unused struct _STATISTICS_INFOPekka Enberg
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-15Staging: w35und: Convert typedef DESCRIPTOR to struct wb35_descriptorPekka Enberg
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-15Staging: w35und: Cleanup the mlmetxrx_f.h header filePekka Enberg
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-15Staging: w35und: Remove unused struct _RXBUFFERPekka Enberg
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-15Staging: w35und: Convert MDS typedef to struct w35_mdsPekka Enberg
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-07-10mac80211: push rx status into skb->cbJohannes Berg
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-06-19Staging: winbond: mac80211 - unify config_interface and bss_info_changedTim Gardner
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-19Staging: w35und: merge rest of wbhal.c to phy_calibration.cPekka Enberg
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-19Staging: w35und: inline hal_set_rf_power() to mto.cPekka Enberg
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-19Staging: w35und: merge wbhal.c to wbusb.cPekka Enberg
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-19Staging: w35und: reformat wbhal.cPekka Enberg
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-19Staging: w35und: make led lookup tables staticPekka Enberg
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-19Staging: w35und: remove MODULE_AUTHORPekka Enberg
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-19Staging: w35und: reformat wbusb.cPekka Enberg
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-19Staging: w35und: inline hal_set_phy_type() to wb35_hw_init()Pekka Enberg
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-19Staging: w35und: clean up comments in wbusb.cPekka Enberg
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-19Staging: w35und: simplify hal_init_hardware() and hal_halt()Pekka Enberg
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-19Staging: w35und: more simplify hal_init_hardware() error handlingPekka Enberg
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-19Staging: w35und: simplify hal_init_hardware() error handlingPekka Enberg
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-19Staging: w35und: simplify error handling in wb35_hw_init()Pekka Enberg
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-19Staging: w35und: move hal_init_hardware() and hal_halt() int wbusb.cPekka Enberg
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-19Staging: w35und: replace switch error handling with gotos in wb35_hw_init()Pekka Enberg
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-19Staging: w35und: remove unused code from wbsoft_configure_filter()Pekka Enberg
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-19Staging winbond: boolean negation and bitwise operation in wrong orderDiego Liziero
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-05-08Staging: w35und: unregister device from the ieee80211 stack upon ->disconnect()Pekka Enberg
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-04-03Staging: w35und: remove gl_80211.h headerPekka Enberg
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-03Staging: w35und: remove ds_tkip.h headerPekka Enberg
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-03Staging: w35und: remove unused bssdscpt.h headerPekka Enberg
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-03Staging: w35und: Remove MTO_FUNC_INPUT macro obfuscationPekka Enberg
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-03Staging: w35und: remove hw_data_t typedefPekka Enberg
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-03Staging: w35und: typedef removalPekka Enberg
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-03Staging: w35und: kill WBDEBUG and remove common.h header filePekka Enberg
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-03Staging: w35und: remove useless macro from common.hPekka Enberg
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-03Staging: w35und: convert code to use ETH_ALENPekka Enberg
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>