summaryrefslogtreecommitdiff
path: root/drivers/staging/winbond/wbusb.c
AgeCommit message (Collapse)Author
2011-02-25mac80211: make tx() operation return voidJohannes Berg
The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-01Staging: w35und: Kill struct wb_usbPekka Enberg
This patch kills struct wb_usb which now only contains a pointer to struct usb_device. Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-01Staging: w35und: Remove unused fields from struct wb_usbPekka Enberg
This patch removes two unused fields from struct wb_usb: - DetectCount which is always zero - IsUsb20 which is a write-only struct member Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-01Staging: w35und: Kill wblinux_f.h headerPekka Enberg
The wblinux_f.h header file doesn't contain anything that's actually used. Kill it. Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-01Staging: w35und: Merge mlmetxrx.c to mds.cPekka Enberg
This patch merges mlmetxrx.c to mds.c because it's small and the functions are only used in mto.c. Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-01Staging: w35und: Kill Vendor2 ifdef from hal_init_hardwarePekka Enberg
The Vendor2 macro is never defined so remove the ifdef'd block from hal_init_hardware(). Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-01Staging: w35und: Use pr_debug() for debuggingPekka Enberg
Use pr_debug() for debugging printk's and kill the FULL_DEBUG macro. It would be even better to use dev_dbg() but unfortunately looking up struct device in the current code structure makes things very ugly. Please note that I dropped the DataDmp() calls from RFSynthesizer_SwitchingChannel() because that function doesn't exist. Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09Staging: w35und: Kill struct hwdata ->NullPacketCountPekka Enberg
This patch kills the NullPacketCount member of struct hwdata. It's not used for anything so it's safe to remove it. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09Staging: w35und: Kill empty Mds_Destroy functionPekka Enberg
The Mds_Destroy() function doesn't do anything so kill it. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09Staging: w35und: Rename wbhal_s.h to wbhal.hPekka Enberg
This patch renames the wbhal_s.h header file to wbhal.h now that it contains both structure and function definitions. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09Staging: w35und: Merge wbhal_f.h to wbhal_s.hPekka Enberg
This patch merges HAL struct and function definitions into one header file. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: w35und: Inline MLMESendFrame() to wbsoft_tx()Pekka Enberg
The wbsoft_tx() function is a simple wrapper on top of MLMESendFrame() so inline the latter to the former. Cc: Lars Lindley <lindley@coyote.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: w35und: Use NETDEV_TX_BUSY if MLMESendFrame failsPekka Enberg
This patch changes MLMESendFrame to return NETDEV_TX_BUSY if MLME frame is in use so that wbsoft_tx() doesn't blindly return NETDEV_TX_OK in that case. Cc: Sandro Bonazzola <sandro.bonazzola@gmail.com> Cc: Lars Lindley <lindley@coyote.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21staging: w35und: Remove unused spinlocksPekka Enberg
This patch removes unused spinlocks from "struct mlme_frame" and "struct wbsoft_priv". Cc: Lars Lindley <lindley@coyote.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-05Staging: Merge staging-next into Linus's treeGreg Kroah-Hartman
Conflicts: drivers/staging/Kconfig drivers/staging/batman-adv/bat_sysfs.c drivers/staging/batman-adv/device.c drivers/staging/batman-adv/hard-interface.c drivers/staging/cx25821/cx25821-audups11.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22Staging: fix typos concerning "address"Uwe Kleine-König
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-19update email addressPavel Machek
pavel@suse.cz no longer works, replace it with working address. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-21Merge staging-next tree into Linus's latest versionGreg Kroah-Hartman
Conflicts: drivers/staging/arlan/arlan-main.c drivers/staging/comedi/drivers/cb_das16_cs.c drivers/staging/cx25821/cx25821-alsa.c drivers/staging/dt3155/dt3155_drv.c drivers/staging/hv/hv.c drivers/staging/netwave/netwave_cs.c drivers/staging/wavelan/wavelan.c drivers/staging/wavelan/wavelan_cs.c drivers/staging/wlags49_h2/wl_cs.c This required a bit of hand merging due to the conflicts that happened in the later .34-rc releases, as well as some staging driver changing coming in through other trees (v4l and pcmcia). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: winbond: wbusb.c Coding style fixes.Lars Lindley
I fixed the reported checkpatch.pl problems except for a bunch of long lines and some printk:s. I also removed versioning comments. Signed-off-by: Lars Lindley <lindley@coyote.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-03net: convert multicast list to list_headJiri Pirko
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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: 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>
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-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 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: 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-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 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: unify mto.h and mto_f.h header filesPekka Enberg
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-02-27Staging: w35und: fix usb_control_msg() error handling in wb35_probe()Pekka Enberg
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-27Staging: w35und: fix registration with wlan stackPavel Machek
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-01-06Staging: w35und: fix config build warningsGreg Kroah-Hartman
the wireless config function has changed with commit e8975581f63870be42ff4662b293d1b0c8c21350 so fix up the wbusb driver to work properly with that change. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: w35und: remove ->shutdown from struct wbsoft_privPekka Enberg
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-06Staging: w35und: move packet_came() to wb35rx.cPekka Enberg
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>