summaryrefslogtreecommitdiff
path: root/net/nfc
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@gmail.com>2013-11-30 19:59:23 +0400
committerSamuel Ortiz <sameo@linux.intel.com>2014-01-04 06:32:27 +0400
commit11bfb1c4b94fe24a83ebeae5c3310280f9606e0e (patch)
tree47bf31dd80d66b7a223d3c4c9df3228e32e06409 /net/nfc
parent43d53c29dd8548404256c05573ff557c927d214b (diff)
downloadlinux-11bfb1c4b94fe24a83ebeae5c3310280f9606e0e.tar.xz
NFC: llcp: Use default MIU if none was specified on connect
If MIUX is not present in CONNECT or CC use default MIU value (128) instead of one announced durring link setup. This was affecting Bluetooth handover with Android 4.3+ NCI stack. Signed-off-by: Szymon Janc <szymon.janc@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/llcp_commands.c2
-rw-r--r--net/nfc/llcp_core.c1
-rw-r--r--net/nfc/llcp_sock.c1
3 files changed, 1 insertions, 3 deletions
diff --git a/net/nfc/llcp_commands.c b/net/nfc/llcp_commands.c
index 80057a818737..bec6ed15f503 100644
--- a/net/nfc/llcp_commands.c
+++ b/net/nfc/llcp_commands.c
@@ -675,7 +675,7 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
do {
remote_miu = sock->remote_miu > LLCP_MAX_MIU ?
- local->remote_miu : sock->remote_miu;
+ LLCP_DEFAULT_MIU : sock->remote_miu;
frag_len = min_t(size_t, remote_miu, remaining_len);
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c
index 1349074e1ffc..6184bd1fba3a 100644
--- a/net/nfc/llcp_core.c
+++ b/net/nfc/llcp_core.c
@@ -943,7 +943,6 @@ static void nfc_llcp_recv_connect(struct nfc_llcp_local *local,
new_sock->local = nfc_llcp_local_get(local);
new_sock->rw = sock->rw;
new_sock->miux = sock->miux;
- new_sock->remote_miu = local->remote_miu;
new_sock->nfc_protocol = sock->nfc_protocol;
new_sock->dsap = ssap;
new_sock->target_idx = local->target_idx;
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index 69fbc8dadba7..4a53bb58a463 100644
--- a/net/nfc/llcp_sock.c
+++ b/net/nfc/llcp_sock.c
@@ -700,7 +700,6 @@ static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr,
llcp_sock->dev = dev;
llcp_sock->local = nfc_llcp_local_get(local);
- llcp_sock->remote_miu = llcp_sock->local->remote_miu;
llcp_sock->ssap = nfc_llcp_get_local_ssap(local);
if (llcp_sock->ssap == LLCP_SAP_MAX) {
ret = -ENOMEM;