Commit b249bedb authored by Ryan England's avatar Ryan England Committed by Greg Kroah-Hartman

staging: rtl8712: fix open parentheses alignment

Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Alignment should match open parenthesis
Signed-off-by: default avatarRyan England <rcengland@gmail.com>
Link: https://lore.kernel.org/r/ZYSemFbzTlgLROMc@kernel.ryanengland.xyzSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 93235f62
...@@ -221,8 +221,7 @@ struct net_device *r8712_init_netdev(void) ...@@ -221,8 +221,7 @@ struct net_device *r8712_init_netdev(void)
static u32 start_drv_threads(struct _adapter *padapter) static u32 start_drv_threads(struct _adapter *padapter)
{ {
padapter->cmd_thread = kthread_run(r8712_cmd_thread, padapter, "%s", padapter->cmd_thread = kthread_run(r8712_cmd_thread, padapter, "%s", padapter->pnetdev->name);
padapter->pnetdev->name);
if (IS_ERR(padapter->cmd_thread)) if (IS_ERR(padapter->cmd_thread))
return _FAIL; return _FAIL;
return _SUCCESS; return _SUCCESS;
......
...@@ -213,8 +213,8 @@ u16 r8712_efuse_get_current_size(struct _adapter *adapter) ...@@ -213,8 +213,8 @@ u16 r8712_efuse_get_current_size(struct _adapter *adapter)
u8 hworden = 0; u8 hworden = 0;
u8 efuse_data, word_cnts = 0; u8 efuse_data, word_cnts = 0;
while (bContinual && efuse_one_byte_read(adapter, efuse_addr, while (bContinual && efuse_one_byte_read(adapter, efuse_addr, &efuse_data) &&
&efuse_data) && (efuse_addr < efuse_available_max_size)) { (efuse_addr < efuse_available_max_size)) {
if (efuse_data != 0xFF) { if (efuse_data != 0xFF) {
hworden = efuse_data & 0x0F; hworden = efuse_data & 0x0F;
word_cnts = calculate_word_cnts(hworden); word_cnts = calculate_word_cnts(hworden);
...@@ -252,9 +252,8 @@ u8 r8712_efuse_pg_packet_read(struct _adapter *adapter, u8 offset, u8 *data) ...@@ -252,9 +252,8 @@ u8 r8712_efuse_pg_packet_read(struct _adapter *adapter, u8 offset, u8 *data)
memset(tmpdata, 0xFF, PGPKT_DATA_SIZE); memset(tmpdata, 0xFF, PGPKT_DATA_SIZE);
for (tmpidx = 0; tmpidx < word_cnts * 2; for (tmpidx = 0; tmpidx < word_cnts * 2;
tmpidx++) { tmpidx++) {
if (efuse_one_byte_read(adapter, if (efuse_one_byte_read(adapter, efuse_addr + 1 + tmpidx,
efuse_addr + 1 + tmpidx, &efuse_data)) {
&efuse_data)) {
tmpdata[tmpidx] = efuse_data; tmpdata[tmpidx] = efuse_data;
} else { } else {
ret = false; ret = false;
......
...@@ -267,8 +267,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter, ...@@ -267,8 +267,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
/*the first fragment*/ /*the first fragment*/
if (!list_empty(&pdefrag_q->queue)) { if (!list_empty(&pdefrag_q->queue)) {
/*free current defrag_q */ /*free current defrag_q */
r8712_free_recvframe_queue(pdefrag_q, r8712_free_recvframe_queue(pdefrag_q, pfree_recv_queue);
pfree_recv_queue);
} }
} }
/* Then enqueue the 0~(n-1) fragment to the defrag_q */ /* Then enqueue the 0~(n-1) fragment to the defrag_q */
......
...@@ -147,9 +147,8 @@ static u32 get_ff_hwaddr(struct xmit_frame *pxmitframe) ...@@ -147,9 +147,8 @@ static u32 get_ff_hwaddr(struct xmit_frame *pxmitframe)
} }
static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv,
struct hw_xmit *phwxmit, struct hw_xmit *phwxmit, struct tx_servq *ptxservq,
struct tx_servq *ptxservq, struct __queue *pframe_queue)
struct __queue *pframe_queue)
{ {
struct list_head *xmitframe_plist, *xmitframe_phead; struct list_head *xmitframe_plist, *xmitframe_phead;
struct xmit_frame *pxmitframe = NULL; struct xmit_frame *pxmitframe = NULL;
...@@ -167,7 +166,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, ...@@ -167,7 +166,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv,
} }
static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv, static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
struct hw_xmit *phwxmit_i, sint entry) struct hw_xmit *phwxmit_i, sint entry)
{ {
unsigned long irqL0; unsigned long irqL0;
struct list_head *sta_plist, *sta_phead; struct list_head *sta_plist, *sta_phead;
...@@ -197,11 +196,10 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv, ...@@ -197,11 +196,10 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
sta_phead = &phwxmit->sta_queue->queue; sta_phead = &phwxmit->sta_queue->queue;
sta_plist = sta_phead->next; sta_plist = sta_phead->next;
while (!end_of_queue_search(sta_phead, sta_plist)) { while (!end_of_queue_search(sta_phead, sta_plist)) {
ptxservq = container_of(sta_plist, struct tx_servq, ptxservq = container_of(sta_plist, struct tx_servq, tx_pending);
tx_pending);
pframe_queue = &ptxservq->sta_pending; pframe_queue = &ptxservq->sta_pending;
pxmitframe = dequeue_one_xmitframe(pxmitpriv, phwxmit, pxmitframe = dequeue_one_xmitframe(pxmitpriv, phwxmit, ptxservq,
ptxservq, pframe_queue); pframe_queue);
if (pxmitframe) { if (pxmitframe) {
phwxmit->accnt--; phwxmit->accnt--;
goto exit_dequeue_xframe_ex; goto exit_dequeue_xframe_ex;
...@@ -221,8 +219,7 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv, ...@@ -221,8 +219,7 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
return pxmitframe; return pxmitframe;
} }
void r8712_do_queue_select(struct _adapter *padapter, void r8712_do_queue_select(struct _adapter *padapter, struct pkt_attrib *pattrib)
struct pkt_attrib *pattrib)
{ {
unsigned int qsel = 0; unsigned int qsel = 0;
struct dvobj_priv *pdvobj = &padapter->dvobjpriv; struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
...@@ -292,14 +289,12 @@ void r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf, ...@@ -292,14 +289,12 @@ void r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf,
r8712_xmit_complete(padapter, pxmitframe); r8712_xmit_complete(padapter, pxmitframe);
if (pxmitframe->attrib.ether_type != 0x0806) { if (pxmitframe->attrib.ether_type != 0x0806) {
if ((pxmitframe->attrib.ether_type != 0x888e) && if ((pxmitframe->attrib.ether_type != 0x888e) &&
(pxmitframe->attrib.dhcp_pkt != 1)) { (pxmitframe->attrib.dhcp_pkt != 1)) {
r8712_issue_addbareq_cmd(padapter, r8712_issue_addbareq_cmd(padapter, pxmitframe->attrib.priority);
pxmitframe->attrib.priority);
} }
} }
pxmitframe->last[0] = 1; pxmitframe->last[0] = 1;
update_txdesc(pxmitframe, (uint *)(pxmitframe->buf_addr), update_txdesc(pxmitframe, (uint *)(pxmitframe->buf_addr), pxmitframe->attrib.last_txcmdsz);
pxmitframe->attrib.last_txcmdsz);
/*padding zero */ /*padding zero */
last_txcmdsz = pxmitframe->attrib.last_txcmdsz; last_txcmdsz = pxmitframe->attrib.last_txcmdsz;
padding_sz = (8 - (last_txcmdsz % 8)); padding_sz = (8 - (last_txcmdsz % 8));
...@@ -333,8 +328,7 @@ void r8712_xmitframe_aggr_1st(struct xmit_buf *pxmitbuf, ...@@ -333,8 +328,7 @@ void r8712_xmitframe_aggr_1st(struct xmit_buf *pxmitbuf,
pxmitbuf->aggr_nr = 1; pxmitbuf->aggr_nr = 1;
} }
u16 r8712_xmitframe_aggr_next(struct xmit_buf *pxmitbuf, u16 r8712_xmitframe_aggr_next(struct xmit_buf *pxmitbuf, struct xmit_frame *pxmitframe)
struct xmit_frame *pxmitframe)
{ {
pxmitframe->pxmitbuf = pxmitbuf; pxmitframe->pxmitbuf = pxmitbuf;
pxmitbuf->priv_data = pxmitframe; pxmitbuf->priv_data = pxmitframe;
...@@ -374,9 +368,9 @@ void r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf, ...@@ -374,9 +368,9 @@ void r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,
pxmitframe->bpending[0] = false; pxmitframe->bpending[0] = false;
pxmitframe->mem_addr = pxmitbuf->pbuf; pxmitframe->mem_addr = pxmitbuf->pbuf;
if ((pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 0x200) == if ((pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 0x200) == 0) ||
0) || ((!pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % ((!pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) %
0x40) == 0))) { 0x40) == 0))) {
ptxdesc->txdw0 |= cpu_to_le32 ptxdesc->txdw0 |= cpu_to_le32
(((TXDESC_SIZE + OFFSET_SZ + 8) << OFFSET_SHT) & (((TXDESC_SIZE + OFFSET_SZ + 8) << OFFSET_SHT) &
0x00ff0000); 0x00ff0000);
...@@ -387,8 +381,8 @@ void r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf, ...@@ -387,8 +381,8 @@ void r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,
0x00ff0000); 0x00ff0000);
/*default = 32 bytes for TX Desc*/ /*default = 32 bytes for TX Desc*/
} }
r8712_write_port(pxmitframe->padapter, RTL8712_DMA_H2CCMD, r8712_write_port(pxmitframe->padapter, RTL8712_DMA_H2CCMD, total_length + TXDESC_SIZE,
total_length + TXDESC_SIZE, (u8 *)pxmitframe); (u8 *)pxmitframe);
} }
#endif #endif
...@@ -618,14 +612,12 @@ int r8712_xmitframe_complete(struct _adapter *padapter, ...@@ -618,14 +612,12 @@ int r8712_xmitframe_complete(struct _adapter *padapter,
pxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry); pxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry);
/* need to remember the 1st frame */ /* need to remember the 1st frame */
if (pxmitframe) { if (pxmitframe) {
#ifdef CONFIG_R8712_TX_AGGR #ifdef CONFIG_R8712_TX_AGGR
/* 1. dequeue 2nd frame /* 1. dequeue 2nd frame
* 2. aggr if 2nd xframe is dequeued, else dump directly * 2. aggr if 2nd xframe is dequeued, else dump directly
*/ */
if (AGGR_NR_HIGH_BOUND > 1) if (AGGR_NR_HIGH_BOUND > 1)
p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry);
hwentry);
if (pxmitframe->frame_tag != DATA_FRAMETAG) { if (pxmitframe->frame_tag != DATA_FRAMETAG) {
r8712_free_xmitbuf(pxmitpriv, pxmitbuf); r8712_free_xmitbuf(pxmitpriv, pxmitbuf);
return false; return false;
...@@ -639,16 +631,12 @@ int r8712_xmitframe_complete(struct _adapter *padapter, ...@@ -639,16 +631,12 @@ int r8712_xmitframe_complete(struct _adapter *padapter,
if (p2ndxmitframe) { if (p2ndxmitframe) {
u16 total_length; u16 total_length;
total_length = r8712_xmitframe_aggr_next( total_length = r8712_xmitframe_aggr_next(pxmitbuf, p2ndxmitframe);
pxmitbuf, p2ndxmitframe);
do { do {
p2ndxmitframe = dequeue_xframe_ex( p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry);
pxmitpriv, phwxmits, hwentry);
if (p2ndxmitframe) if (p2ndxmitframe)
total_length = total_length =
r8712_xmitframe_aggr_next( r8712_xmitframe_aggr_next(pxmitbuf, p2ndxmitframe);
pxmitbuf,
p2ndxmitframe);
else else
break; break;
} while (total_length <= 0x1800 && } while (total_length <= 0x1800 &&
...@@ -662,8 +650,8 @@ int r8712_xmitframe_complete(struct _adapter *padapter, ...@@ -662,8 +650,8 @@ int r8712_xmitframe_complete(struct _adapter *padapter,
xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf); xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf);
if (pxmitframe->frame_tag == DATA_FRAMETAG) { if (pxmitframe->frame_tag == DATA_FRAMETAG) {
if (pxmitframe->attrib.priority <= 15) if (pxmitframe->attrib.priority <= 15)
res = r8712_xmitframe_coalesce(padapter, res = r8712_xmitframe_coalesce(padapter, pxmitframe->pkt,
pxmitframe->pkt, pxmitframe); pxmitframe);
/* always return ndis_packet after /* always return ndis_packet after
* r8712_xmitframe_coalesce * r8712_xmitframe_coalesce
*/ */
...@@ -714,10 +702,10 @@ static void dump_xframe(struct _adapter *padapter, ...@@ -714,10 +702,10 @@ static void dump_xframe(struct _adapter *padapter,
ff_hwaddr = get_ff_hwaddr(pxmitframe); ff_hwaddr = get_ff_hwaddr(pxmitframe);
#ifdef CONFIG_R8712_TX_AGGR #ifdef CONFIG_R8712_TX_AGGR
r8712_write_port(padapter, RTL8712_DMA_H2CCMD, w_sz, r8712_write_port(padapter, RTL8712_DMA_H2CCMD, w_sz,
(unsigned char *)pxmitframe); (unsigned char *)pxmitframe);
#else #else
r8712_write_port(padapter, ff_hwaddr, w_sz, r8712_write_port(padapter, ff_hwaddr, w_sz,
(unsigned char *)pxmitframe); (unsigned char *)pxmitframe);
#endif #endif
mem_addr += w_sz; mem_addr += w_sz;
mem_addr = (u8 *)RND4(((addr_t)(mem_addr))); mem_addr = (u8 *)RND4(((addr_t)(mem_addr)));
......
This diff is collapsed.
...@@ -716,39 +716,28 @@ struct DisconnectCtrlEx_param { ...@@ -716,39 +716,28 @@ struct DisconnectCtrlEx_param {
#define H2C_RESERVED 0x07 #define H2C_RESERVED 0x07
void r8712_setMacAddr_cmd(struct _adapter *padapter, const u8 *mac_addr); void r8712_setMacAddr_cmd(struct _adapter *padapter, const u8 *mac_addr);
u8 r8712_sitesurvey_cmd(struct _adapter *padapter, u8 r8712_sitesurvey_cmd(struct _adapter *padapter, struct ndis_802_11_ssid *pssid);
struct ndis_802_11_ssid *pssid);
int r8712_createbss_cmd(struct _adapter *padapter); int r8712_createbss_cmd(struct _adapter *padapter);
void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key); void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key);
int r8712_joinbss_cmd(struct _adapter *padapter, int r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork);
struct wlan_network *pnetwork);
void r8712_disassoc_cmd(struct _adapter *padapter); void r8712_disassoc_cmd(struct _adapter *padapter);
void r8712_setopmode_cmd(struct _adapter *padapter, void r8712_setopmode_cmd(struct _adapter *padapter, enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
int r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset); int r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset);
void r8712_set_chplan_cmd(struct _adapter *padapter, int chplan); void r8712_set_chplan_cmd(struct _adapter *padapter, int chplan);
int r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval); int r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval);
int r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val); int r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val);
void r8712_addbareq_cmd(struct _adapter *padapter, u8 tid); void r8712_addbareq_cmd(struct _adapter *padapter, u8 tid);
void r8712_wdg_wk_cmd(struct _adapter *padapter); void r8712_wdg_wk_cmd(struct _adapter *padapter);
void r8712_survey_cmd_callback(struct _adapter *padapter, void r8712_survey_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
struct cmd_obj *pcmd); void r8712_disassoc_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
void r8712_disassoc_cmd_callback(struct _adapter *padapter, void r8712_joinbss_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
struct cmd_obj *pcmd); void r8712_createbss_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
void r8712_joinbss_cmd_callback(struct _adapter *padapter, void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
struct cmd_obj *pcmd); void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
void r8712_createbss_cmd_callback(struct _adapter *padapter, void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
struct cmd_obj *pcmd); void r8712_setassocsta_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter, void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, u32 tryPktCnt,
struct cmd_obj *pcmd); u32 tryPktInterval, u32 firstStageTO);
void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter,
struct cmd_obj *pcmd);
void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter,
struct cmd_obj *pcmd);
void r8712_setassocsta_cmdrsp_callback(struct _adapter *padapter,
struct cmd_obj *pcmd);
void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl,
u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO);
struct _cmd_callback { struct _cmd_callback {
u32 cmd_code; u32 cmd_code;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment