Commit graph

348353 commits

Author SHA1 Message Date
Alexey Khoroshilov
6960af6dce p54pci: don't return zero on failure paths in p54p_probe()
If pci_set_dma_mask() or pci_set_consistent_dma_mask() fails in p54p_probe(),
it breaks off initialization, deallocates all resources, but returns zero.
Similar issue is if check for returned value of pci_resource_len() fails.

The patch implements proper error code propagation.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:59 -05:00
Hante Meuleman
40a2329685 brcmfmac: Update init code routines from interface up.
On interface up dongle gets inialized. Move UP command to common
routine and update these common init routines using ifp.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:58 -05:00
Hante Meuleman
88d1239a1b brcmfmac: Removing obsolete variables and inline functions.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:58 -05:00
Hante Meuleman
80fd2dbee0 brcmfmac: Return correct error on netdev xmit.
Netdev xmit routine brcfm_netdev_start_xmit was defined
incorrectly and used wrong return codes. Always eat the
packet and return ok. Remove drvr_up check since it is not
relevant.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:58 -05:00
Hante Meuleman
03abad08bb brcmfmac: Remove unused caching dongle error.
CDC errors are retained. However, it is never used so it can
be removed.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:58 -05:00
Arend van Spriel
b84e3112ec brcmfmac: remove unnecessary curly braces in dhd_attach()
Stumbled into a curly braces used for if statement with only
one conditional statement. Removing them.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:57 -05:00
Arend van Spriel
12b33dacb4 brcmfmac: cleanup netdev transmit callback
The header of the ethernet packet is processed conditionally, but
the check is wrong as it checks skb length is at least ETH_ALEN. It
should check it is at least sizeof struct ethhdr instead.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:57 -05:00
Arend van Spriel
7833b5799f brcmfmac: remove unused event related definitions
The driver had some global definitions in dhd.h to map event
identifiers to event names. With redesign of firmware event
processing this has all moved to fweh module so these definitions
can be removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:57 -05:00
Hante Meuleman
a6cfb1477d brcmfmac: Use dedicated trace level for CDC.
CDC debug is partly done with TRACE and partly with CTL, however
CDC hardly ever needs debugging. Use dedicated level CDC and
replace TRACE and CTL in dhd_cdc with that.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:57 -05:00
Arend van Spriel
a43af515f6 brcmfmac: remove brcmf_proto_hdrpull() from bus interface
The use of the function brcmf_proto_hdrpull() is moved to the
common part of the driver and consequently it can be removed
from the bus interface.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:56 -05:00
Arend van Spriel
3aa7aad2b2 brcmfmac: remove rx helper function from bus interface
The bus interface provided a wrapper function to pass a single
packet to the common driver part filling a skb queue with one
packet. For clarity the caller now sets up the skb queue and
call the rx bus interface function.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:56 -05:00
Arend van Spriel
79d7c4e8da brcmfmac: define pr_fmt in one place
Several source files (but not all) define the pr_fmt() macro in exactly
the same way. Instead this commit defines it in a header file so driver
logging is consistent.

Cc: Joe Perches <joe@perches.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:56 -05:00
Arend van Spriel
81d5f1bbc4 brcmfmac: assure USB dongle firmware is reset upon module unload
Upon unloading the brcmfmac module the USB firmware should be reset
as the device remains powered. The reset assures a known device
state when a new brcmfmac driver load is being done.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:56 -05:00
Hante Meuleman
ac744395ba brcmfmac: removed deprecated set_bitrate_mask support
Set bitrate_mask is not desired anymore. The firmware will
determine the correct rates to be used.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:56 -05:00
Hante Meuleman
0429a6fa6b brcmfmac: do not reconfigure refill rx on 0-length packet.
When USB device gets removed rx complete comes with 0-length
packets. Do not refill those packets. In some rare cases it can
cause infinite loop.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:55 -05:00
Piotr Haber
637ccc27f4 brcmsmac: remove dead code
Dead code after AMPDU restructure.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:55 -05:00
Arend van Spriel
b180b10056 brcmsmac: allow user-space setting of interface address
The interface address of the wireless device is determined by
the permanent address stored in the device. This patch allows
it to be overridden from user-space.

Reported-by: Maximilian Engelhardt <maxi@daemonizer.de>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:55 -05:00
Arend van Spriel
66578c0a8c brcmsmac: use perimeter lock in add_interface() callback
All callbacks that access driver functions should do that under
perimeter lock protection. The add_interface() callback was lacking
this lock.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:55 -05:00
Piotr Haber
01486c5ad3 brcmsmac: increase timer reference count for new timers only
On hardware reintialization reference count of
already existing timers would be increased again.
This leads to problems on module unloading.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:54 -05:00
Gabor Juhos
a02308e931 rt2x00: rt2800: convert read_eeprom functions to return an int value
Both the rtt2x00usb_eeprom_read and the ioremap
functions are allowed to fail, however their
return values are not checked in the read_eeprom
functions in the rt2800{pci,usb} drivers.

The patch adds the missing checks, and converts
all read_eeprom functions to return an int value,
so the error values can be propagated up to the
'rt2800_validate_eeprom' function.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:54 -05:00
Sujith Manoharan
e1b97c9bc5 ath9k_hw: Remove AR9485 1.0 macro
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:54 -05:00
Geert Uytterhoeven
c2397bb0c5 brcmsmac: initialize morepending in brcms_b_recv()
drivers/net/wireless/brcm80211/brcmsmac/main.c: In function ‘brcms_b_recv’:
drivers/net/wireless/brcm80211/brcmsmac/main.c:7636: warning: ‘morepending’ may be used uninitialized in this function

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:54 -05:00
Stanislaw Gruszka
07db8f8fe9 iwlegacy: allow to enable PS
Power save support was removed from iwlegacy due to possible firmware
crashes problems it cause. I use to plan first inspect code to find
reason of problems, fix them and then allow to enable PS. But
realistically - code inspection will not happen, so let's do it, and
wait for eventual bug reports.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Stanislaw Gruszka
70277f47b5 iwlegacy: add flush callback
Dump implementation of flush, which just wait until all TX queues
become empty.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Gabor Juhos
93476b1e68 ath9k: fix column header comments for some initval arrays
Some 3-column initval arrays have wrong comments. The
column of these arrays is indexed by the 'freqIndex'
variable in 'ar5008_hw_process_ini' which only depends
on the actual band.

The 'initvals' tool from 'qca-swiss-army-knife' prints
the correct comment lines for these arrays, since commit
'atheros-initvals: fix comments for non-fastclock 3-column tables'
however the comments were not refreshed in ath9k.

The patch contains no functional changes.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Christian Lamparter
1f1d9654e1 carl9170: refactor carl9170_update_beacon
This patch moves parts of carl9170_update_beacon
into separate subroutines, so the parts become
more manageable.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Christian Lamparter
558925f313 carl9170: remove custom NUM_TID and friends
The commit: "mac80211: introduce IEEE80211_NUM_TIDS and use it"
introduced a generic NUM_TID definitions for all everyone.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Christian Lamparter
55fa645e3a carl9170: disable hw crypto for p2p networks
While the driver supports HW offload in a single
P2P client configuration, it doesn't support HW
offload in the concurrent P2P GO+CLIENT
configuration.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:52 -05:00
Christian Lamparter
7a5c730773 carl9170: don't enable hw crypto offload, if the fw doesn't support it
Previously, op_start would set disable_offload always
to false, even if it was set to true by the fw parser.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:52 -05:00
Christian Lamparter
17f658ac8c carl9170: Only specify interface combinations if more than one interface is possible
Otherwise carl9170 triggers a warning in cfg80211, from net/wireless/core.c

	/* Combinations with just one interface aren't real */
	if (WARN_ON(c->max_interfaces < 2))

Note: The number of supported interfaces is set by
the carl9170 firmware. The default number of
supported interfaces for all current firmwares is 2.
Therefore this warning can only be observed with
custom firmwares.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:52 -05:00
Christian Lamparter
7f878b0d96 carl9170: allow P2P_GO interface creation after P2P_CLIENT
Janusz Dziedzic reported that after a change in wpa_supplicant
["nl80211: Automatically use concurrent P2P if possible"],
carl9170 was no longer able to host a P2P network.

This patch tackles the problem by allowing GO interfaces to be
registered, long after the P2P_CLIENT interface is brought up.

Reported-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:52 -05:00
Christian Lamparter
5ae994d098 carl9170: import 1.9.7 firmware headers
Import new headers from my firmware branch:
<https://github.com/chunkeey/carl9170fw>

visit our wiki at:
<http://wireless.kernel.org/en/users/Drivers/carl9170.fw>

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:51 -05:00
Christian Lamparter
d1f3de71a5 carl9170: advertise support for TDLS
Based on a quick test [ath9k and carl9170],
TDLS seemed to be working fine. And while
we are at it, let's move the wiphy feature
flag set from carl9170_alloc into a single
place in carl9170_fw.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:51 -05:00
Felix Fietkau
c1b976d2fc ath9k_hw: use the devres API for allocations
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:51 -05:00
Felix Fietkau
b81950b165 ath9k: use the devres API for allocations/mappings
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:51 -05:00
Stanislaw Gruszka
d5374ef13e rt2800: refactor RFCSR initialization
rt2800_init_rfcsr() is too big, split RF initialization into per chip
functions. Code will change, but we should setup the same values onto
RF registers and in the same order as before.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:50 -05:00
John W. Linville
48c6cc04c9 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next 2013-01-07 14:57:43 -05:00
Larry Finger
5e20a4b530 b43: Fix firmware loading when driver is built into the kernel
Recent versions of udev cause synchronous firmware loading from the
probe routine to fail because the request to user space would time
out. The original fix for b43 (commit 6b6fa58) moved the firmware
load from the probe routine to a work queue, but it still used synchronous
firmware loading. This method is OK when b43 is built as a module;
however, it fails when the driver is compiled into the kernel.

This version changes the code to load the initial firmware file
using request_firmware_nowait(). A completion event is used to
hold the work queue until that file is available. This driver
reads several firmware files - the remainder can be read synchronously.
On some test systems, the async read fails; however, a following synch
read works, thus the async failure falls through to the sync try.

Reported-and-Tested by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>  (V3.4+)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 14:34:45 -05:00
Chen Gang
407ee23725 drivers/net/wireless/iwlegacy: use strlcpy instead of strncpy
The fields must be null-terminated, or simple_strtoul will cause issue.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 14:34:45 -05:00
Nickolai Zeldovich
c4f74d35ca drivers/net/wireless/mwl8k.c: avoid use-after-free
Do not dereference p->station_id after kfree(cmd) because p
points into the cmd data structure.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 14:34:44 -05:00
Julian Wollrath
111b72a2f0 rtlwifi: Fix typo in debug output of rtl8192c and rtl8723ae
Signed-off-by: Julian Wollrath <jwollrath@web.de>
Acked-by: Larry Finger <Larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 14:32:24 -05:00
Vladimir Kondratiev
2be7d22f06 wireless: add new wil6210 802.11ad 60GHz driver
This adds support for the 60 GHz 802.11ad Wilocity card
through a new driver, wil6210. Wilocity implemented the
firmware, QCA maintains the device driver.

Currently supported:

- STA: with security
- AP: limited to 1 connected STA, security disabled
- Monitor: due to a hardware/firmware limitation
  either control or non-control frames are monitored

Using a STA and AP with this drive, one can assemble
a fully functional BSS. Throughput of 1.2Gbps is achieved
with iperf.

The wil6210 cards have on-board flash memory for the
firmware, the cards comes pre-flashed and no firmware
download is required.

For more details see:

http://wireless.kernel.org/en/users/Drivers/wil6210

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-04 16:10:53 -05:00
Amitkumar Karwar
c3ff0b2dff mwifiex: fix typo in setting up ibss network parameters
commit 683b6d3... "cfg80211: pass a channel definition struct"
accidentally changed "==" to "!=".

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-04 16:09:48 -05:00
Bing Zhao
9c969d8ccb mwifiex: check wait_event_interruptible return value
wait_event_interruptible function returns -ERESTARTSYS if it's
interrupted by a signal. Driver should check the return value
and handle this case properly.

In mwifiex_wait_queue_complete() routine, as we are now checking
wait_event_interruptible return value, the condition check is not
required. Also, we have removed mwifiex_cancel_pending_ioctl()
call to avoid a chance of sending second command to FW by other path
as soon as we clear current command node. FW can not handle two
commands simultaneously.

Cc: "3.6+" <stable@vger.kernel.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-04 16:09:48 -05:00
John W. Linville
a910c9cab6 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes 2013-01-04 16:06:11 -05:00
John W. Linville
d339fc8980 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 2013-01-04 16:05:14 -05:00
Vladimir Kondratiev
9a6f7347f5 ath9k: Fix Kconfig for ATH9K_HTC
Ath9k consists of 2 different sub-modules: ATH9K and ATH9K_HTC.
Both uses common Atheros code from ath.ko and need ATH_COMMON.

However, while ATH9K selects ATH_COMMON, ATH9K_HTC does not.
As result, if ATH9K_HTC is the only Atheros card selected, compilation fails with
unresolved symbols.

This patch moves ATH_COMMON selection to the common part for both
ATH9K and ATH9K_HTC

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-04 14:34:27 -05:00
Thomas Pedersen
c51f878379 mac80211_hwsim: fix beacon timing
A beacon period starts at TSF time 0. Spoof this by
rounding the starting beacon time to a multiple of the
beacon interval, and keep TBTT aligned on TSF adjustment.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-04 14:01:55 +01:00
Thomas Pedersen
01e59e467e mac80211_hwsim: hrtimer beacon
For testing various timing-sensitive protocols (power
save, MBCA, etc.), a beacon accuracy of jiffies is not
sufficient. A tasklet_hrtimer is used for the beacon since
it runs the callback in soft-IRQ context with hrtimer
resolution.

Also handle BSS_CHANGED_BEACON_ENABLED for hwsim.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
[simplify timer container_of]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-04 13:58:01 +01:00
Thomas Pedersen
45034bfb8c mac80211_hwsim: fix tsf adjustment
Make hwsim TSF offset adjustments cumulative and relative
to the fake PHY TSF. Now adding 1000us, then adding -1000us
doesn't result in a tsf_offset of -1000. Also the beacon
timestamp can now correctly be expressed as (tsf +
data->tsf_offset), which will be done in a later patch.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-04 13:52:50 +01:00