firefly-linux-kernel-4.4.55.git
9 years agoath9k: Use normal queues for offchannel frames
Sujith Manoharan [Wed, 24 Sep 2014 06:18:15 +0000 (11:48 +0530)]
ath9k: Use normal queues for offchannel frames

There is no reason why frames marked with
IEEE80211_TX_CTL_TX_OFFCHAN have to be sent using
the UAPSD queue. Since mac80211 makes sure that
RoC is done before pushing an offchannel frame
to the driver, we can use the normal TX queues
for transmission.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix queue management
Sujith Manoharan [Wed, 24 Sep 2014 06:18:14 +0000 (11:48 +0530)]
ath9k: Fix queue management

Since we use IEEE80211_HW_QUEUE_CONTROL now, the
CAB/Offchannel queues are registered as the last
two queues. There is no need to check and reassign
the queues in the TX start()/done() routines.

CAB frames will not reach the tx() callback since
we set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING and
pull the buffered frames during beacon transmission.
We also don't have a special HW queue for handling
off-channel frames.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agort2800: correct BBP1_TX_POWER_CTRL mask
Stanislaw Gruszka [Wed, 24 Sep 2014 09:24:54 +0000 (11:24 +0200)]
rt2800: correct BBP1_TX_POWER_CTRL mask

Two bits control TX power on BBP_R1 register. Correct the mask,
otherwise we clear additional bit on BBP_R1 register, what can have
unknown, possible negative effect.

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agowil6210: ethtool ops
Vladimir Kondratiev [Mon, 22 Sep 2014 12:31:41 +0000 (15:31 +0300)]
wil6210: ethtool ops

Provide ethtool support; with support for interrupt coalescing through
get_coalesce/set_coalesce.
Placeholders for begin/complete will be used by runtime PM
to make sure target is powered up while performing ethtool operations

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobcma: gpio: use ChipCommon GPIO IRQ on BCM47XX arch only
Rafał Miłecki [Sun, 21 Sep 2014 18:45:13 +0000 (20:45 +0200)]
bcma: gpio: use ChipCommon GPIO IRQ on BCM47XX arch only

GPIOs can be also used on bcm53xx, however this arch requires different
implementation of IRQ support. It uses different IRQ number (117) and
different masks & acking.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl818x_pci: add RSSI information for rtl8187SE
andrea.merello [Sat, 20 Sep 2014 17:45:24 +0000 (19:45 +0200)]
rtl818x_pci: add RSSI information for rtl8187SE

This patch makes the driver to report signal strength information
to mac80211 for rtl8187se boards.

It differs from my previous RFT patch:
http://marc.info/?l=linux-wireless&m=140155388332534&w=2
because:
- I have now a working rtl8187se card, so I could serve my RFT by myself. :)
- CCK measurement code has changed a bit, but it does basically the same things.
- OFDM measurement method is changed because the older method reported incorrect
  measures, at least for signals stronger than -40dBm).

CCK measurement seems quite good. OFDM seems less accurate, but this is the
same as the "reference" staging driver dose. I wanted not to change things just
to make measures of _one_ (my) card a bit more close to what _I_ (in my setup)
expected..

IMHO results are still good enough to justify reporting signal in dBm rather than in
"unspecified" units, so this is what this patch actually does.

Results of my tests with a working rtl8187se card connected with coaxes and
various RF attenuators to my AP are:

Input (approx) | CCK meas | OFDM meas
--------------------------------------
      -30dBm   |  -32dBm  |  -31dBm
      -40dBm   |  -40dBm  |  -41dBm
      -50dBm   |  -50dBm  |  -55dBm
      -60dBm   |  -59dBm  |  -63dBm
      -70dBm   |  -69dBm  |  -73dBm
      -80dBm   |  -79dBm  |  -83dBm

Also some real-field tests has been done (no coax, packets in the air) for the CCK
measure method, and they resulted in reasonable values.

Thanks-to: Bernhard Schiffner <bernhard@schiffner-limbach.de> [ for real-field tests]
Signed-off-by: andrea.merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix p2p address management
Sujith Manoharan [Fri, 19 Sep 2014 07:30:42 +0000 (13:00 +0530)]
ath9k: Fix p2p address management

When multiple channel contexts are enabled, a p2p interface
that is assigned to a context will have an address that
is different from the device mac address, which is used
by wpa_s as the p2p device ID.

Certain frames like provision requests use the device address
and these get dropped since ath9k_calculate_summary_state()
iterates over only the active interfaces in a context and the
device address is not used.

Fix this by adding the device mac address to the bssid mask.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobcma: print chip ID in a more user-friendly form
Rafał Miłecki [Wed, 17 Sep 2014 21:50:55 +0000 (23:50 +0200)]
bcma: print chip ID in a more user-friendly form

Some chip IDs are easier to read/understand when printed in a decimal
form. For example on my bcm53xx arch router this patch replaces:
Found chip with id 0xCF12, rev 0x00 and package 0x02
with a:
Found chip with id 53010, rev 0x00 and package 0x02

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: ensure user_scan_in not NULL while setting scan channel gap
Avinash Patil [Wed, 17 Sep 2014 17:31:26 +0000 (23:01 +0530)]
mwifiex: ensure user_scan_in not NULL while setting scan channel gap

Check for scan channel gap only when user_scan_in is not NULL.
user_scan_in is NULL for internal scans and if we check scan channel gap
at this place, it may result into crash.

Reported-by: Dan Carpenter <dan.carpenter@oracle.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>
9 years agoath9k: Cache BSS information
Sujith Manoharan [Wed, 17 Sep 2014 09:15:56 +0000 (14:45 +0530)]
ath9k: Cache BSS information

Using the BSS information stored in mac80211 directly
is racy in certain conditions. For example, in a MCC
setup, if the scheduler is switching channels when
a local deauth is issued, calculation of the opmode/bssid
etc. is incorrect. To avoid this, store the bss params
in the driver and use it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath5k: Remove AHB bus support
Paul Bolle [Wed, 10 Sep 2014 08:53:41 +0000 (10:53 +0200)]
ath5k: Remove AHB bus support

AHB bus support was added in v2.6.38, through commit a0b907ee2a71
("ath5k: Add AHB bus support."). That code can only be build if the
Kconfig symbol ATHEROS_AR231X is set. But that symbol has never been
added to the tree. So AHB bus support has always been dead code.

Let's remove all code that depends on ATHEROS_AR231X. If that symbol
ever gets added to the tree the AHB bus support can be re-added too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Fri, 26 Sep 2014 17:38:51 +0000 (13:38 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

9 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>
9 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

9 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

9 years agoBluetooth: Rename sco_param_wideband table to esco_param_msbc
Johan Hedberg [Thu, 25 Sep 2014 06:48:01 +0000 (09:48 +0300)]
Bluetooth: Rename sco_param_wideband table to esco_param_msbc

The sco_param_wideband table represents the eSCO parameters for
specifically mSBC encoding. This patch renames the table to the more
descriptive esco_param_msbc name.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Add retransmission effort into SCO parameter table
Johan Hedberg [Wed, 24 Sep 2014 19:41:46 +0000 (22:41 +0300)]
Bluetooth: Add retransmission effort into SCO parameter table

It is expected that new parameter combinations will have the
retransmission effort value different between some entries (mainly
because of the new S4 configuration added by HFP 1.7), so it makes sense
to move it into the table instead of having it hard coded based on the
selected SCO_AIRMODE_*.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoieee802154: 6lowpan: ensure header compression does not corrupt ipv6 header
Simon Vincent [Wed, 24 Sep 2014 10:21:33 +0000 (12:21 +0200)]
ieee802154: 6lowpan: ensure header compression does not corrupt ipv6 header

The 6lowpan ipv6 header compression was causing problems for other interfaces
that expected a ipv6 header to still be in place, as we were replacing the
ipv6 header with a compressed version. This happened if you sent a packet to a
multicast address as the packet would be output on 802.15.4, ethernet, and also
be sent to the loopback interface. The skb data was shared between these
interfaces so all interfaces ended up with a compressed ipv6 header.

The solution is to ensure that before we do any header compression we are not
sharing the skb or skb data with any other interface. If we are then we must
take a copy of the skb and skb data before modifying the ipv6 header.
The only place we can copy the skb is inside the xmit function so we don't
leave dangling references to skb.

This patch moves all the header compression to inside the xmit function. Very
little code has been changed it has mostly been moved from lowpan_header_create
to lowpan_xmit. At the top of the xmit function we now check if the skb is
shared and if so copy it. In lowpan_header_create all we do now is store the
source and destination addresses for use later when we compress the header.

Signed-off-by: Simon Vincent <simon.vincent@xsilon.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agomrf24j40: use pr_* / dev_* instead of printk()
Varka Bhadram [Wed, 24 Sep 2014 10:21:32 +0000 (12:21 +0200)]
mrf24j40: use pr_* / dev_* instead of printk()

Replace printk() with dev_*() pr_*().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Acked-by: Alan Ott <alan@signal11.us>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agomrf24j40: remove unnecessary return statement
Varka Bhadram [Wed, 24 Sep 2014 10:21:31 +0000 (12:21 +0200)]
mrf24j40: remove unnecessary return statement

Remove the return statement in the void function.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Acked-by: Alan Ott <alan@signal11.us>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agomrf24j40: fix Missing a blank line after declarations
Varka Bhadram [Wed, 24 Sep 2014 10:21:30 +0000 (12:21 +0200)]
mrf24j40: fix Missing a blank line after declarations

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Acked-by: Alan Ott <alan@signal11.us>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Fix reason code used for rejecting SCO connections
Johan Hedberg [Wed, 24 Sep 2014 10:14:46 +0000 (13:14 +0300)]
Bluetooth: Fix reason code used for rejecting SCO connections

The core specification defines valid values for the
HCI_Reject_Synchronous_Connection_Request command to be 0x0D-0x0F. So
far the code has been using HCI_ERROR_REMOTE_USER_TERM (0x13) which is
not a valid value and is therefore being rejected by some controllers:

 > HCI Event: Connect Request (0x04) plen 10
bdaddr 40:6F:2A:6A:E5:E0 class 0x000000 type eSCO
 < HCI Command: Reject Synchronous Connection (0x01|0x002a) plen 7
bdaddr 40:6F:2A:6A:E5:E0 reason 0x13
Reason: Remote User Terminated Connection
 > HCI Event: Command Status (0x0f) plen 4
Reject Synchronous Connection (0x01|0x002a) status 0x12 ncmd 1
Error: Invalid HCI Command Parameters

This patch introduces a new define for a value from the valid range
(0x0d == Connection Rejected Due To Limited Resources) and uses it
instead for rejecting incoming connections.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Convert bt_<level> logging functions to return void
Joe Perches [Mon, 22 Sep 2014 18:17:41 +0000 (11:17 -0700)]
Bluetooth: Convert bt_<level> logging functions to return void

No caller or macro uses the return value so make all
the functions return void.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoBluetooth: Check for SCO type before setting retransmission effort
Bernhard Thaler [Tue, 23 Sep 2014 09:01:07 +0000 (11:01 +0200)]
Bluetooth: Check for SCO type before setting retransmission effort

SCO connection cannot be setup to devices that do not support retransmission.
Patch based on http://permalink.gmane.org/gmane.linux.bluez.kernel/7779 and
adapted for this kernel version.

Code changed to check SCO/eSCO type before setting retransmission effort
and max. latency. The purpose of the patch is to support older devices not
capable of eSCO.

Tested on Blackberry 655+ headset which does not support retransmission.
Credits go to Alexander Sommerhuber.

Signed-off-by: Bernhard Thaler <bernhard.thaler@r-it.at>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoBluetooth: Fix setting correct security level when initiating SMP
Johan Hedberg [Thu, 18 Sep 2014 08:26:32 +0000 (11:26 +0300)]
Bluetooth: Fix setting correct security level when initiating SMP

We can only determine the final security level when both pairing request
and response have been exchanged. When initiating pairing the starting
target security level is set to MEDIUM unless explicitly specified to be
HIGH, so that we can still perform pairing even if the remote doesn't
have MITM capabilities. However, once we've received the pairing
response we should re-consult the remote and local IO capabilities and
upgrade the target security level if necessary.

Without this patch the resulting Long Term Key will occasionally be
reported to be unauthenticated when it in reality is an authenticated
one.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoBluetooth: Remove exported hci_recv_fragment function
Marcel Holtmann [Tue, 16 Sep 2014 19:36:09 +0000 (21:36 +0200)]
Bluetooth: Remove exported hci_recv_fragment function

The hci_recv_fragment function is no longer used by any driver and thus
do not export it. In fact it is not even needed by the core and it can
be removed altogether.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoBluetooth: btusb: Implement driver internal packet reassembly
Marcel Holtmann [Tue, 16 Sep 2014 06:00:29 +0000 (08:00 +0200)]
Bluetooth: btusb: Implement driver internal packet reassembly

When receiving USB interrupt, bulk or isochronous packet, they normally
come in fragments. So far the driver just handed each fragment off to
the hci_recv_fragment function of the Bluetooth core. That function is
however so specific that is does not belong in the core. This patch
implements the same reassembly logic in the driver.

In addition this fixes a long standing bug where multiple complete
packets are received within a single USB packet.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoBluetooth: btusb: Split fragement receiption into separate functions
Marcel Holtmann [Tue, 16 Sep 2014 03:33:33 +0000 (05:33 +0200)]
Bluetooth: btusb: Split fragement receiption into separate functions

The actual packet reassembly should be done inside the driver. To allow
this to happen cleanly in future patches, split the fragment reception
into its own functions.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
9 years agoBluetooth: btusb: Fix old coding style issues
Marcel Holtmann [Tue, 16 Sep 2014 02:44:50 +0000 (04:44 +0200)]
Bluetooth: btusb: Fix old coding style issues

The btusb driver has been around for a while now and it is time to
bring its coding style in sync with what has been done for the
Bluetooth subsystem and other drivers.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>