From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Phillip Potter <phil@philpotter.co.uk>,
kernel test robot <lkp@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
linux-staging@lists.linux.dev
Subject: [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function
Date: Thu, 9 Sep 2021 07:37:38 -0400 [thread overview]
Message-ID: <20210909114106.141462-44-sashal@kernel.org> (raw)
In-Reply-To: <20210909114106.141462-1-sashal@kernel.org>
From: Phillip Potter <phil@philpotter.co.uk>
[ Upstream commit ac5951a6e3d50cfa861ea83baa2ec15d994389cb ]
Remove rtw_wx_set_rate handler function, which currently handles the
SIOCSIWRATE wext ioctl. This function (although containing a lot of
code) set nothing outside its own local variables, and did nothing other
than call a now removed debugging statement repeatedly. Removing it and
leaving its associated entry in rtw_handlers as NULL is therefore the
better option. Removing this function also fixes a kernel test robot
warning.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210625191658.1299-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../staging/rtl8188eu/os_dep/ioctl_linux.c | 75 -------------------
1 file changed, 75 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index b958a8d882b0..d4dce8ef0322 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -1262,80 +1262,6 @@ static int rtw_wx_get_essid(struct net_device *dev,
return 0;
}
-static int rtw_wx_set_rate(struct net_device *dev,
- struct iw_request_info *a,
- union iwreq_data *wrqu, char *extra)
-{
- int i;
- u8 datarates[NumRates];
- u32 target_rate = wrqu->bitrate.value;
- u32 fixed = wrqu->bitrate.fixed;
- u32 ratevalue = 0;
- u8 mpdatarate[NumRates] = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0xff};
-
- if (target_rate == -1) {
- ratevalue = 11;
- goto set_rate;
- }
- target_rate /= 100000;
-
- switch (target_rate) {
- case 10:
- ratevalue = 0;
- break;
- case 20:
- ratevalue = 1;
- break;
- case 55:
- ratevalue = 2;
- break;
- case 60:
- ratevalue = 3;
- break;
- case 90:
- ratevalue = 4;
- break;
- case 110:
- ratevalue = 5;
- break;
- case 120:
- ratevalue = 6;
- break;
- case 180:
- ratevalue = 7;
- break;
- case 240:
- ratevalue = 8;
- break;
- case 360:
- ratevalue = 9;
- break;
- case 480:
- ratevalue = 10;
- break;
- case 540:
- ratevalue = 11;
- break;
- default:
- ratevalue = 11;
- break;
- }
-
-set_rate:
-
- for (i = 0; i < NumRates; i++) {
- if (ratevalue == mpdatarate[i]) {
- datarates[i] = mpdatarate[i];
- if (fixed == 0)
- break;
- } else {
- datarates[i] = 0xff;
- }
- }
-
- return 0;
-}
-
static int rtw_wx_get_rate(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
@@ -2715,7 +2641,6 @@ static iw_handler rtw_handlers[] = {
IW_HANDLER(SIOCSIWESSID, rtw_wx_set_essid),
IW_HANDLER(SIOCGIWESSID, rtw_wx_get_essid),
IW_HANDLER(SIOCGIWNICKN, rtw_wx_get_nick),
- IW_HANDLER(SIOCSIWRATE, rtw_wx_set_rate),
IW_HANDLER(SIOCGIWRATE, rtw_wx_get_rate),
IW_HANDLER(SIOCSIWRTS, rtw_wx_set_rts),
IW_HANDLER(SIOCGIWRTS, rtw_wx_get_rts),
--
2.30.2
next parent reply other threads:[~2021-09-09 11:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210909114106.141462-1-sashal@kernel.org>
2021-09-09 11:37 ` Sasha Levin [this message]
2021-09-09 11:48 ` [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function Greg Kroah-Hartman
2021-09-13 16:27 ` Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 045/252] staging: board: Fix uninitialized spinlock when attaching genpd Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 046/252] staging: hisilicon,hi6421-spmi-pmic.yaml: fix patternProperties Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 053/252] media: hantro: vp8: Move noisy WARN_ON to vpu_debug Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 055/252] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 056/252] media: atomisp: pci: fix error return code in atomisp_pci_probe() Sasha Levin
2021-09-09 11:38 ` [PATCH AUTOSEL 5.14 083/252] staging: ks7010: Fix the initialization of the 'sleep_status' structure Sasha Levin
2021-09-09 11:38 ` [PATCH AUTOSEL 5.14 107/252] media: imx: imx7-media-csi: Fix buffer return upon stream start failure Sasha Levin
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 139/252] staging: rtl8723bs: fix right side of condition Sasha Levin
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 173/252] staging: rts5208: Fix get_ms_information() heap buffer size Sasha Levin
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=20210909114106.141462-44-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=lkp@intel.com \
--cc=phil@philpotter.co.uk \
--cc=stable@vger.kernel.org \
/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