android_kernel_xiaomi_sdm845/net/dccp/ccids
Gerrit Renker 83399361c3 [CCID2]: Remove redundant synchronisation variable
This removes the synchronisation variable `ccid2hctx_sendwait', which is set to 1
when the CCID2 sender may send a new packet, and which is set to 0 otherwise

The variable is redundant, since it is only used in combination with the hc_tx_send_packet/
hc_tx_packet_sent function pair. Both functions are called under socket lock, so the
following happens when the CCID2 may send a new packet:

 * it sets sendwait = 1 in tx_send_packet and returns 0;
 * the subsequent call to tx_packet_sent clears the sendwait flag;
 * since tx_send_packet returns 0 if and only if sendwait == 1, the BUG_ON condition
   in tx_packet_sent is never satisfied, since that function is never called when
   tx_send_packet returns a value different from 0 (cf. dccp_write_xmit);
 * the call to tx_packet_sent clears the flag so that the condition "!sendwait" is
   true the next time tx_packet_sent is called.

In other words, it is sufficient to just return 0 / not-0 to synchronise tx_send_packet
and tx_packet_sent -- which is what the patch does.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:54:59 -08:00
..
lib [CCID3]: Inline for moving average 2008-01-28 14:54:43 -08:00
ccid2.c [CCID2]: Remove redundant synchronisation variable 2008-01-28 14:54:59 -08:00
ccid2.h [CCID2]: Remove redundant synchronisation variable 2008-01-28 14:54:59 -08:00
ccid3.c [CCID3]: Inline for moving average 2008-01-28 14:54:43 -08:00
ccid3.h [CCID3]: Accurately determine idle & application-limited periods 2008-01-28 14:54:42 -08:00
Kconfig [DCCP]: Remove redundant dependency on IP_DCCP 2008-01-28 14:54:46 -08:00
Makefile [DCCP] CCID2: Initial CCID2 (TCP-Like) implementation 2006-03-20 17:41:47 -08:00