Commit graph

427097 commits

Author SHA1 Message Date
Vladimir Kondratiev 4cd9e8377f wil6210: fix secondary connect
when STA receiving connect() when already connected,
it should return error

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:18 -04:00
Vladimir Kondratiev ed6f9dc62f wil6210: fw error recovery
upon fw error interrupt - in STA mode, disconnect/cancel scan and
then reset FW/HW
added module param - no_fw_recovery which is false by default

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:18 -04:00
Vladimir Kondratiev 0fef1818d0 wil6210: Fix kernel oops in reset flow
wil_reset() removes vring's
At the same time NAPI may be active performing Rx/Tx completion.
If this happens, Rx/Tx polling functions going to access already removed vrings

Make sure NAPI is idle and won't be started prior to vring removal.
For this, track NAPI enabled state

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:18 -04:00
Vladimir Kondratiev 8bf6adb988 wil6210: fix memory leak in the AP flow
When switching between STA and AP modes, memory allocated for Rx vring leaks
This is because start_ap() allocates Rx vring but stop_ap() do not free it.
Logically, Rx vring is not valid (HW can't use it anymore), so free it in reset()
Also, check double init for Rx vring and bail out with -EINVAL

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:18 -04:00
Vladimir Kondratiev fa4a18e73b wil6210: reduce printing
Convert 2 often printed messages to dynamic ones

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:17 -04:00
Vladimir Kondratiev 972072aa79 wil6210: reset on power good
Configure hardware to perform full reset on "power good". This mean,
reset HW on system boot. This improves card stability.
By default this is off.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:17 -04:00
Vladimir Kondratiev 1712399121 wil6210: sort HW registers definitions
Put all registers in order for easier navigation;
fix naming to reflect hardware cluster

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:17 -04:00
Vladimir Kondratiev f4b5a8032d wil6210: fix for HW bug in interrupt setup logic
Hardware bug triggered by the MSI init while INTx asserted for some reason.
De-assert INTx prior to MSI set-up

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:17 -04:00
Vladimir Kondratiev 98a65b59f8 wil6210: report reset time
Useful to detect hardware problems

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:17 -04:00
Vladimir Kondratiev aa27deaabf wil6210: reduce dmesg pollution after FW crash
When FW crashes, dmesg get polluted with the "FW not ready"
error message. Print it only once per FW lifecycle

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:17 -04:00
Vladimir Kondratiev 36b10a7239 wil6210: update target reset to support new HW
Support for new chip revision. Revision read from the
internal register, PCIE config's "revision id" register
do not indicate HW version properly

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:17 -04:00
Vladimir Kondratiev 2232abd59a wil6210: generalize tx desc mapping
Introduce enum to describe mapping type; allow 'none' in addition to
'single' and 'page'; this is preparation for GSO

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:16 -04:00
Vladimir Kondratiev c236658f14 wil6210: add scatter-gather support
When setting fragmented skb for Tx, assign skb to the last descriptor
and set number of fragments in the 1-st one
On Tx complete, HW sets "DU" bit in Tx descriptor only for the last
descriptor; so search for it using number of fragments field.
Middle descriptors may have "DU" bit not set by the hardware.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:16 -04:00
Vladimir Kondratiev e83eb2fcae wil6210: enable scan while connected
New firmware do support scan while connected. Enable it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:16 -04:00
Vladimir Kondratiev e58c9f7043 wil6210: Block data till "data port open" reported
When connection established, as reported by WMI_CONNECT_EVENTID,
4-way handshaking required for the secure connection is not done
yet. It is indicated by another WMI event. Wait for it and only then
allow data traffic. In case of non-secure connection, FW reports
"data port open" immediately after connection.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:16 -04:00
Vladimir Kondratiev a70abea5f5 wil6210: Helpers to deal with 'cidxtid' fields
Encode/decode helpers

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:16 -04:00
Sujith Manoharan d65b1278e3 ath9k: Fix temperature compensation
The registers for temperature compensation need to
be programmed only for active chains. Use the TX chainmask
to make sure that this is done properly for QCA953x.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:16 -04:00
Sujith Manoharan c90d4f7bc5 ath9k: Disable AR_INTR_SYNC_HOST1_FATAL for QCA953x
Along with AR9340 and AR955x, this is also needed for
the QCA953x SoC.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:15 -04:00
Sujith Manoharan c08148bb75 ath9k: Add QCA953x WMAC platform support
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:15 -04:00
Andrea Merello 7d4b829a93 rtl8180: move eeprom read stuff in a separate function
Eeprom read operations are mixed in the probe function.
Make the code more readable and clean by extracting this code and
moving it in a dedicated function.

The variable eeprom_cck_table_adr, now useless, is here because
it will be needed for rtl8187se support, that I hope to add soon.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:15 -04:00
Andrea Merello 9069af794e rtl8180: make *IFS and CW tunable by mac80211, and set them in the proper place
SLOT, SIFS, DIFS, EIFS, CW and ACK-timeout registers are set in an
RF-code callback and their values are fixed.

This patch moves this off the rf-code, and introduce two new functions
that calculate these values depending by slot time and CW values
requested by mac80211.

This seems to improve performances on my setup.

Currently the ack and slot time values could be stored in a local
variable, but this patch stores it in the driver "priv" structure
because it will be useful for rtl8187se support that will be added
(hopefully) soon.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:15 -04:00
Andrea Merello 516a093019 rtl8180: support for BSS_CHANGED_BASIC_RATES
Basic rates setting is done with hardcoded register write with
fixed settings.

This patch introduces a new function that makes it possible to
configure basic rates and it add a check for mac80211
BSS_CHANGED_BASIC_RATES flag in order to eventually invoke that
function when needed.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:15 -04:00
Andrea Merello bf888184f8 rtl8180: remove too-early-added rtl8187se enum value
While changing board-type variable to enum, I have added enum
value for rtl8187se by mistake.
This will causes gcc warnings with unhandled switch/cases.

Remove it temporarily until I will push also rtl8187se changes.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:15 -04:00
Arend van Spriel 967fe2c82d brcmfmac: remove mode field from brcmf_cfg80211_vif structure
The nl80211 iftype was converted to a mode value and stored in
brcmf_cfg80211_vif structure. The value was used only within
brcmfmac driver to decide execution of conditional code. Better
use wireless_dev::iftype for that as the wdev is contained in
the brcmf_cfg80211_vif structure.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
2014-03-17 13:44:14 -04:00
Arend van Spriel 8a385ba542 brcmfmac: assure active clock request upon entering SLEEP state
When the SDIO driver goes in low power state it must assure that
a clock request in ChipCLKCSR is set. Otherwise waking up the
device can fail. The register is read and if necessary the ALP
clock will be requested.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
2014-03-17 13:44:14 -04:00
Hante Meuleman 63dd99e699 brcmfmac: Improve scanning settings for connect.
When connecting without specifying the channel it can take quite
some time to connect. This is because not all parameters for the
scan operation are set to optimized values. This patch changes
these parameters resulting in a much faster connect in certain
situations.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@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>
2014-03-17 13:44:14 -04:00
Hante Meuleman fed7ec44e7 brcmfmac: Protect tx seq number for data and control
SDIO tx uses a sequence number which is common for data
and control. This requires that access to this sequence number
is protected. A mutex was used to achieve this, but it also
required the reordering of code for tx control.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@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>
2014-03-17 13:44:14 -04:00
Franky Lin a797ca1ead brcmfmac: add BCM4354 SDIO interface support
BCM4354 is an a/b/g/n/ac 2x2 WiFi chip. This patch adds support for it through
SDIO interface.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:44:14 -04:00
John W. Linville 20d83f2464 NFC: 3.15: First pull request
This is the NFC pull request for 3.15. With this one we have:
 
 - Support for ISO 15693 a.k.a. NFC vicinity a.k.a. Type 5 tags. ISO
   15693 are long range (1 - 2 meters) vicinity tags/cards. The kernel
   now supports those through the NFC netlink and digital APIs.
 
 - Support for TI's trf7970a chipset. This chipset relies on the NFC
   digital layer and the driver currently supports type 2, 4A and 5 tags.
 
 - Support for NXP's pn544 secure firmare download. The pn544 C3 chipsets
   relies on a different firmware download protocal than the C2 one. We
   now support both and use the right one depending on the version we
   detect at runtime.
 
 - Support for 4A tags from the NFC digital layer.
 
 - A bunch of cleanups and minor fixes from Axel Lin and Thierry Escande.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTI1oQAAoJEIqAPN1PVmxKmxgP/iiwhQwsehiUZ6oXYjAc06WT
 e+vmJwHuDgbEnr5QDSIdpeaKuxYtCErbFcG4SD5+thTQNEeiRsmTLYdkwZ0FCDF+
 WKU3F59EdUZu4F0GyUXvt8lUC3D96bJSIHMCJdg1YDJtyaJcuITeK7lW325CK4hF
 4ik0+HXcv9mt/Dq4k6xgqdgCOSz7o9dJSbzw5NTCN1I+G6CNgYrvYqSmvsKut2C7
 DQvFu8KhbUkSlXgY61YIA2qpf1hfATkfgLdSsjGJfYdKvWLUAyKbEwoG8dkFA38Y
 yqc49SJ6DJ4FGmSt4Qm2VtRa8HLqwjA30jBEeb7Zog80j7zEBS+th0NJxqDWp/82
 eaeNdfrA5d17CHiR9ODuGOFt3VJZeN83u+JCli3FKGF727A/2Z0UI8UgnB5ZfcbZ
 +5IxV6mQp/h8H4AaQzGQ88x2xibhnrW/XYmTpoxj7CcT3AdbGw/IerZXf+afXBce
 iyJZ+Ktr6d5zFucCbm0QyZDSwAhfYDIYGiM6AIM3oum9n3K31dA0Qxy6saMiiK8c
 ArYY6raQbRCaOBVCI8JI6PoQFvw5MNug40v7Q/G88dElte9mSLsGslVVhCNBpAVB
 Atdwa+I3gwgsea1oqGJo0rSEaWv6PsOeQcFG8boDoQDUvgapzk17bTCz4k2DlXO5
 U0Q/GcJnFEdcDhqVKqP5
 =xikL
 -----END PGP SIGNATURE-----

Merge tag 'nfc-next-3.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next

Samuel Ortiz <sameo@linux.intel.com> says:

"NFC: 3.15: First pull request

This is the NFC pull request for 3.15. With this one we have:

- Support for ISO 15693 a.k.a. NFC vicinity a.k.a. Type 5 tags. ISO
  15693 are long range (1 - 2 meters) vicinity tags/cards. The kernel
  now supports those through the NFC netlink and digital APIs.

- Support for TI's trf7970a chipset. This chipset relies on the NFC
  digital layer and the driver currently supports type 2, 4A and 5 tags.

- Support for NXP's pn544 secure firmare download. The pn544 C3 chipsets
  relies on a different firmware download protocal than the C2 one. We
  now support both and use the right one depending on the version we
  detect at runtime.

- Support for 4A tags from the NFC digital layer.

- A bunch of cleanups and minor fixes from Axel Lin and Thierry Escande."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:16:50 -04:00
Oleksij Rempel 5f667642f4 ath9k_htc: move DEFAULT_SWBA_RESPONSE check to ath9k_htc_beacon_init
... to remove some more dups.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:09 -04:00
Oleksij Rempel 4b2d841f5b ath9k_htc: use ath9k_cmn_beacon_config_ap
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:08 -04:00
Oleksij Rempel 6a77dd33fc ath9k: remove unused ath9k_get_next_tbtt
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:08 -04:00
Oleksij Rempel fa7b52fadb ath9k: move ath9k_beacon_config_ap common
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:08 -04:00
Oleksij Rempel 12f53c308e ath9k_htc: use ath9k_cmn_beacon_config_adhoc
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:08 -04:00
Oleksij Rempel f7197924d5 ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_adhoc
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:08 -04:00
Oleksij Rempel 4a4495a5fd ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_ap
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:08 -04:00
Oleksij Rempel 7f5c4c8320 ath9k_htc: add ath9k_htc_beacon_init (but not use it)
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:07 -04:00
Oleksij Rempel 4c9a1f3260 ath9k: move ath9k_beacon_config_adhoc to common
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:07 -04:00
Oleksij Rempel f84224402b ath9k_htc: use ath9k_cmn_beacon_config_sta
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:07 -04:00
Oleksij Rempel cbbdf2ae2d ath9k: move ath9k_beacon_config_sta to common-beacon
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:07 -04:00
Oleksij Rempel a2030b9dbc ath9k-common: add nexttbtt and intval to ath_beacon_config
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:07 -04:00
Oleksij Rempel c7303263a0 ath9k|ath9k_htc: move IEEE80211_MS_TO_TU to common
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:07 -04:00
Oleksij Rempel df728780d2 ath9k: remove unused beacon_qi
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:06 -04:00
Oleksij Rempel cc24c86f7c ath9k_htc: sync beacon slot code with ath9k
we will need it for common-beacon

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:06 -04:00
Oleksij Rempel ed51fe314f ath9k: remove unused bc_tstamp
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:06 -04:00
Oleksij Rempel c35ccb38d4 ath9k_htc: add ATH_OP_PRIM_STA_VIF
we will need it to make common-beacon code work.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:06 -04:00
Oleksij Rempel 92c3f7ef2c ath9k_htc: use common->op_flags
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:06 -04:00
Oleksij Rempel eefa01ddd5 ath9k: move sc_flags to ath_common
we will need it for ath9k_htc, may be other drivers too

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:06 -04:00
Oleksij Rempel 88a4f56ef0 ath9k_htc: use ath_beacon_conf.enable_beacon
to reduce difference between ath9k and ath9k_htc

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:05 -04:00
Oleksij Rempel a099874ed9 ath9k_htc: move beaconq to struct htc_beacon
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17 13:13:05 -04:00