* [PATCH] rtl8723au: Corrections in the coding style
@ 2014-07-13 1:35 Raphael Silva
2014-07-13 7:25 ` Jes Sorensen
0 siblings, 1 reply; 5+ messages in thread
From: Raphael Silva @ 2014-07-13 1:35 UTC (permalink / raw)
To: linux-wireless; +Cc: Larry.Finger, Jes.Sorensen, Raphael Silva
Some corrections were made to the code in order to conform to the
Kernel Coding Style.
---
drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 42 ++++++++++++++++++----------
1 file changed, 27 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
index 8db844b..0290a9e 100644
--- a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
@@ -26,7 +26,7 @@ static const u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
static void _rtw_init_stainfo(struct sta_info *psta)
{
- memset((u8 *)psta, 0, sizeof (struct sta_info));
+ memset((u8 *)psta, 0, sizeof(struct sta_info));
spin_lock_init(&psta->lock);
INIT_LIST_HEAD(&psta->list);
INIT_LIST_HEAD(&psta->hash_list);
@@ -71,8 +71,10 @@ int _rtw_init_sta_priv23a(struct sta_priv *pstapriv)
pstapriv->auth_list_cnt = 0;
pstapriv->auth_to = 3; /* 3*2 = 6 sec */
pstapriv->assoc_to = 3;
- /* pstapriv->expire_to = 900; 900*2 = 1800 sec = 30 min, expire after no any traffic. */
- /* pstapriv->expire_to = 30; 30*2 = 60 sec = 1 min, expire after no any traffic. */
+ /* pstapriv->expire_to = 900; 900*2 = 1800 sec = 30 min,
+ expire after no any traffic. */
+ /* pstapriv->expire_to = 30; 30*2 = 60 sec = 1 min,
+ expire after no any traffic. */
pstapriv->expire_to = 3; /* 3*2 = 6 sec */
pstapriv->max_num_sta = NUM_STA;
#endif
@@ -94,6 +96,7 @@ int _rtw_free_sta_priv23a(struct sta_priv *pstapriv)
list_for_each_safe(plist, ptmp, phead) {
int i;
+
psta = container_of(plist, struct sta_info,
hash_list);
for (i = 0; i < 16 ; i++) {
@@ -144,14 +147,17 @@ rtw_alloc_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr, gfp_t gfp)
list_add_tail(&psta->hash_list, phash_list);
- pstapriv->asoc_sta_count ++ ;
+ pstapriv->asoc_sta_count++;
-/* For the SMC router, the sequence number of first packet of WPS handshake will be 0. */
-/* In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable. */
+/* For the SMC router, the sequence number of first packet of WPS
+ handshake will be 0. */
+/* In this case, this packet will be dropped by recv_decache function
+ if we use the 0x00 as the default value for tid_rxseq variable. */
/* So, we initialize the tid_rxseq variable as the 0xffff. */
for (i = 0; i < 16; i++)
- memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
+ memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i],
+ &wRxSeqInitialValue, 2);
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_info_,
("alloc number_%d stainfo with hwaddr = %pM\n",
@@ -242,8 +248,12 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
spin_unlock_bh(&pxmitpriv->lock);
list_del_init(&psta->hash_list);
- RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x \n", pstapriv->asoc_sta_count, psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2], psta->hwaddr[3], psta->hwaddr[4], psta->hwaddr[5]));
- pstapriv->asoc_sta_count --;
+ RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_,
+ ("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n",
+ pstapriv->asoc_sta_count, psta->hwaddr[0],
+ psta->hwaddr[1], psta->hwaddr[2], psta->hwaddr[3],
+ psta->hwaddr[4], psta->hwaddr[5]));
+ pstapriv->asoc_sta_count-;
/* re-init sta_info; 20061114 will be init in alloc_stainfo */
/* _rtw_init_sta_xmit_priv23a(&psta->sta_xmitpriv); */
@@ -251,7 +261,8 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
del_timer_sync(&psta->addba_retry_timer);
- /* for A-MPDU Rx reordering buffer control, cancel reordering_ctrl_timer */
+ /* for A-MPDU Rx reordering buffer control,
+ cancel reordering_ctrl_timer */
for (i = 0; i < 16; i++) {
struct list_head *phead, *plist;
struct recv_frame *prframe;
@@ -261,7 +272,8 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
del_timer_sync(&preorder_ctrl->reordering_ctrl_timer);
- ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
+ ppending_recvframe_queue =
+ &preorder_ctrl->pending_recvframe_queue;
spin_lock_bh(&ppending_recvframe_queue->lock);
phead = get_list_head(ppending_recvframe_queue);
@@ -301,7 +313,7 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
pstapriv->sta_dz_bitmap &= ~CHKBIT(psta->aid);
pstapriv->tim_bitmap &= ~CHKBIT(psta->aid);
- if ((psta->aid >0) && (pstapriv->sta_aid[psta->aid - 1] == psta)) {
+ if ((psta->aid > 0) && (pstapriv->sta_aid[psta->aid - 1] == psta)) {
pstapriv->sta_aid[psta->aid - 1] = NULL;
psta->aid = 0;
}
@@ -318,7 +330,7 @@ void rtw_free_all_stainfo23a(struct rtw_adapter *padapter)
struct list_head *plist, *phead, *ptmp;
struct sta_info *psta;
struct sta_priv *pstapriv = &padapter->stapriv;
- struct sta_info* pbcmc_stainfo = rtw_get_bcmc_stainfo23a(padapter);
+ struct sta_info *pbcmc_stainfo = rtw_get_bcmc_stainfo23a(padapter);
s32 index;
if (pstapriv->asoc_sta_count == 1)
@@ -332,7 +344,7 @@ void rtw_free_all_stainfo23a(struct rtw_adapter *padapter)
list_for_each_safe(plist, ptmp, phead) {
psta = container_of(plist, struct sta_info, hash_list);
- if (pbcmc_stainfo!= psta)
+ if (pbcmc_stainfo != psta)
rtw_free_stainfo23a(padapter, psta);
}
}
@@ -374,7 +386,7 @@ struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr)
return psta;
}
-int rtw_init_bcmc_stainfo23a(struct rtw_adapter* padapter)
+int rtw_init_bcmc_stainfo23a(struct rtw_adapter *padapter)
{
struct sta_priv *pstapriv = &padapter->stapriv;
struct sta_info *psta;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] rtl8723au: Corrections in the coding style
2014-07-13 1:35 [PATCH] rtl8723au: Corrections in the coding style Raphael Silva
@ 2014-07-13 7:25 ` Jes Sorensen
0 siblings, 0 replies; 5+ messages in thread
From: Jes Sorensen @ 2014-07-13 7:25 UTC (permalink / raw)
To: Raphael Silva; +Cc: linux-wireless, Larry.Finger
Raphael Silva <rapphil@gmail.com> writes:
> Some corrections were made to the code in order to conform to the
> Kernel Coding Style.
> ---
> drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 42 ++++++++++++++++++----------
> 1 file changed, 27 insertions(+), 15 deletions(-)
Raphael,
Thank you for the patch, however we cannot accept it without the
required Signed-off-by line.
Please see Documentation/SubmittingPatches for details.
Thanks,
Jes
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] rtl8723au: Corrections in the coding style
@ 2014-07-13 12:28 Raphael Silva
2014-07-16 8:33 ` Jes Sorensen
0 siblings, 1 reply; 5+ messages in thread
From: Raphael Silva @ 2014-07-13 12:28 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: linux-wireless, Larry.Finger, Raphael Silva
Some corrections were made to the code in order to conform to the
Kernel Coding Style.
Signed-off-by: Raphael Silva <rapphil@gmail.com>
---
drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 42 ++++++++++++++++++----------
1 file changed, 27 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
index 8db844b..0290a9e 100644
--- a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
@@ -26,7 +26,7 @@ static const u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
static void _rtw_init_stainfo(struct sta_info *psta)
{
- memset((u8 *)psta, 0, sizeof (struct sta_info));
+ memset((u8 *)psta, 0, sizeof(struct sta_info));
spin_lock_init(&psta->lock);
INIT_LIST_HEAD(&psta->list);
INIT_LIST_HEAD(&psta->hash_list);
@@ -71,8 +71,10 @@ int _rtw_init_sta_priv23a(struct sta_priv *pstapriv)
pstapriv->auth_list_cnt = 0;
pstapriv->auth_to = 3; /* 3*2 = 6 sec */
pstapriv->assoc_to = 3;
- /* pstapriv->expire_to = 900; 900*2 = 1800 sec = 30 min, expire after no any traffic. */
- /* pstapriv->expire_to = 30; 30*2 = 60 sec = 1 min, expire after no any traffic. */
+ /* pstapriv->expire_to = 900; 900*2 = 1800 sec = 30 min,
+ expire after no any traffic. */
+ /* pstapriv->expire_to = 30; 30*2 = 60 sec = 1 min,
+ expire after no any traffic. */
pstapriv->expire_to = 3; /* 3*2 = 6 sec */
pstapriv->max_num_sta = NUM_STA;
#endif
@@ -94,6 +96,7 @@ int _rtw_free_sta_priv23a(struct sta_priv *pstapriv)
list_for_each_safe(plist, ptmp, phead) {
int i;
+
psta = container_of(plist, struct sta_info,
hash_list);
for (i = 0; i < 16 ; i++) {
@@ -144,14 +147,17 @@ rtw_alloc_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr, gfp_t gfp)
list_add_tail(&psta->hash_list, phash_list);
- pstapriv->asoc_sta_count ++ ;
+ pstapriv->asoc_sta_count++;
-/* For the SMC router, the sequence number of first packet of WPS handshake will be 0. */
-/* In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable. */
+/* For the SMC router, the sequence number of first packet of WPS
+ handshake will be 0. */
+/* In this case, this packet will be dropped by recv_decache function
+ if we use the 0x00 as the default value for tid_rxseq variable. */
/* So, we initialize the tid_rxseq variable as the 0xffff. */
for (i = 0; i < 16; i++)
- memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
+ memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i],
+ &wRxSeqInitialValue, 2);
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_info_,
("alloc number_%d stainfo with hwaddr = %pM\n",
@@ -242,8 +248,12 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
spin_unlock_bh(&pxmitpriv->lock);
list_del_init(&psta->hash_list);
- RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x \n", pstapriv->asoc_sta_count, psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2], psta->hwaddr[3], psta->hwaddr[4], psta->hwaddr[5]));
- pstapriv->asoc_sta_count --;
+ RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_,
+ ("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n",
+ pstapriv->asoc_sta_count, psta->hwaddr[0],
+ psta->hwaddr[1], psta->hwaddr[2], psta->hwaddr[3],
+ psta->hwaddr[4], psta->hwaddr[5]));
+ pstapriv->asoc_sta_count-;
/* re-init sta_info; 20061114 will be init in alloc_stainfo */
/* _rtw_init_sta_xmit_priv23a(&psta->sta_xmitpriv); */
@@ -251,7 +261,8 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
del_timer_sync(&psta->addba_retry_timer);
- /* for A-MPDU Rx reordering buffer control, cancel reordering_ctrl_timer */
+ /* for A-MPDU Rx reordering buffer control,
+ cancel reordering_ctrl_timer */
for (i = 0; i < 16; i++) {
struct list_head *phead, *plist;
struct recv_frame *prframe;
@@ -261,7 +272,8 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
del_timer_sync(&preorder_ctrl->reordering_ctrl_timer);
- ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
+ ppending_recvframe_queue =
+ &preorder_ctrl->pending_recvframe_queue;
spin_lock_bh(&ppending_recvframe_queue->lock);
phead = get_list_head(ppending_recvframe_queue);
@@ -301,7 +313,7 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
pstapriv->sta_dz_bitmap &= ~CHKBIT(psta->aid);
pstapriv->tim_bitmap &= ~CHKBIT(psta->aid);
- if ((psta->aid >0) && (pstapriv->sta_aid[psta->aid - 1] == psta)) {
+ if ((psta->aid > 0) && (pstapriv->sta_aid[psta->aid - 1] == psta)) {
pstapriv->sta_aid[psta->aid - 1] = NULL;
psta->aid = 0;
}
@@ -318,7 +330,7 @@ void rtw_free_all_stainfo23a(struct rtw_adapter *padapter)
struct list_head *plist, *phead, *ptmp;
struct sta_info *psta;
struct sta_priv *pstapriv = &padapter->stapriv;
- struct sta_info* pbcmc_stainfo = rtw_get_bcmc_stainfo23a(padapter);
+ struct sta_info *pbcmc_stainfo = rtw_get_bcmc_stainfo23a(padapter);
s32 index;
if (pstapriv->asoc_sta_count == 1)
@@ -332,7 +344,7 @@ void rtw_free_all_stainfo23a(struct rtw_adapter *padapter)
list_for_each_safe(plist, ptmp, phead) {
psta = container_of(plist, struct sta_info, hash_list);
- if (pbcmc_stainfo!= psta)
+ if (pbcmc_stainfo != psta)
rtw_free_stainfo23a(padapter, psta);
}
}
@@ -374,7 +386,7 @@ struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr)
return psta;
}
-int rtw_init_bcmc_stainfo23a(struct rtw_adapter* padapter)
+int rtw_init_bcmc_stainfo23a(struct rtw_adapter *padapter)
{
struct sta_priv *pstapriv = &padapter->stapriv;
struct sta_info *psta;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] rtl8723au: Corrections in the coding style
2014-07-13 12:28 Raphael Silva
@ 2014-07-16 8:33 ` Jes Sorensen
2014-07-16 10:05 ` Raphael Philipe
0 siblings, 1 reply; 5+ messages in thread
From: Jes Sorensen @ 2014-07-16 8:33 UTC (permalink / raw)
To: Raphael Silva; +Cc: linux-wireless, Larry.Finger
Raphael Silva <rapphil@gmail.com> writes:
> Some corrections were made to the code in order to conform to the
> Kernel Coding Style.
>
> Signed-off-by: Raphael Silva <rapphil@gmail.com>
> ---
> drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 42 ++++++++++++++++++----------
> 1 file changed, 27 insertions(+), 15 deletions(-)
[jes@yoga jes.git]$ make drivers/staging/rtl8723au/r8723au.ko
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CC [M] drivers/staging/rtl8723au/core/rtw_sta_mgt.o
drivers/staging/rtl8723au/core/rtw_sta_mgt.c: In function 'rtw_free_stainfo23a':
drivers/staging/rtl8723au/core/rtw_sta_mgt.c:256:27: error: expected expression before ';' token
pstapriv->asoc_sta_count-;
^
I fixed this up this time - next time, compile your patches before you
post them.
Thank you,
Jes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rtl8723au: Corrections in the coding style
2014-07-16 8:33 ` Jes Sorensen
@ 2014-07-16 10:05 ` Raphael Philipe
0 siblings, 0 replies; 5+ messages in thread
From: Raphael Philipe @ 2014-07-16 10:05 UTC (permalink / raw)
To: Jes Sorensen; +Cc: linux-wireless, Larry.Finger
Lesson Learned.
Thank you.
Raphael
On Wed, Jul 16, 2014 at 5:33 AM, Jes Sorensen <Jes.Sorensen@redhat.com> wrote:
> Raphael Silva <rapphil@gmail.com> writes:
>> Some corrections were made to the code in order to conform to the
>> Kernel Coding Style.
>>
>> Signed-off-by: Raphael Silva <rapphil@gmail.com>
>> ---
>> drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 42 ++++++++++++++++++----------
>> 1 file changed, 27 insertions(+), 15 deletions(-)
>
> [jes@yoga jes.git]$ make drivers/staging/rtl8723au/r8723au.ko
> CHK include/config/kernel.release
> CHK include/generated/uapi/linux/version.h
> CHK include/generated/utsrelease.h
> CALL scripts/checksyscalls.sh
> CC [M] drivers/staging/rtl8723au/core/rtw_sta_mgt.o
> drivers/staging/rtl8723au/core/rtw_sta_mgt.c: In function 'rtw_free_stainfo23a':
> drivers/staging/rtl8723au/core/rtw_sta_mgt.c:256:27: error: expected expression before ';' token
> pstapriv->asoc_sta_count-;
> ^
> I fixed this up this time - next time, compile your patches before you
> post them.
>
> Thank you,
> Jes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-16 10:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-13 1:35 [PATCH] rtl8723au: Corrections in the coding style Raphael Silva
2014-07-13 7:25 ` Jes Sorensen
-- strict thread matches above, loose matches on Subject: below --
2014-07-13 12:28 Raphael Silva
2014-07-16 8:33 ` Jes Sorensen
2014-07-16 10:05 ` Raphael Philipe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).