aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/at76c50x-usb.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-14drivers/net: Remove unnecessary returns from void function()sJoe Perches1-1/+0
This patch removes from drivers/net/ all the unnecessary return; statements that precede the last closing brace of void functions. It does not remove the returns that are immediately preceded by a label as gcc doesn't like that. It also does not remove null void functions with return. Done via: $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \ xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }' with some cleanups by hand. Compile tested x86 allmodconfig only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-27mac80211: give virtual interface to hw_scanJohannes Berg1-0/+1
When scanning, it is somewhat important to scan on the correct virtual interface. All drivers that currently implement hw_scan only support a single virtual interface, but that may change and then we'd want to be ready. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28mac80211: remove struct ieee80211_if_init_confJohannes Berg1-3/+3
All its members (vif, mac_addr, type) are now available in the vif struct directly, so we can pass that instead of the conf struct. I generated this patch (except the mac80211 and header file changes) with this semantic patch: @@ identifier conf, fn, hw; type tp; @@ tp fn(struct ieee80211_hw *hw, -struct ieee80211_if_init_conf *conf) +struct ieee80211_vif *vif) { <... ( -conf->type +vif->type | -conf->mac_addr +vif->addr | -conf->vif +vif ) ...> } Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11at76c50x-usb: Supply additional parameters to at76_start_monitor scan requestJason Andryuk1-0/+3
For my Linksys WUSB11 at76c503-i3861 device, scanning fails without probe_delay, min_channel_time, and max_channel_time specified for the scan request. These values were found by checking scan requests from the at76_usb driver. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Acked-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11at76c50x-usb: Remove mac2str and replace with %pM format specifier.Jason Andryuk1-24/+10
Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Acked-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-11at76c50x-usb: declare MODULE_FIRMWAREBen Hutchings1-0/+8
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07at76c50x-usb: set firmware and hardware version in wiphyKalle Valo1-0/+10
Set firmware and hardware version in wiphy so that user space can access it. (Modification from original in favor of cfg80211 ethtool support. -- JWL) Cc: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20mac80211: remove deprecated APIJohannes Berg1-3/+2
All but two drivers have now stopped using the two deprecated members radio_enabled and beacon_int, so it's about time to remove them for good. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20mac80211: allow configure_filter callback to sleepJohannes Berg1-4/+3
Over time, a whole bunch of drivers have come up with their own scheme to delay the configure_filter operation to a workqueue. To be able to simplify things, allow configure_filter to sleep, and add a new prepare_multicast callback that drivers that need the multicast address list implement. This new callback must be atomic, but most drivers either don't care or just calculate a hash which can be done atomically and then uploaded to the hardware non-atomically. A cursory look suggests that at76c50x-usb, ar9170, mwl8k (which is actually very broken now), rt2x00, wl1251, wl1271 and zd1211 should make use of this new capability. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04mac80211: redefine usage of the mac80211 workqueueLuis R. Rodriguez1-5/+5
The mac80211 workqueue exists to enable mac80211 and drivers to queue their own work on a single threaded workqueue. mac80211 takes care to flush the workqueue during suspend but we never really had requirements on drivers for how they should use the workqueue in consideration for suspend. We extend mac80211 to document how the mac80211 workqueue should be used, how it should not be used and finally move raw access to the workqueue to mac80211 only. Drivers and mac80211 use helpers to queue work onto the mac80211 workqueue: * ieee80211_queue_work() * ieee80211_queue_delayed_work() These helpers will now warn if mac80211 already completed its suspend cycle and someone is trying to queue work. mac80211 flushes the mac80211 workqueue prior to suspend a few times, but we haven't taken the care to ensure drivers won't add more work after suspend. To help with this we add a warning when someone tries to add work and mac80211 already completed the suspend cycle. Drivers should ensure they cancel any work or delayed work in the mac80211 stop() callback. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04at76c50x-usb: remove unneeded flush_workqueue() at usb disconnectLuis R. Rodriguez1-3/+1
This driver only uses the mac80211 workqueue and mac80211 requires us to cancel all work at driver stop. Since we now have the cancels in the right places at stop() we really don't need to flush the mac80211 workqueue so remove it. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04at76c50x-usb: cancel scan work at stop callbackLuis R. Rodriguez1-1/+1
This should fix suspend as mac80211 expects all work queued to the mac80211 workqueue to be canceled at driver stop(). Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04ar76c50x-usb: cancel promisc work during mac80211 stopLuis R. Rodriguez1-0/+2
We weren't ever cancelling this. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10mac80211: push rx status into skb->cbJohannes Berg1-1/+2
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-03Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-6/+6
Conflicts: drivers/net/forcedeth.c
2009-05-29at76c50x-usb: avoid mutex deadlock in at76_dwork_hw_scanJohn W. Linville1-6/+6
http://bugzilla.kernel.org/show_bug.cgi?id=13312 at76_dwork_hw_scan holds a mutex while calling ieee80211_scan_completed, which then calls at76_config which needs the same mutex. This reworks the ordering to not hold the lock while calling ieee80211_scan_completed. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06mac80211: unify config_interface and bss_info_changedJohannes Berg1-6/+9
The config_interface method is a little strange, it contains the BSSID and beacon updates, while bss_info_changed contains most other BSS information for each interface. This patch removes config_interface and rolls all the information it previously passed to drivers into bss_info_changed. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22cfg80211: introduce scan IE limit attributeJohannes Berg1-0/+1
This patch introduces a new attribute for a wiphy that tells userspace how long the information elements added to a probe request frame can be at most. It also updates the at76 to advertise that it cannot support that, and, for now until I can fix that, iwlwifi too. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-21Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-0/+2
Conflicts: net/core/dev.c
2009-04-16at76c50x-usb: Add device ID for OQO model 01+Jamie Lentin1-0/+2
Add USB device ID for OQO 01+'s internal wireless LAN An OQO employee mentions the chip's true identity here:- ftp://ftp.oqo.com/unsupported/linux/OQOLinux.html Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Acked-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-13at76c50x-usb: remove pointless conditional before kfree_skb()Wei Yongjun1-2/+1
Remove pointless conditional before kfree_skb(). Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-27at76c50x-usb: use dev_name() instead of struct device.bus_idKalle Valo1-1/+1
Stephen Rothwell reported that bus_id from struct device will be removed, use dev_name() instead. Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27at76c50x-usb: add link to the TODO listKalle Valo1-8/+4
It's easier to have the TODO list in wiki, so add a link to the list. Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27at76c50x-usb: additional disconnect fixesJason Andryuk1-0/+6
Additional attempts to fix Oops on disconnect, that appear to be successful. However, some may be extraneous. The cancel_delayed_work call is probably the most necessary. The device_unplugged check may not be necessary. del_timer_sync may not be necessary either, but the Oops I was receiving was related to timers. Hence the addition. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27at76c50x-usb: clean up DMA on stackJason Andryuk1-12/+23
Cleanup dma on stack issues: - no DMA on stack - cleanup unclear endianness issue Corrected version of Oliver Neukum's original patch for at76_usb. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27at76c50x-usb: fix oops on disconnectJason Andryuk1-8/+19
flush_workqueue needs to be called instead of the generic one and the associated functions need to be modified to prevent re-adding themselves to the workqueue. The rx_tasklet is also killed in the small (?) chance it is scheduled. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27at76c50x-usb: convert at76_debug to an unsigned intJason Andryuk1-2/+2
at76_debug should be an unsigned int as it used as a bit field. In fact, modprobe fails when trying to set at76_debug's high bit. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27at76c50x-usb: update to latest mac80211 hw scan apiJason Andryuk1-6/+18
With the latest mac80211 stack, the driver needs to be updated for cfg80211 scanning. I based the changes off of modifications for at76_usb found here: http://johannes.sipsolutions.net/patches/old/all/2008-09-19-13:35/020-cfg80211-scan.patch The trick was that max_signal also needs to be set to avoid a divide by zero Oops. I just guessed and used the value 100 for now. kvalo: handpicked the change from two different patches Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27at76c50x-usb: add driverKalle Valo1-0/+2465
This is a driver for usb devices based on at76c50x chipset. This is a mac80211 port of the original at76_usb driver. Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>