Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp445133pxb; Thu, 9 Sep 2021 04:45:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZUyvE8g9tM/9ZqVBtzgmWMSIdraniyeQtopAE8aCfufwOun4FwiPGeMOYjB1hasGQNI1b X-Received: by 2002:a05:6e02:1c2b:: with SMTP id m11mr1935222ilh.242.1631187958541; Thu, 09 Sep 2021 04:45:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631187958; cv=none; d=google.com; s=arc-20160816; b=ckbTCvR+93eOT6HOUrGoeJvnPnnC6OEjhZK+PUuLjeDYcTeExVqT/hUIgolUYf1Pvu AfHSkU44ys8V1DORKflB1zFkL4Gf82h9DvnlxQ34iKF9MLg/qsfzUzkT26ewNIRV/vtk wNMDh9qoDWRvYg+qt+3afTS/dpcy8XgwqKSD72oCPMoKDlacJYp/nJCvNTeuobWgwjDL Ju8qgaxLY4OgY5Xj1SZ1Naa2bQiD3KnkWpvaZXRv1tv2H9WuED37Zu5Wj1I1YifJWe5O OY5Xnmz/Z6tdA01QGszQ5nhwEFvAQxCcs3ARdyKxakgFW+AY6DLN369TjKLTArqmM+4z TDfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0dnqpmrvuIygPaWO65x1rH/CgLPJiPzQMqoWI95tAmY=; b=jg1IsC6GNDQ8IfkV6QMjZcFAJ7zumjTypUm+R0vqD4ntdBgclb75Y8yq1T1o3RQJGd hxqEvtTm4psPDgZ2DoAdUoHqBtBPJgTdMhr9CyVhxXlrdIi63Ej0dgrmYQeSCGjPkeUh hZgl0Uzu5bCuGjgA9WyTYRTx1+KDoMAtZpt6kq0eDw/68t0wvSVFVj8maNE1ntktvjg4 R/eIkc5whHpO/UpNBIDqVBinekKnvlW3jBwtannETn2k3Ihi2hyBRkRIj/HOXj8108yB Cy48B8+H5av2mPqYAMu8s6eQBvqQzv7IOyVOGeBip3xObhWsjBIay7VPGRtyD/VR9rvl Dg9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GATFNgfI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si1561533iln.32.2021.09.09.04.45.45; Thu, 09 Sep 2021 04:45:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GATFNgfI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238711AbhIILpQ (ORCPT + 99 others); Thu, 9 Sep 2021 07:45:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:47268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237876AbhIILnV (ORCPT ); Thu, 9 Sep 2021 07:43:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CA306611F2; Thu, 9 Sep 2021 11:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187723; bh=R/FP0+oAVo2AeNFA7qf0OxWozrEBzLnjnBDryWXRD4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GATFNgfIaD2J6gbcv2RtQnThVSI1oTPb0mjNhR/27rYOJD70pm3A2ZqAJa430+z66 vdnIuFgJjN//SodcHW7mNbJGk7mdFC6WZNbLd3tbCW8fvI/u+7F/YAMOajOcXLTxU0 VOhGMVQLi8m7tcuPDl9uimpSOsXTspn7MjQ6/eyfnxRwAextl4HOqRyW7XqYGgbnIx tu03P9WFz5n62z28EBhD1ea7+/Ul1UehjMyzgIOa/aQ90Bw2S4WMXvfM/nkcXr2DpH s/826/JhnmR7jINyy3D0Byzd6F9D0OPeGRT4ZhfjGPYAeiBb9Kj2OTsMzYpc7WByyM 8bg93h4SosmQQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Phillip Potter , kernel test robot , Greg Kroah-Hartman , Sasha Levin , 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 Message-Id: <20210909114106.141462-44-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Phillip Potter [ 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 Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625191658.1299-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- .../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