* [PATCH 1/6] staging: rtl8188eu: use is_multicast_ether_addr
@ 2018-08-02 17:18 Michael Straube
2018-08-02 17:18 ` [PATCH 2/6] " Michael Straube
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Michael Straube @ 2018-08-02 17:18 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Use is_multicast_ether_addr instead of custom IS_MCAST in
os_dep/recv_linux.c.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index deadf26ea2aa..6f74f49bf3ab 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -84,11 +84,11 @@ int rtw_recv_indicatepkt(struct adapter *padapter,
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
- int bmcast = IS_MCAST(pattrib->dst);
+ bool mcast = is_multicast_ether_addr(pattrib->dst);
if (memcmp(pattrib->dst, myid(&padapter->eeprompriv),
ETH_ALEN)) {
- if (bmcast) {
+ if (mcast) {
psta = rtw_get_bcmc_stainfo(padapter);
pskb2 = skb_clone(skb, GFP_ATOMIC);
} else {
@@ -104,7 +104,7 @@ int rtw_recv_indicatepkt(struct adapter *padapter,
rtw_xmit_entry(skb, pnetdev);
- if (bmcast)
+ if (mcast)
skb = pskb2;
else
goto _recv_indicatepkt_end;
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/6] staging: rtl8188eu: use is_multicast_ether_addr
2018-08-02 17:18 [PATCH 1/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
@ 2018-08-02 17:18 ` Michael Straube
2018-08-05 14:16 ` Greg KH
2018-08-02 17:18 ` [PATCH 3/6] staging: rtl8188eu: cleanup block comment - style Michael Straube
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Michael Straube @ 2018-08-02 17:18 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Use is_multicast_ether_addr instead of custom IS_MCAST in
hal/rtl8188eu_xmit.c.
There is only one use, so remove the extra variable for the
result of IS_MCAST.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
index 14622eee56ca..82fc5075e0a6 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
@@ -167,7 +167,6 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
struct tx_desc *ptxdesc = (struct tx_desc *)pmem;
struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- int bmcst = IS_MCAST(pattrib->ra);
if (adapt->registrypriv.mp_mode == 0) {
if ((!bagg_pkt) && (urb_zero_packet_chk(adapt, sz) == 0)) {
@@ -186,7 +185,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
ptxdesc->txdw0 |= cpu_to_le32(((offset) << OFFSET_SHT) & 0x00ff0000);/* 32 bytes for TX Desc */
- if (bmcst)
+ if (is_multicast_ether_addr(pattrib->ra))
ptxdesc->txdw0 |= cpu_to_le32(BMC);
if (adapt->registrypriv.mp_mode == 0) {
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/6] staging: rtl8188eu: cleanup block comment - style
2018-08-02 17:18 [PATCH 1/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
2018-08-02 17:18 ` [PATCH 2/6] " Michael Straube
@ 2018-08-02 17:18 ` Michael Straube
2018-08-02 17:18 ` [PATCH 4/6] staging: rtl8188eu: remove whitespace " Michael Straube
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2018-08-02 17:18 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Cleanup a block comment to conform with kernel coding style.
Also cleans 'line over 80 characters' checkpatch warnings.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
index 82fc5075e0a6..6925ec48dff1 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
@@ -43,9 +43,11 @@ static void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc)
ptxdesc->txdw7 |= cpu_to_le32(0x0000ffff & checksum);
}
-/* Description: In normal chip, we should send some packet to Hw which will be used by Fw */
-/* in FW LPS mode. The function is to fill the Tx descriptor of this packets, then */
-/* Fw can tell Hw to send these packet derectly. */
+/*
+ * In normal chip, we should send some packet to Hw which will be used by Fw
+ * in FW LPS mode. The function is to fill the Tx descriptor of this packets,
+ * then Fw can tell Hw to send these packet derectly.
+ */
void rtl8188e_fill_fake_txdesc(struct adapter *adapt, u8 *desc, u32 BufferLen, u8 ispspoll, u8 is_btqosnull)
{
struct tx_desc *ptxdesc;
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/6] staging: rtl8188eu: remove whitespace - style
2018-08-02 17:18 [PATCH 1/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
2018-08-02 17:18 ` [PATCH 2/6] " Michael Straube
2018-08-02 17:18 ` [PATCH 3/6] staging: rtl8188eu: cleanup block comment - style Michael Straube
@ 2018-08-02 17:18 ` Michael Straube
2018-08-02 17:18 ` [PATCH 5/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
2018-08-02 17:18 ` [PATCH 6/6] staging: rtl8188eu: remove whitespace, add missing blank line Michael Straube
4 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2018-08-02 17:18 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Replace tabs with spaces and/or remove spaces where appropriate.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
.../staging/rtl8188eu/hal/rtl8188eu_xmit.c | 22 +++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
index 6925ec48dff1..a11bee16d070 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
@@ -15,7 +15,7 @@
s32 rtw_hal_init_xmit_priv(struct adapter *adapt)
{
- struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
+ struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
tasklet_init(&pxmitpriv->xmit_tasklet,
(void(*)(unsigned long))rtl8188eu_xmit_tasklet,
@@ -30,8 +30,8 @@ static u8 urb_zero_packet_chk(struct adapter *adapt, int sz)
static void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc)
{
- u16 *usptr = (u16 *)ptxdesc;
- u32 count = 16; /* (32 bytes / 2 bytes per XOR) => 16 times */
+ u16 *usptr = (u16 *)ptxdesc;
+ u32 count = 16; /* (32 bytes / 2 bytes per XOR) => 16 times */
u32 index;
u16 checksum = 0;
@@ -160,15 +160,15 @@ static void fill_txdesc_phy(struct pkt_attrib *pattrib, __le32 *pdw)
static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bagg_pkt)
{
- int pull = 0;
- uint qsel;
+ int pull = 0;
+ uint qsel;
u8 data_rate, pwr_status, offset;
- struct adapter *adapt = pxmitframe->padapter;
- struct pkt_attrib *pattrib = &pxmitframe->attrib;
+ struct adapter *adapt = pxmitframe->padapter;
+ struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct odm_dm_struct *odmpriv = &adapt->HalData->odmpriv;
- struct tx_desc *ptxdesc = (struct tx_desc *)pmem;
- struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv;
- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
+ struct tx_desc *ptxdesc = (struct tx_desc *)pmem;
+ struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv;
+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
if (adapt->registrypriv.mp_mode == 0) {
if ((!bagg_pkt) && (urb_zero_packet_chk(adapt, sz) == 0)) {
@@ -328,7 +328,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
return pull;
}
-/* for non-agg data frame or management frame */
+/* for non-agg data frame or management frame */
static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
{
s32 ret = _SUCCESS;
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/6] staging: rtl8188eu: use is_multicast_ether_addr
2018-08-02 17:18 [PATCH 1/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
` (2 preceding siblings ...)
2018-08-02 17:18 ` [PATCH 4/6] staging: rtl8188eu: remove whitespace " Michael Straube
@ 2018-08-02 17:18 ` Michael Straube
2018-08-05 14:17 ` Greg KH
2018-08-02 17:18 ` [PATCH 6/6] staging: rtl8188eu: remove whitespace, add missing blank line Michael Straube
4 siblings, 1 reply; 8+ messages in thread
From: Michael Straube @ 2018-08-02 17:18 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Use is_multicast_ether_addr instead of custom IS_MCAST in
core/rtw_sta_mgt.c.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
index 53e518148ae5..34c3e2af63c1 100644
--- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
@@ -414,7 +414,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
if (!hwaddr)
return NULL;
- if (IS_MCAST(hwaddr))
+ if (is_multicast_ether_addr(hwaddr))
addr = bc_addr;
else
addr = hwaddr;
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/6] staging: rtl8188eu: remove whitespace, add missing blank line
2018-08-02 17:18 [PATCH 1/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
` (3 preceding siblings ...)
2018-08-02 17:18 ` [PATCH 5/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
@ 2018-08-02 17:18 ` Michael Straube
4 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2018-08-02 17:18 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Replace tabs with spaces and/or remove spaces where appropriate.
Add a missing blank line after declarations.
Also clears checkpatch warnings.
WARNING: Statements should start on a tabstop
WARNING: suspect code indent for conditional statements (8, 17)
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 37 ++++++++++----------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
index 34c3e2af63c1..f12a12b19d3f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
@@ -18,7 +18,7 @@ static void _rtw_init_stainfo(struct sta_info *psta)
{
memset((u8 *)psta, 0, sizeof(struct sta_info));
- spin_lock_init(&psta->lock);
+ spin_lock_init(&psta->lock);
INIT_LIST_HEAD(&psta->list);
INIT_LIST_HEAD(&psta->hash_list);
_rtw_init_queue(&psta->sleep_q);
@@ -55,7 +55,7 @@ static void _rtw_init_stainfo(struct sta_info *psta)
#endif /* CONFIG_88EU_AP_MODE */
}
-u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
+u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
{
struct sta_info *psta;
s32 i;
@@ -127,15 +127,15 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int
return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
}
-u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
+u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
{
struct list_head *phead, *plist;
struct sta_info *psta = NULL;
struct recv_reorder_ctrl *preorder_ctrl;
- int index;
+ int index;
if (pstapriv) {
- /* delete all reordering_ctrl_timer */
+ /* delete all reordering_ctrl_timer */
spin_lock_bh(&pstapriv->sta_hash_lock);
for (index = 0; index < NUM_STA; index++) {
phead = &pstapriv->sta_hash[index];
@@ -171,7 +171,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
struct __queue *pfree_sta_queue;
struct recv_reorder_ctrl *preorder_ctrl;
int i = 0;
- u16 wRxSeqInitialValue = 0xffff;
+ u16 wRxSeqInitialValue = 0xffff;
pfree_sta_queue = &pstapriv->free_sta_queue;
@@ -243,14 +243,14 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
}
/* using pstapriv->sta_hash_lock to protect */
-u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
+u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
{
int i;
struct __queue *pfree_sta_queue;
struct recv_reorder_ctrl *preorder_ctrl;
- struct sta_xmit_priv *pstaxmitpriv;
- struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
- struct sta_priv *pstapriv = &padapter->stapriv;
+ struct sta_xmit_priv *pstaxmitpriv;
+ struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
+ struct sta_priv *pstapriv = &padapter->stapriv;
if (!psta)
goto exit;
@@ -376,9 +376,9 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
void rtw_free_all_stainfo(struct adapter *padapter)
{
struct list_head *plist, *phead;
- s32 index;
+ s32 index;
struct sta_info *psta = NULL;
- struct sta_priv *pstapriv = &padapter->stapriv;
+ struct sta_priv *pstapriv = &padapter->stapriv;
struct sta_info *pbcmc_stainfo = rtw_get_bcmc_stainfo(padapter);
if (pstapriv->asoc_sta_count == 1)
@@ -407,7 +407,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
{
struct list_head *plist, *phead;
struct sta_info *psta = NULL;
- u32 index;
+ u32 index;
u8 *addr;
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
@@ -443,10 +443,10 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
{
- struct sta_info *psta;
+ struct sta_info *psta;
u32 res = _SUCCESS;
unsigned char bcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- struct sta_priv *pstapriv = &padapter->stapriv;
+ struct sta_priv *pstapriv = &padapter->stapriv;
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
@@ -465,9 +465,10 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter)
{
- struct sta_priv *pstapriv = &padapter->stapriv;
+ struct sta_priv *pstapriv = &padapter->stapriv;
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- return rtw_get_stainfo(pstapriv, bc_addr);
+
+ return rtw_get_stainfo(pstapriv, bc_addr);
}
u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
@@ -502,7 +503,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
else if (pacl_list->mode == 2)/* deny unless in accept list */
res = (match) ? true : false;
else
- res = true;
+ res = true;
#endif
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/6] staging: rtl8188eu: use is_multicast_ether_addr
2018-08-02 17:18 ` [PATCH 2/6] " Michael Straube
@ 2018-08-05 14:16 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2018-08-05 14:16 UTC (permalink / raw)
To: Michael Straube; +Cc: devel, linux-kernel
On Thu, Aug 02, 2018 at 07:18:19PM +0200, Michael Straube wrote:
> Use is_multicast_ether_addr instead of custom IS_MCAST in
> hal/rtl8188eu_xmit.c.
>
> There is only one use, so remove the extra variable for the
> result of IS_MCAST.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
THis is the same subject as patch 1/6 in this series, please fix up and
resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] staging: rtl8188eu: use is_multicast_ether_addr
2018-08-02 17:18 ` [PATCH 5/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
@ 2018-08-05 14:17 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2018-08-05 14:17 UTC (permalink / raw)
To: Michael Straube; +Cc: devel, linux-kernel
On Thu, Aug 02, 2018 at 07:18:22PM +0200, Michael Straube wrote:
> Use is_multicast_ether_addr instead of custom IS_MCAST in
> core/rtw_sta_mgt.c.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Same problem here, please just fix up the whole series and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-08-05 14:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 17:18 [PATCH 1/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
2018-08-02 17:18 ` [PATCH 2/6] " Michael Straube
2018-08-05 14:16 ` Greg KH
2018-08-02 17:18 ` [PATCH 3/6] staging: rtl8188eu: cleanup block comment - style Michael Straube
2018-08-02 17:18 ` [PATCH 4/6] staging: rtl8188eu: remove whitespace " Michael Straube
2018-08-02 17:18 ` [PATCH 5/6] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
2018-08-05 14:17 ` Greg KH
2018-08-02 17:18 ` [PATCH 6/6] staging: rtl8188eu: remove whitespace, add missing blank line Michael Straube
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.