Commit graph

568812 commits

Author SHA1 Message Date
Rafał Miłecki
b3c47afbf5 bcma: support PMU present as separated bus core
On recent Broadcom chipsets PMU is present as separated core and it
can't be accessed using ChipCommon anymore as it fails with e.g.:
[    0.000577] Unhandled fault: external abort on non-linefetch (0x1008) at 0xf1000604

Solve it by using a new (PMU) core pointer set to ChipCommon or PMU
depending on the hardware capabilities.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-06 13:36:11 +02:00
Rafał Miłecki
67edf354fa bcma: use _PMU_ in all names of PMU registers
PMU (Power Management Unit) seems to be a separated piece of hardware,
just accessed using ChipCommon core registers. In recent Broadcom
chipsets PMU is not bounded to CC but available as separated core.

To make code cleaner & easier to review (for a correct R/W access) use
clearer names.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-06 13:36:11 +02:00
Rafał Miłecki
0c06f5d43e bcma: support chipsets with PMU and GCI cores (devices)
Both cores are another exceptions. They are not accessed in a standard
way and to they don't need or have wrapping addresses.
This fixes bus scanning after finding such core.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-06 13:34:51 +02:00
Rafał Miłecki
7267bcda33 bcma: identify bus cores (devices) found on BCM47189
Add missing defines and print proper names.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-06 13:34:50 +02:00
Rafał Miłecki
1b3b36b044 bcma: support identifying MX25L25635F serial flash
It's a Macronix 32 MiB flash found on board with BCM47189 SoC.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-06 13:33:05 +02:00
Kalle Valo
8b3cf6ec11 Here's a first batch of patches for 4.6:
* continue the work on multiple Rx queues (Sara)
 * add support for beacon storing
   used in low power states (Sara)
 * cleanups (Rodrigo, Johannes)
 * fix the LED behavior for iwldvm (Hubert)
 * Use the regular firmware image of WoWLAN (Matti)
 * fix 8000 devices for Big Endian machines (Johannes)
 * more firmware debug hooks (Golan)
 * add support for P2P Client snoozing (Avri)
 * make the beacon filtering for AP mode configurable (Andrei)
 * fix transmit queues overflow with LSO
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWr26YAAoJEC0Llv5uNjIBs28P/0V8CuYpI0mORMWdkf3NnnOk
 M+lV7YXxuBqePTo8v3tFcDW6gT+qY3pp0PsGVvKwl3mzRaJD5K6EJkQdMyrsZboy
 sffQTR/HDpEMR6JNS+YCYIdsUIBGA406ws0Dw96aBNwMQKSmwkw8LoIXs/063NAh
 1athzNePzwjl9f6cxGotA9TsU+A3/mfkqxTDibhRsoFJCgXCojB1IrAzV4muvZ3G
 +eFr8lCqfJq81eKohnMsDEoKLaPdJE+vGLxMiB5AHJvNxiNn2LOX1QYIYCf9StuY
 f0oUaoQ3wOkTaOoq6qRi+DExhf/CbsqxEKmdhTF8spkosgVLBFS8/BnTjuAxJpVN
 5cdd6uhPp4NAgvHSRGGWzFhE58P6DhZdPhog4Zou7jkTPzkQRaP/UAhYMq2u6S4+
 sIKH8y+u15CAIjorY5sUZQgbrqgw7xB7BxQRWWpWHFB7e8CEWyNqE/cCol+gpx5W
 RByKZQM0Gi/BNgVLK7vpsdyYK6FuUCYmC/nwvpVmKhO69hBec6fOgbQ693oyjLz8
 Tnq27OM4l3xUdavzJtXYwRl6RNy6aOdd3jn5CjAI7jcKIYfJ1iBIADypSLzjUCKC
 fI1Y37X8sJkpK4n9g8MwbvNQ9NMNyg3KAYFA0eDdwpDPS/9cHYxDJAF1qJRi5o7G
 thpfMp+Cfy75MLAmOawg
 =qxz4
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-next-for-kalle-2016-01-31_2' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

Here's a first batch of patches for 4.6:
* continue the work on multiple Rx queues (Sara)
* add support for beacon storing
  used in low power states (Sara)
* cleanups (Rodrigo, Johannes)
* fix the LED behavior for iwldvm (Hubert)
* Use the regular firmware image of WoWLAN (Matti)
* fix 8000 devices for Big Endian machines (Johannes)
* more firmware debug hooks (Golan)
* add support for P2P Client snoozing (Avri)
* make the beacon filtering for AP mode configurable (Andrei)
* fix transmit queues overflow with LSO
2016-02-06 13:01:25 +02:00
Andrei Otcheretianski
c89e333d5e iwlwifi: mvm: allow to disable beacon filtering for AP/GO interface
When in AP mode we need to filter in beacons from other APs to update HT
operation mode. As a power optimization the beacons are filtered out when
there are no associated stations. As a result, when there are no
associated stations, we will not update the HT operation mode until a
station connects.
Add a debugfs parameter that allows to disable this optimization.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:29 +02:00
Sara Sharon
d56a7801b5 iwlwifi: pcie: update iwl_mpdu_desc fields
Final API of iwl_mpdu_desc has a change in the order of
the fields and does not include energy from the third
antenna (which is perfectly fine, since we don't have one).
Update the structure accordingly.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:28 +02:00
Sara Sharon
bce9773104 iwlwifi: pcie: enable multi-queue rx path
Previous patches enabled new 9000 hardware DMA for one queue
only.
Enable the actual multi-queue path and configuration now.
This requires also per-queue NAPI struct.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:28 +02:00
Sara Sharon
43413a975d iwlwifi: mvm: support rss queues configuration command
9000 series supports multi-queue rx. The hardware needs
to be configured with the hash functions to perform and
indirection table that maps hash results to the relevant
CPUs\queues.
Support this configuration.
Add debugfs hook to configure the indirection table in
order to enable performance analysis. The configuration
is stateless, receives a partial or full pattern and sends
the command to the firmware.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:27 +02:00
Gregory Greenman
6ad6c01fa7 iwlwifi: mvm: rs: fix TPC action decision algorithm
Decreasing Tx power is allowed only when success ratio is
above the threshold defined in the algorithm. Add this condition.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:27 +02:00
Sara Sharon
854c570573 iwlwifi: mvm: add new ADD_STA command version
The 9000 hardware introduces the frame releaser, which
keeps track of the aggregation window and notifies host
of the window status. This requires in turn updating
the hardware with the RX BA session window size.
Firmware API was changed to enable that, update the driver
accordingly.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:27 +02:00
Avri Altman
416ec4f392 iwlwifi: mvm: Remove iwl_mvm_update_beacon_abort
It is only called from iwl_mvm_power_set_ba() so simplify things
by removing it.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:26 +02:00
Avri Altman
8812182e5d iwlwifi: mvm: Remove bf_vif from iwl_power_vifs
This member is actually not needed as beacon abort
is only allowed for a bss station.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:26 +02:00
Johannes Berg
c257d5fb52 iwlwifi: treat iwl_parse_nvm_data() MAC addr as little endian
The MAC address parameters passed to iwl_parse_nvm_data() are passed on
to iwl_set_hw_address_family_8000() which treats them as little endian.
Annotate them as such, and add the missing byte-swapping in mvm.

While at it, add the MAC address to the error to make debugging issues
with it easier.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:25 +02:00
Sara Sharon
81f02ba3db iwlwifi: mvm: add tlv for multi queue rx support
Previous patches enabled the multi-queue rx path based on
iwl_mvm_has_new_rx_api() which returned false by default.
Change it to return the actual value based on the firmware
TLV which is now defined.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:25 +02:00
Sara Sharon
837c4da984 iwlwifi: mvm: change the check for ADD_STA status
The firmware will return the baid for BA session in the
ADD_STA command response.
This requires masking the check of the status, which is
actually only 8 bits, and not the whole 32 bits.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:24 +02:00
Max Stepanov
1c4e15a23d iwlwifi: mvm: add debug print if scan config is ignored
Print a debug message in iwl_mvm_config_scan() if a scan configuration
data is decided not to be sent to FW.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:24 +02:00
Sara Sharon
0c1c6e3713 iwlwifi: mvm: change access to ieee80211_hdr
Make the code clearer.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:23 +02:00
Johannes Berg
a80c1cf9b4 iwlwifi: mvm: support setting minimum quota from debugfs
For debug purposes, allow setting minimum quota (for a single
virtual interface) from debugfs. This is an absolute minimum,
so it can only be set up to 95%.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:23 +02:00
Johannes Berg
b525d08125 iwlwifi: mvm: track low-latency sources separately
To be able to test low-latency behaviour properly, split the
different low-latency sources so that setting any one of them,
for example from debugfs, is sufficient; this avoids getting
the debug setting overwritten by other sources.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:22 +02:00
Sara Sharon
0db056d324 iwlwifi: mvm: support beacon storing
Currently firmware is configured to filter out beacons. In case
a beacon was changed - it is waking the host.
However, some vendors change their IEs frequently without any
significant change, and redundant wakeups are triggered as a
result.
As a solution disable beacon filtering when entering d0i3.
Instead, firmware will store the latest beacon and upon exiting
d0i3 it will send it up to the host, so the host can act upon
changes (if there were any).
This beacon will arrive as a dedicated notification - support it
as well.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:22 +02:00
Chaya Rachel Ivgi
7869318e42 iwlwifi: mvm: add support for negative temperatures
The driver should support also negative temperatures.
So there is a need to separate between the return value and
temperature in order to be able to distinguish between
a negative temperature and error value.

Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:21 +02:00
Johannes Berg
27e070d3d3 iwlwifi: mvm: fix debugfs signedness warning
Using kstrtouint() with a signed int isn't really right,
use kstrotoint() instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:21 +02:00
Johannes Berg
d8f7c5115d iwlwifi: mvm: remove shadowing variable
The outer scope has a perfectly suitable 'i' variable,
use it instead of adding a shadowing one in the inner
scope.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:20 +02:00
Golan Ben-Ami
33efe947e7 iwlwifi: mvm: make collecting fw debug data optional
Slow platforms may have issues with dumping data upon
firmware assert. Make it easier to disable it for those
platform.

Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:20 +02:00
Avri Altman
ee95ed3728 iwlwifi: mvm: Add P2P client snoozing
Enable snoozing and U-APSD on P2P client. The firwmare will
support this only if the BSS vif is not associated.
Make this configurable by a constant variable and disable
it by default.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:20 +02:00
Golan Ben-Ami
25657fec94 iwlwifi: mvm: add trigger for firmware dump upon TX response status
This will allow to collect the data when the firmware
sends a specific tx response status.

Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:19 +02:00
Rodrigo Freire
d1cae0fd22 iwlwifi: Document missing module options
This patch documents two missing module options in the internal
code comment block.

Signed-off-by: Rodrigo Freire <rfreire@redhat.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:19 +02:00
Hubert Tarasiuk
bdf408eca8 iwlwifi: dvm: handle zero brightness for wifi LED
In order to have the LED being OFF constantly when the
brightness is set to 0, we need to pass IWL_LED_SOLID to
iwl_led_cmd as the off parameter, otherwise the led will
stay on constantly.

This fixes
https://bugzilla.kernel.org/show_bug.cgi?id=110551

Signed-off-by: Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
[reworked the commit message]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:18 +02:00
Emmanuel Grumbach
15ffd075e4 iwlwifi: various comments and code cleanups
No need to include net/ip6_checksum.h twice.
Remove TODOs.
Remove trailing space.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:18 +02:00
Matti Gottlieb
23ae61282b iwlwifi: mvm: Do not switch to D3 image on suspend
Currently when the driver is configured with wowlan parameters, and enters
D3 mode, the driver switches the FW image to D3, and when it exists
suspend, it reloads the D0 image.

If the firmware supports the consolidation of the D0 & D3 images there is
no need to load the D3 image on suspend, and no need to reload the D0
image on resume.

Do not switch images on suspend / resume, for firmwares that support
consolidated images.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:17 +02:00
Luciano Coelho
4cbb8e5033 iwlwifi: pcie: add RTPM support when wifi is enabled
Enable runtime power management (RTPM) for PCIe devices and implement
the corresponding functions to enable D0i3 mode when the device is
idle.

Additionally, remove some unnecessary #ifdef's because the RTPM code
will not be called if runtime PM is not configured.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:40:17 +02:00
Luca Coelho
b3ff127056 iwlwifi: pcie: add initial RTPM support for PCI
Add an initial implementation of runtime power management (RTPM) for
PCI devices.  With this patch, RTPM is only used when wifi is off
(i.e. the wifi interface is down).  This implementation is behind a
new Kconfig flag, IWLWIFI_PCIE_RTPM.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01 16:39:33 +02:00
Sara Sharon
96a6497bc3 iwlwifi: pcie: add 9000 series multi queue rx DMA support
The 9000 series introduces several changes in the device
DMA operation.
As the device now supports multi-queue rx, several DMA channels
should be configured.
The flows of providing the device with the allocated RBDs now
changes as well - the device maintains a separate table of used
and free table.

The hardware may use the free table to feed RBDs to any queue.
This requires maintaing a shared table to map returned RBDs to
the original RXB - for that purpose the VID is introduced - an
internal identifier of the RB placed in the lower 12 bits and
returned by HW in the used data.

Another change is the support of 64 bit DMA address.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-01-31 12:53:43 +02:00
Sara Sharon
7848505416 iwlwifi: pcie: add infrastructure for multi-queue rx
The 9000 series devices will support multi rx queues.
Current code has one static rx queue - change it to allocate
a number of queues per the device capability (pre-9000 devices
have the number of rx queues set to one).

Subsequent generalizations are:

Change the code to access an explicit numbered rx queue only
when the queue number is known - when handling interrupt, when
accessing the default queue and when iterating the queues.
The rest of the functions will receive the rx queue as a pointer.

Generalize the warning in allocation failure to consider the
allocator status instead of a single rx queue status.

Move the rx initial pool of memory buffers to be shared among
all the queues and allocated to the default queue on init.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-01-31 12:42:52 +02:00
Emmanuel Grumbach
3955525d5d iwlwifi: pcie: buffer packets to avoid overflowing Tx queues
When the Tx queues are full above a threshold, we
immediately stop the mac80211's queue to stop getting new
packets. This worked until TSO was enabled.
With TSO, one single packet from mac80211 can use many
descriptors since a large send needs to be split into
several segments.
This means that stopping mac80211's queues is not enough
and we also need to ensure that we don't overflow the Tx
queues with one single packet from mac80211.
Add code to transport layer to do just that. Stop
mac80211's queue as soon as the queue is full above the
same threshold as before, and keep pushing the current
packet along with its segments on the queue, but check
that we don't overflow. If that would happen, buffer the
segments, and send them when there is room in the Tx queue
again. Of course, we first need to send the buffered
segments and only then, wake up mac80211's queues.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-01-31 12:42:52 +02:00
Amitkumar Karwar
a92277bc3b mwifiex: use SYNC flag for canceling host sleep
Host sleep is cancelled in sdio resume() handler.
Cfg80211's resume handler is immediately called after
this. SYNC flag here ensures that host sleep handshake
gets completed and we have valid "adapter->nd_config"
before we report host wakeup reason in cfg80211's
resume handler.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:20:42 +02:00
Ganapathi Bhat
fdcab08305 mwifiex: add RSSI support for net-detect
This patch adds support for waking up the device on
finding better RSSI. Threshold RSSI value will be
configured by application.

Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:20:41 +02:00
chunfan chen
8de00f1b1c mwifiex: report wakeup reason to cfg80211
This patch adds code to report wakeup reason to cfg80211
when system is resumed.

Signed-off-by: chunfan chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:20:40 +02:00
chunfan chen
7d7f07d8c5 mwifiex: add wowlan net-detect support
This patch adds support for wakeup when configured
network is detected.

Signed-off-by: chunfan chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:20:39 +02:00
chunfan chen
5323b53d80 mwifiex: add wowlan info messages
This patch adds informative messages in wake up on
magic packet, disconnect, pattern configuration paths.

Signed-off-by: chunfan chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:20:38 +02:00
Xinming Hu
0c9b7f22e8 mwifiex: add schedule scan support
This patch add sched scan support for mwifiex, include cfg80211
sched_scan_start/sched_scan_stop handler, corresponding bgscan
command path and event handler.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: chunfan chen <jeffc@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>
2016-01-29 11:20:37 +02:00
Shengzhen Li
dc896b15fe mwifiex: fix power state out of sync problem
It's been observed that driver's power state goes out
of sync with firmware in some corner cases. When this
happens, driver tries to download the data to firmware
assuming it's awake which causes Tx data timeout.

Main thread will process interrupt as soon as interrupt
handler fills 'int_status' variable.

This patch fixes the race issue by updating 'int_status'
at the end of mwifiex_interrupt_status().

Signed-off-by: Shengzhen Li <szli@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:18:22 +02:00
Xinming Hu
99074fc1e6 mwifiex: enable pcie MSIx interrupt mode support
Newer pcie chipsets (8997 onwards) support MSIx. This
patch enables 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>
2016-01-29 11:17:19 +02:00
Andrzej Hajda
68f37e5d7a wlcore: fix error handling in wlcore_event_fw_logger
wlcore_read/wlcore_write can return negative values so it should
be assigned to signed variable.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2120705

Fixes: 3719c17e18 ("wlcore/wl18xx: fw logger over sdio")
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:14:57 +02:00
Xinming Hu
17934b6a32 mwifiex: add debugfs file to read chip information
This patch add 'verext' debugfs item, which can be used to
get detailed chip specific information from our firmware.

Examples:
echo "1" > /sys/kernel/debug/mwifiex/mlan0/verext
cat /sys/kernel/debug/mwifiex/mlan0/verext

Signed-off-by: Shengzhen Li <szli@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:11:37 +02:00
chunfan chen
dc386ce76d mwifiex: fix IBSS data path issue.
The port_open flag is not applicable for IBSS mode. IBSS data
path was broken when port_open flag was introduced.
This patch fixes the problem by correcting the checks.

Fixes: 5c8946330a ("mwifiex: enable traffic only when port is open")
Signed-off-by: chunfan chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:11:34 +02:00
chunfan chen
2fd5c6ed0b mwifiex: firmware download enhancements
Same chip is being used by WLAN as well as bluetooth
drivers. Each driver needs to check during initialisation
if firmware is already active or it needs to be freshly
downloaded. If one driver has started downloading the
firmware, other finds the winner flag as false.

mwifiex_check_fw_status() checks firmware status and also
check if WLAN is the winner for firmware downloading.

Once we detect that other interface is downloading
the firmware, we call this routine again with max
poll count to wait until firmware is ready.

This patch splits the routine to avoid checking
winner status unnecessarily multiple times and ensures
that correct messages are displayed to user.

Firmware status poll count is also increased to 150.

Signed-off-by: Chunfan Chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:11:31 +02:00
Uri Mashiach
04654c3861 wlcore/wl12xx: spi: add device tree support
Add DT support for the wl1271 SPI WiFi.

Add documentation file for the wl1271 SPI WiFi.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Acked-by: Rob Herring <robh@kernel.org>
Tested-By: Sebastian Reichel <sre@kernel.org>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-29 11:10:10 +02:00