Here's some more cleanups, mostly related to bSurpriseRemoved and
bDriverStopped.
Please apply them after the first patchset I sent earlier today.
Martin Kaiser (3):
staging: r8188eu: use a qos_hdr in validate_recv_data_frame
staging: r8188eu: drop another removal/stop check
staging: r8188eu: drop removal/stop check in
dump_mgntframe_and_wait_ack
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ------
drivers/staging/r8188eu/core/rtw_recv.c | 9 +++++----
2 files changed, 5 insertions(+), 10 deletions(-)
--
2.30.2
There's no need to check bDriverStopped and bSurpriseRemoved in
issue_probereq_ex.
The code path looks like
issue_probereq_ex
_issue_probereq
dump_mgntframe
or
dump_mgntframe_and_wait_ack
All paths from dump_mgntframe check the two variables.
dump_mgntframe_and_wait_ack contains a check as well.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 17803aca83c8..bfd6afd7266e 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -4496,9 +4496,6 @@ int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid,
i++;
- if (padapter->bDriverStopped || padapter->bSurpriseRemoved)
- break;
-
if (i < try_cnt && wait_ms > 0 && ret == _FAIL)
msleep(wait_ms);
--
2.30.2
We can remove the checks for bDriverStopped and bSurpriseRemoved in
dump_mgntframe_and_wait_ack.
The code path from this function looks like
dump_mgntframe_and_wait_ack
rtl8188eu_mgnt_xmit
rtw_dump_xframe
loop over all fragments
rtw_write_port is called for each fragment. bSurpriseRemoved and
bDriverStopped are checked in rtw_write_port.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index bfd6afd7266e..be33489d3dfd 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -3988,9 +3988,6 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmg
u32 timeout_ms = 500;/* 500ms */
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
- if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
- return -1;
-
mutex_lock(&pxmitpriv->ack_tx_mutex);
pxmitpriv->ack_tx = true;
--
2.30.2
On 11/6/22 18:04, Martin Kaiser wrote:
> Here's some more cleanups, mostly related to bSurpriseRemoved and
> bDriverStopped.
>
> Please apply them after the first patchset I sent earlier today.
>
> Martin Kaiser (3):
> staging: r8188eu: use a qos_hdr in validate_recv_data_frame
> staging: r8188eu: drop another removal/stop check
> staging: r8188eu: drop removal/stop check in
> dump_mgntframe_and_wait_ack
>
> drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ------
> drivers/staging/r8188eu/core/rtw_recv.c | 9 +++++----
> 2 files changed, 5 insertions(+), 10 deletions(-)
>
Tested-by: Philipp Hortmann <[email protected]> # Edimax N150