Commit graph

564487 commits

Author SHA1 Message Date
Maya Erez
faab237c9c wil6210: handle multiple connect/disconnect events
In the current solution wil6210 configures the vring in a worker
and holds only one pending CID. This implementation may lead to
race conditions between connect and disconnect events of multiple
stations or fast connect/disconnect events of the same station.

In order to allow the removal of the connect worker and handling of
WMI_VRING_CFG_DONE_EVENTID in the connect event, the WMI replies
that provide the reply in a given buffer needs to be handled
immediately in the WMI event interrupt thread.
To prevent deadlocks, WMI replies that requires additional
handling are still handled via the events list.

Change-Id: I81f08011ef98be845d98fbe15d98bbf050032f88
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 0916d9f2b6bea53a830ae5061b63a515c04da62e
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 971604
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:08 -07:00
Maya Erez
fdf67e3dd1 wil6210: find TX vring only if vring_tx_data is enabled
In TX vring allocation, vring_tx->va is allocated before WMI command to
configure the vring is sent to the device. As the WMI command can take
time to complete, it can lead to scenarios where vring_tx->va is not NULL
but vring is still not enabled.

This patch adds a check that vring_tx_data is enabled before returning
a valid TX vring.

Change-Id: I21bad8fdbb7bb0ff8fe0447efb94dbfd69f4e6b0
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: b729aaf066b013458e95cd6c69a5e371eb9ce355
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 971604
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:07 -07:00
Maya Erez
f4309fe27e wil6210: handle tx completions only if vring tx data is enabled
wil_vring_fini_tx is called in disconnect in order to free the
allocated vrings.
wil_vring_fini_tx is disabling the vring_tx_data before napi_synchronize
is called in order to avoid the tx handling of this vring, while
wil_vring_free is called only after napi finished the current handling
of the tx completed packets.
Due to that, in case of disconnect, wil6210_netdev_poll_tx can be called
when vring->va is not NULL but vring_tx_data[i]->enabled is already
disabled.

This patch checks vring_tx_data[i]->enabled in wil6210_netdev_poll_tx
to prevent handling of disabled vrings.

Change-Id: I6c38be5b47eb3c34ccb4b503545fccada26806e4
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 640751ac30b2ddfbe06ad712aa7d57a8d89a7eef
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 971604
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:06 -07:00
Lior David
92009e8020 wil6210: use extra IEs from probe response
In the start_ap/change_beacon API, when we set up probe response
offloading, we only use the IE list from the probe response
template and not the IE list from the proberesp_ies argument.
As a result, we miss important IEs and it causes problems with
some scenarios such as P2P.
With this change, we merge the list of IEs from the probe response
template and proberesp_ies and send the merged list to the FW
for offloading. It is still FW responsibility to filter out
irrelevant IEs when sending probe response, based on the actual
contents of the probe request.
Also in case association response termplate is not provided,
we will use the merged list of IEs from probe response in the
association response as well.

Change-Id: Ic21e9a70f64af67c630dc710ccd6825879f872b6
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: c100c883e785802ab333604237928a65ae62c6bc
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 970919
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:05 -07:00
Lior David
00ffb353aa wil6210: fix privacy flag calculation in change_beacon
Currently the privacy flag calculation in change_beacon
checks for RSN IE inside proberesp_ies, but normally it
is not found there. It works today because of code inside
the function wil_fix_bcon, but wil_fix_bcon is not directly
related to change_beacon, and it may be changed or removed
in the future and break the calculation.
To fix this issue, change the privacy flag calculation
to check RSN IE inside the beacon itself. The new check is more
reliable and will not be sensitive to changes in wil_fix_bcon.

Change-Id: Ida5b55f6456d04e22303fedddc8c77c5ad081177
CRs-Fixed: 970919
Signed-off-by: Lior David <liord@codeaurora.org>
2016-03-23 19:58:04 -07:00
Maya Erez
5e89efd09c msm_11ad: add VDD and VDDIO regulators voting
On platforms where the power supply for 11AD is external
the wil6210 driver has to vote for the VDD and VDDIO regulators.

This patch adds such voting and guarantees the required
voltage for each regulator.

Change-Id: I472fe6b0600557bc4e623a3dd1b6352fd4a86e27
[merez@codeaurora.org: using regulator_set_load]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:04 -07:00
Lior David
add338b4a5 msm_11ad: add support for subsystem_restart framework
Add 11ad as a subsystem (WIGIG) within the subsystem_restart
framework, in order to allow proper support for recovery from
11ad firmware crashes, and support automated collection of
crash dumps for offline analysis and bug reporting.

Change-Id: I7acbe8860e046cdba2ce027f91ed2fa995a70c70
Signed-off-by: Lior David <liord@codeaurora.org>
[merez@codeaurora.org: fixed merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:03 -07:00
Lior David
f9b44400f7 wil6210: support for platform specific crash recovery
Added a simple interface for platform to perform crash
recovery.
When firmware crashes, wil driver can notify the platform
which can trigger a crash recovery process. During
the process the platform can request a ram dump
from the wil driver as well as control when firmware
recovery will start. This interface allows the platform
to implement a more advanced crash recovery, for
example to reset dependent subsystems in proper order, or
to provide its own notifications during the recovery process.

Change-Id: I2545d220b779c24931b6263249449f37bcad75a4
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: ea3ade75db690dc47c78a77d71dfd7c2df3bb15d
Git-repo: https://github.com/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:02 -07:00
Hamad Kadmany
eba9e63599 wil6210: fix kernel OOPS when stopping interface during Rx traffic
When network interface is stopping, some resources may
be already released by the network stack, and Rx frames
cause kernel OOPS (observed one is in netfilter code)

Proper solution is to drop packets pending in reorder buffer.

Change-Id: Id043d466135f20fe980814380e6f01e2554c22e3
Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: dea16eddb4753129dbcd8dc8d1a58ff0cc4ea38c
Git-repo: https://github.com/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:01 -07:00
Dan Carpenter
5a45ce7b35 wil6210: fix a warning message condition
"iter" is -1 at the end of the loop and not zero.  It means we don't
print a warning message.

Change-Id: I532bd54fbdafb92e71205c317ae5d467c4cd5f3b
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: f94c48d6c315a580b60b062c0360561b61faa311
Git-repo: https://github.com/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:00 -07:00
Maya Erez
fa8629d210 wil6210: prevent external wmi commands during suspend flow
In __wmi_send we check if fw is ready at the beginning of the function.
While we wait for the completion of the previous command, system suspend
can be invoked and reset the HW, causing __wmi_send to read from HW
registers while it is not ready.
Taking the wmi_mutex in the reset flow when setting the FW ready bit
to zero will prevent the above race condition.

Change-Id: I5d2e823a27beaeaaf5b8b1e25457c158efd3ea46
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:59 -07:00
Vladimir Kondratiev
97f833bbc8 wil6210: hold wil->mutex while managing vrings
To prevent race when connect flow may run in parallel with
the disconnect event.

Scenario leading to the bug is: while running connect flow on the AP,
STA sends disconnect. log follows.

<7>[  668.736269] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Configure for connection CID 1
<7>[  668.736269] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_init_tx() max_mpdu_size 2048
<7>[  668.736301] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_alloc()
<7>[  668.736363] wil6210 0000:01:00.0: wlan0: DBG[MISC]vring[1024] 0xffbe8000:d962ce08 0xdb244000
<7>[  668.736394] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Head 0x00880300 -> 0x00880308
<7>[  668.736394] wil6210 0000:01:00.0: wlan0: DBG[ WMI]WMI command 0x0821 [28]
<7>[  668.736426] DBG[ WMI]Cmd 00000000: 20 00 24 00 00 00 00 00 00 00 21 08 00 00 00 00   .$.......!.....
<7>[  668.736426] DBG[ WMI]cmd 00000000: 00 00 00 00 00 00 5f 5c 00 00 00 00 00 04 00 08  ......_\........
<7>[  668.736457] DBG[ WMI]cmd 00000010: 01 01 00 00 00 00 00 00 00 00 ff 0f              ............
<7>[  668.736488] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Pseudo IRQ 0x00000004
<7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1824 (reply_id 0x1821)
<7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]wil6210_mask_irq_pseudo()
<7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]ISR MISC 0x20000000
<7>[  668.736551] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1003 (reply_id 0x1821)
<7>[  668.736551] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Disconnect 04:ce:14:00:07:70 reason [proto 3 wmi 4]
<7>[  668.736582] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
<7>[  668.736613] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Thread IRQ
<7>[  668.736613] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Thread ISR MISC 0x20000000
<7>[  668.736644] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]MBOX event
<7>[  668.736644] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Mbox head 00880330 tail 00880328
<7>[  668.736676] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Mbox evt 001a 0010 0000 00
<7>[  668.736676] wil6210 0000:01:00.0: wlan0: DBG[ WMI]WMI event 0x1821 MID 0 @3255145 msec
<7>[  668.736707] DBG[ WMI]evt 00000000: 1a 00 10 00 00 00 00 10 00 00 21 18 69 ab 31 00  ..........!.i.1.
<7>[  668.736707] DBG[ WMI]evt 00000010: 01 01 00 00 00 00 00 00                          ........
<7>[  668.736738] wil6210 0000:01:00.0: wlan0: DBG[ WMI]queue_work -> 0
<7>[  668.736738] wil6210 0000:01:00.0: wlan0: DBG[ WMI]wmi_recv_cmd -> 1 events queued
<7>[  668.736769] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]wil6210_unmask_irq_pseudo()
<7>[  668.736832] wil6210 0000:01:00.0: wlan0: DBG[MISC]Disconnect 04:ce:14:00:07:70, CID=1, reason=3
<7>[  668.736832] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_disconnect_cid(CID 1, status 1)
<7>[  668.736894] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_fini_tx() id=1
<7>[  668.736894] wil6210 0000:01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 0xffbe8000:d962ce08 0xdb244000
<7>[  668.736957] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1821 (reply_id 0x1821)
<7>[  668.736988] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Complete WMI 0x1821
<7>[  668.737019] wil6210 0000:01:00.0: wlan0: DBG[ WMI]wmi_call(0x0821->0x1821) completed in 0 msec
<3>[  668.737019] wil6210 0000:01:00.0: wlan0: Tx config failed, status 0x01
<7>[  668.739518] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_cfg80211_del_station(04:ce:14:00:07:70, reason=2)
<7>[  668.739550] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
<7>[  668.739550] wil6210 0000:01:00.0: wlan0: DBG[MISC]_wil6210_disconnect(bssid=04:ce:14:00:07:70, reason=2, ev-)
<7>[  668.739581] wil6210 0000:01:00.0: wlan0: DBG[MISC]Disconnect 04:ce:14:00:07:70, CID=-2, reason=2
<7>[  668.742705] wil6210 0000:01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 0x  (null):d962ce08 0x  (null)
<3>[  668.742736] __dma_free_remap: trying to free invalid coherent area:   (null)

Change-Id: I19b37cbea24cecfb56099e8931687c380839f1c0
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 9b1ba7b28e70a1f4066cfa3bebea24953f36feef
Git-repo: https://github.com/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:59 -07:00
Maya Erez
55ea73efd0 msm_11ad: change wigig_en to be an optional property
Some platforms don't support the wigig_en GPIO.
Changing wigig_en to be an optional property allows
removing the redundant setting of this GPIO in platforms
that do not support it.

Change-Id: Iad33d3876c1657cc4cc6b779b11d1c634f58a243
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:58 -07:00
Hamad Kadmany
fd6b238f22 msm_11ad: Disable asynchronous suspend
msm root-complex does not maintain parent/child relationship
with PCIe devices. Due to this, suspend operation may be carried
out asynchronously between PCIe device and root-complex.

In cases where 11ad refuses to suspend for any reason, the
root-complex connected to it may get suspended in parallel,
causing inconsistency between root-complex and 11ad device.

Disabling async suspend ensures proper ordering of suspend
between PCIe device and root-complex.

Change-Id: I42749d6af229721dc420b55b91e78bf58923d67f
CRs-Fixed: 933571
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:57 -07:00
Hamad Kadmany
8236eb8628 wil6210: Handle set WPS-P2P IE ioctl
hostap in Android issues private ioctls in some scenarios,
specifically P2P and WPS.

Currently 11ad driver supports WPS but not P2P, when WPS
is enabled IE related to WPS in P2P is sent through
private ioctl and fails which blocks WPS.

Add handling of this command so that WPS could be
enabled outside of P2P flow.

Change-Id: Id67174ad128b47a6b6244b1fe48b0e535b397247
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:56 -07:00
Hamad Kadmany
41d3baa95e msm_11ad: Add option to enable sleep clock
Sleep clock may be used by 11ad chip to support
low power modes.

Change-Id: I00c9c5f3d24fa47463f5d0fe4aecc97ab09334b9
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
[merez@codeaurora.org: fixed merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:55 -07:00
Hamad Kadmany
857bd53c2d msm_11ad: Fix config space restore from suspend
Config space was not properly restored when
resuming from suspend.

Change-Id: I6b9188f3989957eb44c93302d7958d422bb29e81
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:54 -07:00
Maya Erez
ab30d8cc16 msm_11ad: remove order parameter from arm_iommu_create_mapping()
Align msm_11ad driver with commit:
5d186c1a1f152c480b51772764d53f66c2a657ca - arm64: dma-mapping:
remove order parameter from arm_iommu_create_mapping()

Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:54 -07:00
Hamad Kadmany
ffac72e679 msm_11ad: Set atomic attribute to SMMU driver
Set DOMAIN_ATTR_ATOMIC attribute to SMMU driver so that
it can handle DMA map/unmap operations from atomic context
which is required by 11ad driver

Change-Id: I7e538e6c41e5f40ff01dcfc9cbecf860ded22057
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:53 -07:00
Hamad Kadmany
d01e7b6017 msm_11ad: Tune delay between chip power-on to PCIe init
Larger delay is required when using perf build

Change-Id: I1f24aa181e0f6982ec637a24a0ae543e87b500cc
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:52 -07:00
Hamad Kadmany
3de46377e1 msm_11ad: Add delay between chip power-on to PCIe init
Delay is required to wait for the PCIe endpoint to become
stable after power on before de-assertion of PERST to
the endpoint by PCIe root complex.

Change-Id: Ib064e936fa0540646e6751d7c3b739c0beb48e60
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:51 -07:00
Hamad Kadmany
572c609c0a msm_11ad: Add proper NULL check
Failure of memory allocation for context was
not properly checked. Added proper check against
valid context value in relevant locations.

Change-Id: Ia74ddfb3c54e2781957e695a831c30f1356fed08
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:50 -07:00
Hamad Kadmany
9ba9a18604 msm_11ad: Add 11ad platform driver
Platform driver used to handle msm specific platform
requirement for 11ad chipset connected to msm platform

Takes care of platform support like:
- power switch through dedicated GPIO
- bus frequency voting
- SMMU attachment

Change-Id: I09c54ea747a5b4e0688b1b7d96e83ef134bb4215
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
[merez@codeaurora.org: fix merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:49 -07:00
Hamad Kadmany
28a5c53fcb wil6210: use msm_11ad for platform operations
wil6210 11ad driver hook to platform specific
driver so that platform specific operations of msm
are properly executed.

Need to reorder init sequence to run wil_platform_init
before pci_enable_device. Assumption is platform init
may be required before device may be enabled, for example,
to turn on platform power for 11ad chip and run
PCIe enumeration.

platform uninit should be called after
pci_disable_device because platform uninit may render
pci device non-accessible.

Change-Id: Id36d20c2dcbf8704b1c4aec9e962117960c2eefe
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
[merez@codeaurora.org: fixed merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:49 -07:00
Hamad Kadmany
7602152806 wil6210: Add IOMMU support for MSM targets
Initialize IOMMU if target supports it.

Change-Id: Ice8d7d1e2fb3db5b3f96131945c628529172cbe4
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:48 -07:00
Vladimir Kondratiev
4fc6b9520f wil6210: platform specific module
New module (wil_platform) for handling platform specific tasks

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
[merez@codeaurora.org: fixed merge conflicts and change to ARCH_QCOM]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:47 -07:00
Zhen Kong
722093b86a defconfig: arm64: msm: Enable qcom msm crypto driver
This is necessary to support qcom msm crypto functionality.

Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 19:57:46 -07:00
Zhen Kong
97a7e8fcc4 crypto: msm: disable aead alg related apis temporarily
Just temporarily disable aead alg related apis for 4.4 upgrade.
4.4 upstream cryto driver has a lot of changes on aead related APIS
and data structures, and hw crypto driver can not be compiled on 4.4.

Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 19:57:45 -07:00
Yue Ma
1db07b7a79 defconfig: msm: Enable WLAN related flags
Add the flags which are required to enable WLAN.

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-23 19:57:44 -07:00
Zhen Kong
8b7be0561d crypto: msm: Add QCOM crypto drivers
This snapshot is taken as of msm-3.18 commit e70ad0cd
(Promotion of kernel.lnx.3.18-151201.)

Acked-by: Shabnam Aboughadareh <shabnama@qti.qualcomm.com>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 19:57:25 -07:00
Yue Ma
afe1110e08 icnss: Fix minor compilation bug for upgrading to msm-4.4 kernel
Add corresponding header file for ioremap() in order to compile icnss
driver for msm-4.4 kernel.

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-22 11:16:50 -07:00
Ganesh Kondabattini
d91e2f37dc Revert "cfg80211/mac80211: disconnect on suspend"
This reverts commit 8125696991.

The commit"cfg80211/mac80211: disconnect on suspend" forces disconnection
on wlan interfaces if wake on wireless is not enabled from the user space.
Wake on Wireless is enabled by default in wlan driver (CLD) and cfg80211
layer never aware of wake on wirless enabled status done in wlan driver.

To avoid the disconnection while going to suspend and keep wlan driver
in WOW mode by default, the commit "cfg80211/mac80211: disconnect on
suspend" should be reverted.

CRs-Fixed: 540571
Change-Id: I483fe0530f9f00c338680416449215af326e3df1
Signed-off-by: Ganesh Kondabattini <ganeshk@codeaurora.org>
2016-03-22 11:16:49 -07:00
Ahmad Kholaif
bf6ab094ca Revert "cfg80211: export interface stopping function"
This reverts commit f04c22033c.

The commit "cfg80211: export interface stopping function" exports a new
cfg80211_stop_iface() function, intended for driver internal interface
combination management and channel switching. The new function is used
by commit "cfg80211/mac80211: disconnect on suspend" which is reverted
in order to avoid the disconnection while going to suspend. Hence the
commit "cfg80211: export interface stopping function" should be reverted.

CRs-Fixed: 540571
Signed-off-by: Ahmad Kholaif <akholaif@codeaurora.org>
2016-03-22 11:16:48 -07:00
Sameer Thalappil
1bbf97af3a cfg80211: Add AP stopped interface
AP stopped interface can be used to indicate that the AP mode has
stopped functioning, WLAN driver may have encountered errors that has
forced the driver to stop the AP mode.

When the driver is in P2P-Go mode, and when it goes thru automatic
recovery from firmware crashes, it uses this interface to notify the
userspace that the group has been deleted.

CRs-Fixed: 453060
Change-Id: Ifcd8d4f0c0b26f56a56fb8560aa474297b7521d4
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2016-03-22 11:16:47 -07:00
Amar Singhal
f3124f8f23 cfg80211: Use new wiphy flag WIPHY_FLAG_DFS_OFFLOAD
When flag WIPHY_FLAG_DFS_OFFLOAD is defined, the driver would handle
all the DFS related operations. Therefore the kernel needs to ignore
the DFS state that it uses to block the userspace calls to the driver
through cfg80211 APIs. Also it should treat the userspace calls to
start radar detection as a no-op.

Change-Id: I9dd2076945581ca67e54dfc96dd3dbc526c6f0a2
CRs-Fixed: 630797
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
[neelanshm@codeaurora.org: Do not include the unrequired
 change in util.c]
Signed-off-by: Neelansh Mittal <neelanshm@codeaurora.org>
2016-03-22 11:16:47 -07:00
Ryan Hsu
32d2b6aaf7 msm: wlan: Update db.txt for regulatory support
This commit merges the following commits into one snapshot up to
msm-3.18 commit e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1.

8e465d5 msm: wlan: Update tx power limits of country UA
296bec0 msm: wlan: Update regulatory database for some countries
c0fc361 msm: wlan: Fix the DFS region for Japan
6f1cca3 msm: wlan: Update the wifi regulatory database for TW
2c5867a msm: wlan: Modify JAPAN regulatory rules
e430543 regdb: Update database with 60GHz for Japan
ccce8fb msm: wlan:  Correct the parsing of db.txt
acf74a2 cfg80211: add space after the b/w in db.txt
b2b5b4e msm: wlan: update the dfs_region to db.txt
36c64bd msm: wlan: Add country KP
da5d9cb msm: wlan: Update db.txt for regulatory support.

Signed-off-by: Ryan Hsu <ryanhsu@codeaurora.org>
2016-03-22 11:16:46 -07:00
Johannes Berg
aff47b6145 mac80211: implement HS2.0 gratuitous ARP/unsolicited NA dropping
Taking the gratuitous ARP/unsolicited NA detection code from
mwifiex (but fixing it up to not have read-after-skb-end bugs),
implement the ability for userspace to request the behaviour
required by HS2.0 to drop gratuitous ARP and unsolicited NA
frames when proxy ARP service is enabled on the AP. Since this
behaviour is only mandatory for HS2.0 and may not always be
desired, make it optional - modify cfg80211/nl80211 for that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: be9efdecf8ecdcc6d2221845482e7359b33a603b
Git-repo : git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Change-Id: I1e4083a2327c121073226aa6b75bb6b5b97cec00
CRs-fixed: 621827
[akholaif@codeaurora.org: only picked up the declaration
 and definition of cfg80211_is_gratuitous_arp_unsolicited_na()]
Signed-off-by: Ahmad Kholaif <akholaif@codeaurora.org>
2016-03-22 11:16:45 -07:00
Mihir Shete
56ef16eb6a cfg80211: export regulatory_hint_user() API
This is to help the hardware configured in world
roaming mode to save power when not connected to
any AP.

CRs-Fixed: 542802
Change-Id: Ia643d0e9848dcd486832973bd6dd186edd7bd4ea
Signed-off-by: Mihir Shete <smihir@codeaurora.org>
2016-03-22 11:16:44 -07:00
Amar Singhal
5d657bb340 cfg80211: Add new wiphy flag WIPHY_FLAG_DFS_OFFLOAD
Add new flag WIPHY_FLAG_DFS_OFFLOAD to the wiphy structure. When this
flag is defined, the driver would handle all the DFS related operations.

CRs-Fixed: 630797
Change-Id: I592722607788dc4e2167c90bb684071cc9fb6986
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
2016-03-22 11:16:43 -07:00
Yue Ma
791a6a69a5 net: icnss: Add snapshot of icnss driver
This is a snapshot of the icnss driver and associated files as of
msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of kernel.lnx.
3.18-151201.)

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-22 11:16:42 -07:00
Yue Ma
f590819cde net: cnss: Add snapshot of cnss driver
This is a snapshot of the cnss driver and associated files as of
msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of kernel.lnx.
3.18-151201.)

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-22 11:16:41 -07:00
Yue Ma
0c00aa87c1 net: cnss_prealloc: Add snapshot of cnss prealloc driver
This is a snapshot of the cnss prealloc driver and associated files
as of msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of kernel.lnx.
3.18-151201.)

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-22 11:16:40 -07:00
Yue Ma
ffe5134f23 net: wcnss: Add snapshot of wcnss driver
This is a snapshot of the wcnss driver and associated files as of
msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of kernel.lnx.
3.18-151201.)

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-22 11:16:40 -07:00
Abhijeet Dharmapurikar
81f2b08a8f qpnp: revid: fix the use of TYPE and SUBTYPE
The TYPE for a PMIC chip is always 0x51. There is no need to define it
for each PMIC chip.

Also the SUBTYPE of a PMIC chip doesn't change with versions. Have a
single definition of the SUBTYPE per PMIC chip.

Also, the driver uses integer indexes to get to the pmic name, instead
use the SUBTYPE to index in the pmic names array.

Change-Id: Ie1c43f3db0d4a395307253aad347ad93624a1203
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-22 11:16:39 -07:00
Rohit Vaswani
774b4c9f4a lib: Kconfig.debug: Fix the recursive dependency
An earlier commit 52a3101ed9b61787a49f3b5c298aa9240f4006dd
added a recursive dependency as part of CONFIG_DEBUG_SPINLOCK

lib/Kconfig.debug:585:error: recursive dependency detected!
lib/Kconfig.debug:585:symbol DEBUG_SPINLOCK_BITE_ON_BUG depends on DEBUG_SPINLOCK_PANIC_ON_BUG
lib/Kconfig.debug:593:symbol DEBUG_SPINLOCK_PANIC_ON_BUG depends on DEBUG_SPINLOCK_BITE_ON_BUG

Fix this by adding a choice menu.

Change-Id: I0e50103397bb71dec7056db5148cba988550b860
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-03-22 11:16:38 -07:00
Abhimanyu Kapur
68696605ff clocksource: migrate users of arch_get_cnt_pct to use virtual timers
Software running in non secure EL1(on arm64) and non secure
supervisor mode(on arm) should use virtual timer for time
stamping. Migrate users to arch_get_cnt_vct instead of using
arch_get_cnt_pct.

Change-Id: Ic3cf52a2ca3b0a2f83b926df26cecf479080320c
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:16:37 -07:00
Abhimanyu Kapur
f3da36d72d defconfig: enanble esoc on msm debug and perf defconfigs
Enable support for esoc interface layer with external
soc components on the msm debug and perf defconfigs.

Change-Id: I33a4b1f8cdda9a287e6715b23da8b3876abc2ab0
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:16:36 -07:00
Abhimanyu Kapur
ff1863d247 defconfig: enable few debug options on msm_defconfig
Enable triggering wdog on kernel panic and enable panic
on data corruption.

Change-Id: I4798ff27ef470225607fdccc15e8fa3a6ebdb1eb
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:16:35 -07:00
Abhimanyu Kapur
f6f00f860d defconfig: arm64: disable SPI on msmcortex configs
Disable SPI on msmcortex debug and perf configs
since it fails to compile.

Change-Id: Ia9e4077428a0760f1428b81597503e92402bad2a
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:16:35 -07:00
Abhimanyu Kapur
5d8ee90e7f esoc: Snapshot esoc drivers
Snapshot esoc components, headers and UAPI headers from
msm-3.18@0922caf50f22e751a05e
(Merge "usb: dwc3-msm: Fix incorrect roles with
multiple instances")

Change-Id: I55e7ea4359c1f5b855f082e66d5816316da2fd48
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:16:34 -07:00