summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/main.c
AgeCommit message (Collapse)Author
2009-03-05ath9k: Add module parameter to disable hardware cryptoJouni Malinen
nohwcrypt=1 module parameter can now be used to disable hardware crypto in ath9k. While the hardware acceleration handles most cases, it may be useful to be able to force mac80211 software implementation to be used for some tests, e.g., with virtual interface combinations that may not yet be supported in the key cache configuration. In addition, this allows management frame protection to be tested with older hardware revisions. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27ath9k: Unlock sc->mutex on error pathJouni Malinen
An error path in ath9k_add_interface() did not unlock the sc->mutex and could leave the driver in quite unresponsive state. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27cfg80211: move all regulatory hints to workqueueLuis R. Rodriguez
All regulatory hints (core, driver, userspace and 11d) are now processed in a workqueue. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27ath9k: Add appropriate ANI values for AP modeSujith
The short calibration interval is different for AP mode, fix this. Also, the timer should be rearmed in the calibration routine during scanning. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27ath9k: Initialize channel change timeSujith
Set channel change time to 5ms, this will improve scan results. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27ath9k: move common regulatory code out of if() branchesBob Copeland
Both branches of the regulatory check in ath_attach() set up a custom regulatory domain and apply radar and world flags, so extract those into a single path. While at it, fix a couple of spelling errors and an unnecessary extra pointer traversal. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27ath9k: Enable TSF Out of Range InterruptSujith
This patch lays the groundwork for handling TSF Out of Range interrupt, which will be used for power save later on. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-25Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/orinoco/orinoco.c
2009-02-23ath9k: Fix panic upon attach failureVasanthakumar Thiagarajan
[246916.338046] [246916.338048] Pid: 29265, comm: insmod Not tainted (2.6.29-rc4-wl #64) 9461DUU [246916.338051] EIP: 0060:[<c02ca274>] EFLAGS: 00010202 CPU: 0 [246916.338055] EIP is at rollback_registered+0x24/0x220 [246916.338057] EAX: 00000001 EBX: 00000000 ECX: 00000000 EDX: f122e8fc [246916.338059] ESI: 00000000 EDI: 00000000 EBP: f6595d30 ESP: f6595d1c [246916.338062] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [246916.338064] Process insmod (pid: 29265, ti=f6594000 task=f7343fe0 task.ti=f6594000) [246916.338067] Stack: [246916.338068] c04a2920 22222222 f6595d48 00000000 f122f080 f6595d48 c02ca489 f122e8fc [246916.338076] f122e220 f122f080 f122e220 f6595d5c f8a03156 f122e220 f122f080 f122e220 [246916.338085] f6595d80 f87359af f122f080 00002000 f874e129 f122f150 f122f080 f6290000 [246916.338094] Call Trace: [246916.338096] [<c02ca489>] ? unregister_netdevice+0x19/0x70 [246916.338100] [<f8a03156>] ? ieee80211_unregister_hw+0x36/0xd0 [mac80211] [246916.338112] [<f87359af>] ? ath_detach+0xcf/0x250 [ath9k] [246916.338127] [<f8735d9c>] ? ath_attach+0x26c/0x740 [ath9k] [246916.338139] [<f873c33a>] ? ath_pci_probe+0x13a/0x310 [ath9k] [246916.338151] [<c0233e28>] ? _raw_spin_unlock+0x68/0x80 [246916.338158] [<c023ab8e>] ? local_pci_probe+0xe/0x10 [246916.338162] [<c023b8e0>] ? pci_device_probe+0x60/0x80 [246916.338169] [<c029e042>] ? driver_probe_device+0x82/0x1b0 [246916.338174] [<c029e1f9>] ? __driver_attach+0x89/0x90 [246916.338180] [<c029d97b>] ? bus_for_each_dev+0x4b/0x70 [246916.338184] [<c023b820>] ? pci_device_remove+0x0/0x40 [246916.338190] [<c029ded9>] ? driver_attach+0x19/0x20 [246916.338193] [<c029e170>] ? __driver_attach+0x0/0x90 [246916.338197] [<c029d317>] ? bus_add_driver+0x1b7/0x230 [246916.338203] [<c023b820>] ? pci_device_remove+0x0/0x40 [246916.338206] [<c029e399>] ? driver_register+0x69/0x140 [246916.338212] [<f859d000>] ? ath9k_init+0x0/0x54 [ath9k] [246916.338221] [<c023bb4e>] ? __pci_register_driver+0x4e/0x90 [246916.338225] [<f859d000>] ? ath9k_init+0x0/0x54 [ath9k] [246916.338232] [<f859d06b>] ? ath_pci_init+0x17/0x19 [ath9k] [246916.338238] [<f859d017>] ? ath9k_init+0x17/0x54 [ath9k] [246916.338245] [<c017148e>] ? tracepoint_update_probe_range+0x7e/0xb0 [246916.338249] [<c010111a>] ? do_one_initcall+0x2a/0x170 [246916.338252] [<c0149f26>] ? up_read+0x16/0x30 [246916.338256] [<c014aa9d>] ? __blocking_notifier_call_chain+0x4d/0x60 [246916.338265] [<c0162b1a>] ? sys_init_module+0x8a/0x1c0 [246916.338269] [<c022f888>] ? trace_hardirqs_on_thunk+0xc/0x10 [246916.338272] [<c0103ebf>] ? sysenter_do_call+0x12/0x43 [246916.338276] Code: 8d bc 27 00 00 00 00 55 89 e5 56 89 c6 53 83 ec 0c a1 74 27 4a c0 85 c0 0f 85 4b 01 00 00 e8 04 7d 00 00 85 c0 0f 84 c9 01 00 00 <8b> 86 18 03 00 00 85 c0 0f 84 86 01 00 00 83 e8 01 0f 85 71 01 [246916.338328] EIP: [<c02ca274>] rollback_registered+0x24/0x220 SS:ESP 0068:f6595d1c [246916.338335] ---[ end trace 76357c56a75ea34e ]--- Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13ath9k: Remove all the useless ah_ variable prefixesSujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13ath9k: Merge ath_hal and ath_hal_5416 structuresSujith
Finally, merge these structures and have a single HW specific data structure. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13ath9k: Remove duplicate variablesSujith
A few variables (bssid, bssidmask, curaid) were duplicated in struct ath_softc and in ath_hal, remove them. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13ath9k: Move regulatory information to a separate structureSujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13ath9k: Remove all the sc_ prefixesSujith
This patch removes the useless sc_ prefixes for all variables. Also, refer to interfaces as VIFs and not as VAPs anymore. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-13ath9k: Header file cleanupSujith
Split the core header files into manageable pieces. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11ath9k: Remove all the redundant internal buffer typesSujith
Use mac80211's primitives for identifying the frame type, and cleanup the driver-specific macros. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-11ath9k: Lock mac80211 callbacks with a mutexSujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09ath9k: fix led namingDanny Kukawka
Fixed led device naming for the ath9k driver. Due to the documentation of the led subsystem/class the naming should be "devicename:colour:function" while not applying sections should be left blank. This should lead to e.g. "ath9k-%s::rx" instead of "ath9k-%s:rx". Signed-off-by: Danny Kukawka <dkukawka@suse.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09ath9k: Fix LED blink patternVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09ath9k: Enable MIB and TIM interrupts for station mode.Vivek Natarajan
Enable operating mode specific interrupts in ath9k_add_interface instead of ath9k_start. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-30ath9k: Setup short preamble properly in rate registrationSujith
This patch fixes an issue where hw_value_short was not being filled with the proper ratecode during rate registration, but was being used in the RX path for decoding the packet rate. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-30ath9k: Reconfigure beacons on getting a notification from mac80211Sujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-30ath9k: Handle chainmask for A9280Sujith
The default chainmask for AR9280 is 3, so handle that when setting the supported MCS rates. Also, check for the HW supported chainmask when choosing single/dual stream. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: remove useless ath9k driver version informationLuis R. Rodriguez
Versioning for ath9k is pointless we have kept it at 0.1 since the initial release so its meaningless. We put more emphasis on kernel release or dated wireless-testing master tag as per John's tagging. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29mac80211: Generic TSF debuggingAlina Friedrichsen
This patch enables low-level driver independent debugging of the TSF and remove the driver specific things of ath5k and ath9k from the debugfs. Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: Fix MCS rates registration bug for AR9285Sujith
AR9285 based devices support only single stream MCS rates. This patch fixes a bug where dual stream stream rates were also being registered. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: simplify regulatory codeLuis R. Rodriguez
Now that cfg80211 has its own regulatory infrastructure we can condense ath9k's regulatory code considerably. We only keep data we need to provide our own regulatory_hint(), reg_notifier() and information necessary for calibration. Atheros hardware supports 12 world regulatory domains, since these are custom we apply them through the the new wiphy_apply_custom_regulatory(). Although we have 12 we can consolidate these into 5 structures based on frequency and apply a different set of flags that differentiate them on a case by case basis through the reg_notifier(). If CRDA is not found our own custom world regulatory domain is applied, this is identical to cfg80211's except we enable passive scan on most frequencies. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: Enable dynamic power save in ath9k.Vivek Natarajan
This patch implements dynamic power save feature for ath9k. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: Merge queue draining functionsSujith
The TX queue draining routines have confusing names, rename them approprately and merge ath_drain_txdataq() with ath_drain_all_txq(). Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: introduce platform driver for AHB bus supportGabor Juhos
This patch adds the platform_driver itself, and modifies the main driver to register it. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Tested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: move PCI code into separate fileGabor Juhos
Now that we have converted all bus specific routines to replaceable, we can move the PCI specific codes into a separate file. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Tested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: introduce bus specific cleanup routineGabor Juhos
We have left only some PCI specific cleanup code. We have to convert them as well. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Tested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: introduce bus specific cache size routineGabor Juhos
The PCI specific bus_read_cachesize routine won't work on the AHB bus, we have to replace it with a suitable one later. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Tested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: convert to use bus-agnostic DMA routinesGabor Juhos
Convert to use bus-agnostic DMA routines to make it usable on AHB bus as well. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Tested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: convert to struct deviceGabor Juhos
Convert 'struct pci_dev' to 'struct device' to make it usable on the AHB bus as well. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Tested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: Use a defined value for pci_set_power_state()Jouni Malinen
Silence sparse by using a defined value PCI_D3hot instead of a magic constant in a pci_set_power_state() call. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: Setup MFP options for CCMPJouni Malinen
Configure hardware CCMP for management frame protection and use software crypto when needed. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: Fix set_key error codesJouni Malinen
Return -EOPNOTSUPP if the algorithm is not supported and -ENOSPC if there is no room in the key cache. This avoids KERN_ERR printk in mac80211 for "errors" that are actually expected to happen in normal operating conditions. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29mac80211: clean up channel type configJohannes Berg
The channel_type really doesn't need to be the only member in a new structure, so remove the struct. Additionally, remove the _CONF_CHANGE_HT flag and use _CONF_CHANGE_CHANNEL when the channel type changes, since that's enough of a change to require reprogramming the hardware anyway. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: Enable Bluetooth Coexistence supportVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: use signed format to print HAL statusGabor Juhos
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29mac80211: clean up set_key callbackJohannes Berg
The set_key callback now seems rather odd, passing a MAC address instead of a station struct, and a local address instead of a vif struct. Change that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Bob Copeland <me@bobcopeland.com> [ath5k] Acked-by: Ivo van Doorn <ivdoorn@gmail.com> [rt2x00] Acked-by: Christian Lamparter <chunkeey@web.de> [p54] Tested-by: Kalle Valo <kalle.valo@nokia.com> [iwl3945] Tested-by: Samuel Ortiz <samuel@sortiz.org> [iwl3945] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: remove superfluous check on changing channelLuis R. Rodriguez
When we try to change the channel in ath9k its because either the configuration indicates we *have* changed channels or HT configuration has changed. In both cases we want to do a reset. Either way mac80211 will inform us when we want to actually change the channel so trust those calls. Although in the patch it may seem as I am doing more code changes I am not, all I am doing is removing the initial branch conditional and shifting the code to the left. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: make use of conf_is_ht*() in the rest of the driverLuis R. Rodriguez
Use shiny new conf_is_ht*() helpers, we can later remove ht.enabled if desired. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: use ieee80211_conf on ath9k_hw_iscal_supported()Luis R. Rodriguez
ath9k_hw_iscal_supported() just needs to be aware of your band and if HT20 is being used so lets abandon our internal channel, HT appended values and internal mode values and use ieee80211_conf which already carries this information. This works as calibration is being done for the currently configured channel. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: make request to get the noisefloor threshold band specificLuis R. Rodriguez
Lets make the request to get the current noise floor threshold from the EEPROM band specific as it is band specific, not mode specific. This also adds a backpointer on the private channel structure back to the ieee80211_channel structure as this is now needed during ath9k_hw_getnf(). Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: consolidate arguments on hw resetLuis R. Rodriguez
HW reset calls pass the same variables or structs which we can obtain easily from ah. Although this also applies during channel changes as we will keep around the ath9k_channel passed as an argument for now. We now also now propagate the hw reset errors down. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: Rename ath_setcurmode() to ath_cache_conf_rate()Luis R. Rodriguez
ath_setcurmode() is a bit misleading, all we are doing is caching the rate for the corresponding configuration we are using. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: remove cache of rate preference when using 11g protectionLuis R. Rodriguez
No need to cache when we want to use 2Mbit/s for all protection frames for 802.11g as we can determine that dynamically on ath_buf_set_rate() itself. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29ath9k: use hw->conf on ath_setcurmode()Luis R. Rodriguez
We don't need to use our own mode for setting the the routine tries to do, in fact lets remove ath_chan2mode() now as we can simply use the currently set band and the HT configuration provided by mac80211 through the ieee80211_conf. This works on changing channels as well as the internal ath9k_channel we use is based on the ieee80211_channel in the config. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>