hdrlen += 2;
 
                qc_exists = 1;
-       } else
+       } else {
                qc_exists = 0;
+       }
 
        pn_vector[0] = pframe[hdrlen];
        pn_vector[1] = pframe[hdrlen+1];
        if (payload_remainder > 0) {
                for (j = 0; j < 16; j++)
                        padded_buffer[j] = 0x00;
-               for (j = 0; j < payload_remainder; j++) {
+               for (j = 0; j < payload_remainder; j++)
                        padded_buffer[j] = pframe[payload_index++];
-               }
+
                bitwise_xor(aes_out, padded_buffer, chain_buffer);
                aes128k128d(key, chain_buffer, aes_out);
        }
            ((frtype|frsubtype) == WIFI_DATA_CFPOLL) ||
            ((frtype|frsubtype) == WIFI_DATA_CFACKPOLL)) {
                qc_exists = 1;
-               if (hdrlen !=  WLAN_HDR_A3_QOS_LEN) {
+               if (hdrlen !=  WLAN_HDR_A3_QOS_LEN)
                        hdrlen += 2;
-               }
+
        } else if ((frtype == WIFI_DATA) && /* only for data packet . add for CONFIG_IEEE80211W, none 11w also can use */
                   ((frsubtype == 0x08) ||
                   (frsubtype == 0x09) ||
                   (frsubtype == 0x0a) ||
                   (frsubtype == 0x0b))) {
-               if (hdrlen !=  WLAN_HDR_A3_QOS_LEN) {
+               if (hdrlen !=  WLAN_HDR_A3_QOS_LEN)
                        hdrlen += 2;
-               }
+
                qc_exists = 1;
-       } else
+       } else {
                qc_exists = 0;
+       }
 
        /*  now, decrypt pframe with hdrlen offset and plen long */
 
 
                for (j = 0; j < 16; j++)
                        padded_buffer[j] = 0x00;
-               for (j = 0; j < payload_remainder; j++) {
+               for (j = 0; j < payload_remainder; j++)
                        padded_buffer[j] = pframe[payload_index+j];
-               }
+
                aes128k128d(key, ctr_preload, aes_out);
                bitwise_xor(aes_out, padded_buffer, chain_buffer);
                for (j = 0; j < payload_remainder; j++)
        if (payload_remainder > 0) {
                for (j = 0; j < 16; j++)
                        padded_buffer[j] = 0x00;
-               for (j = 0; j < payload_remainder; j++) {
+               for (j = 0; j < payload_remainder; j++)
                        padded_buffer[j] = message[payload_index++];
-               }
+
                bitwise_xor(aes_out, padded_buffer, chain_buffer);
                aes128k128d(key, chain_buffer, aes_out);
        }
 
                for (j = 0; j < 16; j++)
                        padded_buffer[j] = 0x00;
-               for (j = 0; j < payload_remainder; j++) {
+               for (j = 0; j < payload_remainder; j++)
                        padded_buffer[j] = message[payload_index+j];
-               }
+
                aes128k128d(key, ctr_preload, aes_out);
                bitwise_xor(aes_out, padded_buffer, chain_buffer);
                for (j = 0; j < payload_remainder; j++)
 
        for (j = 0; j < 16; j++)
                padded_buffer[j] = 0x00;
-       for (j = 0; j < 8; j++) {
+       for (j = 0; j < 8; j++)
                padded_buffer[j] = message[j+hdrlen+8+plen-8];
-       }
 
        aes128k128d(key, ctr_preload, aes_out);
        bitwise_xor(aes_out, padded_buffer, chain_buffer);
                                        res = _FAIL;
                                        goto exit;
                                }
-                       } else
+                       } else {
                                prwskey = &stainfo->dot118021x_UncstKey.skey[0];
+                       }
 
                        length = ((union recv_frame *)precvframe)->u.hdr.len-prxattrib->hdrlen-prxattrib->iv_len;
 
                if (!memcmp(mic, pframe+pattrib->pkt_len-8, 8)) {
                        pmlmeext->mgnt_80211w_IPN_rx = temp_ipn;
                        res = _SUCCESS;
-               } else
+               } else {
                        DBG_871X("BIP MIC error!\n");
+               }
 
-       } else
+       } else {
                res = RTW_RX_HANDLED;
+       }
 BIP_exit:
 
        kfree(BIP_AAD);
 
        int     index;
 
        if (pstapriv) {
-
                /*delete all reordering_ctrl_timer              */
                spin_lock_bh(&pstapriv->sta_hash_lock);
                for (index = 0; index < NUM_STA; index++) {
                kfree_sta_priv_lock(pstapriv);
 
                vfree(pstapriv->pallocated_stainfo_buf);
-
        }
        return _SUCCESS;
 }
 /*  In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable. */
 /*  So, we initialize the tid_rxseq variable as the 0xffff. */
 
-               for (i = 0; i < 16; i++) {
+               for (i = 0; i < 16; i++)
                        memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
-               }
 
                RT_TRACE(
                        _module_rtl871x_sta_mgt_c_,
                spin_unlock_bh(&(pstapriv->sta_hash_lock));
                /* alloc mac id for non-bc/mc station, */
                rtw_alloc_macid(pstapriv->padapter, psta);
-
        }
 
 exit:
                }
 
                spin_unlock_bh(&ppending_recvframe_queue->lock);
-
        }
 
        if (!(psta->state & WIFI_AP_STATE))
 
                        if (pbcmc_stainfo != psta)
                                rtw_free_stainfo(padapter, psta);
-
                }
        }
 
        plist = get_next(phead);
 
        while (phead != plist) {
-
                psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
 
                if ((!memcmp(psta->hwaddr, addr, ETH_ALEN)))
 
 u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
 {
-
        struct sta_info *psta;
        u32 res = _SUCCESS;
        NDIS_802_11_MAC_ADDRESS bcast_addr = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
                                match = true;
                                break;
                        }
-
        }
        spin_unlock_bh(&(pacl_node_q->lock));
 
 
        if (pmlmeext->cur_channel > 14) {
                if ((pregistrypriv->bw_mode & 0xf0) > 0)
                        cbw40_enable = 1;
-       } else
+       } else {
                if ((pregistrypriv->bw_mode & 0x0f) > 0)
                        cbw40_enable = 1;
+       }
 
        if ((pHT_info->infos[0] & BIT(2)) && cbw40_enable) {
                new_bwmode = CHANNEL_WIDTH_40;
 
                /* update HT info also */
                HT_info_handler(padapter, pIE);
-       } else
+       } else {
                pmlmeinfo->bwmode_updated = false;
+       }
 
        if (true == pmlmeinfo->bwmode_updated) {
                struct sta_info *psta;
                }
 
                return false;
-       } else
+       } else {
                return false;
+       }
 }
 
 int support_short_GI(struct adapter *padapter, struct HT_caps_element *pHT_caps, u8 bwmode)
                        } else if (!memcmp(pIE->data, AIRGOCAP_OUI, 3)) {
                                DBG_871X("link to Airgo Cap\n");
                                return HT_IOT_PEER_AIRGO;
-                       } else
+                       } else {
                                break;
+                       }
 
                default:
                        break;
                }
        }
 
-       if (updateCap & cIBSS)
+       if (updateCap & cIBSS) {
                /* Filen: See 802.11-2007 p.91 */
                pmlmeinfo->slotTime = NON_SHORT_SLOT_TIME;
-       else {
+       } else {
                /* Filen: See 802.11-2007 p.90 */
-               if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N | WIRELESS_11A | WIRELESS_11_5N | WIRELESS_11AC))
+               if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N | WIRELESS_11A | WIRELESS_11_5N | WIRELESS_11AC)) {
                        pmlmeinfo->slotTime = SHORT_SLOT_TIME;
-               else if (pmlmeext->cur_wireless_mode & (WIRELESS_11G)) {
+               } else if (pmlmeext->cur_wireless_mode & (WIRELESS_11G)) {
                        if ((updateCap & cShortSlotTime) /* && (!(pMgntInfo->pHTInfo->RT2RT_HT_Mode & RT_HT_CAP_USE_LONG_PREAMBLE)) */)
                                /*  Short Slot Time */
                                pmlmeinfo->slotTime = SHORT_SLOT_TIME;
                        else
                                /*  Long Slot Time */
                                pmlmeinfo->slotTime = NON_SHORT_SLOT_TIME;
-               } else
+               } else {
                        /* B Mode */
                        pmlmeinfo->slotTime = NON_SHORT_SLOT_TIME;
+               }
        }
 
        rtw_hal_set_hwreg(Adapter, HW_VAR_SLOT_TIME, &pmlmeinfo->slotTime);
 
        /*              Other fragments are protected by previous fragment. */
        /*              So we only need to check the length of first fragment. */
        if (pmlmeext->cur_wireless_mode < WIRELESS_11_24N  || padapter->registrypriv.wifi_spec) {
-               if (sz > padapter->registrypriv.rts_thresh)
+               if (sz > padapter->registrypriv.rts_thresh) {
                        pattrib->vcs_mode = RTS_CTS;
-               else {
+               } else {
                        if (pattrib->rtsen)
                                pattrib->vcs_mode = RTS_CTS;
                        else if (pattrib->cts2self)
                memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
                memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN);
                DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap);
-       } else
+       } else {
                DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown);
+       }
 
        pattrib->pktlen = pktfile.pkt_len;
 
                default:
                                break;
                }
-       } else
+       } else {
                RT_TRACE(_module_rtl871x_xmit_c_, _drv_notice_, ("### xmitframe_hwencrypt\n"));
+       }
 
        return _SUCCESS;
 }
                        ClearMFrag(mem_start);
 
                        break;
-               } else
+               } else {
                        RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("%s: There're still something in packet!\n", __func__));
+               }
 
                addr = (SIZE_PTR)(pframe);
 
        case AUTO_VCS:
        default:
                perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len);
-               if (!perp)
+               if (!perp) {
                        pxmitpriv->vcs = NONE_VCS;
-               else {
+               } else {
                        protection = (*(perp + 2)) & BIT(1);
                        if (protection) {
                                if (pregistrypriv->vcs_type == RTS_CTS)
                                        pxmitpriv->vcs = RTS_CTS;
                                else
                                        pxmitpriv->vcs = CTS_TO_SELF;
-                       } else
+                       } else {
                                pxmitpriv->vcs = NONE_VCS;
+                       }
                }
 
                break;
                        DBG_871X("%s pxmitbuf->sctx is not NULL\n", __func__);
                        rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC);
                }
-       } else
+       } else {
                DBG_871X("%s fail, no xmitbuf available !!!\n", __func__);
+       }
 
        return pxmitbuf;
 }