From bef611a92ee2d107365cf77e3665ce91d4f08da2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Beamonte?= Date: Fri, 9 Sep 2016 11:31:45 -0400 Subject: [PATCH] staging: rtl8712: checkpatch cleanup: block comments using a trailing */ MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix checkpatch.pl warning "Block comments use a trailing */ on a separate line" on multiple files of the driver by editing the affected comments. Signed-off-by: Raphaël Beamonte Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/rtl8712_led.c | 12 ++++-- drivers/staging/rtl8712/rtl8712_recv.c | 54 ++++++++++++++++--------- drivers/staging/rtl8712/rtl8712_recv.h | 3 +- drivers/staging/rtl8712/rtl8712_spec.h | 3 +- drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h | 27 ++++++++----- drivers/staging/rtl8712/rtl8712_xmit.c | 9 +++-- drivers/staging/rtl8712/rtl871x_cmd.h | 9 +++-- drivers/staging/rtl8712/rtl871x_ht.h | 3 +- drivers/staging/rtl8712/rtl871x_ioctl.h | 3 +- drivers/staging/rtl8712/rtl871x_ioctl_set.c | 12 ++++-- drivers/staging/rtl8712/rtl871x_led.h | 15 ++++--- drivers/staging/rtl8712/rtl871x_mlme.c | 30 +++++++++----- drivers/staging/rtl8712/rtl871x_mlme.h | 12 ++++-- drivers/staging/rtl8712/rtl871x_mp.c | 3 +- drivers/staging/rtl8712/rtl871x_mp.h | 3 +- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 39 ++++++++++++------ drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h | 33 ++++++++++----- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 3 +- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 3 +- drivers/staging/rtl8712/rtl871x_recv.c | 24 +++++++---- drivers/staging/rtl8712/rtl871x_recv.h | 9 +++-- drivers/staging/rtl8712/rtl871x_security.h | 24 +++++++---- drivers/staging/rtl8712/rtl871x_sta_mgt.c | 3 +- drivers/staging/rtl8712/rtl871x_xmit.c | 18 ++++++--- drivers/staging/rtl8712/rtl871x_xmit.h | 12 ++++-- drivers/staging/rtl8712/usb_halinit.c | 3 +- drivers/staging/rtl8712/usb_intf.c | 12 ++++-- drivers/staging/rtl8712/wifi.h | 15 ++++--- drivers/staging/rtl8712/wlan_bssdef.h | 6 ++- 29 files changed, 268 insertions(+), 134 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c index 9055827..76d0535 100644 --- a/drivers/staging/rtl8712/rtl8712_led.c +++ b/drivers/staging/rtl8712/rtl8712_led.c @@ -58,10 +58,12 @@ enum _LED_STATE_871x { LED_POWER_ON_BLINK = 5, LED_SCAN_BLINK = 6, /* LED is blinking during scanning period, * the # of times to blink is depend on time - * for scanning. */ + * for scanning. + */ LED_NO_LINK_BLINK = 7, /* LED is blinking during no link state. */ LED_BLINK_StartToBlink = 8,/* Customized for Sercomm Printer - * Server case */ + * Server case + */ LED_BLINK_WPS = 9, /* LED is blinkg during WPS communication */ LED_TXRX_BLINK = 10, LED_BLINK_WPS_STOP = 11, /*for ALPHA */ @@ -110,7 +112,8 @@ static void DeInitLed871x(struct LED_871x *pLed) { del_timer_sync(&pLed->BlinkTimer); /* We should reset bLedBlinkInProgress if we cancel - * the LedControlTimer, */ + * the LedControlTimer, + */ pLed->bLedBlinkInProgress = false; } @@ -827,7 +830,8 @@ static void BlinkTimerCallback(unsigned long data) struct LED_871x *pLed = (struct LED_871x *)data; /* This fixed the crash problem on Fedora 12 when trying to do the - * insmod;ifconfig up;rmmod commands. */ + * insmod;ifconfig up;rmmod commands. + */ if (pLed->padapter->bSurpriseRemoved || pLed->padapter->bDriverStopped) return; schedule_work(&pLed->BlinkWorkItem); diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index f25b34c..4027d1a 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c @@ -163,7 +163,8 @@ static void update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib, drvinfo_sz = (le32_to_cpu(prxstat->rxdw0) & 0x000f0000) >> 16; drvinfo_sz <<= 3; /*TODO: - * Offset 0 */ + * Offset 0 + */ pattrib->bdecrypted = ((le32_to_cpu(prxstat->rxdw0) & BIT(27)) >> 27) ? 0 : 1; pattrib->crc_err = (le32_to_cpu(prxstat->rxdw0) & BIT(14)) >> 14; @@ -210,7 +211,8 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, curfragnum = 0; if (curfragnum != pfhdr->attrib.frag_num) { /*the first fragment number must be 0 - *free the whole queue*/ + *free the whole queue + */ r8712_free_recvframe(prframe, pfree_recv_queue); r8712_free_recvframe_queue(defrag_q, pfree_recv_queue); return NULL; @@ -224,18 +226,21 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, /*check the fragment sequence (2nd ~n fragment frame) */ if (curfragnum != pnfhdr->attrib.frag_num) { /* the fragment number must increase (after decache) - * release the defrag_q & prframe */ + * release the defrag_q & prframe + */ r8712_free_recvframe(prframe, pfree_recv_queue); r8712_free_recvframe_queue(defrag_q, pfree_recv_queue); return NULL; } curfragnum++; /* copy the 2nd~n fragment frame's payload to the first fragment - * get the 2nd~last fragment frame's payload */ + * get the 2nd~last fragment frame's payload + */ wlanhdr_offset = pnfhdr->attrib.hdrlen + pnfhdr->attrib.iv_len; recvframe_pull(pnextrframe, wlanhdr_offset); /* append to first fragment frame's tail (if privacy frame, - * pull the ICV) */ + * pull the ICV) + */ recvframe_pull_tail(prframe, pfhdr->attrib.icv_len); memcpy(pfhdr->rx_tail, pnfhdr->rx_data, pnfhdr->len); recvframe_put(prframe, pnfhdr->len); @@ -278,7 +283,8 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter, prtnframe = precv_frame;/*isn't a fragment frame*/ if (ismfrag == 1) { /* 0~(n-1) fragment frame - * enqueue to defraf_g */ + * enqueue to defraf_g + */ if (pdefrag_q != NULL) { if (fragnum == 0) { /*the first fragment*/ @@ -294,7 +300,8 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter, prtnframe = NULL; } else { /* can't find this ta's defrag_queue, so free this - * recv_frame */ + * recv_frame + */ r8712_free_recvframe(precv_frame, pfree_recv_queue); prtnframe = NULL; } @@ -302,7 +309,8 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter, } if ((ismfrag == 0) && (fragnum != 0)) { /* the last fragment frame - * enqueue the last fragment */ + * enqueue the last fragment + */ if (pdefrag_q != NULL) { phead = &pdefrag_q->queue; list_add_tail(&pfhdr->list, phead); @@ -311,7 +319,8 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter, prtnframe = precv_frame; } else { /* can't find this ta's defrag_queue, so free this - * recv_frame */ + * recv_frame + */ r8712_free_recvframe(precv_frame, pfree_recv_queue); prtnframe = NULL; } @@ -391,7 +400,8 @@ static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe) eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || !memcmp(sub_skb->data, bridge_tunnel_header, SNAP_SIZE))) { /* remove RFC1042 or Bridge-Tunnel encapsulation and - * replace EtherType */ + * replace EtherType + */ skb_pull(sub_skb, SNAP_SIZE); memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN); @@ -530,7 +540,8 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter, preorder_ctrl->indicate_seq = pattrib->seq_num; } /* Prepare indication list and indication. - * Check if there is any packet need indicate. */ + * Check if there is any packet need indicate. + */ while (!list_empty(phead)) { prframe = container_of(plist, union recv_frame, u.list); pattrib = &prframe->u.hdr.attrib; @@ -757,7 +768,8 @@ static void query_rx_phy_status(struct _adapter *padapter, /* Modify the RF RNA gain value to -40, -20, * -2, 14 by Jenyu's suggestion * Note: different RF with the different - * RNA gain. */ + * RNA gain. + */ case 0x3: rx_pwr_all = -40 - (pcck_buf->cck_agc_rpt & 0x3e); @@ -842,7 +854,8 @@ static void query_rx_phy_status(struct _adapter *padapter, total_rssi += rssi; } /* (2)PWDB, Average PWDB cacluated by hardware (for - * rate adaptive) */ + * rate adaptive) + */ rx_pwr_all = (((pphy_head[PHY_STAT_PWDB_ALL_SHT]) >> 1) & 0x7f) - 106; pwdb_all = query_rx_pwr_percentage(rx_pwr_all); @@ -870,7 +883,8 @@ static void query_rx_phy_status(struct _adapter *padapter, } /* UI BSS List signal strength(in percentage), make it good looking, * from 0~100. It is assigned to the BSS List in - * GetValueFromBeaconOrProbeRsp(). */ + * GetValueFromBeaconOrProbeRsp(). + */ if (bcck_rate) prframe->u.hdr.attrib.signal_strength = (u8)r8712_signal_scale_mapping(pwdb_all); @@ -1027,10 +1041,12 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb) transfer_len = pskb->len; /* Test throughput with Netgear 3700 (No security) with Chariot 3T3R * pairs. The packet count will be a big number so that the containing - * packet will effect the Rx reordering. */ + * packet will effect the Rx reordering. + */ if (transfer_len < pkt_len) { /* In this case, it means the MAX_RECVBUF_SZ is too small to - * get the data from 8712u. */ + * get the data from 8712u. + */ return _FAIL; } do { @@ -1057,14 +1073,16 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb) tmp_len = pkt_len + drvinfo_sz + RXDESC_SIZE; pkt_offset = (u16)round_up(tmp_len, 128); /* for first fragment packet, driver need allocate 1536 + - * drvinfo_sz + RXDESC_SIZE to defrag packet. */ + * drvinfo_sz + RXDESC_SIZE to defrag packet. + */ if ((mf == 1) && (frag == 0)) /*1658+6=1664, 1664 is 128 alignment.*/ alloc_sz = max_t(u16, tmp_len, 1658); else alloc_sz = tmp_len; /* 2 is for IP header 4 bytes alignment in QoS packet case. - * 4 is for skb->data 4 bytes alignment. */ + * 4 is for skb->data 4 bytes alignment. + */ alloc_sz += 6; pkt_copy = netdev_alloc_skb(padapter->pnetdev, alloc_sz); if (pkt_copy) { diff --git a/drivers/staging/rtl8712/rtl8712_recv.h b/drivers/staging/rtl8712/rtl8712_recv.h index 925ec74..96ca3e2 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.h +++ b/drivers/staging/rtl8712/rtl8712_recv.h @@ -61,7 +61,8 @@ struct recv_stat { struct phy_cck_rx_status { /* For CCK rate descriptor. This is a unsigned 8:1 variable. * LSB bit present 0.5. And MSB 7 bts present a signed value. - * Range from -64~+63.5. */ + * Range from -64~+63.5. + */ u8 adc_pwdb_X[4]; u8 sq_rpt; u8 cck_agc_rpt; diff --git a/drivers/staging/rtl8712/rtl8712_spec.h b/drivers/staging/rtl8712/rtl8712_spec.h index af11b44..51e0428 100644 --- a/drivers/staging/rtl8712/rtl8712_spec.h +++ b/drivers/staging/rtl8712/rtl8712_spec.h @@ -83,7 +83,8 @@ #define CMD_ADDR_MAPPING_SHIFT 2 /*SDIO CMD ADDR MAPPING, *shift 2 bit for match - * offset[14:2]*/ + * offset[14:2] + */ /*Offset for SDIO LOCAL*/ #define OFFSET_SDIO_LOCAL 0x0FFF diff --git a/drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h b/drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h index eed09c8..2e66d28 100644 --- a/drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h +++ b/drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h @@ -68,11 +68,13 @@ #define SYS_CLKSEL BIT(SYS_CLKSEL_SHT) /* System Clock 80MHz*/ #define PS_CLKSEL_SHT 1 #define PS_CLKSEL BIT(PS_CLKSEL_SHT) /*System power save - * clock select.*/ + * clock select. + */ #define CPU_CLKSEL_SHT 2 #define CPU_CLKSEL BIT(CPU_CLKSEL_SHT) /* System Clock select, * 1: AFE source, - * 0: System clock(L-Bus)*/ + * 0: System clock(L-Bus) + */ #define INT32K_EN_SHT 3 #define INT32K_EN BIT(INT32K_EN_SHT) #define MACSLP_SHT 4 @@ -85,10 +87,12 @@ #define RING_CLK_EN BIT(RING_CLK_EN_SHT) #define SWHW_SEL_SHT 14 #define SWHW_SEL BIT(SWHW_SEL_SHT) /* Load done, - * control path switch.*/ + * control path switch. + */ #define FWHW_SEL_SHT 15 #define FWHW_SEL BIT(FWHW_SEL_SHT) /* Sleep exit, - * control path switch.*/ + * control path switch. + */ /*9346CR*/ #define _VPDIDX_MSK 0xFF00 @@ -118,10 +122,12 @@ #define AFE_MISC_E32_EN BIT(AFE_MISC_E32_EN_SHT) #define AFE_MISC_MBEN_SHT 1 #define AFE_MISC_MBEN BIT(AFE_MISC_MBEN_SHT)/* Enable AFE Macro - * Block's Mbias.*/ + * Block's Mbias. + */ #define AFE_MISC_BGEN_SHT 0 #define AFE_MISC_BGEN BIT(AFE_MISC_BGEN_SHT)/* Enable AFE Macro - * Block's Bandgap.*/ + * Block's Bandgap. + */ /*--------------------------------------------------------------------------*/ @@ -149,10 +155,12 @@ /* EFUSE_CTRL*/ #define EF_FLAG BIT(31) /* Access Flag, Write:1; - * Read:0*/ + * Read:0 + */ #define EF_PGPD 0x70000000 /* E-fuse Program time*/ #define EF_RDT 0x0F000000 /* E-fuse read time: in the - * unit of cycle time*/ + * unit of cycle time + */ #define EF_PDN_EN BIT(19) /* EFuse Power down enable*/ #define ALD_EN BIT(18) /* Autoload Enable*/ #define EF_ADDR 0x0003FF00 /* Access Address*/ @@ -164,7 +172,8 @@ /* EFUSE_CLK_CTRL*/ #define EFUSE_CLK_EN BIT(1) /* E-Fuse Clock Enable*/ #define EFUSE_CLK_SEL BIT(0) /* E-Fuse Clock Select, - * 0:500K, 1:40M*/ + * 0:500K, 1:40M + */ #endif /*__RTL8712_SYSCFG_BITDEF_H__*/ diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c index 7e0b945..4bbf76f 100644 --- a/drivers/staging/rtl8712/rtl8712_xmit.c +++ b/drivers/staging/rtl8712/rtl8712_xmit.c @@ -535,7 +535,8 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz) * seqnum per tid. about usb using 4-endpoint, qsel points out * the correct mapping between AC&Endpoint, * the purpose is that correct mapping lets the MAC release - * the AC Queue list correctly. */ + * the AC Queue list correctly. + */ ptxdesc->txdw3 = cpu_to_le32((pattrib->priority << SEQ_SHT) & 0x0fff0000); if ((pattrib->ether_type != 0x888e) && @@ -586,7 +587,8 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz) * per tid. about usb using 4-endpoint, qsel points out the * correct mapping between AC&Endpoint, * the purpose is that correct mapping let the MAC releases - * the AC Queue list correctly. */ + * the AC Queue list correctly. + */ ptxdesc->txdw3 = cpu_to_le32((pattrib->priority << SEQ_SHT) & 0x0fff0000); /* offset 16 */ @@ -686,7 +688,8 @@ int r8712_xmitframe_complete(struct _adapter *padapter, res = r8712_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe); /* always return ndis_packet after - * r8712_xmitframe_coalesce */ + * r8712_xmitframe_coalesce + */ r8712_xmit_complete(padapter, pxmitframe); } if (res == _SUCCESS) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h index ebd2e1d..a2cee36 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.h +++ b/drivers/staging/rtl8712/rtl871x_cmd.h @@ -185,10 +185,12 @@ struct setauth_parm { */ struct setkey_parm { u8 algorithm; /* encryption algorithm, could be none, wep40, - * TKIP, CCMP, wep104 */ + * TKIP, CCMP, wep104 + */ u8 keyid; u8 grpkey; /* 1: this is the grpkey for 802.1x. - * 0: this is the unicast key for 802.1x */ + * 0: this is the unicast key for 802.1x + */ u8 key[16]; /* this could be 40 or 104 */ }; @@ -570,7 +572,8 @@ struct setpwrmode_parm { u8 bcn_rx_en; u8 bcn_pass_cnt; /* fw report one beacon information to * driver when it receives bcn_pass_cnt - * beacons. */ + * beacons. + */ u8 bcn_to; /* beacon TO (ms). ¡§=0¡¨ no limit.*/ u16 bcn_itv; u8 app_itv; /* only for VOIP mode. */ diff --git a/drivers/staging/rtl8712/rtl871x_ht.h b/drivers/staging/rtl8712/rtl871x_ht.h index 41872d9..513f458 100644 --- a/drivers/staging/rtl8712/rtl871x_ht.h +++ b/drivers/staging/rtl8712/rtl871x_ht.h @@ -36,7 +36,8 @@ struct ht_priv { unsigned int tx_amsdu_enable;/*for enable Tx A-MSDU */ unsigned int tx_amdsu_maxlen; /* 1: 8k, 0:4k ; default:8k, for tx */ unsigned int rx_ampdu_maxlen; /* for rx reordering ctrl win_sz, - * updated when join_callback. */ + * updated when join_callback. + */ struct ieee80211_ht_cap ht_cap; }; diff --git a/drivers/staging/rtl8712/rtl871x_ioctl.h b/drivers/staging/rtl8712/rtl871x_ioctl.h index c9218be..08bcb3b 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl.h +++ b/drivers/staging/rtl8712/rtl871x_ioctl.h @@ -68,7 +68,8 @@ struct oid_par_priv { struct oid_obj_priv { unsigned char dbg; /* 0: without OID debug message - * 1: with OID debug message */ + * 1: with OID debug message + */ uint (*oidfuns)(struct oid_par_priv *poid_par_priv); }; diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/drivers/staging/rtl8712/rtl871x_ioctl_set.c index 56760cd..0aaf2aa 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_set.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_set.c @@ -140,7 +140,8 @@ u8 r8712_set_802_11_bssid(struct _adapter *padapter, u8 *bssid) ETH_ALEN)) { if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) goto _Abort_Set_BSSID; /* driver is in - * WIFI_ADHOC_MASTER_STATE */ + * WIFI_ADHOC_MASTER_STATE + */ } else { r8712_disassoc_cmd(padapter); if (check_fwstate(pmlmepriv, _FW_LINKED)) @@ -203,7 +204,8 @@ void r8712_set_802_11_ssid(struct _adapter *padapter, } } else { goto _Abort_Set_SSID; /* driver is in - * WIFI_ADHOC_MASTER_STATE */ + * WIFI_ADHOC_MASTER_STATE + */ } } } else { @@ -254,12 +256,14 @@ void r8712_set_802_11_infrastructure_mode(struct _adapter *padapter, (*pold_state == Ndis802_11IBSS)) { /* will clr Linked_state before this function, * we must have checked whether issue dis-assoc_cmd or - * not */ + * not + */ r8712_ind_disconnect(padapter); } *pold_state = networktype; /* clear WIFI_STATION_STATE; WIFI_AP_STATE; WIFI_ADHOC_STATE; - * WIFI_ADHOC_MASTER_STATE */ + * WIFI_ADHOC_MASTER_STATE + */ _clr_fwstate_(pmlmepriv, WIFI_STATION_STATE | WIFI_AP_STATE | WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE); switch (networktype) { diff --git a/drivers/staging/rtl8712/rtl871x_led.h b/drivers/staging/rtl8712/rtl871x_led.h index eb61205..adfbc40 100644 --- a/drivers/staging/rtl8712/rtl871x_led.h +++ b/drivers/staging/rtl8712/rtl871x_led.h @@ -72,14 +72,17 @@ enum LED_STRATEGY_871x { SW_LED_MODE0, /* SW control 1 LED via GPIO0. It is default option. */ SW_LED_MODE1, /* 2 LEDs, through LED0 and LED1. For ALPHA. */ SW_LED_MODE2, /* SW control 1 LED via GPIO0, - * custom for AzWave 8187 minicard. */ + * custom for AzWave 8187 minicard. + */ SW_LED_MODE3, /* SW control 1 LED via GPIO0, - * customized for Sercomm Printer Server case.*/ + * customized for Sercomm Printer Server case. + */ SW_LED_MODE4, /*for Edimax / Belkin*/ SW_LED_MODE5, /*for Sercomm / Belkin*/ SW_LED_MODE6, /*for WNC / Corega*/ HW_LED, /* HW control 2 LEDs, LED0 and LED1 (there are 4 different - * control modes, see MAC.CONFIG1 for details.)*/ + * control modes, see MAC.CONFIG1 for details.) + */ }; struct LED_871x { @@ -96,7 +99,8 @@ struct LED_871x { u8 bLedWPSBlinkInProgress; u32 BlinkTimes; /* No. times to toggle for blink.*/ u32 BlinkingLedState; /* Next state for blinking, - * either LED_ON or OFF.*/ + * either LED_ON or OFF. + */ struct timer_list BlinkTimer; /* Timer object for led blinking.*/ struct work_struct BlinkWorkItem; /* Workitem used by BlinkTimer */ @@ -115,7 +119,8 @@ struct led_priv { /*=========================================================================== * Interface to manipulate LED objects. - *===========================================================================*/ + *=========================================================================== + */ void r8712_InitSwLeds(struct _adapter *padapter); void r8712_DeInitSwLeds(struct _adapter *padapter); void LedControl871x(struct _adapter *padapter, enum LED_CTL_MODE LedAction); diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index 772bf9f..c1feef3 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -403,7 +403,8 @@ static void update_scanned_network(struct _adapter *adapter, /* If we didn't find a match, then get a new network slot to initialize - * with this beacon's information */ + * with this beacon's information + */ if (end_of_queue_search(phead, plist)) { if (list_empty(&pmlmepriv->free_bss_pool.queue)) { /* If there are no more slots, expire the oldest */ @@ -926,7 +927,8 @@ void r8712_stassoc_event_callback(struct _adapter *adapter, u8 *pbuf) if (psta != NULL) { /*the sta have been in sta_info_queue => do nothing *(between drv has received this event before and - * fw have not yet to set key to CAM_ENTRY) */ + * fw have not yet to set key to CAM_ENTRY) + */ return; } @@ -1171,7 +1173,8 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv) pmlmepriv->assoc_ssid.SsidLength))) { if (pmlmepriv->assoc_by_rssi) { /* if the ssid is the same, select the bss - * which has the max rssi*/ + * which has the max rssi + */ if (pnetwork_max_rssi) { if (pnetwork->network.Rssi > pnetwork_max_rssi->network.Rssi) @@ -1352,7 +1355,8 @@ static int SecIsInPMKIDList(struct _adapter *Adapter, u8 *bssid) i = -1; /* Could not find. */ } else { ; /* There is one Pre-Authentication Key for the - * specific BSSID. */ + * specific BSSID. + */ } return i; } @@ -1430,7 +1434,8 @@ sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie, if (match) { if (sec_ie[0] == _WPA_IE_ID_) { /* parsing SSN IE to select required encryption - * algorithm, and set the bc/mc encryption algorithm */ + * algorithm, and set the bc/mc encryption algorithm + */ while (true) { /*check wpa_oui tag*/ if (memcmp(&sec_ie[2], &wpa_oui[0], 4)) { @@ -1444,7 +1449,8 @@ sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie, } if (!memcmp(&sec_ie[8], &wpa_oui[0], 3)) { /* get bc/mc encryption type (group - * key type)*/ + * key type) + */ switch (sec_ie[11]) { case 0x0: /*none*/ psecuritypriv->XGrpPrivacy = @@ -1482,7 +1488,8 @@ sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie, } /*else the uncst_oui is match*/ } else { /*mixed mode, unicast_enc_type > 1*/ /*select the uncst_oui and remove - * the other uncst_oui*/ + * the other uncst_oui + */ cnt = sec_ie[12]; remove_cnt = (cnt - 1) * 4; sec_ie[12] = 0x01; @@ -1499,7 +1506,8 @@ sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie, } if (authmode == _WPA2_IE_ID_) { /* parsing RSN IE to select required encryption - * algorithm, and set the bc/mc encryption algorithm */ + * algorithm, and set the bc/mc encryption algorithm + */ while (true) { if ((sec_ie[2] != 0x01) || (sec_ie[3] != 0x0)) { /*IE Ver error*/ @@ -1543,7 +1551,8 @@ sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie, } /*else the uncst_oui is match*/ } else { /*mixed mode, unicast_enc_type > 1*/ /*select the uncst_oui and remove the - * other uncst_oui*/ + * other uncst_oui + */ cnt = sec_ie[8]; remove_cnt = (cnt - 1) * 4; sec_ie[8] = 0x01; @@ -1667,7 +1676,8 @@ void r8712_joinbss_reset(struct _adapter *padapter) struct ht_priv *phtpriv = &pmlmepriv->htpriv; /* todo: if you want to do something io/reg/hw setting before join_bss, - * please add code here */ + * please add code here + */ phtpriv->ampdu_enable = false;/*reset to disabled*/ for (i = 0; i < 16; i++) phtpriv->baddbareq_issued[i] = false;/*reset it*/ diff --git a/drivers/staging/rtl8712/rtl871x_mlme.h b/drivers/staging/rtl8712/rtl871x_mlme.h index 61e0eb7..ddaaab0 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.h +++ b/drivers/staging/rtl8712/rtl871x_mlme.h @@ -47,16 +47,20 @@ #define WIFI_ADHOC_MASTER_STATE 0x00000040 #define WIFI_UNDER_LINKING 0x00000080 #define WIFI_SITE_MONITOR 0x00000800 /* to indicate the station - * is under site surveying*/ + * is under site surveying + */ #define WIFI_MP_STATE 0x00010000 #define WIFI_MP_CTX_BACKGROUND 0x00020000 /* in cont. tx background*/ #define WIFI_MP_CTX_ST 0x00040000 /* in cont. tx with - * single-tone*/ + * single-tone + */ #define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in cont, tx - * background due to out of skb*/ + * background due to out of skb + */ #define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continuous tx*/ #define WIFI_MP_CTX_CCK_CS 0x00200000 /* in cont, tx with carrier - * suppression*/ + * suppression + */ #define WIFI_MP_LPBK_STATE 0x00400000 #define _FW_UNDER_LINKING WIFI_UNDER_LINKING diff --git a/drivers/staging/rtl8712/rtl871x_mp.c b/drivers/staging/rtl8712/rtl871x_mp.c index 5e4fda1..3c10a2c 100644 --- a/drivers/staging/rtl8712/rtl871x_mp.c +++ b/drivers/staging/rtl8712/rtl871x_mp.c @@ -376,7 +376,8 @@ void r8712_SwitchBandwidth(struct _adapter *pAdapter) /* Use PHY_REG.txt default value. Do not need to change. * Correct the tx power for CCK rate in 40M. * Set Control channel to upper or lower. These settings are - * required only for 40MHz */ + * required only for 40MHz + */ set_bb_reg(pAdapter, rCCK0_System, bCCKSideBand, (HAL_PRIME_CHNL_OFFSET_DONT_CARE >> 1)); set_bb_reg(pAdapter, rOFDM1_LSTF, 0xC00, diff --git a/drivers/staging/rtl8712/rtl871x_mp.h b/drivers/staging/rtl8712/rtl871x_mp.h index 3f3b2e7..8df452e 100644 --- a/drivers/staging/rtl8712/rtl871x_mp.h +++ b/drivers/staging/rtl8712/rtl871x_mp.h @@ -108,7 +108,8 @@ struct mp_priv { unsigned char network_macaddr[6]; /*Testing Flag*/ u32 mode;/*0 for normal type packet, - * 1 for loopback packet (16bytes TXCMD)*/ + * 1 for loopback packet (16bytes TXCMD) + */ sint prev_fw_state; u8 *pallocated_mp_xmitframe_buf; u8 *pmp_xmtframe_buf; diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.h b/drivers/staging/rtl8712/rtl871x_mp_ioctl.h index 8dc8980..1102451 100644 --- a/drivers/staging/rtl8712/rtl871x_mp_ioctl.h +++ b/drivers/staging/rtl8712/rtl871x_mp_ioctl.h @@ -158,28 +158,37 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_00[] = { {1, oid_null_function}, /*0x05 OID_RT_PRO_SET_SCRAMBLER*/ {1, oid_null_function}, /*0x06 OID_RT_PRO_SET_FILTER_BB*/ {1, oid_null_function}, /*0x07 - * OID_RT_PRO_SET_MANUAL_DIVERS_BB*/ + * OID_RT_PRO_SET_MANUAL_DIVERS_BB + */ {1, oid_rt_pro_set_channel_direct_call_hdl}, /*0x08*/ {1, oid_null_function}, /*0x09 - * OID_RT_PRO_SET_SLEEP_MODE_DIRECT_CALL*/ + * OID_RT_PRO_SET_SLEEP_MODE_DIRECT_CALL + */ {1, oid_null_function}, /*0x0A - * OID_RT_PRO_SET_WAKE_MODE_DIRECT_CALL*/ + * OID_RT_PRO_SET_WAKE_MODE_DIRECT_CALL + */ {1, oid_rt_pro_set_continuous_tx_hdl}, /*0x0B - * OID_RT_PRO_SET_TX_CONTINUOUS_DIRECT_CALL*/ + * OID_RT_PRO_SET_TX_CONTINUOUS_DIRECT_CALL + */ {1, oid_rt_pro_set_single_carrier_tx_hdl}, /*0x0C - * OID_RT_PRO_SET_SINGLE_CARRIER_TX_CONTINUOUS*/ + * OID_RT_PRO_SET_SINGLE_CARRIER_TX_CONTINUOUS + */ {1, oid_null_function}, /*0x0D - * OID_RT_PRO_SET_TX_ANTENNA_BB*/ + * OID_RT_PRO_SET_TX_ANTENNA_BB + */ {1, oid_rt_pro_set_antenna_bb_hdl}, /*0x0E*/ {1, oid_null_function}, /*0x0F OID_RT_PRO_SET_CR_SCRAMBLER*/ {1, oid_null_function}, /*0x10 OID_RT_PRO_SET_CR_NEW_FILTER*/ {1, oid_rt_pro_set_tx_power_control_hdl}, /*0x11 - * OID_RT_PRO_SET_TX_POWER_CONTROL*/ + * OID_RT_PRO_SET_TX_POWER_CONTROL + */ {1, oid_null_function}, /*0x12 OID_RT_PRO_SET_CR_TX_CONFIG*/ {1, oid_null_function}, /*0x13 - * OID_RT_PRO_GET_TX_POWER_CONTROL*/ + * OID_RT_PRO_GET_TX_POWER_CONTROL + */ {1, oid_null_function}, /*0x14 - * OID_RT_PRO_GET_CR_SIGNAL_QUALITY*/ + * OID_RT_PRO_GET_CR_SIGNAL_QUALITY + */ {1, oid_null_function}, /*0x15 OID_RT_PRO_SET_CR_SETPOINT*/ {1, oid_null_function}, /*0x16 OID_RT_PRO_SET_INTEGRATOR*/ {1, oid_null_function}, /*0x17 OID_RT_PRO_SET_SIGNAL_QUALITY*/ @@ -203,13 +212,17 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_20[] = { {1, oid_rt_pro_query_rx_packet_received_hdl}, /*0x26*/ {1, oid_rt_pro_query_rx_packet_crc32_error_hdl},/*0x27*/ {1, oid_null_function}, /*0x28 - *OID_RT_PRO_QUERY_CURRENT_ADDRESS*/ + *OID_RT_PRO_QUERY_CURRENT_ADDRESS + */ {1, oid_null_function}, /*0x29 - *OID_RT_PRO_QUERY_PERMANENT_ADDRESS*/ + *OID_RT_PRO_QUERY_PERMANENT_ADDRESS + */ {1, oid_null_function}, /*0x2A - *OID_RT_PRO_SET_PHILIPS_RF_PARAMETERS*/ + *OID_RT_PRO_SET_PHILIPS_RF_PARAMETERS + */ {1, oid_rt_pro_set_carrier_suppression_tx_hdl},/*0x2B - *OID_RT_PRO_SET_CARRIER_SUPPRESSION_TX*/ + *OID_RT_PRO_SET_CARRIER_SUPPRESSION_TX + */ {1, oid_null_function}, /*0x2C OID_RT_PRO_RECEIVE_PACKET*/ {1, oid_null_function}, /*0x2D OID_RT_PRO_WRITE_EEPROM_BYTE*/ {1, oid_null_function}, /*0x2E OID_RT_PRO_READ_EEPROM_BYTE*/ diff --git a/drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h b/drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h index 2e9120a..11bcfb7 100644 --- a/drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h +++ b/drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h @@ -82,7 +82,8 @@ * 3. Page8(0x800) */ #define rFPGA0_RFMOD 0x800 /*RF mode & CCK TxSC RF - * BW Setting?? */ + * BW Setting?? + */ #define rFPGA0_TxInfo 0x804 /* Status report?? */ #define rFPGA0_PSDFunction 0x808 #define rFPGA0_TxGainStage 0x80c /* Set TX PWR init gain? */ @@ -119,7 +120,8 @@ #define rFPGA0_AnalogParameter1 0x880 /* Crystal cap setting * RF-R/W protection - * for parameter4?? */ + * for parameter4?? + */ #define rFPGA0_AnalogParameter2 0x884 #define rFPGA0_AnalogParameter3 0x888 /* Useless now */ #define rFPGA0_AnalogParameter4 0x88c @@ -146,7 +148,8 @@ * 5. PageA(0xA00) * * Set Control channel to upper or lower. - * These settings are required only for 40MHz */ + * These settings are required only for 40MHz + */ #define rCCK0_System 0xa00 #define rCCK0_AFESetting 0xa04 /* Disable init gain now */ @@ -155,20 +158,23 @@ #define rCCK0_RxAGC1 0xa0c /* AGC default value, saturation level * Antenna Diversity, RX AGC, LNA Threshold, RX LNA Threshold useless now. - * Not the same as 90 series */ + * Not the same as 90 series + */ #define rCCK0_RxAGC2 0xa10 /* AGC & DAGC */ #define rCCK0_RxHP 0xa14 #define rCCK0_DSPParameter1 0xa18 /* Timing recovery & Channel - * estimation threshold */ + * estimation threshold + */ #define rCCK0_DSPParameter2 0xa1c /* SQ threshold */ #define rCCK0_TxFilter1 0xa20 #define rCCK0_TxFilter2 0xa24 #define rCCK0_DebugPort 0xa28 /* debug port and Tx filter3 */ #define rCCK0_FalseAlarmReport 0xa2c /* 0xa2d useless now 0xa30-a4f - * channel report */ + * channel report + */ #define rCCK0_TRSSIReport 0xa50 #define rCCK0_RxReport 0xa54 /* 0xa57 */ #define rCCK0_FACounterLower 0xa5c /* 0xa5b */ @@ -193,11 +199,13 @@ #define rOFDM0_XDRxIQImbalance 0xc2c #define rOFDM0_RxDetector1 0xc30 /* PD,BW & SBD DM tune - * init gain */ + * init gain + */ #define rOFDM0_RxDetector2 0xc34 /* SBD & Fame Sync. */ #define rOFDM0_RxDetector3 0xc38 /* Frame Sync. */ #define rOFDM0_RxDetector4 0xc3c /* PD, SBD, Frame Sync & - * Short-GI */ + * Short-GI + */ #define rOFDM0_RxDSP 0xc40 /* Rx Sync Path */ #define rOFDM0_CFOandDAGC 0xc44 /* CFO & DAGC */ @@ -283,7 +291,8 @@ #define rTxAGC_Mcs15_Mcs12 0xe1c /* Analog- control in RX_WAIT_CCA : REG: EE0 - * [Analog- Power & Control Register] */ + * [Analog- Power & Control Register] + */ #define rRx_Wait_CCCA 0xe70 #define rAnapar_Ctrl_BB 0xee0 @@ -371,7 +380,8 @@ /* * Bit Mask * - * 1. Page1(0x100) */ + * 1. Page1(0x100) + */ #define bBBResetB 0x100 /* Useless now? */ #define bGlobalResetB 0x200 #define bOFDMTxStart 0x4 @@ -918,7 +928,8 @@ #define bPesudoNoiseState_D 0xffff0000 /* 7. RF Register - * Zebra1 */ + * Zebra1 + */ #define bZebra1_HSSIEnable 0x8 /* Useless */ #define bZebra1_TRxControl 0xc00 #define bZebra1_TRxGainSetting 0x07f diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.c b/drivers/staging/rtl8712/rtl871x_pwrctrl.c index 8d7ead6..8f82d85 100644 --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.c +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.c @@ -52,7 +52,8 @@ void r8712_set_rpwm(struct _adapter *padapter, u8 val8) pwrpriv->cpwm = val8; break; case PS_STATE_S2:/* only for USB normal powersave mode use, - * temp mark some code. */ + * temp mark some code. + */ case PS_STATE_S3: case PS_STATE_S4: pwrpriv->cpwm = val8; diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.h b/drivers/staging/rtl8712/rtl871x_pwrctrl.h index 231445e..c82fdf8 100644 --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.h +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.h @@ -91,7 +91,8 @@ struct pwrctrl_priv { struct mutex mutex_lock; /*volatile*/ u8 rpwm; /* requested power state for fw */ /* fw current power state. updated when 1. read from HCPWM or - * 2. driver lowers power level */ + * 2. driver lowers power level + */ /*volatile*/ u8 cpwm; /*volatile*/ u8 tog; /* toggling */ /*volatile*/ u8 cpwm_tog; /* toggling */ diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c index 23c1438..cbd2e51 100644 --- a/drivers/staging/rtl8712/rtl871x_recv.c +++ b/drivers/staging/rtl8712/rtl871x_recv.c @@ -265,7 +265,8 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter, if ((psta != NULL) && (psta->ieee8021x_blocked)) { /* blocked - * only accept EAPOL frame */ + * only accept EAPOL frame + */ if (ether_type == 0x888e) { prtnframe = precv_frame; } else { @@ -277,7 +278,8 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter, } else { /* allowed * check decryption status, and decrypt the - * frame if needed */ + * frame if needed + */ prtnframe = precv_frame; /* check is the EAPOL frame or not (Rekey) */ if (ether_type == 0x888e) { @@ -334,19 +336,22 @@ static sint sta2sta_data_frame(struct _adapter *adapter, sta_addr = pattrib->src; } else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { /* For Station mode, sa and bssid should always be BSSID, - * and DA is my mac-address */ + * and DA is my mac-address + */ if (memcmp(pattrib->bssid, pattrib->src, ETH_ALEN)) return _FAIL; sta_addr = pattrib->bssid; } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { if (bmcast) { /* For AP mode, if DA == MCAST, then BSSID should - * be also MCAST */ + * be also MCAST + */ if (!IS_MCAST(pattrib->bssid)) return _FAIL; } else { /* not mc-frame */ /* For AP mode, if DA is non-MCAST, then it must be - * BSSID, and bssid == BSSID */ + * BSSID, and bssid == BSSID + */ if (memcmp(pattrib->bssid, pattrib->dst, ETH_ALEN)) return _FAIL; sta_addr = pattrib->src; @@ -391,7 +396,8 @@ static sint ap2sta_data_frame(struct _adapter *adapter, if ((GetFrameSubType(ptr)) == WIFI_DATA_NULL) return _FAIL; /* drop QoS-SubType Data, including QoS NULL, - * excluding QoS-Data */ + * excluding QoS-Data + */ if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) { if (GetFrameSubType(ptr) & (BIT(4) | BIT(5) | BIT(6))) @@ -445,7 +451,8 @@ static sint sta2ap_data_frame(struct _adapter *adapter, if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { /* For AP mode, if DA is non-MCAST, then it must be BSSID, * and bssid == BSSID - * For AP mode, RA=BSSID, TX=STA(SRC_ADDR), A3=DST_ADDR */ + * For AP mode, RA=BSSID, TX=STA(SRC_ADDR), A3=DST_ADDR + */ if (memcmp(pattrib->bssid, mybssid, ETH_ALEN)) return _FAIL; *psta = r8712_get_stainfo(pstapriv, pattrib->src); @@ -619,7 +626,8 @@ sint r8712_wlanhdr_to_ethhdr(union recv_frame *precvframe) (memcmp(psnap_type, (void *)SNAP_ETH_TYPE_APPLETALK_AARP, 2))) || !memcmp(psnap, (void *)bridge_tunnel_header, SNAP_SIZE)) { /* remove RFC1042 or Bridge-Tunnel encapsulation and - * replace EtherType */ + * replace EtherType + */ bsnaphdr = true; } else { /* Leave Ethernet header part of hdr and full payload */ diff --git a/drivers/staging/rtl8712/rtl871x_recv.h b/drivers/staging/rtl8712/rtl871x_recv.h index 77487bb..f419943 100644 --- a/drivers/staging/rtl8712/rtl871x_recv.h +++ b/drivers/staging/rtl8712/rtl871x_recv.h @@ -153,7 +153,8 @@ static inline u8 *get_recvframe_data(union recv_frame *precvframe) static inline u8 *recvframe_pull(union recv_frame *precvframe, sint sz) { /* used for extract sz bytes from rx_data, update rx_data and return - * the updated rx_data to the caller */ + * the updated rx_data to the caller + */ if (precvframe == NULL) return NULL; precvframe->u.hdr.rx_data += sz; @@ -169,7 +170,8 @@ static inline u8 *recvframe_put(union recv_frame *precvframe, sint sz) { /* used for append sz bytes from ptr to rx_tail, update rx_tail and * return the updated rx_tail to the caller - * after putting, rx_tail must be still larger than rx_end. */ + * after putting, rx_tail must be still larger than rx_end. + */ if (precvframe == NULL) return NULL; precvframe->u.hdr.rx_tail += sz; @@ -186,7 +188,8 @@ static inline u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz) /* rmv data from rx_tail (by yitsen) * used for extract sz bytes from rx_end, update rx_end and return the * updated rx_end to the caller - * after pulling, rx_end must be still larger than rx_data. */ + * after pulling, rx_end must be still larger than rx_data. + */ if (precvframe == NULL) return NULL; precvframe->u.hdr.rx_tail -= sz; diff --git a/drivers/staging/rtl8712/rtl871x_security.h b/drivers/staging/rtl8712/rtl871x_security.h index 2295f0e..fa952e1 100644 --- a/drivers/staging/rtl8712/rtl871x_security.h +++ b/drivers/staging/rtl8712/rtl871x_security.h @@ -90,18 +90,23 @@ struct RT_PMKID_LIST { struct security_priv { u32 AuthAlgrthm; /* 802.11 auth, could be open, shared, - * 8021x and authswitch */ + * 8021x and authswitch + */ u32 PrivacyAlgrthm; /* This specify the privacy for shared - * auth. algorithm. */ + * auth. algorithm. + */ u32 PrivacyKeyIndex; /* this is only valid for legendary - * wep, 0~3 for key id. */ + * wep, 0~3 for key id. + */ union Keytype DefKey[4]; /* this is only valid for def. key */ u32 DefKeylen[4]; u32 XGrpPrivacy; /* This specify the privacy algthm. - * used for Grp key */ + * used for Grp key + */ u32 XGrpKeyid; /* key id used for Grp Key */ union Keytype XGrpKey[2]; /* 802.1x Group Key, for - * inx0 and inx1 */ + * inx0 and inx1 + */ union Keytype XGrptxmickey[2]; union Keytype XGrprxmickey[2]; union pn48 Grptxpn; /* PN48 used for Grp Key xmit. */ @@ -118,9 +123,11 @@ struct security_priv { s32 sw_encrypt; /* from registry_priv */ s32 sw_decrypt; /* from registry_priv */ s32 hw_decrypted; /* if the rx packets is hw_decrypted==false, - * it means the hw has not been ready. */ + * it means the hw has not been ready. + */ u32 ndisauthtype; /* keeps the auth_type & enc_status from upper - * layer ioctl(wpa_supplicant or wzc) */ + * layer ioctl(wpa_supplicant or wzc) + */ u32 ndisencryptstatus; struct wlan_bssid_ex sec_bss; /* for joinbss (h2c buffer) usage */ struct NDIS_802_11_WEP ndiswep; @@ -136,7 +143,8 @@ struct security_priv { u32 btkip_countermeasure_time; /*------------------------------------------------------------------- * For WPA2 Pre-Authentication. - *------------------------------------------------------------------ */ + *------------------------------------------------------------------ + **/ struct RT_PMKID_LIST PMKIDList[NUM_PMKID_CACHE]; u8 PMKIDIndex; }; diff --git a/drivers/staging/rtl8712/rtl871x_sta_mgt.c b/drivers/staging/rtl8712/rtl871x_sta_mgt.c index e11ce28..e2d75e4 100644 --- a/drivers/staging/rtl8712/rtl871x_sta_mgt.c +++ b/drivers/staging/rtl8712/rtl871x_sta_mgt.c @@ -188,7 +188,8 @@ void r8712_free_stainfo(struct _adapter *padapter, struct sta_info *psta) _r8712_init_sta_xmit_priv(&psta->sta_xmitpriv); _r8712_init_sta_recv_priv(&psta->sta_recvpriv); /* for A-MPDU Rx reordering buffer control, - * cancel reordering_ctrl_timer */ + * cancel reordering_ctrl_timer + */ for (i = 0; i < 16; i++) { preorder_ctrl = &psta->recvreorder_ctrl[i]; del_timer(&preorder_ctrl->reordering_ctrl_timer); diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c index 99256ba..be38364 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.c +++ b/drivers/staging/rtl8712/rtl871x_xmit.c @@ -204,7 +204,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt, { /*If driver xmit ARP packet, driver can set ps mode to initial - * setting. It stands for getting DHCP or fix IP.*/ + * setting. It stands for getting DHCP or fix IP. + */ if (pattrib->ether_type == 0x0806) { if (padapter->pwrctrlpriv.pwr_mode != padapter->registrypriv.power_mgnt) { @@ -232,7 +233,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt, if (pattrib->ether_type != 0x8712) return _FAIL; /* for mp storing the txcmd per packet, - * according to the info of txcmd to update pattrib */ + * according to the info of txcmd to update pattrib + */ /*get MP_TXDESC_SIZE bytes txcmd per packet*/ _r8712_pktfile_read(&pktfile, (u8 *)&txdesc, TXDESC_SIZE); memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); @@ -244,7 +246,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt, if (pattrib->ether_type == ETH_P_IP) { /* 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 */ + * to prevent DHCP protocol fail + */ u8 tmp[24]; _r8712_pktfile_read(&pktfile, &tmp[0], 24); @@ -255,7 +258,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt, ((tmp[21] == 67) && (tmp[23] == 68))) { /* 68 : UDP BOOTP client * 67 : UDP BOOTP server - * Use low rate to send DHCP packet.*/ + * Use low rate to send DHCP packet. + */ pattrib->dhcp_pkt = 1; } } @@ -337,7 +341,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt, else pattrib->bswenc = false; /* if in MP_STATE, update pkt_attrib from mp_txcmd, and overwrite - * some settings above.*/ + * some settings above. + */ if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) pattrib->priority = (txdesc.txdw1 >> QSEL_SHT) & 0x1f; return _SUCCESS; @@ -438,7 +443,8 @@ static sint xmitframe_addmic(struct _adapter *padapter, } r8712_secgetmic(&micdata, &(mic[0])); /* add mic code and add the mic code length in - * last_txcmdsz */ + * last_txcmdsz + */ memcpy(payload, &(mic[0]), 8); pattrib->last_txcmdsz += 8; payload = payload - pattrib->last_txcmdsz + 8; diff --git a/drivers/staging/rtl8712/rtl871x_xmit.h b/drivers/staging/rtl8712/rtl871x_xmit.h index a9633c3..d899d0c 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.h +++ b/drivers/staging/rtl8712/rtl871x_xmit.h @@ -58,7 +58,8 @@ do { \ } while (0) /* Fixed the Big Endian bug when doing the Tx. - * The Linksys WRH54G will check this.*/ + * The Linksys WRH54G will check this. + */ #define TKIP_IV(pattrib_iv, txpn, keyidx)\ do { \ pattrib_iv[0] = txpn._byte_.TSC1;\ @@ -105,7 +106,8 @@ struct pkt_attrib { u16 seqnum; u16 ether_type; u16 pktlen; /* the original 802.3 pkt raw_data len - * (not include ether_hdr data) */ + * (not include ether_hdr data) + */ u16 last_txcmdsz; u8 pkt_hdrlen; /*the original 802.3 pkt header len*/ @@ -119,7 +121,8 @@ struct pkt_attrib { u8 priority; u8 encrypt; /* when 0 indicate no encrypt. when non-zero, - * indicate the encrypt algorithm*/ + * indicate the encrypt algorithm + */ u8 iv_len; u8 icv_len; unsigned char iv[8]; @@ -176,7 +179,8 @@ struct sta_xmit_priv { spinlock_t lock; sint option; sint apsd_setting; /* When bit mask is on, the associated edca - * queue supports APSD.*/ + * queue supports APSD. + */ struct tx_servq be_q; /* priority == 0,3 */ struct tx_servq bk_q; /* priority == 1,2*/ struct tx_servq vi_q; /*priority == 4,5*/ diff --git a/drivers/staging/rtl8712/usb_halinit.c b/drivers/staging/rtl8712/usb_halinit.c index ad21df1..0b15985 100644 --- a/drivers/staging/rtl8712/usb_halinit.c +++ b/drivers/staging/rtl8712/usb_halinit.c @@ -196,7 +196,8 @@ u8 r8712_usb_hal_bus_init(struct _adapter *padapter) msleep(20); /* Revised POS, */ /* Enable AFE Macro Block's Bandgap and Enable AFE Macro - * Block's Mbias */ + * Block's Mbias + */ r8712_write8(padapter, SPS0_CTRL + 1, 0x53); r8712_write8(padapter, SPS0_CTRL, 0x57); val8 = r8712_read8(padapter, AFE_MISC); diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index c1a0ca49..3fc65b2 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -301,7 +301,8 @@ void rtl871x_intf_stop(struct _adapter *padapter) /*disable_hw_interrupt*/ if (!padapter->bSurpriseRemoved) { /*device still exists, so driver can do i/o operation - * TODO: */ + * TODO: + */ } /* cancel in irp */ @@ -611,7 +612,8 @@ error: } /* rmmod module & unplug(SurpriseRemoved) will call r871xu_dev_remove() - * => how to recognize both */ + * => how to recognize both + */ static void r871xu_dev_remove(struct usb_interface *pusb_intf) { struct net_device *pnetdev = usb_get_intfdata(pusb_intf); @@ -635,12 +637,14 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf) r8712_free_drv_sw(padapter); /* decrease the reference count of the usb device structure - * when disconnect */ + * when disconnect + */ usb_put_dev(udev); } /* If we didn't unplug usb dongle and remove/insert module, driver * fails on sitesurvey for the first time when device is up. - * Reset usb port for sitesurvey fail issue. */ + * Reset usb port for sitesurvey fail issue. + */ if (udev->state != USB_STATE_NOTATTACHED) usb_reset_device(udev); } diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h index 7a352c4..b8af965 100644 --- a/drivers/staging/rtl8712/wifi.h +++ b/drivers/staging/rtl8712/wifi.h @@ -376,7 +376,8 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe) /*----------------------------------------------------------------------------- Below is for the security related definition -------------------------------------------------------------------------------*/ + *----------------------------------------------------------------------------- + */ #define _RESERVED_FRAME_TYPE_ 0 #define _SKB_FRAME_TYPE_ 2 #define _PRE_ALLOCMEM_ 1 @@ -420,7 +421,8 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe) /* --------------------------------------------------------------------------- Below is the fixed elements... ------------------------------------------------------------------------------*/ + * --------------------------------------------------------------------------- + */ #define _AUTH_ALGM_NUM_ 2 #define _AUTH_SEQ_NUM_ 2 #define _BEACON_ITERVAL_ 2 @@ -448,20 +450,23 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe) /*----------------------------------------------------------------------------- Below is the definition for 802.11i / 802.1x -------------------------------------------------------------------------------*/ + *------------------------------------------------------------------------------ + */ #define _IEEE8021X_MGT_ 1 /*WPA */ #define _IEEE8021X_PSK_ 2 /* WPA with pre-shared key */ /*----------------------------------------------------------------------------- Below is the definition for WMM -------------------------------------------------------------------------------*/ + *------------------------------------------------------------------------------ + */ #define _WMM_IE_Length_ 7 /* for WMM STA */ #define _WMM_Para_Element_Length_ 24 /*----------------------------------------------------------------------------- Below is the definition for 802.11n -------------------------------------------------------------------------------*/ + *------------------------------------------------------------------------------ + */ /* block-ack parameters */ #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 diff --git a/drivers/staging/rtl8712/wlan_bssdef.h b/drivers/staging/rtl8712/wlan_bssdef.h index fda5707..86a88b4 100644 --- a/drivers/staging/rtl8712/wlan_bssdef.h +++ b/drivers/staging/rtl8712/wlan_bssdef.h @@ -171,7 +171,8 @@ struct NDIS_802_11_REMOVE_KEY { struct NDIS_802_11_WEP { u32 Length; /* Length of this structure */ u32 KeyIndex; /* 0 is the per-client key, - * 1-N are the global keys */ + * 1-N are the global keys + */ u32 KeyLength; /* length of key in bytes */ u8 KeyMaterial[16]; /* variable length depending on above field */ }; @@ -194,7 +195,8 @@ struct wlan_network { struct list_head list; int network_type; /*refer to ieee80211.h for WIRELESS_11A/B/G */ int fixed; /* set to fixed when not to be removed asi - * site-surveying */ + * site-surveying + */ unsigned int last_scanned; /*timestamp for the network */ int aid; /*will only be valid when a BSS is joined. */ int join_res; -- 2.7.4