staging: rtl8723au: Improve some bad switch() formatting
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:52 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:29:12 +0000 (08:29 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ap.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_p2p.c

index 75b52bf5dccf063041ddc037f0cd8a7dd8bfebde..e68d13aa5db5b64e32bc01446bdf00419802f92b 100644 (file)
@@ -1349,50 +1349,37 @@ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
 
        switch (ie_id)
        {
-               case 0xFF:
-
-                       update_bcn_fixed_ie(padapter);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */
-
-                       break;
-
-               case _TIM_IE_:
-
-                       update_BCNTIM(padapter);
-
-                       break;
-
-               case _ERPINFO_IE_:
-
-                       update_bcn_erpinfo_ie(padapter);
-
-                       break;
-
-               case _HT_CAPABILITY_IE_:
-
-                       update_bcn_htcap_ie(padapter);
-
-                       break;
-
-               case _RSN_IE_2_:
-
-                       update_bcn_rsn_ie(padapter);
-
-                       break;
+       case 0xFF:
+               /* 8: TimeStamp, 2: Beacon Interval 2:Capability */
+               update_bcn_fixed_ie(padapter);
+               break;
 
-               case _HT_ADD_INFO_IE_:
+       case _TIM_IE_:
+               update_BCNTIM(padapter);
+               break;
 
-                       update_bcn_htinfo_ie(padapter);
+       case _ERPINFO_IE_:
+               update_bcn_erpinfo_ie(padapter);
+               break;
 
-                       break;
+       case _HT_CAPABILITY_IE_:
+               update_bcn_htcap_ie(padapter);
+               break;
 
-               case _VENDOR_SPECIFIC_IE_:
+       case _RSN_IE_2_:
+               update_bcn_rsn_ie(padapter);
+               break;
 
-                       update_bcn_vendor_spec_ie(padapter, oui);
+       case _HT_ADD_INFO_IE_:
+               update_bcn_htinfo_ie(padapter);
+               break;
 
-                       break;
+       case _VENDOR_SPECIFIC_IE_:
+               update_bcn_vendor_spec_ie(padapter, oui);
+               break;
 
-               default:
-                       break;
+       default:
+               break;
        }
 
        pmlmepriv->update_bcn = true;
index 22e71702a84aee5d18d27b50620a9dcf68f68cca..717ba10c66a5c6c12d34a501af544f93f1381f03 100644 (file)
@@ -2324,17 +2324,18 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len)
                pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40;
                switch ((pmlmeinfo->HT_info.infos[0] & 0x3))
                {
-                       case HT_EXTCHNL_OFFSET_UPPER:
-                               pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
-                               break;
+               case HT_EXTCHNL_OFFSET_UPPER:
+                       pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
+                       break;
 
-                       case HT_EXTCHNL_OFFSET_LOWER:
-                               pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
-                               break;
+               case HT_EXTCHNL_OFFSET_LOWER:
+                       pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
+                       break;
 
-                       default:
-                               pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
-                               break;
+               default:
+                       pmlmeext->cur_ch_offset =
+                               HAL_PRIME_CHNL_OFFSET_DONT_CARE;
+                       break;
                }
        }
 
index e5d9991040bb9686dd49e54ce7f4b04b55030228..ba851cf4f9921af8e9a42fb7e16bd6ad30f96786 100644 (file)
@@ -3564,52 +3564,50 @@ void p2p_ps_wk_hdl23a(struct rtw_adapter *padapter, u8 p2p_ps_state)
        /*  Pre action for p2p state */
        switch (p2p_ps_state)
        {
-               case P2P_PS_DISABLE:
+       case P2P_PS_DISABLE:
+               pwdinfo->p2p_ps_state = p2p_ps_state;
+
+               rtl8723a_set_p2p_ps_offload_cmd(padapter, p2p_ps_state);
+
+               pwdinfo->noa_index = 0;
+               pwdinfo->ctwindow = 0;
+               pwdinfo->opp_ps = 0;
+               pwdinfo->noa_num = 0;
+               pwdinfo->p2p_ps_mode = P2P_PS_NONE;
+               if (padapter->pwrctrlpriv.bFwCurrentInPSMode == true) {
+                       if (pwrpriv->smart_ps == 0) {
+                               pwrpriv->smart_ps = 2;
+                               rtl8723a_set_FwPwrMode_cmd(padapter, padapter->pwrctrlpriv.pwr_mode);
+                       }
+               }
+               break;
+       case P2P_PS_ENABLE:
+               if (pwdinfo->p2p_ps_mode > P2P_PS_NONE) {
                        pwdinfo->p2p_ps_state = p2p_ps_state;
 
-                       rtl8723a_set_p2p_ps_offload_cmd(padapter, p2p_ps_state);
-
-                       pwdinfo->noa_index = 0;
-                       pwdinfo->ctwindow = 0;
-                       pwdinfo->opp_ps = 0;
-                       pwdinfo->noa_num = 0;
-                       pwdinfo->p2p_ps_mode = P2P_PS_NONE;
-                       if (padapter->pwrctrlpriv.bFwCurrentInPSMode == true) {
-                               if (pwrpriv->smart_ps == 0) {
-                                       pwrpriv->smart_ps = 2;
+                       if (pwdinfo->ctwindow > 0) {
+                               if (pwrpriv->smart_ps != 0) {
+                                       pwrpriv->smart_ps = 0;
+                                       DBG_8723A("%s(): Enter CTW, change "
+                                                 "SmartPS\n", __func__);
                                        rtl8723a_set_FwPwrMode_cmd(padapter, padapter->pwrctrlpriv.pwr_mode);
                                }
                        }
-                       break;
-               case P2P_PS_ENABLE:
-                       if (pwdinfo->p2p_ps_mode > P2P_PS_NONE) {
-                               pwdinfo->p2p_ps_state = p2p_ps_state;
-
-                               if (pwdinfo->ctwindow > 0) {
-                                       if (pwrpriv->smart_ps != 0) {
-                                               pwrpriv->smart_ps = 0;
-                                               DBG_8723A("%s(): Enter CTW, change SmartPS\n", __func__);
-                                               rtl8723a_set_FwPwrMode_cmd(padapter, padapter->pwrctrlpriv.pwr_mode);
-                                       }
-                               }
-                               rtl8723a_set_p2p_ps_offload_cmd(padapter,
-                                                               p2p_ps_state);
-                       }
-                       break;
-               case P2P_PS_SCAN:
-               case P2P_PS_SCAN_DONE:
-               case P2P_PS_ALLSTASLEEP:
-                       if (pwdinfo->p2p_ps_mode > P2P_PS_NONE) {
-                               pwdinfo->p2p_ps_state = p2p_ps_state;
-                               rtl8723a_set_p2p_ps_offload_cmd(padapter,
-                                                               p2p_ps_state);
-                       }
-                       break;
-               default:
-                       break;
+                       rtl8723a_set_p2p_ps_offload_cmd(padapter,
+                                                       p2p_ps_state);
+               }
+               break;
+       case P2P_PS_SCAN:
+       case P2P_PS_SCAN_DONE:
+       case P2P_PS_ALLSTASLEEP:
+               if (pwdinfo->p2p_ps_mode > P2P_PS_NONE) {
+                       pwdinfo->p2p_ps_state = p2p_ps_state;
+                       rtl8723a_set_p2p_ps_offload_cmd(padapter, p2p_ps_state);
+               }
+               break;
+       default:
+               break;
        }
-
-
 }
 
 u8 p2p_ps_wk_cmd23a(struct rtw_adapter*padapter, u8 p2p_ps_state, u8 enqueue)