summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ath9k.h
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: make ath_frame_info fit into reduced-size rate_driver_dataFlorian Westphal2015-03-131-1/+1
| | | | | | | | pre-requisite to shrink size of ieee80211_tx_info which in turn is needed to shrink skb->cb to 40 bytes again. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: add per-vif TX power capabilityLorenzo Bianconi2015-03-031-0/+1
| | | | | | | | | Configure the HW with highest TX power among all vif when HW TPC has been enabled in order to add support to per-vif TX power capability. Use lowest configured power among all interfaces when TPC is disabled Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Simplify user pattern configurationSujith Manoharan2015-02-031-6/+0
| | | | | | | | | There is no need to allocate a new structure and free it for every user pattern, instead use local variables. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Add a debugfs file for WOWSujith Manoharan2015-02-031-0/+1
| | | | | | | | This can be used to force WOW for cards that are not present in the supported PCI ID list. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Remove unused BMISS processingSujith Manoharan2015-02-031-2/+0
| | | | | | | | | | The various variables tracking bmiss interrupts are not really used anywhere except in a debug message. Remove them since they have no functional purpose. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Fix wow init/deinitSujith Manoharan2015-02-031-0/+4
| | | | | | | | | | | | Registering the card as a wakeup source needs to be done once, during initialization. When the WOW configuration changes, the card's status as wakeup source needs to be changed too and this is done via the set_wakeup() callback. Also, make sure the device is removed properly using ath9k_deinit_wow(). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k and ath9k_htc: rename variable "led_blink"Hong Xu2015-01-271-1/+1
| | | | | | | | | | | | | | | ath9k and ath9k_htc use the variable name "led_blink" to indicate whether the module parameter "blink" is on. This name is easy to conflict with other variables, and has caused a compiler error found by kbuild test bot. The compiler error is as following: drivers/net/wireless/ath/ath9k/ath9k_htc.o:(.data+0x47c): multiple definition of `led_blink' drivers/net/wireless/ath/ath9k/ath9k.o:(.bss+0x20): first defined here Fixes: 3a939a671225 ("ath9k_htc: Add a module parameter to disable blink") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Hong Xu <hong@topbug.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: add TPC capability to TX descriptor pathLorenzo Bianconi2014-11-251-0/+1
| | | | | | | | Add TPC capability to TX descriptor path. Cap per-packet TX power according to TX power per-rate tables. Currently TPC is supported just by AR9003 based chips Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Adjust tbtt delta properlySujith Manoharan2014-11-171-0/+1
| | | | | | | | | | | | | | | | In a GO/STA setup, when we switch to the STA context, the channel context timer is scheduled with a period of half the beacon interval. If a beacon is received in this duration, the timer is adjusted to accommodate TSF sync done by the HW. But, if the actual channel switch is delayed for some reason, we end up rearming the timer every time a new beacon is received. Avoid this by doing the adjustment only once. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix LED configurationSujith Manoharan2014-11-171-0/+1
| | | | | | | | | | On some x86 platforms, the LED gpio is active high instead of active low. Identify such cards and modify the GPIO usage to make sure LED works properly. Cc: Russell Hu <rhu@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: move spectral.* to common-spectral.*Oleksij Rempel2014-11-111-1/+0
| | | | | | | and rename exports from ath9k_spectral_* to ath9k_cmn_spectral_* Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: move spec_config to ath_spec_scan_privOleksij Rempel2014-11-111-2/+1
| | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: move spectral_mode to ath_spec_scan_privOleksij Rempel2014-11-111-1/+0
| | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add struct ath_spec_scan_privOleksij Rempel2014-11-111-1/+1
| | | | | | | | and move rfs_chan_spec_scan to this struct. We will need it for common spectral scan code. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add support for reporting tx power to mac80211Felix Fietkau2014-11-111-1/+1
| | | | | | | Track it per channel context instead of in the softc Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Improve flush() in mcc modeSujith Manoharan2014-10-271-1/+1
| | | | | | | | | | | | | | | | The flush timeout in MCC mode is very small, since we are constrained by the time slice for each channel context, but since only the HW queues are flushed when switching contexts, it is acceptable. Since the SW queues are also emptied in the mac80211 flush() callback, a larger duration is needed. Add an override argument to __ath9k_flush() and set it when flush() is called in MCC mode. This allows the driver to drain both the SW and HW queues. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Send oneshot NoASujith Manoharan2014-10-271-0/+1
| | | | | | | | | This patch makes sure that a GO interface sends out a new NoA schedule with 200ms duration when mgd_prepare_tx() is called. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Check for active GO in mgd_prepare_tx()Sujith Manoharan2014-10-271-0/+2
| | | | | | | | | If a GO interface is active when we receive a mgd_prepare_tx() call, then we need to send out a new NoA before switching to a new context. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add a function to check for an active GOSujith Manoharan2014-10-271-0/+1
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix address managementSujith Manoharan2014-10-271-1/+1
| | | | | | | | | | | | Since both the arguments need to satisfy the alignment requirements of ether_addr_copy(), use memcpy() in cases where there will be no big performance benefit and make sure that ether_addr_copy() calls use properly aligned arguments. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Check for pending frames properlySujith Manoharan2014-10-271-1/+2
| | | | | | | | | | | | | | | | | | | | Pending frames in the driver can be present either in the HW queues or SW. ath9k_has_pending_frames() currently checks for the HW queues first and then checks if any ACs are queued in the driver. In MCC mode, we need to check the HW queues alone, since the SW queues are just marked as 'stopped' - they will be processed in the next context switch. But since we don't differentiate this now, mention whether we want to check if there are frames in the SW queues. * The flush() callback checks both HW and SW queues. * The tx_frames_pending() callback does the same. * The call to __ath9k_flush() in MCC mode checks HW queues alone. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Use configurable timeout for flushSujith Manoharan2014-10-271-0/+1
| | | | | | | | | | The timeout value for flushing the TX queues is hardcoded at 200ms right now. Use a channel context-specific value instead to allow adjustments to the timeout in case MCC is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Unify reset APISujith Manoharan2014-10-271-2/+1
| | | | | | | | | | Instead of having ath_reset_internal() and ath_reset() as two separate calls to perform a HW reset, have one function. This makes sure that the behavior will be the same at all callsites. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Enable multi-channel properlySujith Manoharan2014-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | In MCC mode, currently the decision to enable the multi-channel state machine is done based on the association status if one of the interfaces assigned to a context is in station mode. This allows the driver to switch to the other context before the current station is able to complete the 4-way handshake in case it is required and this causes problems. Instead, enable multi-channel mode when the station moves to the authorized state. This disallows an early switch to the other channel. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix sequence number assignmentSujith Manoharan2014-10-081-1/+3
| | | | | | | | | | | | | | | Currently, ath9k uses a global counter for all frames that need to be assigned a sequence number. QoS-data frames are handled properly since they have a per-tid counter. But, beacons and other management frames use the same counter even if multiple interfaces or contexts are present. Fix this issue by making the counter per-interface and using it when mac80211 sets IEEE80211_TX_CTL_ASSIGN_SEQ. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add ath9k_chanctx_stop_queues()Sujith Manoharan2014-10-021-0/+5
| | | | | | | | This can be used when the queues of a context needs to be stopped. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Pass context to ath9k_chanctx_wake_queues()Sujith Manoharan2014-10-021-2/+3
| | | | | | | | | Change the ath9k_chanctx_wake_queues() API so that we can pass the channel context that needs its queues to be stopped. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix p2p address managementSujith Manoharan2014-09-261-0/+1
| | | | | | | | | | | | | | | | | When multiple channel contexts are enabled, a p2p interface that is assigned to a context will have an address that is different from the device mac address, which is used by wpa_s as the p2p device ID. Certain frames like provision requests use the device address and these get dropped since ath9k_calculate_summary_state() iterates over only the active interfaces in a context and the device address is not used. Fix this by adding the device mac address to the bssid mask. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Cache BSS informationSujith Manoharan2014-09-261-0/+5
| | | | | | | | | | | | Using the BSS information stored in mac80211 directly is racy in certain conditions. For example, in a MCC setup, if the scheduler is switching channels when a local deauth is issued, calculation of the opmode/bssid etc. is incorrect. To avoid this, store the bss params in the driver and use it. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add dynamic ACK timeout estimationLorenzo Bianconi2014-09-161-0/+3
| | | | | | | | | Add dynamic ACK timeout estimation algorithm based on ACK frame RX timestamp, TX frame timestamp and frame duration. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Tested-by: Philippe Duchein <wireless-dev@duchein.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove unnecessary tbtt assignmentSujith Manoharan2014-09-151-2/+2
| | | | | | | | | | The next_tbtt variable in the scheduler is needed only for GO/AP mode operation and is always read from the NEXT_TBTT_TIMER in the HW. There is no need to store the timestamp for received beacons. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix beacon miss handlingSujith Manoharan2014-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | The NoA duration for a GO is half the beacon interval and a concurrent context like a STA can be active only for that duration, before switching back to the GO's operating channel. Currently, when multiple beacons are missed, the dwell time for the STA context is extended to improve the chances of receiving a beacon. But the NoA is not updated and this will cause problems since the GO is offline for a period that is longer than the advertised duration. Fix this by ensuring that the NoA is updated first before extending the time slot for the STA context. Also make sure that non-periodic NoA is used for a one-time, longer absence period. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix Notice of Absence issuesSujith Manoharan2014-09-111-2/+5
| | | | | | | | | | | | | | | | | * The index has to incremented only when advertising a new NoA schedule. * Switch to non-periodic NoA when starting a scan operation and multiple channel contexts are active. * Make sure that periodic NoA is advertised again when scan ends. Since the offchannel timer moves the offchannel state to IDLE after the GO operating channel becomes active, use a flag "force_noa_update" to update the NoA contents. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix MCC scanningSujith Manoharan2014-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Scanning is curently broken when two channel contexts are active. For example in a P2P-GO/STA setup, the offchannel timer allows HZ / 10 to elapse before initiating a switch to the next scan channel from the current operating channel, which in this case would be the P2P-GO context. But, the channel context timer might decide to switch to the STA context when an SWBA comes early and a beacon is sent out. Since pending offchannel requests are processed in EVENT_BEACON_PREPARE, this causes inconsistent scanning. Fix this by making sure that a context switch happens before processing the pending offchannel request. This also makes sure that active channel contexts will always have higher priority than offchannel operations and the scan sequence looks like this: p2p-go, sta, p2p-go, offchannel, p2p-go, sta, p2p-go, offchannel,..... The oper-channel is p2p-go, so the STA context has to switch to p2p-go again before switching offchannel. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix interface accountingSujith Manoharan2014-09-091-1/+1
| | | | | | | | | | Currently, the interface count is maintained globally, but this causes problems in RX filter calculation. Make the interface count a per-channel-context variable to fix this. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix RX filters in channel contextsSujith Manoharan2014-09-091-1/+2
| | | | | | | | | Maintain the RX filter on a per-channel-context basis and not globally. Not doing so was resulting in incorrect filter calculation. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix ath_startrecv()Sujith Manoharan2014-09-091-1/+1
| | | | | | | | Since ath_startrecv() doesn't return an error value, cleanup the callsites. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add CTWindow supportSujith Manoharan2014-09-091-0/+2
| | | | | | | | Since CTWindow can be used for improving discoverability, fill this field in the NoA Attribute properly. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Print the event/state in ath_chanctx_eventSujith Manoharan2014-08-281-0/+3
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add new chanctx eventsSujith Manoharan2014-08-281-0/+2
| | | | | | | | This will be useful in handling addition/change of new channel contexts. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix ath_chanctx_get()Sujith Manoharan2014-08-281-4/+10
| | | | | | | | Move it inside a CONFIG_ATH9K_CHANNEL_CONTEXT ifdef since it is not needed otherwise. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Move ath9k_beacon_add_noa to channel.cSujith Manoharan2014-08-281-0/+7
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix channel context variables in ath_softcSujith Manoharan2014-08-281-2/+6
| | | | | | | | chanctx_work and next_chan are required only when CONFIG_ATH9K_CHANNEL_CONTEXT is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix 'offchannel' in ath_softcSujith Manoharan2014-08-281-1/+1
| | | | | | | | | | | Finally move the 'offchannel' instance in ath_softc inside a CONFIG_ATH9K_CHANNEL_CONTEXT cage. The offchannel usage in ath9k_calculate_iter_data() is closed off with an ifdef for now, since the state/opmode calculation is common for both the channel context mode and the normal mode. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Use ath_chanctx_check_active properlySujith Manoharan2014-08-281-2/+5
| | | | | | | | ath_chanctx_check_active() is required only when channel contexts are used. Make sure that it is not called in normal usage. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add ath9k_offchannel_initSujith Manoharan2014-08-281-0/+4
| | | | | | | | This patch adds a routine to setup the offchannel instance in ath_softc. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add ath9k_chanctx_wake_queuesSujith Manoharan2014-08-281-0/+4
| | | | | | | | Introduce a function that handles queues in channel context mode. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add wrappers for beacon eventsSujith Manoharan2014-08-281-1/+13
| | | | | | | | Using these wrappers allows us to move the 'sched' variable in ath_softc inside CONFIG_ATH9K_CHANNEL_CONTEXT. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix function declarationsSujith Manoharan2014-08-281-3/+3
| | | | | | | | These routines are required only when CONFIG_ATH9K_CHANNEL_CONTEXT is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix channel context eventsSujith Manoharan2014-08-281-2/+7
| | | | | | | | | | | Check if channel context usage is enabled before calling ath_chanctx_event() from various parts of the driver. Also, make sure that ath_chanctx_event() is compiled only when CONFIG_ATH9K_CHANNEL_CONTEXT is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud