summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/main.c
AgeCommit message (Collapse)Author
2009-04-22atheros: put atheros wireless drivers into ath/Luis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath: move more setup code into ath_regd_initBob Copeland
Setup the wiphy regulatory parameters when first initializing the Atheros regulatory module. We can remove five exported symbols this way and simplify the driver code for both ath5k and ath9k. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22atheros: introduce ath module containing common ath5k/ath9k/ar9170 codeBob Copeland
This change creates a new module, ath.ko, which includes code that can be shared between ath5k, ath9k and ar9170. For now, extract most of the ath9k regulatory code so it can also be used in ath5k. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath9k: pass regd structure directly to regulatory functionsBob Copeland
All regulatory information is encapsulated by the ath9k_regulatory struct, so we can now change all the callers to take that directly instead of struct ath_hw. This in turn will enable us to move the regulatory functions to common code also used by ath5k, since both can use this regulatory struct. 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-04-22ath9k: Clean Interrupt handling routineSujith
This patch cleans up the ISR, removing a unnecessary do..while loop, and waking up the chip before getting the pending interrupts. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath9k: Trivial fix to handle AMPDU params properlySujith
Handle aggregation params only when aggregation is supported. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath9k: Initialize values when setting up the queue parametersSujith
Also fix a small typo. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath9k: Remove TIM from the interrupt maskSujith
We never handle TIM, TIM_TIMER is used instead. Remove this and the unnecessary swBeaconProcess variable. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath9k: Remove a couple of unused variables in descriptor handlingSujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath9k: Cleanup debug messagesSujith
Clean debug messages to use appropriate levels, remove useless messages, and trim the number of debug levels. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath9k: Remove a few unused flagsSujith
This patch removes unused HW capability flags and HW operation variables, and a chainmask flag that we don't use anywhere. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22ath9k: No need to abort Rx path when autosleep is enabled.Vivek Natarajan
For chipsets supporting autosleep feature, there is no need to abort Rx engine since they are capable of automatically going back to sleep after receiving a packet. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22rfkill: remove user_claim stuffJohannes Berg
Almost all drivers do not support user_claim, so remove it completely and always report -EOPNOTSUPP to userspace. Since userspace cannot really drive rfkill _anyway_ (due to the odd restrictions imposed by the documentation) having this code is just pointless. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-28mac80211: unify and fix TX aggregation startJohannes Berg
When TX aggregation becomes operational, we do a number of steps: 1) print a debug message 2) wake the virtual queue 3) notify the driver Unfortunately, 1) and 3) are only done if the driver is first to reply to the aggregation request, it is, however, possible that the remote station replies before the driver! Thus, unify the code for this and call the new function ieee80211_agg_tx_operational in both places where TX aggregation can become operational. Additionally, rename the driver notification from IEEE80211_AMPDU_TX_RESUME to IEEE80211_AMPDU_TX_OPERATIONAL. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-28Add mesh point functionality to ath9kPat Erley
This patch enables mesh point operation for ath9k. Tested with b43, ath9k, rt2500usb, and ath5k as peers. Signed-off-by: Pat Erley <pat-lkml@erley.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-28ath9k: Keep LED on in idle state after associationVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-28ath9k: Update copyright in all the filesSujith
How time flies. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-17Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2009-03-17Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/igb/igb_main.c drivers/net/qlge/qlge_main.c drivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/core.h drivers/net/wireless/ath9k/hw.c
2009-03-16ath9k: Add spectrum management to HW capabilitiesSujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16cfg80211: move enum reg_set_by to nl80211.hLuis R. Rodriguez
We do this so we can later inform userspace who set the regulatory domain and provide details of the request. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16cfg80211: remove REGDOM_SET_BY_INITLuis R. Rodriguez
This is not used as we can always just assume the first regulatory domain set will _always_ be a static regulatory domain. REGDOM_SET_BY_CORE will be the first request from cfg80211 for a regdomain and that then populates the first regulatory request. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16ath9k: always compile ath_radio_{en,dis}ableGabor Juhos
ath_radio_{en,dis}able is only compiled if RFKILL is enabled, but it is required by the 'ath9k_wiphy_select' function. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16ath9k: RX buffers may be accessed/freed even before initialized/alloced.Senthil Balasubramanian
accessing RXBUF list in ath_rx_cleanup may cause panic if ath_descdma_setup fails even before RXBUF list is initialized. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16ath9k: Get rid of unnecessary ATOMIC memory alloc during init timeSenthil Balasubramanian
We can sleep for memory during init time and so allocating rx buffers, descriptro buffers with GFP_KERNEL should help us to get rid of transient alloc fails. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16ath9k: create a common debugfs_root for all device instancesGabor Juhos
The driver are trying to create an 'ath9k' directory in debugfs for each device currently. If there are more than one device in the system, the second try will always fail. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16ath9k: implement IO serializationLuis R. Rodriguez
All 802.11n PCI devices (Cardbus, PCI, mini-PCI) require serialization of IO when on non-uniprocessor systems. PCI express devices not not require this. This should fix our only last standing open ath9k kernel.org bugzilla bug report: http://bugzilla.kernel.org/show_bug.cgi?id=12110 A port is probably required to older kernels and I can work on that. Cc: stable@kernel.org Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Add a simple virtual wiphy schedulerJouni Malinen
This is a very simple scheduler that goes through the wiphys and schedules one at a time every N milliseconds (current default value: 500 ms). This is enough for initial testing, but there are number of areas where a more complex scheduler can improve operations greatly. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Special processing for channel changes during scanJouni Malinen
Allow mac80211-controlled channel changes on an active wiphy and especially during a scan. We need this as long as the scan is controlled by mac80211. Moving this control into the driver could allow some optimizations on scanning while using multiple virtual interfaces, but for now, try to work as well as possible with the current scan mechanism. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Add workaround to recover from failed channel changesJouni Malinen
It looks like channel change may fail in some cases and end up leaving the hardware in state where it cannot transmit any frames. Add a workaround to recover from this state if we detect that wiphy selection is failing due to wiphys not leaving PAUSING state. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Check virtual wiphy state on tx()Jouni Malinen
mac80211 should not be requesting us to transmit frames on paused wiphys since we stop the TX queues. Just in case, add debug code to make sure we catch if this were to happen. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Pause other virtual wiphys on channel changeJouni Malinen
For now, allow channel changes immediately and just force the other virtual wiphys to paused state. This is needed to allow mac80211-controlled scan to control channel changes. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Register larger listen intervalJouni Malinen
Notify the AP that we may be sleeping longer to allow the AP power save code to buffer larger number of frames for us when using virtual wiphys. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Make start/stop operations aware of virtual wiphysJouni Malinen
Instead of always going through initialization/deinitialization steps, do this only for the first/last wiphy to not break the other wiphys. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Add routines for switching between active virtual wiphysJouni Malinen
ath9k_wiphy_select() can be used to select a virtual wiphy to be activated. Other virtual wiphys will be paused and once that is done, the operational channel is changed and the wiphys that are on the selected channel will be unpaused. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Virtual wiphy pause/unpause functionalityJouni Malinen
Allow virtual wiphys to be paused/unpaused to allow off-channel operations. Pause will stop all TX queues for the wiphy and move the STA into power save mode if in managed mode. Unpause wakes up the TX queues and notifies the AP that the STA woke up if in managed mode. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Add support for multiple secondary virtual wiphysJouni Malinen
The new struct ath_softc::sec_wiphy array is used to store information about virtual wiphys and select which wiphy is used in calls to mac80211. Each virtual wiphy will be assigned a different MAC address based on the virtual wiphy index. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Add data structure for supporting virtual radio/wiphy operationJouni Malinen
This is the initial step in allowing ath9k to register multiple virtual radios (wiphys). The goal of virtual radios is to allow the same radio to be shared for multiple virtual interfaces that may operate on different channels. The mac80211 virtual interface support is designed only for single channel operation and as such, it is not suitable for this type of use. Anyway, it can be used on top of the virtual radio concept, if desired (e.g., use two virtual radios to handle two channels and then add multiple mac80211 virtual interfaces on top of each virtual radio). The new struct ath_wiphy is now registered as the driver data structure for wiphy. This structure has a pointer to the shared (among virtual wiphys of the same physical radio) struct ath_softc data. The primary wiphy maintains the allocated memory for ath_softc. Secondary (virtual) wiphys will only allocate the new ath_wiphy structure. Registration of secondary wiphys is added in a separate patch. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Set BSSID mask based on configured interfacesJouni Malinen
Instead of using a hardcoded BSSID mask (mask for own addresses), iterate through all active interfaces and determine the minimal mask that covers all local addresses. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Cleanup multiple VIF processingJouni Malinen
Replace the internal sc_vaps array and index values by using vif pointer from mac80211. Allow multiple VIPs to be registered. Though, number of beaconing VIFs is still limited by ATH_BCBUF (currently 1). Multiple virtual STAs support is not yet complete, but at least the data structures should now be able to handle this. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Clean up setkey operationsJouni Malinen
There is no need to use ath_keyset() wrapper for ath9k_hw_set_keycache_entry() calls. In addition, improve the comments describing the key setting operations. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Lock config_interface() callback with a mutexSujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Handle TSF properly for AP modeSujith
The TSF has to be reset only once, upon bringing the interface up in AP mode. For any beacon reconfigure calls after that, resetting the TSF results in incorrect beacon generation. The only exception is a change in the beacon interval, which is indicated to the driver by mac80211 through IEEE80211_CONF_CHANGE_BEACON_INTERVAL, handle this properly. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Split beacon configuration into mode specific routinesSujith
This makes the code easier to understand. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Scrub beacon.cSujith
Remove useless comments, fix indentation. Also, remove all occurrences of ASSERT(vif) which are not needed. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Use new scan notifiers from mac80211Sujith
The only use case for this right now is ANI calibration, but more might come up in the future. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Fix FIF_BCN_PRBRESP_PROMISC handlingAlina Friedrichsen
So that a new created IBSS network doesn't break on the first scan. It seems to Sujith and me that this stupid code unnecessary, too. So remove it... Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Handle power modes in isr for power save.Vivek Natarajan
Restore network sleep mode in isr if power save is enabled. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Remove unused key xoringJouni Malinen
This is not used anywhere in ath9k and is just making the code more confusing. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05ath9k: Fix hw crypto configuration for TKIP in AP modeJouni Malinen
Incorrect Michael MIC key (RX, should have been TX) was set for the group key in AP mode. This resulted in all broadcast frames triggering Michael MIC errors and eventual TKIP countermeasures. The change here sets the correct Michael MIC key based on whether the local end is the authenticator (well, AP for now). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Tested-by: Pat Erley <pat-lkml@erley.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>