Skip to content

Commit

Permalink
staging: rtl8712: checkpatch cleanup: block comments using a trailing */
Browse files Browse the repository at this point in the history
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 <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Raphaël Beamonte authored and Greg Kroah-Hartman committed Sep 12, 2016
1 parent 1c099ed commit bef611a
Showing 29 changed files with 268 additions and 134 deletions.
12 changes: 8 additions & 4 deletions drivers/staging/rtl8712/rtl8712_led.c
Original file line number Diff line number Diff line change
@@ -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);
54 changes: 36 additions & 18 deletions drivers/staging/rtl8712/rtl8712_recv.c
Original file line number Diff line number Diff line change
@@ -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,15 +300,17 @@ 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;
}

}
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) {
3 changes: 2 additions & 1 deletion drivers/staging/rtl8712/rtl8712_recv.h
Original file line number Diff line number Diff line change
@@ -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;
3 changes: 2 additions & 1 deletion drivers/staging/rtl8712/rtl8712_spec.h
Original file line number Diff line number Diff line change
@@ -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
27 changes: 18 additions & 9 deletions drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h
Original file line number Diff line number Diff line change
@@ -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__*/

9 changes: 6 additions & 3 deletions drivers/staging/rtl8712/rtl8712_xmit.c
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 6 additions & 3 deletions drivers/staging/rtl8712/rtl871x_cmd.h
Original file line number Diff line number Diff line change
@@ -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. */
3 changes: 2 additions & 1 deletion drivers/staging/rtl8712/rtl871x_ht.h
Original file line number Diff line number Diff line change
@@ -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;
};

3 changes: 2 additions & 1 deletion drivers/staging/rtl8712/rtl871x_ioctl.h
Original file line number Diff line number Diff line change
@@ -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);
};

Loading

0 comments on commit bef611a

Please sign in to comment.