Staging: rtl8712: rtl8712_recv.c: Coding Style warnings fix for block comments
PATCH 1/1 Staging: rtl8712: rtl8712_recv.c: Coding Style warnings fix for block comments
This patch is to the rtl8712_recv.c file that fixes up following warning reported by checkpatch.pl :
-Block comments use a trailing */ on a separate line
Signed-off-by Punit Vara <[email protected]>
--- drivers/staging/rtl8712/rtl8712_recv.c | 111 ++++++++++++++++++++++----------- 1 file changed, 74 insertions(+), 37 deletions(-)
drivers/staging/rtl8712/rtl8712_recv.c +74 -37
@@ -162,8 +162,10 @@ 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 */ +/* +* TODO: +* 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 ;
@@ -208,8 +210,10 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, pfhdr = &prframe->u.hdr; curfragnum =0 ;if (curfragnum != pfhdr->attrib.frag_num) { -/*the first fragment number must be 0 -*free the whole queue*/ +/* +* the first fragment number must be 0 +* free the whole queue +*/ r8712_free_recvframe (prframe, pfree_recv_queue);r8712_free_recvframe_queue (defrag_q, pfree_recv_queue);return NULL ;
@@ -222,19 +226,25 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter, pnfhdr = &pnextrframe->u.hdr;/*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 */ +/* +* the fragment number must increase (after decache) +* 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 */ +/* +* copy the 2nd~n fragment frame's payload to the first fragment +* 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) */ +/* +* append to first fragment frame's tail (if privacy frame, +* 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);
@@ -276,8 +286,10 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,if ((ismfrag ==0 ) && (fragnum ==0 )) prtnframe = precv_frame;/*isn't a fragment frame*/ if (ismfrag ==1 ) { -/* 0~(n-1) fragment frame -* enqueue to defraf_g */ +/* +* 0~(n-1) fragment frame +* enqueue to defraf_g +*/ if (pdefrag_q !=NULL ) {if (fragnum ==0 ) {/*the first fragment*/
@@ -292,16 +304,20 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,list_add_tail (&pfhdr->list, phead); prtnframe =NULL ; }else { -/* can't find this ta's defrag_queue, so free this -* recv_frame */ +/* +* can't find this ta's defrag_queue, so free this +* 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 */ +/* +* the last fragment frame +* enqueue the last fragment +*/ if (pdefrag_q !=NULL ) { phead = &pdefrag_q->queue;list_add_tail (&pfhdr->list, phead);
@@ -309,8 +325,10 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter, precv_frame =recvframe_defrag (padapter, pdefrag_q); prtnframe = precv_frame; }else { -/* can't find this ta's defrag_queue, so free this -* recv_frame */ +/* +* can't find this ta's defrag_queue, so free this +* recv_frame +*/ r8712_free_recvframe (precv_frame, pfree_recv_queue); prtnframe =NULL ; }
@@ -389,8 +407,10 @@ static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe) ((!memcmp(sub_skb->data, rfc1042_header, SNAP_SIZE) && 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 */ +/* +* remove RFC1042 or Bridge-Tunnel encapsulation and +* replace EtherType +*/ skb_pull (sub_skb,SNAP_SIZE );memcpy (skb_push (sub_skb,ETH_ALEN ), pattrib->src,ETH_ALEN );
@@ -527,8 +547,10 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter, pattrib = &prframe->u.hdr.attrib; preorder_ctrl->indicate_seq = pattrib->seq_num; } -/* Prepare indication list and indication. -* Check if there is any packet need indicate. */ +/* +* Prepare indication list and indication. +* Check if there is any packet need indicate. +*/ while (!list_empty (phead)) { prframe = LIST_CONTAINOR(plist, union recv_frame, u); pattrib = &prframe->u.hdr.attrib;
@@ -743,7 +765,8 @@ static void query_rx_phy_status(struct _adapter *padapter,/* CCK Driver info Structure is not the same as OFDM packet.*/ pcck_buf = (struct phy_cck_rx_status *)pphy_stat; -/* (1)Hardware does not provide RSSI for CCK +/* +* (1)Hardware does not provide RSSI for CCK * (2)PWDB, Average PWDB cacluated by hardware * (for rate adaptive) */
@@ -751,10 +774,12 @@ static void query_rx_phy_status(struct _adapter *padapter, report = pcck_buf->cck_agc_rpt &0xc0 ; report >>=6 ;switch (report) { -/* Modify the RF RNA gain value to -40, -20, +/* +* 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 );
@@ -838,8 +863,10 @@ static void query_rx_phy_status(struct _adapter *padapter, rssi =query_rx_pwr_percentage (rx_pwr[i]); total_rssi += rssi; } -/* (2)PWDB, Average PWDB cacluated by hardware (for -* rate adaptive) */ +/* +* (2)PWDB, Average PWDB calculated by hardware (for +* rate adaptive) +*/ rx_pwr_all = (((pphy_head[PHY_STAT_PWDB_ALL_SHT ]) >>1 ) &0x7f ) -106 ; pwdb_all =query_rx_pwr_percentage (rx_pwr_all);
@@ -865,9 +892,11 @@ static void query_rx_phy_status(struct _adapter *padapter, } } } -/* UI BSS List signal strength(in percentage), make it good looking, +/* +* 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);
@@ -1022,12 +1051,16 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb) pkt_cnt = (le32_to_cpu (prxstat->rxdw2)>>16 )&0xff ; pkt_len =le32_to_cpu (prxstat->rxdw0)&0x00003fff ; transfer_len = pskb->len; -/* Test throughput with Netgear 3700 (No security) with Chariot 3T3R +/* +* 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. */ +/* +* In this case, it means the MAX_RECVBUF_SZ is too small to +* get the data from 8712u. +*/ return _FAIL; } do {
@@ -1053,15 +1086,19 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb) precvframe->u.hdr.len =0 ; 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. */ +/* +* for first fragment packet, driver need allocate 1536 + +* 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. */ +/* +* 2 is for IP header 4 bytes alignment in QoS packet case. +* 4 is for skb->data 4 bytes alignment. +*/ alloc_sz +=6 ; pkt_copy =netdev_alloc_skb (padapter->pnetdev, alloc_sz);if (pkt_copy) {
Signature · 1 line
2.5.2