staging: rtl8188eu: use is_multicast_ether_addr
PATCH 1/6 staging: rtl8188eu: use is_multicast_ether_addr
Use is_multicast_ether_addr instead of custom IS_MCAST in os_dep/recv_linux.c.
--- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/os_dep/recv_linux.c +3 -3
@@ -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;
Signature · 1 line
2.18.0
PATCH 2/6 staging: rtl8188eu: use is_multicast_ether_addr
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.
--- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +1 -2
@@ -167,7 +167,6 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bagstruct 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 ) {
Signature · 1 line
2.18.0
Greg KH
maintainerQuoted 10 lines · Michael Straube
Use
is_multicast_ether_addrinstead of customIS_MCASTinhal/rtl8188eu_xmit.c.There is only one use, so remove the extra variable for the result of
IS_MCAST.Signed-off-by Michael Straube <[email protected]>--- 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
PATCH 3/6 staging: rtl8188eu: cleanup block comment - style
In reply to Michael StraubeCleanup a block comment to conform with kernel coding style. Also cleans 'line over 80 characters' checkpatch warnings.
--- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +5 -3
@@ -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;
Signature · 1 line
2.18.0
PATCH 4/6 staging: rtl8188eu: remove whitespace - style
In reply to Michael StraubeReplace tabs with spaces and/or remove spaces where appropriate.
--- .../staging/rtl8188eu/hal/rtl8188eu_xmit.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +11 -11
@@ -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 bagreturn 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;
Signature · 1 line
2.18.0
PATCH 5/6 staging: rtl8188eu: use is_multicast_ether_addr
In reply to Michael StraubeUse is_multicast_ether_addr instead of custom IS_MCAST in core/rtw_sta_mgt.c.
--- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c +1 -1
@@ -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;
Signature · 1 line
2.18.0
Greg KH
maintainerQuoted 7 lines · Michael Straube
Use
is_multicast_ether_addrinstead of customIS_MCASTincore/rtw_sta_mgt.c.Signed-off-by Michael Straube <[email protected]>--- 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
PATCH 6/6 staging: rtl8188eu: remove whitespace, add missing blank line
In reply to Michael StraubeReplace 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)
--- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 37 ++++++++++---------- 1 file changed, 19 insertions(+), 18 deletions(-)
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c +19 -18
@@ -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, intreturn (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
Signature · 1 line
2.18.0