staging: rtl8712: clean up various indentation and coding style issues
authorColin Ian King <colin.king@canonical.com>
Mon, 7 Jan 2019 23:11:30 +0000 (23:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jan 2019 15:08:36 +0000 (16:08 +0100)
There are several statements that are indented incorrectly so fix these.
Also remove unnecessary { } braces and clean up a comment.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/ieee80211.c
drivers/staging/rtl8712/rtl8712_led.c
drivers/staging/rtl8712/rtl871x_mlme.c
drivers/staging/rtl8712/rtl871x_recv.c
drivers/staging/rtl8712/rtl871x_sta_mgt.c
drivers/staging/rtl8712/rtl871x_xmit.c

index bb4f56a5fb01367a502c1ebcdce8e1c1584e0d15..2eae11dd6b4200df59a0611c1c7c87ef564baaad 100644 (file)
@@ -408,7 +408,7 @@ int r8712_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
                        match = true;
                        break;
                }
-                       cnt += in_ie[cnt + 1] + 2; /* goto next */
+               cnt += in_ie[cnt + 1] + 2; /* goto next */
        }
        return match;
 }
index 5b1004b2df47a7d29b1039a81bc0c0be4a2d78bb..07fcf9b9b811aa891e28b96470b2269cbce6ae2b 100644 (file)
@@ -939,7 +939,7 @@ static void SwLedControlMode1(struct _adapter *padapter,
                        }
                        if (pLed->bLedLinkBlinkInProgress) {
                                del_timer(&pLed->BlinkTimer);
-                                pLed->bLedLinkBlinkInProgress = false;
+                               pLed->bLedLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedBlinkInProgress) {
                                del_timer(&pLed->BlinkTimer);
@@ -991,7 +991,7 @@ static void SwLedControlMode1(struct _adapter *padapter,
                        }
                        if (pLed->bLedLinkBlinkInProgress) {
                                del_timer(&pLed->BlinkTimer);
-                                pLed->bLedLinkBlinkInProgress = false;
+                               pLed->bLedLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedBlinkInProgress) {
                                del_timer(&pLed->BlinkTimer);
@@ -1018,7 +1018,7 @@ static void SwLedControlMode1(struct _adapter *padapter,
                }
                if (pLed->bLedLinkBlinkInProgress) {
                        del_timer(&pLed->BlinkTimer);
-                        pLed->bLedLinkBlinkInProgress = false;
+                       pLed->bLedLinkBlinkInProgress = false;
                }
                if (pLed->bLedBlinkInProgress) {
                        del_timer(&pLed->BlinkTimer);
index 986a1d52691804fb5173b780347f907fc7a5ed3c..3f17ef6f7e39b6d1da548ba069ccf3a94cfa3e10 100644 (file)
@@ -259,7 +259,7 @@ int r8712_is_same_ibss(struct _adapter *adapter, struct wlan_network *pnetwork)
 static int is_same_network(struct wlan_bssid_ex *src,
                           struct wlan_bssid_ex *dst)
 {
-        u16 s_cap, d_cap;
+       u16 s_cap, d_cap;
 
        memcpy((u8 *)&s_cap, r8712_get_capability_from_ie(src->IEs), 2);
        memcpy((u8 *)&d_cap, r8712_get_capability_from_ie(dst->IEs), 2);
index f10896df094b7359f41c3bfcba9f41a2d441eba6..0271ccf25f2525ff4709c53f4c468d8fdd29a54c 100644 (file)
@@ -54,7 +54,7 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv,
        sint i;
        union recv_frame *precvframe;
 
-        memset((unsigned char *)precvpriv, 0, sizeof(struct  recv_priv));
+       memset((unsigned char *)precvpriv, 0, sizeof(struct  recv_priv));
        spin_lock_init(&precvpriv->lock);
        _init_queue(&precvpriv->free_recv_queue);
        _init_queue(&precvpriv->recv_pending_queue);
@@ -325,7 +325,7 @@ static sint sta2sta_data_frame(struct _adapter *adapter,
                 */
                if (memcmp(pattrib->bssid, pattrib->src, ETH_ALEN))
                        return _FAIL;
-              sta_addr = pattrib->bssid;
+               sta_addr = pattrib->bssid;
        } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
                if (bmcast) {
                        /* For AP mode, if DA == MCAST, then BSSID should
index 9648ee15b40e8fe3f598796f9f9b1f847d8e5a87..7c30b9e68e702c82210a3ee922155b147d6f1f48 100644 (file)
@@ -25,7 +25,7 @@
 static void _init_stainfo(struct sta_info *psta)
 {
        memset((u8 *)psta, 0, sizeof(struct sta_info));
-        spin_lock_init(&psta->lock);
+       spin_lock_init(&psta->lock);
        INIT_LIST_HEAD(&psta->list);
        INIT_LIST_HEAD(&psta->hash_list);
        _r8712_init_sta_xmit_priv(&psta->sta_xmitpriv);
index 5c7dc9c6f76bdbb293a154450c3b65e47fd78091..7c88574099165fb897b8fd849fdf44a769997ee5 100644 (file)
@@ -193,8 +193,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt,
 
        pattrib->ether_type = ntohs(etherhdr.h_proto);
 
-{
-       /*If driver xmit ARP packet, driver can set ps mode to initial
+       /*
+        * If driver xmit ARP packet, driver can set ps mode to initial
         * setting. It stands for getting DHCP or fix IP.
         */
        if (pattrib->ether_type == 0x0806) {
@@ -206,7 +206,7 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt,
                                          padapter->registrypriv.smart_ps);
                }
        }
-}
+
        memcpy(pattrib->dst, &etherhdr.h_dest, ETH_ALEN);
        memcpy(pattrib->src, &etherhdr.h_source, ETH_ALEN);
        pattrib->pctrl = 0;
@@ -949,7 +949,7 @@ static void alloc_hwxmits(struct _adapter *padapter)
                pxmitpriv->vo_txqueue.head = 0;
                hwxmits[1] .phwtxqueue = &pxmitpriv->vo_txqueue;
                hwxmits[1] .sta_queue = &pxmitpriv->vo_pending;
-       pxmitpriv->vi_txqueue.head = 0;
+               pxmitpriv->vi_txqueue.head = 0;
                hwxmits[2] .phwtxqueue = &pxmitpriv->vi_txqueue;
                hwxmits[2] .sta_queue = &pxmitpriv->vi_pending;
                pxmitpriv->bk_txqueue.head = 0;