21 Jul, 2012
1 commit
-
…wireless-next into for-davem
18 Jul, 2012
1 commit
13 Jul, 2012
3 commits
-
Signed-off-by: Dave Jones
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Without the discovered target nfcid1 and its length set properly, type 2
tags detection fails with the pn544 as it checks for them from
pn544_hci_complete_target_discovered().Signed-off-by: Eric Lapuyade
Reported-by: Mathias Jeppsson
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
…wireless-next into for-davem
11 Jul, 2012
1 commit
-
Conflicts:
net/batman-adv/bridge_loop_avoidance.c
net/batman-adv/bridge_loop_avoidance.h
net/batman-adv/soft-interface.c
net/mac80211/mlme.cWith merge help from Antonio Quartulli (batman-adv) and
Stephen Rothwell (drivers/net/usb/qmi_wwan.c).The net/mac80211/mlme.c conflict seemed easy enough, accounting for a
conversion to some new tracing macros.Signed-off-by: David S. Miller
10 Jul, 2012
33 commits
-
The HCP message should be added to transmit queue, not the other way around.
Signed-off-by: Mathias Jeppsson
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
list_first_entry() will never return NULL. Instead use
list_for_each_entry_safe() to iterate through the list.Signed-off-by: Mathias Jeppsson
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
They both can potentially be NULL.
Signed-off-by: Samuel Ortiz
-
Some devices (e.g. Sony's PaSoRi) can not do type B polling, so we have
to make a distinction between ISO14443 type A and B poll modes.Cc: Eric Lapuyade
Cc: Ilan Elias
Signed-off-by: Samuel Ortiz -
Reported-by: Dan Carpenter
Signed-off-by: Samuel Ortiz -
We check for the polling flag before checking if the netlink PID caller
match.Signed-off-by: Samuel Ortiz
-
The socket local pointer can be NULL when a socket is created but never
bound or connected.Reported-by: Sasha Levin
Signed-off-by: Samuel Ortiz -
When receiving such frame, the sockets waiting for a connection to finish
should be woken up. Connecting to an unbound LLCP service will trigger a
DM as a response.Signed-off-by: Samuel Ortiz
-
With the LLCP 16 local SAPs we can potentially quickly run out of source
SAPs for non well known services.
With the so called late binding we will reserve an SAP only when we actually
get a client connection for a local service. The SAP will be released once
the last client is gone, leaving it available to other services.Signed-off-by: Samuel Ortiz
-
With not Well Known Services there is no guarantees as to which
SSAP the server will be listening on, so there is no reason to
support binding to a specific source SAP.Signed-off-by: Samuel Ortiz
-
This patch fixes a typo and return the correct error when trying to
bind 2 sockets to the same service name.Signed-off-by: Samuel Ortiz
-
The LLCP SAP should only be freed when the socket owning it is released.
As long as the socket is alive, the SAP should be reserved in order to
e.g. send the right wks array when bringing the MAC up.Signed-off-by: Samuel Ortiz
-
When the MAC link goes down, we should only keep the bound sockets
alive. They will be closed by sock_release or when the underlying
NFC device is moving away.Signed-off-by: Samuel Ortiz
-
Drivers will need them before starting a poll or when being activated
as targets. Mostly WKS can have changed between device registration and
then so we need to re-build the whole array.Signed-off-by: Samuel Ortiz
-
Set the right target index and use a better socket declaration routine.
Signed-off-by: Samuel Ortiz
-
Getting a valid CONNECT means we have a valid target index.
Signed-off-by: Samuel Ortiz
-
Signed-off-by: Samuel Ortiz
-
Signed-off-by: Samuel Ortiz
-
Some NFC chips will statically create and open pipes for both standard
and proprietary gates. The driver can now pass this information to HCI
such that HCI will not attempt to create and open them, but will instead
directly use the passed pipe ids.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
If the device is polling we sent a 0 target found event.
Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
The semantics for a zero target found event is that the polling operation
could not complete.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
There can ever be only one call to nfc_targets_found() after polling
has been engaged. This could be from a target discovered event from
the driver, or from an error handler to notify poll will never complete.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
If there is an ongoing HCI command executing, it will be completed,
thereby pushing the error up to the core. Otherwise, HCI will directly
notify the core with the error.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
HCI cmd can be completed either from an HCI response or from an
internal driver or HCI error. This requires to factorize the
completion code outside of the device lock.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
This API should be used by drivers, HCI, SHDLC or NCI stacks to report an
unrecoverable error.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
An HCI command can complete either from an HCI response
(with an HCI result) or as a consequence of any other system
error during processing. The completion therefore needs to take
a standard errno code. The HCI response will convert its result
to a standard errno before calling the completion.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
We can now report an ENOMEM error up to the HCI layer.
Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
nfc_hci_recv_frame can not be called with a NULL skb.
Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
shdlc reset may leave HCI in an inconsistent state by loosing parts of
HCI frames. Handle this case by reporting an unrecoverable error to HCI.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
The questions asked in the comments have been answered and addressed.
Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
Conflicts:
net/mac80211/mlme.c -
llcp_sock_getname can be called without a device attached to the nfc_llcp_sock.
This would lead to the following BUG:
[ 362.341807] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 362.341815] IP: [] llcp_sock_getname+0x75/0xc0
[ 362.341818] PGD 31b35067 PUD 30631067 PMD 0
[ 362.341821] Oops: 0000 [#627] PREEMPT SMP DEBUG_PAGEALLOC
[ 362.341826] CPU 3
[ 362.341827] Pid: 7816, comm: trinity-child55 Tainted: G D W 3.5.0-rc4-next-20120628-sasha-00005-g9f23eb7 #479
[ 362.341831] RIP: 0010:[] [] llcp_sock_getname+0x75/0xc0
[ 362.341832] RSP: 0018:ffff8800304fde88 EFLAGS: 00010286
[ 362.341834] RAX: 0000000000000000 RBX: ffff880033cb8000 RCX: 0000000000000001
[ 362.341835] RDX: ffff8800304fdec4 RSI: ffff8800304fdec8 RDI: ffff8800304fdeda
[ 362.341836] RBP: ffff8800304fdea8 R08: 7ebcebcb772b7ffb R09: 5fbfcb9c35bdfd53
[ 362.341838] R10: 4220020c54326244 R11: 0000000000000246 R12: ffff8800304fdec8
[ 362.341839] R13: ffff8800304fdec4 R14: ffff8800304fdec8 R15: 0000000000000044
[ 362.341841] FS: 00007effa376e700(0000) GS:ffff880035a00000(0000) knlGS:0000000000000000
[ 362.341843] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 362.341844] CR2: 0000000000000000 CR3: 0000000030438000 CR4: 00000000000406e0
[ 362.341851] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 362.341856] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 362.341858] Process trinity-child55 (pid: 7816, threadinfo ffff8800304fc000, task ffff880031270000)
[ 362.341858] Stack:
[ 362.341862] ffff8800304fdea8 ffff880035156780 0000000000000000 0000000000001000
[ 362.341865] ffff8800304fdf78 ffffffff83183b40 00000000304fdec8 0000006000000000
[ 362.341868] ffff8800304f0027 ffffffff83729649 ffff8800304fdee8 ffff8800304fdf48
[ 362.341869] Call Trace:
[ 362.341874] [] sys_getpeername+0xa0/0x110
[ 362.341877] [] ? _raw_spin_unlock_irq+0x59/0x80
[ 362.341882] [] ? do_setitimer+0x23b/0x290
[ 362.341886] [] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 362.341889] [] system_call_fastpath+0x16/0x1b
[ 362.341921] Code: 84 00 00 00 00 00 b8 b3 ff ff ff 48 85 db 74 54 66 41 c7 04 24 27 00 49 8d 7c 24 12 41 c7 45 00 60 00 00 00 48 8b 83 28 05 00 00 00 41 89 44 24 04 0f b6 83 41 05 00 00 41 88 44 24 10 0f b6
[ 362.341924] RIP [] llcp_sock_getname+0x75/0xc0
[ 362.341925] RSP
[ 362.341926] CR2: 0000000000000000
[ 362.341928] ---[ end trace 6d450e935ee18bf3 ]---Signed-off-by: Sasha Levin
Signed-off-by: John W. Linville
29 Jun, 2012
1 commit
-
Using NLMSG_GOODSIZE results in multiple pages being used as
nlmsg_new() will automatically add the size of the netlink
header to the payload thus exceeding the page limit.NLMSG_DEFAULT_SIZE takes this into account.
Signed-off-by: Thomas Graf
Cc: Jiri Pirko
Cc: Dmitry Eremin-Solenikov
Cc: Sergey Lapin
Cc: Johannes Berg
Cc: Lauro Ramos Venancio
Cc: Aloisio Almeida Jr
Cc: Samuel Ortiz
Reviewed-by: Jiri Pirko
Signed-off-by: David S. Miller