GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
10 years agoMAINTAINERS: orphan rtl8180
John W. Linville [Thu, 4 Dec 2014 21:52:41 +0000 (16:52 -0500)]
MAINTAINERS: orphan rtl8180

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: add multiple BSS support.
Hante Meuleman [Wed, 3 Dec 2014 20:05:33 +0000 (21:05 +0100)]
brcmfmac: add multiple BSS support.

This patch adds support for multiple BSS interfaces (AP). In
total three AP configurations can be created. In order to use
multiple BSS firmware needs to support it.

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>
10 years agobrcmfmac: Add ifidx to logging of fwil cmds.
Hante Meuleman [Wed, 3 Dec 2014 20:05:32 +0000 (21:05 +0100)]
brcmfmac: Add ifidx to logging of fwil cmds.

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>
10 years agobrcmfmac: Fix vendor cmds used interface.
Hante Meuleman [Wed, 3 Dec 2014 20:05:31 +0000 (21:05 +0100)]
brcmfmac: Fix vendor cmds used interface.

The vendor specific commands was always using main interface,
change this to use the by caller supplied interface.

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>
10 years agobrcmfmac: switch to single message MSI
Franky Lin [Wed, 3 Dec 2014 20:05:30 +0000 (21:05 +0100)]
brcmfmac: switch to single message MSI

Use single message MSI to replace legacy interrupt.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
10 years agobrcmfmac: Add PCIE ids for 43602 devices.
Hante Meuleman [Wed, 3 Dec 2014 20:05:29 +0000 (21:05 +0100)]
brcmfmac: Add PCIE ids for 43602 devices.

Some 43602 devices are band specific and identify themselves
with different PCIE device ID. This patch adds support for the
43602 2.4G and 5.0G devices used in for example R8000 router.

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>
10 years agobrcmfmac: Fix ifidx for rx data by msgbuf.
Hante Meuleman [Wed, 3 Dec 2014 20:05:28 +0000 (21:05 +0100)]
brcmfmac: Fix ifidx for rx data by msgbuf.

The ifidx provided by FW needs to be offsetted when receiving data
packets.

Cc: stable@vger.kernel.org # v3.17, v3.18
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>
10 years agobrcmfmac: Fix bitmap malloc bug in msgbuf.
Hante Meuleman [Wed, 3 Dec 2014 20:05:27 +0000 (21:05 +0100)]
brcmfmac: Fix bitmap malloc bug in msgbuf.

Cc: stable@vger.kernel.org # v3.17, v3.18
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>
10 years agoSSB / B44: fix WOL for BCM4401
Andrey Skvortsov [Thu, 4 Dec 2014 16:32:46 +0000 (11:32 -0500)]
SSB / B44: fix WOL for BCM4401

Wake On Lan was not working on laptop DELL Vostro 1500.
If WOL was turned on, BCM4401 was powered up in suspend mode. LEDs blinked.
But the laptop could not be woken up with the Magic Packet. The reason for
that was that PCIE was not enabled as a system wakeup source and
therefore the host PCI bridge was not powered up in suspend mode.
PCIE was not enabled in suspend by PM because no child devices were
registered as wakeup source during suspend process.
On laptop BCM4401 is connected through the SSB bus, that is connected to the
PCI-Express bus. SSB and B44 did not use standard PM wakeup functions
and did not forward wakeup settings to their parents.
To fix that B44 driver enables PM wakeup and registers new wakeup source
using device_set_wakeup_enable(). Wakeup is automatically reported to the parent SSB
bus via power.wakeup_path. SSB bus enables wakeup for the parent PCI bridge, if there is any
child devices with enabled wakeup functionality. All other steps are
done by PM core code.

Signed-off-by: Andrey Skvortsov <Andrej.Skvortzov@gmail.com>
Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
John W. Linville [Thu, 4 Dec 2014 16:29:10 +0000 (11:29 -0500)]
Merge git://git./linux/kernel/git/jberg/mac80211-next

Johannes Berg <johannes@sipsolutions.net> says:

"This time I have Felix's no-status rate control work, which will allow
drivers to work better with rate control even if they don't have perfect
status reporting. In addition to this, a small hwsim fix from Patrik,
one of the regulatory patches from Arik, and a number of cleanups and
fixes I did myself.

Of note is a patch where I disable CFG80211_WEXT so that compatibility
is no longer selectable - this is intended as a wake-up call for anyone
who's still using it, and is still easily worked around (it's a one-line
patch) before we fully remove the code as well in the future."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge tag 'nfc-next-3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Thu, 4 Dec 2014 16:27:40 +0000 (11:27 -0500)]
Merge tag 'nfc-next-3.19-1' of git://git./linux/kernel/git/sameo/nfc-next

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

"NFC: 3.19 pull request

This is the NFC pull request for 3.19.

With this one we get:

- NFC digital improvements for DEP support: Chaining, NACK and ATN
  support added.

- NCI improvements: Support for p2p target, SE IO operand addition,
  SE operands extensions to support proprietary implementations, and
  a few fixes.

- NFC HCI improvements: OPEN_PIPE and NOTIFY_ALL_CLEARED support,
  and SE IO operand addition.

- A bunch of minor improvements and fixes for STMicro st21nfcb and
  st21nfca"

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoNFC: NCI: Fix max length of General Bytes in ATR_RES
Julien Lefrique [Tue, 2 Dec 2014 15:25:01 +0000 (16:25 +0100)]
NFC: NCI: Fix max length of General Bytes in ATR_RES

The maximum size of ATR_REQ and ATR_RES is 64 bytes.
The maximum number of General Bytes is calculated by
the maximum number of data bytes in the ATR_REQ/ATR_RES,
substracted by the number of mandatory data bytes.

ATR_REQ: 16 mandatory data bytes, giving a maximum of
48 General Bytes.
ATR_RES: 17 mandatory data bytes, giving a maximum of
47 General Bytes.

Regression introduced in commit a99903ec.

Signed-off-by: Julien Lefrique <lefrique@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Fix warning: cast to restricted __le16
Christophe Ricard [Tue, 2 Dec 2014 20:27:58 +0000 (21:27 +0100)]
NFC: nci: Fix warning: cast to restricted __le16

Fixing: net/nfc/nci/ntf.c:106:31: warning: cast to restricted __le16
message when building with make C=1 CF=-D__CHECK_ENDIAN__

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: Fix warning "warning: incorrect type in assignment"
Christophe Ricard [Tue, 2 Dec 2014 20:27:57 +0000 (21:27 +0100)]
NFC: Fix warning "warning: incorrect type in assignment"

Fix warnings:
net/nfc/llcp_commands.c:421:14: warning: incorrect type in assignment (different base types)
net/nfc/llcp_commands.c:421:14:    expected unsigned short [unsigned] [usertype] miux
net/nfc/llcp_commands.c:421:14:    got restricted __be16
net/nfc/llcp_commands.c:477:14: warning: incorrect type in assignment (different base types)
net/nfc/llcp_commands.c:477:14:    expected unsigned short [unsigned] [usertype] miux
net/nfc/llcp_commands.c:477:14:    got restricted __be16

Procedure to reproduce:
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: Fix reported error
Christophe Ricard [Tue, 2 Dec 2014 20:27:56 +0000 (21:27 +0100)]
NFC: st21nfcb: Fix reported error

Report error returned by devm_gpio_request_one instead of -ENODEV.

Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: Report error returned by functions instead of -ENODEV
Christophe Ricard [Tue, 2 Dec 2014 20:27:55 +0000 (21:27 +0100)]
NFC: st21nfca: Report error returned by functions instead of -ENODEV

Report error returned by devm_gpio_request_one or
st21nfca_hci_platform_init instead of -ENODEV.

Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: hci: Add specific hci macro to not create a pipe
Christophe Ricard [Tue, 2 Dec 2014 20:27:52 +0000 (21:27 +0100)]
NFC: hci: Add specific hci macro to not create a pipe

Some pipe are only created by other host (different than the
Terminal Host).
The pipe values will for example be notified by
NFC_HCI_ADM_NOTIFY_PIPE_CREATED.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: Add se_io NFC operand
Christophe Ricard [Tue, 2 Dec 2014 20:27:51 +0000 (21:27 +0100)]
NFC: Add se_io NFC operand

se_io allows to send apdu over the CLF to the embedded
Secure Element.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: netlink: Add new netlink command NFC_CMD_ACTIVATE_TARGET
Christophe Ricard [Tue, 2 Dec 2014 20:27:50 +0000 (21:27 +0100)]
NFC: netlink: Add new netlink command NFC_CMD_ACTIVATE_TARGET

Some tag might get deactivated after some read or write tentative.
This may happen for example with Mifare Ultralight C tag when trying
to read the last 4 blocks (starting block 0x2c) configured as write
only.
NFC_CMD_ACTIVATE_TARGET will try to reselect the tag in order to
detect if it got remove from the field or if it is still present.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Add support for different NCI_DEACTIVATE_TYPE
Christophe Ricard [Tue, 2 Dec 2014 20:27:49 +0000 (21:27 +0100)]
NFC: nci: Add support for different NCI_DEACTIVATE_TYPE

nci_rf_deactivate_req only support NCI_DEACTIVATE_TYPE_IDLE_MODE.
In some situation, it might be necessary to be able to support other
NCI_DEACTIVATE_TYPE such as NCI_DEACTIVATE_TYPE_SLEEP_MODE in order for
example to reactivate the selected target.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Add management for NCI state for machine rf_deactivate_ntf
Christophe Ricard [Tue, 2 Dec 2014 20:27:48 +0000 (21:27 +0100)]
NFC: nci: Add management for NCI state for machine rf_deactivate_ntf

A notification for rf deaction can be IDLE_MODE, SLEEP_MODE,
SLEEP_AF_MODE and DISCOVERY. According to each type and the NCI
state machine is different (see figure 10 RF Communication State
Machine in NCI specification)

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Add status byte management in case of error.
Christophe Ricard [Tue, 2 Dec 2014 20:27:47 +0000 (21:27 +0100)]
NFC: nci: Add status byte management in case of error.

The nci status byte was ignored. In case of tag reading for example,
if the tag is removed from the antenna there is no way for the upper
layers (aka: stack) to get inform about such event.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: Remove useless pr_info
Christophe Ricard [Tue, 2 Dec 2014 20:27:46 +0000 (21:27 +0100)]
NFC: st21nfcb: Remove useless pr_info

- pr_info in st21nfcb_nci_i2c_disable is not necessary

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoMerge tag 'iwlwifi-next-for-john-2014-12-02' of git://git.kernel.org/pub/scm/linux...
John W. Linville [Tue, 2 Dec 2014 19:50:31 +0000 (14:50 -0500)]
Merge tag 'iwlwifi-next-for-john-2014-12-02' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com> says:

"I deprecate here -8.ucode since -9 has been published long ago.
Along with that I have a new activity, we have now better
infrastructure for firmware debugging. This will allow to
have configurable probes insides the firmware.
Luca continues his work on NetDetect, this feature is now
complete. All the rest is minor fixes here and there."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlwifi: mvm: Ability to work with packed usniffer image
Eran Harary [Mon, 1 Dec 2014 15:40:37 +0000 (17:40 +0200)]
iwlwifi: mvm: Ability to work with packed usniffer image

The new ucode package format holds also the usniffer images
(in addition to the operational images and the TLVs).
The driver can load the usniffer image if debug
configuration tells it to.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: support more monitor types dumping
Liad Kaufman [Mon, 17 Nov 2014 09:44:03 +0000 (11:44 +0200)]
iwlwifi: pcie: support more monitor types dumping

Until this patch, dumping the monitor data could be done only
for PCIe external (DRAM) mode in 7000 HW family. This patch
allows to pull the monitor data also on other families, and
also to pull the monitor data if an internal buffer is used.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: config regs according to fw tlv
Liad Kaufman [Mon, 17 Nov 2014 09:41:07 +0000 (11:41 +0200)]
iwlwifi: pcie: config regs according to fw tlv

Sometimes there is a need to configure some registers for
setting some FW properties, such as the FW monitor mode
(internal/external). This patch supports setting this for
PCIe mode.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: send dbg config hcmds to fw if set in tlv
Liad Kaufman [Mon, 17 Nov 2014 09:36:21 +0000 (11:36 +0200)]
iwlwifi: mvm: send dbg config hcmds to fw if set in tlv

Send all debug-configuration HCMDs that are set in the TLVs
to the FW. This may include HCMDs to configure the FW
monitor and FW log level, for example.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: define the .ucode file format for debug
Liad Kaufman [Tue, 16 Sep 2014 12:06:54 +0000 (15:06 +0300)]
iwlwifi: define the .ucode file format for debug

Debug information can be appended to the firmware file. This
information will be used by the driver to enable / disable
debugging features in the firmware.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: update values for Smart Fifo
Emmanuel Grumbach [Mon, 1 Dec 2014 14:44:09 +0000 (16:44 +0200)]
iwlwifi: mvm: update values for Smart Fifo

Interoperability issues were identified and root caused to
the Smart Fifo watermarks. These issues arose with
NetGear R7000. Fix this.

Cc: <stable@vger.kernel.org> [3.14+]
Fixes: 1f3b0ff8ecce ("iwlwifi: mvm: Add Smart FIFO support")
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: dvm: fix flush support for old firmware
Emmanuel Grumbach [Mon, 1 Dec 2014 07:34:13 +0000 (09:34 +0200)]
iwlwifi: dvm: fix flush support for old firmware

Since the commit below, iwldvm sends the FLUSH command to
the firmware. All the devices that use iwldvm have a
firmware that expects the _v3 version of this command,
besides 5150.
5150's latest available firmware still expects a _v2 version
of the FLUSH command.
This means that since the commit below, we had a mismatch for
this specific device only.
This mismatch led to the NMI below:

Loaded firmware version: 8.24.2.2
Start IWL Error Log Dump:
Status: 0x0000004C, count: 5
0x00000004 | NMI_INTERRUPT_WDG
0x000006F4 | uPc
0x000005BA | branchlink1
0x000006F8 | branchlink2
0x000008C2 | interruptlink1
0x00005B02 | interruptlink2
0x00000002 | data1
0x07030000 | data2
0x00000068 | line
0x3E80510C | beacon time
0x728A0EF4 | tsf low
0x0000002A | tsf hi
0x00000000 | time gp1
0x01BDC977 | time gp2
0x00000000 | time gp3
0x00010818 | uCode version
0x00000000 | hw version
0x00484704 | board version
0x00000002 | hcmd
0x2FF23080 | isr0
0x0103E000 | isr1
0x0000001A | isr2
0x1443FCC3 | isr3
0x11800112 | isr4
0x00000068 | isr_pref
0x000000D4 | wait_event
0x00000000 | l2p_control
0x00000007 | l2p_duration
0x00103040 | l2p_mhvalid
0x00000007 | l2p_addr_match
0x00000000 | lmpm_pmg_sel
0x00000000 | timestamp
0x00000200 | flow_handler

This was reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=88961

Cc: <stable@vger.kernel.org>
Fixes: a0855054e59b ("iwlwifi: dvm: drop non VO frames when flushing")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: use correct fw file in 8000 b-step
Liad Kaufman [Thu, 30 Oct 2014 12:27:13 +0000 (14:27 +0200)]
iwlwifi: use correct fw file in 8000 b-step

In 8000 B-step the FW file has changed, but by the time we
know the HW step, the FW file is already requested.

This patch defaults 8000 family to B-step if no HW step is
detected in time. When it can it checks what HW step it
really is (in 8000 family) and if it isn't B-step, the FW
file is released and the A-step file is requested.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: fix 4165 series name
Oren Givon [Mon, 1 Dec 2014 09:40:46 +0000 (11:40 +0200)]
iwlwifi: fix 4165 series name

Fix the 4165 series name that was called 4265 by mistake.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoNFC: hci: Add support for NOTIFY_ALL_PIPE_CLEARED
Christophe Ricard [Wed, 12 Nov 2014 23:30:43 +0000 (00:30 +0100)]
NFC: hci: Add support for NOTIFY_ALL_PIPE_CLEARED

When switching from UICC to another, the CLF may signals to the Terminal
Host that some existing pipe are cleared for future update.

This notification needs to be "acked" by the Terminal Host with a ANY_OK
message.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: hci: Add open pipe command handler
Christophe Ricard [Wed, 12 Nov 2014 23:30:42 +0000 (00:30 +0100)]
NFC: hci: Add open pipe command handler

If our terminal connect with other host like UICC, it may create
a pipe with us, the host controller will notify us new pipe
created, after that UICC will open that pipe, if we don't handle
that request, UICC may failed to continue initialize which may
lead to card emulation feature failed to work

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: Improve ndlc comment
Christophe Ricard [Wed, 12 Nov 2014 23:30:40 +0000 (00:30 +0100)]
NFC: st21nfcb: Improve ndlc comment

In ndlc_probe function we initialize timers. They are not started.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: Rework st21nfca_hci_event_received to route event to relevent gate.
Christophe Ricard [Wed, 12 Nov 2014 23:30:39 +0000 (00:30 +0100)]
NFC: st21nfca: Rework st21nfca_hci_event_received to route event to relevent gate.

As many event with the same id can come from several gates,
it will be easier to manage each of them by gate.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Add se_io NCI operand
Christophe Ricard [Wed, 12 Nov 2014 23:30:38 +0000 (00:30 +0100)]
NFC: nci: Add se_io NCI operand

se_io allows to send apdu over the CLF to the embedded Secure Element.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Update nci_disable_se to run proprietary commands to disable a secure element
Christophe Ricard [Wed, 12 Nov 2014 23:30:37 +0000 (00:30 +0100)]
NFC: nci: Update nci_disable_se to run proprietary commands to disable a secure element

Some NFC controller using NCI protocols may need a proprietary commands
flow to disable a secure element

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Update nci_enable_se to run proprietary commands to enable a secure element
Christophe Ricard [Wed, 12 Nov 2014 23:30:36 +0000 (00:30 +0100)]
NFC: nci: Update nci_enable_se to run proprietary commands to enable a secure element

Some NFC controller using NCI protocols may need a proprietary commands
flow to enable a secure element

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Update nci_discover_se to run proprietary commands to discover all availabl...
Christophe Ricard [Wed, 12 Nov 2014 23:30:35 +0000 (00:30 +0100)]
NFC: nci: Update nci_discover_se to run proprietary commands to discover all available secure element

Some NFC controller using NCI protocols may need a proprietary commands
flow to discover all available secure element

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: nci: Fix sparse: symbol 'nci_get_prop_rf_protocol' was not declared.
Christophe Ricard [Wed, 12 Nov 2014 23:30:32 +0000 (00:30 +0100)]
NFC: nci: Fix sparse: symbol 'nci_get_prop_rf_protocol' was not declared.

Fix sparse warning introduced by commit: 9e87f9a9c4c4754508b2c2638fbde9e10c7a103b

It was generating the following warning:
net/nfc/nci/ntf.c:170:7: sparse: symbol 'nci_get_prop_rf_protocol' was not declared. Should it be static?

Procedure to reproduce it:
# apt-get install sparse
  git checkout 9e87f9a9c4c4754508b2c2638fbde9e10c7a103b
  make ARCH=x86_64 allmodconfig
  make C=1 CF=-D__CHECK_ENDIAN__

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: hci: Add se_io HCI operand
Christophe Ricard [Wed, 12 Nov 2014 23:30:34 +0000 (00:30 +0100)]
NFC: hci: Add se_io HCI operand

se_io allows to send apdu over the CLF to the embedded Secure Element.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: Remove gpio_irq field in static and dts configuration
Christophe Ricard [Wed, 12 Nov 2014 23:30:26 +0000 (00:30 +0100)]
NFC: st21nfcb: Remove gpio_irq field in static and dts configuration

- phy->gpio_irq is never done out of the request resources.
- irq_of_parse_and_map is already done in the i2c core so client->irq is
already set when entering in st21nfcb_hci_i2c_of_request_resources
- In case of static platform configuration client->irq can be set directly.
- It simplifies the code a bit.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: Add of_st21nfcb_i2c_match to MODULE_DEVICE_TABLE
Christophe Ricard [Wed, 12 Nov 2014 23:30:25 +0000 (00:30 +0100)]
NFC: st21nfcb: Add of_st21nfcb_i2c_match to MODULE_DEVICE_TABLE

When CONFIG_OF is define add of_st21nfcb_i2c_match to
MODULE_DEVICE_TABLE

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: Remove gpio_irq field in static and dts configuration
Christophe Ricard [Wed, 12 Nov 2014 23:30:23 +0000 (00:30 +0100)]
NFC: st21nfca: Remove gpio_irq field in static and dts configuration

- phy->gpio_irq is never done out of the request resources.
- irq_of_parse_and_map is already done in the i2c core so client->irq is
already set when entering in st21nfca_hci_i2c_of_request_resources
- In case of static platform configuration client->irq can be set directly
- It simplifies the code a bit.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: Add of_st21nfca_i2c_match to MODULE_DEVICE_TABLE
Christophe Ricard [Wed, 12 Nov 2014 23:30:22 +0000 (00:30 +0100)]
NFC: st21nfca: Add of_st21nfca_i2c_match to MODULE_DEVICE_TABLE

When CONFIG_OF is define add of_st21nfca_i2c_match to
MODULE_DEVICE_TABLE.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agowil6210: remove TODO wrt buffer alignment
Vladimir Kondratiev [Mon, 1 Dec 2014 13:36:53 +0000 (15:36 +0200)]
wil6210: remove TODO wrt buffer alignment

Hardware doesn't place any restrictions on the buffer alignment,
consider this TODO resolved.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: reset flow update
Vladimir Kondratiev [Mon, 1 Dec 2014 13:36:31 +0000 (15:36 +0200)]
wil6210: reset flow update

If card reset with firmware download executed, followed by reset
with use of firmware from build in flash, firmware download indication
remains in the hardware register.
When running firmware download flow,
the SW download indication is written by the driver to bit 0 in usage_6:
wil_fw_load(), "S(RGF_USER_USAGE_6, 1);"
This register, like all USER RGF, wasn't reset in SW reset flow.
Therefore the driver must clear it on SW reset flow.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Rate limit "ring full" error message
Vladimir Kondratiev [Mon, 1 Dec 2014 13:36:03 +0000 (15:36 +0200)]
wil6210: Rate limit "ring full" error message

In the wil_tx_ring, error message printed when tx attempted
while vring has no space to accommodate all fragments of frame.
Normally, such situation handled by stopping tx queue.
But, if tx queue is by-passed (like pktgen does), this error
will be triggered at high rate and dmesg will be flooded with
this message. Whole system may become unstable and hang with
no possible recover except power cycle.

Rate-limit it to prevent dmesg flooding.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix warning in pointer arithmetic
Vladimir Kondratiev [Mon, 1 Dec 2014 13:35:27 +0000 (15:35 +0200)]
wil6210: fix warning in pointer arithmetic

In some compilation environments, result of pointer arithmetic interpreted as int
while in others it is long int. Force conversion to long.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: configurable vring sizes
Vladimir Kondratiev [Mon, 1 Dec 2014 13:35:02 +0000 (15:35 +0200)]
wil6210: configurable vring sizes

Allow to configure VRING size for both Rx and Tx via module parameters:
rx_ring_order and tx_ring_order. Parameters are ring size orders, i.e.
ring size calculated as 1 << order.
Defaults for both Tx and Rx are order 9, i.e. size 512

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: remove wil_to_pcie_dev()
Vladimir Kondratiev [Mon, 1 Dec 2014 13:33:18 +0000 (15:33 +0200)]
wil6210: remove wil_to_pcie_dev()

There is no need to obtain physical device through
wil->pdev->dev path, as it is done by this macro.
The same device already stored as wiphy's device, thus
wil_to_dev() returns the same device as wil_to_pcie_dev()

Remove unnecessary macros, this allows to drop dependency
by pci.h in the firmware download code.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix recovery after scan timeout
Vladimir Kondratiev [Mon, 1 Dec 2014 13:33:17 +0000 (15:33 +0200)]
wil6210: fix recovery after scan timeout

Scan timeout treated as indication for firmware error;
and should be handled in the same way.

Recovery state machine does not perform as designed because
its state is not updated in case of scan timeout.

Fix is to set recovery state machine into the proper state.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: add handling of RX HTRSH interrupt
Vladimir Kondratiev [Mon, 1 Dec 2014 13:33:16 +0000 (15:33 +0200)]
wil6210: add handling of RX HTRSH interrupt

RX_HTRSH interrupt is handled in exactly the same manner
as RX_DONE interrupt - fetching accumulated packets from RX
ring. In addition there's a rate limitted warning message.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: propagate disconnect reason
Vladimir Kondratiev [Mon, 1 Dec 2014 13:33:15 +0000 (15:33 +0200)]
wil6210: propagate disconnect reason

Propagate reason for the disconnect through the relevant call chains:
- report to cfg80211 reason as reported by the firmware
- provide to the firmware reason as requested by cfg80211

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: do not access hardware on IRQs during reset
Felix Fietkau [Sun, 30 Nov 2014 20:58:32 +0000 (21:58 +0100)]
ath9k: do not access hardware on IRQs during reset

Instead of killing interrupts during reset when the first one happens,
kill them before issuing the reset.
This fixes an easy to reproduce crash with multiple cards sharing the
same IRQ.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: set ATH_OP_INVALID before disabling hardware
Felix Fietkau [Sun, 30 Nov 2014 20:58:31 +0000 (21:58 +0100)]
ath9k: set ATH_OP_INVALID before disabling hardware

Closes another small IRQ handler race

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: prevent early IRQs from accessing hardware
Felix Fietkau [Sun, 30 Nov 2014 20:58:30 +0000 (21:58 +0100)]
ath9k: prevent early IRQs from accessing hardware

IRQs are suppressed if ah == NULL and ATH_OP_INVALID being set in
common->op_flags. Close a short time window between those two.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath5k: fix hardware queue index assignment
Felix Fietkau [Sun, 30 Nov 2014 20:52:57 +0000 (21:52 +0100)]
ath5k: fix hardware queue index assignment

Like with ath9k, ath5k queues also need to be ordered by priority.
queue_info->tqi_subtype already contains the correct index, so use it
instead of relying on the order of ath5k_hw_setup_tx_queue calls.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: fix BE/BK queue order
Felix Fietkau [Sun, 30 Nov 2014 19:38:41 +0000 (20:38 +0100)]
ath9k: fix BE/BK queue order

Hardware queues are ordered by priority. Use queue index 0 for BK, which
has lower priority than BE.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: fix hardware queue allocation
Felix Fietkau [Sun, 30 Nov 2014 19:38:40 +0000 (20:38 +0100)]
ath9k_hw: fix hardware queue allocation

The driver passes the desired hardware queue index for a WMM data queue
in qinfo->tqi_subtype. This was ignored in ath9k_hw_setuptxqueue, which
instead relied on the order in which the function is called.

Cc: stable@vger.kernel.org
Reported-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmsmac: NULL dereferences in brcms_c_detach_mfree()
Dan Carpenter [Fri, 28 Nov 2014 09:43:40 +0000 (12:43 +0300)]
brcmsmac: NULL dereferences in brcms_c_detach_mfree()

The brcms_c_attach_malloc() function can call this with a NULL
"wlc->corestate" or "wlc->hw".

Also I threw in a bonus cleanup by deleting an obvious comment and a
no-op NULL assignment.  :)

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoRevert "rt2x00: Endless loop on hub port power down"
Stanislaw Gruszka [Wed, 26 Nov 2014 14:29:16 +0000 (15:29 +0100)]
Revert "rt2x00: Endless loop on hub port power down"

This reverts commit 2ad69ac5976191e9bb7dc4044204a504653ad1bb. It
causes wireless device disappear when we get -EPROTO error form USB
request. I encounter such situation occasionally when resume form
suspend with RT3070 adapter:

[  289.619985] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0404 with error -71
[  289.639368] ieee80211 phy0: rt2800_wait_bbp_ready: Error - BBP register access failed, aborting
[  289.639374] ieee80211 phy0: rt2800usb_set_device_state: Error - Device failed to enter state 4 (-5)

Without the patch, except printing error, device works just fine after
resume.

Currently after timeouts and REGISTER_BUSY_COUNT tuning, we should
not have any "endless loop", though we can wait quite long when driver
is trying to communicate with the device through non functioning USB
connection. Generally the problem that commit 2ad69ac597619 solves
is kinda artificial.

Cc: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: change REGISTER_TIMEOUT
Stanislaw Gruszka [Wed, 26 Nov 2014 14:29:15 +0000 (15:29 +0100)]
rt2x00: change REGISTER_TIMEOUT

Waiting 500ms for register access is too long, decrease this value
to 100ms.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: change REGISTER_BUSY_COUNT for USB
Stanislaw Gruszka [Wed, 26 Nov 2014 14:29:14 +0000 (15:29 +0100)]
rt2x00: change REGISTER_BUSY_COUNT for USB

Because of delays on USB we do not have to iterate so many times on
USB hardware when waiting for H/W register become valid.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: use timeout in rt2x00usb_vendor_request
Stanislaw Gruszka [Wed, 26 Nov 2014 14:29:13 +0000 (15:29 +0100)]
rt2x00: use timeout in rt2x00usb_vendor_request

Use provided timeout value in rt2x00usb_vendor_request() instead
of iterating REGISTER_BUSY_COUNT times.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmsmac: extend hardware info shown in debugfs
Arend van Spriel [Tue, 25 Nov 2014 19:55:54 +0000 (20:55 +0100)]
brcmsmac: extend hardware info shown in debugfs

The hardware info now also include radio and phy information, which
can be helpful in debugging issues.

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>
10 years agobrcmutil: add helper function to format board revision
Arend van Spriel [Tue, 25 Nov 2014 19:55:53 +0000 (20:55 +0100)]
brcmutil: add helper function to format board revision

The board revision that is available in hardware can be translated
so it matches the labelling on the board. This is accomplished by
this helper 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>
10 years agort2800: calculate tx power temperature compensation on selected chips
Stanislaw Gruszka [Tue, 25 Nov 2014 14:17:29 +0000 (15:17 +0100)]
rt2800: calculate tx power temperature compensation on selected chips

Currently implemented temperature compensation is only valid on some of
supported chips. Other chips do not need temperature compensation or
need different way to do this (not yet implemented in the rt2800
driver). Trying to do run rt2800_get_gain_calibration_delta() when this
is not appropriate on particular chip gives bogus result of TX power
and can make connection unstable.

This is follow up to commit 8c8d2017ba25c510ddf093419048460db1109bc4
"rt2800: fix RT5390 & RT3290 TX power settings regression". On that
commit we avoid setting BBP_R1 register, but the real problem is wrong
temperature compensation calculation.

Reported-and-tested-by: Ronald Wahl <ronald.wahl@raritan.com>
Debugged-by: Ronald Wahl <ronald.wahl@raritan.com>
Cc: Mike Romberg <mike-romberg@comcast.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Fix potential memory leaks on error paths
Lino Sanfilippo [Fri, 28 Nov 2014 01:47:19 +0000 (02:47 +0100)]
wil6210: Fix potential memory leaks on error paths

Fix missing memory deallocation on error paths in wil_write_file_wmi()
and wil_write_file_txmgmt().

Reported-by: Ahmed Tamrawi <ahmedtamrawi@gmail.com>
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath
John W. Linville [Mon, 1 Dec 2014 20:51:31 +0000 (15:51 -0500)]
Merge branch 'for-linville' of git://github.com/kvalo/ath

10 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Mon, 1 Dec 2014 20:49:58 +0000 (15:49 -0500)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

10 years agoiwlwifi: pcie: add fh registers to dump data
Liad Kaufman [Sun, 23 Nov 2014 11:56:21 +0000 (13:56 +0200)]
iwlwifi: pcie: add fh registers to dump data

Adds all FH registers between FH_MEM_UPPER_BOUND and
FH_MEM_LOWER_BOUND (which should be readable to the driver)
to the dump data when it is collected.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: support ucode load for family_8000 B0 only
Eran Harary [Sun, 19 Oct 2014 10:20:14 +0000 (12:20 +0200)]
iwlwifi: mvm: support ucode load for family_8000 B0 only

The ucode load flow changed for B0 hardware step.
Change the code accordingly.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: remove a dangling line of documentation
David Spinadel [Sun, 30 Nov 2014 14:47:13 +0000 (16:47 +0200)]
iwlwifi: mvm: remove a dangling line of documentation

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: claim ownership on the device after stop_device()
Emmanuel Grumbach [Sun, 30 Nov 2014 15:06:11 +0000 (17:06 +0200)]
iwlwifi: pcie: claim ownership on the device after stop_device()

Not doing so would allow other possible users of the device
to take ownership and prevent normal WiFi operation.

This fixes the second part of:
https://bugzilla.kernel.org/show_bug.cgi?id=87191

Reviewed-by: Moshe Harel <moshe.harel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: don't load on 7265D with old NVM
Emmanuel Grumbach [Thu, 27 Nov 2014 13:38:57 +0000 (15:38 +0200)]
iwlwifi: don't load on 7265D with old NVM

7265D are new devices that should always have a new NVM
(at least 0x0c11). The firmware has issues with older
versions of the NVM which are not and will not be available
to the common mortals.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: support NVM file with header
Idan Kahlon [Thu, 13 Nov 2014 13:47:20 +0000 (15:47 +0200)]
iwlwifi: mvm: support NVM file with header

Handle NVM file header. When NVM header detected, skip
the header and reading only the sections data.

Signed-off-by: Idan Kahlon <idanx.kahlon@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: add channel information to the netdetect notifications
Luciano Coelho [Fri, 21 Nov 2014 20:08:01 +0000 (22:08 +0200)]
iwlwifi: mvm: add channel information to the netdetect notifications

Add the channels on which there was a match for every match reported
by the firmware.  The firmware reports the channels as indices to the
array of channels that was passed in the scheduled scan request, so we
need to save the array when entering D3 to make sure it is available
when we resume.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: add SSID match information for net-detect
Luciano Coelho [Fri, 21 Nov 2014 07:32:23 +0000 (09:32 +0200)]
iwlwifi: mvm: add SSID match information for net-detect

Add SSID information to the net-detect indication to userspace.  Fetch
the matched profiles from the firmware in order to find the correct
SSIDs in the profiles that matched.

Since the net-detect information is stored in cfg80211, and in theory
it could change while we are waking up and reading the matched
profiles, we need to save it when we enter D3 so it is available
during resume.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: refactor cmd_in_flight set/clear code
Eliad Peller [Thu, 20 Nov 2014 12:36:26 +0000 (14:36 +0200)]
iwlwifi: pcie: refactor cmd_in_flight set/clear code

A following patche will use trans_pcie->cmd_in_flight
for reference accounting as well. get ready for it.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: add missing mvm ref debug print
Eliad Peller [Tue, 25 Nov 2014 10:34:45 +0000 (12:34 +0200)]
iwlwifi: mvm: add missing mvm ref debug print

IWL_MVM_REF_PROTECT_CSA is missing from the ref strings
used by debugfs.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - change the MPLUT registers' value
Emmanuel Grumbach [Tue, 25 Nov 2014 11:27:01 +0000 (13:27 +0200)]
iwlwifi: mvm: BT Coex - change the MPLUT registers' value

This impacts the partition between BT and Wifi.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_CSA_FLOW
Emmanuel Grumbach [Mon, 24 Nov 2014 06:53:33 +0000 (08:53 +0200)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_CSA_FLOW

All the supported firmwares have this TLV flag set.

Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID
Emmanuel Grumbach [Mon, 24 Nov 2014 07:06:57 +0000 (09:06 +0200)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID

All the supported firmwares have this TLV flag set.

Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_CAPA_EXTENDED_BEACON
Emmanuel Grumbach [Mon, 24 Nov 2014 06:51:46 +0000 (08:51 +0200)]
iwlwifi: mvm: remove IWL_UCODE_TLV_CAPA_EXTENDED_BEACON

This TLV flag is set for all the supported firmwares.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: deprecate -8.ucode for 3160 / 7260 / 7265
Emmanuel Grumbach [Mon, 24 Nov 2014 06:50:14 +0000 (08:50 +0200)]
iwlwifi: deprecate -8.ucode for 3160 / 7260 / 7265

This firmware is not supported anymore.
Stop loading this firmware - and remove the code that
handled older versions.

Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: check and report if wake up was due to net detect
Luciano Coelho [Thu, 20 Nov 2014 13:58:34 +0000 (15:58 +0200)]
iwlwifi: mvm: check and report if wake up was due to net detect

Query the firmware for scan offload matches when waking up in order to
report net detect as the reason for the wake up.

This requires a new command API to be implemented.  Additionally,
remove some net detect command entries that are not valid anymore.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: move firmware file format definitions to correct header
Johannes Berg [Wed, 19 Nov 2014 09:09:00 +0000 (10:09 +0100)]
iwlwifi: move firmware file format definitions to correct header

The firmware file-format is described in iwl-fw-file.h, while the
internal handling structures and functions are in iwl-fw.h.

Fix the separation between the files by moving file format
definitions to iwl-fw-file.h.

Also add a missing description for a kernel-doc member, and it's
not needed to include iwl-fw-file.h again from the code (thanks
to Liad Kaufman).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoath10k: simplify rx ring size/fill calculation
Michal Kazior [Thu, 27 Nov 2014 10:12:43 +0000 (11:12 +0100)]
ath10k: simplify rx ring size/fill calculation

Don't bother with fancy arithmetic and just
hardcode the final values.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: prevent pci tx/rx starvation
Michal Kazior [Thu, 27 Nov 2014 10:09:38 +0000 (11:09 +0100)]
ath10k: prevent pci tx/rx starvation

In theory it was possible to starve the system if
a tx/rx handler could implicitly trigger more
tx/rx pci events.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: remove transfer_id from ath10k_hif_cb::tx_completion
Michal Kazior [Thu, 27 Nov 2014 10:09:37 +0000 (11:09 +0100)]
ath10k: remove transfer_id from ath10k_hif_cb::tx_completion

Pass the eid argument via skbuff control buffer.
This will make it possible to work with queues of
HTC event buffers.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: remove unused callback argument from struct ath10k_hif_cb::rx_completion
Michal Kazior [Thu, 27 Nov 2014 10:09:36 +0000 (11:09 +0100)]
ath10k: remove unused callback argument from struct ath10k_hif_cb::rx_completion

This wasn't used since forever and there are no
plans on using it.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: make wmi service bitmap non-debug
Michal Kazior [Thu, 27 Nov 2014 09:11:17 +0000 (10:11 +0100)]
ath10k: make wmi service bitmap non-debug

The service bitmap can be used to determine
firmware capabilities.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: add sanity checks for service bmap parsing
Michal Kazior [Thu, 27 Nov 2014 09:11:16 +0000 (10:11 +0100)]
ath10k: add sanity checks for service bmap parsing

This shouldn't really happen but take into account
the original service bitmap length when mapping
service ids.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix wmi svc bitmap dbg print
Michal Kazior [Thu, 27 Nov 2014 09:11:15 +0000 (10:11 +0100)]
ath10k: fix wmi svc bitmap dbg print

The dump print uses sizeof() but since service_map
was a mere pointer the dump was too short.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: add pointer constness to traces
Michal Kazior [Thu, 27 Nov 2014 07:42:11 +0000 (08:42 +0100)]
ath10k: add pointer constness to traces

Traces shouldn't modified passed data. This will
make it possible to pass const arguments to
traces.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: do not limit RTS threshold value to 2347
Vivek Natarajan [Wed, 26 Nov 2014 07:06:12 +0000 (09:06 +0200)]
ath10k: do not limit RTS threshold value to 2347

Increase the rts threshold from the legacy value of 2347 to support higher
threshold limit.

Signed-off-by: Vivek Natarajan <nataraja@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agomac80211: add ieee80211_tx_status_noskb
Felix Fietkau [Wed, 19 Nov 2014 19:08:13 +0000 (20:08 +0100)]
mac80211: add ieee80211_tx_status_noskb

This can be used by drivers that cannot reliably map tx status
information onto specific skbs.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>