Commit graph

321736 commits

Author SHA1 Message Date
Eliad Peller
889300fa53 wlcore: lazy-enable device roles
Enable device roles just before starting it.
This way, a single device role should be enough
for all vifs, as we can't use concurrent device
roles (which require ROC) anyway.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:52 +03:00
Eliad Peller
8dc574308b wlcore: always use wlvif->role_id for scans
enabled (but not-started) sta role should be good enough
for scanning (both normal and scheduled), so use it
instead of the device_role.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:52 +03:00
Arik Nemtsov
fc3d1db5b6 wlcore: make debug prints work without dynamic debug
Make debug prints operational when dynamic debug is not defined.
This allows better debugging in production environments.

Change the driver prefix to "wlcore" while were at it.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:52 +03:00
Arik Nemtsov
f4afbed944 wlcore/wl18xx/wl12xx: allow up to 3 mac addresses
Allow 3 native mac addresses on 18xx. On 12xx allow 2 native mac
addresses and set the LAA bit to create a third mac address. This
enabled operation with a separate group interface.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:52 +03:00
Eliad Peller
d49524d3e8 wlcore: resume() only if sta is associated
mac80211's resume() callback might get called even if
the sta is not associated (but only up). The
resume sequence in this case results in configuring
the wake-up conditions of a non-started role, which
causes fw assertion.

Fix it by bailing out if the STA is not connected
(like we do on suspend()).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:51 +03:00
Eyal Shapira
11bc97eb90 wlcore: configure wowlan regardless of wakeup conditions
wowlan filters should be configured in any case in suspend/resume.
This shouldn't be dependent on whether wakeup conditions are the
same for suspend and resume states. Only the FW command to
reconfigure wakeup conditions should be avoided in such a case.

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:51 +03:00
Igal Chernobelsky
26a309c758 wlcore/wl18xx/wl12xx: aggregation buffer size set
Aggregation buffer size is set separately per 18xx/12xx chip family.
For 18xx aggragation buffer is set to 13 pages to utilize all
the available tx/rx descriptors for aggregation.

[Arik - remove redundant parts from the patch]

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:51 +03:00
Igal Chernobelsky
f1c434df67 wl18xx/wl12xx: defines for Tx/Rx descriptors num
Use defines for number of Tx/Rx descriptors.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:51 +03:00
Arik Nemtsov
f83e54134a wlcore: tx_flush - optimize flow and force Tx during the flush
Force Tx during the flush if there are packets pending in the driver.
This actually solves a bug where we would get called from the mac80211
wq context, which would prevent tx_work from getting queued, even when
the mutex is unlocked.

Don't stop the queues needlessly if there's nothing to flush. Use a
larger delay when sleeping to give the driver a chance to flush and
avoid cpu busy looping. Re-arrange the loop so the last iteration is
not wasted.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:51 +03:00
Arik Nemtsov
958e303abb wlcore: make Tx flush timings more verbose
Print how much time a flush took. This will help debug the time it takes
to switch between channels.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:51 +03:00
Arik Nemtsov
714947600e wlcore: allow only the lowest OFDM rate for p2p setup frames
The IEEE80211_TX_CTL_NO_CCK_RATE flag is only set for mgmt packets
transmitted during p2p connection setup. Make sure to use the lowest
OFDM rate guarantee the peer always hears us.
Change the p2p rate policy to contain only the 6mpbs rate to acheive
this effect.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:51 +03:00
Arik Nemtsov
c3e06fc03b wlcore: AP mode - send non-data packets with basic rates
This solves interoperability issues with peer that don't seem to "hear"
management packets transmitted in higher rates. Based on a previous
patch by Igal Chernobelsky.

Cc: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:51 +03:00
Eliad Peller
6dbc5fc259 wlcore: cancel recovery_work on stop() instead of remove_interface()
recovery_work should be cancelled when stopping the device,
not when removing an interface (this is probably a leftover
from the single-role days)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:50 +03:00
Ido Reis
9ae48aeaa3 wl18xx: increase rx_ba_win_size to 32
The new FWs support a bigger BA window.

Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:50 +03:00
Ido Yariv
4cc533830b wlcore: Prevent interaction with HW after recovery is queued
When a function requests to recover, it would normally abort and will
not send any additional commands to the HW. However, other threads may
not be aware of the failure and could try to communicate with the HW
after a recovery was queued, but before the recovery work began.

Fix this by introducing an intermediate state which is set when recovery
is queued, and modify all state checks accordingly.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:50 +03:00
Eliad Peller
9b1a0a7771 wlcore: consider single fw case
When a single fw is being used for both single-role
and multi-role cases (e.g. 18xx), wl->mr_fw_name is
NULL, which results in NULL dereference while trying
to load the multi-role fw.

In this case, always use the single-role fw, and avoid
redundant fw switch by checking for this case in
wl12xx_need_fw_change() as well.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:50 +03:00
Ido Reis
e1c497c3e4 wl18xx: update default phy configuration for pg2
default switch configuration set to pg2 chips (rdl 1/2/3/4).
removed hacks for specific board types.
pg1.x boards are now supported only using module params
or specific conf files.

Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:13:50 +03:00
Wei Yongjun
27b7ce7c7f wl12xx: remove duplicated include from main.c
Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:07:30 +03:00
Tim Gardner
0635ad4550 wlcore: Declare MODULE_FIRMWARE usage
Declare any firmware that might be used by this driver.
If all drivers declare their firmware usage, then a sufficiently
complete list of firmware files can then be used to pare down
the external linux-firmware package to just the files in actual use.

Cc: Luciano Coelho <coelho@ti.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:07:28 +03:00
Luciano Coelho
ae35c30c14 wl12xx: use module_platform_driver
Use a module_platform_driver declaration instead of replicating the
init and exit functions in the driver.

Based on the patch for wl18xx by Devendra Naga.

Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 12:02:38 +03:00
Devendra Naga
77e7b30b23 wl18xx: use module_platform_driver
the driver's init and exit routines can be implemented with the
module_platform_driver, as the init and exit code is same as
that of the module_platform_driver

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
2012-09-27 11:44:40 +03:00
John W. Linville
944f8a1a6f ath5k: add missing breaks in ath5k_hw_set_spur_mitigation_filter
https://bugzilla.kernel.org/show_bug.cgi?id=47681

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-25 15:57:44 -04:00
Rajkumar Manoharan
a50d1fd452 ath9k_hw: fix BT sleep state on chip wakeup
Whenever both WLAN and BT in/out sleep mode, sometimes WLAN
is not able to take back the shared LNA control after resumes
from sleep mode. The idea is that for WLAN to check if BT owns
LNA control and BT is in sleep mode when WLAN just resumes from
sleep mode. If the condition is true, do a BTCOEX_RC_WARM_RESET
for WLAN to take back the control of shared LNA.
Now the issue is the BT sleep value read from MCI register is
overlooked by assigning u32 into u8. Hence the above condition never
be met so that WLAN used to report beacon losses and frequent
connection drops.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Tested-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-25 15:57:44 -04:00
Gertjan van Wingerde
55d2e9da74 rt2x00: Replace open coded interface checking with interface combinations.
Mac80211 has formal infrastructure to specify which interface combinations
are supported. Make use of this facility in favor of open coding it
ourselves.
So far we only have to specify we can support multiple AP interfaces,
no other combinations are supported.

Inspired by an earlier patch from Paul Fertser.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-25 15:57:44 -04:00
Gertjan van Wingerde
3e4c4151e5 rt2x00: Deprecate max_sta_intf field of struct rt2x00_ops.
All drivers set this value to 1, so there is no need (currently) to let
drivers set this.
Therefor, remove the field; we can always add it back when it is needed.

Inspired by an earlier patch from Paul Fertser.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-25 15:57:43 -04:00
Dan Carpenter
fd0fc5218d mwifiex: potential corruption in mwifiex_update_uap_custom_ie()
ap_custom_ie is a struct mwifiex_ie_list which is quite different and
also larger than struct mwifiex_ie.  It's a difference between 4196
bytes and 262.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Stone Piao <piaoyun@marvell.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-25 15:57:43 -04:00
Sujith Manoharan
046b6802c8 ath9k: Disable ASPM only for AR9285
Currently, ASPM is disabled for all WLAN+BT combo chipsets
when BTCOEX is enabled. This is incorrect since the workaround
is required only for WB195, which is a AR9285+AR3011 combo
solution. Fix this by checking for the HW version when enabling
the workaround.

Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Tested-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-25 15:57:43 -04:00
John W. Linville
63c664242d Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next 2012-09-25 15:55:02 -04:00
John W. Linville
5419575e83 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2012-09-25 15:54:32 -04:00
John W. Linville
0c49b69931 This is the first NFC pull request for the 3.7 merge window.
With this one we get:
 
 - HCI and LLC layers separation. We now can support various LLC
   protocols for HCI drivers, SHDLC being one of them. This will be needed as
   we're planning to support raw HCI chipsets that do the SHDLC encapsulation
   in firmware. So for now we have an SHDLC and a NOP LLC layers.
 
 - pn533 command queueing implementation. This simplifies the pn533 locking
   logic and fixes a kernel warning.
 
 - NCI p2p initiator mode implementation.
 
 - Replace custom workqueues with system ones, for HCI and LLCP.
 
 - Raw pn544 driver removal, as scheduled on the features-removal.txt file.
 
 - A few HCI, SHDLC and LLCP fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQYNzhAAoJEIqAPN1PVmxKv/QP/1potGZKprGwLWMICOIOKpVz
 MXTuUKTnNVW3Uosa0dpxy7Z9/DIUE2eHvgDPEvM+VCd3JB0+B+w1oCH1Ash5D9Cd
 N+SSz/iFWEc7YQQkE4fqCJJ7ox+3Bq0c7la1xMqTorPQDmXpIBBbOOiiKfihTlN/
 pI7GJ/8MSgWKoC9EIlkgv6uUlnco8tnUxrHQ5NwoW9O0PL4W1NKkr1LbA3K9f9Gv
 77pD32+rMUv4Xk7Uup4/DC8+LiAyJO12kccXIcZj+0omGQ16cqxGr6sa4mFxHQuw
 +mroei6D/t9wwzzPnDgUUSVbNHsEuCKk7wZyjjZQG+6HGk7zlmS/yQcs+ltH5Mc+
 aQJi3FSYy0muzgmGw7dWvL1KfowndOYOOv6IJLUiUkp26nltCwekcqmOlGScRTWt
 JEjkbU9t6EhhHPX6CmnMgM7VRNmHkkKMSy4Sz2SdM4wJxTWezDNZ+Q3aT0f1278f
 P4EdhvfriBxDqo1HYtBWVgG6emfE9A+2lpsKljkUr3D4qfjOQLonK7RsMRySplE1
 wg0j+ou1BVbdSfkD4CAQWmfn9t0idlWnUUzmle4LwyrJdiItqBKJh86zsoMKpjsI
 WgtvlsyEOcfqiazGpUB0RSNUdprjasXFT9gC+k78q1ayTI0ysJomZQ2LtnAHoaM1
 Ss/03CgKYjh6G1nFH1rk
 =yFjv
 -----END PGP SIGNATURE-----

Merge tag 'nfc-next-3.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-3.0

So says Samuel Ortiz <sameo@linux.intel.com>:

This is the first NFC pull request for the 3.7 merge window.

With this one we get:

- HCI and LLC layers separation. We now can support various LLC
  protocols for HCI drivers, SHDLC being one of them. This will be needed as
  we're planning to support raw HCI chipsets that do the SHDLC encapsulation
  in firmware. So for now we have an SHDLC and a NOP LLC layers.

- pn533 command queueing implementation. This simplifies the pn533 locking
  logic and fixes a kernel warning.

- NCI p2p initiator mode implementation.

- Replace custom workqueues with system ones, for HCI and LLCP.

- Raw pn544 driver removal, as scheduled on the features-removal.txt file.

- A few HCI, SHDLC and LLCP fixes.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-25 15:53:31 -04:00
Vladimir Kondratiev
64629b9d41 cfg80211: Fix regulatory check for 60GHz band frequencies
The current regulatory code on cfg80211 performs a check to
see if a regulatory rule belongs to an IEEE band so that if
a Country IE is received and no rules are specified for a
band (which is allowed by IEEE) those bands are left intact.
The current band check assumes a rule is bound to a band
if the rule's start or end frequency is less than 2 GHz
apart from the center of frequency being inspected.

In order to support 60 GHz for 802.11ad we need to increase
this to account for the channel spacing of 2160 MHz whereby
a channel somewhere in the middle of a regulatory rule may
be more than 2 GHz apart from either the beginning or
end of the frequency rule.

Without a fix for this even though channels 1-3 are allowed world
wide on the rule (57240 - 63720 @ 2160), channel 2 at 60480 MHz
will end up getting disabled given that it is 3240 MHz from
both the frequency rule start and end frequency. Fix this by
using 2 GHz separation assumption for the 2.4 and 5 GHz bands
but for 60 GHz use a 10 GHz separation before assuming a rule
is not part of the band.

Since we have no 802.11ad drivers yet merged this change has
no impact to existing Linux upstream device drivers.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-25 09:41:14 +02:00
Waldemar Rymarkiewicz
4c0ba9ac4b NFC: Fix typo negociating -> negotiating
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:28 +02:00
Waldemar Rymarkiewicz
12bfd1e890 NFC: Don't handle consequent RSET frames after UA
During processing incoming RSET frame chip, possibly due to
its internal timout, can retrnasmit an another RSET which
is next queued for processing in shdlc layer.

In case when we accept processed RSET skip those remaining on
the rcv queue until chip will send it's first S or I frame.
This will mean the chip completed connection as well.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:27 +02:00
Waldemar Rymarkiewicz
9010e39f50 NFC: Handle RSET in SHDLC_CONNECTING state
As queue_work() does not guarantee immediate execution of sm_work it
can happen in crossover RSET usecase that connect timer will constantly
change the shdlc state from NEGOTIATING to CONNECTING before shdlc has
chance to handle incoming frame.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Acked-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:27 +02:00
Waldemar Rymarkiewicz
96e324024b NFC: xmit from hci ops must return 0 or negative
xmit callback provided by a driver encapsulates upper layers
data and sends it to the hardware. So, HCI does not know the
exact amount of data being sent and thus can't handle partially
sent frames properly.

Therefore, the driver must return 0 for completely sent frame or
negative for failure.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Acked-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:27 +02:00
Samuel Ortiz
5adf54de97 MAINTAINERS: Add NFC specific mailing list
linux-nfc@lists.01.org is where all the Linux NFC related discussions take
place, and one can also send kernel patches there.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:27 +02:00
Cong Wang
7b55279f6a NFC: Remove the pn544 raw driver
This was scheduled for 3.6, we're late.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:27 +02:00
Eric Lapuyade
80faa59847 NFC: Add HCI module description
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:27 +02:00
Eric Lapuyade
a7d0281bbf NFC: Fix LLC registration definitions for ANSI compliance
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:26 +02:00
Wei Yongjun
c51ad34e54 NFC: Move the pn544_hci dereference below the NULL test
The dereference should be moved below the NULL test.

spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:26 +02:00
Wei Yongjun
d6650a2ccf NFC: Move the nfcwilink dereference below the NULL test
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:26 +02:00
Samuel Ortiz
f4f20d0650 NFC: Remove unneeded LLC symbols export
After fixing the LLC Makefile, we no longer need those exports.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:26 +02:00
Eric Lapuyade
412fda538f NFC: Changed HCI and PN544 HCI driver to use the new HCI LLC Core
The previous shdlc HCI driver and its header are removed from the tree.
PN544 now registers directly with HCI and passes the name of the llc it
requires (shdlc).
HCI instantiation now allocates the required llc instance. The llc is
started when the HCI device is brought up.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:26 +02:00
Eric Lapuyade
4a61cd6687 NFC: Add an shdlc llc module to llc core
This is used by HCI drivers such as the one for the pn544 which require
communications between HCI and the chip to use shdlc.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:25 +02:00
Eric Lapuyade
8af00d48dc NFC: Add a nop (passthrough) llc module to llc core
This is a passthrough llc. It can be used by HCI drivers that don't
need link layer control. HCI will then write directly to the driver, and
driver will deliver incoming frames directly to HCI without any
processing.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:25 +02:00
Eric Lapuyade
67cccfe17d NFC: Add an LLC Core layer to HCI
The LLC layer manages modules that control the link layer protocol (such
as shdlc) between HCI and an HCI driver. The driver must simply specify
the required llc when it registers with HCI.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:25 +02:00
Eric Lapuyade
f3e8fb5527 NFC: Modified hci_transceive to become an asynchronous operation
This enables the completion callback to be called from a different
context, preventing a possible deadlock if the callback resulted in the
invocation of a nested call to the currently locked nfc_dev.
This is also more in line with the im_transceive nfc_ops for NFC Core or
NCI drivers which already behave asynchronously.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:25 +02:00
Eric Lapuyade
e4c4789e55 NFC: Add a public nfc_hci_send_cmd_async method
This method initiates execution of an HCI cmd. Result will be delivered
through an asynchronous callback.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:25 +02:00
Eric Lapuyade
b5faa648fa NFC: Changed the HCI cmd execution callback prototype
Make it match the data_exchange_cb_t so that it can be used directly in
the implementation of an asynchronous hci_transceive

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:25 +02:00
Waldemar Rymarkiewicz
c1be211727 NFC: Correct outgoing frame before requeueing
Driver must handle its data added to the frame, so at this point
removeing control field of shdlc frame is enough.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Acked-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25 00:17:24 +02:00