From patchwork Mon Apr 24 18:04:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Hegde X-Patchwork-Id: 87128 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2926440vqo; Mon, 24 Apr 2023 11:16:10 -0700 (PDT) X-Google-Smtp-Source: AKy350ZfukDq9TC0ky+K4ClMb96r8paYwMg3hfMduoC+9SHic8AWq1Qo1KMfMZTdyTLILSzPBAh9 X-Received: by 2002:a05:6a20:12d2:b0:f1:b381:67c4 with SMTP id v18-20020a056a2012d200b000f1b38167c4mr17068172pzg.20.1682360169809; Mon, 24 Apr 2023 11:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682360169; cv=none; d=google.com; s=arc-20160816; b=uAC9Vb7iZmF4N4NNs3ZsDXw+ThM9HYtzibGDnEA7Y8Fpj+HwquEmvCNn3G91QyyqpM hcXDjFfvDPLFz9ofiOi1T65t3KgLp5JF1McS1EiEoepUj0knk6a2/Nqti4ZWHk6ci5XB fsGLKX3TmXzULCG+n2Yc6X5fpF629mYjvgmllcVu0lpeQ6j4UdQsdnwJe3XkEqqbQljp KSpVuoRDtGvJSsC2tcRNos6ihhtjUAHxAhPPFbv/gCTfK5EAdENeSyYOUgaRVJiuiliU r0oWxkVeW488mAMbpP4u4OJLCk44Xg2XtRUODuzaXUQ8cATtk9h6mpRLST3qPssoa7Hf ebRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=pz7puxVNtolmzcAAwyFjNawuUpApiD7LRdlC7UvoCIo=; b=qUbYswRrMv46aCoflxV/DhdXFkEILDWlkvAwQGmmdDIAgiNICTOUWYbQ4XDHayOXpe 8FWoCPT2Huk/OSg+4g5JRI5IBgc2vD+EzLWENR/V2NejuLKOsWsSPKJr9Q68PqGdgxk+ NCsPXOm9Od0I8bPZ7WI4jg2l8cOhg8tjen4yaQoHFf189VKcurgTnv8qBMvenuiZJ7w6 mdDs7/Dr6IhDlbh86hkhKNXeZKrrwPaJZ2bQGhu6irub7yjDW4lxVidq7s9/oUl2vFte v13C1JJ38rEXT+bPmnA7UN5PQQ/lxNxB7hSQTAdzkuKRZH7b7o1h4e40OlAUzKhXTvOY io3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=YjDZliCE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a63d648000000b0051b54dccff7si11349659pgj.741.2023.04.24.11.15.57; Mon, 24 Apr 2023 11:16:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=YjDZliCE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231928AbjDXSEQ (ORCPT + 99 others); Mon, 24 Apr 2023 14:04:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbjDXSEO (ORCPT ); Mon, 24 Apr 2023 14:04:14 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79D857D83 for ; Mon, 24 Apr 2023 11:04:12 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-63d4595d60fso29940831b3a.0 for ; Mon, 24 Apr 2023 11:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682359452; x=1684951452; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pz7puxVNtolmzcAAwyFjNawuUpApiD7LRdlC7UvoCIo=; b=YjDZliCErZG6eMEe/1BMVzzbVztgISMWDi6eJlA/S29GGNg3j2iwgsvs9h5cFjzBC1 Z+bRVuCYOtAdWjxET6awwI4G3zCqkV1Bl+AfxuzwUyvlbED+T6VeYNqa3+vFdujhww3o Wf0LbZFvZDJ7lPyWZD8CZiSnhBVqeqQjlzEyXiYw1PANXpUiEGMbzSVmVNYZ8ej/OKI+ p9wBMgYLTfm546yip58JQp1M6Cp2CAE7hkE4W7Di9S+yvYBObwe2jkFbwOYTOevUmfgC 1y24XyIjW2mDTBmG2Agkb1I3j3qGeDZ4giudu0qKGmSTQKY1hGzaLpKufuboxDeTFP13 1atg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682359452; x=1684951452; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pz7puxVNtolmzcAAwyFjNawuUpApiD7LRdlC7UvoCIo=; b=Cz944xZ16Kj9hE6JmAozuwtsg6BSd53wzWnVrjm7G8mE2Cc2a2otDlV57cG6ws3VU2 S6At/ofI0k/b4PNki1JHLKvLsK60/EYQaPP9aGvS+F26ZToUUCkb32xd0iQKLp3Ln6nn WQlbLOh4h6ze/p8w4FyaMqH2HXtYAyAR7v/J2dexkKleENaxd/35mg7CWW8UQZHSHUz9 knt9hDmCac22QPJgYWJtb9ZRgKVlycrLIgb2jInvhQYNXAw1ZjjqcM3Xtwxh+K68wmvI BaEmX0CXveU5+JCBv5rkdTyCL9y4y8UNbhkBM3el6T2smdTRvxri3Vsm7zjkrDAKQqNs G8Kg== X-Gm-Message-State: AAQBX9d2O05WKt5qObognmEVEAoEcZiptNL9CMIt/0c8Pat0mt2ysuED 1aR5MZyM/3yEzDwvKp/42K8= X-Received: by 2002:a17:90a:6002:b0:246:865d:419a with SMTP id y2-20020a17090a600200b00246865d419amr20810032pji.6.1682359451869; Mon, 24 Apr 2023 11:04:11 -0700 (PDT) Received: from pop-os.localdomain ([103.251.210.208]) by smtp.gmail.com with ESMTPSA id u19-20020a17090abb1300b0024b2fc15befsm5797080pjr.44.2023.04.24.11.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 11:04:11 -0700 (PDT) Date: Mon, 24 Apr 2023 23:34:07 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/4] staging: rtl8192e: Remove unused rf_set_sens variable Message-ID: <5a9767fab76b1836ea7881994ffb3593c1ab12bf.1682358035.git.yogi.kernel@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764082497384093223?= X-GMAIL-MSGID: =?utf-8?q?1764082497384093223?= The rf_set_sens variable is declared but never set, so it is always NULL. This commit cleans up the unused rf_set_sens variable and removes the associated code that relied on it. Specifically, the following changes have been made: - Removed the `range->sensitivity` assignment, which was never used. - Removed the sensitivity level get implementation, which always returns an error code. - Removed the sensitivity level set implementation, which always returns an error code. - Removed the `rf_set_sens` variable. Suggested-by: Philipp Hortmann Signed-off-by: Yogesh Hegde --- Changes in v5: 1. Rebased onto latest staging-testing branch Changes in v4: 1. Split changes into patch series per feedback from gregkh@linuxfoundation.org Changes in v3: 1. Fixed description to fit within 75 chars 2. Added suggested tags per feedback from philipp.g.hortmann@gmail.com Changes in v2: 1. Removed function definition rf_set_sens 2. Removed usage of variable priv->rf_set_sens 3. Removed functions _rtl92e_wx_get_sens and _rtl92e_wx_set_sens 4. Cleaned up the variables sens and max_sens used in these functions Changes in v1: 1. Fix comparison to NULL of variable rf_set_sens --- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 19 ++----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 285dac32c074..08145e1f814c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -231,7 +231,6 @@ struct r8192_priv { struct rt_stats stats; struct iw_statistics wstats; - short (*rf_set_sens)(struct net_device *dev, short sens); u8 (*rf_set_chan)(struct net_device *dev, u8 ch); struct rx_desc *rx_ring[MAX_RX_QUEUE]; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index cb28288a618b..cc1af367f37d 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -311,10 +311,6 @@ static int _rtl92e_wx_get_range(struct net_device *dev, /* ~130 Mb/s real (802.11n) */ range->throughput = 130 * 1000 * 1000; - if (priv->rf_set_sens != NULL) - /* signal level threshold range */ - range->sensitivity = priv->max_sens; - range->max_qual.qual = 100; range->max_qual.level = 0; range->max_qual.noise = 0; @@ -813,10 +809,7 @@ static int _rtl92e_wx_get_sens(struct net_device *dev, { struct r8192_priv *priv = rtllib_priv(dev); - if (priv->rf_set_sens == NULL) - return -1; /* we have not this support for this radio */ - wrqu->sens.value = priv->sens; - return 0; + return -1; } static int _rtl92e_wx_set_sens(struct net_device *dev, @@ -831,15 +824,7 @@ static int _rtl92e_wx_set_sens(struct net_device *dev, return 0; mutex_lock(&priv->wx_mutex); - if (priv->rf_set_sens == NULL) { - err = -1; /* we have not this support for this radio */ - goto exit; - } - if (priv->rf_set_sens(dev, wrqu->sens.value) == 0) - priv->sens = wrqu->sens.value; - else - err = -EINVAL; - + err = -1; exit: mutex_unlock(&priv->wx_mutex); From patchwork Mon Apr 24 18:04:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Hegde X-Patchwork-Id: 87126 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2923502vqo; Mon, 24 Apr 2023 11:11:05 -0700 (PDT) X-Google-Smtp-Source: AKy350YtbS/K0KDfTYYZoKIeUUSKpiQNs11H+Pk7BSngNx9NfF/9iBwr6D7wfh9rhGDMUS04KFa6 X-Received: by 2002:a05:6a00:1695:b0:63b:84a4:7b0 with SMTP id k21-20020a056a00169500b0063b84a407b0mr19024941pfc.30.1682359865635; Mon, 24 Apr 2023 11:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682359865; cv=none; d=google.com; s=arc-20160816; b=0fekcLpZiJr9N5RqO8cV7MoEglwANrveUk4F+vzph2231U6CQD01JizlvtSMstUruu Aog/b/uqd854hTZXTZwHJv7RA5B5KvwcvgMDbLkdxO7If2PPnH6j3/cDxMvIYmyjbDL6 u+d/z9Z52Q3oPgGUZWF/AVnySy7TQZ/D5WIalZD03maebhW+e161ICHvi/0sI+nH+U5e 5J4uOrD5vM1A5qcmCtAHurmOcr87grLS/01a2Xg8ncmtU1TcWxI/fFdJAKpioVU1MrMs nXEp72DsC4ngAf5jhuTFRq41t9NqqEHhgtwYTJjuzeKQU/QMKptLVI7Vk/+U7ZF0bxaP HCjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=9W3bGp63HvrS4+xBjDVhbzlULsCiRVmQgDYYgNevJZE=; b=MdNAvuYs4JcRVeZURuMpb4pFvIZb071JOYomU/1jyU7p4rDfxWBWaKcPahui1hFhAt D6JWNfD9b7z0/HvlV4yjxK6DtGLwR0LsPM/h39SZWqNJ70i+PAe5ZdBZ11a4XrDbGHwp H02Q8CYP8bH8bn7Uqb86IlM9LsfTS9ibtwq4VNJPFUWQIwJ7UUDAKpwM4iKewkXgDpVY 1dp33N5JOurde+6snZufJyBAHLr8MumO2SFxIAK7VCa41Uwxkm5vHNNpWSGSNFDYZzo+ A+xJkJQIIhXQBDzE6frASQPww8uDW5ayfDizEQjI8cdJr/rqQMbFskYDfPQ5Mpj00jub G9pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qbnnG0C4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a654b8d000000b00524f8b0f257si5742113pgq.102.2023.04.24.11.10.52; Mon, 24 Apr 2023 11:11:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qbnnG0C4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232244AbjDXSEq (ORCPT + 99 others); Mon, 24 Apr 2023 14:04:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232060AbjDXSEo (ORCPT ); Mon, 24 Apr 2023 14:04:44 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A57235258 for ; Mon, 24 Apr 2023 11:04:43 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1a6817adde4so52731625ad.0 for ; Mon, 24 Apr 2023 11:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682359483; x=1684951483; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9W3bGp63HvrS4+xBjDVhbzlULsCiRVmQgDYYgNevJZE=; b=qbnnG0C4A/Rn7+VqEmuzUg9FuGwvyZaKQjdmVVbgXXZ/i2FIp8FyQM9Kxy5jHQYXLI 47wMuUc6Y27vZE0hm8HGX3xu846ClshPJw1J3XE6qFA0gAv1zvaov8dNo9pYPEaYkt3/ nQUwHLBb1OCcTvZLNp72G1BEtOB/4ZKHW79isgGYG5768fwgUHMgT3Ute7BTkLifI99U Uv4mEgXOEoby2DIrW/D+J1o1UU0S4vnqUZLrP2UZIAngc8mN2iCzrqCLluy6U7uyO+7E rgVmI9ODPveMDhXOxWbOFIxWaBEUKuErhWCtOz+wc8lYEWPW3IOSgJf/0Y3VkjJ/UU5m 5GbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682359483; x=1684951483; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9W3bGp63HvrS4+xBjDVhbzlULsCiRVmQgDYYgNevJZE=; b=jUvRZPvqWzkJ/S/jMQIGKPNbixn848FM6PhJn3OFG8kQw/hzQGZ0dzMJPbeuAHw16f /42VMz/Rj0cR/7awIglCvb8g3xhyBSHpqDmj2+L0E2hAzOfGn21Ht+bB7veL8hmupCaT iId8d/5NN3aJ9etDEv1Wu7YOWfRl5530clEQ9Ao//1Sd3738FNi1jf7YuL01GsfdGIDM Ppp7t+flKlyvy6hG5f3Re7MxGsYGe9/RtWs+XsNEJ96aZJvXECp9zDKXEkDIFtKcm8Gc csfuh6zbfuZT19IEScpqdMQlexBKXe/XRmmw0Fxytmp5risDFxXotXXriA/qb9BxZyLc uytg== X-Gm-Message-State: AAQBX9e/cJ6TAbOjoZ5b+NS763PlQwHBGqskpupIFHisDXVirQw8lRa2 PXWKAQcIoO66tTVEp4Jqd0d6j8EwBC4= X-Received: by 2002:a17:902:fa86:b0:1a6:9906:1eb7 with SMTP id lc6-20020a170902fa8600b001a699061eb7mr12726001plb.35.1682359483140; Mon, 24 Apr 2023 11:04:43 -0700 (PDT) Received: from pop-os.localdomain ([103.251.210.208]) by smtp.gmail.com with ESMTPSA id d1-20020a170902aa8100b001a051eb014bsm6831251plr.219.2023.04.24.11.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 11:04:42 -0700 (PDT) Date: Mon, 24 Apr 2023 23:34:38 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/4] staging: rtl8192e: Remove unused _rtl92e_wx_get_sens function Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764082178339615035?= X-GMAIL-MSGID: =?utf-8?q?1764082178339615035?= After removal of rf_set_sens variable, the _rtl92e_wx_get_sens function always returns an error code. This commit removes the unused function and the respective ioctl. Suggested-by: Philipp Hortmann Signed-off-by: Yogesh Hegde --- Changes in v5: 1. Rebased onto latest staging-testing branch Changes in v4: 1. Split changes into patch series per feedback from gregkh@linuxfoundation.org Changes in v3: -- None Changes in v2: -- None Changes in v1: -- None --- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index cc1af367f37d..f0c590064def 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -803,15 +803,6 @@ static int _rtl92e_wx_get_retry(struct net_device *dev, return 0; } -static int _rtl92e_wx_get_sens(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) -{ - struct r8192_priv *priv = rtllib_priv(dev); - - return -1; -} - static int _rtl92e_wx_set_sens(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) @@ -1052,7 +1043,6 @@ static iw_handler r8192_wx_handlers[] = { [IW_IOCTL(SIOCSIWMODE)] = _rtl92e_wx_set_mode, [IW_IOCTL(SIOCGIWMODE)] = _rtl92e_wx_get_mode, [IW_IOCTL(SIOCSIWSENS)] = _rtl92e_wx_set_sens, - [IW_IOCTL(SIOCGIWSENS)] = _rtl92e_wx_get_sens, [IW_IOCTL(SIOCGIWRANGE)] = _rtl92e_wx_get_range, [IW_IOCTL(SIOCSIWAP)] = _rtl92e_wx_set_wap, [IW_IOCTL(SIOCGIWAP)] = _rtl92e_wx_get_wap, From patchwork Mon Apr 24 18:05:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Hegde X-Patchwork-Id: 87127 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2926436vqo; Mon, 24 Apr 2023 11:16:09 -0700 (PDT) X-Google-Smtp-Source: AKy350bBAzqNzp3u5vPzTL2JN6FfKpfjgyFg0dcPU6UhM+kjnMlXLTxe4pqNL1ilA+FrxjiN9PKz X-Received: by 2002:a05:6a00:2d24:b0:640:ddf8:607a with SMTP id fa36-20020a056a002d2400b00640ddf8607amr3185677pfb.14.1682360169447; Mon, 24 Apr 2023 11:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682360169; cv=none; d=google.com; s=arc-20160816; b=IV6DaD1zjZxNr+EglG6CVVRnBUwtplcAEuLP+/ZclnArWm5EFO27f4LvlFzvBFb/ko SfEMqJ+Ur5Oeq3Uc554tm/Fh0V18COyzqg/SKEw+VV9E+u9VYBtQwOE7qNkJF60LdO9m h3DOhRQzLXdOxEMhVepKDySi2ub5UXBdOpLYUFIbwqKfUl68xQZGBY2+gKeNwpxXzXI/ a0G3ewtKWwAmJnx3BRgJQ1jeE/Z4HUPNNMxN5hEIYtLCfUmBwJEpuDjmsCmz2cuMUpI4 fnvuIWDHRVFFi2BLzc/Pb5wAud17zqEnlDn0eQeG5j7oy4F/2KEnLQqU5rseM2sKQ9ZO YuZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=QiIVNyd08SCa9xZF0j0zmRx0TelGskNY2ufTY9xiK5M=; b=mxSalwqQ/4VwlI3SGOoRlUErQ0M1yay2nErcSmXDDilB7hIUAyp2q/UISrAC4oBBP7 RFPvLEqM9PX+3fk8eOe7PftyjxGgKUG4TnPhhWkX62bxwekq3V7GiRlW/2j/3GYgzFNc ZM9aMCbDyBKvElYSJCsGrPezcb5Qkhi0cXxqvAa2DDwqHcjQSZvVLlwi93B+UvzqQIEJ oSo8YVKotfYvpReVD/9Oyh8k2fLmjyBHIznNTnMkf+OxiS/N0iD9R53OR/blM/Ucr5Id 5m9HsKbMqw7O86o5f+Dgrk3FqtkjD5VyBmOA5Z9fYhcljZo6rl7syq40/EoXa35lOyX4 c59Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20221208 header.b=FtoVTIjx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a630f05000000b00519cded062csi11927004pgl.788.2023.04.24.11.15.55; Mon, 24 Apr 2023 11:16:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20221208 header.b=FtoVTIjx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231503AbjDXSFY (ORCPT + 99 others); Mon, 24 Apr 2023 14:05:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231908AbjDXSFV (ORCPT ); Mon, 24 Apr 2023 14:05:21 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C474F8683 for ; Mon, 24 Apr 2023 11:05:12 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-63b733fd00bso3957065b3a.0 for ; Mon, 24 Apr 2023 11:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682359512; x=1684951512; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QiIVNyd08SCa9xZF0j0zmRx0TelGskNY2ufTY9xiK5M=; b=FtoVTIjxm1x19Xo2myP/LrNBbREUxIokQhVfkVN/WWcLnQHJbK6LNCobiSBale1+2/ /e7VGDPbBjkACeVOB5+Pouc4RVXcBbfHE2FDE2QotgTwwE9lxLy7cqBsBdcFrJwdQSE0 7Wjx4C+xp9cEFBA5Qy5yTnbbBzH4C2MzooslOzgC83BITnm/VVPSSHohEw6CjLXELWmE jmLLgN8/8kGcIFyvsP9Kik6B/JJMgePLQ1Vo1SkgfiUisN1wX07NwpOy9LSrIoiqjxov 5cxCXh+wOEnKcHTcxBxHiPsbxXL8ssBCijXIYYw4yCf0/EHUO9lpibyfyDG7ItnbUS62 zAKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682359512; x=1684951512; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QiIVNyd08SCa9xZF0j0zmRx0TelGskNY2ufTY9xiK5M=; b=Lb7Sk05pUlj88TcHhoI42Q98M9tNCG3BpmdeGri/seE8yxnmMGeERoF7X8OdKPwkOs i77oJ3XOeaX0tGUyHTiRSehofItHeaA8iwzSnxkqevxyhbeX8kVJgtmkTSEfcpPjW5qX BDT6821wOrqn2eQYZQWoUUYkd2mcV4z63HzUHVDAsKpV4we39lJcg7pcayUzEFpHEnCg pjAYJzz17sDsljzPxKDawnl9Ff1RrhNhLACm0yXQzj07taa9hnOC4iUM0Tjgg9BCwaii BCMhJpVZspnZi1Lz/SLc6k2KM5+hAuaWxQmMXPMy/Cl3jHp+B4nmPmZv7zBXWS3S6RmS bzrA== X-Gm-Message-State: AAQBX9dpsAMeBKwd5lbBaf5fzfXbkuzv6bS6uqGyu2mi/GwNANdtYqtn vyESFupFL/KVsxQHHXr1IoQI3Px0UIg= X-Received: by 2002:a05:6a21:33a2:b0:f2:9378:814a with SMTP id yy34-20020a056a2133a200b000f29378814amr13326744pzb.49.1682359512298; Mon, 24 Apr 2023 11:05:12 -0700 (PDT) Received: from pop-os.localdomain ([103.251.210.208]) by smtp.gmail.com with ESMTPSA id s1-20020a056a00178100b00625d84a0194sm7794339pfg.107.2023.04.24.11.05.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 11:05:11 -0700 (PDT) Date: Mon, 24 Apr 2023 23:35:07 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v5 3/4] staging: rtl8192e: Remove unused _rtl92e_wx_set_sens =?iso-8859-1?q?_function=1B?= Message-ID: <439386d2940fe70ec2092e87211df5e7946aab82.1682358035.git.yogi.kernel@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764082496930347208?= X-GMAIL-MSGID: =?utf-8?q?1764082496930347208?= After removal of rf_set_sens variable, the _rtl92e_wx_set_sens function always returns an error code. This commit removes the unused function and the respective ioctl. Suggested-by: Philipp Hortmann Signed-off-by: Yogesh Hegde --- Changes in v5: 1. Rebased onto latest staging-testing branch Changes in v4: 1. Split changes into patch series per feedback from gregkh@linuxfoundation.org Changes in v3: -- None Changes in v2: -- None Changes in v1: -- None --- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index f0c590064def..0bb657fda06c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -803,25 +803,6 @@ static int _rtl92e_wx_get_retry(struct net_device *dev, return 0; } -static int _rtl92e_wx_set_sens(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) -{ - struct r8192_priv *priv = rtllib_priv(dev); - - short err = 0; - - if (priv->hw_radio_off) - return 0; - - mutex_lock(&priv->wx_mutex); - err = -1; -exit: - mutex_unlock(&priv->wx_mutex); - - return err; -} - static int _rtl92e_wx_set_encode_ext(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) @@ -1042,7 +1023,6 @@ static iw_handler r8192_wx_handlers[] = { [IW_IOCTL(SIOCGIWFREQ)] = _rtl92e_wx_get_freq, [IW_IOCTL(SIOCSIWMODE)] = _rtl92e_wx_set_mode, [IW_IOCTL(SIOCGIWMODE)] = _rtl92e_wx_get_mode, - [IW_IOCTL(SIOCSIWSENS)] = _rtl92e_wx_set_sens, [IW_IOCTL(SIOCGIWRANGE)] = _rtl92e_wx_get_range, [IW_IOCTL(SIOCSIWAP)] = _rtl92e_wx_set_wap, [IW_IOCTL(SIOCGIWAP)] = _rtl92e_wx_get_wap, From patchwork Mon Apr 24 18:05:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Hegde X-Patchwork-Id: 87129 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2926885vqo; Mon, 24 Apr 2023 11:16:55 -0700 (PDT) X-Google-Smtp-Source: AKy350YO4wFlz4H3Xo5pApEZ85ncpNEhjecwX89fEjcAYYxKCLxAfFWGF26ddchFFUPlph5YFSoj X-Received: by 2002:a05:6a21:1014:b0:ec:86a7:4fa5 with SMTP id nk20-20020a056a21101400b000ec86a74fa5mr16795735pzb.30.1682360215197; Mon, 24 Apr 2023 11:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682360215; cv=none; d=google.com; s=arc-20160816; b=bHleNcOrQyXeoQ3vvFQZIyuOimG6Nrk0Ldik9aDsO3PD0zLPZoKqoMeBKmwRNr1QM3 8pjCyIulYg+FX5X83VGMVkPfd1HIo47d5DbmwP2r4mIDdUC6apbtyqCZ2/n/zpY0i1fG cbmJcLRdlxAcfBlgH/w1KHoScjgwvtD0xpESCdw/Yn6EOJmXxtaDzbtu8uDkTiP0AuLG Rrxn89Jpe+CUZDtaoeZ8hZNXnGjy0R/SdRPu4Lgc4RqWK8rmMfJ9EhuMcnrqcXv6UTR6 lM+KL5CBW4hflVTdxcvqmsv4hMId8JjCds1rh99DvBb276GSnOy2f5Y3b3v52/o1Dp1t PWZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=tfmGIk+2aJtglmQ4U+xotZJmfTGbg/l0yn8LVq2SGfo=; b=MVyUfoSc6TWe0Wnx5OlczaZe30nS3RJnQ5EDhY967JQitiFQBES7iuiS/5bC4Mlg9b 8nFzLAXbe7zoX0FdPRIoZmek/K/aCZYePssKkolEa9VLggkNpmnfzz6BoZSBJBLYAW4U lvtKd0tctmf9I1MmjXSPWWpkbI1iLVbKXk7D9nivp+COrabXcSHvORRwP7XWwbX5766n bbkADrJcD+rdunRP+TNaHz2anVj2BVw+U0jjZ4r54SmwwWrxv1PwDricyGE7Fnmmbd2q Lu9KqdVs0l2h+YD5Qu+udrP4aPylk03l8+uZH3zd2N/nDx18i9yE6ZJIV3F4X0C7KUnF OD8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=OarNsWC+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a127-20020a621a85000000b0063b78126397si11418258pfa.230.2023.04.24.11.16.22; Mon, 24 Apr 2023 11:16:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=OarNsWC+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232060AbjDXSFd (ORCPT + 99 others); Mon, 24 Apr 2023 14:05:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbjDXSFb (ORCPT ); Mon, 24 Apr 2023 14:05:31 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C6FE7D8C for ; Mon, 24 Apr 2023 11:05:30 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-63b5fca48bcso4108825b3a.0 for ; Mon, 24 Apr 2023 11:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682359530; x=1684951530; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tfmGIk+2aJtglmQ4U+xotZJmfTGbg/l0yn8LVq2SGfo=; b=OarNsWC+fF4u+9Ooj0JuFEUiySfJdyWWMfDsKABx+8IhNqooMu67lLrn21b907pxSV HF75Bf7Sn4C9W9C1k3x7TXDy2bi9I8G7irqy81QbvEE4g3+COSbEZ9B1sWDFcgyY4/i7 dfwu2ZtKN/9iv63Q8MJJlyXURJ9BWZQQac4AhCBtyCOBH2msn1kgPqtMjASeQVMHZmqd 24yBO0+fzkcmstrvItioH7HPnbkajWjknDCCL/X/M188exE7W4VkOXotr9XqVPTJVq2y zvyRr3ag+sSVP9CrnTck5sWVuon1wX0N94pP9YEuPkk38AbfJEdqBjhcF/0bxcLaAFWJ wLWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682359530; x=1684951530; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tfmGIk+2aJtglmQ4U+xotZJmfTGbg/l0yn8LVq2SGfo=; b=RSYpXYbK/4gN6XAWgt/x43RAW9XtjP4XG6yS/rlVXkT399cACpUu3exZoMASOMPADt FplQiHrjJqxx+Pbl4rqWYcRMNrO16lzCsTtSZB3a7MrBn0B4XDEWY+GHseKA6X5t6XtA Lt8E72ypl0FX2M98ufBd+n3C0FkFnJb2J4Ye6F3NarzoLyNq2REAnVbifRmsMMllCaWm K8mcRLX4FkhIMNmj7Np+l9jh16TA+Mx2AiIxA9tsdOMeEdFrQ/IyBHBzI5Sz1H0LuF+2 2jj0RhHdUmmeU5RJvDKIwutS0+16h+RhYT3Xqw+vWXIK0FBrE+1Xa8z5NUkUwV1Gb5Zc s8Xg== X-Gm-Message-State: AAQBX9ejuxMMlTKtaWIjR2eHVZfJeNeZStogJNoT9OUiHZ9g3S37OWSf V7NrEqmVnCyHYkyhiBRbwRUE97Vta+E= X-Received: by 2002:a05:6a00:a93:b0:63f:1717:b7fa with SMTP id b19-20020a056a000a9300b0063f1717b7famr17891664pfl.24.1682359529639; Mon, 24 Apr 2023 11:05:29 -0700 (PDT) Received: from pop-os.localdomain ([103.251.210.208]) by smtp.gmail.com with ESMTPSA id h69-20020a628348000000b0063db25e140bsm7666697pfe.32.2023.04.24.11.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 11:05:29 -0700 (PDT) Date: Mon, 24 Apr 2023 23:35:25 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v5 4/4] staging: rtl8192e: Remove unused sens and max_sens from r8192_priv struct Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764082545123180417?= X-GMAIL-MSGID: =?utf-8?q?1764082545123180417?= The 'sens' and 'max_sens' fields in the 'r8192_priv' structure are no longer used by the driver. This commit removes these fields. Suggested-by: Philipp Hortmann Signed-off-by: Yogesh Hegde --- Changes in v5: 1. Rebased onto latest staging-testing branch Changes in v4: 1. Split changes into patch series per feedback from gregkh@linuxfoundation.org Changes in v3: -- None Changes in v2: -- None Changes in v1: -- None --- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 08145e1f814c..ec9e454299a8 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -270,8 +270,6 @@ struct r8192_priv { short promisc; short chan; - short sens; - short max_sens; bool ps_force; u32 irq_mask[2];