LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] staging: rtl8723bs: core: Patchsets cleans up in rtw_ap.c
@ 2021-04-05 17:29 Beatriz Martins de Carvalho
  2021-04-05 17:29 ` [PATCH 1/4] staging: rtl8723bs: core: Removed extra blank line Beatriz Martins de Carvalho
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Beatriz Martins de Carvalho @ 2021-04-05 17:29 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel, outreachy-kernel

Patchset of cleans up checks of "Blank lines aren't necessary before a close
brace '}'", "Lines should not end with a '('", "line over 100 characters", 
and "Alignment should match open parenthesis" in file rtw_ap.c.

Beatriz Martins de Carvalho (4):
  staging: rtl8723bs: core: Removed extra blank line
  staging: rtl8723bs: core: Ending line with argument
  staging: rtl8723bs: core: reorganize characters so the lines are under
    100 ch
  staging: rtl8723bs: core: align arguments with open parenthesis

 drivers/staging/rtl8723bs/core/rtw_ap.c | 137 +++++++++++-------------
 1 file changed, 62 insertions(+), 75 deletions(-)

-- 
2.25.1


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

* [PATCH 1/4] staging: rtl8723bs: core: Removed extra blank line
  2021-04-05 17:29 [PATCH 0/4] staging: rtl8723bs: core: Patchsets cleans up in rtw_ap.c Beatriz Martins de Carvalho
@ 2021-04-05 17:29 ` Beatriz Martins de Carvalho
  2021-04-05 17:29 ` [PATCH 2/4] staging: rtl8723bs: core: Ending line with argument Beatriz Martins de Carvalho
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Beatriz Martins de Carvalho @ 2021-04-05 17:29 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel, outreachy-kernel

Clean up check of "Blank lines aren't necessary before a close brace '}'"
in rtw_ap.c

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index dc56477eb084..81acc6bcb092 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -910,7 +910,6 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
 		/* issue beacon frame */
 		if (send_beacon(padapter) == _FAIL)
 			DBG_871X("issue_beacon, fail!\n");
-
 	}
 
 	/* update bc/mc sta_info */
-- 
2.25.1


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

* [PATCH 2/4] staging: rtl8723bs: core: Ending line with argument
  2021-04-05 17:29 [PATCH 0/4] staging: rtl8723bs: core: Patchsets cleans up in rtw_ap.c Beatriz Martins de Carvalho
  2021-04-05 17:29 ` [PATCH 1/4] staging: rtl8723bs: core: Removed extra blank line Beatriz Martins de Carvalho
@ 2021-04-05 17:29 ` Beatriz Martins de Carvalho
  2021-04-05 17:29 ` [PATCH 3/4] staging: rtl8723bs: core: reorganize characters so the lines are under 100 ch Beatriz Martins de Carvalho
  2021-04-05 17:29 ` [PATCH 4/4] staging: rtl8723bs: core: align arguments with open parenthesis Beatriz Martins de Carvalho
  3 siblings, 0 replies; 8+ messages in thread
From: Beatriz Martins de Carvalho @ 2021-04-05 17:29 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel, outreachy-kernel

Cleans up checks of "Lines should not end with a '('"
with argument present in next line in file rtw_ap.c

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 98 ++++++++++---------------
 1 file changed, 40 insertions(+), 58 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 81acc6bcb092..4dab4d741675 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -67,11 +67,10 @@ static void update_BCNTIM(struct adapter *padapter)
 
 		tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap);
 
-		p = rtw_get_ie(
-			pie + _FIXED_IE_LENGTH_,
-			WLAN_EID_TIM,
-			&tim_ielen,
-			pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_
+		p = rtw_get_ie(pie + _FIXED_IE_LENGTH_,
+			       WLAN_EID_TIM,
+			       &tim_ielen,
+			       pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_
 		);
 		if (p && tim_ielen > 0) {
 			tim_ielen += 2;
@@ -91,20 +90,18 @@ static void update_BCNTIM(struct adapter *padapter)
 			offset = _FIXED_IE_LENGTH_;
 
 			/* get ssid_ie len */
-			p = rtw_get_ie(
-				pie + _BEACON_IE_OFFSET_,
-				WLAN_EID_SSID,
-				&tmp_len,
-				(pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_)
+			p = rtw_get_ie(pie + _BEACON_IE_OFFSET_,
+				       WLAN_EID_SSID,
+				       &tmp_len,
+				       (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_)
 			);
 			if (p)
 				offset += tmp_len + 2;
 
 			/*  get supported rates len */
-			p = rtw_get_ie(
-				pie + _BEACON_IE_OFFSET_,
-				WLAN_EID_SUPP_RATES, &tmp_len,
-				(pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_)
+			p = rtw_get_ie(pie + _BEACON_IE_OFFSET_,
+				       WLAN_EID_SUPP_RATES, &tmp_len,
+				       (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_)
 			);
 			if (p)
 				offset += tmp_len + 2;
@@ -226,14 +223,13 @@ void expire_timeout_chk(struct adapter *padapter)
 				list_del_init(&psta->auth_list);
 				pstapriv->auth_list_cnt--;
 
-				DBG_871X(
-					"auth expire %02X%02X%02X%02X%02X%02X\n",
-					psta->hwaddr[0],
-					psta->hwaddr[1],
-					psta->hwaddr[2],
-					psta->hwaddr[3],
-					psta->hwaddr[4],
-					psta->hwaddr[5]
+				DBG_871X("auth expire %02X%02X%02X%02X%02X%02X\n",
+					 psta->hwaddr[0],
+					 psta->hwaddr[1],
+					 psta->hwaddr[2],
+					 psta->hwaddr[3],
+					 psta->hwaddr[4],
+					 psta->hwaddr[5]
 				);
 
 				spin_unlock_bh(&pstapriv->auth_list_lock);
@@ -307,10 +303,9 @@ void expire_timeout_chk(struct adapter *padapter)
 			}
 			list_del_init(&psta->asoc_list);
 			pstapriv->asoc_list_cnt--;
-			DBG_871X(
-				"asoc expire %pM, state = 0x%x\n",
-				MAC_ARG(psta->hwaddr),
-				psta->state
+			DBG_871X("asoc expire %pM, state = 0x%x\n",
+				 MAC_ARG(psta->hwaddr),
+				 psta->state
 			);
 			updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
 		} else {
@@ -360,17 +355,15 @@ void expire_timeout_chk(struct adapter *padapter)
 
 			psta->keep_alive_trycnt++;
 			if (ret == _SUCCESS) {
-				DBG_871X(
-					"asoc check, sta(%pM) is alive\n",
-					MAC_ARG(psta->hwaddr)
+				DBG_871X("asoc check, sta(%pM) is alive\n",
+					 MAC_ARG(psta->hwaddr)
 					);
 				psta->expire_to = pstapriv->expire_to;
 				psta->keep_alive_trycnt = 0;
 				continue;
 			} else if (psta->keep_alive_trycnt <= 3) {
-				DBG_871X(
-					"ack check for asoc expire, keep_alive_trycnt =%d\n",
-					psta->keep_alive_trycnt);
+				DBG_871X("ack check for asoc expire, keep_alive_trycnt =%d\n",
+					 psta->keep_alive_trycnt);
 				psta->expire_to = 1;
 				continue;
 			}
@@ -480,10 +473,9 @@ void update_bmc_sta(struct adapter *padapter)
 
 		/* prepare for add_RATid */
 		supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->SupportedRates);
-		network_type = rtw_check_network_type(
-			(u8 *)&pcur_network->SupportedRates,
-			supportRateNum,
-			pcur_network->Configuration.DSConfig
+		network_type = rtw_check_network_type((u8 *)&pcur_network->SupportedRates,
+						      supportRateNum,
+						      pcur_network->Configuration.DSConfig
 		);
 		if (IsSupportedTxCCK(network_type)) {
 			network_type = WIRELESS_11B;
@@ -711,15 +703,9 @@ static void update_hw_ht_param(struct adapter *padapter)
 	 */
 	max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
 
-	min_MPDU_spacing = (
-		pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c
-	) >> 2;
+	min_MPDU_spacing = (pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) >> 2;
 
-	rtw_hal_set_hwreg(
-		padapter,
-		HW_VAR_AMPDU_MIN_SPACE,
-		(u8 *)(&min_MPDU_spacing)
-	);
+	rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_MIN_SPACE, (u8 *)(&min_MPDU_spacing));
 
 	rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&max_AMPDU_len));
 
@@ -785,10 +771,8 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
 	if (!pmlmepriv->cur_network.join_res) { /* setting only at  first time */
 
 		/* WEP Key will be set before this function, do not clear CAM. */
-		if (
-			(psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) &&
-			(psecuritypriv->dot11PrivacyAlgrthm != _WEP104_)
-		)
+		if ((psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) &&
+		    (psecuritypriv->dot11PrivacyAlgrthm != _WEP104_))
 			flush_all_cam_entry(padapter);	/* clear CAM */
 	}
 
@@ -836,11 +820,10 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
 	}
 
 	/* set channel, bwmode */
-	p = rtw_get_ie(
-		(pnetwork->IEs + sizeof(struct ndis_802_11_fix_ie)),
-		WLAN_EID_HT_OPERATION,
-		&ie_len,
-		(pnetwork->IELength - sizeof(struct ndis_802_11_fix_ie))
+	p = rtw_get_ie((pnetwork->IEs + sizeof(struct ndis_802_11_fix_ie)),
+		       WLAN_EID_HT_OPERATION,
+		       &ie_len,
+		       (pnetwork->IELength - sizeof(struct ndis_802_11_fix_ie))
 	);
 	if (p && ie_len) {
 		pht_info = (struct HT_info_element *)(p + 2);
@@ -877,11 +860,10 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
 	}
 
 	set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
-	DBG_871X(
-		"CH =%d, BW =%d, offset =%d\n",
-		cur_channel,
-		cur_bwmode,
-		cur_ch_offset
+	DBG_871X("CH =%d, BW =%d, offset =%d\n",
+		 cur_channel,
+		 cur_bwmode,
+		 cur_ch_offset
 	);
 	pmlmeext->cur_channel = cur_channel;
 	pmlmeext->cur_bwmode = cur_bwmode;
-- 
2.25.1


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

* [PATCH 3/4] staging: rtl8723bs: core: reorganize characters so the lines are under 100 ch
  2021-04-05 17:29 [PATCH 0/4] staging: rtl8723bs: core: Patchsets cleans up in rtw_ap.c Beatriz Martins de Carvalho
  2021-04-05 17:29 ` [PATCH 1/4] staging: rtl8723bs: core: Removed extra blank line Beatriz Martins de Carvalho
  2021-04-05 17:29 ` [PATCH 2/4] staging: rtl8723bs: core: Ending line with argument Beatriz Martins de Carvalho
@ 2021-04-05 17:29 ` Beatriz Martins de Carvalho
  2021-04-06 12:13   ` Greg KH
  2021-04-05 17:29 ` [PATCH 4/4] staging: rtl8723bs: core: align arguments with open parenthesis Beatriz Martins de Carvalho
  3 siblings, 1 reply; 8+ messages in thread
From: Beatriz Martins de Carvalho @ 2021-04-05 17:29 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel, outreachy-kernel

Cleans up warnings of "line over 100 characters" but avoinding
more than 90 characters in file rtw_ap.c

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 4dab4d741675..ca6fec52d213 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -278,11 +278,13 @@ void expire_timeout_chk(struct adapter *padapter)
 
 			if (psta->state & WIFI_SLEEP_STATE) {
 				if (!(psta->state & WIFI_STA_ALIVE_CHK_STATE)) {
-					/* to check if alive by another methods if station is at ps mode. */
+					/* to check if alive by another methods */
+					/* if station is at ps mode. */
 					psta->expire_to = pstapriv->expire_to;
 					psta->state |= WIFI_STA_ALIVE_CHK_STATE;
 
-					/* DBG_871X("alive chk, sta:%pM is at ps mode!\n", MAC_ARG(psta->hwaddr)); */
+					/* DBG_871X("alive chk, sta:%pM is at ps */
+					/* mode!\n", MAC_ARG(psta->hwaddr)); */
 
 					/* to update bcn with tim_bitmap for this station */
 					pstapriv->tim_bitmap |= BIT(psta->aid);
@@ -309,7 +311,8 @@ void expire_timeout_chk(struct adapter *padapter)
 			);
 			updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
 		} else {
-			/* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
+			/* TODO: Aging mechanism to digest frames in sleep_q to */
+			/* avoid running out of xmitframe */
 			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
 				&& padapter->xmitpriv.free_xmitframe_cnt < ((
 					NR_XMITFRAME / pstapriv->asoc_list_cnt
@@ -375,7 +378,8 @@ void expire_timeout_chk(struct adapter *padapter)
 			if (list_empty(&psta->asoc_list) == false) {
 				list_del_init(&psta->asoc_list);
 				pstapriv->asoc_list_cnt--;
-				updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
+				updated = ap_free_sta(padapter, psta, false,
+						      WLAN_REASON_DEAUTH_LEAVING);
 			}
 			spin_unlock_bh(&pstapriv->asoc_list_lock);
 		}
@@ -469,7 +473,8 @@ void update_bmc_sta(struct adapter *padapter)
 
 		memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
 
-		/* psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, because it has been set before this. */
+		/* psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, */
+		/* because it has been set before this. */
 
 		/* prepare for add_RATid */
 		supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->SupportedRates);
@@ -748,8 +753,8 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
 	cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
 
 	/* check if there is wps ie, */
-	/* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
-	/* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
+	/* if there is wpsie in beacon, the hostapd will update beacon twice when stating */
+	/* hostapd, and at first time the security ie (RSN/WPA IE) will not include in beacon. */
 	if (!rtw_get_wps_ie(pnetwork->IEs + _FIXED_IE_LENGTH_,
 			    pnetwork->IELength - _FIXED_IE_LENGTH_, NULL, NULL))
 		pmlmeext->bstart_bss = true;
@@ -1117,7 +1122,8 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
 
 				*(p + 8) |= BIT(7);/* QoS Info, support U-APSD */
 
-				/* disable all ACM bits since the WMM admission control is not supported */
+				/* disable all ACM bits since the WMM admission */
+				/* control is not supported */
 				*(p + 10) &= ~BIT(4); /* BE */
 				*(p + 14) &= ~BIT(4); /* BK */
 				*(p + 18) &= ~BIT(4); /* VI */
-- 
2.25.1


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

* [PATCH 4/4] staging: rtl8723bs: core: align arguments with open parenthesis
  2021-04-05 17:29 [PATCH 0/4] staging: rtl8723bs: core: Patchsets cleans up in rtw_ap.c Beatriz Martins de Carvalho
                   ` (2 preceding siblings ...)
  2021-04-05 17:29 ` [PATCH 3/4] staging: rtl8723bs: core: reorganize characters so the lines are under 100 ch Beatriz Martins de Carvalho
@ 2021-04-05 17:29 ` Beatriz Martins de Carvalho
  2021-04-05 19:40   ` [Outreachy kernel] " Julia Lawall
  3 siblings, 1 reply; 8+ messages in thread
From: Beatriz Martins de Carvalho @ 2021-04-05 17:29 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel, outreachy-kernel

Cleans up checks of "Alignment should match open parenthesis"
in file rtw_ap.c

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index ca6fec52d213..73a35b3320fe 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -439,7 +439,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
 		arg[3] = psta->init_rate;
 
 		DBG_871X("%s => mac_id:%d , raid:%d , shortGIrate =%d, bitmap = 0x%x\n",
-			__func__, psta->mac_id, psta->raid, shortGIrate, tx_ra_bitmap);
+			 __func__, psta->mac_id, psta->raid, shortGIrate, tx_ra_bitmap);
 
 		rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
 	} else {
@@ -512,7 +512,7 @@ void update_bmc_sta(struct adapter *padapter)
 			arg[3] = psta->init_rate;
 
 			DBG_871X("%s => mac_id:%d , raid:%d , bitmap = 0x%x\n",
-				__func__, psta->mac_id, psta->raid, tx_ra_bitmap);
+				 __func__, psta->mac_id, psta->raid, tx_ra_bitmap);
 
 			rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, 0);
 		}
@@ -605,14 +605,14 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
 
 		/*  B0 Config LDPC Coding Capability */
 		if (TEST_FLAG(phtpriv_ap->ldpc_cap, LDPC_HT_ENABLE_TX) &&
-			GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 *)(&phtpriv_sta->ht_cap))) {
+			      GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 *)(&phtpriv_sta->ht_cap))) {
 			SET_FLAG(cur_ldpc_cap, (LDPC_HT_ENABLE_TX | LDPC_HT_CAP_TX));
 			DBG_871X("Enable HT Tx LDPC for STA(%d)\n", psta->aid);
 		}
 
 		/*  B7 B8 B9 Config STBC setting */
 		if (TEST_FLAG(phtpriv_ap->stbc_cap, STBC_HT_ENABLE_TX) &&
-			GET_HT_CAPABILITY_ELE_RX_STBC((u8 *)(&phtpriv_sta->ht_cap))) {
+			      GET_HT_CAPABILITY_ELE_RX_STBC((u8 *)(&phtpriv_sta->ht_cap))) {
 			SET_FLAG(cur_stbc_cap, (STBC_HT_ENABLE_TX | STBC_HT_CAP_TX));
 			DBG_871X("Enable HT Tx STBC for STA(%d)\n", psta->aid);
 		}
@@ -1176,7 +1176,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
 		);
 
 		if ((psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_CCMP) ||
-			(psecuritypriv->wpa2_pairwise_cipher & WPA_CIPHER_CCMP)) {
+		     (psecuritypriv->wpa2_pairwise_cipher & WPA_CIPHER_CCMP)) {
 			pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY & (0x07 << 2));
 		} else {
 			pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY & 0x00);
@@ -1233,7 +1233,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
 	pmlmepriv->htpriv.ht_option = false;
 
 	if ((psecuritypriv->wpa2_pairwise_cipher & WPA_CIPHER_TKIP) ||
-		      (psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_TKIP)) {
+	     (psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_TKIP)) {
 		/* todo: */
 		/* ht_cap = false; */
 	}
@@ -1820,7 +1820,7 @@ static int rtw_ht_operation_update(struct adapter *padapter)
 	}
 
 	DBG_871X("%s new operation mode = 0x%X changes =%d\n",
-		   __func__, pmlmepriv->ht_op_mode, op_mode_changes);
+		 __func__, pmlmepriv->ht_op_mode, op_mode_changes);
 
 	return op_mode_changes;
 }
@@ -1865,7 +1865,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
 			pmlmepriv->num_sta_no_short_preamble++;
 
 			if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
-				(pmlmepriv->num_sta_no_short_preamble == 1)) {
+			    (pmlmepriv->num_sta_no_short_preamble == 1)) {
 				beacon_updated = true;
 				update_beacon(padapter, 0xFF, NULL, true);
 			}
-- 
2.25.1


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

* Re: [Outreachy kernel] [PATCH 4/4] staging: rtl8723bs: core: align arguments with open parenthesis
  2021-04-05 17:29 ` [PATCH 4/4] staging: rtl8723bs: core: align arguments with open parenthesis Beatriz Martins de Carvalho
@ 2021-04-05 19:40   ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-04-05 19:40 UTC (permalink / raw)
  To: Beatriz Martins de Carvalho
  Cc: gregkh, linux-staging, linux-kernel, outreachy-kernel



On Mon, 5 Apr 2021, Beatriz Martins de Carvalho wrote:

> Cleans up checks of "Alignment should match open parenthesis"
> in file rtw_ap.c
>
> Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_ap.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
> index ca6fec52d213..73a35b3320fe 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> @@ -439,7 +439,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
>  		arg[3] = psta->init_rate;
>
>  		DBG_871X("%s => mac_id:%d , raid:%d , shortGIrate =%d, bitmap = 0x%x\n",
> -			__func__, psta->mac_id, psta->raid, shortGIrate, tx_ra_bitmap);
> +			 __func__, psta->mac_id, psta->raid, shortGIrate, tx_ra_bitmap);
>
>  		rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
>  	} else {
> @@ -512,7 +512,7 @@ void update_bmc_sta(struct adapter *padapter)
>  			arg[3] = psta->init_rate;
>
>  			DBG_871X("%s => mac_id:%d , raid:%d , bitmap = 0x%x\n",
> -				__func__, psta->mac_id, psta->raid, tx_ra_bitmap);
> +				 __func__, psta->mac_id, psta->raid, tx_ra_bitmap);
>
>  			rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, 0);
>  		}
> @@ -605,14 +605,14 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
>
>  		/*  B0 Config LDPC Coding Capability */
>  		if (TEST_FLAG(phtpriv_ap->ldpc_cap, LDPC_HT_ENABLE_TX) &&
> -			GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 *)(&phtpriv_sta->ht_cap))) {
> +			      GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 *)(&phtpriv_sta->ht_cap))) {
>  			SET_FLAG(cur_ldpc_cap, (LDPC_HT_ENABLE_TX | LDPC_HT_CAP_TX));
>  			DBG_871X("Enable HT Tx LDPC for STA(%d)\n", psta->aid);
>  		}

TEST_FLAG and SET_FLAG are not standard for the kernel, don't do anything
very interesting, and aren't even used consistently in this file.  Maybe
you could get rid of them completely from the driver.  In another patch,
of course.

julia


>  		/*  B7 B8 B9 Config STBC setting */
>  		if (TEST_FLAG(phtpriv_ap->stbc_cap, STBC_HT_ENABLE_TX) &&
> -			GET_HT_CAPABILITY_ELE_RX_STBC((u8 *)(&phtpriv_sta->ht_cap))) {
> +			      GET_HT_CAPABILITY_ELE_RX_STBC((u8 *)(&phtpriv_sta->ht_cap))) {
>  			SET_FLAG(cur_stbc_cap, (STBC_HT_ENABLE_TX | STBC_HT_CAP_TX));
>  			DBG_871X("Enable HT Tx STBC for STA(%d)\n", psta->aid);
>  		}
> @@ -1176,7 +1176,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
>  		);
>
>  		if ((psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_CCMP) ||
> -			(psecuritypriv->wpa2_pairwise_cipher & WPA_CIPHER_CCMP)) {
> +		     (psecuritypriv->wpa2_pairwise_cipher & WPA_CIPHER_CCMP)) {
>  			pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY & (0x07 << 2));
>  		} else {
>  			pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY & 0x00);
> @@ -1233,7 +1233,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
>  	pmlmepriv->htpriv.ht_option = false;
>
>  	if ((psecuritypriv->wpa2_pairwise_cipher & WPA_CIPHER_TKIP) ||
> -		      (psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_TKIP)) {
> +	     (psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_TKIP)) {
>  		/* todo: */
>  		/* ht_cap = false; */
>  	}
> @@ -1820,7 +1820,7 @@ static int rtw_ht_operation_update(struct adapter *padapter)
>  	}
>
>  	DBG_871X("%s new operation mode = 0x%X changes =%d\n",
> -		   __func__, pmlmepriv->ht_op_mode, op_mode_changes);
> +		 __func__, pmlmepriv->ht_op_mode, op_mode_changes);
>
>  	return op_mode_changes;
>  }
> @@ -1865,7 +1865,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
>  			pmlmepriv->num_sta_no_short_preamble++;
>
>  			if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
> -				(pmlmepriv->num_sta_no_short_preamble == 1)) {
> +			    (pmlmepriv->num_sta_no_short_preamble == 1)) {
>  				beacon_updated = true;
>  				update_beacon(padapter, 0xFF, NULL, true);
>  			}
> --
> 2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/00250c746ed850f6a73ff0ad4c1735cbd019b58f.1617641790.git.martinsdecarvalhobeatriz%40gmail.com.
>

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

* Re: [PATCH 3/4] staging: rtl8723bs: core: reorganize characters so the lines are under 100 ch
  2021-04-05 17:29 ` [PATCH 3/4] staging: rtl8723bs: core: reorganize characters so the lines are under 100 ch Beatriz Martins de Carvalho
@ 2021-04-06 12:13   ` Greg KH
  2021-04-06 13:14     ` Beatriz Martins de Carvalho
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2021-04-06 12:13 UTC (permalink / raw)
  To: Beatriz Martins de Carvalho; +Cc: linux-staging, linux-kernel, outreachy-kernel

On Mon, Apr 05, 2021 at 06:29:19PM +0100, Beatriz Martins de Carvalho wrote:
> Cleans up warnings of "line over 100 characters" but avoinding
> more than 90 characters in file rtw_ap.c
> 
> Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_ap.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
> index 4dab4d741675..ca6fec52d213 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> @@ -278,11 +278,13 @@ void expire_timeout_chk(struct adapter *padapter)
>  
>  			if (psta->state & WIFI_SLEEP_STATE) {
>  				if (!(psta->state & WIFI_STA_ALIVE_CHK_STATE)) {
> -					/* to check if alive by another methods if station is at ps mode. */
> +					/* to check if alive by another methods */
> +					/* if station is at ps mode. */
>  					psta->expire_to = pstapriv->expire_to;
>  					psta->state |= WIFI_STA_ALIVE_CHK_STATE;
>  
> -					/* DBG_871X("alive chk, sta:%pM is at ps mode!\n", MAC_ARG(psta->hwaddr)); */
> +					/* DBG_871X("alive chk, sta:%pM is at ps */
> +					/* mode!\n", MAC_ARG(psta->hwaddr)); */

You just wrapped a code line :(

Just remove it, it's not needed.


>  
>  					/* to update bcn with tim_bitmap for this station */
>  					pstapriv->tim_bitmap |= BIT(psta->aid);
> @@ -309,7 +311,8 @@ void expire_timeout_chk(struct adapter *padapter)
>  			);
>  			updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
>  		} else {
> -			/* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
> +			/* TODO: Aging mechanism to digest frames in sleep_q to */
> +			/* avoid running out of xmitframe */
>  			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
>  				&& padapter->xmitpriv.free_xmitframe_cnt < ((
>  					NR_XMITFRAME / pstapriv->asoc_list_cnt
> @@ -375,7 +378,8 @@ void expire_timeout_chk(struct adapter *padapter)
>  			if (list_empty(&psta->asoc_list) == false) {
>  				list_del_init(&psta->asoc_list);
>  				pstapriv->asoc_list_cnt--;
> -				updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
> +				updated = ap_free_sta(padapter, psta, false,
> +						      WLAN_REASON_DEAUTH_LEAVING);
>  			}
>  			spin_unlock_bh(&pstapriv->asoc_list_lock);
>  		}
> @@ -469,7 +473,8 @@ void update_bmc_sta(struct adapter *padapter)
>  
>  		memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
>  
> -		/* psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, because it has been set before this. */
> +		/* psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, */
> +		/* because it has been set before this. */

Again, look at what you are changing to see if it makes sense.

>  
>  		/* prepare for add_RATid */
>  		supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->SupportedRates);
> @@ -748,8 +753,8 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
>  	cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
>  
>  	/* check if there is wps ie, */
> -	/* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
> -	/* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
> +	/* if there is wpsie in beacon, the hostapd will update beacon twice when stating */
> +	/* hostapd, and at first time the security ie (RSN/WPA IE) will not include in beacon. */

These changes do not look correct, you made them longer?

thanks,

greg k-h

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

* Re: [PATCH 3/4] staging: rtl8723bs: core: reorganize characters so the lines are under 100 ch
  2021-04-06 12:13   ` Greg KH
@ 2021-04-06 13:14     ` Beatriz Martins de Carvalho
  0 siblings, 0 replies; 8+ messages in thread
From: Beatriz Martins de Carvalho @ 2021-04-06 13:14 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-staging, linux-kernel, outreachy-kernel


Em 06/04/21 13:13, Greg KH escreveu:
> On Mon, Apr 05, 2021 at 06:29:19PM +0100, Beatriz Martins de Carvalho wrote:
>> Cleans up warnings of "line over 100 characters" but avoinding
>> more than 90 characters in file rtw_ap.c
>>
>> Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
>> ---
>>   drivers/staging/rtl8723bs/core/rtw_ap.c | 22 ++++++++++++++--------
>>   1 file changed, 14 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
>> index 4dab4d741675..ca6fec52d213 100644
>> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
>> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
>> @@ -278,11 +278,13 @@ void expire_timeout_chk(struct adapter *padapter)
>>   
>>   			if (psta->state & WIFI_SLEEP_STATE) {
>>   				if (!(psta->state & WIFI_STA_ALIVE_CHK_STATE)) {
>> -					/* to check if alive by another methods if station is at ps mode. */
>> +					/* to check if alive by another methods */
>> +					/* if station is at ps mode. */
>>   					psta->expire_to = pstapriv->expire_to;
>>   					psta->state |= WIFI_STA_ALIVE_CHK_STATE;
>>   
>> -					/* DBG_871X("alive chk, sta:%pM is at ps mode!\n", MAC_ARG(psta->hwaddr)); */
>> +					/* DBG_871X("alive chk, sta:%pM is at ps */
>> +					/* mode!\n", MAC_ARG(psta->hwaddr)); */
> You just wrapped a code line :(
>
> Just remove it, it's not needed.
Sorry! Yesterday I didn't realize that it was a code line. I will remove it.
>
>
>>   
>>   					/* to update bcn with tim_bitmap for this station */
>>   					pstapriv->tim_bitmap |= BIT(psta->aid);
>> @@ -309,7 +311,8 @@ void expire_timeout_chk(struct adapter *padapter)
>>   			);
>>   			updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
>>   		} else {
>> -			/* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
>> +			/* TODO: Aging mechanism to digest frames in sleep_q to */
>> +			/* avoid running out of xmitframe */
>>   			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
>>   				&& padapter->xmitpriv.free_xmitframe_cnt < ((
>>   					NR_XMITFRAME / pstapriv->asoc_list_cnt
>> @@ -375,7 +378,8 @@ void expire_timeout_chk(struct adapter *padapter)
>>   			if (list_empty(&psta->asoc_list) == false) {
>>   				list_del_init(&psta->asoc_list);
>>   				pstapriv->asoc_list_cnt--;
>> -				updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
>> +				updated = ap_free_sta(padapter, psta, false,
>> +						      WLAN_REASON_DEAUTH_LEAVING);
>>   			}
>>   			spin_unlock_bh(&pstapriv->asoc_list_lock);
>>   		}
>> @@ -469,7 +473,8 @@ void update_bmc_sta(struct adapter *padapter)
>>   
>>   		memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
>>   
>> -		/* psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, because it has been set before this. */
>> +		/* psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, */
>> +		/* because it has been set before this. */
> Again, look at what you are changing to see if it makes sense.
Yesterday had to make sense, but now I saw that was wrong. I will remove it.
>>   
>>   		/* prepare for add_RATid */
>>   		supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->SupportedRates);
>> @@ -748,8 +753,8 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
>>   	cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
>>   
>>   	/* check if there is wps ie, */
>> -	/* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
>> -	/* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
>> +	/* if there is wpsie in beacon, the hostapd will update beacon twice when stating */
>> +	/* hostapd, and at first time the security ie (RSN/WPA IE) will not include in beacon. */
> These changes do not look correct, you made them longer?

No, I only rearranged the block comment, where I sent the last word in 
the sentence to the next line,

and with that, each sentence stays with less than 100 characters. But I 
will remove it.

>
> thanks,
Thank you for to review, once more I will have more attention to my changes.
> greg k-h
Beatriz Martins de Carvalho

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

end of thread, other threads:[~2021-04-06 13:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 17:29 [PATCH 0/4] staging: rtl8723bs: core: Patchsets cleans up in rtw_ap.c Beatriz Martins de Carvalho
2021-04-05 17:29 ` [PATCH 1/4] staging: rtl8723bs: core: Removed extra blank line Beatriz Martins de Carvalho
2021-04-05 17:29 ` [PATCH 2/4] staging: rtl8723bs: core: Ending line with argument Beatriz Martins de Carvalho
2021-04-05 17:29 ` [PATCH 3/4] staging: rtl8723bs: core: reorganize characters so the lines are under 100 ch Beatriz Martins de Carvalho
2021-04-06 12:13   ` Greg KH
2021-04-06 13:14     ` Beatriz Martins de Carvalho
2021-04-05 17:29 ` [PATCH 4/4] staging: rtl8723bs: core: align arguments with open parenthesis Beatriz Martins de Carvalho
2021-04-05 19:40   ` [Outreachy kernel] " Julia Lawall

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 read-only IMAP folder(s) and NNTP newsgroup(s).