Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97494
b: refs/heads/master
c: 8c3a01d
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed May 29, 2008
1 parent 6acfbae commit 484f3ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 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: c97c23e38625f59e3e9869664eeeb0cab1822948
refs/heads/master: 8c3a01d0c259ec8b283c52dbeadda0122582a68b
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/rfcomm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)

rfcomm_dlc_lock(d);
d->state = BT_CLOSED;
rfcomm_dlc_unlock(d);
d->state_change(d, err);
rfcomm_dlc_unlock(d);

skb_queue_purge(&d->tx_queue);
rfcomm_dlc_unlink(d);
Expand Down
13 changes: 4 additions & 9 deletions trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,22 +193,17 @@ static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len)

/*
* Update Window Counter using the algorithm from [RFC 4342, 8.1].
* The algorithm is not applicable if RTT < 4 microseconds.
* As elsewhere, RTT > 0 is assumed by using dccp_sample_rtt().
*/
static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx,
ktime_t now)
{
u32 quarter_rtts;

if (unlikely(hctx->ccid3hctx_rtt < 4)) /* avoid divide-by-zero */
return;

quarter_rtts = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count);
quarter_rtts /= hctx->ccid3hctx_rtt / 4;
u32 delta = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count),
quarter_rtts = (4 * delta) / hctx->ccid3hctx_rtt;

if (quarter_rtts > 0) {
hctx->ccid3hctx_t_last_win_count = now;
hctx->ccid3hctx_last_win_count += min_t(u32, quarter_rtts, 5);
hctx->ccid3hctx_last_win_count += min(quarter_rtts, 5U);
hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */
}
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ int dccp_invalid_packet(struct sk_buff *skb)
* If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet
* has short sequence numbers), drop packet and return
*/
if (dh->dccph_type >= DCCP_PKT_DATA &&
dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x == 0) {
if ((dh->dccph_type < DCCP_PKT_DATA ||
dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x == 0) {
DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n",
dccp_packet_name(dh->dccph_type));
return 1;
Expand Down

0 comments on commit 484f3ec

Please sign in to comment.