diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:15 -0400 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:59 -0400 |
| commit | 07f9479a40cc778bc1462ada11f95b01360ae4ff (patch) | |
| tree | 0676cf38df3844004bb3ebfd99dfa67a4a8998f5 /net/irda | |
| parent | 9d5e6bdb3013acfb311ab407eeca0b6a6a3dedbf (diff) | |
| parent | cd2e49e90f1cae7726c9a2c54488d881d7f1cd1c (diff) | |
Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
Diffstat (limited to 'net/irda')
| -rw-r--r-- | net/irda/af_irda.c | 3 | ||||
| -rw-r--r-- | net/irda/iriap.c | 6 | ||||
| -rw-r--r-- | net/irda/irlap.c | 2 | ||||
| -rw-r--r-- | net/irda/irlap_event.c | 8 | ||||
| -rw-r--r-- | net/irda/irlap_frame.c | 2 | ||||
| -rw-r--r-- | net/irda/irlmp_event.c | 2 | ||||
| -rw-r--r-- | net/irda/irnet/irnet.h | 2 | ||||
| -rw-r--r-- | net/irda/irnet/irnet_ppp.c | 3 | ||||
| -rw-r--r-- | net/irda/irqueue.c | 2 | ||||
| -rw-r--r-- | net/irda/irttp.c | 2 | ||||
| -rw-r--r-- | net/irda/qos.c | 8 | ||||
| -rw-r--r-- | net/irda/timer.c | 2 |
12 files changed, 25 insertions, 17 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index c9890e25cd4c..cc616974a447 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
| @@ -1297,8 +1297,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
| 1297 | /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ | 1297 | /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ |
| 1298 | if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT | | 1298 | if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT | |
| 1299 | MSG_NOSIGNAL)) { | 1299 | MSG_NOSIGNAL)) { |
| 1300 | err = -EINVAL; | 1300 | return -EINVAL; |
| 1301 | goto out; | ||
| 1302 | } | 1301 | } |
| 1303 | 1302 | ||
| 1304 | lock_sock(sk); | 1303 | lock_sock(sk); |
diff --git a/net/irda/iriap.c b/net/irda/iriap.c index 5b743bdd89ba..36477538cea8 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c | |||
| @@ -656,10 +656,16 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self, | |||
| 656 | n = 1; | 656 | n = 1; |
| 657 | 657 | ||
| 658 | name_len = fp[n++]; | 658 | name_len = fp[n++]; |
| 659 | |||
| 660 | IRDA_ASSERT(name_len < IAS_MAX_CLASSNAME + 1, return;); | ||
| 661 | |||
| 659 | memcpy(name, fp+n, name_len); n+=name_len; | 662 | memcpy(name, fp+n, name_len); n+=name_len; |
| 660 | name[name_len] = '\0'; | 663 | name[name_len] = '\0'; |
| 661 | 664 | ||
| 662 | attr_len = fp[n++]; | 665 | attr_len = fp[n++]; |
| 666 | |||
| 667 | IRDA_ASSERT(attr_len < IAS_MAX_ATTRIBNAME + 1, return;); | ||
| 668 | |||
| 663 | memcpy(attr, fp+n, attr_len); n+=attr_len; | 669 | memcpy(attr, fp+n, attr_len); n+=attr_len; |
| 664 | attr[attr_len] = '\0'; | 670 | attr[attr_len] = '\0'; |
| 665 | 671 | ||
diff --git a/net/irda/irlap.c b/net/irda/irlap.c index 783c5f367d29..005b424494a0 100644 --- a/net/irda/irlap.c +++ b/net/irda/irlap.c | |||
| @@ -165,7 +165,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, | |||
| 165 | 165 | ||
| 166 | irlap_apply_default_connection_parameters(self); | 166 | irlap_apply_default_connection_parameters(self); |
| 167 | 167 | ||
| 168 | self->N3 = 3; /* # connections attemts to try before giving up */ | 168 | self->N3 = 3; /* # connections attempts to try before giving up */ |
| 169 | 169 | ||
| 170 | self->state = LAP_NDM; | 170 | self->state = LAP_NDM; |
| 171 | 171 | ||
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index d434c8880745..bb47021c9a55 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
| @@ -708,7 +708,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, | |||
| 708 | 708 | ||
| 709 | self->frame_sent = TRUE; | 709 | self->frame_sent = TRUE; |
| 710 | } | 710 | } |
| 711 | /* Readjust our timer to accomodate devices | 711 | /* Readjust our timer to accommodate devices |
| 712 | * doing faster or slower discovery than us... | 712 | * doing faster or slower discovery than us... |
| 713 | * Jean II */ | 713 | * Jean II */ |
| 714 | irlap_start_query_timer(self, info->S, info->s); | 714 | irlap_start_query_timer(self, info->S, info->s); |
| @@ -931,7 +931,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
| 931 | irlap_send_rr_frame(self, CMD_FRAME); | 931 | irlap_send_rr_frame(self, CMD_FRAME); |
| 932 | 932 | ||
| 933 | /* The timer is set to half the normal timer to quickly | 933 | /* The timer is set to half the normal timer to quickly |
| 934 | * detect a failure to negociate the new connection | 934 | * detect a failure to negotiate the new connection |
| 935 | * parameters. IrLAP 6.11.3.2, note 3. | 935 | * parameters. IrLAP 6.11.3.2, note 3. |
| 936 | * Note that currently we don't process this failure | 936 | * Note that currently we don't process this failure |
| 937 | * properly, as we should do a quick disconnect. | 937 | * properly, as we should do a quick disconnect. |
| @@ -1052,7 +1052,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
| 1052 | return -EPROTO; | 1052 | return -EPROTO; |
| 1053 | } | 1053 | } |
| 1054 | 1054 | ||
| 1055 | /* Substract space used by this skb */ | 1055 | /* Subtract space used by this skb */ |
| 1056 | self->bytes_left -= skb->len; | 1056 | self->bytes_left -= skb->len; |
| 1057 | #else /* CONFIG_IRDA_DYNAMIC_WINDOW */ | 1057 | #else /* CONFIG_IRDA_DYNAMIC_WINDOW */ |
| 1058 | /* Window has been adjusted for the max packet | 1058 | /* Window has been adjusted for the max packet |
| @@ -1808,7 +1808,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
| 1808 | 1808 | ||
| 1809 | return -EPROTO; /* Try again later */ | 1809 | return -EPROTO; /* Try again later */ |
| 1810 | } | 1810 | } |
| 1811 | /* Substract space used by this skb */ | 1811 | /* Subtract space used by this skb */ |
| 1812 | self->bytes_left -= skb->len; | 1812 | self->bytes_left -= skb->len; |
| 1813 | #else /* CONFIG_IRDA_DYNAMIC_WINDOW */ | 1813 | #else /* CONFIG_IRDA_DYNAMIC_WINDOW */ |
| 1814 | /* Window has been adjusted for the max packet | 1814 | /* Window has been adjusted for the max packet |
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 688222cbf55b..8c004161a843 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
| @@ -848,7 +848,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb) | |||
| 848 | * though IrLAP is currently sending the *last* frame of the | 848 | * though IrLAP is currently sending the *last* frame of the |
| 849 | * tx-window, the driver most likely has only just started | 849 | * tx-window, the driver most likely has only just started |
| 850 | * sending the *first* frame of the same tx-window. | 850 | * sending the *first* frame of the same tx-window. |
| 851 | * I.e. we are always at the very begining of or Tx window. | 851 | * I.e. we are always at the very beginning of or Tx window. |
| 852 | * Now, we are supposed to set the final timer from the end | 852 | * Now, we are supposed to set the final timer from the end |
| 853 | * of our tx-window to let the other peer reply. So, we need | 853 | * of our tx-window to let the other peer reply. So, we need |
| 854 | * to add extra time to compensate for the fact that we | 854 | * to add extra time to compensate for the fact that we |
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c index c1fb5db81042..9505a7d06f1a 100644 --- a/net/irda/irlmp_event.c +++ b/net/irda/irlmp_event.c | |||
| @@ -498,7 +498,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event, | |||
| 498 | switch (event) { | 498 | switch (event) { |
| 499 | #ifdef CONFIG_IRDA_ULTRA | 499 | #ifdef CONFIG_IRDA_ULTRA |
| 500 | case LM_UDATA_INDICATION: | 500 | case LM_UDATA_INDICATION: |
| 501 | /* This is most bizzare. Those packets are aka unreliable | 501 | /* This is most bizarre. Those packets are aka unreliable |
| 502 | * connected, aka IrLPT or SOCK_DGRAM/IRDAPROTO_UNITDATA. | 502 | * connected, aka IrLPT or SOCK_DGRAM/IRDAPROTO_UNITDATA. |
| 503 | * Why do we pass them as Ultra ??? Jean II */ | 503 | * Why do we pass them as Ultra ??? Jean II */ |
| 504 | irlmp_connless_data_indication(self, skb); | 504 | irlmp_connless_data_indication(self, skb); |
diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h index 0d82ff5aeff1..979ecb2435a7 100644 --- a/net/irda/irnet/irnet.h +++ b/net/irda/irnet/irnet.h | |||
| @@ -73,7 +73,7 @@ | |||
| 73 | * Infinite thanks to those brave souls for providing the infrastructure | 73 | * Infinite thanks to those brave souls for providing the infrastructure |
| 74 | * upon which IrNET is built. | 74 | * upon which IrNET is built. |
| 75 | * | 75 | * |
| 76 | * Thanks to all my collegues in HP for helping me. In particular, | 76 | * Thanks to all my colleagues in HP for helping me. In particular, |
| 77 | * thanks to Salil Pradhan and Bill Serra for W2k testing... | 77 | * thanks to Salil Pradhan and Bill Serra for W2k testing... |
| 78 | * Thanks to Luiz Magalhaes for irnetd and much testing... | 78 | * Thanks to Luiz Magalhaes for irnetd and much testing... |
| 79 | * | 79 | * |
diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c index 7c567b8aa89a..2bb2beb6a373 100644 --- a/net/irda/irnet/irnet_ppp.c +++ b/net/irda/irnet/irnet_ppp.c | |||
| @@ -105,6 +105,9 @@ irnet_ctrl_write(irnet_socket * ap, | |||
| 105 | while(isspace(start[length - 1])) | 105 | while(isspace(start[length - 1])) |
| 106 | length--; | 106 | length--; |
| 107 | 107 | ||
| 108 | DABORT(length < 5 || length > NICKNAME_MAX_LEN + 5, | ||
| 109 | -EINVAL, CTRL_ERROR, "Invalid nickname.\n"); | ||
| 110 | |||
| 108 | /* Copy the name for later reuse */ | 111 | /* Copy the name for later reuse */ |
| 109 | memcpy(ap->rname, start + 5, length - 5); | 112 | memcpy(ap->rname, start + 5, length - 5); |
| 110 | ap->rname[length - 5] = '\0'; | 113 | ap->rname[length - 5] = '\0'; |
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c index 849aaf0dabb5..9715e6e5900b 100644 --- a/net/irda/irqueue.c +++ b/net/irda/irqueue.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | * o the hash function for ints is pathetic (but could be changed) | 40 | * o the hash function for ints is pathetic (but could be changed) |
| 41 | * o locking is sometime suspicious (especially during enumeration) | 41 | * o locking is sometime suspicious (especially during enumeration) |
| 42 | * o most users have only a few elements (== overhead) | 42 | * o most users have only a few elements (== overhead) |
| 43 | * o most users never use seach, so don't benefit from hashing | 43 | * o most users never use search, so don't benefit from hashing |
| 44 | * Problem already fixed : | 44 | * Problem already fixed : |
| 45 | * o not 64 bit compliant (most users do hashv = (int) self) | 45 | * o not 64 bit compliant (most users do hashv = (int) self) |
| 46 | * o hashbin_remove() is broken => use hashbin_remove_this() | 46 | * o hashbin_remove() is broken => use hashbin_remove_this() |
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index f6054f9ccbe3..9d9af4606970 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
| @@ -1193,7 +1193,7 @@ EXPORT_SYMBOL(irttp_connect_request); | |||
| 1193 | /* | 1193 | /* |
| 1194 | * Function irttp_connect_confirm (handle, qos, skb) | 1194 | * Function irttp_connect_confirm (handle, qos, skb) |
| 1195 | * | 1195 | * |
| 1196 | * Sevice user confirms TSAP connection with peer. | 1196 | * Service user confirms TSAP connection with peer. |
| 1197 | * | 1197 | * |
| 1198 | */ | 1198 | */ |
| 1199 | static void irttp_connect_confirm(void *instance, void *sap, | 1199 | static void irttp_connect_confirm(void *instance, void *sap, |
diff --git a/net/irda/qos.c b/net/irda/qos.c index 2b00974e5bae..1b51bcf42394 100644 --- a/net/irda/qos.c +++ b/net/irda/qos.c | |||
| @@ -39,16 +39,16 @@ | |||
| 39 | #include <net/irda/irlap_frame.h> | 39 | #include <net/irda/irlap_frame.h> |
| 40 | 40 | ||
| 41 | /* | 41 | /* |
| 42 | * Maximum values of the baud rate we negociate with the other end. | 42 | * Maximum values of the baud rate we negotiate with the other end. |
| 43 | * Most often, you don't have to change that, because Linux-IrDA will | 43 | * Most often, you don't have to change that, because Linux-IrDA will |
| 44 | * use the maximum offered by the link layer, which usually works fine. | 44 | * use the maximum offered by the link layer, which usually works fine. |
| 45 | * In some very rare cases, you may want to limit it to lower speeds... | 45 | * In some very rare cases, you may want to limit it to lower speeds... |
| 46 | */ | 46 | */ |
| 47 | int sysctl_max_baud_rate = 16000000; | 47 | int sysctl_max_baud_rate = 16000000; |
| 48 | /* | 48 | /* |
| 49 | * Maximum value of the lap disconnect timer we negociate with the other end. | 49 | * Maximum value of the lap disconnect timer we negotiate with the other end. |
| 50 | * Most often, the value below represent the best compromise, but some user | 50 | * Most often, the value below represent the best compromise, but some user |
| 51 | * may want to keep the LAP alive longuer or shorter in case of link failure. | 51 | * may want to keep the LAP alive longer or shorter in case of link failure. |
| 52 | * Remember that the threshold time (early warning) is fixed to 3s... | 52 | * Remember that the threshold time (early warning) is fixed to 3s... |
| 53 | */ | 53 | */ |
| 54 | int sysctl_max_noreply_time = 12; | 54 | int sysctl_max_noreply_time = 12; |
| @@ -411,7 +411,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos) | |||
| 411 | * Fix tx data size according to user limits - Jean II | 411 | * Fix tx data size according to user limits - Jean II |
| 412 | */ | 412 | */ |
| 413 | if (qos->data_size.value > sysctl_max_tx_data_size) | 413 | if (qos->data_size.value > sysctl_max_tx_data_size) |
| 414 | /* Allow non discrete adjustement to avoid loosing capacity */ | 414 | /* Allow non discrete adjustement to avoid losing capacity */ |
| 415 | qos->data_size.value = sysctl_max_tx_data_size; | 415 | qos->data_size.value = sysctl_max_tx_data_size; |
| 416 | /* | 416 | /* |
| 417 | * Override Tx window if user request it. - Jean II | 417 | * Override Tx window if user request it. - Jean II |
diff --git a/net/irda/timer.c b/net/irda/timer.c index 0335ba0cc593..f418cb2ad49c 100644 --- a/net/irda/timer.c +++ b/net/irda/timer.c | |||
| @@ -59,7 +59,7 @@ void irlap_start_query_timer(struct irlap_cb *self, int S, int s) | |||
| 59 | * slot time, plus add some extra time to properly receive the last | 59 | * slot time, plus add some extra time to properly receive the last |
| 60 | * discovery packet (which is longer due to extra discovery info), | 60 | * discovery packet (which is longer due to extra discovery info), |
| 61 | * to avoid messing with for incomming connections requests and | 61 | * to avoid messing with for incomming connections requests and |
| 62 | * to accomodate devices that perform discovery slower than us. | 62 | * to accommodate devices that perform discovery slower than us. |
| 63 | * Jean II */ | 63 | * Jean II */ |
| 64 | timeout = ((sysctl_slot_timeout * HZ / 1000) * (S - s) | 64 | timeout = ((sysctl_slot_timeout * HZ / 1000) * (S - s) |
| 65 | + XIDEXTRA_TIMEOUT + SMALLBUSY_TIMEOUT); | 65 | + XIDEXTRA_TIMEOUT + SMALLBUSY_TIMEOUT); |
