summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath5k/base.c
AgeCommit message (Collapse)Author
2009-10-07ath5k: enable Power-Save Polls by setting the association IDLuis R. Rodriguez
mac80211 has long provided us the association ID. This isn't useful except for Power-Save polling which now gets enabled. We can now poll for our pending frames on the AP during power save. You can review the details of Power-Save on the wireless wiki: http://wireless.kernel.org/en/developers/Documentation/ieee80211/power-savings Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath5k: simplify passed params to ath5k_hw_set_associd()Luis R. Rodriguez
We have access to common->curbssid and common->curaid so just use those. Note that common->curaid is always 0 so this keeps our current behaviour of always using 0 for now. Once we fix storing the association ID passed by mac80211 this will require no changes here. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07Wireless / ath5k: Simplify suspend and resume callbacksRafael J. Wysocki
Simplify the suspend and resume callbacks of ath5k by converting the driver to struct dev_pm_ops and allowing the PCI PM core to do the PCI-specific suspend/resume handling. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07atheros: add ieee80211_hw to ath_commonLuis R. Rodriguez
Make use of it on hw code in ath9k to avoid using the ath9k ath_softc. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07atheros: define shared bssidmask settingLuis R. Rodriguez
Also make ath5k and ath9k use it, and share register definitions. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath5k: define ath_common opsLuis R. Rodriguez
Only common ath read/write ops go through the common ops. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath5k: allocate ath5k_hw prior to initializing hwLuis R. Rodriguez
We can propagate better errors upon failed hw initialization, and set up the ath_common structure for attach purposes. This will become important once we start using the ath_common for read/write ops. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath5k: move ath_common to ath5k_hwLuis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath5k: use common curbssid, bssidmask and macaddrLuis R. Rodriguez
The ah_sta_id was really being used as the macaddr. ath5k still does not use the association ID now passed up by mac80211, that can be fixed later. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath: move ath_bcast_mac to common headerLuis R. Rodriguez
This is used by both ath5k and ath9k to set the first bssid mask. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28ath5k: don't use PCI ID to find the chip revisionPavel Roskin
AR5K_SREV is available even if the chip has been put to sleep. Relying on the chip register allows binding non-standard PCI IDs by echo VENDOR_ID PRODUCT_ID >/sys/bus/pci/drivers/ath5k/new_id without having to specify the driver data as well. Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Bob Copeland <me@bobcopeland.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28ath5k: add hardware CCMP encyption supportBob Copeland
Recent ath5k hardware is capable of doing CCMP acceleration. Enable it for the cards that support it. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28ath5k: use the skb->cb directly for RX statusBob Copeland
Save a memcpy by just storing updates directly in the skb control block. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28ath5k: clean up filter flags settingBob Copeland
The maze of if() statements in configure_filter is confusing. Reorganizing it as a switch statement makes it more apparent what is going on and reveals several suspicious settings. This has no functional changes, though it does remove some redundant flags that are set earlier. Also now that we can sleep, protect sc->filter_flags with the sc lock. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20ath: move regulatory info into shared common structureLuis R. Rodriguez
This moves the shared regulatory structure into the common structure. We will use this ongoing for common data. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20mac80211: allow configure_filter callback to sleepJohannes Berg
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-14ath5k: use bit shift operators for cache line sizeLuis R. Rodriguez
This matches ath9k, providing consistency when reading both drivers. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14ath5k: use common ath.ko ath_rxbuf_alloc()Luis R. Rodriguez
Now that its shared we can remove ath5k's own implementation. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14ath5k: Use SWI to trigger calibrationNick Kossifidis
* Get rid of calibration timer, instead use a software interrupt to schedule the calibration tasklet. a) We don't need a timer for this, there is no need for accuracy even with round_jiffies i think this is a waste of resources. Also we don't need to run calibration if we are idle (no interrupts). b) When we add ANI support we 'll just extend the poll function and calibration tasklet and handle all periodic phy calibration on one place (much cleaner). c) Having calibration on a tasklet is better since during calibration we can't transmit or receive (antennas are detached to measure noise floor), previously calibration could run in parallel with tx/rx and interfere (packet loss). v2: kill tasklet on stop_hw, stop/wake queues v3: use time_is_before_eq_jiffies to compare timestamp with current time Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14ath5k: Wakeup fixesNick Kossifidis
* Don't put chip to full sleep because there are problems during wakeup. Instead hold MAC/Baseband on warm reset state via a new function ath5k_hw_on_hold. * Minor cleanups Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Tested-by: Ben Greear <greearb@candelatech.com> Tested-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-14ath5k: fix missing output in monitor mode after ifconfig upJoerg Albert
Let ath5k_chan_set() always call ath5k_reset(). This fixes the bug that we don't get any packets in monitor mode after: ifconfig wlan0 down iwconfig wlan0 mode monitor channel 1 ifconfig wlan0 up but they arrive after iwconfig wlan0 channel 2 Signed-off-by: Joerg Albert <jal2@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04ath5k: fix CAB queue operationBob Copeland
We need to process tx descriptors for all queues (currently main tx queue and cabq) which may have triggered the TX completion interrupt. Otherwise, the queues can get stuck after sending a few frames. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04ath5k: update PCU opmode whenever a new interface is addedBob Copeland
Previously, we would store the operating mode at interface up time, but only update the PCU registers when the next reset happened. The result is that if beacon configuration (ops->bss_info_changed) happens before ops->config, we will program the wrong things into the timer registers. Consequently, beacons won't work in AP mode until after a reset (channel change, scan etc.). This is fragile anyway so just program the opmode as soon as mac80211 gives it to us. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-23Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwmc3200wifi/netdev.c net/wireless/scan.c
2009-07-21ath5k: temporarily disable crypto for AP modeBob Copeland
Pavel Roskin reported some issues with using AP mode without nohwcrypt=1. Most likely this is similar to the problem fixed some time ago in ath9k by 3f53dd64f192450cb331c0fecfc26ca952fb242f, "ath9k: Fix hw crypto configuration for TKIP in AP mode." That only affects TKIP but it's easiest to just disable that and WEP too until we get a proper fix in. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10ath5k: write PCU registers on initial resetBob Copeland
"Ath5k: unify resets" introduced a regression into 2.6.28 where the PCU registers are never initialized, due to ath5k_reset() always passing true for change_channel. We subsequently program a lot of these registers but several may start in an unknown state. Cc: stable@kernel.org Reported-by: Forrest Zhang <forrest@hifulltech.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10ath5k: do not release irq across suspend/resumeBob Copeland
Paraphrasing Rafael J. Wysocki: "drivers should not release PCI IRQs in suspend." Doing so causes a warning during suspend/resume on some platforms. Cc: Rafael J. Wysocki <rjw@sisk.pl> Reported-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10ath5k: rework beacon configurationBob Copeland
Using the enable_beacon flag allows some simplifications and fixes some corner cases in beacon handling. This change adds a state variable for beaconing in ath5k_beacon_config and handles both enabling and disabling, thus eliminating the need for ath5k_beacon_disable. We also now configure the beacon when any of the beacon parameters change, so ath5k_beacon_reconfig is no longer needed (its mmiowb gets moved to ath5k_beacon_config). Finally, by locking around the whole config function, we don't need to worry about clearing the interrupt mask register before installing the new mask. The upshot is this correctly disables beaconing when the interfaces are taken down, it fixes a potential restarting of beaconing when ath5k_reset() is called, and ensures that updates to the beacon interval take effect immediately. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10ath5k: send buffered frames after the beaconBob Copeland
Enable the "Content" After Beacon queue and utilize it to send any buffered frames for power-saving clients. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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-07-10ath5k: enable hardware LEDsBob Copeland
Cardbus and some PCI cards use hardware LEDs rather than software GPIOs. Program them with the proper blink patterns when idle, scanning or associated. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13288. Tested-by: Frans Pop <elendil@planet.nl> Tested-by: Mark Hindley <mark@hindley.org.uk> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-19ath5k: fix beacon_int handlingJiri Slaby
73ca5203366235f8a43e490767284ba8cfd8c479 (ath5k: remove conf->beacon_int usage) removed bintval setting from ath5k_config. We need to init the interval earlier and don't touch it in add_interface anymore. Otherwise it will be set only once by upper layer through bss_info_changed but not on second and further hostap executions. We ended up having bintval 1000 which rendered the AP useless on many clients. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Nick Kossifidis <mickflemm@gmail.com> Cc: Luis R. Rodriguez <lrodriguez@atheros.com> Cc: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-19ath5k: avoid PCI FATAL interrupts by restoring RETRY_TIMEOUT disablingJouni Malinen
This reverts 'ath5k: remove dummy PCI "retry timeout" fix' on the same theory as in 'ath9k: Fix PCI FATAL interrupts by restoring RETRY_TIMEOUT disabling'. Reported-by: Bob Copeland <me@bobcopeland.com> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10ath5k: minor rfkill cleanupBob Copeland
Always enable rfkill since the ifdefs in the code is not really worth the Kconfig option. Also fix a few code style things, and remove the usage of the ah_gpio[] array so we can remove it later. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10ath5k: added cfg80211 based rfkill supportTobias Doerffel
This patch introduces initial rfkill support for the ath5k driver based on rfkill support in the cfg80211 framework. All rfkill related code is separated into newly created rfkill.c. Changes to existing code are minimal: * added a new data structure ath5k_rfkill to the ath5k_softc structure * inserted calls to HW rfkill init/deinit routines * ath5k_intr() has been extended to handle AR5K_INT_GPIO interrupts Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03ath5k: disable beacon interrupt when interface is downBob Copeland
When we remove the active interface, there's no need to continue sending beacons; doing so would cause a null pointer deref in ieee80211_beacon_get(). Disable the interrupt in remove_interface and add a WARN_ON(!vif) in case there are other instances lurking. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03ath5k: remove conf->beacon_int usageBob Copeland
ieee80211_conf->beacon_int was deprecated and removed in a cleanup patch, however it was accidentally added back to ath5k in the change "ath5k: Allow user/driver to set txpower." Remove it once more, fixing the following warning: [13091.968902] WARNING: at drivers/net/wireless/ath/ath5k/base.c:2167 warn_slowpath_null+0x15/0x1a() [13091.968906] Hardware name: MacBook1,1 [13091.968909] Modules linked in: usb_storage fuse i915 drm af_packet acpi_cpufreq binfmt_misc dm_mirror dm_region_hash dm_log dm_multipath dm_mod snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_seq_dummy hid_apple arc4 ecb snd_seq_oss snd_seq_midi_event usbhid snd_seq ath5k mac80211 appletouch snd_seq_device snd_pcm_oss snd_mixer_oss sky2 snd_pcm ath processor cfg80211 snd_timer sg ohci1394 snd uhci_hcd bitrev ieee1394 joydev ehci_hcd crc32 snd_page_alloc button ac thermal battery sr_mod applesmc cdrom evdev input_polldev unix [last unloaded: microcode] [13091.968985] Pid: 2132, comm: phy0 Tainted: G W 2.6.30-rc5-wl #118 [13091.968988] Call Trace: [13091.968994] [<c0125884>] warn_slowpath_fmt+0x77/0xa6 [13091.969003] [<c03557d8>] ? _spin_unlock+0x2c/0x41 [13091.969008] [<c0355a56>] ? _spin_lock_irqsave+0x15/0x69 [13091.969012] [<c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d [13091.969019] [<c01445bb>] ? trace_hardirqs_off+0xb/0xd [13091.969024] [<c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d [13091.969029] [<c01445bb>] ? trace_hardirqs_off+0xb/0xd [13091.969034] [<c0355783>] ? _spin_unlock_irqrestore+0x34/0x5d [13091.969039] [<c01258c8>] warn_slowpath_null+0x15/0x1a [13091.969054] [<f965846d>] ath5k_beacon_update_timers+0x44/0x27f [ath5k] [13091.969059] [<c0126370>] ? vprintk+0x2dd/0x312 [13091.969063] [<c0125e50>] ? release_console_sem+0x1a6/0x1d3 [13091.969076] [<f96586c5>] ath5k_reset_tsf+0x1d/0x2c [ath5k] [13091.969095] [<f93f4426>] __ieee80211_sta_join_ibss+0x35/0x3aa [mac80211] [13091.969102] [<c0252793>] ? extract_entropy+0x47/0x8a [13091.969121] [<f93f4b21>] ieee80211_sta_find_ibss+0x2de/0x32f [mac80211] [13091.969126] [<c035422c>] ? mutex_lock_nested+0x28b/0x2a5 [13091.969145] [<f93f4b8e>] ? ieee80211_ibss_notify_scan_completed+0x1c/0x6f [mac80211] [13091.969164] [<f93f4bc9>] ieee80211_ibss_notify_scan_completed+0x57/0x6f [mac80211] [13091.969182] [<f93f26da>] ieee80211_scan_completed+0x31a/0x33f [mac80211] [13091.969201] [<f93f27ca>] ieee80211_scan_work+0xcb/0x18b [mac80211] [13091.969207] [<c0133a6a>] worker_thread+0x1b1/0x28e [13091.969212] [<c0133a25>] ? worker_thread+0x16c/0x28e [13091.969230] [<f93f26ff>] ? ieee80211_scan_work+0x0/0x18b [mac80211] [13091.969237] [<c013736e>] ? autoremove_wake_function+0x0/0x38 [13091.969242] [<c01338b9>] ? worker_thread+0x0/0x28e [13091.969246] [<c0137031>] kthread+0x4a/0x70 [13091.971460] [<c0136fe7>] ? kthread+0x0/0x70 [13091.971467] [<c0103527>] kernel_thread_helper+0x7/0x10 [13091.971470] ---[ end trace 8defaa5d15c50cef ]--- Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03ath5k: avoid leaking mutex in ath5k_configJohn W. Linville
Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-20ath5k: update beacons in AP modeBob Copeland
ath5k only generated the beacon when bss_info_changed() was called, but for AP mode this is not enough, because the TIM IE would never get updated and consequently PS mode clients wouldn't know about buffered frames. Instead, get a new beacon on every SWBA interrupt. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-18Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/scsi/fcoe/fcoe.c
2009-05-06ath5k: Implement antenna controlNick Kossifidis
* Add code to support the various antenna scenarios supported by hw * For now hardcode the default scenario (single or dual omnis with tx/rx diversity working and tx antenna handled by session -hw keeps track on which antenna it got ack from each ap/station and maps each ap/station to one of the antennas-). Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06ath5k: Enable AP modeJiri Slaby
After some debuging we were hitting the following bugs so far... * Due to huge channel list hostapd couldn't get infos from the driver and couldn't set the channel. If we manualy set the channel after hostapd starts (by setting channel to 0 -auto), beacons are sent but they wont show up on scan because they are malformed (they have channel = 0 because hostapd doesn't update the channel info -this is probably a hostapd bug so i'm CCing Jouni) and they get dropped. Bob fixed this by only allowing standard channels to be registered so now hostapd works as expected. * Docs (and HAL source) say that we must write 0 on timer0 when operating on AP mode to start TSF increment but this seems to mess with DBA in many cases and beacon queue never gets started. We fixed that on the previous patch. We have some more things to deal with... * For some reason (hw bug or something else) after restarting hostapd a few times, beacon inteval seems to change from 100ms to a sec (we get one beacon per sec). * We need to set sleep timers on STA mode and enable power saving + support PCF. ...but i think it's time we enable AP support "officialy" so that we can get more feedback from users. I ran ath5k with the mentioned patches + hostapd 0.6.8 and AP mode worked fine (it had some less throughput on my tests than IBSS but it worked). Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06ath5k: Beaconing fixesNick Kossifidis
* Write next beacon timer even on AP mode since without this we get no beacons + ath9k does it too. Docs say that we must write 0 on this register on AP mode to start TSF increment, we do both to be on the safe side. * Fix num_tx_pending function, we never read the register :P that's why we got all those "beacon queue 7 didn't stop messages". * Put full prioriy on beacon queue, lock all queues with lower priority using the arblock and also bypass any arblock by seting the arblock ignore flag. * For the CAB queue (do we need this thing ?, it seems crap) since it's supposed to fire up after each beacon (we don't use it on driver part, ath9k/MadWiFi does), don't make it DBA gated but instead make it fire after each beacon by using the beacon sent gated flag. * Increase bmiss threshold to 10, that's what we used on MadWiFi for a long time. Also when we have pending frames on the beacon queue (we got a beacon that didn't make it on the air) it's more likely that the beacon queue never started, probably due to faulty DBA setting, so change that "beacon queue didn't stop" message. Tested this with AP mode and IBSS mode and seems to work fine ;-) Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06ath5k: Allow user/driver to set txpowerNick Kossifidis
* Now that we have regulatory control enable the driver to set txpower on hw * Also use txpower table offset so that we can match power range set by user/driver with indices on power table. Tested 2 different cards (a CM9 and an RF5112-based ubnt) and got the same output using a remote machine to measure per-packet rssi (conected the cards using attenuators). I also switched between various tx power levels and i saw an equal power change on the remote machine (so txpower changes as expected) and verified that we have the same output on each rate. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06ath5k: correct interrupt storm warningBob Copeland
Ben Greear points out that the "too many interrupts" message will never print in the intended case since the interrupt counter will be -1 after the loop. Change it to pre-decrement so it will be 0 on the thousandth iteration. Cc: Ben Greear <greearb@candelatech.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06mac80211: unify config_interface and bss_info_changedJohannes Berg
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-05-06mac80211: clean up beacon interval settingsJohannes Berg
We currently have two beacon interval configuration knobs: hw.conf.beacon_int and vif.bss_info.beacon_int. This is rather confusing, even though the former is used when we beacon ourselves and the latter when we are associated to an AP. This just deprecates the hw.conf.beacon_int setting in favour of always using vif.bss_info.beacon_int. Since it touches all the beaconing IBSS code anyway, we can also add support for the cfg80211 IBSS beacon interval configuration easily. NOTE: The hw.conf.beacon_int setting is retained for now due to drivers still using it -- I couldn't untangle all drivers, some are updated in this patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath5k: manipulate rxlink and descriptor address under rxbuf lockBob Copeland
Grabbing an ath5k_buf then dropping the lock is racy because the referenced descriptor can be obtained in another thread and released before the buffer is handed to the hardware. Likewise, manipulating sc->rxlink without the lock can lead to having multiple self-linked hardware descriptors. Changes-licensed-under: 3-Clause-BSD Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath5k: use rx hw descriptor pointer for self-linked checkBob Copeland
This patch simplifies the code used to detect when the self-linked DMA buffer is still in use by hardware, by checking the hardware's rxdp register instead of looking at the software buffer list. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath5k: use bool for modparamsBob Copeland
Current code uses int types, but both modparams are boolean values. Changes-licensed-under: 3-Clause-BSD Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>