staging: rtl8188eu: core: switch with redundant cases
authorNicholas Mc Guire <hofrat@osadl.org>
Wed, 4 Feb 2015 11:04:38 +0000 (06:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Feb 2015 09:37:52 +0000 (17:37 +0800)
A few redundant switch cases as well as a redundant if/else
within one of the cases was consolidated to a single call.
The cases are intentionally retained for documentation purposes.

case WIFI_REASSOCREQ,WIFI_PROBEREQ,WIFI_BEACON,WIFI_ACTION all
have the same effect - notably the also for WIFI_PROBEREQ where
the if/else is executing the same function.

These redundant cases could all be dropped and consolidated into
the default but probably it is better for documentation/readability
to leave them in the switch/case explicitly.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c

index 28918201fcd7781fb1134a1a02391c1e36e33bf2..cd12dd70dd8804065c42e4e587a644fa8b474aee 100644 (file)
@@ -484,17 +484,8 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
                /* fall through */
        case WIFI_ASSOCREQ:
        case WIFI_REASSOCREQ:
-               _mgt_dispatcher(padapter, ptable, precv_frame);
-               break;
        case WIFI_PROBEREQ:
-               if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
-                       _mgt_dispatcher(padapter, ptable, precv_frame);
-               else
-                       _mgt_dispatcher(padapter, ptable, precv_frame);
-               break;
        case WIFI_BEACON:
-               _mgt_dispatcher(padapter, ptable, precv_frame);
-               break;
        case WIFI_ACTION:
                _mgt_dispatcher(padapter, ptable, precv_frame);
                break;