Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1933463rdg; Sun, 13 Aug 2023 02:08:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGt6ds5kQg63gilKmVKxSWMqbW1s/5BRyFjRWCaQd0Fpy8Hiz+KAdLQmbz580PJtT/ixYpv X-Received: by 2002:a17:906:cc0e:b0:99b:dfd7:b0d3 with SMTP id ml14-20020a170906cc0e00b0099bdfd7b0d3mr4985774ejb.56.1691917731473; Sun, 13 Aug 2023 02:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691917731; cv=none; d=google.com; s=arc-20160816; b=t3zRfn0JXj6Xv9NE+73m7yFMA5JKJlBx6pRIHZAMYWp9PudEBVCNncddi68ES5eni6 Shxn27RfGfUHxJdNogRYyVcZpP2RvEY+QC+EarjzrtY5o1I+t4vJwfYkeGKQ4xAERQr6 IBpk34J5GpM3QzY38w/QEkIx7BKy9KNmVzeSn1W3c4mKEDmIOXP4NAsOeY0dyQ+SBfR2 3BKP6NI6NRHPbvmdRrmY83CalICKZ/Eb56DmZ/33/EDsO2ftN2U2qx/YZGlMEdel3iP8 dileLWG0LcfcMQ38chcWmywB/cU8oda0ZGHtjixNQKgJ/pdjEYgzyapJI24JO+38mSTv 1hWQ== 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=yafTvXOw9qDIGS3IGLglUTI/sT6XCgYCEECZPdC93mM=; fh=1cdBMIz85FPYRj3yPieCu5zLx1nt70pcoGPlugZXEIc=; b=R6K1/M/qAUejuarz7lHnOEhtnoyX8iFlvB6SAcpBrwkgn5OT5WyDDWqUZ7Jy+9Pg2a wLc5hldAduckE0Ys/ehqsRpsuMipBESQMfiBsK7lHStYfs+vCMH047ObXf30usBzuj4x KqyIDjvVO9cbQW3vKpm51rnNK6aqIhRVLifH+CYh4++XpPBGMYimV33olKj3mG7LJoMH DSy8zbgrb003vK9KT0xNl5NfD1KfStSewtx6tpMzUkXJRhIDvm4dHGjgAVCDqcHploHI YqGsp20SvBBNIj4pdZIMwG2DyIQX5aRlPApE6oD1dLR6D+meCekwyF/GvELxxg3AFiZN INmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SpndYIL5; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p5-20020a170906838500b009655fcff588si6243290ejx.835.2023.08.13.02.08.26; Sun, 13 Aug 2023 02:08:51 -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=SpndYIL5; 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 S229484AbjHMGhD (ORCPT + 99 others); Sun, 13 Aug 2023 02:37:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjHMGhC (ORCPT ); Sun, 13 Aug 2023 02:37:02 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63AFE19A3 for ; Sat, 12 Aug 2023 23:36:52 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3177d3bdfb3so682987f8f.0 for ; Sat, 12 Aug 2023 23:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691908611; x=1692513411; 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=yafTvXOw9qDIGS3IGLglUTI/sT6XCgYCEECZPdC93mM=; b=SpndYIL5xHz95OsitFo/24m0F5jbfwCYwe5HO3nITx7B6LHHoRBmleN2Pn/ZOgt91c f6xm+iVH69ErRScFz0ZisVdpoavkRTpV9Cnqm0wRhIGbKEVhXtrF0BOcGEKqIGSfN6QQ fufTNJAdTmZbApS39fWGQEBMjcTy1aiPWByzvLd7nZFWRmZs8kVFSxbOHLfeU4RtnpxX k1MAKcGCFtB6iAn7F/wMOGLo9roc2UZ8l9i4KQ1Ub+N+jP7gm91zLk8pfb/shAoJppea dkKLYAMvB0uqjW1ADg4Dl2OqNHrCRow+/rtfpBAxGtGVq5OWM5KZlFpf5r7TW32Atwon zFsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691908611; x=1692513411; 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=yafTvXOw9qDIGS3IGLglUTI/sT6XCgYCEECZPdC93mM=; b=kwMpajRG2s1CQTl9tcVen0YC5ptrAGApZyiJzBTsLBsp2D1+w+s2RycbiGkFlB2XeO b1X/MfL7iibX9d8vEGF7/LspfvdXc4oehO54fNqklRmn75E16/mIKHeDIvDXGXO8Q6ee j/7bI19p3b+cqwKwY9KnBVx9tLK+nUdUxKYpIGF33hSI0vTtfTd/SEF6e2+RR1U3PD14 fXEneT/ugRDHyjdlkqxtcGaubgq7hmqC0XnyCe3h3faO64DHt/D4lk6mrjr+PxWST4E1 ZVHifRORKDMK0i2F71l+x4XpQpjymjzZuMlUvjBIONlx/+7hGWdvF9grktq2Fpr9Idtu NXZw== X-Gm-Message-State: AOJu0Yxb+lQlOLs04WPI4OUaqUX7IgqTgdTg77UUpmXKfRHCF590iTq8 qcMeFX3MOBXkPkisIPNuCYg= X-Received: by 2002:a05:600c:5111:b0:3fe:5228:b78c with SMTP id o17-20020a05600c511100b003fe5228b78cmr6279334wms.1.1691908610821; Sat, 12 Aug 2023 23:36:50 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id z5-20020a7bc7c5000000b003fbe4cecc3bsm13152437wmk.16.2023.08.12.23.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Aug 2023 23:36:50 -0700 (PDT) Date: Sun, 13 Aug 2023 08:36:48 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] staging: rtl8192e: Remove unsupported mode IW_MODE_MESH Message-ID: <54230361abba9f33827eac9bf5074dd9f62d787b.1691908402.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 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 Tasklet irq_rx_tasklet is scheduled when hw is receiving frames. Function _rtl92e_irq_rx_tasklet() is then called which calls then _rtl92e_rx_normal(). In _rtl92e_rx_normal() all frames are processed by rtllib_rx(). When ieee->iw_mode is IW_MODE_MESH the function returns 0. The calling function then calls: dev_kfree_skb_any() which clears the skb. So the driver clears all packets received in this mode. Remove dead code in mode IW_MODE_MESH. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtllib.h | 4 ---- drivers/staging/rtl8192e/rtllib_rx.c | 20 ++++++++------------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 0c812eb02ba6..afde4812a221 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -89,10 +89,6 @@ static inline void *netdev_priv_rsl(struct net_device *dev) #define HIGH_QUEUE 7 #define BEACON_QUEUE 8 -#ifndef IW_MODE_MESH -#define IW_MODE_MESH 7 -#endif - #define IE_CISCO_FLAG_POSITION 0x08 #define SUPPORT_CKIP_MIC 0x08 #define SUPPORT_CKIP_PK 0x10 diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 322e603237d4..40e7bbb17c0d 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1013,17 +1013,15 @@ static int rtllib_rx_data_filter(struct rtllib_device *ieee, u16 fc, } } - if (ieee->iw_mode != IW_MODE_MESH) { - /* packets from our adapter are dropped (echo) */ - if (!memcmp(src, ieee->dev->dev_addr, ETH_ALEN)) - return -1; + /* packets from our adapter are dropped (echo) */ + if (!memcmp(src, ieee->dev->dev_addr, ETH_ALEN)) + return -1; - /* {broad,multi}cast packets to our BSS go through */ - if (is_multicast_ether_addr(dst)) { - if (memcmp(bssid, ieee->current_network.bssid, - ETH_ALEN)) - return -1; - } + /* {broad,multi}cast packets to our BSS go through */ + if (is_multicast_ether_addr(dst)) { + if (memcmp(bssid, ieee->current_network.bssid, + ETH_ALEN)) + return -1; } return 0; } @@ -1499,8 +1497,6 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, case IW_MODE_MONITOR: ret = rtllib_rx_Monitor(ieee, skb, rx_stats); break; - case IW_MODE_MESH: - break; default: netdev_info(ieee->dev, "%s: ERR iw mode!!!\n", __func__); break; -- 2.41.0