From: Ivan Safonov <insafonov@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Straube <straube.linux@gmail.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Peilin Ye <yepeilin.cs@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Ivan Safonov <insafonov@gmail.com>
Subject: [PATCH 2/2] staging:r8188eu: remove dummy handlers from OnAction()
Date: Sun, 28 Mar 2021 19:33:25 +0300 [thread overview]
Message-ID: <20210328163323.53163-2-insafonov@gmail.com> (raw)
In-Reply-To: <20210328163323.53163-1-insafonov@gmail.com>
on_action_spct() do nothing, because rtw_get_stainfo() has no side
effects. Other action handlers are trivial.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 95 -------------------
1 file changed, 95 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 4d741737d671..fca02f17ba98 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -3517,56 +3517,6 @@ static unsigned int OnAtim(struct adapter *padapter,
return _SUCCESS;
}
-static unsigned int on_action_spct(struct adapter *padapter,
- struct recv_frame *precv_frame)
-{
- struct sta_info *psta = NULL;
- struct sta_priv *pstapriv = &padapter->stapriv;
- u8 *pframe = precv_frame->pkt->data;
- u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
- u8 category;
- u8 action;
-
- DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev));
-
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
-
- if (!psta)
- goto exit;
-
- category = frame_body[0];
- if (category != RTW_WLAN_CATEGORY_SPECTRUM_MGMT)
- goto exit;
-
- action = frame_body[1];
- switch (action) {
- case WLAN_ACTION_SPCT_MSR_REQ:
- case WLAN_ACTION_SPCT_MSR_RPRT:
- case WLAN_ACTION_SPCT_TPC_REQ:
- case WLAN_ACTION_SPCT_TPC_RPRT:
- break;
- case WLAN_ACTION_SPCT_CHL_SWITCH:
- break;
- default:
- break;
- }
-
-exit:
- return _FAIL;
-}
-
-static unsigned int OnAction_qos(struct adapter *padapter,
- struct recv_frame *precv_frame)
-{
- return _SUCCESS;
-}
-
-static unsigned int OnAction_dls(struct adapter *padapter,
- struct recv_frame *precv_frame)
-{
- return _SUCCESS;
-}
-
static unsigned int OnAction_back(struct adapter *padapter,
struct recv_frame *precv_frame)
{
@@ -3756,24 +3706,6 @@ static unsigned int on_action_public(struct adapter *padapter,
return ret;
}
-static unsigned int OnAction_ht(struct adapter *padapter,
- struct recv_frame *precv_frame)
-{
- return _SUCCESS;
-}
-
-static unsigned int OnAction_wmm(struct adapter *padapter,
- struct recv_frame *precv_frame)
-{
- return _SUCCESS;
-}
-
-static unsigned int OnAction_p2p(struct adapter *padapter,
- struct recv_frame *precv_frame)
-{
- return _SUCCESS;
-}
-
static unsigned int DoReserved(struct adapter *padapter,
struct recv_frame *precv_frame)
{
@@ -3792,39 +3724,12 @@ static unsigned int OnAction(struct adapter *padapter,
category = frame_body[0];
switch (category) {
- case RTW_WLAN_CATEGORY_SPECTRUM_MGMT:
- on_action_spct(padapter, precv_frame);
- break;
- case RTW_WLAN_CATEGORY_QOS:
- OnAction_qos(padapter, precv_frame);
- break;
- case RTW_WLAN_CATEGORY_DLS:
- OnAction_dls(padapter, precv_frame);
- break;
case RTW_WLAN_CATEGORY_BACK:
OnAction_back(padapter, precv_frame);
break;
case RTW_WLAN_CATEGORY_PUBLIC:
on_action_public(padapter, precv_frame);
break;
- case RTW_WLAN_CATEGORY_RADIO_MEASUREMENT:
- DoReserved(padapter, precv_frame);
- break;
- case RTW_WLAN_CATEGORY_FT:
- DoReserved(padapter, precv_frame);
- break;
- case RTW_WLAN_CATEGORY_HT:
- OnAction_ht(padapter, precv_frame);
- break;
- case RTW_WLAN_CATEGORY_SA_QUERY:
- DoReserved(padapter, precv_frame);
- break;
- case RTW_WLAN_CATEGORY_WMM:
- OnAction_wmm(padapter, precv_frame);
- break;
- case RTW_WLAN_CATEGORY_P2P:
- OnAction_p2p(padapter, precv_frame);
- break;
default:
break;
}
--
2.26.2
next prev parent reply other threads:[~2021-03-28 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-28 16:33 [PATCH 1/2] staging:r8188eu: refactor OnAction(): use switch instead table lookup Ivan Safonov
2021-03-28 16:33 ` Ivan Safonov [this message]
2021-04-02 13:04 ` [PATCH 2/2] staging:r8188eu: remove dummy handlers from OnAction() Greg Kroah-Hartman
2021-04-03 21:30 ` Ivan Safonov
2021-04-04 9:56 ` Greg Kroah-Hartman
2021-04-02 13:04 ` [PATCH 1/2] staging:r8188eu: refactor OnAction(): use switch instead table lookup Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210328163323.53163-2-insafonov@gmail.com \
--to=insafonov@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.com \
--cc=yepeilin.cs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).