sctp: rename asoc intl_enable to asoc peer.intl_capable

To keep consistent with other asoc features, we move intl_enable
to peer.intl_capable in asoc.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Xin Long
2019-07-09 00:57:06 +08:00
committed by David S. Miller
parent 1c13475368
commit da1f6d4de7
5 changed files with 23 additions and 22 deletions

View File

@@ -438,7 +438,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
if (sp->adaptation_ind)
chunksize += sizeof(aiparam);
if (asoc->intl_enable) {
if (asoc->peer.intl_capable) {
extensions[num_ext] = SCTP_CID_I_DATA;
num_ext += 1;
}
@@ -2028,7 +2028,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
break;
case SCTP_CID_I_DATA:
if (sctp_sk(asoc->base.sk)->strm_interleave)
asoc->intl_enable = 1;
asoc->peer.intl_capable = 1;
break;
default:
break;

View File

@@ -7692,7 +7692,7 @@ static int sctp_getsockopt_interleaving_supported(struct sock *sk, int len,
goto out;
}
params.assoc_value = asoc ? asoc->intl_enable
params.assoc_value = asoc ? asoc->peer.intl_capable
: sctp_sk(sk)->strm_interleave;
if (put_user(len, optlen))

View File

@@ -1358,6 +1358,6 @@ void sctp_stream_interleave_init(struct sctp_stream *stream)
struct sctp_association *asoc;
asoc = container_of(stream, struct sctp_association, stream);
stream->si = asoc->intl_enable ? &sctp_stream_interleave_1
: &sctp_stream_interleave_0;
stream->si = asoc->peer.intl_capable ? &sctp_stream_interleave_1
: &sctp_stream_interleave_0;
}

View File

@@ -228,7 +228,7 @@ int sctp_sched_get_value(struct sctp_association *asoc, __u16 sid,
void sctp_sched_dequeue_done(struct sctp_outq *q, struct sctp_chunk *ch)
{
if (!list_is_last(&ch->frag_list, &ch->msg->chunks) &&
!q->asoc->intl_enable) {
!q->asoc->peer.intl_capable) {
struct sctp_stream_out *sout;
__u16 sid;