]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sctp/sm_statetable.c
Merge tag 'backlight-next-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee...
[linux.git] / net / sctp / sm_statetable.c
index 61ed9c6e3be37cdb379092308dae4a347fa198f2..88ea87f4f0e790dfb14cbb8261696655fa34fba8 100644 (file)
@@ -976,26 +976,22 @@ static const struct sctp_sm_table_entry *sctp_chunk_event_lookup(
        if (cid <= SCTP_CID_BASE_MAX)
                return &chunk_event_table[cid][state];
 
-       if (net->sctp.prsctp_enable) {
-               if (cid == SCTP_CID_FWD_TSN || cid == SCTP_CID_I_FWD_TSN)
-                       return &prsctp_chunk_event_table[0][state];
-       }
+       switch ((u16)cid) {
+       case SCTP_CID_FWD_TSN:
+       case SCTP_CID_I_FWD_TSN:
+               return &prsctp_chunk_event_table[0][state];
 
-       if (net->sctp.addip_enable) {
-               if (cid == SCTP_CID_ASCONF)
-                       return &addip_chunk_event_table[0][state];
+       case SCTP_CID_ASCONF:
+               return &addip_chunk_event_table[0][state];
 
-               if (cid == SCTP_CID_ASCONF_ACK)
-                       return &addip_chunk_event_table[1][state];
-       }
+       case SCTP_CID_ASCONF_ACK:
+               return &addip_chunk_event_table[1][state];
 
-       if (net->sctp.reconf_enable)
-               if (cid == SCTP_CID_RECONF)
-                       return &reconf_chunk_event_table[0][state];
+       case SCTP_CID_RECONF:
+               return &reconf_chunk_event_table[0][state];
 
-       if (net->sctp.auth_enable) {
-               if (cid == SCTP_CID_AUTH)
-                       return &auth_chunk_event_table[0][state];
+       case SCTP_CID_AUTH:
+               return &auth_chunk_event_table[0][state];
        }
 
        return &chunk_event_table_unknown[state];