Commit Graph

546406 Commits

Author SHA1 Message Date
Kalle Valo 7e64e5e66a * more clean-ups towards multiple RX queues;
* some rate scaling fixes and improvements;
 * some time-of-flight fixes;
 * other generic improvements and clean-ups;
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWEmeEAAoJEKFHnKIaPMX6fEMP/39bRyGi09NwXM5d0svYuBzC
 Ch1/hIaK7gWV76coBNjEmMiaBHBeZCNuW4SwfrT4z2WXoenbaJLeKPWps1gR5F4l
 TiAUTNNzvp1JzmbCysb8bVisG5wdzqd9t0yvOHCiICpD956PS6aerFQ3LZEIJqmR
 0M/GklJuHENX3M3a6aVQCR9iOItNw6MjYXQpYlWK3HCQxmouim+Dru68jUHjYC4+
 F5qfuiLCdlAlI3RZ6TNqhMDuY4utFB54FepEqWd1A9x0P+1SJZ3AqDkTFLDNEJzm
 y6d6NTreKYpFO7XUvmb1BHa93a1PU0zpiIWmwA2sOYSep7bQcUT5cYn5n/+4DUOB
 r/u9/xd6TvC4UYOXCuzrxK58M/vMrHl74uzyo9s/FjtI+dvM3mGRXgs/Zv/CmebQ
 i+lLZ31vfuoFl+6NCR6vmWoiW8C0RX7xTok2bIAUeUjtKR26ioIf3KhirXWzvXZL
 5dwC1NDTgOCWzUyn21wZsr1G6B9Q+vX0QwWJaezfqB3HzTCrVVt6HDaG8e4QI0n/
 n+qRl2g9bbHgI4EWG7fFwEhGvCrl0mLR2DVw3wvaIfFmM8UH7PtRkVPJyGmute1e
 Yg6t8rarzlZm4N3cDlPTJMBZ7pjnAYZTtAR7pgAivCrPApt9ZpH+GYs0IXJQY6+L
 Gc4hWq2Ahshvf2lv9acw
 =NTgB
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-next-for-kalle-2015-10-05' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

* more clean-ups towards multiple RX queues;
* some rate scaling fixes and improvements;
* some time-of-flight fixes;
* other generic improvements and clean-ups;
2015-10-07 12:14:23 +03:00
Kalle Valo f79683ded6 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
2015-10-05 17:22:54 +03:00
Johannes Berg 0316d30ea3 iwlwifi: mvm: add minimal multi-RXQ infrastructure
Since the new multi-queue capability depends on a new firmware API,
we can already add some code for it. If the new API is present, a
new opmode ops struct is used that handles the new rx_rss method.

For now, only restructure the RX handling to distinguish between
the two. Future patches will convert the new infrastructure to
actually use the new RX descriptor layout.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:34:51 +03:00
Johannes Berg d3f555f493 iwlwifi: size firmware flags memory correctly
Instead of relying on a hard-coded constant of a maximum of 64 API and
capability bits, add a new enum value after the others that will then
always track the number of used bits in the API/capabilities. We thus
no longer need to maintain the maximum number, and on 32-bit platforms
even (currently) reduce the number of bits kept in memory.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:33 +03:00
Johannes Berg fe96cc73c9 iwlwifi: mvm: make threshold temperatures unsigned
There's no need to have negative threshold temperatures, so make
them unsigned to avoid signedness warnings in debugfs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:32 +03:00
Moshe Harel 91fac94089 iwlwifi: nvm: add nvm phy_sku section to debugfs
The only NVM section not captured in debugfs.

Signed-off-by: Moshe Harel <moshe.harel@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:32 +03:00
Johannes Berg e6c21be665 iwlwifi: mvm: fix signedness warnings in ToF debugfs
Using an int* instead of u32* as the kstrtou32() output argument
obviously results in signedness warnings, change that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:31 +03:00
Eyal Shapira 1191f646bb iwlwifi: mvm: rs: dynamically switch between 80MHz and 20MHz in some scenarios
This is a tweak which has been shown to improve performance when
moving away from the AP while working in 80Mhz.
When RS decides to go down to 80MHz SISO MCS0 instead switch to 20MHz MCS4.
Go back to 80MHz MCS1 if RS can sustain 20MHz MCS5.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:31 +03:00
Johannes Berg 7c0ebd7870 iwlwifi: mvm: minor rx code cleanup
Clean up variable initialisation slightly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:31 +03:00
Johannes Berg 5736b7eba3 iwlwifi: remove IWL3165_UCODE_API_OK and _MIN
As the 3165 device uses the same firmware as 7265-D and currently
all 7000 series (including 3160/3165) use the same API versions
remove IWL3165_UCODE_API_OK and _MIN. We might have to put them
back if firmware support ever splits, but in that case might also
have to add a different MODULE_FIRMWARE statement.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:30 +03:00
Eyal Shapira ed21a384bb iwlwifi: mvm: rs: fix success ratio comparison in rs_get_best_rate
success_ratio is actually 128 * SR in percentage while
IWL_MVM_RS_SR_NO_DECREASE is 85%. Fix this by using RS_PERCENT().
This bug caused the if branch to be always executed. This in turn
led to always selecting a rate, following a column switch, in which
the expected throughput would exceed the best expected current throughput.
In some scenarios where the success ratio isn't >85% such a rate
could be too aggressive leading us to avoid the new column.
This has the potential of causing sub optimal performance.

Reported-by: Moshe Harel <moshe.harel@intel.com>
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:30 +03:00
Eyal Shapira 40ce5ed1e9 iwlwifi: mvm: rs: minor indentation fix
Indentation was off a bit. Fix it.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:29 +03:00
Eyal Shapira dfa1325a08 iwlwifi: mvm: rs: remove overflowing debug message
This message isn't very useful and creates clutter.
Remove it.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:29 +03:00
Eyal Shapira cc60c6e929 iwlwifi: mvm: rs: improve rate debug messages
Pretty print the rate full details to ease debugging.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:28 +03:00
Johannes Berg ceef91c894 iwlwifi: mvm: stop using DEVICE_POWER_FLAGS_CAM_MSK
The firmware has always treated these two bits to mean that
powersave is enabled when POWER_SAVE_ENA is set and CAM is
clear; it doesn't use them in any non-combined way.

Therefore, it's pointless to send it two bits, and the API
should be cleaned up. Prepare the driver by removing the CAM
bit and using only POWER_SAVE_ENA to indicate whether PS is
enabled or not.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:28 +03:00
Liad Kaufman 5c1156efeb iwlwifi: mvm: support enabling a queue with a given ssn
When enabling a queue, the default SSN is 0.

Allow determining what that SSN should be, if required. This
can happen, for example, if a queue gets reconfigured.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:27 +03:00
Liad Kaufman 4ecafae9e5 iwlwifi: mvm: support using multiple ACs on single HW queue
"DQA" is shorthand for "dynamic queue allocation", with the
idea of allocating queues per-RA/TID on-demand rather than
using shared queues statically allocated per vif. The goal
of this is to enable future features (like GO PM) and to
improve performance measurements of TX traffic.

When RA/TID streams can't be neatly sorted into different AC
queues, DQA allows sharing queues for the same RA. This means
that DQA allows different ACs may reach the same HW queue.

Update the code to allow such queue sharing by having a mapping
between the HW queue and the mac80211 queues using it (as this
could be more than one queue).

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:27 +03:00
Johannes Berg 56882e6cab iwlwifi: transport: track number of allocated queues
As the transport will decide how many queues (and MSI-X vectors)
to allocate, add a field to indicate that to the op-mode so it
can size/allocate its own data structures appropriately.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:27 +03:00
Johannes Berg a190430c5e iwlwifi: op-mode API: add rx_rss method
Upcoming hardware will have the ability to do L3 hashing for RSS,
directing data packets (and perhaps some associated metadata and
management notifications) to different MSI-X vectors.

In this case, it makes no sense to go through the full RX dispatch
since it's already known that only a subset of the possibilities
can come in, requiring a new receive method. In addition this must
know which queue the packet was received on.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:26 +03:00
Johannes Berg 1939089300 iwlwifi: mvm: remove PHY RX from handlers
Treat PHY RX specially, since it's actually pretty frequent,
doesn't need all the notication etc. code, and will have a
different handler in future hardware.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:26 +03:00
Assaf Krauss 5ac15be8fa iwlwifi: mvm: Improve debugfs tof robustness
Return a proper error when wrong parameters are passed to debugfs
tof_range_request.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:25 +03:00
Gregory Greenman 9ef2b8befb iwlwifi: mvm: ToF - fill bssid of responder configuration
The command needs to have the AP interfaces BSSID (which corresponds
to its address).

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:25 +03:00
Assaf Krauss 3e0fa50575 iwlwifi: mvm: Fix tof debugfs formats (dec vs. hex)
Make some input formats more natural, e.g. bandwidth and periods
are more natural in decimal than in hexadecimal.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 14:33:24 +03:00
Nicolas Iooss bb74360937 iwlwifi: mvm: fix tof.h header guard
Commit ce7929186a ("iwlwifi: mvm: add basic Time of Flight (802.11mc
FTM) support") created drivers/net/wireless/iwlwifi/mvm/tof.h with a
broken header guard:

    #ifndef __tof
    #define __tof_h__

    ...

    #endif /* __tof_h__ */

Use __tof_h__ in the first line.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 12:29:13 +03:00
Ilan Peer f82c83397b iwlwifi: mvm: Correctly update MAC context on add/del station
Commit "iwlwifi: mvm: don't ask beacons when AP vif and no
assoc sta" directly called iwl_mvm_mac_ctxt_cmd_ap() to update the
MAC context when adding/removing a station. However, this ignores
the case that the vif is actually a P2P GO.

Fix this by calling iwl_mvm_mac_ctxt_changed() that handles P2P GO
case as well.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 12:29:09 +03:00
Liad Kaufman 69191afef3 iwlwifi: mvm: fix default disabled aggs in sta
For the ADD_STA command, when the flag for aggregation
disabling is set, there is a bitmap indicated what TIDs
are disabling aggregations and what aren't. Currently, by
default, all TIDs allow for aggregations since the value
we begin with is 0.

Change this default value to 0xffff so all TIDs don't
allow aggregations until explicitly turned on.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 12:29:04 +03:00
Johannes Berg acf9de3dfb iwlwifi: enable tracing by default
Tracing, if disabled at runtime, has very low overhead with
great returns on debugging. It therefore makes sense to have
it enabled by default (if the kernel enables EVENT_TRACING).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 12:29:00 +03:00
Johannes Berg 7b9aebf0e5 MAINTAINERS: iwlwifi: update contact email
The ilw@linux.intel.com address is being phased out, replace
it with the new address.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 12:28:56 +03:00
Johannes Berg a644912651 iwlwifi: mvm: correct skip-over-DTIM implementation
The formula used in D0i3 should also be used in D3, instead of
the hardcoded value.

Additionally, the formula is actually wrong - if the calculation
yields 0 then 1 should be used instead of disabling entirely.
Also need to add 1 since the firmware needs 3 to skip 2, etc.

To make all this clearer, centralize the calculation into a
single function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 12:28:50 +03:00
Moshe Harel bb35dc1418 iwlwifi: nvm: force 1x1 antenna in Series 8000
This is a workaround to an OTP bug. In Series 8000 1x1, the OTP
0xA052 defines 2x2 antenna configuration. This workaround overrides
the decision based on HW id and MIMO disabled bit which is correct
in the OTP and set to disabled.

Signed-off-by: Moshe Harel <moshe.harel@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 12:28:44 +03:00
Aviya Erenfeld 09eef3307e iwlwifi: mvm: move DTS command and notification to new group
Move the DTS measurement command and notification from short
command header to the new PHY command group for firmware
supporting the extended command headers.

Signed-off-by: Aviya Erenfeld <aviya.erenfeld@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05 12:28:39 +03:00
Dan Carpenter 1f9c6e1bc1 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: 5e6e3a92b9 ('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>
2015-09-29 11:08:50 +03:00
Ondrej Zary 2b8fa9e870 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>
2015-09-29 11:07:02 +03:00
Ondrej Zary 4a0f2ea797 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>
2015-09-29 11:07:00 +03:00
Rafał Miłecki cf75496b6f ssb: make ssb_pcmcia_switch_core static
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-09-29 11:03:14 +03:00
Rafał Miłecki 264c7708c9 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>
2015-09-29 11:00:59 +03:00
Rafał Miłecki 7b1647bc1a 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>
2015-09-29 11:00:58 +03:00
Rafał Miłecki 44f3fd2700 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>
2015-09-29 11:00:58 +03:00
Hauke Mehrtens 69b5f4da26 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>
2015-09-29 10:59:27 +03:00
Hauke Mehrtens a32be01772 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>
2015-09-29 10:58:07 +03:00
Hante Meuleman 29b93c0e3c 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>
2015-09-29 10:56:22 +03:00
Hante Meuleman cb8dc71f51 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>
2015-09-29 10:56:06 +03:00
Hante Meuleman 55acca90da 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>
2015-09-29 10:56:05 +03:00
Hante Meuleman a2044d91d9 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>
2015-09-29 10:56:03 +03:00
Hante Meuleman 8268c2011d 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>
2015-09-29 10:56:01 +03:00
Hante Meuleman 35a3cbcc49 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>
2015-09-29 10:55:59 +03:00
Hante Meuleman d1bb34c128 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>
2015-09-29 10:55:58 +03:00
Hante Meuleman 9831bcb987 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>
2015-09-29 10:55:57 +03:00
Hante Meuleman 178e9ef9b6 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>
2015-09-29 10:55:55 +03:00
Hante Meuleman 43e55a2a1c 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>
2015-09-29 10:55:54 +03:00