platform/kernel/linux-exynos.git
9 years agoMerge ath-next from ath.git
Kalle Valo [Thu, 5 Mar 2015 09:01:38 +0000 (11:01 +0200)]
Merge ath-next from ath.git

Major changes in ath10k:

* qca6174: enable STA transmit beamforming (TxBF) support
* disable multi-vif power save by default

9 years agoath10k: disable multi-vif ps by default
Michal Kazior [Fri, 13 Feb 2015 12:30:16 +0000 (13:30 +0100)]
ath10k: disable multi-vif ps by default

Not all firmware revisions have a proper
multi-interface client powersaving implementation,
e.g. qca6174 WLAN.RM.2.0-00073.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: workaround qca6174 sta powersave issue
Michal Kazior [Fri, 13 Feb 2015 12:30:15 +0000 (13:30 +0100)]
ath10k: workaround qca6174 sta powersave issue

qca6184 WLAN.RM.2.0-00073 has a bug in sta
powersave state machine and requires peer param to
be poked to enable the powersave.

Calling this unconditionally should be safe for
other chips/firmwares.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix wmm params per vdev
Marek Puzyniak [Tue, 10 Feb 2015 11:38:15 +0000 (12:38 +0100)]
ath10k: fix wmm params per vdev

During wmm tests changing wmm parameters did not change anything.
This was because of mismatch in WMM params per vdev command.
WMM params per vdev uses different command structure than wmm params
per pdev command.

Patch concerns qca6174.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: workaround corrupted htt rx events
Michal Kazior [Mon, 9 Feb 2015 14:04:55 +0000 (15:04 +0100)]
ath10k: workaround corrupted htt rx events

qca6174 WLAN.RM.2.0-00073 firmware uses full rx
reordering offload and delivers Rx via a new HTT
event. The event however is incorrectly generated
in firmware and becomes overly long (with trailing
garbage). This was hitting defined CE buffer limit
that was programmed to the device and caused
device to crash upon busier Rx traffic.

Increasing the CE buffer limit for HTT Rx pipe to
2KBytes seems to be enough to workaround this
problem.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: delete unnecessary checks before the function call "release_firmware"
Markus Elfring [Wed, 4 Feb 2015 18:30:23 +0000 (19:30 +0100)]
ath10k: delete unnecessary checks before the function call "release_firmware"

The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agobcma: gpio: enable GPIO IRQ domain on BCM5301X
Rafał Miłecki [Fri, 20 Feb 2015 10:49:05 +0000 (11:49 +0100)]
bcma: gpio: enable GPIO IRQ domain on BCM5301X

Just like on BCM47XX arch, BCM5301X also has ChipCommon with IRQ for
GPIOs. Now we have interrupts working on BCM5301X we can finally make
use of it. This has been successfully tested on 5 different devices
(Buffalo, Luxul, Netgear).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agossb: Silence warning for unknown backplane revision
Larry Finger [Wed, 18 Feb 2015 20:09:38 +0000 (14:09 -0600)]
ssb: Silence warning for unknown backplane revision

When using a BCM4318 in a PCMCIA format, I get a startup message that the
device uses backplane revision 0xF000000. Next a WARNING is logged. Despite
the message, the device works fine, This patch silences the warning.

Cc: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: increase cmd buffer size to avoid sscanf buffer overflow
Colin Ian King [Sun, 1 Mar 2015 17:48:33 +0000 (17:48 +0000)]
wil6210: increase cmd buffer size to avoid sscanf buffer overflow

cppcheck detected a buffer overflow:

[drivers/net/wireless/ath/wil6210/debugfs.c:634]: (error) Width 8
  given in format string (no. 1) is larger than destination buffer
  'cmd[8]', use %7s to prevent overflowing it.

For the current %8s sscanf we require cmd to be 9 chars long
so increase it by 1 byte to prevent the sscan overflow (rather
than reduce the %8s specifier to %7s as cppcheck recommends).

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix issues in the main btcoex timer
Sujith Manoharan [Sun, 1 Mar 2015 06:23:49 +0000 (11:53 +0530)]
ath9k: Fix issues in the main btcoex timer

* ath9k_mci_update_rssi() is required only for
  cards that use MCI scheme. Make sure that it
  is not called for 3-wire cards.

* Call ath9k_ps_wakeup() early since register
  accesses are made in ath9k_mci_update_rssi().

* Fix usage of btcoex_lock to handle no_stomp_timer.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Handle timers for MCI
Sujith Manoharan [Sun, 1 Mar 2015 06:23:48 +0000 (11:53 +0530)]
ath9k: Handle timers for MCI

Make sure that the btcoex timers are started/stopped
properly for both 3-wire and MCI schemes.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix wlan-active gpio for the AR9003 family
Sujith Manoharan [Sun, 1 Mar 2015 06:23:47 +0000 (11:53 +0530)]
ath9k: Fix wlan-active gpio for the AR9003 family

When disabling BTCOEX, clearing the wlanactive gpio line
is required only for pre-AR9003 cards.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix MCI scheme initialization
Sujith Manoharan [Sun, 1 Mar 2015 06:23:46 +0000 (11:53 +0530)]
ath9k: Fix MCI scheme initialization

Commit "ath9k_hw: remove ATH_BTCOEX_CFG_MCI" removed
MCI as a separate coex scheme, but we need it to
avoid fiddling with GPIO registers during
ath9k_init_btcoex() that are meant only for 3-wire
cards.

Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Initialize MCI state correctly
Sujith Manoharan [Sun, 1 Mar 2015 06:23:45 +0000 (11:53 +0530)]
ath9k: Initialize MCI state correctly

The MCI configuration values are assigned
in ath9k_hw_btcoex_init_mci() which are used
by the MCI reset routine. When initializing
BTCOEX/MCI, ath_mci_setup() ends up using
uninitialized data. Fix this by setting up
the configuration parameters before issuing
a MCI reset.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove useless return value check
Sujith Manoharan [Sun, 1 Mar 2015 06:23:44 +0000 (11:53 +0530)]
ath9k: Remove useless return value check

ath_init_btcoex_timer() always returns 0, so
checking for error conditions is not required.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192cu: Add case in rtl92cu_get_hw_reg
Taehee Yoo [Wed, 25 Feb 2015 19:34:01 +0000 (04:34 +0900)]
rtlwifi: rtl8192cu: Add case in rtl92cu_get_hw_reg

Add HAL_DEF_WOWLAN case in rtl92cu_get_hw_reg

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: do not initialize ext_scan in mwifiex_init_adapter
Avinash Patil [Wed, 25 Feb 2015 16:45:41 +0000 (22:15 +0530)]
mwifiex: do not initialize ext_scan in mwifiex_init_adapter

Features which are device specific are already updated in
interface specific initialization e.g. register_dev.
We should not initialize them in mwifiex_init_adapter();
else this would overwrite earlier settings.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8188ee: missing curly braces in handle_branch1()
Dan Carpenter [Wed, 25 Feb 2015 13:24:51 +0000 (16:24 +0300)]
rtlwifi: rtl8188ee: missing curly braces in handle_branch1()

From the indenting, it seems like the READ_NEXT_PAIR() was supposed to
be inside the while loop.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8821ae: Remove duplicate hex prefixes
Rasmus Villemoes [Mon, 23 Feb 2015 12:05:59 +0000 (13:05 +0100)]
rtlwifi: rtl8821ae: Remove duplicate hex prefixes

The # flag in %X means print a 0X prefix. Remove the extra 0x prefix.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: add per-vif TX power capability to TX path
Lorenzo Bianconi [Tue, 17 Feb 2015 09:12:18 +0000 (10:12 +0100)]
ath9k: add per-vif TX power capability to TX path

In order to add per-vif TX power capability cap per-packet TX power to vif
configured power if the latter is lower than per-rate TX power and mac80211
per-frame power. Use vif TX power if TPC has been disabled for current the
interface

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: add per-vif TX power capability
Lorenzo Bianconi [Tue, 17 Feb 2015 09:12:17 +0000 (10:12 +0100)]
ath9k: add per-vif TX power capability

Configure the HW with highest TX power among all vif when HW TPC has been
enabled in order to add support to per-vif TX power capability. Use lowest
configured power among all interfaces when TPC is disabled

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused RTL_SUPPORTED_CTRL_FILTER define
Priit Laes [Mon, 16 Feb 2015 13:01:57 +0000 (15:01 +0200)]
rtlwifi: Remove unused RTL_SUPPORTED_CTRL_FILTER define

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from efuse.h
Priit Laes [Mon, 16 Feb 2015 13:01:56 +0000 (15:01 +0200)]
rtlwifi: Remove unused defines from efuse.h

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from base.h
Priit Laes [Mon, 16 Feb 2015 13:01:55 +0000 (15:01 +0200)]
rtlwifi: Remove unused defines from base.h

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from cam.h
Priit Laes [Mon, 16 Feb 2015 13:01:54 +0000 (15:01 +0200)]
rtlwifi: Remove unused defines from cam.h

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused RF6052_MAX_REG define
Priit Laes [Mon, 16 Feb 2015 13:01:53 +0000 (15:01 +0200)]
rtlwifi: Remove unused RF6052_MAX_REG define

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from driver-specific def.h
Priit Laes [Mon, 16 Feb 2015 12:59:55 +0000 (14:59 +0200)]
rtlwifi: Remove unused defines from driver-specific def.h

HAL_RETRY_LIMIT_*
RESET_DELAY_8185
RT_IBSS_INT_MASKS
RT_AC_INT_MASKS
NUM_OF_*
BT_*,
MAX_{LINES,BYTES}_*,
*_THREE_WIRE
*_QUEUE related

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from rtl8192cu driver
Priit Laes [Mon, 16 Feb 2015 12:59:54 +0000 (14:59 +0200)]
rtlwifi: Remove unused defines from rtl8192cu driver

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: add missing includes
Rafał Miłecki [Tue, 3 Mar 2015 06:32:57 +0000 (07:32 +0100)]
bcma: add missing includes

kbuild found out that commit 804e27dee49e ("bcma: support bringing up
bus hosted on PCIe Gen 2") broke the build on m68k:

   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>> drivers/bcma/driver_pcie2.c:196:2: error: implicit declaration of function 'pcie_set_readrq' [-Werror\
=implicit-function-declaration]
     err = pcie_set_readrq(dev, pcie2->reqsize);
     ^
   cc1: some warnings being treated as errors

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Mute BT properly
Sujith Manoharan [Mon, 16 Feb 2015 05:20:01 +0000 (10:50 +0530)]
ath9k: Mute BT properly

Set The BT/WLAN priority weights correctly and make sure
that MCI_LNA_TAKE is sent only for cards that share
PA/LNA.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix GPM initialization
Sujith Manoharan [Mon, 16 Feb 2015 05:20:00 +0000 (10:50 +0530)]
ath9k: Fix GPM initialization

Handle MCI_STATE_INIT_GPM_OFFSET separately and do not
overload ar9003_mci_get_next_gpm_offset() with a special
case.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Prepare MCI interface correctly
Sujith Manoharan [Mon, 16 Feb 2015 05:19:59 +0000 (10:49 +0530)]
ath9k: Prepare MCI interface correctly

The LNA_TRANS message needs to be sent only for
chips which have shared PA/LNA.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Setup MCI statistics properly
Sujith Manoharan [Mon, 16 Feb 2015 05:19:58 +0000 (10:49 +0530)]
ath9k: Setup MCI statistics properly

Use a subroutine to enable MCI debug statistics
if it is present in the global configuration.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix MCI TX control
Sujith Manoharan [Mon, 16 Feb 2015 05:19:57 +0000 (10:49 +0530)]
ath9k: Fix MCI TX control

This patch makes sure that the antenna configuration
is used properly when setting AR_MCI_TX_CTRL.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Handle 2-ANT AR9565 in MCI reset
Sujith Manoharan [Mon, 16 Feb 2015 05:19:56 +0000 (10:49 +0530)]
ath9k: Handle 2-ANT AR9565 in MCI reset

The value programmed in the BTCOEX control register
is different for each chip. This patch adds support
for 2-ANT, 1-ANT solutions based on AR9565.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Add new MCI configuration parameters
Sujith Manoharan [Mon, 16 Feb 2015 05:19:55 +0000 (10:49 +0530)]
ath9k: Add new MCI configuration parameters

Several new MCI parameters need to be handled for
new chips, add them.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove useless check in MCI reset
Sujith Manoharan [Mon, 16 Feb 2015 05:19:54 +0000 (10:49 +0530)]
ath9k: Remove useless check in MCI reset

If we fail to allocate the sched/gpm buffers when
initializing MCI, we bail out properly. Checking
them in ar9003_mci_reset() is unnecessary, so remove it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Move MCI registers to reg_mci.h
Sujith Manoharan [Mon, 16 Feb 2015 05:19:53 +0000 (10:49 +0530)]
ath9k: Move MCI registers to reg_mci.h

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoiwlegacy: 4965-rs: Remove bogus colon after newline from debug message
Geert Uytterhoeven [Tue, 3 Mar 2015 10:58:13 +0000 (11:58 +0100)]
iwlegacy: 4965-rs: Remove bogus colon after newline from debug message

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoMerge tag 'iwlwifi-next-for-kalle-2015-03-01' of https://git.kernel.org/pub/scm/linux...
Kalle Valo [Tue, 3 Mar 2015 11:49:36 +0000 (13:49 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2015-03-01' of https://git./linux/kernel/git/iwlwifi/iwlwifi-next

* add triggers for firmware dump collection
* remove support for -9.ucode
* new statitics API
* rate control improvements

9 years agobcma: enable support for PCIe Gen 2 host devices
Rafał Miłecki [Sun, 8 Feb 2015 16:11:50 +0000 (17:11 +0100)]
bcma: enable support for PCIe Gen 2 host devices

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: support bringing up bus hosted on PCIe Gen 2
Rafał Miłecki [Sun, 8 Feb 2015 16:11:49 +0000 (17:11 +0100)]
bcma: support bringing up bus hosted on PCIe Gen 2

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: change IRQ control function to accept bus as an argument
Rafał Miłecki [Sun, 8 Feb 2015 16:11:48 +0000 (17:11 +0100)]
bcma: change IRQ control function to accept bus as an argument

It doesn't operate on PCI core, but PCI host device, so there is no
point of passing core related struct.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: add helpers bringing PCIe hosted bus up / down
Rafał Miłecki [Sun, 8 Feb 2015 16:11:47 +0000 (17:11 +0100)]
bcma: add helpers bringing PCIe hosted bus up / down

Bringing PCIe hosted bus up requires operating on host-related core.
Since we plan to support PCIe Gen 2 devices we should provide a helper
picking the correct one (PCIE or PCIE2).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: respect reason when deleting (deauthenticating) STA
Rafał Miłecki [Sun, 8 Feb 2015 10:51:47 +0000 (11:51 +0100)]
brcmfmac: respect reason when deleting (deauthenticating) STA

Starting with kernel 3.19 reason is provided by cfg80211.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoiwlwifi: mvm: don't override passive dwell in case of fragmented scan
David Spinadel [Tue, 17 Feb 2015 10:45:21 +0000 (12:45 +0200)]
iwlwifi: mvm: don't override passive dwell in case of fragmented scan

Currently scan params structure has only active or passive dwell time
fields, passive one is used for fragmented scans too. FW needs the
passive dwell time even when performing fragmented scan for calculating
time between channels. Add a separate parameter for fragmented dwell time
and pass both fragmented and passive to FW.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon low RSSI
Emmanuel Grumbach [Tue, 3 Feb 2015 12:29:36 +0000 (14:29 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon low RSSI

Lots of issues can be caught when the RSSI drops. Add the
ability to collect the firmware data at that point.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon statistics
Emmanuel Grumbach [Tue, 10 Feb 2015 13:26:57 +0000 (15:26 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon statistics

It can be very useful to monitor the statistics and trigger
a firmware dump when a certain value hits a certain offset.
Since the statistics are huge, add a generic trigger. When
the DWORD at offset X reaches value Y.

Since there is another trigger before this one I can't add
right now because of a dependency on mac80211, add a
reserved entry to keep the enum in place.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: restart firmware recording when no configuration is set
Emmanuel Grumbach [Sun, 15 Feb 2015 15:16:16 +0000 (17:16 +0200)]
iwlwifi: mvm: restart firmware recording when no configuration is set

Sometimes the firmware will have a hard coded configuration.
In this case, the driver won't find any configuration
in the firmware file, and it will have to re-start
recording in case it has been stopped. This can't be done
by the configuration host command since there is no such
host command configured. Do that with the registers instead.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon command response
Emmanuel Grumbach [Tue, 10 Feb 2015 08:49:20 +0000 (10:49 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon command response

This will allow to collect the data as soon the firmware
sends a specific notification of command response.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon channel switch
Emmanuel Grumbach [Tue, 10 Feb 2015 08:49:51 +0000 (10:49 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon channel switch

We fire the trigger when the channel switch starts, but
the delay is configurable. That makes is easier to catch
channel switches that fail.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon missed beacons
Emmanuel Grumbach [Mon, 2 Feb 2015 10:44:23 +0000 (12:44 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon missed beacons

Missing beacons is a good indication that something is going
wrong in the firmware. Add a trigger to be able to collect
data when we start missing beacons with a configurable
threshold.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add the cause of the firmware dump in the dump
Emmanuel Grumbach [Thu, 29 Jan 2015 12:58:20 +0000 (14:58 +0200)]
iwlwifi: mvm: add the cause of the firmware dump in the dump

Now that the firmware dump can be triggered by events in
the code and not only the user or an firmware ASSERT, we
need a way to know why the firmware dump was triggered.
Add a section in the dump file for that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add framework for triggers for fw dump
Emmanuel Grumbach [Thu, 29 Jan 2015 12:58:06 +0000 (14:58 +0200)]
iwlwifi: mvm: add framework for triggers for fw dump

Most of the time, the issues we want to debug with the
firmware dump mechanism are transient. It is then very
hard to stop the recording on time and get meaningful
data.
In order to solve this, I add here an infrastucture
of triggers. The user will supply a list of triggers
that will start / stop the recording. We have two types
of triggers: start and stop. Start triggers can start a
specific configuration. The stop triggers will be able to
kick the collection of the data with the currently running
configuration. These triggers are given to the driver by
the .ucode file - just like the configuration.

In the next patches, I'll add triggers in the code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: use only 40 ms for fragmented scan
David Spinadel [Sun, 15 Feb 2015 12:45:33 +0000 (14:45 +0200)]
iwlwifi: mvm: use only 40 ms for fragmented scan

20 ms fragments are no longer required by system.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: allow to force the Rx chains from debugfs
Emmanuel Grumbach [Sun, 8 Feb 2015 08:56:43 +0000 (10:56 +0200)]
iwlwifi: mvm: allow to force the Rx chains from debugfs

This is useful to debug weird antenna problems.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: add new TLV capability flag for BT PLCR
Emmanuel Grumbach [Thu, 12 Feb 2015 10:33:09 +0000 (12:33 +0200)]
iwlwifi: add new TLV capability flag for BT PLCR

Packet Level Co-Running is a BT Coex feature which is
supported on certain devices only, hence the need for
a TLV flag for it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't iterate interfaces to disconnect in net-detect
Luciano Coelho [Fri, 13 Feb 2015 19:37:09 +0000 (21:37 +0200)]
iwlwifi: mvm: don't iterate interfaces to disconnect in net-detect

We shouldn't call iwl_mvm_d3_disconnect_iter() on the running
interfaces when we are woken up due to net-detect, because it doesn't
make sense.  Additionally, this seems to set the
IEEE80211_SDATA_DISCONNECT_RESUME flag that will cause a disconnection
on the next resume (if a normal WoWLAN is used).

To solve this, skip the iteration loop when net-detect is set.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reported-by: Samuel Tan <samueltan@chromium.org>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: new Alive / error table API
Emmanuel Grumbach [Tue, 3 Feb 2015 18:11:48 +0000 (20:11 +0200)]
iwlwifi: mvm: new Alive / error table API

The new API slightly changes the layout of the version of
the firmware - prepare for that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support beacon statistics for BSS client
Johannes Berg [Wed, 21 Jan 2015 20:41:29 +0000 (21:41 +0100)]
iwlwifi: mvm: support beacon statistics for BSS client

Report the average beacon signal and the number of received beacons as
measured by the firmware.

Since the firmware just counts, and doesn't reset the counter at all,
clear it in the firmware whenever we associate. However, accumulate it
over firmware restart.

Since clearing the statistics in the firmware will also clear the ones
for the radio statistics, add those to the accumulator when cleared.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't write to DBGC_OUT_CTRL when stopping the recording
Eran Harary [Tue, 10 Feb 2015 07:25:50 +0000 (09:25 +0200)]
iwlwifi: mvm: don't write to DBGC_OUT_CTRL when stopping the recording

Due to HW bug in the DBGC when driver want to stop the dbg recording it
should wait 100us before collecting the data instead of write 0 to
DBGC_OUT_CTRL.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove deprecated scan API code
Luciano Coelho [Tue, 10 Feb 2015 11:03:38 +0000 (13:03 +0200)]
iwlwifi: mvm: remove deprecated scan API code

The legacy scan API is deprecated and not used anymore with 10 and
higher firmware versions.  Since we deprecated firmware version 9, we
can remove a whole lot of unused code.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: deprecate -9.ucode for 3160 / 7260 / 7265
Luciano Coelho [Tue, 10 Feb 2015 11:54:08 +0000 (13:54 +0200)]
iwlwifi: deprecate -9.ucode for 3160 / 7260 / 7265

This firmware is not supported anymore.  Stop loading this firmware.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support radio statistics as global survey
Johannes Berg [Wed, 14 Jan 2015 17:12:41 +0000 (18:12 +0100)]
iwlwifi: mvm: support radio statistics as global survey

Export the radio statistics from the statistics v10 API (if the
firmware also has the capability to fill these statistics) using
the global survey data facility.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add statistics API version 10
Johannes Berg [Wed, 14 Jan 2015 16:58:57 +0000 (17:58 +0100)]
iwlwifi: mvm: add statistics API version 10

New firmware versions will report statistics using a new version 10
of the API, instead of the current version 8. Add support for this.
This enables getting beacon and radio statistics.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: apply destination before releasing reset
Emmanuel Grumbach [Wed, 4 Feb 2015 14:35:03 +0000 (16:35 +0200)]
iwlwifi: pcie: apply destination before releasing reset

This allows to use the firmware debugging system even when
the configuration values are set hard coded in the firmware.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove unused function in BT coex
Eyal Shapira [Mon, 9 Feb 2015 13:18:49 +0000 (15:18 +0200)]
iwlwifi: mvm: remove unused function in BT coex

Cleanup unused code.

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 agoiwlwifi: mvm: fix BT coex shared antenna activity check
Eyal Shapira [Mon, 9 Feb 2015 13:18:17 +0000 (15:18 +0200)]
iwlwifi: mvm: fix BT coex shared antenna activity check

The shared antenna should be forbidden to use only if there's
high BT activity. Comparing to BT_OFF was effectively causing
us to always forbid using the shared antenna for SISO. This
leads to degraded performance in scenarios where the shared
antenna would have better performance.

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 agoiwlwifi: mvm: rs: print single stream params via debugfs
Eyal Shapira [Mon, 2 Feb 2015 10:46:22 +0000 (12:46 +0200)]
iwlwifi: mvm: rs: print single stream params via debugfs

Add this to the info printed when reading rate_scale_table.
Useful for debugging.

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 agoiwlwifi: mvm: rs: avoid ss_force from being reset after tx idle
Eyal Shapira [Mon, 2 Feb 2015 10:14:54 +0000 (12:14 +0200)]
iwlwifi: mvm: rs: avoid ss_force from being reset after tx idle

ss_force is a debugging option to force a certain single stream
tx mode. It's not useful if it gets reset after tx idle. Fix that.
While at it also make sure any code touching ss_force will only
get compiled if debugfs support is configured.

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 agoiwlwifi: mvm: increase the number of PAPD channel groups to 9
Eran Harary [Tue, 3 Feb 2015 13:53:29 +0000 (15:53 +0200)]
iwlwifi: mvm: increase the number of PAPD channel groups to 9

Newer devices have more PAPD channel groups.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: consider TDLS queues as used during drain
Arik Nemtsov [Wed, 21 Jan 2015 09:50:31 +0000 (11:50 +0200)]
iwlwifi: mvm: consider TDLS queues as used during drain

When a TDLS station is being drained its Tx queues are still in use. Don't
allocate them to a different station in the meantime.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: disable MIMO for low latency P2P
Eyal Shapira [Sun, 1 Feb 2015 19:46:00 +0000 (21:46 +0200)]
iwlwifi: mvm: rs: disable MIMO for low latency P2P

Due to issues with Miracast adapters MIMO reception disable
use of MIMO when for low latency P2P traffic.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: adapt rate matching to new STBC/BFER
Eyal Shapira [Thu, 29 Jan 2015 23:38:29 +0000 (01:38 +0200)]
iwlwifi: mvm: rs: adapt rate matching to new STBC/BFER

Once the FW supports autonomous decision between STBC/BFER/SISO
we no longer set the STBC bit and ANT_AB in the rate table.
However the FW rate in the tx response will have the STBC
or BFER bit set and the antennas set to ANT_AB in case these
were chosen by it. This will cause us to discard any such
response as unmatching the current LQ table and thus break
the rs search cycle completely.
Fix this by relaxing the rate matching in case we're working
with the new API and STBC/BFER are used.

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 agoiwlwifi: mvm: rs: fix BT Coex check to look at the correct ant
Eyal Shapira [Mon, 2 Feb 2015 13:21:27 +0000 (15:21 +0200)]
iwlwifi: mvm: rs: fix BT Coex check to look at the correct ant

The check to avoid the shared antenna was passed the wrong
antenna parameter. It should have checked whether the antenna of
the next column we're considering is allowed and instead it was
passed the current antenna.
This could lead to a wrong choice of the next column in the rs
algorithm and non optimal performance.

Fixes: commit 219fb66b49fac64bb ("iwlwifi: mvm: rs - don't use the shared antenna when BT load is high")
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agowil6210: track privacy connection attribute
Vladimir Kondratiev [Sun, 15 Feb 2015 12:02:37 +0000 (14:02 +0200)]
wil6210: track privacy connection attribute

For the STA interface, track 'privacy'.
Refactor safety checks to:
- always print connection params
- always check IE size validity
- require RSN IE for secure connection

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: rename 'secure_pcp' to 'privacy'
Vladimir Kondratiev [Sun, 15 Feb 2015 12:02:36 +0000 (14:02 +0200)]
wil6210: rename 'secure_pcp' to 'privacy'

Make this field to track privacy attribute for all interface types

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: Fix division by zero in wil_vring_debugfs_show
Boris Sorochkin [Sun, 15 Feb 2015 12:02:35 +0000 (14:02 +0200)]
wil6210: Fix division by zero in wil_vring_debugfs_show

On some platforms get_cycles() implemented to allways return 0.
On such platforms "Division by zero" bug was triggered.

Signed-off-by: Boris Sorochkin <boriss@codeaurora.org>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: Change of threshold for tx vring idleness measurement
Vladimir Shulman [Sun, 15 Feb 2015 12:02:34 +0000 (14:02 +0200)]
wil6210: Change of threshold for tx vring idleness measurement

Change threshold to be variable debugfs entry from hard-coded 0.
Default threshold value is 16 descriptors because HW is capable
of fetching up to 16 descriptors at once.

Signed-off-by: Vladimir Shulman <qca_shulmanv@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: branch prediction hints
Vladimir Kondratiev [Sun, 15 Feb 2015 12:02:33 +0000 (14:02 +0200)]
wil6210: branch prediction hints

Mark expected branches using likely()/unlikely().
Do it on high performance route - data path and interrupts

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: enable fix for HW bug in 802.11->803.3 transform
Vladimir Kondratiev [Sun, 15 Feb 2015 12:02:32 +0000 (14:02 +0200)]
wil6210: enable fix for HW bug in 802.11->803.3 transform

In the old hardware, bug existed that caused DA and SA for every
Rx packet to be swapped in the AP mode.
New hardware has fix for this bug. Enable this fix in the
hardware.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: remove support for old hardware
Vladimir Kondratiev [Sun, 15 Feb 2015 12:02:31 +0000 (14:02 +0200)]
wil6210: remove support for old hardware

Hardware older than Sparrow B0 obsolete.
There is no WiFi product that uses this hardware.
Recent firmware does not support it either.

Remove driver support.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: boot loader
Vladimir Kondratiev [Sun, 15 Feb 2015 12:02:30 +0000 (14:02 +0200)]
wil6210: boot loader

Introduce boot loader. Instead of the operational firmware,
very small boot loader is burned to the on-board flash. Boot loader
initializes hardware upon reset, and prepares for low power mode.
Boot loader reports MAC address and detects radio chip connected.

Driver loads firmware only when bringing up interface. All information
required to set up network interface, most important is MAC address,
reported by the boot loader

The firmware composed of 2 files:
- wil6210.fw - firmware itself (compiled code + data)
- wil6210.board - board file (various board and radio dependent
  calibrations and parameters)

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: fix usb tx data payload offset issue
Zhaoyang Liu [Fri, 13 Feb 2015 15:08:16 +0000 (20:38 +0530)]
mwifiex: fix usb tx data payload offset issue

Commit 84b313b35f8158d7 ("mwifiex: make tx packet 64 byte DMA aligned")
induced payload offset issue for USB interface.

There is no USB interface header for tx packets, so there's no need to
pull interface length while processing tx skb.

This patch fixes this issue.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: DMA alignment for RX packets
Avinash Patil [Fri, 13 Feb 2015 12:11:08 +0000 (17:41 +0530)]
mwifiex: DMA alignment for RX packets

This patch adds support for DMA alignment of sk_buffs
allocated for RX.
Patch also adds support to modify skb allocation flags.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Qingshui Gao <gaoqs@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: modify TX buff size for SD8887
Avinash Patil [Wed, 11 Feb 2015 17:42:27 +0000 (23:12 +0530)]
mwifiex: modify TX buff size for SD8887

FW crash has been observed while running iperf TX with SD8887
devices. This is because of invalid TX buffer setting. SD8887
supports 2K buffer sizes. This patch fixes this issue.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: change datatype to bool for device capability flags
Avinash Patil [Wed, 11 Feb 2015 17:42:26 +0000 (23:12 +0530)]
mwifiex: change datatype to bool for device capability flags

This patch changes datatypes for device capability flags to bool.
Patch also aggregates these variables at single place.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: do not process mgmt rx on uninitialized interface
Avinash Patil [Wed, 11 Feb 2015 17:42:25 +0000 (23:12 +0530)]
mwifiex: do not process mgmt rx on uninitialized interface

This patch fixes a crash which was happening because of RX of
management frames on uninitialzed interface. Now we drop management
frames for interfaces where cfg80211 has not registered any management
subtype reception or interface has no NL80211 iftype set.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: more_task flag for main_process
Shengzhen Li [Wed, 11 Feb 2015 17:42:24 +0000 (23:12 +0530)]
mwifiex: more_task flag for main_process

This patch handles a corner case where TX packet would remain in
driver queue till next packet comes in.
Here is sequence:
1. TX packet is queued via hard_start_xmit and main_work is queued
2. SDIO interrupt comes in which directly call mwifiex_main_process.
This starts executing main superloop.
3. Now work from step1 is scheduled but at first check itself it sees
mwifiex_processing is set and exits.
4. Now if superloop from step2 has passed TX processing part of superloop
this packet would remain in queue until next packet/command/SDIO interrupt
arrives and queues main_work.

This patch fixes this corner case by defining more_task flag which is set when
mwifiex_processing is found to be true. At end of superloop we again check if
more_task flag is set and if set, execute superloop again.

Signed-off-by: Shengzhen Li <szli@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agolibertas: remove unnecessary check before calling debugfs_remove
Bas Peters [Wed, 11 Feb 2015 08:33:06 +0000 (09:33 +0100)]
libertas: remove unnecessary check before calling debugfs_remove

Debugfs_remove will check for error or NULL for us, so it is not
necessary to do this here.

Signed-off-by: Bas Peters <baspeters93@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Modify some USB de-initialize code.
Taehee Yoo [Tue, 10 Feb 2015 16:40:30 +0000 (01:40 +0900)]
rtlwifi: Modify some USB de-initialize code.

Delete SET_USB_STOP macro and rtl_usb_deinit because
those are called twice in USB de-initialize routine.
Add some de-initialize workqueue function in USB disconnect routine.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k_htc: Add new USB ID
Leon Nardella [Sat, 7 Feb 2015 19:10:07 +0000 (17:10 -0200)]
ath9k_htc: Add new USB ID

This device is a dongle made by Philips to enhance their TVs with wireless capabilities,
but works flawlessly on any upstream kernel, provided that the ath9k_htc module is attached to it.
It's correctly recognized by lsusb as "0471:209e Philips (or NXP) PTA01 Wireless Adapter" and the
patch has been tested on real hardware.

Signed-off-by: Leon Nardella <leon.nardella@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Clear ACM_CTRL AC3_VO bit correctly
Jes Sorensen [Fri, 6 Feb 2015 22:24:32 +0000 (17:24 -0500)]
rtlwifi: Clear ACM_CTRL AC3_VO bit correctly

All hw driver components in the rtlwifi driver, except for the
rtl8192de component has this bug. They would clear BE bit in the
ACM_CTRL register instead of the VO bit when processing the VO queue.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: Fix escan timer causing oops.
Hante Meuleman [Fri, 6 Feb 2015 17:36:47 +0000 (18:36 +0100)]
brcmfmac: Fix escan timer causing oops.

In some rare circumstances the escan protection timer can expire
before the setup completed (due to long timeouts on IOCTL). This
patch avoids this situation by setting the timer after the setup
completed correctly.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: Dont sleep when ctrl frames to transmit.
Hante Meuleman [Fri, 6 Feb 2015 17:36:46 +0000 (18:36 +0100)]
brcmfmac: Dont sleep when ctrl frames to transmit.

The SDIO watchdog will put the device in sleep mode when there is
no activity for some time and nothing to do anymore. This check
is incomplete and should also check if there is a control frame
to transmit.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: make sdio suspend wait for threads to freeze
Arend van Spriel [Fri, 6 Feb 2015 17:36:45 +0000 (18:36 +0100)]
brcmfmac: make sdio suspend wait for threads to freeze

Borrowed the idea of the PM freezer to make sdio suspend wait for
watchdog and DPC thread to freeze at a safe point in their thread
routine. The suspend takes 20-25 msec.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: add debugfs file containing revision info
Arend van Spriel [Fri, 6 Feb 2015 17:36:44 +0000 (18:36 +0100)]
brcmfmac: add debugfs file containing revision info

Make the revision info visible in debugfs. The new debugfs
file is named 'revinfo'.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: Remove error print for invalid key index.
Hante Meuleman [Fri, 6 Feb 2015 17:36:43 +0000 (18:36 +0100)]
brcmfmac: Remove error print for invalid key index.

When a key is set or cleared with an unsupported key index then
brcmfmac will print an error. With most wpa_supplicants this is
happening a lot. The error print is confusing and not needed.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: use helper function for changing SDIO state
Arend van Spriel [Fri, 6 Feb 2015 17:36:42 +0000 (18:36 +0100)]
brcmfmac: use helper function for changing SDIO state

Changing the SDIO state of the driver involves changing the bus
interface state. Adding a helper function makes sure that knowledge
is in one place.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: use alloc_workqueue's format strings capabilities for WQ names
Avinash Patil [Fri, 6 Feb 2015 14:28:05 +0000 (19:58 +0530)]
mwifiex: use alloc_workqueue's format strings capabilities for WQ names

alloc_workqueue() has string format formation ability e.g. wqname%ifname
will be treated as wqnameifname. Use this and remove string operations
while defining strings for workqueue names.

Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>