Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314182
b: refs/heads/master
c: 93d7e49
h: refs/heads/master
v: v3
  • Loading branch information
Samuel Ortiz committed Jun 4, 2012
1 parent d660cf6 commit d0458da
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a06e586b9bfcaca310f40a857cf144d04abc8e6
refs/heads/master: 93d7e490b7f4a72b6c7e1dfa475fa3c3e18eb9f1
7 changes: 5 additions & 2 deletions trunk/net/nfc/llcp/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ int nfc_llcp_parse_connection_tlv(struct nfc_llcp_sock *sock,
pr_debug("type 0x%x length %d\n", type, length);

switch (type) {
case LLCP_TLV_MIUX:
sock->miu = llcp_tlv_miux(tlv) + 128;
break;
case LLCP_TLV_RW:
sock->rw = llcp_tlv_rw(tlv);
break;
Expand All @@ -197,7 +200,7 @@ int nfc_llcp_parse_connection_tlv(struct nfc_llcp_sock *sock,
tlv += length + 2;
}

pr_debug("sock %p rw %d\n", sock, sock->rw);
pr_debug("sock %p rw %d miu %d\n", sock, sock->rw, sock->miu);

return 0;
}
Expand Down Expand Up @@ -505,7 +508,7 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,

while (remaining_len > 0) {

frag_len = min_t(size_t, local->remote_miu, remaining_len);
frag_len = min_t(size_t, sock->miu, remaining_len);

pr_debug("Fragment %zd bytes remaining %zd",
frag_len, remaining_len);
Expand Down
1 change: 1 addition & 0 deletions trunk/net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ static void nfc_llcp_recv_connect(struct nfc_llcp_local *local,
new_sock = nfc_llcp_sock(new_sk);
new_sock->dev = local->dev;
new_sock->local = nfc_llcp_local_get(local);
new_sock->miu = local->remote_miu;
new_sock->nfc_protocol = sock->nfc_protocol;
new_sock->ssap = sock->ssap;
new_sock->dsap = ssap;
Expand Down
1 change: 1 addition & 0 deletions trunk/net/nfc/llcp/llcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ struct nfc_llcp_sock {
char *service_name;
size_t service_name_len;
u8 rw;
u16 miu;

/* Link variables */
u8 send_n;
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/nfc/llcp/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ 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->miu = llcp_sock->local->remote_miu;
llcp_sock->ssap = nfc_llcp_get_local_ssap(local);
if (llcp_sock->ssap == LLCP_SAP_MAX) {
ret = -ENOMEM;
Expand Down Expand Up @@ -679,6 +680,7 @@ struct sock *nfc_llcp_sock_alloc(struct socket *sock, int type, gfp_t gfp)
llcp_sock->ssap = 0;
llcp_sock->dsap = LLCP_SAP_SDP;
llcp_sock->rw = LLCP_DEFAULT_RW;
llcp_sock->miu = LLCP_DEFAULT_MIU;
llcp_sock->send_n = llcp_sock->send_ack_n = 0;
llcp_sock->recv_n = llcp_sock->recv_ack_n = 0;
llcp_sock->remote_ready = 1;
Expand Down

0 comments on commit d0458da

Please sign in to comment.