]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: rtl8188eu: In core directory, fixed 'missing a balnk line after declarations...
authorYamanappagouda Patil <goudapatilk@gmail.com>
Thu, 22 Dec 2016 17:02:13 +0000 (22:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jan 2017 15:52:44 +0000 (16:52 +0100)
Fixed checkpatch.pl warnings in rtl8188eu/core directory.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_efuse.c
drivers/staging/rtl8188eu/core/rtw_ieee80211.c
drivers/staging/rtl8188eu/core/rtw_led.c
drivers/staging/rtl8188eu/core/rtw_mlme.c
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
drivers/staging/rtl8188eu/core/rtw_recv.c
drivers/staging/rtl8188eu/core/rtw_security.c
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
drivers/staging/rtl8188eu/core/rtw_wlan_util.c
drivers/staging/rtl8188eu/core/rtw_xmit.c

index 16cc7706a1e642de6d21cd2b2c21220092af94b3..5dd9b24c6462617346ddd264ca39c294e439a346 100644 (file)
@@ -253,6 +253,7 @@ static void efuse_read_phymap_from_txpktbuf(
                        u8 lenc[2];
                        u16 lenbak, aaabak;
                        u16 aaa;
+
                        lenc[0] = usb_read8(adapter, REG_PKTBUF_DBG_DATA_L);
                        lenc[1] = usb_read8(adapter, REG_PKTBUF_DBG_DATA_L+1);
 
@@ -569,6 +570,7 @@ static bool hal_EfusePgPacketWrite2ByteHeader(struct adapter *pAdapter, u8 efuse
                                continue;
                        } else if (pg_header != tmp_header) {   /* offset PG fail */
                                struct pgpkt    fixPkt;
+
                                fixPkt.offset = ((pg_header_temp & 0xE0) >> 5) | ((tmp_header & 0xF0) >> 1);
                                fixPkt.word_en = tmp_header & 0x0F;
                                fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
@@ -611,6 +613,7 @@ static bool hal_EfusePgPacketWrite1ByteHeader(struct adapter *pAdapter, u8 efuse
                bRet = true;
        } else {
                struct pgpkt    fixPkt;
+
                fixPkt.offset = (tmp_header>>4) & 0x0F;
                fixPkt.word_en = tmp_header & 0x0F;
                fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
@@ -819,6 +822,7 @@ bool Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *pD
 u8 Efuse_CalculateWordCnts(u8 word_en)
 {
        u8 word_cnts = 0;
+
        if (!(word_en & BIT(0)))
                word_cnts++; /*  0 : write enable */
        if (!(word_en & BIT(1)))
index 914c4923421b908ec06eeb46c3629e367daedb9a..3e7a1767607efabaacac6b3b9c15ae2e07da280b 100644 (file)
@@ -71,8 +71,8 @@ int rtw_get_bit_value_from_ieee_value(u8 val)
        unsigned char dot11_rate_table[] = {
                2, 4, 11, 22, 12, 18, 24, 36, 48,
                72, 96, 108, 0}; /*  last element must be zero!! */
-
        int i = 0;
+
        while (dot11_rate_table[i] != 0) {
                if (dot11_rate_table[i] == val)
                        return BIT(i);
@@ -162,6 +162,7 @@ u8 *rtw_get_ie(u8 *pbuf, int index, int *len, int limit)
 {
        int tmp, i;
        u8 *p;
+
        if (limit < 1)
                return NULL;
 
@@ -211,6 +212,7 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
 uint   rtw_get_rateset_len(u8  *rateset)
 {
        uint i = 0;
+
        while (1) {
                if ((rateset[i]) == 0)
                        break;
@@ -1002,6 +1004,7 @@ static int rtw_get_cipher_info(struct wlan_network *pnetwork)
        unsigned char *pbuf;
        int group_cipher = 0, pairwise_cipher = 0, is8021x = 0;
        int ret = _FAIL;
+
        pbuf = rtw_get_wpa_ie(&pnetwork->network.IEs[12], &wpa_ielen, pnetwork->network.IELength - 12);
 
        if (pbuf && (wpa_ielen > 0)) {
index c1478cff5854a6de98fead2325804861d9cb2614..8e3721c797c3904cfd8bbb0290f5b58983226da0 100644 (file)
@@ -40,6 +40,7 @@ void BlinkTimerCallback(unsigned long data)
 void BlinkWorkItemCallback(struct work_struct *work)
 {
        struct LED_871x *pLed = container_of(work, struct LED_871x, BlinkWorkItem);
+
        BlinkHandler(pLed);
 }
 
index 032f783b0d83a8be86ab7609349da6c331158038..a71928952eca6599b8719f2ae42f586502ebe45e 100644 (file)
@@ -659,6 +659,7 @@ void rtw_surveydone_event_callback(struct adapter   *adapter, u8 *pbuf)
                        }
                } else {
                        int s_ret;
+
                        set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
                        pmlmepriv->to_join = false;
                        s_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv);
@@ -1256,6 +1257,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
 
        if (mac_id >= 0) {
                u16 media_status;
+
                media_status = (mac_id<<8)|0; /*   MACID|OPMODE:0 means disconnect */
                /* for STA, AP, ADHOC mode, report disconnect stauts to FW */
                rtw_hal_set_hwreg(adapter, HW_VAR_H2C_MEDIA_STATUS_RPT, (u8 *)&media_status);
@@ -1542,6 +1544,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
        rtw_hal_get_def_var(adapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(supp_ant_div));
        if (supp_ant_div) {
                u8 cur_ant;
+
                rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(cur_ant));
                DBG_88E("#### Opt_Ant_(%s), cur_Ant(%s)\n",
                        (2 == candidate->network.PhyInfo.Optimum_antenna) ? "A" : "B",
index d9c114776cab11f4adc6aa1dd7a1f2404ba3678d..3c5325c32fc8196baea77c681fcb7b4db7479273 100644 (file)
@@ -147,6 +147,7 @@ static const struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {
 int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)
 {
        int i;
+
        for (i = 0; ch_set[i].ChannelNum != 0; i++) {
                if (ch == ch_set[i].ChannelNum)
                        break;
@@ -371,6 +372,7 @@ static void issue_beacon(struct adapter *padapter, int timeout_ms)
                u8 *wps_ie;
                uint wps_ielen;
                u8 sr = 0;
+
                memcpy(pframe, cur_network->IEs, cur_network->IELength);
                len_diff = update_hidden_ssid(
                        pframe+_BEACON_IE_OFFSET_
@@ -829,6 +831,7 @@ static void issue_auth(struct adapter *padapter, struct sta_info *psta,
        } else {
                __le32 le_tmp32;
                __le16 le_tmp16;
+
                ether_addr_copy(pwlanhdr->addr1, pnetwork->MacAddress);
                ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
                ether_addr_copy(pwlanhdr->addr3, pnetwork->MacAddress);
@@ -1963,6 +1966,7 @@ static void site_survey(struct adapter *padapter)
 
                if (ScanType == SCAN_ACTIVE) { /* obey the channel plan setting... */
                        int i;
+
                        for (i = 0; i < RTW_SSID_SCAN_AMOUNT; i++) {
                                if (pmlmeext->sitesurvey_res.ssid[i].SsidLength) {
                                        /* todo: to issue two probe req??? */
@@ -2155,6 +2159,7 @@ static u8 collect_bss_info(struct adapter *padapter,
                p = rtw_get_ie(bssid->IEs + ie_offset, _HT_ADD_INFO_IE_, &len, bssid->IELength - ie_offset);
                if (p) {
                        struct HT_info_element *HT_info = (struct HT_info_element *)(p + 2);
+
                        bssid->Configuration.DSConfig = HT_info->primary_channel;
                } else { /*  use current channel */
                        bssid->Configuration.DSConfig = rtw_get_oper_ch(padapter);
@@ -2192,6 +2197,7 @@ static u8 collect_bss_info(struct adapter *padapter,
        /* 20/40 BSS Coexistence check */
        if ((pregistrypriv->wifi_spec == 1) && (!pmlmeinfo->bwmode_updated)) {
                struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+
                p = rtw_get_ie(bssid->IEs + ie_offset, _HT_CAPABILITY_IE_, &len, bssid->IELength - ie_offset);
                if (p && len > 0) {
                        struct ieee80211_ht_cap *pHT_caps =
@@ -2218,6 +2224,7 @@ static void start_create_ibss(struct adapter *padapter)
        struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info    *pmlmeinfo = &(pmlmeext->mlmext_info);
        struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)(&(pmlmeinfo->network));
+
        pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig;
        pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork);
 
@@ -3747,8 +3754,8 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
        u8 *pframe = precv_frame->rx_data;
        u8 *frame_body;
        u8 dialogToken = 0;
-       frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
 
+       frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
        dialogToken = frame_body[7];
 
        if (rtw_action_public_decache(precv_frame, dialogToken) == _FAIL)
@@ -4671,6 +4678,7 @@ void _linked_rx_signal_strehgth_display(struct adapter *padapter)
       struct mlme_ext_info    *pmlmeinfo = &(pmlmeext->mlmext_info);
        u8 mac_id;
        int UndecoratedSmoothedPWDB;
+
        if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
                mac_id = 0;
        else if ((pmlmeinfo->state&0x03) == _HW_STATE_AP_)
index 4032121a06f36c82c943b26208940af219204215..5e439c1e12bbaf71243034433ae3c8807d14114a 100644 (file)
@@ -279,6 +279,7 @@ exit:
 static void pwr_state_check_handler(unsigned long data)
 {
        struct adapter *padapter = (struct adapter *)data;
+
        rtw_ps_cmd(padapter);
 }
 
index 3e6edb63d36b5db9d62c8d4ba58fff333403d236..301285a92e73bb6b05db214c20796cefb1fb1d83 100644 (file)
@@ -211,6 +211,7 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
 {
        u32 cnt = 0;
        struct recv_frame *pending_frame;
+
        while ((pending_frame = rtw_alloc_recvframe(&adapter->recvpriv.uc_swdec_pending_queue))) {
                rtw_free_recvframe(pending_frame, &adapter->recvpriv.free_recv_queue);
                DBG_88E("%s: dequeue uc_swdec_pending_queue\n", __func__);
@@ -296,6 +297,7 @@ static int recvframe_chkmic(struct adapter *adapter,
                                         *(pframemic-10), *(pframemic-9)));
                                {
                                        uint i;
+
                                        RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
                                                 ("\n ======demp packet (len=%d)======\n",
                                                 precvframe->len));
@@ -373,6 +375,7 @@ static struct recv_frame *decryptor(struct adapter *padapter,
 
        if (prxattrib->encrypt > 0) {
                u8 *iv = precv_frame->rx_data+prxattrib->hdrlen;
+
                prxattrib->key_index = (((iv[3])>>6)&0x3);
 
                if (prxattrib->key_index > WEP_KEYS) {
@@ -880,6 +883,7 @@ static int sta2ap_data_frame(struct adapter *adapter,
                }
        } else {
                u8 *myhwaddr = myid(&adapter->eeprompriv);
+
                if (memcmp(pattrib->ra, myhwaddr, ETH_ALEN)) {
                        ret = RTW_RX_HANDLED;
                        goto exit;
@@ -1197,6 +1201,7 @@ static int validate_recv_frame(struct adapter *adapter,
 
        if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
                int ch_set_idx = rtw_ch_set_search_ch(pmlmeext->channel_set, rtw_get_oper_ch(adapter));
+
                if (ch_set_idx >= 0)
                        pmlmeext->channel_set[ch_set_idx].rx_count++;
        }
@@ -1265,6 +1270,7 @@ static int validate_recv_frame(struct adapter *adapter,
                retval = validate_recv_data_frame(adapter, precv_frame);
                if (retval == _FAIL) {
                        struct recv_priv *precvpriv = &adapter->recvpriv;
+
                        precvpriv->rx_drop++;
                }
                break;
@@ -1466,6 +1472,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter,
        psta = rtw_get_stainfo(pstapriv, psta_addr);
        if (psta == NULL) {
                u8 type = GetFrameType(pfhdr->rx_data);
+
                if (type != WIFI_DATA_TYPE) {
                        psta = rtw_get_bcmc_stainfo(padapter);
                        pdefrag_q = &psta->sta_recvpriv.defrag_q;
@@ -1548,8 +1555,8 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
        struct sk_buff *sub_skb, *subframes[MAX_SUBFRAME_COUNT];
        struct recv_priv *precvpriv = &padapter->recvpriv;
        struct __queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
-       nr_subframes = 0;
 
+       nr_subframes = 0;
        pattrib = &prframe->attrib;
 
        recvframe_pull(prframe, prframe->attrib.hdrlen);
index 85bb441a7214d88234d76aca58994aa95a9af374..775ab732e103a9f5ab8efd137605a90b3292fb6a 100644 (file)
@@ -36,6 +36,7 @@ static void arcfour_init(struct arc4context *parc4ctx, u8 *key, u32   key_len)
        u32     stateindex;
        u8 *state;
        u32     counter;
+
        state = parc4ctx->state;
        parc4ctx->x = 0;
        parc4ctx->y = 0;
@@ -60,6 +61,7 @@ static u32 arcfour_byte(struct arc4context *parc4ctx)
        u32 y;
        u32 sx, sy;
        u8 *state;
+
        state = parc4ctx->state;
        x = (parc4ctx->x + 1) & 0xff;
        sx = state[x];
@@ -75,6 +77,7 @@ static u32 arcfour_byte(struct arc4context *parc4ctx)
 static void arcfour_encrypt(struct arc4context *parc4ctx, u8 *dest, u8 *src, u32 len)
 {
        u32     i;
+
        for (i = 0; i < len; i++)
                dest[i] = src[i] ^ (unsigned char)arcfour_byte(parc4ctx);
 }
@@ -120,6 +123,7 @@ static __le32 getcrc32(u8 *buf, int len)
 {
        u8 *p;
        u32  crc;
+
        if (bcrc32initialized == 0)
                crc32_init();
 
@@ -242,6 +246,7 @@ static u32 secmicgetuint32(u8 *p)
 {
        s32 i;
        u32 res = 0;
+
        for (i = 0; i < 4; i++)
                res |= ((u32)(*p++)) << (8*i);
        return res;
@@ -251,6 +256,7 @@ static void secmicputuint32(u8 *p, u32 val)
 /*  Convert from Us3232 to Byte[] in a portable way */
 {
        long i;
+
        for (i = 0; i < 4; i++) {
                *p++ = (u8)(val & 0xff);
                val >>= 8;
@@ -328,6 +334,7 @@ void rtw_seccalctkipmic(u8 *key, u8 *header, u8 *data, u32 data_len, u8 *mic_cod
 {
        struct mic_data micdata;
        u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
+
        rtw_secmicsetkey(&micdata, key);
        priority[0] = pri;
 
@@ -776,6 +783,7 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext);
 static void xor_128(u8 *a, u8 *b, u8 *out)
 {
        int i;
+
        for (i = 0; i < 16; i++)
                out[i] = a[i] ^ b[i];
 }
@@ -783,6 +791,7 @@ static void xor_128(u8 *a, u8 *b, u8 *out)
 static void xor_32(u8 *a, u8 *b, u8 *out)
 {
        int i;
+
        for (i = 0; i < 4; i++)
                out[i] = a[i] ^ b[i];
 }
@@ -800,6 +809,7 @@ static void next_key(u8 *key, int round)
                0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
                0x1b, 0x36, 0x36, 0x36
        };
+
        sbox_key[0] = sbox(key[13]);
        sbox_key[1] = sbox(key[14]);
        sbox_key[2] = sbox(key[15]);
@@ -853,6 +863,7 @@ static void mix_column(u8 *in, u8 *out)
        u8 rotr[4];
        u8 temp[4];
        u8 tempb[4];
+
        for (i = 0 ; i < 4; i++) {
                if ((in[i] & 0x80) == 0x80)
                        add1b[i] = 0x1b;
@@ -905,6 +916,7 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
        u8 intermediatea[16];
        u8 intermediateb[16];
        u8 round_key[16];
+
        for (i = 0; i < 16; i++)
                round_key[i] = key[i];
        for (round = 0; round < 11; round++) {
@@ -936,6 +948,7 @@ static void construct_mic_iv(u8 *mic_iv, int qc_exists, int a4_exists, u8 *mpdu,
                             uint payload_length, u8 *pn_vector)
 {
        int i;
+
        mic_iv[0] = 0x59;
        if (qc_exists && a4_exists)
                mic_iv[1] = mpdu[30] & 0x0f;    /* QoS_TC          */
@@ -984,6 +997,7 @@ static void construct_mic_header1(u8 *mic_header1, int header_length, u8 *mpdu)
 static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists, int qc_exists)
 {
        int i;
+
        for (i = 0; i < 16; i++)
                mic_header2[i] = 0x00;
 
@@ -1025,6 +1039,7 @@ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists, int
 static void construct_ctr_preload(u8 *ctr_preload, int a4_exists, int qc_exists, u8 *mpdu, u8 *pn_vector, int c)
 {
        int i;
+
        for (i = 0; i < 16; i++)
                ctr_preload[i] = 0x00;
        i = 0;
@@ -1050,6 +1065,7 @@ static void construct_ctr_preload(u8 *ctr_preload, int a4_exists, int qc_exists,
 static void bitwise_xor(u8 *ina, u8 *inb, u8 *out)
 {
        int i;
+
        for (i = 0; i < 16; i++)
                out[i] = ina[i] ^ inb[i];
 }
@@ -1256,6 +1272,7 @@ static int aes_decipher(u8 *key, uint     hdrlen,
        uint    qc_exists, a4_exists, i, j, payload_remainder,
                        num_blocks, payload_index;
        int res = _SUCCESS;
+
        u8 pn_vector[6];
        u8 mic_iv[16];
        u8 mic_header1[16];
@@ -1452,6 +1469,7 @@ u32       rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
        struct  rx_pkt_attrib    *prxattrib = &((struct recv_frame *)precvframe)->attrib;
        struct  security_priv   *psecuritypriv = &padapter->securitypriv;
        u32     res = _SUCCESS;
+
        pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data;
        /* 4 start to encrypt each fragment */
        if (prxattrib->encrypt == _AES_) {
index 941d1a069d2057af17b2de58266432ba3eb30429..2ecfb117bf3f7ff29a5f5d8fa3b8f1da81593569 100644 (file)
@@ -154,6 +154,7 @@ u32 _rtw_free_sta_priv(struct       sta_priv *pstapriv)
 
                        while (phead != plist) {
                                int i;
+
                                psta = container_of(plist, struct sta_info,
                                                    hash_list);
                                plist = plist->next;
index 2a65ac70212955fac783f0e217e122357c679f7b..f6f1b09466a850aace63e0a31342767fc2b4785a 100644 (file)
@@ -379,6 +379,7 @@ int get_bsstype(unsigned short capability)
 u16 get_beacon_interval(struct wlan_bssid_ex *bss)
 {
        __le16 val;
+
        memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
 
        return le16_to_cpu(val);
@@ -1306,6 +1307,7 @@ void set_sta_rate(struct adapter *padapter, struct sta_info *psta)
 void update_tx_basic_rate(struct adapter *padapter, u8 wirelessmode)
 {
        unsigned char supported_rates[NDIS_802_11_LENGTH_RATES_EX];
+
        memset(supported_rates, 0, NDIS_802_11_LENGTH_RATES_EX);
 
        if ((wirelessmode & WIRELESS_11B) && (wirelessmode == WIRELESS_11B))
@@ -1330,6 +1332,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
        struct ndis_802_11_var_ie *pIE;
        u8      epigram_vendor_flag;
        u8      ralink_vendor_flag;
+
        epigram_vendor_flag = 0;
        ralink_vendor_flag = 0;
 
index b60b126b860e3b95f2c283dc295561b1bdfc6470..c99c3c1ae0bf0e08089dd156dfe711c6258ef06a 100644 (file)
@@ -304,6 +304,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
                        /* check HT op mode */
                        if (pattrib->ht_en) {
                                u8 htopmode = pmlmeinfo->HT_protection;
+
                                if ((pmlmeext->cur_bwmode && (htopmode == 2 || htopmode == 3)) ||
                                    (!pmlmeext->cur_bwmode && htopmode == 3)) {
                                        pattrib->vcs_mode = RTS_CTS;
@@ -454,6 +455,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
                /*  The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */
                /*  to prevent DHCP protocol fail */
                u8 tmp[24];
+
                _rtw_pktfile_read(&pktfile, &tmp[0], 24);
                pattrib->dhcp_pkt = 0;
                if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */
@@ -1605,6 +1607,7 @@ void rtw_free_hwxmits(struct adapter *padapter)
 void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry)
 {
        int i;
+
        for (i = 0; i < entry; i++, phwxmit++)
                phwxmit->accnt = 0;
 }