GitHub/moto-9609/android_kernel_motorola_exynos9610.git
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
John W. Linville [Wed, 25 Jun 2014 19:15:14 +0000 (15:15 -0400)]
Merge git://git./linux/kernel/git/jberg/mac80211-next

10 years agocfg80211: remove channel_switch combination check
Michal Kazior [Wed, 25 Jun 2014 10:35:10 +0000 (12:35 +0200)]
cfg80211: remove channel_switch combination check

Driver is now responsible for veryfing if the
switch is possible.

Since this is inherently tricky driver may decide
to disconnect an interface later with
cfg80211_stop_iface().

This doesn't mean driver can accept everything. It
should do it's best to verify requests and reject
them as soon as possible.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: use chanctx reservation for STA CSA
Michal Kazior [Wed, 25 Jun 2014 10:35:09 +0000 (12:35 +0200)]
mac80211: use chanctx reservation for STA CSA

Channel switch finalization is now 2-step. First
step is when driver calls chswitch_done(), the
other is when reservation is actually finalized
(which be defered for in-place reservation).

It is now safe to call ieee80211_chswitch_done()
more than once.

Also remove the ieee80211_vif_change_channel()
because it is no longer used.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: use chanctx reservation for AP CSA
Michal Kazior [Wed, 25 Jun 2014 10:35:08 +0000 (12:35 +0200)]
mac80211: use chanctx reservation for AP CSA

Channel switch finalization is now 2-step. First
step is when driver calls csa_finish(), the other
is when reservation is actually finalized (which
can be deferred for in-place reservation).

It is now safe to call ieee80211_csa_finish() more
than once.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: make check_combinations() aware of chanctx reservation
Michal Kazior [Wed, 25 Jun 2014 10:35:07 +0000 (12:35 +0200)]
mac80211: make check_combinations() aware of chanctx reservation

The ieee80211_check_combinations() computes
radar_detect accordingly depending on chanctx
reservation status.

This makes it possible to use the function for
channel_switch validation.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: implement multi-vif in-place reservations
Michal Kazior [Wed, 25 Jun 2014 10:35:06 +0000 (12:35 +0200)]
mac80211: implement multi-vif in-place reservations

Multi-vif in-place reservations happen when
it is impossible to allocate more channel contexts
as indicated by interface combinations.

Such reservations are not finalized until all
assigned interfaces are ready.

This still doesn't handle all possible cases
(i.e. degradation of number of channels) properly.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: split sched scan IEs
David Spinadel [Thu, 6 Feb 2014 14:15:23 +0000 (16:15 +0200)]
mac80211: split sched scan IEs

Split sched scan IEs to band specific and not band specific
blocks. Common IEs blocks may be sent to the FW once per command,
instead of per band.

This allows optimization of size of the command, which may be
required by some drivers (eg. iwlmvm with newer firmware version).

As this changes the mac80211 API, update all drivers to use the
new version correctly, even if they don't (yet) make use of the
split data.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: support more than one band in scan request
David Spinadel [Wed, 5 Feb 2014 13:21:13 +0000 (15:21 +0200)]
mac80211: support more than one band in scan request

Some drivers (such as iwlmvm) can handle multiple bands in a single
HW scan request. Add a HW flag to indicate that the driver support
this. To hold the required data, create a separate structure for
HW scan request that holds cfg scan request and data about
different parts of the scan IEs.

As this changes the mac80211 API, update all drivers using it to
use the correct new function type/argument.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: protect TDLS discovery session
Arik Nemtsov [Wed, 11 Jun 2014 14:18:27 +0000 (17:18 +0300)]
mac80211: protect TDLS discovery session

After sending a TDLS discovery-request, we expect a reply to arrive on
the AP's channel. We must stay on the channel (no PSM, scan, etc.), since
a TDLS setup-response is a direct packet not buffered by the AP.
Add a new mac80211 driver callback to allow discovery session protection.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: make sure TDLS peer STA exists during setup
Arik Nemtsov [Wed, 11 Jun 2014 14:18:26 +0000 (17:18 +0300)]
mac80211: make sure TDLS peer STA exists during setup

Make sure userspace added a TDLS peer station before invoking the
transmission of the first setup frame. This ensures packets to the peer
won't go through the AP path.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: add API to request TDLS operation from userspace
Arik Nemtsov [Wed, 11 Jun 2014 14:18:25 +0000 (17:18 +0300)]
mac80211: add API to request TDLS operation from userspace

Write a mac80211 to the cfg80211 API for requesting a userspace TDLS
operation. Define TDLS specific reason codes that can be used here.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: implement proper Tx path flushing for TDLS
Arik Nemtsov [Wed, 11 Jun 2014 14:18:24 +0000 (17:18 +0300)]
mac80211: implement proper Tx path flushing for TDLS

As the spec mandates, flush data in the AP path before transmitting the
first setup frame. Data packets transmitted during setup are already
dropped in the Tx path.

For the teardown flow, flush all packets in the direct path before
transmitting the teardown frame. Un-authorize the peer sta after teardown
is sent, forcing all subsequent Tx to the peer through the AP.

Make sure to flush the queues when disabling the link to get the
teardown packet out.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
[adjust to Luca's new quuee API and stop only vif queues]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: split tdls_mgmt function
Arik Nemtsov [Wed, 11 Jun 2014 14:18:23 +0000 (17:18 +0300)]
mac80211: split tdls_mgmt function

There are setup/teardown specific actions to be done that accompany
the sending of a TDLS management packet. Split the main function to
simplify future additions.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: use TDLS initiator in tdls_mgmt operations
Arik Nemtsov [Wed, 11 Jun 2014 14:18:22 +0000 (17:18 +0300)]
mac80211: use TDLS initiator in tdls_mgmt operations

The TDLS initiator is set once during link setup. If determines the
address ordering in the link identifier IE.
Use the value from userspace in order to have a correct teardown packet.
With the current code, a teardown from the responder side fails the TDLS
MIC check because of a bad link identifier IE.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: pass TDLS initiator in tdls_mgmt operations
Arik Nemtsov [Wed, 11 Jun 2014 14:18:21 +0000 (17:18 +0300)]
cfg80211: pass TDLS initiator in tdls_mgmt operations

The TDLS initiator is set once during link setup. If determines the
address ordering in the link identifier IE.

Fix dependent drivers - mwifiex and mac80211.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: cleanup TDLS state during failed setup
Arik Nemtsov [Wed, 11 Jun 2014 14:18:20 +0000 (17:18 +0300)]
mac80211: cleanup TDLS state during failed setup

When setting up a TDLS session, register a delayed work to remove
the peer if setup times out. Prevent concurrent setups to support this
capacity.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: set auth flags after other station info
Arik Nemtsov [Wed, 11 Jun 2014 14:18:19 +0000 (17:18 +0300)]
mac80211: set auth flags after other station info

For TDLS, the AUTHORIZED flag arrives with all other important station
info (supported rates, HT/VHT caps, ...). Make sure to set the station
state in the low-level driver after transferring this information to
the mac80211 STA entry.
This aligns the STA information during sta_state callbacks with the
non-TDLS case.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: clarify TDLS Tx handling
Arik Nemtsov [Wed, 11 Jun 2014 14:18:18 +0000 (17:18 +0300)]
mac80211: clarify TDLS Tx handling

Rename the flags used in the Tx path and add an explanation for the
reasons to drop, send directly or through the AP.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: stop only the queues assigned to the vif during channel switch
Luciano Coelho [Fri, 13 Jun 2014 13:30:07 +0000 (16:30 +0300)]
mac80211: stop only the queues assigned to the vif during channel switch

Instead of stopping all the hardware queues during channel switch,
which is especially bad when we have large CSA counts, stop only the
queues that are assigned to the vif that is performing the channel
switch.

Additionally, check for (sdata->csa_block_tx) instead of calling
ieee80211_csa_needs_block_tx(), which can now be removed.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: add functions to stop and wake all queues assigned to a vif
Luciano Coelho [Fri, 13 Jun 2014 13:30:06 +0000 (16:30 +0300)]
mac80211: add functions to stop and wake all queues assigned to a vif

In some cases we may want to stop the queues of a single vif (for
instance during a channel-switch).  Add a function that stops all the
queues that are assigned to a vif.  If a queue is assigned to more
than one vif, the corresponding netdev subqueue of the other vif(s)
will also be stopped.  If the HW doesn't set the
IEEE80211_HW_QUEUE_CONTROL flag, then all queues are stopped.

Also add a corresponding function to wake the queues of a vif back.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: introduce refcount for queue_stop_reasons
Luciano Coelho [Fri, 13 Jun 2014 13:30:05 +0000 (16:30 +0300)]
mac80211: introduce refcount for queue_stop_reasons

Sometimes different vifs may be stopping the queues for the same
reason (e.g. when several interfaces are performing a channel switch).
Instead of using a bitmask for the reasons, use an integer that holds
a refcount instead.  In order to keep it backwards compatible,
introduce a boolean in some functions that tell us whether the queue
stopping should be refcounted or not.  For now, use not refcounted for
all calls to keep it functionally the same as before.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: don't stop all queues when flushing
Luciano Coelho [Fri, 13 Jun 2014 13:30:04 +0000 (16:30 +0300)]
mac80211: don't stop all queues when flushing

There is no need to stop all queues when we want to flush specific
queues, so stop only the queues that will be flushed.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agonet: Mac80211: Remove silly timespec dance
Thomas Gleixner [Wed, 11 Jun 2014 23:59:18 +0000 (23:59 +0000)]
net: Mac80211: Remove silly timespec dance

Converting time from one format to another seems to give coders a warm
and fuzzy feeling.

Use the proper interfaces.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John W. Linville <linville@tuxdriver.com>
[fix compile error]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211_hwsim: clean up own address matching
Johannes Berg [Thu, 12 Jun 2014 20:34:49 +0000 (22:34 +0200)]
mac80211_hwsim: clean up own address matching

Using perm_addr is always wrong, it may be reassigned by
anyone using standard netdev APIs. Remove that from the
match function and also use the match function where only
the perm_addr was used now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: Use ktime_get_ts()
Thomas Gleixner [Wed, 11 Jun 2014 23:59:14 +0000 (23:59 +0000)]
mac80211: Use ktime_get_ts()

do_posix_clock_monotonic_gettime() is a leftover from the initial
posix timer implementation which maps to ktime_get_ts().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: use csa counter offsets instead of csa_active
Michal Kazior [Thu, 5 Jun 2014 12:21:37 +0000 (14:21 +0200)]
mac80211: use csa counter offsets instead of csa_active

vif->csa_active is protected by mutexes only. This
means it is unreliable to depend on it on codeflow
in non-sleepable beacon and CSA code. There was no
guarantee to have vif->csa_active update be
visible before beacons are updated on SMP systems.

Using csa counter offsets which are embedded in
beacon struct (and thus are protected with single
RCU assignment) is much safer.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: move csa counters from sdata to beacon/presp
Michal Kazior [Thu, 5 Jun 2014 12:21:36 +0000 (14:21 +0200)]
mac80211: move csa counters from sdata to beacon/presp

Having csa counters part of beacon and probe_resp
structures makes it easier to get rid of possible
races between setting a beacon and updating
counters on SMP systems by guaranteeing counters
are always consistent against given beacon struct.

While at it relax WARN_ON into WARN_ON_ONCE to
prevent spamming logs and racing.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
[remove pointless array check]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: allow tx via monitor iface when DFS
Janusz Dziedzic [Thu, 5 Jun 2014 06:12:57 +0000 (08:12 +0200)]
mac80211: allow tx via monitor iface when DFS

Allow send frames using monitor interface
when DFS chandef and we pass CAC (beaconing
allowed).

This fix problem when old kernel and new backports used,
in such case hostapd create/use also monitor interface.
Before this patch all frames hostapd send using monitor
iface were dropped when AP was configured on DFS channel.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: make ethtool the driver's responsibility
Johannes Berg [Wed, 4 Jun 2014 15:31:56 +0000 (17:31 +0200)]
cfg80211: make ethtool the driver's responsibility

Currently, cfg80211 tries to implement ethtool, but that doesn't
really scale well, with all the different operations. Make the
lower-level driver responsible for it, which currently only has
an effect on mac80211. It will similarly not scale well at that
level though, since mac80211 also has many drivers.

To cleanly implement this in mac80211, introduce a new file and
move some code to appropriate places.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove weak WEP IV accounting
Johannes Berg [Wed, 4 Jun 2014 15:06:23 +0000 (17:06 +0200)]
mac80211: remove weak WEP IV accounting

Since WEP is practically dead, there seems very little
point in keeping WEP weak IV accounting.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agotrivial: net/mac80211/mesh.c: fix typo s/Substract/Subtract/
Antonio Ospite [Wed, 4 Jun 2014 12:03:49 +0000 (14:03 +0200)]
trivial: net/mac80211/mesh.c: fix typo s/Substract/Subtract/

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove ignore_plink_timer flag
Bob Copeland [Wed, 4 Jun 2014 13:27:31 +0000 (09:27 -0400)]
mac80211: remove ignore_plink_timer flag

The mesh_plink code is doing some interesting things with the
ignore_plink_timer flag.  It seems the original intent was to
handle this race:

cpu 0                           cpu 1
-----                           -----
                                start timer handler for state X
acquire sta_lock
change state from X to Y
mod_timer() / del_timer()
release sta_lock
                                acquire sta_lock
                                execute state Y timer too soon

However, using the mod_timer()/del_timer() return values to
detect these cases is broken.  As a result, timers get ignored
unnecessarily, and stations can get stuck in the peering state
machine.

Instead, we can detect the case by looking at the timer expiration.
In the case of del_timer, just ignore the timers in the following
(LISTEN/ESTAB) states since they won't have timers anyway.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: fix station/driver powersave race
Johannes Berg [Tue, 27 May 2014 14:32:27 +0000 (16:32 +0200)]
mac80211: fix station/driver powersave race

It is currently possible to have a race due to the station PS
unblock work like this:
 * station goes to sleep with frames buffered in the driver
 * driver blocks wakeup
 * station wakes up again
 * driver flushes/returns frames, and unblocks, which schedules
   the unblock work
 * unblock work starts to run, and checks that the station is
   awake (i.e. that the WLAN_STA_PS_STA flag isn't set)
 * we process a received frame with PM=1, setting the flag again
 * ieee80211_sta_ps_deliver_wakeup() runs, delivering all frames
   to the driver, and then clearing the WLAN_STA_PS_DRIVER and
   WLAN_STA_PS_STA flags

In this scenario, mac80211 will think that the station is awake,
while it really is asleep, and any TX'ed frames should be filtered
by the device (it will know that the station is sleeping) but then
passed to mac80211 again, which will not buffer it either as it
thinks the station is awake, and eventually the packets will be
dropped.

Fix this by moving the clearing of the flags to exactly where we
learn about the situation. This creates a problem of reordering,
so introduce another flag indicating that delivery is being done,
this new flag also queues frames and is cleared only while the
spinlock is held (which the queuing code also holds) so that any
concurrent delivery/TX is handled correctly.

Reported-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove PID rate control
John W. Linville [Fri, 30 May 2014 14:47:28 +0000 (10:47 -0400)]
mac80211: remove PID rate control

Minstrel has long since proven its worth.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoath9k: Fix build error in ath_reset_internal
Rajkumar Manoharan [Fri, 20 Jun 2014 17:17:49 +0000 (22:47 +0530)]
ath9k: Fix build error in ath_reset_internal

drivers/net/wireless/ath/ath9k/main.c:299 ath_reset_internal()
error: we previously assumed 'hchan' could be null (see line 293)

Cc: Felix Fietkau <nbd@openwrt.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: add config for (en|dis)abling G-PHY support
Rafał Miłecki [Fri, 20 Jun 2014 15:22:01 +0000 (17:22 +0200)]
b43: add config for (en|dis)abling G-PHY support

This allows new devices users to save some space.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: remove leftover code from old devices support
Rafał Miłecki [Fri, 20 Jun 2014 15:22:00 +0000 (17:22 +0200)]
b43: remove leftover code from old devices support

Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
We keep phy_a.c as it's needed for G-PHY which shares some design.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix for 64-bit integer division
Vladimir Kondratiev [Fri, 20 Jun 2014 07:05:07 +0000 (10:05 +0300)]
wil6210: fix for 64-bit integer division

On some platforms, cycles_t is 64-bit, and gcc generates call to
__udivdi3 for straight division of cycles_t/cycles_t. This leads
to compilation failure, as this function is not exist in the kernel
runtime. do_div() to rescue

Original report:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
head:   2e91606f5e1ec7329557dfc0e298c4c021acbb80
commit: 7c0acf868d2e470c9d6a40091acf8d6444c01b57 [81/103] wil6210: Tx performance monitoring
config: i386-randconfig-ha3-0620 (attached as .config)

All error/warnings:

   drivers/built-in.o: In function `wil_vring_debugfs_show':
>> debugfs.c:(.text+0x39b9be): undefined reference to `__udivdi3'

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: Use the proper interfaces
Thomas Gleixner [Fri, 20 Jun 2014 04:48:12 +0000 (21:48 -0700)]
mwifiex: Use the proper interfaces

Why is converting time formats so desired if there are proper
interfaces for this?

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoPCMCIA_HERMES: ioport_map/unmap relies on HAS_IOPORT_MAP
Fabian Frederick [Wed, 18 Jun 2014 17:55:38 +0000 (19:55 +0200)]
PCMCIA_HERMES: ioport_map/unmap relies on HAS_IOPORT_MAP

Fixing following sh-allmodconfig errors reported on kisskb

"
drivers/net/wireless/orinoco/orinoco_cs.c:153:2: error: implicit declaration of function 'ioport_map' [-Werror=implicit-function-declaration]
drivers/net/wireless/orinoco/orinoco_cs.c:205:3: error: implicit declaration of function 'ioport_unmap' [-Werror=implicit-function-declaration]
"

Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoLIBERTAS_CS: ioport_map/unmap relies on HAS_IOPORT_MAP
Fabian Frederick [Wed, 18 Jun 2014 17:48:02 +0000 (19:48 +0200)]
LIBERTAS_CS: ioport_map/unmap relies on HAS_IOPORT_MAP

Fixing following sh-allmodconfig errors reported on kisskb

"
drivers/net/wireless/libertas/if_cs.c:826:3: error: implicit declaration of function 'ioport_unmap' [-Werror=implicit-function-declaration]
drivers/net/wireless/libertas/if_cs.c:878:2: error: implicit declaration of function 'ioport_map' [-Werror=implicit-function-declaration]
"

Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoSPECTRUM_CS: ioport_map/unmap relies on HAS_IOPORT_MAP
Fabian Frederick [Wed, 18 Jun 2014 17:43:31 +0000 (19:43 +0200)]
SPECTRUM_CS: ioport_map/unmap relies on HAS_IOPORT_MAP

Fixing following sh-allmodconfig errors reported on kisskb

"
drivers/net/wireless/orinoco/spectrum_cs.c:216:2: error: implicit declaration of function 'ioport_map' [-Werror=implicit-function-declaration]
drivers/net/wireless/orinoco/spectrum_cs.c:273:3: error: implicit declaration of function 'ioport_unmap' [-Werror=implicit-function-declaration]
"

Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agodrivers/net/wireless/rt2x00/rt2x00dev.c: remove null test before kfree
Fabian Frederick [Wed, 18 Jun 2014 14:51:29 +0000 (16:51 +0200)]
drivers/net/wireless/rt2x00/rt2x00dev.c: remove null test before kfree

Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: track Tx queue state
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:23 +0000 (19:37 +0300)]
wil6210: track Tx queue state

Provide both event (netif_tx_[stop|wake]) tracking via printk;
and state via debugfs 'info'

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: interrupt statistics
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:22 +0000 (19:37 +0300)]
wil6210: interrupt statistics

Track number of interrupts and Tx/Rx packets;
expose through debugfs 'info'. Reset upon read.
Used to analyse effectivness of interrupt coalescing and NAPI.
Read twice with some interval like
cat info > /dev/null; sleep 1; cat info

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: add 'info' debugfs entry
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:21 +0000 (19:37 +0300)]
wil6210: add 'info' debugfs entry

Use 'info' debugfs entry for misc. assorted information.
Start with indication whether platform is AC-powered;
will use it later for power related decisions

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: work around for platforms with broken INTx
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:20 +0000 (19:37 +0300)]
wil6210: work around for platforms with broken INTx

There are platforms where INTx can't be routed by ACPI,
this leads to pci_enable_device failure. Re-try pretending we have
MSI already configured; in this case pci_enable_device do not try
to configure INTx. However, MSI could still work.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix for unreachable code in wmi_recv_cmd
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:19 +0000 (19:37 +0300)]
wil6210: fix for unreachable code in wmi_recv_cmd

As reported by Dan Carpenter <dan.carpenter@oracle.com>:

The patch a715c7ddd65a: "wil6210: improve debug for WMI receive" from
May 29, 2014, leads to the following static checker warning:

        drivers/net/wireless/ath/wil6210/wmi.c:746 wmi_recv_cmd()
        info: ignoring unreachable code.

drivers/net/wireless/ath/wil6210/wmi.c
   739                  spin_unlock_irqrestore(&wil->wmi_ev_lock, flags);
   740                  {
   741                          int q = queue_work(wil->wmi_wq,
   742                                             &wil->wmi_event_worker);
   743                          wil_dbg_wmi(wil, "queue_work -> %d\n", q);
   744                  }
   745          }
   746          if (n > 1)
                ^^^^^^^^^^
We never reach this if statemtent.

   747                  wil_dbg_wmi(wil, "%s -> %d events processed\n", __func__, n);
   748  }

Exit loop with "break", not "return".

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: map additional registers on target
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:18 +0000 (19:37 +0300)]
wil6210: map additional registers on target

New registers area introduced, mark corresponded address range as valid

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: remove unused #include
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:17 +0000 (19:37 +0300)]
wil6210: remove unused #include

In the pcie_bus.c, knowledge about debugfs is not necessary

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix disconnect handling for AP
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:16 +0000 (19:37 +0300)]
wil6210: fix disconnect handling for AP

For the AP-like interface, if "disconnect all" requested,
every station should be deleted with cfg80211_del_sta().
Implement this behavior.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: avoid dmesg pollution by Tx errors
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:15 +0000 (19:37 +0300)]
wil6210: avoid dmesg pollution by Tx errors

On Tx path, when vring for the destination not found,
it was considered as error and message was printed unconditionally.
However, this situation is normal after disconnect. If disconnect was while
heavy traffic load, lots of Tx packets will be dropped and this would
cause significant amount of prints in dmesg.
Demote messages priority from 'error' to 'debug'.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Debug print GRO Rx result
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:14 +0000 (19:37 +0300)]
wil6210: Debug print GRO Rx result

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: add 'freq' and 'link' debugfs entries
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:13 +0000 (19:37 +0300)]
wil6210: add 'freq' and 'link' debugfs entries

Expose operational frequency and link info

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Use "name = value" format in the debugfs
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:12 +0000 (19:37 +0300)]
wil6210: Use "name = value" format in the debugfs

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: debug print when scan request state changes
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:11 +0000 (19:37 +0300)]
wil6210: debug print when scan request state changes

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: print error when notifying about FW error
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:10 +0000 (19:37 +0300)]
wil6210: print error when notifying about FW error

Print to dmesg when FW error notification is about to be sent

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: writeable ITR registers
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:09 +0000 (19:37 +0300)]
wil6210: writeable ITR registers

Interrupt threshold registers may be written to.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: debugfs interface to send raw WMI command
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:08 +0000 (19:37 +0300)]
wil6210: debugfs interface to send raw WMI command

Debug aid

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: BACK: track last dropped SSN
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:07 +0000 (19:37 +0300)]
wil6210: BACK: track last dropped SSN

Track and print on debugfs

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Allow driver load if FW not ready
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:06 +0000 (19:37 +0300)]
wil6210: Allow driver load if FW not ready

Usable for debugging, to be able to obtain FW traces

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Tx performance monitoring
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:05 +0000 (19:37 +0300)]
wil6210: Tx performance monitoring

For performance monitoring, trace time intervals when Tx vring
is idle/not idle. Use CPU cycle counter for this, because jiffies is
too rough, and other precise time measurement methods involve
overhead while get_cycles() should be fast.
This used to provide some estimation for percentage when Tx vring
was idle, i.e. when hardware is under-utilized.
Estimation is not precise because of many reasons - CPU frequency scaling,
grt_cycles() may be per core etc. But still, it is good estimation

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: more debug info for vring
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:04 +0000 (19:37 +0300)]
wil6210: more debug info for vring

print used/available counters on debugfs;
print to dmesg when Tx vring becomes empty

This aids with performance investigation

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: print more info about BSS found
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:03 +0000 (19:37 +0300)]
wil6210: print more info about BSS found

print essential info to dmesg

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: trace wil->status on debugfs
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:02 +0000 (19:37 +0300)]
wil6210: trace wil->status on debugfs

For debug purposes

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: print debug info when starting AP
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:01 +0000 (19:37 +0300)]
wil6210: print debug info when starting AP

In the wil_cfg80211_start_ap(), debug print selected data:
- beacon (before and after fix-up)
- crypto parameters
- mark start/stop AP invocation

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: indicate mgmt_tx status
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:00 +0000 (19:37 +0300)]
wil6210: indicate mgmt_tx status

Inform cfg80211 about Tx result

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Tx mgmt frame from debugfs
Vladimir Kondratiev [Mon, 16 Jun 2014 16:36:59 +0000 (19:36 +0300)]
wil6210: Tx mgmt frame from debugfs

Provide 2 files on the debugfs:
- "rxon": write channel (1..4) to open Rx on it, 0 to rxoff
- "tx_mgmt": write binary frame, starting from MAC header

one need to care about turning receiver on/off before/after tx_mgmt

Correct sequence is:
 echo $channel > rxon
 cat mfmt_frame > tx_mgmt
 echo 0 > rxon

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Changes for 40MHz
Jahnavi Meher [Mon, 16 Jun 2014 14:17:03 +0000 (19:47 +0530)]
rsi: Changes for 40MHz

Added code required for 40MHz.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Adding support for host based bgscan.
Jahnavi Meher [Mon, 16 Jun 2014 14:16:48 +0000 (19:46 +0530)]
rsi: Adding support for host based bgscan.

Added support for host based bgscan. The h/w queues are blocked
while bgscan is being performed and after coming to the connected
channel, the queues are unblocked.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Adding support for 5GHz
Jahnavi Meher [Mon, 16 Jun 2014 14:16:31 +0000 (19:46 +0530)]
rsi: Adding support for 5GHz

Adding support for 5GHz.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Sending QoS null packet via the mgmt queue.
Jahnavi Meher [Mon, 16 Jun 2014 14:16:13 +0000 (19:46 +0530)]
rsi: Sending QoS null packet via the mgmt queue.

Send the QoS null packet via mgmt queue.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Added debug messages.
Jahnavi Meher [Mon, 16 Jun 2014 14:15:45 +0000 (19:45 +0530)]
rsi: Added debug messages.

Added some debug messages.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Changed the logic of dequeuing packets from hal queues.
Jahnavi Meher [Mon, 16 Jun 2014 14:15:03 +0000 (19:45 +0530)]
rsi: Changed the logic of dequeuing packets from hal queues.

The number of packets being dequeued from s/w queues was fixed -
changed it to a dynamic calculation based on txop. There are also
some fixes to the dequeuing algorithm.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Changed the SDIO interrupt variables and some clean up.
Jahnavi Meher [Mon, 16 Jun 2014 14:14:12 +0000 (19:44 +0530)]
rsi: Changed the SDIO interrupt variables and some clean up.

Changed the SDIO interrupt variables and some clean ups.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Use SGI if configured for fixed rate transmission.
Jahnavi Meher [Mon, 16 Jun 2014 14:13:54 +0000 (19:43 +0530)]
rsi: Use SGI if configured for fixed rate transmission.

Use SGI if configured while sending data packets at a fixed rate.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Lower level debug messages and changed handling of confirm received for rsi_prog...
Jahnavi Meher [Mon, 16 Jun 2014 14:13:35 +0000 (19:43 +0530)]
rsi: Lower level debug messages and changed handling of confirm received for rsi_program_bb_rf().

Lower level debug messages for some frames and changed confirm
received for rsi_program_bb_rf() to a valid case.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Changed rate handling.
Jahnavi Meher [Mon, 16 Jun 2014 14:13:09 +0000 (19:43 +0530)]
rsi: Changed rate handling.

Changed rate handling.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Changed the rsi_set_channel() and rsi_program_bb_rf().
Jahnavi Meher [Mon, 16 Jun 2014 14:11:58 +0000 (19:41 +0530)]
rsi: Changed the rsi_set_channel() and rsi_program_bb_rf().

Made required changes to rsi_set_channel() and rsi_program_bb_rf()
functions.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Changed the radio caps frame.
Jahnavi Meher [Mon, 16 Jun 2014 14:11:41 +0000 (19:41 +0530)]
rsi: Changed the radio caps frame.

Changed the radio caps frame and added the required fields.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Add macros for endpoints and set default value of endpoint.
Jahnavi Meher [Mon, 16 Jun 2014 14:11:22 +0000 (19:41 +0530)]
rsi: Add macros for endpoints and set default value of endpoint.

Added macros for the endpoints and set the default value of endpoint
to 2.4GHz and 20MHz.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Using band from rsi_common to fill in ieee80211_rx_status
Jahnavi Meher [Mon, 16 Jun 2014 14:10:55 +0000 (19:40 +0530)]
rsi: Using band from rsi_common to fill in ieee80211_rx_status

Filling in band from common->band.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Fixed the kernel doc
Jahnavi Meher [Mon, 16 Jun 2014 14:10:02 +0000 (19:40 +0530)]
rsi: Fixed the kernel doc

Changed the function header to match the function name.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agorsi: Mapping the debugfs stats to the correct s/w queues.
Jahnavi Meher [Mon, 16 Jun 2014 14:09:40 +0000 (19:39 +0530)]
rsi: Mapping the debugfs stats to the correct s/w queues.

Changed the queue numbers to macros, and corrected the mappings.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: Use dma_zalloc_coherent
Joe Perches [Sun, 15 Jun 2014 20:37:43 +0000 (13:37 -0700)]
rt2x00: Use dma_zalloc_coherent

Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Advertise multichannel support
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:16 +0000 (16:18 +0530)]
ath9k: Advertise multichannel support

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: use separate HW queue for each channel context
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:15 +0000 (16:18 +0530)]
ath9k: use separate HW queue for each channel context

Use seperate tx queue for each AC in each channel context and expose
these information to mac80211 to avoid stopping one channel context
leads to stopping the entire traffic for that AC even on other contexts.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add recovery mechanism for hw TSF timer
Felix Fietkau [Wed, 11 Jun 2014 10:48:14 +0000 (16:18 +0530)]
ath9k: Add recovery mechanism for hw TSF timer

Configure the TSF based hardware timer for a channel switch.
Also set up backup software timer, in case the gen timer fails.
This could be caused by a hardware reset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Update channel switch timer
Felix Fietkau [Wed, 11 Jun 2014 10:48:13 +0000 (16:18 +0530)]
ath9k: Update channel switch timer

TSF time might have been updated by the incoming beacon,
need update the channel switch timer to reflect the change.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Handle beacon miss on multi channel context
Felix Fietkau [Wed, 11 Jun 2014 10:48:12 +0000 (16:18 +0530)]
ath9k: Handle beacon miss on multi channel context

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add periodic NoA support
Felix Fietkau [Wed, 11 Jun 2014 10:48:11 +0000 (16:18 +0530)]
ath9k: Add periodic NoA support

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add multi-channel scheduling support
Felix Fietkau [Wed, 11 Jun 2014 10:48:10 +0000 (16:18 +0530)]
ath9k: Add multi-channel scheduling support

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Implement mgd_prepare_tx
Felix Fietkau [Wed, 11 Jun 2014 10:48:09 +0000 (16:18 +0530)]
ath9k: Implement mgd_prepare_tx

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Adjust AP beacon tsf based on station context
Felix Fietkau [Wed, 11 Jun 2014 10:48:08 +0000 (16:18 +0530)]
ath9k: Adjust AP beacon tsf based on station context

In multi channel context (AP + STA case), adjust the TSF time of
the AP chanctx to keep its beacons at half beacon interval offset
relative to the STA chanctx.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: switch channel after sending beacon
Felix Fietkau [Wed, 11 Jun 2014 10:48:07 +0000 (16:18 +0530)]
ath9k: switch channel after sending beacon

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add p2p go NoA attribute
Felix Fietkau [Wed, 11 Jun 2014 10:48:06 +0000 (16:18 +0530)]
ath9k: Add p2p go NoA attribute

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Store current offchannel duration
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:05 +0000 (16:18 +0530)]
ath9k: Store current offchannel duration

Update current offchannel duration during scan or roc request.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: switch channel context for beaconing
Felix Fietkau [Wed, 11 Jun 2014 10:48:04 +0000 (16:18 +0530)]
ath9k: switch channel context for beaconing

Add a basic state machine for switch channel context
for beacon transmission.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Summarize hw state per channel context
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:03 +0000 (16:18 +0530)]
ath9k: Summarize hw state per channel context

Group and set hw state (opmode, primary_sta, beacon conf) per
channel context instead of whole list of vifs. This would allow
each channel context to run in different mode (STA/AP).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Move beacon config to channel context
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:02 +0000 (16:18 +0530)]
ath9k: Move beacon config to channel context

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>