openwrt/staging/blogic.git
9 years agowil6210: capture all frames in sniffer mode
Vladimir Kondratiev [Sun, 4 Oct 2015 07:23:24 +0000 (10:23 +0300)]
wil6210: capture all frames in sniffer mode

For the sniffer (monitor) mode, capture either control only or both
control and data PHY.

It used to be control only or data only PHY due to firmware
issues with configuration for PHY auto-detection; but now
it is resolved.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agowil6210: support BAR (BlockAck Req)
Vladimir Kondratiev [Sun, 4 Oct 2015 07:23:23 +0000 (10:23 +0300)]
wil6210: support BAR (BlockAck Req)

BAR frames delivered to the host via Rx path; whole BAR frame
get delivered. Advance sequence in the reorder buffer and release
old frames, as per IEEE802.11 spec.

Firmware will reply to BAR, driver responsibility is only reorder
buffer management.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agowil6210: treat broadcast bssid as "disconnect all"
Vladimir Kondratiev [Sun, 4 Oct 2015 07:23:22 +0000 (10:23 +0300)]
wil6210: treat broadcast bssid as "disconnect all"

Hostapd request disconnect for broadcast bssid when it
wants to disconnect all stations from the AP.

Detect this and really disconnect all connected stations.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agowil6210: pmc logger bug fix
Vladimir Shulman [Sun, 4 Oct 2015 07:23:21 +0000 (10:23 +0300)]
wil6210: pmc logger bug fix

When allocating pmc descriptor, the structure is
initially created on stack and later copied to
the physical ring (device) memory. The descriptor
structure must be initialized to zero to avoid
garbage configuration, which may result in pmc
mechanism malfunctioning.

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@qca.qualcomm.com>
9 years agowil6210: log firmware crash information
Vladimir Kondratiev [Sun, 4 Oct 2015 07:23:20 +0000 (10:23 +0300)]
wil6210: log firmware crash information

Print firmware and ucode assert codes when firmware crashed.

Signed-off-by: Lior David <liord@qti.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agowil6210: Add proper handling for invalid frames on Rx
Vladimir Kondratiev [Sun, 4 Oct 2015 07:23:19 +0000 (10:23 +0300)]
wil6210: Add proper handling for invalid frames on Rx

On Rx, when invalid frame is received and dropped,
reaping of next frames from Rx ring is stopped.

This stops NAPI polling and re-enables the Rx interrupt.

However, in cases where no more frames received,
interrupt will not be triggered and rest of Rx frames
will not be processed.

Skip bad frames and continue to reap Rx packets when
such frames are encountered, and add statistics for
such frames for debug.

Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agowil6210: fix warning in system power management code
Vladimir Kondratiev [Sun, 4 Oct 2015 07:23:18 +0000 (10:23 +0300)]
wil6210: fix warning in system power management code

Fix compilation warning where CONFIG_PM defined while
CONFIG_PM_SLEEP is not defined

Report follows:

tree:   git://github.com/kvalo/ath pending
head:   941145fc5e5afbb120271e5dfaf37213ddb55807
commit: df596be39294d9712e5d568063a48448031e0a9f [37/39] wil6210: system power management
config: xtensa-allyesconfig (attached as .config)
reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout df596be39294d9712e5d568063a48448031e0a9f
  # save the attached .config to linux build tree
  make.cross ARCH=xtensa

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/ath/wil6210/pcie_bus.c:264:12: warning: 'wil6210_suspend' defined but not used [-Wunused-function]
    static int wil6210_suspend(struct device *dev, bool is_runtime)
               ^
>> drivers/net/wireless/ath/wil6210/pcie_bus.c:291:12: warning: 'wil6210_resume' defined but not used [-Wunused-function]
    static int wil6210_resume(struct device *dev, bool is_runtime)
               ^
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: use station's current operating mode from assoc request
Vivek Natarajan [Tue, 6 Oct 2015 12:19:34 +0000 (15:19 +0300)]
ath10k: use station's current operating mode from assoc request

The current number of spatial streams used by the client is advertised
as a separate IE in assoc request. Use this information to set
the NSS operating mode.

Fixes: 45c9abc059fa ("ath10k: implement more versatile set_bitrate_mask").
Signed-off-by: Vivek Natarajan <nataraja@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: optimize ce_lock on post rx buffer processing
Rajkumar Manoharan [Tue, 6 Oct 2015 12:19:33 +0000 (15:19 +0300)]
ath10k: optimize ce_lock on post rx buffer processing

After processing received packets from copy engine, host will allocate
new buffer and queue them back to copy engine ring for further
packet reception. On post rx processing path, skb allocation and
dma mapping are unnecessarily handled within ce_lock. This is affecting
peak throughput and also causing more CPU consumption. Optimize this
by acquiring ce_lock only when accessing copy engine ring and moving
skb allocation out of ce_lock.

In AP148 platform with QCA99x0 in conducted environment, UDP uplink peak
throughput is improved from ~1320 Mbps to ~1450 Mbps and TCP uplink peak
throughput is increased from ~1240 Mbps (70% host CPU load) to ~1300 Mbps
(71% CPU load). Similarly ~40Mbps improvement is observed in downlink
path.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: increase pci wakeup timeout to 30 ms
Maharaja Kennadyrajan [Tue, 6 Oct 2015 12:19:28 +0000 (15:19 +0300)]
ath10k: increase pci wakeup timeout to 30 ms

It is noticed that pci wakeup time is exceeding current timeout (10ms)
randomly which is tested on QCA988x. So, the wake up time is increased
to 30 ms and added debug prints to log total timeout.

Signed-off-by: Maharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: use pre-allocated DMA buffer in Tx
Peter Oh [Mon, 5 Oct 2015 14:56:40 +0000 (17:56 +0300)]
ath10k: use pre-allocated DMA buffer in Tx

ath10k driver is using dma_pool_alloc per packet and dma_pool_free
in coresponding at Tx completion.
Use of pre-allocated DMA buffer in Tx will improve saving CPU resource
by 5% while it consumes about 56KB memory more as trade off.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: use Rx decap mode configured when driver registered
Peter Oh [Mon, 5 Oct 2015 14:56:39 +0000 (17:56 +0300)]
ath10k: use Rx decap mode configured when driver registered

ath10k is using Native WiFi mode as default mode for both of
Tx and Rx path, but it could be changed when driver registers
with a module parameter for specific purpose such as mesh.

The Rx decap mode sent to firmware during WMI initialization should
use the same mode that driver configured at its registration stage
in case of using raw mode, so that host driver receives MAC frame
header containing necessary fields such as QoS and Mesh Control
and uses them in right way to make data traffic work.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: implement debugfs interface for Transmit Power Control stats
Maharaja Kennadyrajan [Mon, 5 Oct 2015 14:56:38 +0000 (17:56 +0300)]
ath10k: implement debugfs interface for Transmit Power Control stats

The Transmit Power Control (TPC) dump will show the power control values for
each rate which makes it easier to debug calibration problems.

Example usage:

# cat /sys/kernel/debug/ieee80211/phy0/ath10k/tpc_stats
TPC config for channel  5180  mode  10

CTL             = 0x10 Reg. Domain              = 58
Antenna Gain    = 1    Reg. Max Antenna Gain    = 0
Power Limit     = 34   Reg. Max Power           = 34
Num tx chains   = 3    Num supported rates      = 155

**********CDD POWER TABLE*******

No.  Preamble Rate_code tpc_valu1 tpc_value2 tpc_value3
0       CCK     0x40       0            0       0
1       CCk     0x41       0            0       0

[...]

154     HTCUP   0x 0       24           0       0
**********STBC POWER TABLE******
No.  Preamble Rate_code tpc_valu1 tpc_value2 tpc_value3
0       CCK     0x40       0            0       0

[...]

154     HTCUP   0x 0       24           24      0
**********TXBF POWER TABLE******

is used to dump the tx power control stats.

Signed-off-by: Maharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: add a_sle32_to_cpu()
Kalle Valo [Mon, 5 Oct 2015 14:56:37 +0000 (17:56 +0300)]
ath10k: add a_sle32_to_cpu()

Copy a_sle32_to_cpu() from ath6kl so that we can easily handle signed __le32
values. This is needed in struct wmi_pdev_tpc_config_event.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: split an unnecessary long line
Kalle Valo [Mon, 5 Oct 2015 14:56:37 +0000 (17:56 +0300)]
ath10k: split an unnecessary long line

from checkpatch:

drivers/net/wireless/ath/ath10k/mac.c:1113: line over 90 characters

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix whitespace usage
Kalle Valo [Mon, 5 Oct 2015 14:56:36 +0000 (17:56 +0300)]
ath10k: fix whitespace usage

checkpatch found:

drivers/net/wireless/ath/ath10k/core.c:574: Blank lines aren't necessary before a close brace '}'
drivers/net/wireless/ath/ath10k/mac.c:4067: Missing a blank line after declarations
drivers/net/wireless/ath/ath10k/mac.c:4083: Missing a blank line after declarations
drivers/net/wireless/ath/ath10k/mac.c:4084: spaces required around that '>>=' (ctx:WxV)
drivers/net/wireless/ath/ath10k/pci.c:1507: Missing a blank line after declarations

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: remove void function return statements
Kalle Valo [Mon, 5 Oct 2015 14:56:36 +0000 (17:56 +0300)]
ath10k: remove void function return statements

drivers/net/wireless/ath/ath10k/wmi.c:3023: void function return statements are not generally useful

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: brace style fixes
Kalle Valo [Mon, 5 Oct 2015 14:56:35 +0000 (17:56 +0300)]
ath10k: brace style fixes

drivers/net/wireless/ath/ath10k/htt_tx.c:457: braces {} are not necessary for single statement blocks
drivers/net/wireless/ath/ath10k/htt_tx.c:545: braces {} are not necessary for single statement blocks
drivers/net/wireless/ath/ath10k/mac.c:200: braces {} are not necessary for single statement blocks

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: indentation fixes
Kalle Valo [Mon, 5 Oct 2015 14:56:35 +0000 (17:56 +0300)]
ath10k: indentation fixes

checkpatch found:

drivers/net/wireless/ath/ath10k/core.c:513: Alignment should match open parenthesis
drivers/net/wireless/ath/ath10k/core.c:1266: code indent should use tabs where possible
drivers/net/wireless/ath/ath10k/core.c:1267: code indent should use tabs where possible
drivers/net/wireless/ath/ath10k/core.c:1268: code indent should use tabs where possible
drivers/net/wireless/ath/ath10k/core.c:1269: code indent should use tabs where possible
drivers/net/wireless/ath/ath10k/mac.c:4659: Alignment should match open parenthesis
drivers/net/wireless/ath/ath10k/mac.c:6271: Alignment should match open parenthesis
drivers/net/wireless/ath/ath10k/pci.c:2260: Alignment should match open parenthesis
drivers/net/wireless/ath/ath10k/wmi.c:3510: Alignment should match open parenthesis

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix checkpatch warning about logical continuations
Kalle Valo [Mon, 5 Oct 2015 14:56:34 +0000 (17:56 +0300)]
ath10k: fix checkpatch warning about logical continuations

checkpatch found:

drivers/net/wireless/ath/ath9k/core.c:490: Logical continuations should be on the previous line

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoMerge ath-next from ath.git
Kalle Valo [Mon, 5 Oct 2015 14:22:54 +0000 (17:22 +0300)]
Merge ath-next from ath.git

Major changes in ath10k:

* add spectral scan support for 10.4 firmware
* add qca6164 support
* implement mesh support using firmware raw mode

9 years agomwifiex: fix mwifiex_rdeeprom_read()
Dan Carpenter [Mon, 21 Sep 2015 16:19:53 +0000 (19:19 +0300)]
mwifiex: fix mwifiex_rdeeprom_read()

There were several bugs here.

1)  The done label was in the wrong place so we didn't copy any
    information out when there was no command given.

2)  We were using PAGE_SIZE as the size of the buffer instead of
    "PAGE_SIZE - pos".

3)  snprintf() returns the number of characters that would have been
    printed if there were enough space.  If there was not enough space
    (and we had fixed the memory corruption bug #2) then it would result
    in an information leak when we do simple_read_from_buffer().  I've
    changed it to use scnprintf() instead.

I also removed the initialization at the start of the function, because
I thought it made the code a little more clear.

Fixes: 5e6e3a92b9a4 ('wireless: mwifiex: initial commit for Marvell mwifiex driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoairo: Implement netif_carrier_on/off
Ondrej Zary [Mon, 21 Sep 2015 13:44:25 +0000 (15:44 +0200)]
airo: Implement netif_carrier_on/off

Add calls to netif_carrier_on and netif_carrier_off

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoairo: fix IW_AUTH_ALG_OPEN_SYSTEM
Ondrej Zary [Mon, 21 Sep 2015 13:44:24 +0000 (15:44 +0200)]
airo: fix IW_AUTH_ALG_OPEN_SYSTEM

IW_AUTH_ALG_OPEN_SYSTEM is ambiguous in set_auth for WEP as
wpa_supplicant uses it for both no encryption and WEP open system.
Cache the last mode set (only of these two) and use it here.

This allows wpa_supplicant to work with unencrypted APs.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agossb: make ssb_pcmcia_switch_core static
Rafał Miłecki [Mon, 21 Sep 2015 07:55:26 +0000 (09:55 +0200)]
ssb: make ssb_pcmcia_switch_core static

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agossb: drop declaration of non existing ssb_sdio_hardware_setup
Rafał Miłecki [Mon, 21 Sep 2015 07:47:20 +0000 (09:47 +0200)]
ssb: drop declaration of non existing ssb_sdio_hardware_setup

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agossb: make ssb_sdio_switch_core static
Rafał Miłecki [Mon, 21 Sep 2015 07:47:19 +0000 (09:47 +0200)]
ssb: make ssb_sdio_switch_core static

It's used locally only.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agossb: unexport ssb_bus_pcibus_register
Rafał Miłecki [Mon, 21 Sep 2015 07:47:18 +0000 (09:47 +0200)]
ssb: unexport ssb_bus_pcibus_register

It isn't used anywhere out of ssb code and we don't (plan to) build
pcihost_wrapper.c as a separated module.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: add support for population subnodes also when build as module
Hauke Mehrtens [Sat, 19 Sep 2015 12:43:50 +0000 (14:43 +0200)]
bcma: add support for population subnodes also when build as module

of_default_bus_match_table was not exported earlier, so it could only
be accessed by code compiled into the kernel. A new function
of_platform_default_populate() was added which uses
of_default_bus_match_table and this function is also exported. This way
it is possible to create a bus with the content of
of_default_bus_match_table and we can remove the hacks from bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: include linux/atomic.h
Hauke Mehrtens [Sat, 19 Sep 2015 10:47:20 +0000 (12:47 +0200)]
brcmfmac: include linux/atomic.h

brcmfmac uses atomic_or() and other atomic_* functions, but does not
include linux/atomic.h. This file gets included by some other header
file so this normally does not cause problems.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: Accept events when TDLS is used in combination with p2p.
Hante Meuleman [Fri, 18 Sep 2015 20:08:19 +0000 (22:08 +0200)]
brcmfmac: Accept events when TDLS is used in combination with p2p.

TDLS events are mapped back to primary interface but when p2p is in
use then this fails because the check was incorrect by checking
bsscfg number. Which can be different when a p2p device has been
created.

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: Fix TDLS setup by properly handling p2p noif.
Hante Meuleman [Fri, 18 Sep 2015 20:08:18 +0000 (22:08 +0200)]
brcmfmac: Fix TDLS setup by properly handling p2p noif.

There is a workaround needed for p2p device setup which breaks tdls
functionality. This patch fixes that by properly signalling fweh that
p2p device setup is ongoing.

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: Add support for the BCM4365 and BCM4366 PCIE devices.
Hante Meuleman [Fri, 18 Sep 2015 20:08:17 +0000 (22:08 +0200)]
brcmfmac: Add support for the BCM4365 and BCM4366 PCIE devices.

This patch adds support for the BCM4365 and BCM4366 11ac Wave2
PCIE devices.

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: Fix race condition bug when deleting p2p interface.
Hante Meuleman [Fri, 18 Sep 2015 20:08:16 +0000 (22:08 +0200)]
brcmfmac: Fix race condition bug when deleting p2p interface.

When p2p device interface gets deleted by deinitialising discovery
it will result in an event which removes the interface, but that is
also done by delete p2p interface code. This results in race
condition which sometimes results in lockup/crash. With this patch
the delete device interface will wait for the event (with timeout)
removing the possible race condition. Also on the stop device call
from cfg80211 the deinitialisation of the discovery device should
be avoided as it can result in a similar situation.

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: Add module parameter to disable features.
Hante Meuleman [Fri, 18 Sep 2015 20:08:15 +0000 (22:08 +0200)]
brcmfmac: Add module parameter to disable features.

For debugging purpose it is very handy to be able to disable
features. It has happened a few times that new features turned
out not always being properly detected for all devices/firmwares.
Making it possible to disable the feature with a module parameter
will make testing/debugging easier.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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: Fix p2p bug for older firmwares.
Hante Meuleman [Fri, 18 Sep 2015 20:08:14 +0000 (22:08 +0200)]
brcmfmac: Fix p2p bug for older firmwares.

Some devices with older firmwares are reporting new p2p device
interface with the wrong type. Accept this type to get p2p
working for these devices.

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: Only handle p2p_stop_device if vif is valid
Hante Meuleman [Fri, 18 Sep 2015 20:08:13 +0000 (22:08 +0200)]
brcmfmac: Only handle p2p_stop_device if vif is valid

In some situations it is possible that vif has been removed while
cfg80211 invokes the p2p_stop_device handler. This will result in
crash.

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: Deleting of p2p device is leaking memory.
Hante Meuleman [Fri, 18 Sep 2015 20:08:12 +0000 (22:08 +0200)]
brcmfmac: Deleting of p2p device is leaking memory.

When a p2p device gets deleted, the memory for the vif is not being
released. This is solved by reorganizing the cleanup path and
properly freeing the memory.

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: Workaround in change vif for wpa_supplicant support.
Hante Meuleman [Fri, 18 Sep 2015 20:08:11 +0000 (22:08 +0200)]
brcmfmac: Workaround in change vif for wpa_supplicant support.

Different wpa_supplicants have different behavior and expectations
regarding the change_virtual_intf behavior. This patch implements
a workaround for the different versions and possible brcmfmac
configuration.

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: Make p2pon module param always available.
Hante Meuleman [Fri, 18 Sep 2015 20:08:10 +0000 (22:08 +0200)]
brcmfmac: Make p2pon module param always available.

p2pon module param is currently under define BRCMDBG. Though it is
a needed option for older versions of the wpa_supplicant which do not
support the P2P_DEVICE interface.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: Fix bug in flowring management.
Hante Meuleman [Fri, 18 Sep 2015 20:08:09 +0000 (22:08 +0200)]
brcmfmac: Fix bug in flowring management.

The hash index stored in the flowrings is of type u16 but gets
stored in u8. This can result in incorrect indexing and possibly
result in crashes. This patch fixes the type.

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: Inform p2p module about p2pon through API
Hante Meuleman [Fri, 18 Sep 2015 20:08:08 +0000 (22:08 +0200)]
brcmfmac: Inform p2p module about p2pon through API

When the p2pon module param is used then p2p attach will initialize
p2p device iface in the firmware, but it is doing that by checking
data. It is cleaner to pass the p2pon information to p2p by API.
This information is also needed for other patch.

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: Only assign primary netdev to if2bss array.
Hante Meuleman [Fri, 18 Sep 2015 20:08:07 +0000 (22:08 +0200)]
brcmfmac: Only assign primary netdev to if2bss array.

The if2bss allows for translation of ifidx to bssidx which has a 1:n
relation. Therefor only the first (primary) netdev should be
assigned in this array. This fixes the p2pon=1 module param usage.

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: Fix set and get tx-power functions.
Hante Meuleman [Fri, 18 Sep 2015 20:08:06 +0000 (22:08 +0200)]
brcmfmac: Fix set and get tx-power functions.

Implementation of tx-power (get and set) related functions are
still assuming mW interface. This is wrong as functions use dbm
(or mbm) nowadays. As a result a tx power configuration could
result in wrong power configuration.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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: Add support for the BCM4350 PCIE device.
Hante Meuleman [Fri, 18 Sep 2015 20:08:05 +0000 (22:08 +0200)]
brcmfmac: Add support for the BCM4350 PCIE device.

This patch adds support fo the BRCM4350 2x2 11ac PCIE device.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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: Fix exception handling.
Hante Meuleman [Fri, 18 Sep 2015 20:08:04 +0000 (22:08 +0200)]
brcmfmac: Fix exception handling.

In some exception situations the ifp->vif was not properly assigned
which could result in crash.

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 agomwifiex: complete usb tx data with multi endpoints
Zhaoyang Liu [Fri, 18 Sep 2015 13:32:18 +0000 (06:32 -0700)]
mwifiex: complete usb tx data with multi endpoints

This patch do the work to TX data with specific USB
endpoint. At the same time, update data_sent flag
according to multi port status. And is_port_ready
API is added for BSS interface to check if current
used usb data endpoint is available or not.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: add usb multi endpoints resync support
Zhaoyang Liu [Fri, 18 Sep 2015 13:32:17 +0000 (06:32 -0700)]
mwifiex: add usb multi endpoints resync support

This patch add support for usb multi endpoints resync.
Once multi channel event is received from firmware,
update usb_mc_setp flag to block TX data until setup is over.
And available data endpoint will be attached to BSS interface.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: add usb tx data multi endpoints support
Zhaoyang Liu [Fri, 18 Sep 2015 13:32:16 +0000 (06:32 -0700)]
mwifiex: add usb tx data multi endpoints support

This patch add support for USB interface to TX data
with different endpoint. And previous TX information
are saved in new designed structure.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: add usb multi channel event process support
Zhaoyang Liu [Fri, 18 Sep 2015 13:32:15 +0000 (06:32 -0700)]
mwifiex: add usb multi channel event process support

This patch add multi channel event process for USB multi tx data endpoints.
Driver receives firmware multi channel event only in case that new
connection is setup or interface is disconnect. Different BSS interface
need update used usb endpoint.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: move usb specific data_sent update to usb.c
Zhaoyang Liu [Fri, 18 Sep 2015 13:32:14 +0000 (06:32 -0700)]
mwifiex: move usb specific data_sent update to usb.c

This patch move data_sent flag update to usb.c file.
>From now all data_sent update cases only happened in specific file:
sdio.c, usb.c, pcie.c. Outside ot these files, it is only allowed
to check the value of data_ent.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: fix tx data_sent issue for usb interface
Zhaoyang Liu [Fri, 18 Sep 2015 13:32:13 +0000 (06:32 -0700)]
mwifiex: fix tx data_sent issue for usb interface

This patch fix missing tx data_sent flag update for usb interface.
Except USB interface, data_sent flag has been updated in specific
file such as sdio.c and pcie.c. So only USB interface type need check
when TX data completed.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: Suppress -ENOSR error for data traffic on USB
Amitkumar Karwar [Fri, 18 Sep 2015 13:32:12 +0000 (06:32 -0700)]
mwifiex: Suppress -ENOSR error for data traffic on USB

We have preallocated buffer pool for Tx data. During high
data traffic, all buffers are submitted to USB and driver needs
to wait until one of the buffers get available for next Tx
packet.

"data: -ENOSR is returned" errors is expected in this case. Let's
lower the priority of this message.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: correct paused tx data packet counter
Zhaoyang Liu [Fri, 18 Sep 2015 13:32:11 +0000 (06:32 -0700)]
mwifiex: correct paused tx data packet counter

This patch fixes observed issues while updating counter for
number of paused data packets in wmm queue when trying to
delete packet or delete station entry.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: avoid memsetting PCIe event buffer
Amitkumar Karwar [Fri, 18 Sep 2015 13:32:10 +0000 (06:32 -0700)]
mwifiex: avoid memsetting PCIe event buffer

Preallocated PCIe buffer is being reused for all PCIe interface
events. Physical address of the buffer is shared with firmware
so that it can perform DMA on it. As event length is specified
in the header, there should not be a problem if the buffer gets
overwritten.
We will save some cycles by avoiding memset everytime while
submitting the buffer to firmware.

Fixes: 2728cecdc7d6bf3d21(mwifiex: corrections in PCIe event skb)
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: fix NULL pointer dereference during hidden SSID scan
Aniket Nagarnaik [Fri, 18 Sep 2015 13:32:09 +0000 (06:32 -0700)]
mwifiex: fix NULL pointer dereference during hidden SSID scan

This NULL pointer dereference is observed during suspend resume
stress test. All pending commands are cancelled when system goes
into suspend state. There a corner case in which host may receive
response for last scan command after this and try to trigger extra
active scan for hidden SSIDs.

The issue is fixed by adding a NULL check to skip that extra scan.

Fixes: 2375fa2b36feaf34 (mwifiex: fix unable to connect hidden SSID..)
Cc: <stable@vger.kernel.org> [v4.2+]
Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: don't always include ht/vht info in tdls confirm frame
Aniket Nagarnaik [Fri, 18 Sep 2015 13:32:08 +0000 (06:32 -0700)]
mwifiex: don't always include ht/vht info in tdls confirm frame

Current TDLS implementation always includes ht/vht information
in tdls setup confirm frame which causes teardown by legacy
peer station after TDLS handshake. We will inclue ht/vht
capabilities in tdls setup confirm frame only if peer station
supports it to fix this problem.

Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: NULL check for cfg80211_inform_bss()
Xinming Hu [Fri, 18 Sep 2015 13:32:07 +0000 (06:32 -0700)]
mwifiex: NULL check for cfg80211_inform_bss()

cfg80211_inform_bss would return null in some cases, such as
memory allocation failure.

This patch adds sanity check for this case, to avoid possible
issues when above corner case is hit.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: fix driver init failure under memory pressure
Xinming Hu [Fri, 18 Sep 2015 13:32:06 +0000 (06:32 -0700)]
mwifiex: fix driver init failure under memory pressure

64k Tx and Rx buffers are allocated during driver initialization
for SDIO level data aggregations. When host is under memory
pressure situation, kzalloc() request for 64k may fail.

We will try allocating 32k buffers and disable our rx single port
aggreagation feature in this situation.

If the allocation still fails, we will disable our sdio multport
aggregation feature as well. In this way, we will transmit and
receive packets one by one, thus reduce the demand for big
memory.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: minor corrections in multiport aggregation code
Xinming Hu [Fri, 18 Sep 2015 13:32:05 +0000 (06:32 -0700)]
mwifiex: minor corrections in multiport aggregation code

This patch includes below changes
1) Check if multiport aggregation feature flag while doing rx
length validation check.
2) Reset buffer size variables when buffers are freed.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: update amsdu tx packet time stamp
Zhaoyang Liu [Fri, 18 Sep 2015 13:32:04 +0000 (06:32 -0700)]
mwifiex: update amsdu tx packet time stamp

This patch fixes the issue of delay time in A-MSDU tx packet.
In generated new A-MSDU packet, the time stamp is initialized to zero.
Choose the time of first MSDU packet as aggregated packet's time.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: fix typo in del_virtual_intf() function
Xinming Hu [Fri, 18 Sep 2015 13:32:03 +0000 (06:32 -0700)]
mwifiex: fix typo in del_virtual_intf() function

Interface counters should be incremented in add_virtual_intf()
and decremented in del_virtual_intf() function. This patch
corrects it.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowlcore: align reg_ch_conf_last[] to 64bit
Guodong Xu [Fri, 18 Sep 2015 12:37:27 +0000 (20:37 +0800)]
wlcore: align reg_ch_conf_last[] to 64bit

Align fields reg_ch_conf_last and reg_ch_conf_pending of
struct wl1271{} to 64bit.

Without this, on 64bit ARM, wlcore_set_pending_regdomain_ch() fails at
the point it calls set_bit(ch_bit_idx, (long*)wl->reg_ch_conf_pending);
Here is the error message while doing iw wlan0 scan or connect:

[   10.666857] wlcore: IRQ work
[   10.670046] wlcore: intr: 0x40 (fw_rx_counter = 1, drv_rx_counter = 0, tx_results_counter = 0)
[   10.678697] wlcore: WL1271_ACX_INTR_DATA
[   10.682810] Unhandled fault: alignment fault (0x96000021) at 0xffffffc037a817f4
[   10.690139] Internal error: : 96000021 [#1] PREEMPT SMP
[   10.695366] Modules linked in:
[   10.698437] CPU: 3 PID: 894 Comm: irq/60-wl18xx Tainted: G        W       4.2.0-rc6-linaro-hikey #2
[   10.707501] Hardware name: HiKey Development Board (DT)
[   10.712733] task: ffffffc03a9d1680 ti: ffffffc039e18000 task.ti: ffffffc039e18000
[   10.720239] PC is at set_bit+0x14/0x30
[   10.724002] LR is at wlcore_set_pending_regdomain_ch+0x40/0x4c

Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Add support for OCB mode
Jan Kaisrlik [Thu, 17 Sep 2015 12:03:46 +0000 (14:03 +0200)]
ath9k: Add support for OCB mode

The patch adds support for "outside the context of a BSS"(OCB) mode
to ath9k driver and extends debugfs files by OCB ralated information.

This patch was tested on AR9380-AL1A cards.

Signed-off-by: Jan Kaisrlik <kaisrja1@fel.cvut.cz>
Cc: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agocarl9170: fix bad rssi reading
Hiroaki KAWAI [Thu, 10 Sep 2015 18:04:45 +0000 (18:04 +0000)]
carl9170: fix bad rssi reading

Fix rssi calculation error which was introduced in otus to ar9170
porting.

Signed-off-by: Hiroaki KAWAI <hiroaki.kawai@gmail.com>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agonet/wireless/wl18xx: Add missing MODULE_FIRMWARE
Geoff Levand [Wed, 2 Sep 2015 23:56:42 +0000 (16:56 -0700)]
net/wireless/wl18xx: Add missing MODULE_FIRMWARE

Fixes the output of 'modinfo --field firmware'.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: enable hw manual peak calibration for QCA9561
Miaoqing Pan [Tue, 1 Sep 2015 02:56:09 +0000 (10:56 +0800)]
ath9k: enable hw manual peak calibration for QCA9561

This patch fix https://lists.openwrt.org/pipermail/openwrt-devel/
2015-August/034979.html. As the peak detect calibration is set
incorrectly.

Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: Make mwifiex_dbg a function, reduce object size
Joe Perches [Mon, 31 Aug 2015 17:46:45 +0000 (10:46 -0700)]
mwifiex: Make mwifiex_dbg a function, reduce object size

The mwifiex_dbg macro has two tests that could be consolidated
into a function reducing overall object size ~10KB (~4%).

So convert the macro into a function.

$ size drivers/net/wireless/mwifiex/built-in.o* (x86-64 defconfig)
   text    data     bss     dec     hex filename
 233102    8628    4809  246539   3c30b drivers/net/wireless/mwifiex/built-in.o.new
 243949    8628    4809  257386   3ed6a drivers/net/wireless/mwifiex/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: Reset PCIE devices after recognition.
Hante Meuleman [Thu, 27 Aug 2015 14:14:06 +0000 (16:14 +0200)]
brcmfmac: Reset PCIE devices after recognition.

When PCIE type devices are being FW reloaded without being properly
reset then the device ends up in a locked state, requiring the
device to be completely powered down. This patch adds a reset
through watchdog at the moment the device (cores) has been
recognized. This will solve warm reboot issues.

Cc: Rafal Milecki <zajec5@gmail.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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: introduce brcmf_net_detach() function
Arend van Spriel [Wed, 26 Aug 2015 20:15:04 +0000 (22:15 +0200)]
brcmfmac: introduce brcmf_net_detach() function

In case of error during brcmf_bus_start() the network interfaces were
freed using free_netdev(). However, the interfaces may have additional
memory allocated which is not freed. The netdev has destructor set to
brcmf_cfg80211_free_netdev() which frees the additional memory if
allocated and call free_netdev(). The brcmf_net_detach() either calls
brcmf_cfg80211_free_netdev() directly or uses unregister_netdev() when
struct net_device::reg_state indicates the netdev was registered.

Reported-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@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: change prototype for brcmf_fws_hdrpull()
Arend van Spriel [Wed, 26 Aug 2015 20:15:03 +0000 (22:15 +0200)]
brcmfmac: change prototype for brcmf_fws_hdrpull()

Instead of passing ifidx and drvr just pass struct brcmf_if pointer
which holds both parameters.

Reviewed-by: Hante Meuleman <meuleman@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 ifidx parameter from brcmf_fws_txstatus_suppressed()
Arend van Spriel [Wed, 26 Aug 2015 20:15:02 +0000 (22:15 +0200)]
brcmfmac: remove ifidx parameter from brcmf_fws_txstatus_suppressed()

The brcmf_fws_txstatus_suppressed() function prototype specifies an
ifidx parameter which is not used within the function implementation.

Reviewed-by: Hante Meuleman <meuleman@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 dedicated debug level for firmware console logging
Arend van Spriel [Wed, 26 Aug 2015 20:15:01 +0000 (22:15 +0200)]
brcmfmac: add dedicated debug level for firmware console logging

Both PCIe and SDIO devices have the possibility to log the firmware
console output in kernel log. For PCIe it is logged when PCIE debug
level is enabled. For SDIO it is logged when user specifies a non-zero
console interval through debugfs. This patch tries to make it a
bit more consistent. The firmware console output is only logged when
FWCON debug level is enabled.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Pontus Fuchs <pontusf@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: add mapping for interface index to bsscfg index
Arend van Spriel [Wed, 26 Aug 2015 20:15:00 +0000 (22:15 +0200)]
brcmfmac: add mapping for interface index to bsscfg index

Because the P2P Device interface in firmware uses the same interface
index as the primary interface we use the bsscfg index as index in the
struct brcmf_pub::iflist. However, in the data path we get the interface
index and not the bsscfg index. So we need a mapping of interface index
to bsscfg index, which can be determined upon handle adding the interface.

Reviewed-by: Hante Meuleman <meuleman@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: pass struct brcmf_if instance in brcmf_txfinalize()
Arend van Spriel [Wed, 26 Aug 2015 20:14:59 +0000 (22:14 +0200)]
brcmfmac: pass struct brcmf_if instance in brcmf_txfinalize()

Most call sites of brcmf_txfinalize already have struct brcmf_if
instance so pass that to brcmf_txfinalize() as the function
needs it anyway.

Reviewed-by: Hante Meuleman <meuleman@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: use brcmf_get_ifp() to map ifidx to struct brcmf_if instance
Arend van Spriel [Wed, 26 Aug 2015 20:14:58 +0000 (22:14 +0200)]
brcmfmac: use brcmf_get_ifp() to map ifidx to struct brcmf_if instance

The knowledge on how to map the interface index to a struct brcmf_if
instance is in brcmf_get_ifp() so use that function when only the
interface index is known instead of accessing brcmf_pub::iflist
directly.

Reviewed-by: Hante Meuleman <meuleman@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: correct detection of p2pdev interface event
Arend van Spriel [Wed, 26 Aug 2015 20:14:57 +0000 (22:14 +0200)]
brcmfmac: correct detection of p2pdev interface event

The p2pdev interface is setup in firmware resulting in a interface
event. This event has role and no-if flag. When role is p2p client
and no-if flag is set it indicates that this is the p2pdev interface.
This info is used in handling the event and adding interface in the
driver.

Reviewed-by: Hante Meuleman <meuleman@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: only call brcmf_cfg80211_detach() when attach was successful
Arend van Spriel [Wed, 26 Aug 2015 20:14:56 +0000 (22:14 +0200)]
brcmfmac: only call brcmf_cfg80211_detach() when attach was successful

In brcmf_bus_start() the function brcmf_cfg80211_attach() is called which
may fail. If this happens we should not call brcmf_cfg80211_detach() in
the failure path as it will result in NULL pointer dereference:

  brcmf_fweh_activate_events: Set event_msgs error (-5)
  brcmf_bus_start: failed: -5
  brcmf_sdio_firmware_callback: dongle is not responding
  BUG: unable to handle kernel NULL pointer dereference at 0000000000000068
  IP: [<ffffffff811e8f08>] kernfs_find_ns+0x18/0xd0
  PGD 0
  Oops: 0000 [#1] SMP
  Modules linked in: brcmfmac(O) brcmutil(O) cfg80211 auth_rpcgss
  CPU: 1 PID: 45 Comm: kworker/1:1 Tainted: G           O
  Hardware name: Dell Inc. Latitude E6410/07XJP9, BIOS A07 02/15/2011
  Workqueue: events request_firmware_work_func
  task: ffff880036c09ac0 ti: ffff880036dd4000 task.ti: ffff880036dd4000
  RIP: 0010:[<ffffffff811e8f08>]  [<ffffffff811e8f08>] kernfs_find_ns+0x18/0xd0
  RSP: 0018:ffff880036dd7a28  EFLAGS: 00010246
  RAX: ffff880036c09ac0 RBX: 0000000000000000 RCX: 000000007fffffff
  RDX: 0000000000000000 RSI: ffffffff816578b9 RDI: 0000000000000000
  RBP: ffff880036dd7a48 R08: 0000000000000000 R09: ffff880036c0b340
  R10: 00000000000002ec R11: ffff880036dd7b08 R12: ffffffff816578b9
  R13: 0000000000000000 R14: ffffffff816578b9 R15: ffff8800c6c87000
  FS:  0000000000000000(0000) GS:ffff88012bc40000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
  CR2: 0000000000000068 CR3: 0000000001a0b000 CR4: 00000000000006e0
  Stack:
   0000000000000000 ffffffff816578b9 0000000000000000 ffff8800c0d003c8
   ffff880036dd7a78 ffffffff811e8ff5 0000000ffffffff1 ffffffff81a9b060
   ffff8800c789f880 ffff8800c0d00000 ffff880036dd7a98 ffffffff811ebe0d
  Call Trace:
   [<ffffffff811e8ff5>] kernfs_find_and_get_ns+0x35/0x60
   [<ffffffff811ebe0d>] sysfs_unmerge_group+0x1d/0x60
   [<ffffffff81404ef2>] dpm_sysfs_remove+0x22/0x60
   [<ffffffff813f9db9>] device_del+0x49/0x240
   [<ffffffff815da768>] rfkill_unregister+0x58/0xc0
   [<ffffffffa06bd91b>] wiphy_unregister+0xab/0x2f0 [cfg80211]
   [<ffffffffa0742fe3>] brcmf_cfg80211_detach+0x23/0x50 [brcmfmac]
   [<ffffffffa074d986>] brcmf_detach+0x86/0xe0 [brcmfmac]
   [<ffffffffa0757de8>] brcmf_sdio_remove+0x48/0x120 [brcmfmac]
   [<ffffffffa0758ed9>] brcmf_sdiod_remove+0x29/0xd0 [brcmfmac]
   [<ffffffffa0759031>] brcmf_ops_sdio_remove+0xb1/0x110 [brcmfmac]
   [<ffffffffa001c267>] sdio_bus_remove+0x37/0x100 [mmc_core]
   [<ffffffff813fe026>] __device_release_driver+0x96/0x130
   [<ffffffff813fe0e3>] device_release_driver+0x23/0x30
   [<ffffffffa0754bc8>] brcmf_sdio_firmware_callback+0x2a8/0x5d0 [brcmfmac]
   [<ffffffffa074deaf>] brcmf_fw_request_nvram_done+0x15f/0x5e0 [brcmfmac]
   [<ffffffff8140142f>] ? devres_add+0x3f/0x50
   [<ffffffff810642b5>] ? usermodehelper_read_unlock+0x15/0x20
   [<ffffffff81400000>] ? platform_match+0x70/0xa0
   [<ffffffff8140f400>] request_firmware_work_func+0x30/0x60
   [<ffffffff8106828c>] process_one_work+0x14c/0x3d0
   [<ffffffff8106862a>] worker_thread+0x11a/0x450
   [<ffffffff81068510>] ? process_one_work+0x3d0/0x3d0
   [<ffffffff8106d692>] kthread+0xd2/0xf0
   [<ffffffff8106d5c0>] ? kthread_create_on_node+0x180/0x180
   [<ffffffff815ed35f>] ret_from_fork+0x3f/0x70
   [<ffffffff8106d5c0>] ? kthread_create_on_node+0x180/0x180
  Code: e9 40 fe ff ff 48 89 d8 eb 87 66 0f 1f 84 00 00 00 00 00 66 66 66 66
90 55 48 89 e5 41 56 49 89 f6 41 55 49 89 d5 31 d2 41 54 53 <0f> b7
47 68 48 8b 5f 48 66 c1 e8 05 83 e0 01 4d 85 ed 0f b6 c8
  RIP  [<ffffffff811e8f08>] kernfs_find_ns+0x18/0xd0
   RSP <ffff880036dd7a28>
  CR2: 0000000000000068
  ---[ end trace 87d6ec0d3fe46740 ]---

Reported-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@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: change parameters for brcmf_remove_interface()
Arend van Spriel [Wed, 26 Aug 2015 20:14:55 +0000 (22:14 +0200)]
brcmfmac: change parameters for brcmf_remove_interface()

Just pass the interface to be removed, ie. the struct brcmf_if instance.

Reviewed-by: Hante Meuleman <meuleman@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: make brcmf_proto_hdrpull() return struct brcmf_if instance
Arend van Spriel [Wed, 26 Aug 2015 20:14:54 +0000 (22:14 +0200)]
brcmfmac: make brcmf_proto_hdrpull() return struct brcmf_if instance

Avoid spreading the ifidx in the driver, but have it return the
struct brcmf_if instance.

Reviewed-by: Hante Meuleman <meuleman@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: consolidate ifp lookup in driver core
Arend van Spriel [Wed, 26 Aug 2015 20:14:53 +0000 (22:14 +0200)]
brcmfmac: consolidate ifp lookup in driver core

In rx path the firmware provide an interface index which is used to
map to a struct brcmf_if instance. However, this involves some trick
that is done in two places. This is changed by having driver core
providing brcmf_get_ifp() function.

Reviewed-by: Hante Meuleman <meuleman@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 agoath10k: fix MSI-X registering for qca99x0
Janusz Dziedzic [Thu, 17 Sep 2015 06:17:33 +0000 (08:17 +0200)]
ath10k: fix MSI-X registering for qca99x0

In case of qca99x0 and MSI-X supported/enabled we
failed during interrupts registering with message:

ath10k_pci 0000:04:00.0: failed to request MSI-X ce irq 50: -22

Issue/fix was reproduced/tested using Dell Latitude E6430 laptop.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix ldpc param for fixed rate
Rajkumar Manoharan [Wed, 16 Sep 2015 07:49:00 +0000 (13:19 +0530)]
ath10k: fix ldpc param for fixed rate

ldpc is not configured for fixed rates. This blocks auto rate vs fixed
rate performance comparison. Since firmware is considering ldpc vdev
param for fixed rate selection, it has to be configured to enable ldpc
for fixed rates.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath: use PRI value given by spec for fixed PRI
Peter Oh [Thu, 17 Sep 2015 11:29:08 +0000 (14:29 +0300)]
ath: use PRI value given by spec for fixed PRI

PRI value is used as divider when DFS detector analyzes candidate
radar pulses.
If PRI deviation is big from its origin PRI, DFS detector could miss
valid radar reports since HW often misses detecting radar pulses and
causes long interval value of pulses.

For instance from practical results, if runtime PRI is calculated as
1431 for fixed PRI value of 1428 and delta timestamp logs 15719,
the modular remainder will be 1409 and the delta between the remainder
and runtime PRI is 22 that is bigger than PRI tolerance which is 16.
As a result this radar report will be ignored even though it's valid.

By using spec defined PRI for fixed PRI, we can correct this error.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath: fix incorrect PPB on JAPAN chirp radar
Peter Oh [Thu, 17 Sep 2015 11:29:07 +0000 (14:29 +0300)]
ath: fix incorrect PPB on JAPAN chirp radar

The number of pulses per burst on Japan chirp radar is
between 1 and 3. The previous value, 20, is representing
number of bursts, but since current DFS detector is using
pulse detection other than bursts, use the pulse number
for correct radar detection.
Also using the highest number helps to avoid false detection.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoMerge tag 'iwlwifi-next-for-kalle-2015-09-21' of git://git.kernel.org/pub/scm/linux...
Kalle Valo [Sat, 26 Sep 2015 18:25:18 +0000 (21:25 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2015-09-21' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

* some debugfs improvements;
* fix signedness in beacon statistics;
* deinline some functions to reduce size when device tracing is enabled;
* filter beacons out in AP mode when no stations are associated;
* deprecate firmwares version -12;
* fix a runtime PM vs. legacy suspend race;
* one-liner fix for a ToF bug;
* clean-ups in the rx code;
* small debugging improvement;
* fix WoWLAN with new firmware versions;

9 years agoiwlwifi: mvm: add debug print for d0i3 exit indication
Eliad Peller [Sun, 6 Sep 2015 11:17:17 +0000 (14:17 +0300)]
iwlwifi: mvm: add debug print for d0i3 exit indication

In order to verify d0i3 flow, add debug print to indicate
d0i3 exit was completed (right after tx was re-enabled),
along with the wakeup reasons.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: configure wowlan configuration only if connected
Eliad Peller [Tue, 1 Sep 2015 11:16:00 +0000 (14:16 +0300)]
iwlwifi: mvm: configure wowlan configuration only if connected

Recent fw version added assert to make sure wowlan configuration
is configured only when a station is connected.

Change the driver behavior to pass this configuration only
if we indeed have ap station id (i.e. connected).

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: move RX API into its own file
Johannes Berg [Wed, 2 Sep 2015 12:53:39 +0000 (14:53 +0200)]
iwlwifi: mvm: move RX API into its own file

The RX API is currently mixed up into the general fw-api.h
file, but we're going to need to extend it significantly in
the future, so move it to its own file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: remove some unused defines from RX API
Johannes Berg [Wed, 2 Sep 2015 12:47:16 +0000 (14:47 +0200)]
iwlwifi: mvm: remove some unused defines from RX API

Remove some unused values from the RX API; these were used
with older firmware API that didn't have the RX energy API,
support for which was removed a long time ago.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: remove pointless cfg_phy_cnt length check
Johannes Berg [Wed, 2 Sep 2015 10:26:45 +0000 (12:26 +0200)]
iwlwifi: mvm: remove pointless cfg_phy_cnt length check

Since the driver can never configure the data here, this field
will always be reported as 0 by the firmware. Even if this was
not the case, however, it wouldn't matter since the extra data
would be added beyond the end of the phy_info structure we use
in the driver, so wouldn't harm anything in this code either.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: remove useless debug message from RX
Johannes Berg [Wed, 2 Sep 2015 09:51:23 +0000 (11:51 +0200)]
iwlwifi: mvm: remove useless debug message from RX

This message is useless - it's in the good case that always
happens so enabling it doesn't really help. Just remove it.
There are other ways to debug this (e.g. tracing) so there's
no need to add a message in the bad case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: make sure AP is operating for ToF
Johannes Berg [Wed, 26 Aug 2015 13:55:04 +0000 (15:55 +0200)]
iwlwifi: mvm: make sure AP is operating for ToF

It's possible for an AP interface to be UP but not actually
operating (i.e. not beaconing etc.) - in this case it can't
actually do ToF, so check for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_STATS_V10 TLV flag
Emmanuel Grumbach [Wed, 26 Aug 2015 11:03:02 +0000 (14:03 +0300)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_STATS_V10 TLV flag

This flag is set in all supported firmwares.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_ASYNC_DTM TLV flag
Emmanuel Grumbach [Wed, 26 Aug 2015 10:57:37 +0000 (13:57 +0300)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_ASYNC_DTM TLV flag

This flag is set in all supported firmwares.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_SINGLE_SCAN_EBS TLV flag
Emmanuel Grumbach [Wed, 26 Aug 2015 10:55:11 +0000 (13:55 +0300)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_SINGLE_SCAN_EBS TLV flag

All the supported firmwares have this flag set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_TX_POWER_DEV TLV flag
Emmanuel Grumbach [Wed, 26 Aug 2015 10:52:54 +0000 (13:52 +0300)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_TX_POWER_DEV TLV flag

All the supported firmwares use the new API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_HDC_PHASE_0 TLV flag
Emmanuel Grumbach [Wed, 26 Aug 2015 10:50:59 +0000 (13:50 +0300)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_HDC_PHASE_0 TLV flag

All the supported firwmares support the new API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
9 years agoath9k_htc: introduce support for different fw versions
Oleksij Rempel [Sun, 6 Sep 2015 11:09:01 +0000 (13:09 +0200)]
ath9k_htc: introduce support for different fw versions

Current kernel support only one fw name with theoretically only one
fw version located in “firmware/htc_[9271|7010].fw”. Which is ok so far we
have only one fw version (1.3). After we realised new fw 1.4, we faced
compatibility problem which was decided to solve by firmware name and
location:
- new firmware is located now in
firmware/ath9k_htc/htc_[9271|7010]-1.4.0.fw
- old version 1.3 should be on old place, so old kernel have no issues
with it.
- new kernels including this patch should be able to try different
supported (min..max) fw version.
- new kernel should be able to support old fw location too. At least for
now.

At same time this patch will add new module option which should allow user
to play with development  fw version without replacing stable one. If user
will set “ath9k_htc use_dev_fw=1” module will try to find
firmware/ath9k_htc/htc_[9271|7010]-1.dev.0.fw first and if it fails, use
stable version: for example...1.4.0.fw.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agosch_dsmark: improve memory locality
Eric Dumazet [Thu, 17 Sep 2015 23:37:13 +0000 (16:37 -0700)]
sch_dsmark: improve memory locality

Memory placement in sch_dsmark is silly : Better place mask/value
in the same cache line.

Also, we can embed small arrays in the first cache line and
remove a potential cache miss.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>