All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c
@ 2020-12-04 22:00 Brother Matthew De Angelis
  2020-12-05  2:55   ` kernel test robot
  2020-12-05  8:41 ` Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Brother Matthew De Angelis @ 2020-12-04 22:00 UTC (permalink / raw)
  To: gregkh, ross.schm.dev, pterjan, amarjargal16, vkor; +Cc: devel

Fix all the brace code style warnings found by checkpatch.pl at the
following lines:
748, 940, 1039, 1602, 1922, 1939.
At line 940 add a semi-colon to specify a line that does not execute
anything, as in Kernighan and Ritchie

Signed-off-by: Brother Matthew De Angelis <matthew.v.deangelis@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 43e67e48d2df..22030fe6e714 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -745,9 +745,8 @@ void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, struct
 
 	padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
 
-	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst))) {
+	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst)))
 		padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
-	}
 
 	if (sta)
 		psta = sta;
@@ -937,9 +936,8 @@ sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
 			goto exit;
 		}
 
-		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
-		}
-
+		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
+			;
 		if (GetFrameSubType(ptr) & BIT(6)) {
 			/* No data, will not indicate to upper layer, temporily count it here */
 			count_rx_stats(adapter, precv_frame, *psta);
@@ -1036,9 +1034,8 @@ sint sta2ap_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
 
 		process_pwrbit_data(adapter, precv_frame);
 
-		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
+		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
 			process_wmmps_data(adapter, precv_frame);
-		}
 
 		if (GetFrameSubType(ptr) & BIT(6)) {
 			/* No data, will not indicate to upper layer, temporily count it here */
@@ -1599,9 +1596,8 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
 	u8 *ptr = get_recvframe_data(precvframe) ; /*  point to frame_ctrl field */
 	struct rx_pkt_attrib *pattrib = &precvframe->u.hdr.attrib;
 
-	if (pattrib->encrypt) {
+	if (pattrib->encrypt)
 		recvframe_pull_tail(precvframe, pattrib->icv_len);
-	}
 
 	psnap = (struct ieee80211_snap_hdr	*)(ptr+pattrib->hdrlen + pattrib->iv_len);
 	psnap_type = ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
@@ -1919,9 +1915,8 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
 		a_len -= nSubframe_Length;
 		if (a_len != 0) {
 			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4-1));
-			if (padding_len == 4) {
+			if (padding_len == 4)
 				padding_len = 0;
-			}
 
 			if (a_len < padding_len) {
 				DBG_871X("ParseSubframe(): a_len < padding_len !\n");
@@ -1936,9 +1931,8 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
 		sub_pkt = subframes[i];
 
 		/* Indicate the packets to upper layer */
-		if (sub_pkt) {
+		if (sub_pkt)
 			rtw_os_recv_indicate_pkt(padapter, sub_pkt, &prframe->u.hdr.attrib);
-		}
 	}
 
 	prframe->u.hdr.len = 0;
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c
  2020-12-04 22:00 [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c Brother Matthew De Angelis
@ 2020-12-05  2:55   ` kernel test robot
  2020-12-05  8:41 ` Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-12-05  2:55 UTC (permalink / raw)
  To: Brother Matthew De Angelis, gregkh, ross.schm.dev, pterjan,
	amarjargal16, vkor
  Cc: devel, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8954 bytes --]

Hi Brother,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Brother-Matthew-De-Angelis/Staging-rtl8723bs-core-fix-brace-coding-style-issues-in-rtw_recv-c/20201205-060156
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 138f3e1265488a9163be7f379073297ba8545cca
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/fca364b8771a74ab2a2dc2079de520f744371298
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Brother-Matthew-De-Angelis/Staging-rtl8723bs-core-fix-brace-coding-style-issues-in-rtw_recv-c/20201205-060156
        git checkout fca364b8771a74ab2a2dc2079de520f744371298
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/rtl8723bs/include/drv_types.h:25,
                    from drivers/staging/rtl8723bs/core/rtw_recv.c:9:
   drivers/staging/rtl8723bs/include/ieee80211.h:745:1: warning: alignment 1 of 'struct ieee80211_assoc_request_frame' is less than 2 [-Wpacked-not-aligned]
     745 | } __attribute__ ((packed));
         | ^
   drivers/staging/rtl8723bs/include/ieee80211.h:752:1: warning: alignment 1 of 'struct ieee80211_assoc_response_frame' is less than 2 [-Wpacked-not-aligned]
     752 | } __attribute__ ((packed));
         | ^
   drivers/staging/rtl8723bs/core/rtw_recv.c: In function 'ap2sta_data_frame':
>> drivers/staging/rtl8723bs/core/rtw_recv.c:940:4: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
     940 |    ;
         |    ^
   drivers/staging/rtl8723bs/core/rtw_recv.c: In function 'rtw_signal_stat_timer_hdl':
   drivers/staging/rtl8723bs/core/rtw_recv.c:2573:6: warning: variable 'num_signal_qual' set but not used [-Wunused-but-set-variable]
    2573 |  u32 num_signal_qual = 0;
         |      ^~~~~~~~~~~~~~~
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:42,
                    from drivers/staging/rtl8723bs/core/rtw_recv.c:9:
   At top level:
   drivers/staging/rtl8723bs/include/rtw_security.h:371:28: warning: 'K' defined but not used [-Wunused-const-variable=]
     371 | static const unsigned long K[64] = {
         |                            ^

vim +/if +940 drivers/staging/rtl8723bs/core/rtw_recv.c

   860	
   861	sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
   862			       struct sta_info **psta);
   863	sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
   864			       struct sta_info **psta)
   865	{
   866		u8 *ptr = precv_frame->u.hdr.rx_data;
   867		struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
   868		sint ret = _SUCCESS;
   869		struct sta_priv *pstapriv = &adapter->stapriv;
   870		struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
   871		u8 *mybssid  = get_bssid(pmlmepriv);
   872		u8 *myhwaddr = myid(&adapter->eeprompriv);
   873		sint bmcast = IS_MCAST(pattrib->dst);
   874	
   875		if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) &&
   876		    (check_fwstate(pmlmepriv, _FW_LINKED) == true ||
   877		     check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
   878			) {
   879	
   880			/*  filter packets that SA is myself or multicast or broadcast */
   881			if (!memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
   882				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" SA ==myself\n"));
   883				#ifdef DBG_RX_DROP_FRAME
   884				DBG_871X("DBG_RX_DROP_FRAME %s SA =%pM, myhwaddr =%pM\n",
   885					__func__, MAC_ARG(pattrib->src), MAC_ARG(myhwaddr));
   886				#endif
   887				ret = _FAIL;
   888				goto exit;
   889			}
   890	
   891			/*  da should be for me */
   892			if ((memcmp(myhwaddr, pattrib->dst, ETH_ALEN)) && (!bmcast)) {
   893				RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
   894					(" ap2sta_data_frame:  compare DA fail; DA =%pM\n", MAC_ARG(pattrib->dst)));
   895				#ifdef DBG_RX_DROP_FRAME
   896				DBG_871X("DBG_RX_DROP_FRAME %s DA =%pM\n", __func__, MAC_ARG(pattrib->dst));
   897				#endif
   898				ret = _FAIL;
   899				goto exit;
   900			}
   901	
   902	
   903			/*  check BSSID */
   904			if (!memcmp(pattrib->bssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
   905			     !memcmp(mybssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
   906			     (memcmp(pattrib->bssid, mybssid, ETH_ALEN))) {
   907				RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
   908					(" ap2sta_data_frame:  compare BSSID fail ; BSSID =%pM\n", MAC_ARG(pattrib->bssid)));
   909				RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("mybssid =%pM\n", MAC_ARG(mybssid)));
   910				#ifdef DBG_RX_DROP_FRAME
   911				DBG_871X("DBG_RX_DROP_FRAME %s BSSID =%pM, mybssid =%pM\n",
   912					__func__, MAC_ARG(pattrib->bssid), MAC_ARG(mybssid));
   913				DBG_871X("this adapter = %d, buddy adapter = %d\n", adapter->adapter_type, adapter->pbuddystruct adapter->adapter_type);
   914				#endif
   915	
   916				if (!bmcast) {
   917					DBG_871X("issue_deauth to the nonassociated ap =%pM for the reason(7)\n", MAC_ARG(pattrib->bssid));
   918					issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
   919				}
   920	
   921				ret = _FAIL;
   922				goto exit;
   923			}
   924	
   925			if (bmcast)
   926				*psta = rtw_get_bcmc_stainfo(adapter);
   927			else
   928				*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get ap_info */
   929	
   930			if (!*psta) {
   931				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("ap2sta: can't get psta under STATION_MODE ; drop pkt\n"));
   932				#ifdef DBG_RX_DROP_FRAME
   933				DBG_871X("DBG_RX_DROP_FRAME %s can't get psta under STATION_MODE ; drop pkt\n", __func__);
   934				#endif
   935				ret = _FAIL;
   936				goto exit;
   937			}
   938	
   939			if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
 > 940				;
   941			if (GetFrameSubType(ptr) & BIT(6)) {
   942				/* No data, will not indicate to upper layer, temporily count it here */
   943				count_rx_stats(adapter, precv_frame, *psta);
   944				ret = RTW_RX_HANDLED;
   945				goto exit;
   946			}
   947	
   948		} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
   949			     (check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
   950			memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
   951			memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
   952			memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
   953			memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
   954			memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
   955	
   956			/*  */
   957			memcpy(pattrib->bssid,  mybssid, ETH_ALEN);
   958	
   959	
   960			*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get sta_info */
   961			if (!*psta) {
   962				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("can't get psta under MP_MODE ; drop pkt\n"));
   963				#ifdef DBG_RX_DROP_FRAME
   964				DBG_871X("DBG_RX_DROP_FRAME %s can't get psta under WIFI_MP_STATE ; drop pkt\n", __func__);
   965				#endif
   966				ret = _FAIL;
   967				goto exit;
   968			}
   969	
   970	
   971		} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
   972			/* Special case */
   973			ret = RTW_RX_HANDLED;
   974			goto exit;
   975		} else {
   976			if (!memcmp(myhwaddr, pattrib->dst, ETH_ALEN) && (!bmcast)) {
   977				*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get sta_info */
   978				if (!*psta) {
   979	
   980					/* for AP multicast issue , modify by yiwei */
   981					static unsigned long send_issue_deauth_time;
   982	
   983					/* DBG_871X("After send deauth , %u ms has elapsed.\n", jiffies_to_msecs(jiffies - send_issue_deauth_time)); */
   984	
   985					if (jiffies_to_msecs(jiffies - send_issue_deauth_time) > 10000 || send_issue_deauth_time == 0) {
   986						send_issue_deauth_time = jiffies;
   987	
   988						DBG_871X("issue_deauth to the ap =%pM for the reason(7)\n", MAC_ARG(pattrib->bssid));
   989	
   990						issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
   991					}
   992				}
   993			}
   994	
   995			ret = _FAIL;
   996			#ifdef DBG_RX_DROP_FRAME
   997			DBG_871X("DBG_RX_DROP_FRAME %s fw_state:0x%x\n", __func__, get_fwstate(pmlmepriv));
   998			#endif
   999		}
  1000	
  1001	exit:
  1002		return ret;
  1003	}
  1004	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66174 bytes --]

[-- Attachment #3: Type: text/plain, Size: 169 bytes --]

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c
@ 2020-12-05  2:55   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-12-05  2:55 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 9155 bytes --]

Hi Brother,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Brother-Matthew-De-Angelis/Staging-rtl8723bs-core-fix-brace-coding-style-issues-in-rtw_recv-c/20201205-060156
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 138f3e1265488a9163be7f379073297ba8545cca
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/fca364b8771a74ab2a2dc2079de520f744371298
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Brother-Matthew-De-Angelis/Staging-rtl8723bs-core-fix-brace-coding-style-issues-in-rtw_recv-c/20201205-060156
        git checkout fca364b8771a74ab2a2dc2079de520f744371298
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/rtl8723bs/include/drv_types.h:25,
                    from drivers/staging/rtl8723bs/core/rtw_recv.c:9:
   drivers/staging/rtl8723bs/include/ieee80211.h:745:1: warning: alignment 1 of 'struct ieee80211_assoc_request_frame' is less than 2 [-Wpacked-not-aligned]
     745 | } __attribute__ ((packed));
         | ^
   drivers/staging/rtl8723bs/include/ieee80211.h:752:1: warning: alignment 1 of 'struct ieee80211_assoc_response_frame' is less than 2 [-Wpacked-not-aligned]
     752 | } __attribute__ ((packed));
         | ^
   drivers/staging/rtl8723bs/core/rtw_recv.c: In function 'ap2sta_data_frame':
>> drivers/staging/rtl8723bs/core/rtw_recv.c:940:4: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
     940 |    ;
         |    ^
   drivers/staging/rtl8723bs/core/rtw_recv.c: In function 'rtw_signal_stat_timer_hdl':
   drivers/staging/rtl8723bs/core/rtw_recv.c:2573:6: warning: variable 'num_signal_qual' set but not used [-Wunused-but-set-variable]
    2573 |  u32 num_signal_qual = 0;
         |      ^~~~~~~~~~~~~~~
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:42,
                    from drivers/staging/rtl8723bs/core/rtw_recv.c:9:
   At top level:
   drivers/staging/rtl8723bs/include/rtw_security.h:371:28: warning: 'K' defined but not used [-Wunused-const-variable=]
     371 | static const unsigned long K[64] = {
         |                            ^

vim +/if +940 drivers/staging/rtl8723bs/core/rtw_recv.c

   860	
   861	sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
   862			       struct sta_info **psta);
   863	sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
   864			       struct sta_info **psta)
   865	{
   866		u8 *ptr = precv_frame->u.hdr.rx_data;
   867		struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
   868		sint ret = _SUCCESS;
   869		struct sta_priv *pstapriv = &adapter->stapriv;
   870		struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
   871		u8 *mybssid  = get_bssid(pmlmepriv);
   872		u8 *myhwaddr = myid(&adapter->eeprompriv);
   873		sint bmcast = IS_MCAST(pattrib->dst);
   874	
   875		if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) &&
   876		    (check_fwstate(pmlmepriv, _FW_LINKED) == true ||
   877		     check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
   878			) {
   879	
   880			/*  filter packets that SA is myself or multicast or broadcast */
   881			if (!memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
   882				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" SA ==myself\n"));
   883				#ifdef DBG_RX_DROP_FRAME
   884				DBG_871X("DBG_RX_DROP_FRAME %s SA =%pM, myhwaddr =%pM\n",
   885					__func__, MAC_ARG(pattrib->src), MAC_ARG(myhwaddr));
   886				#endif
   887				ret = _FAIL;
   888				goto exit;
   889			}
   890	
   891			/*  da should be for me */
   892			if ((memcmp(myhwaddr, pattrib->dst, ETH_ALEN)) && (!bmcast)) {
   893				RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
   894					(" ap2sta_data_frame:  compare DA fail; DA =%pM\n", MAC_ARG(pattrib->dst)));
   895				#ifdef DBG_RX_DROP_FRAME
   896				DBG_871X("DBG_RX_DROP_FRAME %s DA =%pM\n", __func__, MAC_ARG(pattrib->dst));
   897				#endif
   898				ret = _FAIL;
   899				goto exit;
   900			}
   901	
   902	
   903			/*  check BSSID */
   904			if (!memcmp(pattrib->bssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
   905			     !memcmp(mybssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) ||
   906			     (memcmp(pattrib->bssid, mybssid, ETH_ALEN))) {
   907				RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
   908					(" ap2sta_data_frame:  compare BSSID fail ; BSSID =%pM\n", MAC_ARG(pattrib->bssid)));
   909				RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("mybssid =%pM\n", MAC_ARG(mybssid)));
   910				#ifdef DBG_RX_DROP_FRAME
   911				DBG_871X("DBG_RX_DROP_FRAME %s BSSID =%pM, mybssid =%pM\n",
   912					__func__, MAC_ARG(pattrib->bssid), MAC_ARG(mybssid));
   913				DBG_871X("this adapter = %d, buddy adapter = %d\n", adapter->adapter_type, adapter->pbuddystruct adapter->adapter_type);
   914				#endif
   915	
   916				if (!bmcast) {
   917					DBG_871X("issue_deauth to the nonassociated ap =%pM for the reason(7)\n", MAC_ARG(pattrib->bssid));
   918					issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
   919				}
   920	
   921				ret = _FAIL;
   922				goto exit;
   923			}
   924	
   925			if (bmcast)
   926				*psta = rtw_get_bcmc_stainfo(adapter);
   927			else
   928				*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get ap_info */
   929	
   930			if (!*psta) {
   931				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("ap2sta: can't get psta under STATION_MODE ; drop pkt\n"));
   932				#ifdef DBG_RX_DROP_FRAME
   933				DBG_871X("DBG_RX_DROP_FRAME %s can't get psta under STATION_MODE ; drop pkt\n", __func__);
   934				#endif
   935				ret = _FAIL;
   936				goto exit;
   937			}
   938	
   939			if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
 > 940				;
   941			if (GetFrameSubType(ptr) & BIT(6)) {
   942				/* No data, will not indicate to upper layer, temporily count it here */
   943				count_rx_stats(adapter, precv_frame, *psta);
   944				ret = RTW_RX_HANDLED;
   945				goto exit;
   946			}
   947	
   948		} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
   949			     (check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
   950			memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
   951			memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
   952			memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
   953			memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
   954			memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
   955	
   956			/*  */
   957			memcpy(pattrib->bssid,  mybssid, ETH_ALEN);
   958	
   959	
   960			*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get sta_info */
   961			if (!*psta) {
   962				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("can't get psta under MP_MODE ; drop pkt\n"));
   963				#ifdef DBG_RX_DROP_FRAME
   964				DBG_871X("DBG_RX_DROP_FRAME %s can't get psta under WIFI_MP_STATE ; drop pkt\n", __func__);
   965				#endif
   966				ret = _FAIL;
   967				goto exit;
   968			}
   969	
   970	
   971		} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
   972			/* Special case */
   973			ret = RTW_RX_HANDLED;
   974			goto exit;
   975		} else {
   976			if (!memcmp(myhwaddr, pattrib->dst, ETH_ALEN) && (!bmcast)) {
   977				*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get sta_info */
   978				if (!*psta) {
   979	
   980					/* for AP multicast issue , modify by yiwei */
   981					static unsigned long send_issue_deauth_time;
   982	
   983					/* DBG_871X("After send deauth , %u ms has elapsed.\n", jiffies_to_msecs(jiffies - send_issue_deauth_time)); */
   984	
   985					if (jiffies_to_msecs(jiffies - send_issue_deauth_time) > 10000 || send_issue_deauth_time == 0) {
   986						send_issue_deauth_time = jiffies;
   987	
   988						DBG_871X("issue_deauth to the ap =%pM for the reason(7)\n", MAC_ARG(pattrib->bssid));
   989	
   990						issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
   991					}
   992				}
   993			}
   994	
   995			ret = _FAIL;
   996			#ifdef DBG_RX_DROP_FRAME
   997			DBG_871X("DBG_RX_DROP_FRAME %s fw_state:0x%x\n", __func__, get_fwstate(pmlmepriv));
   998			#endif
   999		}
  1000	
  1001	exit:
  1002		return ret;
  1003	}
  1004	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 66174 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c
  2020-12-04 22:00 [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c Brother Matthew De Angelis
  2020-12-05  2:55   ` kernel test robot
@ 2020-12-05  8:41 ` Greg KH
  2020-12-05 14:28   ` YOUR NAME
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2020-12-05  8:41 UTC (permalink / raw)
  To: Brother Matthew De Angelis
  Cc: devel, pterjan, vkor, amarjargal16, ross.schm.dev

On Fri, Dec 04, 2020 at 04:00:43PM -0600, Brother Matthew De Angelis wrote:
> Fix all the brace code style warnings found by checkpatch.pl at the
> following lines:
> 748, 940, 1039, 1602, 1922, 1939.
> At line 940 add a semi-colon to specify a line that does not execute
> anything, as in Kernighan and Ritchie
> 
> Signed-off-by: Brother Matthew De Angelis <matthew.v.deangelis@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_recv.c | 20 +++++++-------------
>  1 file changed, 7 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
> index 43e67e48d2df..22030fe6e714 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_recv.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
> @@ -745,9 +745,8 @@ void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, struct
>  
>  	padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
>  
> -	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst))) {
> +	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst)))
>  		padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
> -	}
>  
>  	if (sta)
>  		psta = sta;
> @@ -937,9 +936,8 @@ sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
>  			goto exit;
>  		}
>  
> -		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
> -		}
> -
> +		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
> +			;

An if statement that does nothing should not be here at all, right?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c
  2020-12-05  8:41 ` Greg KH
@ 2020-12-05 14:28   ` YOUR NAME
  2020-12-05 16:30     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: YOUR NAME @ 2020-12-05 14:28 UTC (permalink / raw)
  To: Greg KH; +Cc: devel, pterjan, vkor, amarjargal16, ross.schm.dev

On Sat, Dec 05, 2020 at 09:41:16AM +0100, Greg KH wrote:
> On Fri, Dec 04, 2020 at 04:00:43PM -0600, Brother Matthew De Angelis wrote:
> > Fix all the brace code style warnings found by checkpatch.pl at the
> > following lines:
> > 748, 940, 1039, 1602, 1922, 1939.
> > At line 940 add a semi-colon to specify a line that does not execute
> > anything, as in Kernighan and Ritchie
> > 
> > Signed-off-by: Brother Matthew De Angelis <matthew.v.deangelis@gmail.com>
> > ---
> >  drivers/staging/rtl8723bs/core/rtw_recv.c | 20 +++++++-------------
> >  1 file changed, 7 insertions(+), 13 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
> > index 43e67e48d2df..22030fe6e714 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_recv.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
> > @@ -745,9 +745,8 @@ void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, struct
> >  
> >  	padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
> >  
> > -	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst))) {
> > +	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst)))
> >  		padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
> > -	}
> >  
> >  	if (sta)
> >  		psta = sta;
> > @@ -937,9 +936,8 @@ sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
> >  			goto exit;
> >  		}
> >  
> > -		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
> > -		}
> > -
> > +		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
> > +			;
> 
> An if statement that does nothing should not be here at all, right?
> 
> thanks,
> 
> greg k-h
My apologies for sending this in private to Greg the first time.
I was not smart enough to figure out that Group in Mutt stands for "Reply to all".
Thank you for your suggestion Greg.
Should I send a single patch that deletes the empty if statement at line 940
and the unnecessary braces at the other lines
or should I split the two deletions into two separate patches?
Should it perhaps be a patch set?
Thanks!
Br. Matt
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c
  2020-12-05 14:28   ` YOUR NAME
@ 2020-12-05 16:30     ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2020-12-05 16:30 UTC (permalink / raw)
  To: YOUR NAME; +Cc: devel, pterjan, vkor, amarjargal16, ross.schm.dev

On Sat, Dec 05, 2020 at 08:28:10AM -0600, YOUR NAME wrote:
> On Sat, Dec 05, 2020 at 09:41:16AM +0100, Greg KH wrote:
> > On Fri, Dec 04, 2020 at 04:00:43PM -0600, Brother Matthew De Angelis wrote:
> > > Fix all the brace code style warnings found by checkpatch.pl at the
> > > following lines:
> > > 748, 940, 1039, 1602, 1922, 1939.
> > > At line 940 add a semi-colon to specify a line that does not execute
> > > anything, as in Kernighan and Ritchie
> > > 
> > > Signed-off-by: Brother Matthew De Angelis <matthew.v.deangelis@gmail.com>
> > > ---
> > >  drivers/staging/rtl8723bs/core/rtw_recv.c | 20 +++++++-------------
> > >  1 file changed, 7 insertions(+), 13 deletions(-)
> > > 
> > > diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
> > > index 43e67e48d2df..22030fe6e714 100644
> > > --- a/drivers/staging/rtl8723bs/core/rtw_recv.c
> > > +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
> > > @@ -745,9 +745,8 @@ void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, struct
> > >  
> > >  	padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
> > >  
> > > -	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst))) {
> > > +	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst)))
> > >  		padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
> > > -	}
> > >  
> > >  	if (sta)
> > >  		psta = sta;
> > > @@ -937,9 +936,8 @@ sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
> > >  			goto exit;
> > >  		}
> > >  
> > > -		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
> > > -		}
> > > -
> > > +		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
> > > +			;
> > 
> > An if statement that does nothing should not be here at all, right?
> > 
> > thanks,
> > 
> > greg k-h
> My apologies for sending this in private to Greg the first time.
> I was not smart enough to figure out that Group in Mutt stands for "Reply to all".
> Thank you for your suggestion Greg.
> Should I send a single patch that deletes the empty if statement at line 940
> and the unnecessary braces at the other lines
> or should I split the two deletions into two separate patches?

2 different patches, as they are doing different things, right?

> Should it perhaps be a patch set?

Yes a patch series would be great, thanks.

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-05 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 22:00 [PATCH] Staging: rtl8723bs/core fix brace coding style issues in rtw_recv.c Brother Matthew De Angelis
2020-12-05  2:55 ` kernel test robot
2020-12-05  2:55   ` kernel test robot
2020-12-05  8:41 ` Greg KH
2020-12-05 14:28   ` YOUR NAME
2020-12-05 16:30     ` Greg KH

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.