GitHub/exynos8895/android_kernel_samsung_universal8895.git
10 years agoMerge tag 'nfc-next-3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Fri, 26 Sep 2014 17:37:02 +0000 (13:37 -0400)]
Merge tag 'nfc-next-3.18-1' of git://git./linux/kernel/git/sameo/nfc-next

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

"NFC: 3.18 pull request

This is the NFC pull request for 3.18.

We've had major updates for TI and ST Microelectronics drivers:

For TI's trf7970a driver:

- Target mode support for trf7970a
- Suspend/resume support for trf7970a
- DT properties additions to handle different quirks
- A bunch of fixes for smartphone IOP related issues

For ST Microelectronics' ST21NFCA and ST21NFCB drivers:

- ISO15693 support for st21nfcb
- checkpatch and sparse related warning fixes
- Code cleanups and a few minor fixes

Finally, Marvell add ISO15693 support to the NCI stack, together with a
couple of NCI fixes."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath
John W. Linville [Fri, 26 Sep 2014 17:35:46 +0000 (13:35 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath

10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwif...
John W. Linville [Fri, 26 Sep 2014 17:33:58 +0000 (13:33 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoNFC: st21nfca: Fix potential double kfree_skb error
Christophe Ricard [Sat, 13 Sep 2014 08:28:53 +0000 (10:28 +0200)]
NFC: st21nfca: Fix potential double kfree_skb error

skb is already freed in st21nfca_tx_work and was freed also in
st21nfca_im_send_psl_req.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: ERR_PTR vs NULL fix
Christophe Ricard [Sat, 13 Sep 2014 08:28:52 +0000 (10:28 +0200)]
NFC: st21nfca: ERR_PTR vs NULL fix

"skb" can be NULL here but it can't be an ERR_PTR:
- IS_ERR(NULL) return false and skb migth be NULL.
- skb cannot be a ERR_PTR as nfc_hci_send_cmd_async it never using such cast.

!skb is more appropriate at those places.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: remove error output
Christophe Ricard [Sat, 13 Sep 2014 08:28:51 +0000 (10:28 +0200)]
NFC: st21nfcb: remove error output

In case we are not able to read out the NDLC/NCI header, we do not
consider this as an issue and we will give a later chance.
The NDLC layer will handle errors thanks to its internal timers.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: Add ISO15693 Reader/Writer support
Christophe Ricard [Sat, 13 Sep 2014 08:28:50 +0000 (10:28 +0200)]
NFC: st21nfcb: Add ISO15693 Reader/Writer support

Add support for ISO/IEC 15693 RF technology and Type 5 tags.

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 proprietary RF Protocols
Christophe Ricard [Sat, 13 Sep 2014 08:28:49 +0000 (10:28 +0200)]
NFC: nci: Add support for proprietary RF Protocols

In NFC Forum NCI specification, some RF Protocol values are
reserved for proprietary use (from 0x80 to 0xfe).
Some CLF vendor may need to use one value within this range
for specific technology.
Furthermore, some CLF may not becompliant with NFC Froum NCI
specification 2.0 and therefore will not support RF Protocol
value 0x06 for PROTOCOL_T5T as mention in a draft specification
and in a recent push.

Adding get_rf_protocol handle to the nci_ops structure will
help to set the correct technology to target.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: Fix improper ndlc T2 management
Christophe Ricard [Sat, 13 Sep 2014 08:28:48 +0000 (10:28 +0200)]
NFC: st21nfcb: Fix improper ndlc T2 management

T2 was never started when sending a command.
Start it when sending a command for the first attempt
and stop it once we receive the answer.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfcb: Fix improper management of -EREMOTEIO error code.
Christophe Ricard [Sat, 13 Sep 2014 08:28:47 +0000 (10:28 +0200)]
NFC: st21nfcb: Fix improper management of -EREMOTEIO error code.

On st21nfcb the irq line might be kept to active state because of other
interfaces activity. This may generate i2c read tentative resulting in
i2c NACK.

This fix will currently let NDLC upper layer to decide when it is relevent
to signal to the physical layer when the chip as muted.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: dts: st21nfcb_i2c: Fix invalid interrupts polarity.
Christophe Ricard [Sat, 13 Sep 2014 08:28:46 +0000 (10:28 +0200)]
NFC: dts: st21nfcb_i2c: Fix invalid interrupts polarity.

St21nfcb has a reverse polarity compare to st21nfca.
In st21nfcb case, the irq pin is active high.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: Fix recursive fault when doing p2p in target mode.
Christophe Ricard [Sat, 13 Sep 2014 08:28:45 +0000 (10:28 +0200)]
NFC: st21nfca: Fix recursive fault when doing p2p in target mode.

This patch fix a previous patch introduce by commit 0a91e8ac240a12ac3a03581deb8cd531788c63d4

It is actually fixing a double free mistake in all st21nfca_tm_* function.
We decide to return directly in case of successful execution because skb
got already freed. In st21nfca_tm_recv_dep_req it got freed by nfc_tm_data_received.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: Fix potential skb leaks in NFC-DEP code
Christophe Ricard [Sat, 13 Sep 2014 08:28:44 +0000 (10:28 +0200)]
NFC: st21nfca: Fix potential skb leaks in NFC-DEP code

After a unsuccessful call to nfc_hci_send_event the skb was not
freed and might lead to memory leak.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: Fix few coding style issue
Christophe Ricard [Sat, 13 Sep 2014 08:28:43 +0000 (10:28 +0200)]
NFC: st21nfca: Fix few coding style issue

Fix few conding style issue such as useless line return or tab.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: trf7970a: Unlock mutex before exiting _trf7970a_tg_listen()
Mark A. Greer [Tue, 23 Sep 2014 18:25:48 +0000 (11:25 -0700)]
NFC: trf7970a: Unlock mutex before exiting _trf7970a_tg_listen()

The recently added _trf7970a_tg_listen() routine
has some return paths that don't unlock the mutex
that is locked when the routine is entered.  Fix
this by always unlocking the mutex before returning.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: trf7970a: Unlock mutex before exiting trf7970a_irq()
Mark A. Greer [Tue, 23 Sep 2014 18:25:47 +0000 (11:25 -0700)]
NFC: trf7970a: Unlock mutex before exiting trf7970a_irq()

Recent changes to trf7970a_irq() added a couple return
paths that don't unlock the mutex that is locked when
the routine is entered.  Fix this by ensuring the mutex
is always unlocked before returning.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: trf7970a: Remove unnecessary local variable initialization
Mark A. Greer [Tue, 23 Sep 2014 18:25:46 +0000 (11:25 -0700)]
NFC: trf7970a: Remove unnecessary local variable initialization

There is no need to initialize the 'ret' variable
in trf7970a_resume().

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: trf7970a: Remove useless local variable
Mark A. Greer [Tue, 23 Sep 2014 18:25:45 +0000 (11:25 -0700)]
NFC: trf7970a: Remove useless local variable

The trf7970a_suspend() routine always returns
zero so don't use a local return variable to
hold the return value.  This fixes up a smatch
warning.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoiwlwifi: mvm: Refactor and fix max probe len computation
Andrei Otcheretianski [Tue, 9 Sep 2014 07:58:49 +0000 (10:58 +0300)]
iwlwifi: mvm: Refactor and fix max probe len computation

Move iwl_mvm_max_scan_ie_len function to scan.c and fix the
implementation to conform with the LMAC scan API.
Since the correct implementation would leave us with unacceptably
tiny probes, add a workaround which returns a larger value.
In current implementation it's possible that unified_scan_lmac and
unified_sched_scan_lmac would return -ENOBUFS.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: disable BT Co-running by default
Emmanuel Grumbach [Sun, 21 Sep 2014 09:45:34 +0000 (12:45 +0300)]
iwlwifi: mvm: disable BT Co-running by default

The tables still contain dummy values.

Cc: <stable@vger.kernel.org> [3.15+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: fix logic in case of multiple TIDs
Eyal Shapira [Sun, 14 Sep 2014 12:58:53 +0000 (15:58 +0300)]
iwlwifi: mvm: rs: fix logic in case of multiple TIDs

In case of traffic on multiple TIDs where one is aggregated
and the other is not RS would toggle between considering
traffic vs. the station as aggregated and not aggregated.
Instead consider the sta state as aggregated as long as
there's at least one TID aggregated.
This limitation is because the rates table is kept per
station and not per TID.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: report all BA notifs to RS
Eyal Shapira [Sun, 14 Sep 2014 12:28:09 +0000 (15:28 +0300)]
iwlwifi: mvm: report all BA notifs to RS

Currently BA notifications which don't reclaim any frames
would not cause the RS to be called as no skbs are passed
to mac80211. This is not optimal as RS can benefit from the
statistics of sent vs. acked of such a BA. This can improve the
reaction time of the RS algorithm. Also, an upcoming change in
the firmware would cause BA timeout to be reported as a BA notif
with 0 acked so this change is required for that as well.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: 8000: fix fw name to account for revision
Liad Kaufman [Thu, 18 Sep 2014 14:22:58 +0000 (17:22 +0300)]
iwlwifi: 8000: fix fw name to account for revision

The 8000 HW series also includes the revision in the FW
name.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: fix HW_REV saving for 8000 series
Liad Kaufman [Wed, 17 Sep 2014 10:28:50 +0000 (13:28 +0300)]
iwlwifi: pcie: fix HW_REV saving for 8000 series

Align the trans->hw_rev variable format with previous series
format.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: Add missing PCI IDs for the 7260 series
Oren Givon [Wed, 17 Sep 2014 07:31:56 +0000 (10:31 +0300)]
iwlwifi: Add missing PCI IDs for the 7260 series

Add 4 missing PCI IDs for the 7260 series.

Cc: <stable@vger.kernel.org> [3.10+]
Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: limit aggregation size in low latency to 6
Eyal Shapira [Sun, 14 Sep 2014 13:40:38 +0000 (16:40 +0300)]
iwlwifi: mvm: limit aggregation size in low latency to 6

This is a tradeoff between enabling better throughput for
bursty traffic and low latency. The number 6 was found to be
a good tradeoff for the Miracast use case which is the
major use case for low latency.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: refactor to allow direct rs updating
Eyal Shapira [Sun, 14 Sep 2014 12:23:23 +0000 (15:23 +0300)]
iwlwifi: mvm: rs: refactor to allow direct rs updating

Enable RS to get updated directly via iwl_mvm_rs_tx_status
which will be called by the driver and not via mac80211
rate control. This is required for a following patch to
report on BAs which do not cause the BA window to progress.
Also this is a first step in decoupling rs from the
mac80211 rate control.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: choose an initial tx rate based on rssi conditions
Eyal Shapira [Tue, 12 Aug 2014 21:31:13 +0000 (00:31 +0300)]
iwlwifi: mvm: choose an initial tx rate based on rssi conditions

Improve the initial tx rate and antenna selection to be based on
the rssi of the last rx. This avoids starting at the lowest legacy
rate always and requiring more tx traffic to "climb" up the rates.
Since this option might cause trouble in certain setups, allow to
disable it by default.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoath10k: use ether_addr_copy()
Kalle Valo [Sun, 14 Sep 2014 09:50:49 +0000 (12:50 +0300)]
ath10k: use ether_addr_copy()

As suggeested by checkpatch:

WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)

In wmi.c I had to change due to sparse warnings copying of struct wmi_mac_addr
from form &cmd->peer_macaddr.addr to cmd->peer_macaddr.addr. In
ath10k_wmi_set_ap_ps_param() I also added the missing ".addr" to the copy
command.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: reformat help text in ath10k_read_simulate_fw_crash()
Kalle Valo [Sun, 14 Sep 2014 09:50:44 +0000 (12:50 +0300)]
ath10k: reformat help text in ath10k_read_simulate_fw_crash()

Makes it more readable and fixes checkpatch warnings:

drivers/net/wireless/ath/ath10k/debug.c:593: WARNING: quoted string split across lines
drivers/net/wireless/ath/ath10k/debug.c:594: WARNING: quoted string split across lines
drivers/net/wireless/ath/ath10k/debug.c:595: WARNING: quoted string split across lines
drivers/net/wireless/ath/ath10k/debug.c:596: WARNING: quoted string split across lines
drivers/net/wireless/ath/ath10k/debug.c:597: WARNING: quoted string split across lines
drivers/net/wireless/ath/ath10k/debug.c:599: WARNING: quoted string split across lines
drivers/net/wireless/ath/ath10k/debug.c:600: WARNING: quoted string split across lines

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: miscellaneous checkpatch fixes
Kalle Valo [Sun, 14 Sep 2014 09:50:39 +0000 (12:50 +0300)]
ath10k: miscellaneous checkpatch fixes

Fixes checkpatch warnings:

ath10k/htc.c:49: WARNING: Possible unnecessary 'out of memory' message
ath10k/htc.c:810: WARNING: Possible unnecessary 'out of memory' message
ath10k/htt.h:1034: CHECK: Please use a blank line after function/struct/union/enum declarations
ath10k/htt_rx.c:135: CHECK: Unnecessary parentheses around htt->rx_ring.alloc_idx.vaddr
ath10k/htt_rx.c:173: CHECK: Unnecessary parentheses around htt->rx_ring.alloc_idx.vaddr
ath10k/pci.c:633: WARNING: macros should not use a trailing semicolon
ath10k/wmi.c:3594: WARNING: quoted string split across lines

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: else is not generally useful after a break or return
Kalle Valo [Sun, 14 Sep 2014 09:50:33 +0000 (12:50 +0300)]
ath10k: else is not generally useful after a break or return

Fixes checkpatch warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: don't use return on void functions
Kalle Valo [Sun, 14 Sep 2014 09:50:28 +0000 (12:50 +0300)]
ath10k: don't use return on void functions

Fixes a checkpatch warning:

WARNING: void function return statements are not generally useful

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix space after a cast style errors
Kalle Valo [Sun, 14 Sep 2014 09:50:23 +0000 (12:50 +0300)]
ath10k: fix space after a cast style errors

Fixes checkpatch warnings:

CHECK: No space is necessary after a cast

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix missing a blank line after declarations
Kalle Valo [Sun, 14 Sep 2014 09:50:17 +0000 (12:50 +0300)]
ath10k: fix missing a blank line after declarations

Fixes checkpatch warnings:

WARNING: Missing a blank line after declarations

Please note that some of the cases I fixed by moving the variable declarations
to the beginning of the function, which is the preferred style in ath10k.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix use of multiple blank lines
Kalle Valo [Sun, 14 Sep 2014 09:50:11 +0000 (12:50 +0300)]
ath10k: fix use of multiple blank lines

Fixes checkpatch warnings:

CHECK: Please don't use multiple blank lines

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix checkpatch warnings about parenthesis alignment
Kalle Valo [Sun, 14 Sep 2014 09:50:06 +0000 (12:50 +0300)]
ath10k: fix checkpatch warnings about parenthesis alignment

CHECK: Alignment should match open parenthesis

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix parenthesis alignment warning in ath10k_htt_rx_alloc()
Kalle Valo [Sun, 14 Sep 2014 09:50:00 +0000 (12:50 +0300)]
ath10k: fix parenthesis alignment warning in ath10k_htt_rx_alloc()

Fixes checkpatch warning:

ath10k/htt_rx.c:519: CHECK: Alignment should match open parenthesis

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath9k: enable ext channel pulse detection
Lorenzo Bianconi [Tue, 16 Sep 2014 14:43:42 +0000 (16:43 +0200)]
ath9k: enable ext channel pulse detection

Enable pulse detection on extension channel if 40MHz channel width has been set

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix build error
Sujith Manoharan [Tue, 16 Sep 2014 01:49:27 +0000 (07:19 +0530)]
ath9k: Fix build error

This happens when CONFIG_ATH9K_CHANNEL_CONTEXT is
not enabled.

../drivers/net/wireless/ath/ath9k/recv.c: In function ‘ath_rx_ps_beacon’:
../drivers/net/wireless/ath/ath9k/recv.c:553:27: error: ‘struct ath_softc’ has no member named ‘offchannel’
    if (sc->cur_chan == &sc->offchannel.chan)
                           ^
../scripts/Makefile.build:257: recipe for target 'drivers/net/wireless/ath/ath9k/recv.o' failed
make[10]: *** [drivers/net/wireless/ath/ath9k/recv.o] Error 1
../scripts/Makefile.build:404: recipe for target 'drivers/net/wireless/ath/ath9k' failed
make[9]: *** [drivers/net/wireless/ath/ath9k] Error 2

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: initialize ath_node linked list
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:16 +0000 (02:13 +0200)]
ath9k: initialize ath_node linked list

Initialize neighbor linked list used by dynack to compute ACK timeout
as the maximum STA ACK timeout

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: enable dynack using set_coverage_class codepath
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:15 +0000 (02:13 +0200)]
ath9k: enable dynack using set_coverage_class codepath

Enable ACK timeout estimation algorithm if set_coverage_class routine has been
called with negative coverage_class parameter. Dynack is automatically disabled
setting valid value for coverage class

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: add debugfs support for dynack
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:14 +0000 (02:13 +0200)]
ath9k: add debugfs support for dynack

Add ack_to entry to debugfs in order to dump current ACK timeout value

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: enable control frame reception
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:13 +0000 (02:13 +0200)]
ath9k: enable control frame reception

Set control frame bit in rx filter if dynack processing has been activated
in order to enable ACK frame reception

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: add sampling methods for (tx|rx) timestamp
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:12 +0000 (02:13 +0200)]
ath9k: add sampling methods for (tx|rx) timestamp

Add sampling methods for ACK RX timestamp in ath_rx_tasklet() and for TX frame
timestamp in ath_tx_complete_aggr() and in ath_tx_process_buffer(). These
samples will be used in dynack processing for ACK timeout estimation

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: do not overwrite ACK timeout estimation
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:11 +0000 (02:13 +0200)]
ath9k: do not overwrite ACK timeout estimation

Do not overwrite ACK timeout estimation in ath9k_hw_init_global_settings() if
dynack processing has been enabled

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: add config for (en|dis)abling ACK timeout estimation
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:10 +0000 (02:13 +0200)]
ath9k: add config for (en|dis)abling ACK timeout estimation

Add ACK timeout estimation algorithm to ath9k Makefile and Kconfig

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: add dynamic ACK timeout estimation
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:09 +0000 (02:13 +0200)]
ath9k: add dynamic ACK timeout estimation

Add dynamic ACK timeout estimation algorithm based on ACK frame RX timestamp,
TX frame timestamp and frame duration.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Tested-by: Philippe Duchein <wireless-dev@duchein.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: add duration field to ath_tx_status
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:08 +0000 (02:13 +0200)]
ath9k: add duration field to ath_tx_status

Add duration field to ath_tx_status in order to report frame duration for each
entry in multi-retry chain. These fields will be used in ACK timeout estimation
algorithm (dynack)

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: export methods related to ACK timeout estimation
Lorenzo Bianconi [Tue, 16 Sep 2014 00:13:07 +0000 (02:13 +0200)]
ath9k: export methods related to ACK timeout estimation

Remove static keyword and export ath9k_hw_setslottime(),
ath9k_hw_set_ack_timeout() and ath9k_hw_set_cts_timeout() in hw.h.
These methods will be used in ACK timeout estimation algorithm (dynack)

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlwifi: mvm: Allow schedule scan while connected
Alexander Bondar [Wed, 30 Jul 2014 14:40:28 +0000 (17:40 +0300)]
iwlwifi: mvm: Allow schedule scan while connected

In the past when schedule scan was started while connected on one of
interfaces FW crashes were observed. In the newest FW this issue is
solved, so remove limitaion after examining corresponding TLV flag.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: add debugfs entry to read the current temperature
Luciano Coelho [Thu, 4 Sep 2014 12:58:47 +0000 (15:58 +0300)]
iwlwifi: mvm: add debugfs entry to read the current temperature

When read, this new debugfs entry requests the current temperature
from the firmware and outputs it.

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: prepare for scheduler config command
Avri Altman [Wed, 30 Jul 2014 08:41:01 +0000 (11:41 +0300)]
iwlwifi: mvm: prepare for scheduler config command

The scheduler is a HW sub-block that directs the work of the Flow
Handler by issuing requests for frame transfers, specifying source
and destination. Its primary function is to allocate flows into the
TX FIFOs based upon a pre-determined mapping.

The driver has some responsibilities to the scheduler, namely
initialising and maintaining the hardware registers. This is
currently done by directly accessing them, which can cause races
with the firmware also accessing the registers.

To address this problem, change the driver to no longer directly
access the registers but go through the firmware for this if the
firmware has support for DQA and thus the new command.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: Set RRM_ENABLED bit in scan commands
Andrei Otcheretianski [Wed, 9 Jul 2014 15:59:14 +0000 (18:59 +0300)]
iwlwifi: mvm: Set RRM_ENABLED bit in scan commands

Set RRM_ENABLED (bit 6) flag in scan commands. When this flag is set
the fw will add WFA vendor-specific TPC report and DS parameter set
IEs into probe requests.
This bit is set for SCAN_OFFLOAD_REQUEST_CMD(0x51).

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Assaf Krauss <assaf.krauss@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: Announce Quiet Period support
Assaf Krauss [Thu, 13 Mar 2014 06:12:15 +0000 (08:12 +0200)]
iwlwifi: mvm: Announce Quiet Period support

Add a ucode capability flag for support of Quiet Period (part of RRM).
If this flag is set, advertise device support.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: Update TX power in TPC reports
Andrei Otcheretianski [Tue, 1 Jul 2014 09:54:25 +0000 (12:54 +0300)]
iwlwifi: mvm: Update TX power in TPC reports

Introduce new tx command flag (TX_CMD_FLG_WRITE_TX_POWER) which requests the
fw to update the tx power value at some constant offset.
Set this flag when transmitting either TPC report or Link measurement report
action frames.
In addition, introduce new tlv which indicates whether the fw supports power
insertion (IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT) and publish the
corresponding nl80211 feature.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: support cloned tx skbs
Ido Yariv [Wed, 23 Jul 2014 13:31:14 +0000 (09:31 -0400)]
iwlwifi: mvm: support cloned tx skbs

Since tx skbs are not modified by the driver, let mac80211 know the
driver can handle cloned skbs.

Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoath9k: Fix primary station configuration
Sujith Manoharan [Mon, 15 Sep 2014 05:55:54 +0000 (11:25 +0530)]
ath9k: Fix primary station configuration

Assign 'primary_sta' to the active primary station
interface after iterating over the list of interfaces.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove useless opmode check
Sujith Manoharan [Mon, 15 Sep 2014 05:55:53 +0000 (11:25 +0530)]
ath9k: Remove useless opmode check

The opmode is verified to be NL80211_IFTYPE_STATION
before calling ath9k_set_assoc_state().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Set offchannel state properly
Sujith Manoharan [Mon, 15 Sep 2014 05:55:52 +0000 (11:25 +0530)]
ath9k: Set offchannel state properly

When switching offchannel, BSS related information
in the HW has to be reset to default values. Add a routine
to do this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Check beaconing mode properly
Sujith Manoharan [Mon, 15 Sep 2014 05:55:51 +0000 (11:25 +0530)]
ath9k: Check beaconing mode properly

In MCC mode, the TSF of a context needs to be
adjusted only if it is GO/AP.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove unnecessary tbtt assignment
Sujith Manoharan [Mon, 15 Sep 2014 05:55:50 +0000 (11:25 +0530)]
ath9k: Remove unnecessary tbtt assignment

The next_tbtt variable in the scheduler is needed only
for GO/AP mode operation and is always read from the
NEXT_TBTT_TIMER in the HW. There is no need to store
the timestamp for received beacons.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: add support for setting the beacon listen interval
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:12 +0000 (23:09 +0200)]
b43: add support for setting the beacon listen interval

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: update some transmit header constants
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:11 +0000 (23:09 +0200)]
b43: update some transmit header constants

Some constants were missing and are added now.
The rate mode was renamed, at least the ucode in brcsmac uses 2 for HT
rates (iee80211n) and the more recent ucodes are using 3 for VHT
(ieee80211ac).

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: add missing rate
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:10 +0000 (23:09 +0200)]
b43: add missing rate

The OFDM reate 9MB was not set here

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: tell ucode the phy type and version
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:09 +0000 (23:09 +0200)]
b43: tell ucode the phy type and version

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: tell the ucode the mac capabilities
Hauke Mehrtens [Sun, 14 Sep 2014 21:09:08 +0000 (23:09 +0200)]
b43: tell the ucode the mac capabilities

This is based on code form brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agofixup! wil6210: fix usage of print_hex_dump_debug
Vladimir Kondratiev [Sun, 14 Sep 2014 08:14:10 +0000 (11:14 +0300)]
fixup! wil6210: fix usage of print_hex_dump_debug

Use empty inline functions instead of empty #define. Fix for "unused variable"
as reported below:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
head:   167bf96dd87d2a8360cb9e9783006876dac4f579
commit: 871d8c4bbb0f23c29a21b63b1801071766f69b51 [45/62] wil6210: fix usage of print_hex_dump_debug
config: i386-allyesconfig
reproduce:
  git checkout 871d8c4bbb0f23c29a21b63b1801071766f69b51
  make ARCH=i386  allyesconfig
  make ARCH=i386

All warnings:

   drivers/net/wireless/ath/wil6210/wmi.c: In function 'wmi_evt_rx_mgmt':

>> drivers/net/wireless/ath/wil6210/wmi.c:341:10: warning: unused variable 'ie_len' [-Wunused-variable]
      size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
             ^

>> drivers/net/wireless/ath/wil6210/wmi.c:340:13: warning: unused variable 'ie_buf' [-Wunused-variable]
      const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
                ^

vim +/ie_len +341 drivers/net/wireless/ath/wil6210/wmi.c

2be7d22f Vladimir Kondratiev 2012-12-20  334
2be7d22f Vladimir Kondratiev 2012-12-20  335    if (ieee80211_is_beacon(fc) || ieee80211_is_probe_resp(fc)) {
2be7d22f Vladimir Kondratiev 2012-12-20  336            struct cfg80211_bss *bss;
8eea944a Vladimir Kondratiev 2014-06-16  337            u64 tsf = le64_to_cpu(rx_mgmt_frame->u.beacon.timestamp);
8eea944a Vladimir Kondratiev 2014-06-16  338            u16 cap = le16_to_cpu(rx_mgmt_frame->u.beacon.capab_info);
8eea944a Vladimir Kondratiev 2014-06-16  339            u16 bi = le16_to_cpu(rx_mgmt_frame->u.beacon.beacon_int);
8eea944a Vladimir Kondratiev 2014-06-16  340            const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
8eea944a Vladimir Kondratiev 2014-06-16  341            size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
8eea944a Vladimir Kondratiev 2014-06-16  342                                             u.beacon.variable);
8eea944a Vladimir Kondratiev 2014-06-16  343            wil_dbg_wmi(wil, "Capability info : 0x%04x\n", cap);
8eea944a Vladimir Kondratiev 2014-06-16  344            wil_dbg_wmi(wil, "TSF : 0x%016llx\n", tsf);

:::::: The code at line 341 was first introduced by commit
:::::: 8eea944af0efcdba09dac1ad220c9bfa68293279 wil6210: print more info about BSS found

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcm80211: use container_of to resolve dma_info from dma_pub
Fabian Frederick [Sat, 13 Sep 2014 20:38:29 +0000 (22:38 +0200)]
brcm80211: use container_of to resolve dma_info from dma_pub

Use container_of instead of casting first structure member.

Compiled but untested.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcm80211: use container_of to resolve brcms_phy from brcms_phy_pub
Fabian Frederick [Sat, 13 Sep 2014 20:38:28 +0000 (22:38 +0200)]
brcm80211: use container_of to resolve brcms_phy from brcms_phy_pub

Use container_of instead of casting first structure member.

Compiled but untested.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: btcoexist: Change local debugging macros CL_*** into the standard varieties
Larry Finger [Fri, 12 Sep 2014 20:50:58 +0000 (15:50 -0500)]
rtlwifi: btcoexist: Change local debugging macros CL_*** into the standard varieties

Macros CL_SNPRINTF and CL_PRINTF are always used in that order. The first
formats info into a buffer, and the second dumps it with printk. As the
debug system in rtlwifi has a macro that does this with a single call,
it seems reasonable to use it instead. An additional benefit is that the
debug level can be set when loading the driver used by the wifi device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: Implement PHY PLL reset
Rafał Miłecki [Fri, 12 Sep 2014 16:37:26 +0000 (18:37 +0200)]
b43: Implement PHY PLL reset

We should reset PLL after changing MAC frequency.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: modify TX/RX window sizes for AP interface
Avinash Patil [Fri, 12 Sep 2014 14:39:00 +0000 (20:09 +0530)]
mwifiex: modify TX/RX window sizes for AP interface

This patch sets uAP BA window sizes to 64.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: add rx workqueue support
Avinash Patil [Fri, 12 Sep 2014 14:38:59 +0000 (20:08 +0530)]
mwifiex: add rx workqueue support

This patch adds RX work queue support to mwifiex.
Packets received are queued to internal queue which are then
processed by scheduling a work item for RX process.

RX work is enabled only on SMP systems.

Reviewed-by: James Cameron <quozl@laptop.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: remove low priority scan handling
Amitkumar Karwar [Fri, 12 Sep 2014 14:38:58 +0000 (20:08 +0530)]
mwifiex: remove low priority scan handling

We have a logic in driver to delay or abort low priority scan
to serve Tx traffic effectively. With scan channel
gap support added, firmware now allows driver to send Tx data while
scan operation is in progress. Hence low priority scan handling
in driver is not required now. This patch removes related code.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: remove redundant variable report_scan_result
Amitkumar Karwar [Fri, 12 Sep 2014 14:38:57 +0000 (20:08 +0530)]
mwifiex: remove redundant variable report_scan_result

This variable is never used, get rid of it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: process TX even when scan is ongoing
Avinash Patil [Fri, 12 Sep 2014 14:38:56 +0000 (20:08 +0530)]
mwifiex: process TX even when scan is ongoing

With channel scan gap, FW comes back to connected channel after each
single channel scan. So we can safely transfer data to FW during scan.
FW would send this data once on connected channel.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: remove restriction of single channel scan when connected
Avinash Patil [Fri, 12 Sep 2014 14:38:55 +0000 (20:08 +0530)]
mwifiex: remove restriction of single channel scan when connected

With scan channel gap in place, FW comes back to connected channel
after each scan; so we dont need to restrict FW to scan
single channel while connected.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: bring in scan channel gap feature
Avinash Patil [Fri, 12 Sep 2014 14:38:54 +0000 (20:08 +0530)]
mwifiex: bring in scan channel gap feature

With scan channel gap when any station/AP is active, FW comes back
to connected channel for any pending data transfter after scanning each
channel.
We set scan channel gap TLV to FW in scan command when any of the
interface is active. This enables scan channel gap in FW.
Also when scan channel gap is enabled, we would scan maximum channels
allowed by FW.

Scan channel gap is supported only on FW with V15 FW API.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: set passive scan type for scan requests with no ssid
Avinash Patil [Fri, 12 Sep 2014 14:38:53 +0000 (20:08 +0530)]
mwifiex: set passive scan type for scan requests with no ssid

It was observed that station would sent probe request even when
scan type has been set as passive during iw scan.
This was happening because driver sets passive scan type only
when channel has IEEE80211_CHAN_NO_IR flag set.
Along with this, add condition to check if no ssids are specified in
scan request so as to mark such scan request passive.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: minor cleanup in multiport aggregation
Amitkumar Karwar [Fri, 12 Sep 2014 14:38:52 +0000 (20:08 +0530)]
mwifiex: minor cleanup in multiport aggregation

'mp_data_port_mask' and 'mp_end_port' gives correct information
even for the chipsets supporting SDIO new mode (32 ports).
We will get rid of this chip specific handling.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: fix a bug in Tx multiport aggregation
Amitkumar Karwar [Fri, 12 Sep 2014 14:38:51 +0000 (20:08 +0530)]
mwifiex: fix a bug in Tx multiport aggregation

When aggregation port limit is reached, we stop aggregation and
the data is sent to firmware. It is observed that one less packet
than the port limit is aggregated in this case. ex. 15 instead of
16.
The reason is we have redundant port limit checks before current
packet is added to aggregation buffer.

The issue is fixed by removing these checks. We already have
necessary check in precopy current buffer handling.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: fix 5G association failure after leaving 2.4G IBSS
Xinming Hu [Fri, 12 Sep 2014 14:38:50 +0000 (20:08 +0530)]
mwifiex: fix 5G association failure after leaving 2.4G IBSS

When assocaiting to an AP , mwifiex set supported data rates
based on target AP's capability. For 5G AP(11a mode), a/n/ac mode
would possibly be set.
However, for some chips which dont support 11AC mode current config_bands
will be used instead.

For example, if we join an IBSS in 11b mode ,adapter->config_bands
will be set to 1(11b mode). Then we leave IBSS ,and try to connect
5G a/n mode AP. At this time , only 11b mode data rates will be
supported in assoc request , which result in assoc failure with
reason code 18: Association denied due to requesting station not
supporting all rates.

This patch fix such a cornel case, by adding additional check for
current chip's 11ac capability.

Reported-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: support for event done interrupt
Avinash Patil [Fri, 12 Sep 2014 14:38:49 +0000 (20:08 +0530)]
mwifiex: support for event done interrupt

This patch adds support for writing CPU event interrupt done back
to device.
Patch also increases interrupt buffer ring size from 4 to 8.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: rework internal scan for association
Avinash Patil [Fri, 12 Sep 2014 14:38:48 +0000 (20:08 +0530)]
mwifiex: rework internal scan for association

There was an issue with internal scan during association wherein
we would complete internal scan on first scan command response.
This would cause association failure if AP is not found in first scan
response e.g. APs from A band.
This patch fixes this issue by completing internal scan only when all
scan commands from scan pending queue and command pending queue are
sent to FW and response to last scan command is received.

Tested-by: Xinmin Hu <huxm@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: avoid processing RX packets with invalid length
Avinash Patil [Fri, 12 Sep 2014 14:38:47 +0000 (20:08 +0530)]
mwifiex: avoid processing RX packets with invalid length

If rx_len received in interface header from FW is more than
RX buffer size, skb_put for such length results into skb_panic.
Avoid this by not processing such packets. We just print a warning
for such packets and free skb.

Reviewed-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: fix probable memory corruption while processing TDLS frame
Avinash Patil [Fri, 12 Sep 2014 14:38:46 +0000 (20:08 +0530)]
mwifiex: fix probable memory corruption while processing TDLS frame

Size of RSN IE buffer in driver is 254 while maximum size of received buffer
to be copied to RSN IE buffer can be 255. Add boundary check to copy maximum
of 254 bytes into RSN IE buffer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: set fw api info for backword compatibility
Avinash Patil [Fri, 12 Sep 2014 14:38:45 +0000 (20:08 +0530)]
mwifiex: set fw api info for backword compatibility

If we dont set FW API info here, for older FW releases where FW API
is not available in GET_HW_SPEC, API version would remain 0.
This may cause issues with 11ac if older FW is used with newer driver.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: HT-PHY: Update values for frequency calibration
Rafał Miłecki [Fri, 12 Sep 2014 08:24:11 +0000 (10:24 +0200)]
b43: HT-PHY: Update values for frequency calibration

Previous values were extracted from MMIO dump of some old 5.x driver,
new ones should improve calibration. This also adds values for 5 GHz.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: HT-PHY: Implement band switching
Rafał Miłecki [Fri, 12 Sep 2014 08:24:10 +0000 (10:24 +0200)]
b43: HT-PHY: Implement band switching

It works pretty much the same way as in N-PHY.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix beacon processing in offchannel
Sujith Manoharan [Fri, 12 Sep 2014 06:40:48 +0000 (12:10 +0530)]
ath9k: Fix beacon processing in offchannel

When interfaces of different types are present
in a context and an offchannel request is received
on a STA interface, we end up trying to process
beacons received when we are offchannel. This hits
the below warning since offchannel will not have proper
beacon parameters.

Fix this by not processing beacons received when we
are offchannel.

------------[ cut here ]------------
WARNING: CPU: 1 PID: 0 at ../drivers/net/wireless/ath/ath9k/recv.c:552 ath_rx_tasklet+0xf8f/0x1020 [ath9k]()
CPU: 1 PID: 0 Comm: swapper/1 Tainted: G           O   3.17.0-rc4-wl-debug #16
Hardware name: LENOVO 28427ZQ/INVALID, BIOS 6JET58WW (1.16 ) 09/17/2009
 0000000000000000 15916787056abba3 ffff88013b603d08 ffffffff8156af94
 ffff88013b603d50 ffff88013b603d40 ffffffff81070dbd ffff8800a84bb300
 ffff8800b05db358 ffff8800a84cc578 ffff8800a84bb300 ffff8800b05daa40
Call Trace:
 <IRQ>  [<ffffffff8156af94>] dump_stack+0x4d/0x6f
 [<ffffffff81070dbd>] warn_slowpath_common+0x7d/0xa0
 [<ffffffff81070e3c>] warn_slowpath_fmt+0x5c/0x80
 [<ffffffff81572143>] ? _raw_spin_lock_irqsave+0x83/0xa0
 [<ffffffffa09d04a6>] ? ath_rx_tasklet+0x9f6/0x1020 [ath9k]
 [<ffffffffa09d0a3f>] ath_rx_tasklet+0xf8f/0x1020 [ath9k]
 [<ffffffffa09cd4f4>] ath9k_tasklet+0xf4/0x310 [ath9k]
 [<ffffffff81075a97>] tasklet_action+0xe7/0xf0
 [<ffffffff8107508a>] __do_softirq+0x12a/0x340
 [<ffffffff8107544e>] irq_exit+0x9e/0xc0
 [<ffffffff81575e56>] do_IRQ+0x56/0xe0
 [<ffffffff81573c72>] common_interrupt+0x72/0x72
 <EOI>  [<ffffffff81421037>] ? cpuidle_enter_state+0x67/0x1a0
 [<ffffffff81421257>] cpuidle_enter+0x17/0x20
 [<ffffffff810b3ebe>] cpu_startup_entry+0x3ce/0x420
 [<ffffffff81048563>] start_secondary+0x233/0x2c0
---[ end trace f15c3e33ba78d840 ]---
------------[ cut here ]------------

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: btcoexist: avoid format string in printk
Larry Finger [Fri, 12 Sep 2014 00:02:10 +0000 (19:02 -0500)]
rtlwifi: btcoexist: avoid format string in printk

Recent changes to this driver inadvertently reverted the change made by Kees
Cook in commit 6437f51ec3.

Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: fix radar parameters initialization
Lorenzo Bianconi [Thu, 11 Sep 2014 21:50:54 +0000 (23:50 +0200)]
ath9k: fix radar parameters initialization

Move ath9k_hw_set_radar_params() in ath9k_hw_reset() in order to avoid
AR_PHY_RADAR registers are overwritten after hw reset

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agohostap: proc: substitute loops by %*phN
Andy Shevchenko [Fri, 5 Sep 2014 14:30:16 +0000 (17:30 +0300)]
hostap: proc: substitute loops by %*phN

For dumping small buffers we may use %*phN specifier instead of custom
approach..

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Mon, 15 Sep 2014 18:55:45 +0000 (14:55 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

10 years agoMerge tag 'mac80211-next-for-john-2014-09-12' of git://git.kernel.org/pub/scm/linux...
John W. Linville [Mon, 15 Sep 2014 18:51:23 +0000 (14:51 -0400)]
Merge tag 'mac80211-next-for-john-2014-09-12' of git://git./linux/kernel/git/jberg/mac80211-next

Johannes Berg <johannes@sipsolutions.net> says:

"This time, I have some rate minstrel improvements, support for a very
small feature from CCX that Steinar reverse-engineered, dynamic ACK
timeout support, a number of changes for TDLS, early support for radio
resource measurement and many fixes. Also, I'm changing a number of
places to clear key memory when it's freed and Intel claims copyright
for code they developed."

Conflicts:
net/mac80211/iface.c

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 15 Sep 2014 18:37:07 +0000 (14:37 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoiwlwifi: mvm: align CSA GO NOA time event naming with the firmware
Luciano Coelho [Tue, 26 Aug 2014 13:14:10 +0000 (16:14 +0300)]
iwlwifi: mvm: align CSA GO NOA time event naming with the firmware

The time event used for CSA GO will also be used by CSA client.
Rename the symbols to something more generic and aligned with the
firmware code.

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: move IWL_MVM_UAPSD_QUEUES to constants.h
Eliad Peller [Wed, 6 Aug 2014 07:52:27 +0000 (10:52 +0300)]
iwlwifi: mvm: move IWL_MVM_UAPSD_QUEUES to constants.h

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: fix PSM disable during TDLS
Arik Nemtsov [Wed, 3 Sep 2014 09:09:45 +0000 (12:09 +0300)]
iwlwifi: mvm: fix PSM disable during TDLS

Simplify the code and check for TDLS stations just before sending the
MAC_POWER_TABLE command. The previous version of the code still allowed
PM in some multi-interface scenarios even with TDLS connected.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>