]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8192u: Fix indentation
authorStephen Brennan <stephen@brennan.io>
Wed, 28 Aug 2019 04:35:42 +0000 (21:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Aug 2019 20:22:13 +0000 (22:22 +0200)
Checkpatch reports WARNING:SUSPECT_CODE_INDENT in several places. Fix
this by aligning code properly with tabs.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190828043542.3753-1-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
drivers/staging/rtl8192u/r819xU_firmware.c

index a43a5d617bd9ff7a204bda5cb86a2fe4fe142370..c241cf484023a49861a8947f589424432a89ee26 100644 (file)
@@ -345,7 +345,7 @@ static int ieee80211_ccmp_set_key(void *key, int len, u8 *seq, void *priv)
                }
                if (crypto_aead_setauthsize(tfm, CCMP_MIC_LEN) ||
                    crypto_aead_setkey(tfm, data->key, CCMP_TK_LEN))
-                               return -1;
+                       return -1;
        } else if (len == 0) {
                data->key_set = 0;
        } else {
index a1462ec557675892c067f8e389a31633b65e8083..5c33bcb0db2eeaa5999dab6207235f295cb42d5a 100644 (file)
@@ -103,17 +103,17 @@ ieee80211_frag_cache_get(struct ieee80211_device *ieee,
        u8 tid;
 
        if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS) && IEEE80211_QOS_HAS_SEQ(fc)) {
-         hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)hdr;
-         tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-         tid = UP2AC(tid);
-         tid++;
+               hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)hdr;
+               tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+               tid = UP2AC(tid);
+               tid++;
        } else if (IEEE80211_QOS_HAS_SEQ(fc)) {
-         hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)hdr;
-         tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-         tid = UP2AC(tid);
-         tid++;
+               hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)hdr;
+               tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+               tid = UP2AC(tid);
+               tid++;
        } else {
-         tid = 0;
+               tid = 0;
        }
 
        if (frag == 0) {
@@ -170,17 +170,17 @@ static int ieee80211_frag_cache_invalidate(struct ieee80211_device *ieee,
        u8 tid;
 
        if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS) && IEEE80211_QOS_HAS_SEQ(fc)) {
-         hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)hdr;
-         tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-         tid = UP2AC(tid);
-         tid++;
+               hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)hdr;
+               tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+               tid = UP2AC(tid);
+               tid++;
        } else if (IEEE80211_QOS_HAS_SEQ(fc)) {
-         hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)hdr;
-         tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-         tid = UP2AC(tid);
-         tid++;
+               hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)hdr;
+               tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+               tid = UP2AC(tid);
+               tid++;
        } else {
-         tid = 0;
+               tid = 0;
        }
 
        entry = ieee80211_frag_cache_find(ieee, seq, -1, tid, hdr->addr2,
@@ -425,17 +425,17 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,
 
        //TO2DS and QoS
        if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS) && IEEE80211_QOS_HAS_SEQ(fc)) {
-         hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)header;
-         tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-         tid = UP2AC(tid);
-         tid++;
+               hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)header;
+               tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+               tid = UP2AC(tid);
+               tid++;
        } else if (IEEE80211_QOS_HAS_SEQ(fc)) { //QoS
-         hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)header;
-         tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-         tid = UP2AC(tid);
-         tid++;
+               hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)header;
+               tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+               tid = UP2AC(tid);
+               tid++;
        } else { // no QoS
-         tid = 0;
+               tid = 0;
        }
 
        switch (ieee->iw_mode) {
@@ -993,7 +993,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
        // if QoS enabled, should check the sequence for each of the AC
        if ((!ieee->pHTInfo->bCurRxReorderEnable) || !ieee->current_network.qos_data.active || !IsDataFrame(skb->data) || IsLegacyDataFrame(skb->data)) {
                if (is_duplicate_packet(ieee, hdr))
-               goto rx_dropped;
+                       goto rx_dropped;
 
        } else {
                struct rx_ts_record *pRxTS = NULL;
@@ -1211,10 +1211,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 #ifdef CONFIG_IEEE80211_DEBUG
        if (crypt && !(fc & IEEE80211_FCTL_WEP) &&
            ieee80211_is_eapol_frame(ieee, skb, hdrlen)) {
-                       struct eapol *eap = (struct eapol *)(skb->data +
-                               24);
-                       IEEE80211_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
-                                               eap_get_type(eap->type));
+               struct eapol *eap = (struct eapol *)(skb->data +
+                       24);
+               IEEE80211_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
+                                       eap_get_type(eap->type));
        }
 #endif
 
@@ -1770,13 +1770,13 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
                                   info_element->data[2] == 0x4c &&
                                   info_element->data[3] == 0x033){
 
-                                               tmp_htcap_len = min(info_element->len, (u8)MAX_IE_LEN);
-                                               if (tmp_htcap_len != 0) {
-                                                       network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
-                                                       network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf) ? \
-                                                               sizeof(network->bssht.bdHTCapBuf) : tmp_htcap_len;
-                                                       memcpy(network->bssht.bdHTCapBuf, info_element->data, network->bssht.bdHTCapLen);
-                                               }
+                                       tmp_htcap_len = min(info_element->len, (u8)MAX_IE_LEN);
+                                       if (tmp_htcap_len != 0) {
+                                               network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
+                                               network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf) ? \
+                                                       sizeof(network->bssht.bdHTCapBuf) : tmp_htcap_len;
+                                               memcpy(network->bssht.bdHTCapBuf, info_element->data, network->bssht.bdHTCapLen);
+                                       }
                                }
                                if (tmp_htcap_len != 0)
                                        network->bssht.bdSupportHT = true;
@@ -1792,17 +1792,17 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
                                        info_element->data[2] == 0x4c &&
                                        info_element->data[3] == 0x034){
 
-                                               tmp_htinfo_len = min(info_element->len, (u8)MAX_IE_LEN);
-                                               if (tmp_htinfo_len != 0) {
-                                                       network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
-                                                       if (tmp_htinfo_len) {
-                                                               network->bssht.bdHTInfoLen = tmp_htinfo_len > sizeof(network->bssht.bdHTInfoBuf) ? \
-                                                                       sizeof(network->bssht.bdHTInfoBuf) : tmp_htinfo_len;
-                                                               memcpy(network->bssht.bdHTInfoBuf, info_element->data, network->bssht.bdHTInfoLen);
-                                                       }
-
+                                       tmp_htinfo_len = min(info_element->len, (u8)MAX_IE_LEN);
+                                       if (tmp_htinfo_len != 0) {
+                                               network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
+                                               if (tmp_htinfo_len) {
+                                                       network->bssht.bdHTInfoLen = tmp_htinfo_len > sizeof(network->bssht.bdHTInfoBuf) ? \
+                                                               sizeof(network->bssht.bdHTInfoBuf) : tmp_htinfo_len;
+                                                       memcpy(network->bssht.bdHTInfoBuf, info_element->data, network->bssht.bdHTInfoLen);
                                                }
 
+                                       }
+
                                }
                        }
 
@@ -1822,7 +1822,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
                                                network->bssht.bdRT2RTAggregation = true;
 
                                                if ((ht_realtek_agg_buf[4] == 1) && (ht_realtek_agg_buf[5] & 0x02))
-                                               network->bssht.bdRT2RTLongSlotTime = true;
+                                                       network->bssht.bdRT2RTLongSlotTime = true;
                                        }
                                }
 
@@ -1843,7 +1843,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
                                         info_element->data[1] == 0x10 &&
                                         info_element->data[2] == 0x18)){
 
-                                               network->broadcom_cap_exist = true;
+                                       network->broadcom_cap_exist = true;
 
                                }
                        }
@@ -2262,7 +2262,7 @@ static inline void update_network(struct ieee80211_network *dst,
           src->wmm_param[1].aci_aifsn || \
           src->wmm_param[2].aci_aifsn || \
           src->wmm_param[3].aci_aifsn) {
-         memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
+               memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
        }
        //dst->QoS_Enable = src->QoS_Enable;
 #ifdef THOMAS_TURBO
@@ -2401,11 +2401,11 @@ static inline void ieee80211_process_probe_response(
        if (is_same_network(&ieee->current_network, network, ieee)) {
                update_network(&ieee->current_network, network);
                if ((ieee->current_network.mode == IEEE_N_24G || ieee->current_network.mode == IEEE_G)
-               && ieee->current_network.berp_info_valid){
-               if (ieee->current_network.erp_value & ERP_UseProtection)
-                       ieee->current_network.buseprotection = true;
-               else
-                       ieee->current_network.buseprotection = false;
+                   && ieee->current_network.berp_info_valid){
+                       if (ieee->current_network.erp_value & ERP_UseProtection)
+                               ieee->current_network.buseprotection = true;
+                       else
+                               ieee->current_network.buseprotection = false;
                }
                if (is_beacon(beacon->header.frame_ctl)) {
                        if (ieee->state == IEEE80211_LINKED)
index 140e3cb66a2e1b3e40460f2025a074e06459dc36..f0b6b8372f91f4707d9e7291ef41e6d97ff6d705 100644 (file)
@@ -488,7 +488,7 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
        if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
                tcb_desc->bUseShortPreamble = true;
        if (ieee->mode == IW_MODE_MASTER)
-                       goto NO_PROTECTION;
+               goto NO_PROTECTION;
        return;
 NO_PROTECTION:
        tcb_desc->bRTSEnable    = false;
index 8ca7a7fd74f9785b5a6d6286155a011acbe43119..9dd5c04181ea35b4d1d5732217cf74f11b14150d 100644 (file)
@@ -177,7 +177,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 
        iwe.u.data.length = p - custom;
        if (iwe.u.data.length)
-           start = iwe_stream_add_point(info, start, stop, &iwe, custom);
+               start = iwe_stream_add_point(info, start, stop, &iwe, custom);
 
        if (ieee->wpa_enabled && network->wpa_ie_len) {
                char buf[MAX_WPA_IE_LEN * 2 + 30];
@@ -218,7 +218,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
                      " Last beacon: %lums ago", (jiffies - network->last_scanned) / (HZ / 100));
        iwe.u.data.length = p - custom;
        if (iwe.u.data.length)
-           start = iwe_stream_add_point(info, start, stop, &iwe, custom);
+               start = iwe_stream_add_point(info, start, stop, &iwe, custom);
 
        return start;
 }
@@ -785,8 +785,8 @@ int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len)
        u8 *buf;
 
        if (len > MAX_WPA_IE_LEN || (len && !ie)) {
-       //      printk("return error out, len:%d\n", len);
-       return -EINVAL;
+               //printk("return error out, len:%d\n", len);
+               return -EINVAL;
        }
 
 
index 153d4ee0ec071047a8bf18c68b9cef32ddd76642..dd81d210bd49d1d97e5c9a925d56c934144f5267 100644 (file)
@@ -231,7 +231,7 @@ bool init_firmware(struct net_device *dev)
                rst_opt = OPT_FIRMWARE_RESET;
                starting_state = FW_INIT_STEP2_DATA;
        } else {
-                RT_TRACE(COMP_FIRMWARE, "PlatformInitFirmware: undefined firmware state\n");
+               RT_TRACE(COMP_FIRMWARE, "PlatformInitFirmware: undefined firmware state\n");
        }
 
        /*