platform/adaptation/renesas_rcar/renesas_kernel.git
11 years agoiwlwifi: mvm: BT Coex - adapt debugfs to new API
Emmanuel Grumbach [Sun, 30 Jun 2013 04:43:28 +0000 (07:43 +0300)]
iwlwifi: mvm: BT Coex - adapt debugfs to new API

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: don't use reduced Tx power when not applicable
Emmanuel Grumbach [Sun, 14 Jul 2013 10:40:21 +0000 (13:40 +0300)]
iwlwifi: mvm: don't use reduced Tx power when not applicable

When we have only one antenna for BT and WiFi, reduced Tx
power is irrelevant.
Also, in loose scheme, we should not use reduced Tx power
nor set the control mask to Tx power.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: make debugfs write() operations write up to count bytes
Djalal Harouni [Sat, 24 Aug 2013 13:35:53 +0000 (14:35 +0100)]
iwlwifi: mvm: make debugfs write() operations write up to count bytes

Some debugfs write() operations of the MVM Firmware will ignore the
count argument, and will copy more bytes than what was specified.
Fix this by getting the right count of bytes.

This will honor restrictions put on the number of bytes to write and
avoid strcmp() calls on garbage data.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: remove GF support in rs
Eyal Shapira [Sun, 11 Aug 2013 17:27:18 +0000 (20:27 +0300)]
iwlwifi: mvm: remove GF support in rs

mvm doesn't support HT GF so drop all relevant code in rs.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: support VHT in rs
Eyal Shapira [Sun, 11 Aug 2013 15:43:47 +0000 (18:43 +0300)]
iwlwifi: mvm: support VHT in rs

Enable rs algorithm to use VHT rates and use 80Mhz.
This enables reaching VHT rates which wasn't possible.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: BT Coex - use data from firmware
Emmanuel Grumbach [Sun, 30 Jun 2013 04:51:54 +0000 (07:51 +0300)]
iwlwifi: mvm: BT Coex - use data from firmware

The data in MailBox comes direclty from the BT core.
We should use the data processed by the WiFi fw that is
appended to the MailBox in the BT Coex notification.
Also decide on whether the Coex type based on the input
from the the firmware and not hard coded.

Also fix the SMPS SISO threshold to 2 (it was 3).

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: BT Coex - no need to send envelopes
Emmanuel Grumbach [Tue, 25 Jun 2013 12:42:03 +0000 (15:42 +0300)]
iwlwifi: mvm: BT Coex - no need to send envelopes

This was due to a fw remainder of old implementation.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: new BT Coex API
Emmanuel Grumbach [Tue, 18 Jun 2013 04:35:27 +0000 (07:35 +0300)]
iwlwifi: mvm: new BT Coex API

This is the new API for BT Coex. The full functionality
will be implemented in further patches.

Note: this disables BT Coex for the currently existing
fw (-7 version).

There is also a new command - the channel inhibition command.

This command tells BT what channels to avoid in order to
minimise the interaction between BT and WiFi.
We can tell BT about 2 channels, primary and secondary.
BT will not tune to primary at all and will avoid secondary
as much as possible.

This also means that we need to track vifs that AP / GO.
So rename iwl_mvm_bt_coex_vif_assoc to
iwl_mvm_bt_coex_vif_change to better reflect its real
meaning.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: support sched scan if supported by the fw
David Spinadel [Wed, 28 Aug 2013 06:29:43 +0000 (09:29 +0300)]
iwlwifi: mvm: support sched scan if supported by the fw

Add support for scheduled scan according to firmware support.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: add no_basic_ssid option
David Spinadel [Wed, 21 Aug 2013 06:14:27 +0000 (09:14 +0300)]
iwlwifi: mvm: add no_basic_ssid option

New FW doesn't use the SSID from scan request template. Adding
a TLV flag to indicate the change, and fixing the flows to send
the first SSID in SSID list if the flag is on.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: don't sleep while allocating in atomic context
Emmanuel Grumbach [Wed, 21 Aug 2013 11:27:40 +0000 (14:27 +0300)]
iwlwifi: mvm: don't sleep while allocating in atomic context

We want to dump the SRAM when we have an error interrupt
from the device. This happens in non-sleepable context,
hence the change.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: update expected tpt tables for VHT
Eyal Shapira [Sun, 4 Aug 2013 20:58:37 +0000 (23:58 +0300)]
iwlwifi: mvm: update expected tpt tables for VHT

VHT introduces MCS8 and MCS9. Update the expected tpt tables
to include these. Previous expected values for 20/40 MHz
are incorrect in certain cases so fix these as well.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Tested-by: Efi Tubul <efi.tubul@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: fix switch from shared antenna in case of BT load
Eyal Shapira [Sun, 28 Jul 2013 23:02:47 +0000 (23:02 +0000)]
iwlwifi: mvm: fix switch from shared antenna in case of BT load

Current code didn't handle well the case where we're in SISO using
ANT B and there's a BT load. Switch to ANT A in this case.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: pcie: clean RFKILL interrupt in AMPG
Emmanuel Grumbach [Thu, 25 Jul 2013 10:14:34 +0000 (13:14 +0300)]
iwlwifi: pcie: clean RFKILL interrupt in AMPG

Newer firmware don't clean the RFKILL interrupt in APMG, do
it in driver instead.
If we forget to do so, we can't send HCMD to firmware while
the NIC is in RFKILL state.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: split ADD_STA and ADD_STA_KEY in firmware API
Max Stepanov [Sun, 7 Apr 2013 06:11:21 +0000 (09:11 +0300)]
iwlwifi: mvm: split ADD_STA and ADD_STA_KEY in firmware API

Add support for new station management firmware API. The old
ADD_MODIFY_STA command has been replaced with two: a modified
ADD_MODIFY_STA and a new ADD_MODIFY_STA_KEY command.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Adjust some power management constants
Alexander Bondar [Sun, 18 Aug 2013 13:22:52 +0000 (16:22 +0300)]
iwlwifi: mvm: Adjust some power management constants

Adjust the following:

- RX/TX AP-to-PSM timeout in case of uAPSD and PBW snoozing
- PSM-to-AM TX/RX heavy traffic thresholds
- Beacon abort escape timer for D3/D0i3

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: fix locking in iwl_mvm_bt_rssi_event()
Johannes Berg [Wed, 2 Oct 2013 10:05:24 +0000 (12:05 +0200)]
iwlwifi: mvm: fix locking in iwl_mvm_bt_rssi_event()

This will deadlock due to commit 9f34783863bea806
("iwlwifi: mvm: Implement BT coex notifications"):

  =============================================
  [ INFO: possible recursive locking detected ]
  3.5.0 #10 Tainted: G        W  O
  ---------------------------------------------
  kworker/2:1/5214 is trying to acquire lock:
   (&mvm->mutex){+.+.+.}, at: [<ffffffffa03be23e>] iwl_mvm_bt_rssi_event+0x5e/0x210 [iwlmvm]

  but task is already holding lock:
   (&mvm->mutex){+.+.+.}, at: [<ffffffffa03ab2d9>] iwl_mvm_async_handlers_wk+0x49/0x120 [iwlmvm]

  other info that might help us debug this:
   Possible unsafe locking scenario:

         CPU0
         ----
    lock(&mvm->mutex);
    lock(&mvm->mutex);

   *** DEADLOCK ***

Change-Id: I9104f252b34676e2f7ffcd51166f95367e08a4d9
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-on: https://gerrit.rds.intel.com/21887
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Conflicts:
drivers/net/wireless/iwlwifi/mvm/bt-coex.c

11 years agoiwlwifi: mvm: Implement BT coex notifications
Andrei Otcheretianski [Sun, 21 Jul 2013 14:37:19 +0000 (17:37 +0300)]
iwlwifi: mvm: Implement BT coex notifications

Use beacon statistics notification handler
to notify bt coex about rssi changes.
Mac80211's mechanism is not used anymore.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: give client MACs time to synchronise during restart
Johannes Berg [Fri, 3 May 2013 09:16:15 +0000 (11:16 +0200)]
iwlwifi: mvm: give client MACs time to synchronise during restart

When firmware restart happens, the timers are obviously reset and
the new firmware has no synchronisation with the AP as we program
timings to the pre-restart values. The firmware should attempt to
synchronise by itself, but in multi-channel scenarios this isn't
easy, particularly since it has to try to keep service quality up
for other MACs.

To make it more reliable, give each client MAC some time to catch
beacons when restarting or resuming. Service quality was impacted
anyway (or in resume doesn't really matter much.)

Reviewed-by: Moshe Island <moshe.island@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: remove rs FSM actions relevant only for 3 antennas
Eyal Shapira [Sun, 28 Jul 2013 23:02:46 +0000 (23:02 +0000)]
iwlwifi: mvm: remove rs FSM actions relevant only for 3 antennas

The XXX_SWITCH_ANTENNA1/2 actions keep track of switching between
3 single antennas or between 3 pairs in case of MIMO2 on a MIMO3 device.
As current and future chips will have at most 2 antennas drop these.
While at it also convert the actions into enums and cleanup
the code a bit.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: use CTS to Self if firmware allows it
Emmanuel Grumbach [Tue, 20 Aug 2013 05:19:32 +0000 (08:19 +0300)]
iwlwifi: mvm: use CTS to Self if firmware allows it

Newer firmware fixed a bug that prevented to use CTS to
self. Firmwares with API greater than 8 have this bug
fixed. Enable the feature for these firmwares only.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: debugfs: add an option to set antennas for scan command
Oren Givon [Mon, 19 Aug 2013 05:36:48 +0000 (08:36 +0300)]
iwlwifi: mvm: debugfs: add an option to set antennas for scan command

Add an option to set rx antennas for the scan command from debugfs.
Create a file called ant_rxchain in the mvm debugfs directory.
To choose antennas, write a number between 1-7 to ant_rxchain.
Write 1 for A, 2 for B, 3 for AB and so on.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: query firmware for non-QoS seqno
Johannes Berg [Thu, 8 Aug 2013 07:30:13 +0000 (09:30 +0200)]
iwlwifi: mvm: query firmware for non-QoS seqno

Instead of keeping track of the non-QoS seqno for each station,
query the firmware when suspending, that's more efficient. As
this can fail, move the station ID mangling later in the code.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: implement beacon filtering testmode command
Johannes Berg [Thu, 1 Aug 2013 12:17:15 +0000 (14:17 +0200)]
iwlwifi: mvm: implement beacon filtering testmode command

Add a testmode command to (manually) disable (and re-enable)
beacon filtering for testing purposes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: implement NoA testing using testmode cmd
David Spinadel [Wed, 31 Jul 2013 15:07:21 +0000 (18:07 +0300)]
iwlwifi: mvm: implement NoA testing using testmode cmd

For testing, implement setting continuous NoA duration
using a new MVM-specific testmode command.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: pcie: fix merge damage
Johannes Berg [Mon, 30 Sep 2013 09:02:46 +0000 (11:02 +0200)]
iwlwifi: pcie: fix merge damage

The merge b35c8097 seems to have lost commit eabc4ac5d,
put the code back.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoBluetooth: Increment management interface revision
Marcel Holtmann [Wed, 2 Oct 2013 12:18:31 +0000 (05:18 -0700)]
Bluetooth: Increment management interface revision

This patch increments the management interface revision due to the
various fixes, improvements and other changes that have gone in
lately.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoBluetooth: Fix advertising data flags with disabled BR/EDR
Johan Hedberg [Wed, 2 Oct 2013 13:02:24 +0000 (16:02 +0300)]
Bluetooth: Fix advertising data flags with disabled BR/EDR

We shouldn't include the simultaneous LE & BR/EDR flags in the LE
advertising data if BR/EDR is disabled on a dual-mode controller. This
patch fixes this issue and ensures that the create_ad function generates
the correct flags when BR/EDR is disabled.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: Fix REJECTED vs NOT_SUPPORTED mgmt responses
Johan Hedberg [Wed, 2 Oct 2013 12:45:22 +0000 (15:45 +0300)]
Bluetooth: Fix REJECTED vs NOT_SUPPORTED mgmt responses

The REJECTED management response should mainly be used when the adapter
is in a state where we cannot accept some command or a specific
parameter value. The NOT_SUPPORTED response in turn means that the
adapter really cannot support the command or parameter value.

This patch fixes this distinction and adds two helper functions to
easily get the appropriate LE or BR/EDR related status response.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: Add management command for setting static address
Marcel Holtmann [Wed, 2 Oct 2013 11:41:30 +0000 (04:41 -0700)]
Bluetooth: Add management command for setting static address

On dual-mode BR/EDR/LE and LE only controllers it is possible
to configure a random address. There are two types or random
addresses, one is static and the other private. Since the
random private addresses require special privacy feature to
be supported, the configuration of these two are kept separate.

This command allows for setting the static random address. It is
only supported on controllers with LE support. The static random
address is suppose to be valid for the lifetime of the controller
or at least until the next power cycle. To ensure such behavior,
setting of the address is limited to when the controller is
powered off.

The special BDADDR_ANY address (00:00:00:00:00:00) can be used to
disable the static address. This is also the default value.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoBluetooth: Restrict disabling of HS when controller is powered off
Marcel Holtmann [Wed, 2 Oct 2013 07:27:02 +0000 (00:27 -0700)]
Bluetooth: Restrict disabling of HS when controller is powered off

Disabling the high speed setting when the controller is powered on has
too many side effects that are not taken care of. And in general it
is not an useful operation anyway. So just make such a command fail
with a rejection error message.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoBluetooth: Add a new mgmt_set_bredr command
Johan Hedberg [Wed, 2 Oct 2013 10:43:14 +0000 (13:43 +0300)]
Bluetooth: Add a new mgmt_set_bredr command

This patch introduces a new mgmt command for enabling/disabling BR/EDR
functionality. This can be convenient when one wants to make a dual-mode
controller behave like a single-mode one. The command is only available
for dual-mode controllers and requires that LE is enabled before using
it. The BR/EDR setting can be enabled at any point, however disabling it
requires the controller to be powered off (otherwise a "rejected"
response will be sent).

Disabling the BR/EDR setting will automatically disable all other BR/EDR
related settings.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: Introduce a new HCI_BREDR_ENABLED flag
Johan Hedberg [Wed, 2 Oct 2013 10:43:13 +0000 (13:43 +0300)]
Bluetooth: Introduce a new HCI_BREDR_ENABLED flag

To allow treating dual-mode (BR/EDR/LE) controllers as single-mode ones
(LE-only) we want to introduce a new HCI_BREDR_ENABLED flag to track
whether BR/EDR is enabled or not (previously we simply looked at the
feature bit with lmp_bredr_enabled).

This patch add the new flag and updates the relevant places to test
against it instead of using lmp_bredr_enabled. The flag is by default
enabled when registering an adapter and only cleared if necessary once
the local features have been read during the HCI init procedure.

We cannot completely block BR/EDR usage in case user space uses raw HCI
sockets but the patch tries to block this in places where possible, such
as the various BR/EDR specific ioctls.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agocfg80211: vlan priority handling in WMM
cedric Voncken [Mon, 26 Aug 2013 12:04:52 +0000 (14:04 +0200)]
cfg80211: vlan priority handling in WMM

If the VLAN tci is set in skb->vlan_tci use the
priority field to determine the WMM priority.

Signed-off-by: cedric Voncken <cedric.voncken@acksys.fr>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoBluetooth: btmrvl: add calibration data download support
Amitkumar Karwar [Tue, 1 Oct 2013 19:19:15 +0000 (12:19 -0700)]
Bluetooth: btmrvl: add calibration data download support

A text file containing calibration data in hex format can
be provided at following path:

/lib/firmware/mrvl/sd8797_caldata.conf

The data will be downloaded to firmware during initialization.

Reviewed-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Hyuckjoo Lee <hyuckjoo.lee@samsung.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: btmrvl: add setup handler
Amitkumar Karwar [Tue, 1 Oct 2013 19:19:14 +0000 (12:19 -0700)]
Bluetooth: btmrvl: add setup handler

Move initialization code to hdev's setup handler.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: btmrvl: get rid of struct btmrvl_cmd
Amitkumar Karwar [Tue, 1 Oct 2013 19:19:13 +0000 (12:19 -0700)]
Bluetooth: btmrvl: get rid of struct btmrvl_cmd

Replace this proprietary structure with the standard one
(struct hci_command_hdr).

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: btmrvl: add btmrvl_send_sync_cmd() function
Amitkumar Karwar [Tue, 1 Oct 2013 19:19:12 +0000 (12:19 -0700)]
Bluetooth: btmrvl: add btmrvl_send_sync_cmd() function

Command preparation code is used multiple times. This patch
separate out this common code and create btmrvl_send_sync_cmd()
function.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: Fix workqueue synchronization in hci_dev_open
Johan Hedberg [Tue, 1 Oct 2013 19:44:50 +0000 (22:44 +0300)]
Bluetooth: Fix workqueue synchronization in hci_dev_open

When hci_sock.c calls hci_dev_open it needs to ensure that there isn't
pending work in progress, such as that which is scheduled for the
initial setup procedure or the one for automatically powering off after
the setup procedure. This adds the necessary calls to ensure that any
previously scheduled work is completed before attempting to call
hci_dev_do_open.

This patch fixes a race with old user space versions where we might
receive a HCIDEVUP ioctl before the setup procedure has been completed.
When that happens the setup procedures callback may fail early and leave
the device in an inconsistent state, causing e.g. the setup callback to
be (incorrectly) called more than once.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: Refactor hci_dev_open to a separate hci_dev_do_open function
Johan Hedberg [Tue, 1 Oct 2013 19:44:49 +0000 (22:44 +0300)]
Bluetooth: Refactor hci_dev_open to a separate hci_dev_do_open function

The requirements of an external call to hci_dev_open from hci_sock.c are
different to that from within hci_core.c. In the former case we want to
flush any pending work in hdev->req_workqueue whereas in the latter we
don't (since there we are already calling from within the workqueue
itself). This patch does the necessary refactoring to a separate
hci_dev_do_open function (analogous to hci_dev_do_close) but does not
yet introduce the synchronizations relating to the workqueue usage.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
11 years agoBluetooth: Enable -D__CHECK_ENDIAN__ for sparse by default
Marcel Holtmann [Wed, 2 Oct 2013 05:59:25 +0000 (22:59 -0700)]
Bluetooth: Enable -D__CHECK_ENDIAN__ for sparse by default

The Bluetooth protocol and hardware is pretty much all little endian
and so when running sparse via "make C=2" for example, enable the
endian checks by default.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoBluetooth: Require CAP_NET_ADMIN for HCI User Channel operation
Marcel Holtmann [Wed, 2 Oct 2013 05:59:24 +0000 (22:59 -0700)]
Bluetooth: Require CAP_NET_ADMIN for HCI User Channel operation

The HCI User Channel operation is an admin operation that puts the
device into promiscuous mode for single use. It is more suitable
to require CAP_NET_ADMIN than CAP_NET_RAW.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoBluetooth: Send new settings event when changing high speed option
Marcel Holtmann [Wed, 2 Oct 2013 05:59:23 +0000 (22:59 -0700)]
Bluetooth: Send new settings event when changing high speed option

When enabling or disabling high speed setting it is required to send
a new settings event to inform other management interface users about
the changed settings.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoBluetooth: Provide high speed configuration option
Marcel Holtmann [Wed, 2 Oct 2013 05:59:22 +0000 (22:59 -0700)]
Bluetooth: Provide high speed configuration option

Hiding the Bluetooth high speed support behind a module parameter is
not really useful. This can be enabled and disabled at runtime via
the management interface. This also has the advantage that this can
now be changed per controller and not just global.

This patch removes the module parameter and exposes the high speed
setting of the management interface to all controllers.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoBluetooth: Replace BDADDR_LOCAL with BDADDR_NONE
Marcel Holtmann [Wed, 2 Oct 2013 05:59:21 +0000 (22:59 -0700)]
Bluetooth: Replace BDADDR_LOCAL with BDADDR_NONE

The BDADDR_LOCAL is a relict from userspace and has never been used
within the kernel. So remove that constant and replace it with a new
BDADDR_NONE that is similar to HCI_DEV_NONE with all bits set.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoBluetooth: Use only 2 bits for controller type information
Marcel Holtmann [Wed, 2 Oct 2013 05:59:20 +0000 (22:59 -0700)]
Bluetooth: Use only 2 bits for controller type information

The controller type is limited to BR/EDR/LE and AMP controllers. This
can be easily encoded with just 2 bits and still leave enough room
for future controller types.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
11 years agoregulatory: enable channels 52-64 and 100-144 for world roaming
Johannes Berg [Mon, 4 Mar 2013 19:54:46 +0000 (20:54 +0100)]
regulatory: enable channels 52-64 and 100-144 for world roaming

If allowed in a country, these channels typically require DFS
so mark them as such. Channel 144 is a bit special, it's coming
into use now to allow more VHT 80 channels, but world roaming
with passive scanning is acceptable anyway. It seems fairly
unlikely that it'll be used as the control channel for a VHT
AP, but it needs to be present to allow a full VHT connection
to an AP that uses it as one of the secondary channels.

Also enable VHT 160 on these channels, and also for channels
36-48 to be able to use VHT 160 there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl80211: allow CAC only if no operation is going on
Simon Wunderlich [Tue, 3 Sep 2013 17:43:18 +0000 (19:43 +0200)]
nl80211: allow CAC only if no operation is going on

A CAC should fail if it is triggered while the interface is already
running.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: improve default WMM parameter setting
Fred Zhou [Mon, 9 Sep 2013 15:03:41 +0000 (23:03 +0800)]
mac80211: improve default WMM parameter setting

Move the default setting for WMM parameters outside the for loop
to avoid redundant assignment multiple times.

Signed-off-by: Fred Zhou <fred.zy@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: support reporting A-MSDU subframes individually
Michal Kazior [Mon, 23 Sep 2013 13:34:38 +0000 (15:34 +0200)]
mac80211: support reporting A-MSDU subframes individually

Some devices may not be able to report A-MSDUs in
single buffers. Drivers for such devices were
forced to re-assemble A-MSDUs which would then
be eventually disassembled by mac80211. This could
lead to CPU cache thrashing and poor performance.

Since A-MSDU has a single sequence number all
subframes share it. This was in conflict with
retransmission/duplication recovery
(IEEE802.11-2012: 9.3.2.10).

Patch introduces a new flag that is meant to be
set for all individually reported A-MSDU subframes
except the last one. This ensures the
last_seq_ctrl is updated after the last subframe
is processed. If an A-MSDU is actually a duplicate
transmission all reported subframes will be
properly discarded.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
[johannes: add braces that were missing even before]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: use exact-size allocation for authentication frame
Fred Zhou [Tue, 24 Sep 2013 02:33:01 +0000 (10:33 +0800)]
mac80211: use exact-size allocation for authentication frame

The authentication frame has a fixied size of 30 bytes
(including header, algo num, trans seq num, and status)
followed by a variable challenge text.
Allocate using exact size, instead of over-allocation
by sizeof(ieee80211_mgmt).

Signed-off-by: Fred Zhou <fred.zy@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: parse dfs region for internal regdb option
Janusz Dziedzic [Tue, 17 Sep 2013 06:25:36 +0000 (08:25 +0200)]
cfg80211: parse dfs region for internal regdb option

Add support for parsing and setting the dfs region (ETSI, FCC, JP)
when the internal regulatory database is used. Before this
the DFS region was being ignored even if present on the used
db.txt

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Reviewed-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: add explicit IBSS driver operations
Johannes Berg [Mon, 19 Aug 2013 16:48:41 +0000 (18:48 +0200)]
mac80211: add explicit IBSS driver operations

This can be useful for drivers if they have any failure cases
when joining an IBSS. Also move setting the queue parameters
to before this new call, in case the new driver op needs them
already.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoieee80211: fix vht cap definitions
Eliad Peller [Thu, 29 Aug 2013 12:03:14 +0000 (15:03 +0300)]
ieee80211: fix vht cap definitions

VHT_CAP_BEAMFORMER_ANTENNAS cap is actually defined in the draft as
VHT_CAP_BEAMFORMEE_STS_MAX, and its size is 3 bits long.

VHT_CAP_SOUNDING_DIMENSIONS is also 3 bits long.

Fix the definitions and change the cap masking accordingly.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: fix some snprintf misuses
Eliad Peller [Tue, 27 Aug 2013 09:40:15 +0000 (12:40 +0300)]
mac80211: fix some snprintf misuses

In some debugfs related functions snprintf was used
while scnprintf should have been used instead.

(blindly adding the return value of snprintf and supplying
it to the next snprintf might result in buffer overflow when
the input is too big)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowlcore: always register dummy hardirq
Arik Nemtsov [Tue, 17 Sep 2013 15:41:30 +0000 (18:41 +0300)]
wlcore: always register dummy hardirq

This keeps the kernel happy when using edge-irqs and requesting a
threaded irq.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowl18xx: print new RDL versions during boot
Victor Goldenshtein [Tue, 17 Sep 2013 15:41:29 +0000 (18:41 +0300)]
wl18xx: print new RDL versions during boot

Extract and print info for the new RDL 5, 6, 7 and 8.
Replace const struct with function which translates
the RDL number to string.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Barak Bercovitz <barak@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowl18xx: fix boot process in high temperature environment
Victor Goldenshtein [Tue, 17 Sep 2013 15:41:28 +0000 (18:41 +0300)]
wl18xx: fix boot process in high temperature environment

In addition to existing WCS PLL configuration add and enable
also the coex PLL during init phase. This fixes boot failures
due to silicon latchup in high temperature environment (>85c).

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Nadim Zubidat <nadimz@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowlcore: clarify and fix regulatory domain bit translation
Eliad Peller [Tue, 17 Sep 2013 15:41:27 +0000 (18:41 +0300)]
wlcore: clarify and fix regulatory domain bit translation

Channels 52-64 were mapped incorrectly.

Refactor and document wlcore_get_reg_conf_ch_idx() in
order to make it clear what's going on there.

While on it, fix the return value check to consider
0 as a valid return value as well (indicates channel 1).

Reported-by: Yaniv Machani <yanivma@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowlcore: remove unsupported channels
Eliad Peller [Tue, 17 Sep 2013 15:41:26 +0000 (18:41 +0300)]
wlcore: remove unsupported channels

The fw doesn't support channels 7,9,11 in 5ghz band,
so don't advertise supporting them.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowlcore: fix unsafe dereference of the wlvif
Victor Goldenshtein [Tue, 17 Sep 2013 15:41:25 +0000 (18:41 +0300)]
wlcore: fix unsafe dereference of the wlvif

wlvif could be passed as NULL from the wlcore_tx_work_locked()
to the wl1271_prepare_tx_frame() and to wl1271_skb_queue_head()
functions. This may lead to a Kernel panic, fix this by
validating that wlvif != NULL.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowlcore: cleanup scan debug prints
Victor Goldenshtein [Tue, 17 Sep 2013 15:41:24 +0000 (18:41 +0300)]
wlcore: cleanup scan debug prints

Remove scan debug dumps which are rarely used.
Make scan debug prints more clear and short.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowlcore: re-enable idle handling
Arik Nemtsov [Tue, 17 Sep 2013 15:41:23 +0000 (18:41 +0300)]
wlcore: re-enable idle handling

We need some stuff done on idle change, most notably we have to stop
sched-scanning. Take care of this by reintroducing idle handling.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowlcore: disable elp sleep while in plt mode
Yair Shapira [Tue, 17 Sep 2013 15:41:22 +0000 (18:41 +0300)]
wlcore: disable elp sleep while in plt mode

We now disable elp sleep during plt mode to allow normal operation of
plt tools such as calibrator.

Having elp_sleep enabled during plt mode is actually not required and
in fact it disrupt plt operations such as rx statistics etc.

Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowlcore: add new plt power-mode: CHIP_AWAKE
Yair Shapira [Tue, 17 Sep 2013 15:41:21 +0000 (18:41 +0300)]
wlcore: add new plt power-mode: CHIP_AWAKE

Under this mode the chip is powered on including sdio
but no FW is downloaded and run, interrupts are not enabled, etc...

This mode is intended to allow RTTT to bridge sdio as a transport
to the chip.

Driver only provides sdio access using the dev_mem debugfs file.

Some fixes done to the code that ensures that PLT mode and normal
driver power mode (ifconfig/add_interface) are mutually excluded.

Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agowlcore: ROC on AP channel before auth reply
Arik Nemtsov [Tue, 17 Sep 2013 15:41:20 +0000 (18:41 +0300)]
wlcore: ROC on AP channel before auth reply

Start a ROC on the AP channel beforing sending the authentication reply
to a connecting STA. This ROC is held up to 1 second via a timer. If the
station is authorized and added by mac80211, the ROC is extended until
the station is fully authorized.
We make sure not to ROC twice when several stations are connecting in
parallel and to only release the ROC when both the pending-reply timer
and the STA-state callbacks do not require it.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Gustavo Padovan [Fri, 27 Sep 2013 14:56:14 +0000 (11:56 -0300)]
Merge git://git./linux/kernel/git/bluetooth/bluetooth

Conflicts:
net/bluetooth/hci_core.c

11 years agort2x00: Fix rf register for RT3070
Kevin Lo [Wed, 18 Sep 2013 08:22:44 +0000 (16:22 +0800)]
rt2x00: Fix rf register for RT3070

Fix RT3070 chip RF initial value to be similar to the latest Ralink vendor
driver.

Tested on Asus N13 usb wifi dongle.

Signed-off-by: Kevin Lo <kevlo@kevlo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: rtlwifi: Replace variable with a break
Peter Senna Tschudin [Sun, 22 Sep 2013 20:22:46 +0000 (22:22 +0200)]
wireless: rtlwifi: Replace variable with a break

This patch removes the variable continual, and change the while loop
to break when efuse_data == 0xFF.

Tested by compilation only.

CC: Joe Perches <joe@perches.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: remove duplicate declarations and macros in headers
Catalin Iacob [Sun, 22 Sep 2013 09:06:26 +0000 (11:06 +0200)]
rtlwifi: remove duplicate declarations and macros in headers

This patch brings no functional change.

There are still duplicate macros across the rtlwifi directory, for example
IQK_DELAY_TIME is defined multiple times, sometimes with different values,
this patch only removes duplicates within the same header file.

Signed-off-by: Catalin Iacob <iacobcatalin@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Remove incorrect diversity initialization
Sujith Manoharan [Mon, 16 Sep 2013 05:07:01 +0000 (10:37 +0530)]
ath9k: Remove incorrect diversity initialization

Fast antenna diversity is required only for single chain
chips and the diversity initialization is done in the
per-family board setup routines. Enabling of diversity
should be done based on the calibrated EEPROM/OTP data,
doing it for all chips is incorrect.

Remove the code that sets the fast_div bit for all cards, since
the documentation for the AR_PHY_CCK_DETECT register says:

reg 642: sig_detect_cck
enable_ant_fast_div : Only used for single chain chips.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Handle FATAL interrupts correctly
Sujith Manoharan [Mon, 16 Sep 2013 05:07:00 +0000 (10:37 +0530)]
ath9k: Handle FATAL interrupts correctly

When a FATAL interrupt is received, a full chip reset is
required, which is done in the main tasklet. But since
the reset routine is scheduled as a work item, make sure
that interrupts are not enabled in the tasklet before the
reset is done.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix NF calibration for single stream cards
Sujith Manoharan [Mon, 16 Sep 2013 05:06:59 +0000 (10:36 +0530)]
ath9k: Fix NF calibration for single stream cards

Rather than using the chip ID to read only chain-0 CCA
registers and avoid reading chain-1, use the RX chainmask
instead. There are some 1-stream PCI devices based on AR9287
such as TL-WN751ND. Improper NF calibration might result in
DMA errors/timeouts.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: rtl8192cu: Convert driver to use rtl_process_phyinfo()
Larry Finger [Fri, 13 Sep 2013 17:44:27 +0000 (12:44 -0500)]
rtlwifi: rtl8192cu: Convert driver to use rtl_process_phyinfo()

Remove routine _rtl92c_process_phyinfo() by using the equivalent routine
in driver rtlwifi.

This change also allows the removal of 5 additional routines from rtl8192cu.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: mark wmi_event_swba as __packed
Chris Metcalf [Fri, 13 Sep 2013 16:14:09 +0000 (12:14 -0400)]
ath9k: mark wmi_event_swba as __packed

The other structures in wmi.h are already marked this way.
Without this marking, we get an unaliged access panic in the tilegx kernel:

Starting stack dump of tid 0, pid 0 (swapper) on cpu 35 at cycle 198675113844
  frame 0: 0xfffffff7103ada90 ath9k_htc_swba+0x120/0x618 [ath9k_htc]
  frame 1: 0xfffffff7103a4b10 ath9k_wmi_event_tasklet+0x1b0/0x270 [ath9k_htc]
  frame 2: 0xfffffff700326570 tasklet_action+0x148/0x298
  [...]

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: rt2800lib: fix band selection and LNA PE control for RT3593 PCIe cards
Gabor Juhos [Wed, 11 Sep 2013 17:56:45 +0000 (19:56 +0200)]
rt2x00: rt2800lib: fix band selection and LNA PE control for RT3593 PCIe cards

The band selection and PE control code for the
RT3593 chipsets only handles USB based devices
currently. Due to this limitation RT3593 based
PCIe cards are not working correctly.

On PCIe cards band selection is controlled via
GPIO #8 which is identical to the USB devices.
The LNA PE control is slightly different, all
LNA PEs are controlled by GPIO #4.

Update the code to configure the GPIO_CTRL register
correctly on PCIe devices.

Cc: Steven Liu <steven.liu@mediatek.com>
Cc: JasonYS Cheng <jasonys.cheng@mediatek.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix PeakDetect calibration for AR9462
Sujith Manoharan [Wed, 11 Sep 2013 11:06:32 +0000 (16:36 +0530)]
ath9k: Fix PeakDetect calibration for AR9462

Since HW PeakDetect calibration is turned on for AR9462,
various conditions have to be handled in the driver:

* Enable agc_cal when loading RTT fails.
* Disable SW PeakDetect calibration when RTT calibration is not enabled.
* Keep SW PeakDetect calibration result in driver.
* Update RTT table according to the saved value.
* Write RTT back after modifying SW RTT table.
* Enable local mode for PeakDetect calibration and restore values.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Use bitops for calibration flags
Sujith Manoharan [Wed, 11 Sep 2013 11:06:31 +0000 (16:36 +0530)]
ath9k: Use bitops for calibration flags

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Handle abnormal NAV in AP mode
Sujith Manoharan [Wed, 11 Sep 2013 16:00:27 +0000 (21:30 +0530)]
ath9k: Handle abnormal NAV in AP mode

Beacon transmission would get stuck if the NAV is
an invalid value for some reason. Check and correct
the NAV value in the HW when this happens.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix issue with parsing malformed CFP IE
Sujith Manoharan [Wed, 11 Sep 2013 06:10:58 +0000 (11:40 +0530)]
ath9k: Fix issue with parsing malformed CFP IE

All QCA chips have the ability to parse the CF Parameter Set
IE in beacons. If the IE is malformed in the beacons from some
APs [1], the HW locks up. In AP mode, a beacon stuck would happen
and in client mode, a disconnection usually is the result.

To fix this issue, set the AR_PCU_MISC_MODE2_CFP_IGNORE to ignore
the CFP IE in beacons - this is applicable for all chips. For
AP mode, if this issue happens, the NAV is also corrupted and has
to be reset - this will be done in a subsequent patch.

[1] : http://msujith.org/ath9k/cfp/Malformed-CF-Param.png

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix calibration for AR9462
Sujith Manoharan [Wed, 11 Sep 2013 06:10:57 +0000 (11:40 +0530)]
ath9k: Fix calibration for AR9462

TX IQ calibration is disabled by default for AR9462, this
is done using the initvals (reg 0xa644).

But, to compensate for this, the AR_PHY_RX_DELAY register
should be set to the max allowed value when performing
calibration.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: rtl818x: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:32:19 +0000 (20:32 +0900)]
wireless: rtl818x: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: p54pci: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:30:49 +0000 (20:30 +0900)]
wireless: p54pci: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: orinoco: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:29:19 +0000 (20:29 +0900)]
wireless: orinoco: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: mwl8k: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:27:49 +0000 (20:27 +0900)]
wireless: mwl8k: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: ipw2x00: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:27:09 +0000 (20:27 +0900)]
wireless: ipw2x00: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: wil6210: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:26:13 +0000 (20:26 +0900)]
wireless: wil6210: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: ath10k: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:25:11 +0000 (20:25 +0900)]
wireless: ath10k: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: airo: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:23:50 +0000 (20:23 +0900)]
wireless: airo: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: adm8211: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:22:10 +0000 (20:22 +0900)]
wireless: adm8211: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: iwlegacy: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:19:41 +0000 (20:19 +0900)]
wireless: iwlegacy: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: rtlwifi: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:18:38 +0000 (20:18 +0900)]
wireless: rtlwifi: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: wl12xx: use dev_get_platdata()
Jingoo Han [Tue, 10 Sep 2013 08:58:32 +0000 (17:58 +0900)]
wireless: wl12xx: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: wlcore: use dev_get_platdata()
Jingoo Han [Tue, 10 Sep 2013 08:57:57 +0000 (17:57 +0900)]
wireless: wlcore: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: wl1251: use dev_get_platdata()
Jingoo Han [Tue, 10 Sep 2013 08:57:05 +0000 (17:57 +0900)]
wireless: wl1251: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: libertas: use dev_get_platdata()
Jingoo Han [Tue, 10 Sep 2013 08:56:27 +0000 (17:56 +0900)]
wireless: libertas: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: cw1200: use dev_get_platdata()
Jingoo Han [Tue, 10 Sep 2013 08:55:41 +0000 (17:55 +0900)]
wireless: cw1200: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: brcmfmac: use dev_get_platdata()
Jingoo Han [Tue, 10 Sep 2013 08:54:47 +0000 (17:54 +0900)]
wireless: brcmfmac: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: ath9k: use dev_get_platdata()
Jingoo Han [Tue, 10 Sep 2013 08:53:02 +0000 (17:53 +0900)]
wireless: ath9k: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: ath5k: use dev_get_platdata()
Jingoo Han [Tue, 10 Sep 2013 08:51:47 +0000 (17:51 +0900)]
wireless: ath5k: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>