staging: rtl8712: Fix coding style warnings on Block comments

Fixed checkpatch.pl warnings related to Block comments in
staging/rtl8712/*.c files.

Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Vijai Kumar K 2016-11-20 17:01:52 -08:00 committed by Greg Kroah-Hartman
parent 8d130c3b0f
commit 09b080f73a
6 changed files with 101 additions and 113 deletions

View file

@ -139,9 +139,10 @@ u8 r8712_set_802_11_bssid(struct _adapter *padapter, u8 *bssid)
if (!memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, if (!memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid,
ETH_ALEN)) { ETH_ALEN)) {
if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE))
goto _Abort_Set_BSSID; /* driver is in /* driver is in
* WIFI_ADHOC_MASTER_STATE * WIFI_ADHOC_MASTER_STATE
*/ */
goto _Abort_Set_BSSID;
} else { } else {
r8712_disassoc_cmd(padapter); r8712_disassoc_cmd(padapter);
if (check_fwstate(pmlmepriv, _FW_LINKED)) if (check_fwstate(pmlmepriv, _FW_LINKED))
@ -203,9 +204,10 @@ void r8712_set_802_11_ssid(struct _adapter *padapter,
WIFI_ADHOC_STATE); WIFI_ADHOC_STATE);
} }
} else { } else {
goto _Abort_Set_SSID; /* driver is in /* driver is in
* WIFI_ADHOC_MASTER_STATE * WIFI_ADHOC_MASTER_STATE
*/ */
goto _Abort_Set_SSID;
} }
} }
} else { } else {

View file

@ -137,11 +137,10 @@ static void free_network_nolock(struct mlme_priv *pmlmepriv,
} }
/* /* return the wlan_network with the matching addr
return the wlan_network with the matching addr * Shall be called under atomic context...
Shall be called under atomic context... * to avoid possible racing condition...
to avoid possible racing condition... */
*/
static struct wlan_network *_r8712_find_network(struct __queue *scanned_queue, static struct wlan_network *_r8712_find_network(struct __queue *scanned_queue,
u8 *addr) u8 *addr)
{ {
@ -239,11 +238,10 @@ void r8712_free_network_queue(struct _adapter *dev)
} }
/* /*
return the wlan_network with the matching addr * return the wlan_network with the matching addr
* Shall be called under atomic context...
Shall be called under atomic context... * to avoid possible racing condition...
to avoid possible racing condition... */
*/
static struct wlan_network *r8712_find_network(struct __queue *scanned_queue, static struct wlan_network *r8712_find_network(struct __queue *scanned_queue,
u8 *addr) u8 *addr)
{ {
@ -369,9 +367,7 @@ static void update_current_network(struct _adapter *adapter,
} }
} }
/* /* Caller must hold pmlmepriv->lock first */
Caller must hold pmlmepriv->lock first.
*/
static void update_scanned_network(struct _adapter *adapter, static void update_scanned_network(struct _adapter *adapter,
struct wlan_bssid_ex *target) struct wlan_bssid_ex *target)
{ {
@ -651,8 +647,8 @@ void r8712_free_assoc_resources(struct _adapter *adapter)
} }
/* /*
*r8712_indicate_connect: the caller has to lock pmlmepriv->lock * r8712_indicate_connect: the caller has to lock pmlmepriv->lock
*/ */
void r8712_indicate_connect(struct _adapter *padapter) void r8712_indicate_connect(struct _adapter *padapter)
{ {
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -668,8 +664,8 @@ void r8712_indicate_connect(struct _adapter *padapter)
/* /*
*r8712_ind_disconnect: the caller has to lock pmlmepriv->lock * r8712_ind_disconnect: the caller has to lock pmlmepriv->lock
*/ */
void r8712_ind_disconnect(struct _adapter *padapter) void r8712_ind_disconnect(struct _adapter *padapter)
{ {
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

View file

@ -190,19 +190,15 @@ void r8712_init_pwrctrl_priv(struct _adapter *padapter)
} }
/* /*
Caller: r8712_cmd_thread * Caller: r8712_cmd_thread
* Check if the fw_pwrstate is okay for issuing cmd.
Check if the fw_pwrstate is okay for issuing cmd. * If not (cpwm should be is less than P2 state), then the sub-routine
If not (cpwm should be is less than P2 state), then the sub-routine * will raise the cpwm to be greater than or equal to P2.
will raise the cpwm to be greater than or equal to P2. * Calling Context: Passive
* Return Value:
Calling Context: Passive * _SUCCESS: r8712_cmd_thread can issue cmds to firmware afterwards.
* _FAIL: r8712_cmd_thread can not do anything.
Return Value: */
_SUCCESS: r8712_cmd_thread can issue cmds to firmware afterwards.
_FAIL: r8712_cmd_thread can not do anything.
*/
sint r8712_register_cmd_alive(struct _adapter *padapter) sint r8712_register_cmd_alive(struct _adapter *padapter)
{ {
uint res = _SUCCESS; uint res = _SUCCESS;
@ -219,13 +215,11 @@ sint r8712_register_cmd_alive(struct _adapter *padapter)
} }
/* /*
Caller: ISR * Caller: ISR
* If ISR's txdone,
If ISR's txdone, * No more pkts for TX,
No more pkts for TX, * Then driver shall call this fun. to power down firmware again.
Then driver shall call this fun. to power down firmware again. */
*/
void r8712_unregister_cmd_alive(struct _adapter *padapter) void r8712_unregister_cmd_alive(struct _adapter *padapter)
{ {
struct pwrctrl_priv *pwrctrl = &padapter->pwrctrlpriv; struct pwrctrl_priv *pwrctrl = &padapter->pwrctrlpriv;

View file

@ -125,13 +125,10 @@ union recv_frame *r8712_alloc_recvframe(struct __queue *pfree_recv_queue)
} }
/* /*
caller : defrag; recvframe_chk_defrag in recv_thread (passive) * caller : defrag; recvframe_chk_defrag in recv_thread (passive)
pframequeue: defrag_queue : will be accessed in recv_thread (passive) * pframequeue: defrag_queue : will be accessed in recv_thread (passive)
* using spin_lock to protect
using spin_lock to protect */
*/
void r8712_free_recvframe_queue(struct __queue *pframequeue, void r8712_free_recvframe_queue(struct __queue *pframequeue,
struct __queue *pfree_recv_queue) struct __queue *pfree_recv_queue)
{ {

View file

@ -159,8 +159,8 @@ static u32 getcrc32(u8 *buf, u32 len)
} }
/* /*
Need to consider the fragment situation * Need to consider the fragment situation
*/ */
void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe) void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe)
{ /* exclude ICV */ { /* exclude ICV */
unsigned char crc[4]; unsigned char crc[4];
@ -467,22 +467,22 @@ static const unsigned short Sbox1[2][256] = {/* Sbox for hash (can be in ROM) */
}; };
/* /*
********************************************************************** **********************************************************************
* Routine: Phase 1 -- generate P1K, given TA, TK, IV32 * Routine: Phase 1 -- generate P1K, given TA, TK, IV32
* *
* Inputs: * Inputs:
* tk[] = temporal key [128 bits] * tk[] = temporal key [128 bits]
* ta[] = transmitter's MAC address [ 48 bits] * ta[] = transmitter's MAC address [ 48 bits]
* iv32 = upper 32 bits of IV [ 32 bits] * iv32 = upper 32 bits of IV [ 32 bits]
* Output: * Output:
* p1k[] = Phase 1 key [ 80 bits] * p1k[] = Phase 1 key [ 80 bits]
* *
* Note: * Note:
* This function only needs to be called every 2**16 packets, * This function only needs to be called every 2**16 packets,
* although in theory it could be called every packet. * although in theory it could be called every packet.
* *
********************************************************************** **********************************************************************
*/ */
static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
{ {
sint i; sint i;
@ -506,28 +506,28 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
} }
/* /*
********************************************************************** **********************************************************************
* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16 * Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
* *
* Inputs: * Inputs:
* tk[] = Temporal key [128 bits] * tk[] = Temporal key [128 bits]
* p1k[] = Phase 1 output key [ 80 bits] * p1k[] = Phase 1 output key [ 80 bits]
* iv16 = low 16 bits of IV counter [ 16 bits] * iv16 = low 16 bits of IV counter [ 16 bits]
* Output: * Output:
* rc4key[] = the key used to encrypt the packet [128 bits] * rc4key[] = the key used to encrypt the packet [128 bits]
* *
* Note: * Note:
* The value {TA,IV32,IV16} for Phase1/Phase2 must be unique * The value {TA,IV32,IV16} for Phase1/Phase2 must be unique
* across all packets using the same key TK value. Then, for a * across all packets using the same key TK value. Then, for a
* given value of TK[], this TKIP48 construction guarantees that * given value of TK[], this TKIP48 construction guarantees that
* the final RC4KEY value is unique across all packets. * the final RC4KEY value is unique across all packets.
* *
* Suggested implementation optimization: if PPK[] is "overlaid" * Suggested implementation optimization: if PPK[] is "overlaid"
* appropriately on RC4KEY[], there is no need for the final * appropriately on RC4KEY[], there is no need for the final
* for loop below that copies the PPK[] result into RC4KEY[]. * for loop below that copies the PPK[] result into RC4KEY[].
* *
********************************************************************** **********************************************************************
*/ */
static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
{ {
sint i; sint i;

View file

@ -71,8 +71,8 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
memset((unsigned char *)pxmitpriv, 0, sizeof(struct xmit_priv)); memset((unsigned char *)pxmitpriv, 0, sizeof(struct xmit_priv));
spin_lock_init(&pxmitpriv->lock); spin_lock_init(&pxmitpriv->lock);
/* /*
Please insert all the queue initialization using _init_queue below *Please insert all the queue initialization using _init_queue below
*/ */
pxmitpriv->adapter = padapter; pxmitpriv->adapter = padapter;
_init_queue(&pxmitpriv->be_pending); _init_queue(&pxmitpriv->be_pending);
_init_queue(&pxmitpriv->bk_pending); _init_queue(&pxmitpriv->bk_pending);
@ -83,10 +83,10 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
_init_queue(&pxmitpriv->apsd_queue); _init_queue(&pxmitpriv->apsd_queue);
_init_queue(&pxmitpriv->free_xmit_queue); _init_queue(&pxmitpriv->free_xmit_queue);
/* /*
Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME, * Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME,
and initialize free_xmit_frame below. * and initialize free_xmit_frame below.
Please also apply free_txobj to link_up all the xmit_frames... * Please also apply free_txobj to link_up all the xmit_frames...
*/ */
pxmitpriv->pallocated_frame_buf = kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4, pxmitpriv->pallocated_frame_buf = kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4,
GFP_ATOMIC); GFP_ATOMIC);
if (!pxmitpriv->pallocated_frame_buf) { if (!pxmitpriv->pallocated_frame_buf) {
@ -109,8 +109,8 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
} }
pxmitpriv->free_xmitframe_cnt = NR_XMITFRAME; pxmitpriv->free_xmitframe_cnt = NR_XMITFRAME;
/* /*
init xmit hw_txqueue * init xmit hw_txqueue
*/ */
_r8712_init_hw_txqueue(&pxmitpriv->be_txqueue, BE_QUEUE_INX); _r8712_init_hw_txqueue(&pxmitpriv->be_txqueue, BE_QUEUE_INX);
_r8712_init_hw_txqueue(&pxmitpriv->bk_txqueue, BK_QUEUE_INX); _r8712_init_hw_txqueue(&pxmitpriv->bk_txqueue, BK_QUEUE_INX);
_r8712_init_hw_txqueue(&pxmitpriv->vi_txqueue, VI_QUEUE_INX); _r8712_init_hw_txqueue(&pxmitpriv->vi_txqueue, VI_QUEUE_INX);
@ -780,24 +780,23 @@ int r8712_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
} }
/* /*
Calling context: * Calling context:
1. OS_TXENTRY * 1. OS_TXENTRY
2. RXENTRY (rx_thread or RX_ISR/RX_CallBack) * 2. RXENTRY (rx_thread or RX_ISR/RX_CallBack)
*
If we turn on USE_RXTHREAD, then, no need for critical section. * If we turn on USE_RXTHREAD, then, no need for critical section.
Otherwise, we must use _enter/_exit critical to protect free_xmit_queue... * Otherwise, we must use _enter/_exit critical to protect free_xmit_queue...
*
Must be very very cautious... * Must be very very cautious...
*
*/ */
struct xmit_frame *r8712_alloc_xmitframe(struct xmit_priv *pxmitpriv) struct xmit_frame *r8712_alloc_xmitframe(struct xmit_priv *pxmitpriv)
{ {
/* /*
Please remember to use all the osdep_service api, * Please remember to use all the osdep_service api,
and lock/unlock or _enter/_exit critical to protect * and lock/unlock or _enter/_exit critical to protect
pfree_xmit_queue * pfree_xmit_queue
*/ */
unsigned long irqL; unsigned long irqL;
struct xmit_frame *pxframe; struct xmit_frame *pxframe;
struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue; struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;