Checkpatch fix series for rtw_mlme.c
Meir Elisha (4):
Staging: rtl8723bs: Remove unnecessary braces
Staging: rtl8723bs: Remove extra spaces
Staging: rtl8723bs: Fix block comments warning
Staging: rtl8723bs: fix else after break warning
drivers/staging/rtl8723bs/core/rtw_mlme.c | 241 ++++++++++------------
1 file changed, 114 insertions(+), 127 deletions(-)
--
2.34.1
Fix checkpatch warning: else is not generally useful after a break or return
Signed-off-by: Meir Elisha <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 38 +++++++++--------------
1 file changed, 14 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 044483f3d678..efaac84f22b4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1540,30 +1540,23 @@ void _rtw_join_timeout_handler(struct timer_list *t)
spin_lock_bh(&pmlmepriv->lock);
- if (rtw_to_roam(adapter) > 0) { /* join timeout caused by roaming */
+ if (rtw_to_roam(adapter) == 0) { /* join timeout caused by roaming */
+ rtw_indicate_disconnect(adapter);
+ free_scanqueue(pmlmepriv);
+ /* indicate disconnect for the case that join_timeout and check_fwstate != FW_LINKED */
+ rtw_cfg80211_indicate_disconnect(adapter);
+ } else {
while (1) {
rtw_dec_to_roam(adapter);
- if (rtw_to_roam(adapter) != 0) { /* try another */
- int do_join_r;
-
- do_join_r = rtw_do_join(adapter);
- if (do_join_r != _SUCCESS)
- continue;
-
- break;
- } else {
+ if (rtw_to_roam(adapter) == 0) {
rtw_indicate_disconnect(adapter);
break;
+ } else if (rtw_do_join(adapter) != _SUCCESS) { /* try another */
+ continue;
}
- }
-
- } else {
- rtw_indicate_disconnect(adapter);
- free_scanqueue(pmlmepriv);/* */
-
- /* indicate disconnect for the case that join_timeout and check_fwstate != FW_LINKED */
- rtw_cfg80211_indicate_disconnect(adapter);
+ break;
+ }
}
spin_unlock_bh(&pmlmepriv->lock);
@@ -2102,12 +2095,9 @@ signed int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, u
}
iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid);
- if (iEntry < 0) {
- return ielength;
- } else {
- if (authmode == WLAN_EID_RSN)
- ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
- }
+ if (iEntry > 0 && authmode == WLAN_EID_RSN)
+ ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
+
return ielength;
}
--
2.34.1
braces {} are not necessary for single statement blocks
Signed-off-by: Meir Elisha <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index b221913733fb..5568215b35bd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1548,9 +1548,9 @@ void _rtw_join_timeout_handler(struct timer_list *t)
int do_join_r;
do_join_r = rtw_do_join(adapter);
- if (do_join_r != _SUCCESS) {
+ if (do_join_r != _SUCCESS)
continue;
- }
+
break;
} else {
rtw_indicate_disconnect(adapter);
@@ -2432,9 +2432,8 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
return;
/* maybe needs check if ap supports rx ampdu. */
- if (!(phtpriv->ampdu_enable) && pregistrypriv->ampdu_enable == 1) {
+ if (!(phtpriv->ampdu_enable) && pregistrypriv->ampdu_enable == 1)
phtpriv->ampdu_enable = true;
- }
/* check Max Rx A-MPDU Size */
len = 0;
--
2.34.1
Fix checkpatch warning: please, no space before tabs
Signed-off-by: Meir Elisha <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 48 +++++++++++------------
1 file changed, 23 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 5568215b35bd..a7c4350e0783 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -169,7 +169,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwor
{
unsigned int delta_time;
u32 lifetime = SCANQUEUE_LIFETIME;
-/* _irqL irqL; */
+/* _irqL irqL; */
struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
if (!pnetwork)
@@ -389,7 +389,7 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea
d_cap = le16_to_cpu(tmpd);
return (src->ssid.ssid_length == dst->ssid.ssid_length) &&
- /* (src->configuration.ds_config == dst->configuration.ds_config) && */
+ /* (src->configuration.ds_config == dst->configuration.ds_config) && */
((!memcmp(src->mac_address, dst->mac_address, ETH_ALEN))) &&
((!memcmp(src->ssid.ssid, dst->ssid.ssid, src->ssid.ssid_length))) &&
((s_cap & WLAN_CAPABILITY_IBSS) ==
@@ -628,10 +628,10 @@ void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
/* select the desired network based on the capability of the (i)bss. */
/* check items: (1) security */
-/* (2) network_type */
-/* (3) WMM */
-/* (4) HT */
-/* (5) others */
+/* (2) network_type */
+/* (3) WMM */
+/* (4) HT */
+/* (5) others */
int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwork);
int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwork)
{
@@ -1054,9 +1054,9 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
memset((u8 *)&psta->dot11rxpn, 0, sizeof(union pn48));
}
- /* Commented by Albert 2012/07/21 */
- /* When doing the WPS, the wps_ie_len won't equal to 0 */
- /* And the Wi-Fi driver shouldn't allow the data packet to be transmitted. */
+ /* Commented by Albert 2012/07/21 */
+ /* When doing the WPS, the wps_ie_len won't equal to 0 */
+ /* And the Wi-Fi driver shouldn't allow the data packet to be transmitted. */
if (padapter->securitypriv.wps_ie_len != 0) {
psta->ieee8021x_blocked = true;
padapter->securitypriv.wps_ie_len = 0;
@@ -1916,10 +1916,10 @@ signed int rtw_set_auth(struct adapter *adapter, struct security_priv *psecurity
signed int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, signed int keyid, u8 set_tx, bool enqueue)
{
u8 keylen;
- struct cmd_obj *pcmd;
- struct setkey_parm *psetkeyparm;
- struct cmd_priv *pcmdpriv = &(adapter->cmdpriv);
- signed int res = _SUCCESS;
+ struct cmd_obj *pcmd;
+ struct setkey_parm *psetkeyparm;
+ struct cmd_priv *pcmdpriv = &(adapter->cmdpriv);
+ signed int res = _SUCCESS;
psetkeyparm = rtw_zmalloc(sizeof(struct setkey_parm));
if (!psetkeyparm) {
@@ -2023,9 +2023,8 @@ int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_
/* */
/* Search by BSSID, */
/* Return Value: */
-/* -1 :if there is no pre-auth key in the table */
-/* >= 0 :if there is pre-auth key, and return the entry id */
-/* */
+/* -1 :if there is no pre-auth key in the table */
+/* >= 0 :if there is pre-auth key, and return the entry id */
/* */
static int SecIsInPMKIDList(struct adapter *Adapter, u8 *bssid)
@@ -2186,8 +2185,7 @@ void rtw_joinbss_reset(struct adapter *padapter)
{
u8 threshold;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-
- struct ht_priv *phtpriv = &pmlmepriv->htpriv;
+ struct ht_priv *phtpriv = &pmlmepriv->htpriv;
/* todo: if you want to do something io/reg/hw setting before join_bss, please add code here */
@@ -2213,11 +2211,11 @@ void rtw_joinbss_reset(struct adapter *padapter)
void rtw_ht_use_default_setting(struct adapter *padapter)
{
- struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- struct ht_priv *phtpriv = &pmlmepriv->htpriv;
+ struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+ struct ht_priv *phtpriv = &pmlmepriv->htpriv;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
- bool bHwLDPCSupport = false, bHwSTBCSupport = false;
- bool bHwSupportBeamformer = false, bHwSupportBeamformee = false;
+ bool bHwLDPCSupport = false, bHwSTBCSupport = false;
+ bool bHwSupportBeamformer = false, bHwSupportBeamformee = false;
if (pregistrypriv->wifi_spec)
phtpriv->bss_coexist = 1;
@@ -2288,7 +2286,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
u8 cbw40_enable = 0, stbc_rx_enable = 0, operation_bw = 0;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- struct ht_priv *phtpriv = &pmlmepriv->htpriv;
+ struct ht_priv *phtpriv = &pmlmepriv->htpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
phtpriv->ht_option = false;
@@ -2417,7 +2415,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
struct ieee80211_ht_cap *pht_capie;
/* struct recv_reorder_ctrl *preorder_ctrl; */
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- struct ht_priv *phtpriv = &pmlmepriv->htpriv;
+ struct ht_priv *phtpriv = &pmlmepriv->htpriv;
/* struct recv_priv *precvpriv = &padapter->recvpriv; */
struct registry_priv *pregistrypriv = &padapter->registrypriv;
/* struct wlan_network *pcur_network = &(pmlmepriv->cur_network);; */
@@ -2546,7 +2544,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
void rtw_append_exented_cap(struct adapter *padapter, u8 *out_ie, uint *pout_len)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- struct ht_priv *phtpriv = &pmlmepriv->htpriv;
+ struct ht_priv *phtpriv = &pmlmepriv->htpriv;
u8 cap_content[8] = {0};
if (phtpriv->bss_coexist)
--
2.34.1
Fix checkpatch warning: Block comments use * on subsequent lines
Signed-off-by: Meir Elisha <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 152 +++++++++++-----------
1 file changed, 76 insertions(+), 76 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index a7c4350e0783..044483f3d678 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -110,30 +110,30 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
}
/*
-struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
-{
- _irqL irqL;
-
- struct wlan_network *pnetwork;
-
- spin_lock_bh(&queue->lock);
-
- if (list_empty(&queue->queue))
-
- pnetwork = NULL;
-
- else
- {
- pnetwork = container_of(get_next(&queue->queue), struct wlan_network, list);
-
- list_del_init(&(pnetwork->list));
- }
-
- spin_unlock_bh(&queue->lock);
-
- return pnetwork;
-}
-*/
+ *struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
+ *{
+ * _irqL irqL;
+ *
+ * struct wlan_network *pnetwork;
+ *
+ * spin_lock_bh(&queue->lock);
+ *
+ * if (list_empty(&queue->queue))
+ *
+ * pnetwork = NULL;
+ *
+ * else
+ * {
+ * pnetwork = container_of(get_next(&queue->queue), struct wlan_network, list);
+ *
+ * list_del_init(&(pnetwork->list));
+ * }
+ *
+ * spin_unlock_bh(&queue->lock);
+ *
+ * return pnetwork;
+ *}
+ */
struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
{
@@ -218,10 +218,9 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
}
/*
- return the wlan_network with the matching addr
-
- Shall be called under atomic context... to avoid possible racing condition...
-*/
+ * return the wlan_network with the matching addr
+ * Shall be called under atomic context... to avoid possible racing condition...
+ */
struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
{
struct list_head *phead, *plist;
@@ -322,14 +321,14 @@ void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
}
/*
-static struct wlan_network *rtw_dequeue_network(struct __queue *queue)
-{
- struct wlan_network *pnetwork;
-
- pnetwork = _rtw_dequeue_network(queue);
- return pnetwork;
-}
-*/
+ *static struct wlan_network *rtw_dequeue_network(struct __queue *queue)
+ *{
+ * struct wlan_network *pnetwork;
+ *
+ * pnetwork = _rtw_dequeue_network(queue);
+ * return pnetwork;
+ *}
+ */
void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnetwork);
void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnetwork)
@@ -339,10 +338,9 @@ void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnet
}
/*
- return the wlan_network with the matching addr
-
- Shall be called under atomic context... to avoid possible racing condition...
-*/
+ * return the wlan_network with the matching addr
+ * Shall be called under atomic context... to avoid possible racing condition...
+ */
struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
{
struct wlan_network *pnetwork = _rtw_find_network(scanned_queue, addr);
@@ -506,8 +504,8 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
}
/*
-Caller must hold pmlmepriv->lock first.
-*/
+ * Caller must hold pmlmepriv->lock first.
+ */
void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
{
struct list_head *plist, *phead;
@@ -541,7 +539,8 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
}
/* If we didn't find a match, then get a new network slot to initialize
- * with this beacon's information */
+ * with this beacon's information
+ */
/* if (phead == plist) { */
if (!target_find) {
if (list_empty(&pmlmepriv->free_bss_pool.queue)) {
@@ -751,7 +750,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
rtw_set_signal_stat_timer(&adapter->recvpriv);
if (pmlmepriv->to_join) {
- if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) {
+ if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) {
if (check_fwstate(pmlmepriv, _FW_LINKED) == false) {
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
@@ -885,8 +884,8 @@ static void find_network(struct adapter *adapter)
}
/*
-*rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
-*/
+ *rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
+ */
void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
{
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
@@ -921,8 +920,8 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
}
/*
-*rtw_indicate_connect: the caller has to lock pmlmepriv->lock
-*/
+ *rtw_indicate_connect: the caller has to lock pmlmepriv->lock
+ */
void rtw_indicate_connect(struct adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -942,8 +941,8 @@ void rtw_indicate_connect(struct adapter *padapter)
}
/*
-*rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
-*/
+ * rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
+ */
void rtw_indicate_disconnect(struct adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -1527,9 +1526,9 @@ void rtw_wmm_event_callback(struct adapter *padapter, u8 *pbuf)
}
/*
-* _rtw_join_timeout_handler - Timeout/failure handler for CMD JoinBss
-* @adapter: pointer to struct adapter structure
-*/
+ * _rtw_join_timeout_handler - Timeout/failure handler for CMD JoinBss
+ * @adapter: pointer to struct adapter structure
+ */
void _rtw_join_timeout_handler(struct timer_list *t)
{
struct adapter *adapter = from_timer(adapter, t,
@@ -1571,9 +1570,9 @@ void _rtw_join_timeout_handler(struct timer_list *t)
}
/*
-* rtw_scan_timeout_handler - Timeout/Failure handler for CMD SiteSurvey
-* @adapter: pointer to struct adapter structure
-*/
+ * rtw_scan_timeout_handler - Timeout/Failure handler for CMD SiteSurvey
+ * @adapter: pointer to struct adapter structure
+ */
void rtw_scan_timeout_handler(struct timer_list *t)
{
struct adapter *adapter = from_timer(adapter, t,
@@ -1691,10 +1690,10 @@ void rtw_set_scan_deny(struct adapter *adapter, u32 ms)
}
/*
-* Select a new roaming candidate from the original @param candidate and @param competitor
-* @return true: candidate is updated
-* @return false: candidate is not updated
-*/
+ * Select a new roaming candidate from the original @param candidate and @param competitor
+ * @return true: candidate is updated
+ * @return false: candidate is not updated
+ */
static int rtw_check_roaming_candidate(struct mlme_priv *mlme
, struct wlan_network **candidate, struct wlan_network *competitor)
{
@@ -1774,10 +1773,10 @@ int rtw_select_roaming_candidate(struct mlme_priv *mlme)
}
/*
-* Select a new join candidate from the original @param candidate and @param competitor
-* @return true: candidate is updated
-* @return false: candidate is not updated
-*/
+ * Select a new join candidate from the original @param candidate and @param competitor
+ * @return true: candidate is updated
+ * @return false: candidate is not updated
+ */
static int rtw_check_join_candidate(struct mlme_priv *mlme
, struct wlan_network **candidate, struct wlan_network *competitor)
{
@@ -1818,11 +1817,11 @@ static int rtw_check_join_candidate(struct mlme_priv *mlme
}
/*
-Calling context:
-The caller of the sub-routine will be in critical section...
-The caller must hold the following spinlock
-pmlmepriv->lock
-*/
+ * Calling context:
+ * The caller of the sub-routine will be in critical section...
+ * The caller must hold the following spinlock
+ * pmlmepriv->lock
+ */
int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
{
@@ -2090,13 +2089,14 @@ signed int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, u
/* copy RSN or SSN */
memcpy(&out_ie[ielength], &psecuritypriv->supplicant_ie[0], psecuritypriv->supplicant_ie[1]+2);
/* debug for CONFIG_IEEE80211W
- {
- int jj;
- printk("supplicant_ie_length =%d &&&&&&&&&&&&&&&&&&&\n", psecuritypriv->supplicant_ie[1]+2);
- for (jj = 0; jj < psecuritypriv->supplicant_ie[1]+2; jj++)
- printk(" %02x ", psecuritypriv->supplicant_ie[jj]);
- printk("\n");
- }*/
+ *{
+ * int jj;
+ * printk("supplicant_ie_length =%d &&&&&&&&&&&&&&&&&&&\n", psecuritypriv->supplicant_ie[1]+2);
+ * for (jj = 0; jj < psecuritypriv->supplicant_ie[1]+2; jj++)
+ * printk(" %02x ", psecuritypriv->supplicant_ie[jj]);
+ * printk("\n");
+ *}
+ */
ielength += psecuritypriv->supplicant_ie[1]+2;
rtw_report_sec_ie(adapter, authmode, psecuritypriv->supplicant_ie);
}
--
2.34.1
On Mon, Jan 29, 2024 at 04:18:55PM +0200, Meir Elisha wrote:
> /*
> -struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
> -{
> - _irqL irqL;
> -
> - struct wlan_network *pnetwork;
> -
> - spin_lock_bh(&queue->lock);
> -
> - if (list_empty(&queue->queue))
> -
> - pnetwork = NULL;
> -
> - else
> - {
> - pnetwork = container_of(get_next(&queue->queue), struct wlan_network, list);
> -
> - list_del_init(&(pnetwork->list));
> - }
> -
> - spin_unlock_bh(&queue->lock);
> -
> - return pnetwork;
> -}
> -*/
> + *struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
> + *{
> + * _irqL irqL;
> + *
> + * struct wlan_network *pnetwork;
> + *
> + * spin_lock_bh(&queue->lock);
> + *
> + * if (list_empty(&queue->queue))
> + *
> + * pnetwork = NULL;
> + *
> + * else
> + * {
> + * pnetwork = container_of(get_next(&queue->queue), struct wlan_network, list);
> + *
> + * list_del_init(&(pnetwork->list));
> + * }
> + *
> + * spin_unlock_bh(&queue->lock);
> + *
> + * return pnetwork;
> + *}
> + */
Delete the dead code.
regards,
dan carpenter
On Mon, Jan 29, 2024 at 04:18:56PM +0200, Meir Elisha wrote:
> Fix checkpatch warning: else is not generally useful after a break or return
>
> Signed-off-by: Meir Elisha <[email protected]>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 38 +++++++++--------------
> 1 file changed, 14 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index 044483f3d678..efaac84f22b4 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -1540,30 +1540,23 @@ void _rtw_join_timeout_handler(struct timer_list *t)
>
> spin_lock_bh(&pmlmepriv->lock);
>
> - if (rtw_to_roam(adapter) > 0) { /* join timeout caused by roaming */
> + if (rtw_to_roam(adapter) == 0) { /* join timeout caused by roaming */
The comment is wrong now.
regards,
dan carpenter
On Mon, Jan 29, 2024 at 04:18:54PM +0200, Meir Elisha wrote:
> Fix checkpatch warning: please, no space before tabs
>
> Signed-off-by: Meir Elisha <[email protected]>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 48 +++++++++++------------
> 1 file changed, 23 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index 5568215b35bd..a7c4350e0783 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -169,7 +169,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwor
> {
> unsigned int delta_time;
> u32 lifetime = SCANQUEUE_LIFETIME;
> -/* _irqL irqL; */
> +/* _irqL irqL; */
Just delete dead code.
> struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
>
> if (!pnetwork)
> @@ -389,7 +389,7 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea
> d_cap = le16_to_cpu(tmpd);
>
> return (src->ssid.ssid_length == dst->ssid.ssid_length) &&
> - /* (src->configuration.ds_config == dst->configuration.ds_config) && */
> + /* (src->configuration.ds_config == dst->configuration.ds_config) && */
Here too.
> ((!memcmp(src->mac_address, dst->mac_address, ETH_ALEN))) &&
> ((!memcmp(src->ssid.ssid, dst->ssid.ssid, src->ssid.ssid_length))) &&
> ((s_cap & WLAN_CAPABILITY_IBSS) ==
regards,
dan carpenter
On 1/29/24 15:18, Meir Elisha wrote:
> Checkpatch fix series for rtw_mlme.c
>
> Meir Elisha (4):
> Staging: rtl8723bs: Remove unnecessary braces
> Staging: rtl8723bs: Remove extra spaces
> Staging: rtl8723bs: Fix block comments warning
> Staging: rtl8723bs: fix else after break warning
>
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 241 ++++++++++------------
> 1 file changed, 114 insertions(+), 127 deletions(-)
>
Hi,
please also fix:
CHECK: From:/Signed-off-by: email comments mismatch: 'From: Meir Elisha
<[email protected]>' != 'Signed-off-by: Meir Elisha <[email protected]>'
In Patch 4/4
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit
description?)
Please issue a V2 with changelog.
Thanks
Bye Philipp