From patchwork Sat Jun 17 13:56:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109502 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2003236vqr; Sat, 17 Jun 2023 07:19:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4TXl5RiXp5W8dViDpVAW/JOYcEzrPWAFxS7CclHl2qEgkG+fF/Beo72APRLiv9k/WHLFgC X-Received: by 2002:a05:6808:10c7:b0:39e:7b6e:6492 with SMTP id s7-20020a05680810c700b0039e7b6e6492mr7491603ois.21.1687011549719; Sat, 17 Jun 2023 07:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687011549; cv=none; d=google.com; s=arc-20160816; b=1COguPJmtaH+6oBbAvDSCehXrT6uImCCg7Jx2GrlpA+6MOyXeTYPf3+u3r1ed/24ZU F0Mo125F7bjlBm9Zn7wQMPY/qdDbgYZ3p5NQBvCzXn/tOslt2afqkpuSTxGfv9EDK1ll v8OqhNZ95Ebl1h1psm9/j+9BlUPoWvIlzpNFuVKf3+Hii7Qp+BN7DsXD5nK0vw847n22 M4MtlfHlis/JnydyCFs4uLqWs5p+XfUhlrEZSgAZWBpzQiNv1p42U8IQSIebShgGN9+v YZMA9/H6fqEEqjk5IK5G5htdM2eCjJnKeMxA2dRL5c9uV5OZf5Mkub6/pVm7OSC5+UE2 /jEw== 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=b7DeMqONapwDBFWxqll13s5Z4bgKhDNtxF1406ybhog=; b=L5gOR0y0a3w3uJGHnZ02mUkRP1WGaTz4/WqDmFmYPZx26e3E/yg0YfILx+EyPDUVmT YHS9Irp3SDqoDu+VOjhR2Z7GoyhHmVPRCLzI8JB8zRiChDRK41iGIh0uaBY9fmHaZ6If 4Tq6qDJLOUJqCi1+0pR0miUNC9bAcJFRhCCQoIZP9Ap21lSzM24NiasXvefdxlW8ztr4 YMhmzpq4vTq9tpw5cSFpuB4h/Sw4UiXnR3+KDvsSRqO8Ve6xWH7Q62oMsUR2vQwK+pz/ lOb4y5z20q7UcuUYmpL8VUZldbf71ds+FtVMVdle4Y7NQdFjcz8ss/HkAaffc2eqoWxc nczQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Gh9nS0b0; 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 bu24-20020a632958000000b005533c53f577si2556785pgb.138.2023.06.17.07.18.56; Sat, 17 Jun 2023 07:19: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=Gh9nS0b0; 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 S231855AbjFQN4u (ORCPT + 99 others); Sat, 17 Jun 2023 09:56:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235825AbjFQN4q (ORCPT ); Sat, 17 Jun 2023 09:56:46 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97E8F1704 for ; Sat, 17 Jun 2023 06:56:45 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-98502b12fd4so46541166b.1 for ; Sat, 17 Jun 2023 06:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010204; x=1689602204; 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=b7DeMqONapwDBFWxqll13s5Z4bgKhDNtxF1406ybhog=; b=Gh9nS0b0aiRQnGIzctHftCwqdKe3a8dVnxL6zDhEsOp4RV/4iSbkXxXt4lAJM38Jgi FCkogfJB/Y4BQDW8Evm89WeIm/ymdaVRg3FjBz7r9x3YYZoUVa3Ks2Q1ilVg5oRqKFiW lvITtV6lsyOw69kLQtUKWhacqLrR7sm4kO2Fx55hZVZ1jZ9Tl6DspBoiYYomh+3gobR7 tK1GZvd2hz/Rv95f8cxPDayZajWplDTZ2OojjygozlojzxwDgeqEKIGgoVs6wGxgbCYe ADKHoplJel62AyCXuQeG8ZadW+gg3s67Ym/6mwDBK40RqVd58UuyS7ikuuE1MGGS4dM3 j5Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010204; x=1689602204; 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=b7DeMqONapwDBFWxqll13s5Z4bgKhDNtxF1406ybhog=; b=lODSRSN3kBc/eiU+YhL5UWVOKWkZOIVbhCizl4Be/octTdTND0l706vhyK5DUpCCoB Y1nlnmU4xYndye0RtgT4dFl0f1mR090Rj6G1mzxz1lgZlSyULrzNuuo2B9SR/UsYy4zz syTRIG45ucP3ZAVeV3iOzGuO16Xba+kMto8kaWWR9LDFc0Yw6xUnyGlman8w80dnASrU IS/fHj2ctwDLy6ON4Hedkar0XqDUcUvrZnm/ULJDjKv6U1gRtjE06QLkIz1gjiDT+tG8 CYIN/qKCnFgoWkSC6xvMaLHwE4m6gjgW2cByhbG2F3RYXImZwJATJ5fvHUMbSRrXnhIS c8XQ== X-Gm-Message-State: AC+VfDwLR3kXu65Ll8Ndjqy9+dlN3u40Vxb2ZvQHjsKzDwA+ZVGiBH8t P9G/AIkZjmAGNcpubxCE4dfILVL7a2k= X-Received: by 2002:a17:906:7a5e:b0:987:6960:36c6 with SMTP id i30-20020a1709067a5e00b00987696036c6mr1319738ejo.5.1687010203765; Sat, 17 Jun 2023 06:56:43 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id n24-20020a170906165800b00977c7566ccbsm11970397ejd.164.2023.06.17.06.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:56:43 -0700 (PDT) Date: Sat, 17 Jun 2023 15:56:41 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/9] staging: rtl8192e: Remove variable stats->freq as it is constant Message-ID: <4d8801d37889e6af4f43dff10d1426fc7918f562.1687007788.git.philipp.g.hortmann@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?1768959822672376375?= X-GMAIL-MSGID: =?utf-8?q?1768959822672376375?= stats->freq is initialized with 1 and then unchanged. All evaluations will result accordingly. Remove resulting dead code and unused defines. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtllib.h | 5 ----- drivers/staging/rtl8192e/rtllib_rx.c | 19 +++++-------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 17b70dde7eeb..20c0308eb3c1 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1769,7 +1769,6 @@ static void _rtl92e_rx_normal(struct net_device *dev) .signal = 0, .noise = (u8)-98, .rate = 0, - .freq = RTLLIB_24GHZ_BAND, }; unsigned int count = priv->rxringcount; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 87e9169214f6..b4fad9bf0f03 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -500,9 +500,6 @@ enum _REG_PREAMBLE_MODE { #define RTLLIB_CCK_MODULATION (1<<0) #define RTLLIB_OFDM_MODULATION (1<<1) -#define RTLLIB_24GHZ_BAND (1<<0) -#define RTLLIB_52GHZ_BAND (1<<1) - #define RTLLIB_CCK_RATE_LEN 4 #define RTLLIB_CCK_RATE_1MB 0x02 #define RTLLIB_CCK_RATE_2MB 0x04 @@ -549,10 +546,8 @@ struct rtllib_rx_stats { u8 signal; u8 noise; u16 rate; /* in 100 kbps */ - u8 received_channel; u8 control; u8 mask; - u8 freq; u16 len; u64 tsf; u32 beacon_time; diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 46c77ed335ab..36dace010203 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -2301,12 +2301,7 @@ static inline int rtllib_network_init( network->CountryIeLen = 0; memset(network->CountryIeBuf, 0, MAX_IE_LEN); HTInitializeBssDesc(&network->bssht); - if (stats->freq == RTLLIB_52GHZ_BAND) { - /* for A band (No DS info) */ - network->channel = stats->received_channel; - } else { - network->flags |= NETWORK_HAS_CCK; - } + network->flags |= NETWORK_HAS_CCK; network->wpa_ie_len = 0; network->rsn_ie_len = 0; @@ -2321,14 +2316,10 @@ static inline int rtllib_network_init( network->mode = 0; - if (stats->freq == RTLLIB_52GHZ_BAND) { - network->mode = IEEE_A; - } else { - if (network->flags & NETWORK_HAS_OFDM) - network->mode |= IEEE_G; - if (network->flags & NETWORK_HAS_CCK) - network->mode |= IEEE_B; - } + if (network->flags & NETWORK_HAS_OFDM) + network->mode |= IEEE_G; + if (network->flags & NETWORK_HAS_CCK) + network->mode |= IEEE_B; if (network->mode == 0) { netdev_dbg(ieee->dev, "Filtered out '%s (%pM)' network.\n", From patchwork Sat Jun 17 13:56:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109499 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1998288vqr; Sat, 17 Jun 2023 07:10:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5wyIFyF71f/PjDZ9xEfWq3EEdicBLdveuL8vLpuZYOJhB6uEwmXWI9a2QeEafXIYR5f5vt X-Received: by 2002:a05:6a20:9385:b0:11f:92d2:1442 with SMTP id x5-20020a056a20938500b0011f92d21442mr2583836pzh.29.1687011017774; Sat, 17 Jun 2023 07:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687011017; cv=none; d=google.com; s=arc-20160816; b=fljdjqp2CdEX6TcF+w5olXJsSzqgUm74ljdLuIOZ379btXd+PMBRuIZh2g26Vb4P79 RMq4vvNJ0o2ND6QidBJfbo8KtKLg54kd7EEgzxTHhvMLSYFnCypQmVsL7rOr0KlFtwov HjrOgn3WwRUzRI+krFua6jLCqb4PGHakseaLjIdgReKdtyV3x6N74oI/2X0Rd8cP1zjx 40FEae/n2NO0ufFGfjdS/ux1S6yVBoHONjNBO3IJ05kKakNdGhgNnqmnNE4WOMjpSMpM 9sBGuXZxkNiCqm6Bn5hMy2jyg4X0zRNS5EoVadk5xQX7qE6aVtYEl93w045b7R18wp8R GDgg== 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=MyvbzIni4wgZcmkEUFqYkqtBiqFXP5/UM0SCkXhdxz4=; b=wlYxYsNv6qj37mAqMvafYGp98GdjJ1R36xMYMIpFCBmJtCrfuQo47hf/YZBiHaaES0 qfz5zmNrZeg1YZlOL1bbsll0b02q5w6KYXyNWOv/z7bepThNx167uCvxE2O3xN4A90zQ byUbUBW49tRUss+OHSQYvt8Soie5r6vGi4LWuVlos2yaUpOcGbBhucEgTvk0zlV76ge3 xgRR15SPDijtqwzscR0c4q2RaJ3hGvt5RgV6kZ1nGrcDNFRd6zbxgd4oT9lniKbEwvKI yI/0URKYrZHLKwfjs0NAx8dx62cJd4HIPdta96K2Ey5OGwb12Dy/VDrRjW9dDeZ9P2i3 RpCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=S4ZD5v1s; 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 j10-20020a63b60a000000b00543eef37092si16478053pgf.442.2023.06.17.07.09.59; Sat, 17 Jun 2023 07:10:17 -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=S4ZD5v1s; 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 S235911AbjFQN5D (ORCPT + 99 others); Sat, 17 Jun 2023 09:57:03 -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 S235347AbjFQN46 (ORCPT ); Sat, 17 Jun 2023 09:56:58 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7977212C for ; Sat, 17 Jun 2023 06:56:53 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-98502b12fd4so46544166b.1 for ; Sat, 17 Jun 2023 06:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010212; x=1689602212; 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=MyvbzIni4wgZcmkEUFqYkqtBiqFXP5/UM0SCkXhdxz4=; b=S4ZD5v1sudtTnq74OafYco/0ZajVLhBI0w7gMovgBWVI8v67SC+HvybiUrx9Rlpofk Oa3aVFdFlI0MurUEp2+gw0NgVJASVn4qu57mrdsWOfxTHs64Zx14UVzXcESRG3Cwt1xj YELJXg6cM+ChmvlYehcJqBe2F4bV5JeDZMYJ6YKlzoqmFwRA4i1oNQB6fjj5rZocPfl/ O3c3679Hc1f6oSvpJnOD6PGgq0w3Y2s2YO7v3myIUjC7Bq7ScnRvCi4CrHIPFgm0rcgV vtWiBtkbduqW3lMdshDrn/ww8A/YK8U/i3/z7X1V1jsLa1hoCsI0v5FUNs5UmS4Bwim3 QtvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010212; x=1689602212; 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=MyvbzIni4wgZcmkEUFqYkqtBiqFXP5/UM0SCkXhdxz4=; b=dQyDq1NUWYHyrykA2oNRShn6SSkciOPATUX4Z2RYhqKd1iZ5mhqXVswCFZzjReHNUc wnfAX8FK51sNN8oCimDk/ADr5ratBXKr0pIU+fLTyIYi++xtGAjTtrx9Gkd19zpOnpYB pQH9YHcChLcoBnHLcOrNGpN76CzxwkduCsk29IgwsyUT3CiRTNhHDIQd68PmZrxlsTuh gmlsRxIxHFcAysfQzXQW02aeDbMMFo3+pF+YzDEcB4/h+X1k3VDNcAMRN7B5mC4BbhNv dHSWB9t6qPdAT8mYytLiFZEhGmY3NcstDlWnd9a4JhaBaDr2ISN1soP1Q80UWF6Oopn6 kV/Q== X-Gm-Message-State: AC+VfDx3w7GhAlBGLue3uO3HDKCxodxhHITdLoPw9j9R5rTm4lFq2Dvy 93IaNiyr+CMsHeOrQ2h9CLzbFnci2p8= X-Received: by 2002:a17:906:7293:b0:975:c046:dd34 with SMTP id b19-20020a170906729300b00975c046dd34mr4017909ejl.1.1687010211924; Sat, 17 Jun 2023 06:56:51 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id m8-20020a17090607c800b00982bb85e8e4sm3147197ejc.18.2023.06.17.06.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:56:51 -0700 (PDT) Date: Sat, 17 Jun 2023 15:56:49 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/9] staging: rtl8192e: Remove unsupported modes IEEE_N_5G and IEEE_A Message-ID: <40c5b21654376348144280dbe45203140c6e6807.1687007788.git.philipp.g.hortmann@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?1768959265333544828?= X-GMAIL-MSGID: =?utf-8?q?1768959265333544828?= Remove unsupported modes IEEE_N_5G and IEEE_A as those are not supported by hardware and are not offered by user software. Remove resulting dead code and unused defines. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 4 ---- drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 -- drivers/staging/rtl8192e/rtllib.h | 8 ++------ drivers/staging/rtl8192e/rtllib_rx.c | 4 +--- drivers/staging/rtl8192e/rtllib_softmac.c | 6 ++---- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +- 6 files changed, 6 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index f030e06f16f6..10dc1c4e9913 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1816,9 +1816,6 @@ void rtl92e_update_ratr_table(struct net_device *dev) rtl92e_config_rate(dev, &rate_config); ratr_value = rate_config | *pMcsRate << 12; switch (ieee->mode) { - case IEEE_A: - ratr_value &= 0x00000FF0; - break; case IEEE_B: ratr_value &= 0x0000000F; break; @@ -1827,7 +1824,6 @@ void rtl92e_update_ratr_table(struct net_device *dev) ratr_value &= 0x00000FF7; break; case IEEE_N_24G: - case IEEE_N_5G: if (ieee->ht_info->peer_mimo_ps == 0) ratr_value &= 0x0007F007; else diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index fe30a291e64c..9cbe229a601f 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -424,14 +424,12 @@ static u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 *pOperateMCS) } switch (ieee->mode) { - case IEEE_A: case IEEE_B: case IEEE_G: for (i = 0; i <= 15; i++) pOperateMCS[i] = 0; break; case IEEE_N_24G: - case IEEE_N_5G: pOperateMCS[0] &= RATE_ADPT_1SS_MASK; pOperateMCS[1] &= RATE_ADPT_2SS_MASK; pOperateMCS[3] &= RATE_ADPT_MCS32_MASK; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index b4fad9bf0f03..c789f7a9d3c6 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -309,9 +309,7 @@ enum rt_op_mode { }; #define aSifsTime \ - (((priv->rtllib->current_network.mode == IEEE_A) \ - || (priv->rtllib->current_network.mode == IEEE_N_24G) \ - || (priv->rtllib->current_network.mode == IEEE_N_5G)) ? 16 : 10) + ((priv->rtllib->current_network.mode == IEEE_N_24G) ? 16 : 10) #define MGMT_QUEUE_NUM 5 @@ -1724,12 +1722,10 @@ struct rtllib_device { u8 priv[]; }; -#define IEEE_A (1<<0) #define IEEE_B (1<<1) #define IEEE_G (1<<2) #define IEEE_N_24G (1<<4) -#define IEEE_N_5G (1<<5) -#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G) +#define IEEE_MODE_MASK (IEEE_B | IEEE_G) /* Generate a 802.11 header */ diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 36dace010203..cb13964b5181 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -2329,9 +2329,7 @@ static inline int rtllib_network_init( } if (network->bssht.bd_support_ht) { - if (network->mode == IEEE_A) - network->mode = IEEE_N_5G; - else if (network->mode & (IEEE_G | IEEE_B)) + if (network->mode & (IEEE_G | IEEE_B)) network->mode = IEEE_N_24G; } if (rtllib_is_empty_essid(network->ssid, network->ssid_len)) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 821ca86b8bcd..438bf0d48b75 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -181,9 +181,7 @@ static u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee) rate = ieee->basic_rate & 0x7f; if (rate == 0) { - if (ieee->mode == IEEE_A || - ieee->mode == IEEE_N_5G || - (ieee->mode == IEEE_N_24G && !ht_info->bCurSuppCCK)) + if (ieee->mode == IEEE_N_24G && !ht_info->bCurSuppCCK) rate = 0x0c; else rate = 0x02; @@ -2577,7 +2575,7 @@ static void rtllib_start_ibss_wq(void *data) } netdev_info(ieee->dev, "%s(): ieee->mode = %d\n", __func__, ieee->mode); - if ((ieee->mode == IEEE_N_24G) || (ieee->mode == IEEE_N_5G)) + if (ieee->mode == IEEE_N_24G) HTUseDefaultSetting(ieee); else ieee->ht_info->bCurrentHTSupport = false; diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index d6d90e6ba2d3..6013ae7c6abf 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -489,7 +489,7 @@ int rtllib_wx_get_name(struct rtllib_device *ieee, struct iw_request_info *info, { const char *b = ieee->modulation & RTLLIB_CCK_MODULATION ? "b" : ""; const char *g = ieee->modulation & RTLLIB_OFDM_MODULATION ? "g" : ""; - const char *n = ieee->mode & (IEEE_N_24G | IEEE_N_5G) ? "n" : ""; + const char *n = ieee->mode & (IEEE_N_24G) ? "n" : ""; scnprintf(wrqu->name, sizeof(wrqu->name), "802.11%s%s%s", b, g, n); return 0; From patchwork Sat Jun 17 13:56:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109500 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1999843vqr; Sat, 17 Jun 2023 07:13:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5mrbb2VimNtaeIu81+jhE/75HJRMdgl/CJCk47HKKLam8fKq/BOAWMohOdxWxSwBDSVJLu X-Received: by 2002:a05:6a21:32a2:b0:110:b7fb:2c92 with SMTP id yt34-20020a056a2132a200b00110b7fb2c92mr5671150pzb.11.1687011180118; Sat, 17 Jun 2023 07:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687011180; cv=none; d=google.com; s=arc-20160816; b=nc7ZcCnpLgICfO63oHIdC/JaHi3wfdmVFGz3vrgX7ZX0X1JUIAxq9125yjBYZPe9xJ H7LB+UvwUxoDvkDkebgYVkyNHKaTFEAw1JWNb1bYZt66KFMrTenxrtO99dP4pHWVqcvT GHEB9HFipAFVLh95LQNNARkLy5i3MyLu8SIBg29PQuQy8vDQG/lATRcQqUuNEflEf6Ll yQHn43l1svdlFq7lPnubQl2czoJkbyZ7+/RpXxXVEhElgOVcd39R1nKCWox3wMssTXu/ W9uMUcMMnFNvVyNR/6kN34v0jdvr0kuhK1edNZRGSM0PV9YSzgqDbLxcju7HASijYeGs T4Uw== 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=YIlanWnqKthGj/Tq5D/eIod3q5DkOlUrV2jqF75OdBk=; b=SeoOX7nfrYrxlpBreh/VbBJj+A8niJlU52ge8zudI66zJ3Q8mSOdeL9jY6AjjgLLiA 6RI8KKLXV5GqxYm/bIOTvodWzjMxphmaX55aMtGLkALzQqzwR30GJGy2b4DWVFeZaWa6 iS7BvRFiBpc/S5lVYCDakrqzRLeSkTSuBjft+tRSP5f8xeope/6WMf+t6DPgyFau5Ntf 8aQUhpgWuF5O3sIc4YL4r9JOpKl/7Fcy2pXCKdTi+1qokVWrrnLxndC0GD0AC51xWe4F PxfAzW84eWPOW7Y/WJcw+ibIHJPX+/hR5o862DigdwcNksJ9i4q0dzQIXRpj7/rdAkbN P2qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jJZaPbUo; 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 20-20020a631854000000b00524ecf898a2si17121398pgy.359.2023.06.17.07.12.30; Sat, 17 Jun 2023 07:13:00 -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=jJZaPbUo; 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 S234024AbjFQN5P (ORCPT + 99 others); Sat, 17 Jun 2023 09:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234835AbjFQN5K (ORCPT ); Sat, 17 Jun 2023 09:57:10 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A0652103 for ; Sat, 17 Jun 2023 06:57:00 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-94ea38c90ccso54621266b.1 for ; Sat, 17 Jun 2023 06:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010218; x=1689602218; 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=YIlanWnqKthGj/Tq5D/eIod3q5DkOlUrV2jqF75OdBk=; b=jJZaPbUoiGXV83CRgbnKIucoNZJrVfNyNpUClduiO8BZ8K51O6/2w40HfljpyH+rW4 uFuTj8jG3+UUOneluXtntbiorgV2GYSzSP1MDHoDeZlf+7j3/s/qcsRFdt7BiwHjLPKf Y9AnbzIACVm1ql93hUwKTuwPSx4a3EZZnKZ/BONz3IK0f0jAXKAFVXt7ac646xqKmFY0 Xks3KRIEvTg6qBTF20IxeMMwTJjQLuWXelExmBXpfhGFc5GobQZE7uwBEwRP6jZqb+p9 Ki35sZFK889sBEPoQrNC+oCJ6mAMJ3HtfpaOw68eeggtVNVaAMje+NKYfqjkRdsHiKim FoHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010218; x=1689602218; 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=YIlanWnqKthGj/Tq5D/eIod3q5DkOlUrV2jqF75OdBk=; b=f6zgu4l8PcuTTP+4qhv/CARmRtpoiQgjg9hl8PxZnHuPOCG8v8fFtYU3REto/Cb4li dS4MeOs7PXCLaw/QqTYKJi8cR7m0xugbICjF4yNwTVHOEsOsPKtlOGUa+UFLORo7L3/F berW7O2sepRh7PnnkpI1PX43vyiBz87zsivDqx0EoPG157oWkRhBCl4kbWzC8FJ4EEEn 0CbAOysrDCm3M1SEAvtlhQI5UI1yYVJ+HOV9jIeFDqExua/KIZJ6aAWxXG4wtKQZcCMS u9nfWgvjSjXc5ffdTMo9yZ2NZJq2rQ+sxoi6X5VN5AHYnTIFvAQBDZvmfjObQiVm//fb ZDvw== X-Gm-Message-State: AC+VfDxBdJppiKWt7eJKii2QwckYzae6rs5UbbFBMetkZKy2ikYQdPUE LxQoKwlWYB39vwHr+j6XiDE= X-Received: by 2002:a17:906:244:b0:974:ae1d:ad0b with SMTP id 4-20020a170906024400b00974ae1dad0bmr3485505ejl.3.1687010218591; Sat, 17 Jun 2023 06:56:58 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id q26-20020a1709060e5a00b009863d4b555esm2155361eji.82.2023.06.17.06.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:56:58 -0700 (PDT) Date: Sat, 17 Jun 2023 15:56:56 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 3/9] staging: rtl8192e: Rename constant IEEE_x to WIRELESS_MODE_x Message-ID: <37d81ab3cbb0231868d75b11eaa2f65a0e6a9379.1687007788.git.philipp.g.hortmann@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?1768959435301368361?= X-GMAIL-MSGID: =?utf-8?q?1768959435301368361?= Rename constant IEEE_B to WIRELESS_MODE_B, IEEE_G -> WIRELESS_MODE_G and IEEE_N_24G -> WIRELESS_MODE_N_24G to align with rtlwifi driver as requested in TODO. Signed-off-by: Philipp Hortmann --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 10 +++---- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 6 ++-- drivers/staging/rtl8192e/rtllib.h | 7 ++--- drivers/staging/rtl8192e/rtllib_rx.c | 12 ++++---- drivers/staging/rtl8192e/rtllib_softmac.c | 28 +++++++++---------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 2 +- drivers/staging/rtl8192e/rtllib_wx.c | 2 +- 10 files changed, 34 insertions(+), 39 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 10dc1c4e9913..c20dfc81d549 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -162,7 +162,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val) &priv->rtllib->current_network.qos_data.parameters; u1bAIFS = qop->aifs[pAcParam] * - ((mode & (IEEE_G | IEEE_N_24G)) ? 9 : 20) + aSifsTime; + ((mode & (WIRELESS_MODE_G | WIRELESS_MODE_N_24G)) ? 9 : 20) + aSifsTime; rtl92e_dm_init_edca_turbo(dev); @@ -1816,14 +1816,14 @@ void rtl92e_update_ratr_table(struct net_device *dev) rtl92e_config_rate(dev, &rate_config); ratr_value = rate_config | *pMcsRate << 12; switch (ieee->mode) { - case IEEE_B: + case WIRELESS_MODE_B: ratr_value &= 0x0000000F; break; - case IEEE_G: - case IEEE_G | IEEE_B: + case WIRELESS_MODE_G: + case WIRELESS_MODE_G | WIRELESS_MODE_B: ratr_value &= 0x00000FF7; break; - case IEEE_N_24G: + case WIRELESS_MODE_N_24G: if (ieee->ht_info->peer_mimo_ps == 0) ratr_value &= 0x0007F007; else diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 20c0308eb3c1..777ee2509e7d 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -277,7 +277,7 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap) } } - if (net->mode & (IEEE_G | IEEE_N_24G)) { + if (net->mode & (WIRELESS_MODE_G | WIRELESS_MODE_N_24G)) { u8 slot_time_val; u8 cur_slot_time = priv->slot_time; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 219ff7685c15..70b7d7825c6d 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -2104,7 +2104,7 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev) return; } if ((priv->rtllib->ht_info->IOTPeer == HT_IOT_PEER_ATHEROS) && - (priv->rtllib->mode == IEEE_G)) { + (priv->rtllib->mode == WIRELESS_MODE_G)) { txhipower_threshold = TX_POWER_ATHEROAP_THRESH_HIGH; txlowpower_threshold = TX_POWER_ATHEROAP_THRESH_LOW; } else { diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 9cbe229a601f..7ee3cb846ca1 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -424,12 +424,12 @@ static u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 *pOperateMCS) } switch (ieee->mode) { - case IEEE_B: - case IEEE_G: + case WIRELESS_MODE_B: + case WIRELESS_MODE_G: for (i = 0; i <= 15; i++) pOperateMCS[i] = 0; break; - case IEEE_N_24G: + case WIRELESS_MODE_N_24G: pOperateMCS[0] &= RATE_ADPT_1SS_MASK; pOperateMCS[1] &= RATE_ADPT_2SS_MASK; pOperateMCS[3] &= RATE_ADPT_MCS32_MASK; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index c789f7a9d3c6..99a6501f615a 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -309,7 +309,7 @@ enum rt_op_mode { }; #define aSifsTime \ - ((priv->rtllib->current_network.mode == IEEE_N_24G) ? 16 : 10) + ((priv->rtllib->current_network.mode == WIRELESS_MODE_N_24G) ? 16 : 10) #define MGMT_QUEUE_NUM 5 @@ -1722,10 +1722,7 @@ struct rtllib_device { u8 priv[]; }; -#define IEEE_B (1<<1) -#define IEEE_G (1<<2) -#define IEEE_N_24G (1<<4) -#define IEEE_MODE_MASK (IEEE_B | IEEE_G) +#define IEEE_MODE_MASK (WIRELESS_MODE_B | WIRELESS_MODE_G) /* Generate a 802.11 header */ diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index cb13964b5181..08782336d390 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -2317,9 +2317,9 @@ static inline int rtllib_network_init( network->mode = 0; if (network->flags & NETWORK_HAS_OFDM) - network->mode |= IEEE_G; + network->mode |= WIRELESS_MODE_G; if (network->flags & NETWORK_HAS_CCK) - network->mode |= IEEE_B; + network->mode |= WIRELESS_MODE_B; if (network->mode == 0) { netdev_dbg(ieee->dev, "Filtered out '%s (%pM)' network.\n", @@ -2329,8 +2329,8 @@ static inline int rtllib_network_init( } if (network->bssht.bd_support_ht) { - if (network->mode & (IEEE_G | IEEE_B)) - network->mode = IEEE_N_24G; + if (network->mode & (WIRELESS_MODE_G | WIRELESS_MODE_B)) + network->mode = WIRELESS_MODE_N_24G; } if (rtllib_is_empty_essid(network->ssid, network->ssid_len)) network->flags |= NETWORK_EMPTY_ESSID; @@ -2576,8 +2576,8 @@ static inline void rtllib_process_probe_response( if (is_same_network(&ieee->current_network, network, (network->ssid_len ? 1 : 0))) { update_network(ieee, &ieee->current_network, network); - if ((ieee->current_network.mode == IEEE_N_24G || - ieee->current_network.mode == IEEE_G) && + if ((ieee->current_network.mode == WIRELESS_MODE_N_24G || + ieee->current_network.mode == WIRELESS_MODE_G) && ieee->current_network.berp_info_valid) { if (ieee->current_network.erp_value & ERP_UseProtection) ieee->current_network.buseprotection = true; diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 438bf0d48b75..5609d1dbcf6a 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -181,7 +181,7 @@ static u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee) rate = ieee->basic_rate & 0x7f; if (rate == 0) { - if (ieee->mode == IEEE_N_24G && !ht_info->bCurSuppCCK) + if (ieee->mode == WIRELESS_MODE_N_24G && !ht_info->bCurSuppCCK) rate = 0x0c; else rate = 0x02; @@ -802,8 +802,8 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_device *ieee, else atim_len = 0; - if ((ieee->current_network.mode == IEEE_G) || - (ieee->current_network.mode == IEEE_N_24G && + if ((ieee->current_network.mode == WIRELESS_MODE_G) || + (ieee->current_network.mode == WIRELESS_MODE_N_24G && ieee->ht_info->bCurSuppCCK)) { erp_len = 3; erpinfo_content = 0; @@ -1470,7 +1470,7 @@ static void rtllib_associate_complete_wq(void *data) netdev_info(ieee->dev, "Using G rates:%d\n", ieee->rate); } else { ieee->rate = 22; - ieee->SetWirelessMode(ieee->dev, IEEE_B); + ieee->SetWirelessMode(ieee->dev, WIRELESS_MODE_B); netdev_info(ieee->dev, "Using B rates:%d\n", ieee->rate); } if (ieee->ht_info->bCurrentHTSupport && ieee->ht_info->enable_ht) { @@ -1654,14 +1654,12 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, (ieee->modulation & RTLLIB_OFDM_MODULATION)) { ieee->rate = 108; - ieee->SetWirelessMode(ieee->dev, - IEEE_G); + ieee->SetWirelessMode(ieee->dev, WIRELESS_MODE_G); netdev_info(ieee->dev, "Using G rates\n"); } else { ieee->rate = 22; - ieee->SetWirelessMode(ieee->dev, - IEEE_B); + ieee->SetWirelessMode(ieee->dev, WIRELESS_MODE_B); netdev_info(ieee->dev, "Using B rates\n"); } @@ -1826,8 +1824,8 @@ static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb, status_code = le16_to_cpu(response_head->status); if ((status_code == WLAN_STATUS_ASSOC_DENIED_RATES || status_code == WLAN_STATUS_CAPS_UNSUPPORTED) && - ((ieee->mode == IEEE_G) && - (ieee->current_network.mode == IEEE_N_24G) && + ((ieee->mode == WIRELESS_MODE_G) && + (ieee->current_network.mode == WIRELESS_MODE_N_24G) && (ieee->AsocRetryCount++ < (RT_ASOC_RETRY_LIMIT - 1)))) { ieee->ht_info->iot_action |= HT_IOT_ACT_PURE_N_MODE; } else { @@ -2239,10 +2237,10 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb) ieee->current_network.mode); } else { /*TODO*/ - ieee->SetWirelessMode(ieee->dev, IEEE_G); + ieee->SetWirelessMode(ieee->dev, WIRELESS_MODE_G); } - if ((ieee->current_network.mode == IEEE_N_24G) && + if ((ieee->current_network.mode == WIRELESS_MODE_N_24G) && bHalfSupportNmode) { netdev_info(ieee->dev, "======>enter half N mode\n"); ieee->bHalfWirelessN24GMode = true; @@ -2498,7 +2496,7 @@ static void rtllib_start_ibss_wq(void *data) } ieee->state = RTLLIB_NOLINK; - ieee->mode = IEEE_G; + ieee->mode = WIRELESS_MODE_G; /* check if we have this cell in our network list */ rtllib_softmac_check_all_nets(ieee); @@ -2568,14 +2566,14 @@ static void rtllib_start_ibss_wq(void *data) } ieee->current_network.qos_data.supported = 0; - ieee->SetWirelessMode(ieee->dev, IEEE_G); + ieee->SetWirelessMode(ieee->dev, WIRELESS_MODE_G); ieee->current_network.mode = ieee->mode; ieee->current_network.atim_window = 0; ieee->current_network.capability = WLAN_CAPABILITY_IBSS; } netdev_info(ieee->dev, "%s(): ieee->mode = %d\n", __func__, ieee->mode); - if (ieee->mode == IEEE_N_24G) + if (ieee->mode == WIRELESS_MODE_N_24G) HTUseDefaultSetting(ieee); else ieee->ht_info->bCurrentHTSupport = false; diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index 6013ae7c6abf..8f2f0dca88e7 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -489,7 +489,7 @@ int rtllib_wx_get_name(struct rtllib_device *ieee, struct iw_request_info *info, { const char *b = ieee->modulation & RTLLIB_CCK_MODULATION ? "b" : ""; const char *g = ieee->modulation & RTLLIB_OFDM_MODULATION ? "g" : ""; - const char *n = ieee->mode & (IEEE_N_24G) ? "n" : ""; + const char *n = ieee->mode & (WIRELESS_MODE_N_24G) ? "n" : ""; scnprintf(wrqu->name, sizeof(wrqu->name), "802.11%s%s%s", b, g, n); return 0; diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c index c3f1910d9f58..ec038ef806c3 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -406,7 +406,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, if (is_broadcast_ether_addr(skb->data + 16)) return; - if (ieee->mode < IEEE_N_24G) { + if (ieee->mode < WIRELESS_MODE_N_24G) { if (skb->len > ieee->rts) { tcb_desc->bRTSEnable = true; tcb_desc->rts_rate = MGN_24M; diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index 82b537da8b21..184eba571741 100644 --- a/drivers/staging/rtl8192e/rtllib_wx.c +++ b/drivers/staging/rtl8192e/rtllib_wx.c @@ -118,7 +118,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, max_rate = rate; } - if (network->mode >= IEEE_N_24G) { + if (network->mode >= WIRELESS_MODE_N_24G) { struct ht_capab_ele *ht_cap = NULL; bool is40M = false, isShortGI = false; u8 max_mcs = 0; From patchwork Sat Jun 17 13:57:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109498 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1990139vqr; Sat, 17 Jun 2023 06:58:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7f0ZCDRUgmnmWhJRe0/JOU9TQk7ZANB8BmvtSoXlEzARt9YYZUt436CDQJJjId9vwjyDLP X-Received: by 2002:a05:6e02:14a:b0:342:2f49:77eb with SMTP id j10-20020a056e02014a00b003422f4977ebmr1567199ilr.32.1687010328040; Sat, 17 Jun 2023 06:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687010328; cv=none; d=google.com; s=arc-20160816; b=QV//Rl75xqkOkCxLre55j8J4K7VSZt4TLMln3w/DCJ9ZrEVJ5YMHoeIsGMBPtNh+PL yCjoXU12BwH4LPK+JNi+vsUdOdJC3tQh/VLbTPWHfy9WW44XvbspOmE+hmn2+GcvhGBl qIiFLhXiihVxSQvaXQh9Hgsrqz9qIzLQA/ZHKnTbXA+evem90E/C31ctO9pkLmA3GsS6 +H2A8wiRy1aIIakzDf7vrRreDyozy8XgL2K9iP2H7uDGI0EcBtlPAWwf8GwG1Xtip+Uf PdWITEOaInQG2YUlhUvfWSDlW6udN/EL67PqOJ2yTbtFFdHgFxC9N4Co7pOMsVkk+ICA MfjA== 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=yIMmJZNKdVJKf5s/fQBJd8OR0Xg5vYUmJ8kETjtUHz4=; b=TyP6mebpPGM1UJdAf14E2wKi1Zj0xHHuqXM4Q7kSp4ivFIBPnjAD/c8JDdNGxySJOJ cP5YjVyKiOiZ8uWTnAMu89NkPEKB8uMK3j4ipr3GdY387f9/CBy2uoVKhBWDntBF9DTW oiddnx+aMgS63r49chjCcVJaJE7+6wOnn6wSsH4YnRmBNi+SacxNrR7dL3ln/vlDi2XK ejjRGw8/x4DAhOqDNA1lLzKPFYQ/Efzz6uYaY/1V5KMgr1fO9uaDYI1TkmqF0VuVQcLQ wnPy5WTY4ORLyvXe4Mvn4WJx8dbdMCQv6mj7bAEEyRGOPbXfoQOLsp0k7fSQf5IciNIk wY9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=cox+Vqu8; 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 81-20020a630154000000b0053fb74c928csi16476838pgb.534.2023.06.17.06.58.35; Sat, 17 Jun 2023 06:58:48 -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=cox+Vqu8; 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 S236067AbjFQN5V (ORCPT + 99 others); Sat, 17 Jun 2023 09:57:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234835AbjFQN5S (ORCPT ); Sat, 17 Jun 2023 09:57:18 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FBE12733 for ; Sat, 17 Jun 2023 06:57:07 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-97ea801b0d0so44269266b.1 for ; Sat, 17 Jun 2023 06:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010225; x=1689602225; 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=yIMmJZNKdVJKf5s/fQBJd8OR0Xg5vYUmJ8kETjtUHz4=; b=cox+Vqu8nJZ5nWmzdZdQEcb36U8lsTv/JEyisY0eRjSPBywqVIw8ULjuq1/zUFjizj ezIg6K+uSmumSfuSHhon+O9bdGIggoswOhqdNqRajDP7Rlo3FjTYpTlQJ4KMLlZpoqjv Soi2wmHhC25RIqu0EA7VijJ5xFbLzVs+/BFA2ivdiQ3Oh7lUptCLj1o3gB+vx7cYVyNf c23m5R4v25a19iKFnCnoUGoyzeQzCzF4s332oQTPj3usEh9fzpkt+xThCNyt8JkumGSa PaZ5OIToXt0T6li1uVRhuCzMKhxgwp7o1JYxNIx0UHESeMny65RniVg/EJTjO16y6yfQ tAHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010225; x=1689602225; 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=yIMmJZNKdVJKf5s/fQBJd8OR0Xg5vYUmJ8kETjtUHz4=; b=SX2b2W4y9OCPakVxcp7O/C3Uuq+DGas2urKW5yTF2sUg367lFRSb0CEpd3xgWKh0M4 kJTvlY0ehSf2NWKvpNg5Xrwavz31DGzFY+sdyMsyFZv7RiUmRfT7bH2nzPuM8qHhYiPg Uqx/8sFrlj+xLzv0KHCDOB41oj90RSzDBFTFqZxHHVWjMzEsvvAaL4uCU6IhH4vJPBXw 9HZy9nMfmA/kgqPtSv1VkNFoPoXZl3ry6+kqNVtPYLq9KEe7Ak6oBIEzou+knfkAfmnl 2n180l9ZUVOdQmaJoBf1sWdmcIoqUgYCDb0ypPP2Cb5D+82utuVuBxkDYG3CTrIycpcg CE9g== X-Gm-Message-State: AC+VfDx+htMaF68HupEfZinxV5uBjEMoFKh2xvSVIPM8OXX0QqALnkIJ RRLqGz6ScKTGy1QrRGCi384= X-Received: by 2002:a17:906:6493:b0:987:6960:36c5 with SMTP id e19-20020a170906649300b00987696036c5mr1352113ejm.6.1687010225451; Sat, 17 Jun 2023 06:57:05 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id m3-20020a170906258300b00977d194bf42sm11993601ejb.161.2023.06.17.06.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:57:04 -0700 (PDT) Date: Sat, 17 Jun 2023 15:57:02 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 4/9] staging: rtl8192e: Remove unused enum led_ctl_mode Message-ID: <554729dba4d9358bdd6146ebd8fa17a0f525702e.1687007788.git.philipp.g.hortmann@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?1768958541484114050?= X-GMAIL-MSGID: =?utf-8?q?1768958541484114050?= Remove unused enum led_ctl_mode to shorten code. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtllib.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 99a6501f615a..2ebacd6720f1 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -420,17 +420,6 @@ enum init_gain_op_type { IG_Max }; -enum led_ctl_mode { - LED_CTL_POWER_ON = 1, - LED_CTL_LINK = 2, - LED_CTL_NO_LINK = 3, - LED_CTL_TX = 4, - LED_CTL_RX = 5, - LED_CTL_SITE_SURVEY = 6, - LED_CTL_POWER_OFF = 7, - LED_CTL_START_TO_LINK = 8, -}; - enum wireless_mode { WIRELESS_MODE_UNKNOWN = 0x00, WIRELESS_MODE_A = 0x01, From patchwork Sat Jun 17 13:57:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109505 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2006478vqr; Sat, 17 Jun 2023 07:25:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ68dKIK6QKZJdt7fInmTY/eKaY2erh9JG7elVrV+3j8qoaXZTlslvGnNSiiuxSuAIOsvqQd X-Received: by 2002:a17:90a:ad89:b0:25e:a9d1:8ad4 with SMTP id s9-20020a17090aad8900b0025ea9d18ad4mr6777318pjq.17.1687011941244; Sat, 17 Jun 2023 07:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687011941; cv=none; d=google.com; s=arc-20160816; b=xqb9cQBZbYG+GRwhXkqQ2DyTJyu1Xo2t/JR4DvKAa/Tku0YCOl31fQTkqcOzYXzImA FJvMIUl/Yb6nfsrj2kucQ6+t8qn+KqoNErVX1tlq2uKajs3daElovONjCP5u0OuIu9vs r76Wg8DgCsnuZJ5Dk+KYOdZOCMVH4QXe1uY13nudBRt0Fyy56K2Ljjl60fnZIm/jUqN4 mWXpaNgH1iJ5O9YyqO9StCFvaIv1Pq66ZPzpQfxy/91Pt44I1ipa5jR27mUVdBe8Bt+W FdUdoYtjaEUmK9wCAA4vZgkZs0BRQU8sd8DPvGmONjCs4J0QrKyJtGxvCZo06NtoKLmK gfBQ== 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=n97eu40lLD5raDHeMPetald7UVarkQD2e/uUhF7bu8w=; b=o7LmIkRAHMuHvyAgL/hckeciY01dh6/vCOfu2e/EdiV4FRnCOc+DTnNhWe7qnHyWyF Q26Y0zeqnF/t3u1JJOzSA3gsuoqi5Av9ScVkk4EeAfxZXe6IfsqRODahQJ7KlxtFfVKe fI6Q6rsTbmnzGNPwxnU+jxrTbd5VFV9epJE4KfaL0s9E3oJHE6ezI3f4t5VlwuVUe043 1nWbiZptC9Tqlcp+oijjpRA3igRiabaR0mVj9whWIjI6kIdmvFyORxTKmlIUUcyg08wN e4GSYzoTqKgFScM8nCcUpunTp4vjEqyrC0DtPpVUeYyFR2baGlTCxieRqFCqWucZotm3 gV4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jJhZIW2w; 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 fz12-20020a17090b024c00b0025bae7f2b10si3755248pjb.13.2023.06.17.07.25.28; Sat, 17 Jun 2023 07:25:41 -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=jJhZIW2w; 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 S236747AbjFQN5e (ORCPT + 99 others); Sat, 17 Jun 2023 09:57:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236162AbjFQN53 (ORCPT ); Sat, 17 Jun 2023 09:57:29 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71F96295E for ; Sat, 17 Jun 2023 06:57:14 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-50c079eb705so434960a12.1 for ; Sat, 17 Jun 2023 06:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010233; x=1689602233; 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=n97eu40lLD5raDHeMPetald7UVarkQD2e/uUhF7bu8w=; b=jJhZIW2w9dd6qxCPFexKLtSZrWzRWdkzy4CE5/xSqnc5hhN+bVOwF3/+Yt/jZBaRZc UgQA8N4Y0ne6z0Dj/KjiYRPA1MlSyZefDaVSnxbLsmtKRvBmJU7K5YiiE0dimWtrECOi V+T6EtOvWHNLVuYpKuz+5uRV23LCfZjor0OgYzfjoaFFCKBANEHfR81LrAWkR51YTySc XuvPJljf+hTvl5IluRvR48W6naJkHvdqzF1zF6HZHZEF7SfzEjc0/1cLaJBjiq2m31bP adRv3KSTH1eTGcpbXDHSyRNwS8/9wcaASzQrPPdKlJ+FpEv06JAuupF+gojg40OwP9r3 LCmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010233; x=1689602233; 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=n97eu40lLD5raDHeMPetald7UVarkQD2e/uUhF7bu8w=; b=XISbN/Dkei4M93jK44Y+M3DMTVbFaB1GEFHYZ/2cHgmjlvzq6vcr7QHeaGxLMs8/Tr fwORLMPL2j9ttjJJgXNjNiuHT9A/OAB+hvkP3hGSPuuXTJIrD21bDIkZCYwy0f/jOzoj +YRdOI0RbuNTVadlNhx+uZy83laIRKlz8IaBRPOnEd1T9kxnHq/030G5uIgJUJ6Uy7oU xFMp96w4OOLxMvWbYe0REtgDD0YBeCQZQZwDTAB7ZKQNhmbsXk0IKPbbJq4VO0CQYkd/ Ft/IX2kDmC6PjvXiwJLlcueMVCVpDZyFHYS7CfxUo1a/g1PHhca0m01p910euZAL9pnh Rr+A== X-Gm-Message-State: AC+VfDx0zIxJ3gleT2IT5+h3VECy4ch0sOJmrJAcg2KNQIvdToqZd9IM 3nUDNS4rTPEexP+mwNyGQ2Y= X-Received: by 2002:a05:6402:4312:b0:50b:c57f:d464 with SMTP id m18-20020a056402431200b0050bc57fd464mr4147455edc.1.1687010232769; Sat, 17 Jun 2023 06:57:12 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id p26-20020a056402075a00b00515c8024cb9sm195856edy.55.2023.06.17.06.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:57:12 -0700 (PDT) Date: Sat, 17 Jun 2023 15:57:10 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 5/9] staging: rtl8192e: Rename rtllib_state to rtl_link_state 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?1768960233160872401?= X-GMAIL-MSGID: =?utf-8?q?1768960233160872401?= Rename rtllib_state to rtl_link_state to align with rtlwifi driver and to increase readability as state is to general. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtllib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 2ebacd6720f1..1aabbe11b484 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1119,7 +1119,7 @@ struct rtllib_network { struct list_head list; }; -enum rtllib_state { +enum rtl_link_state { /* the card is not linked at all */ RTLLIB_NOLINK = 0, @@ -1489,7 +1489,7 @@ struct rtllib_device { */ struct rtllib_network current_network; - enum rtllib_state state; + enum rtl_link_state state; int short_slot; int mode; /* A, B, G */ From patchwork Sat Jun 17 13:57:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109508 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2026582vqr; Sat, 17 Jun 2023 08:06:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ54j9DWTqP84fLOyrvVDqD2Yxz4zvVejO4LqO5+Frou/lEr7naQxEIJp0IWj6W0dcT44Cjz X-Received: by 2002:a17:902:c254:b0:1b0:4205:8501 with SMTP id 20-20020a170902c25400b001b042058501mr4905953plg.6.1687014391673; Sat, 17 Jun 2023 08:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687014391; cv=none; d=google.com; s=arc-20160816; b=sE58sd3It3yR/elvm92jz5bcmpNcnd7QgVgQim02bmYYThFdBLgJIfCrPSHnEa3yRb mn3BWxrqZ14CABOGJU344vpZxF7lqj55Gx5FOv/6PfRiKcIMfri4LpEwUjSqPB69uXDd 4lt58DTLn3KE5/nUZH74qmxY7cnqu9ENX6jZxnJy8PQIPtok41hSuUe1CElJJx8kt27Y IJefO6Xr8GSW649o4ebCuBm8/T8P1eEhlHNiQnbS/2mOf/PTYHovRgGBFs3Mis3tNFOy FTmI+6jRBlTtiEeAyBRYRiIMjMvTBYy3Bc+23RgPkpjFHcdTesEYNy9E0yQloHy9jdaJ A0zQ== 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=LMVVTdgUv6AYJZSJPcdnU5gv4Mtoi08C5m1hPrGDv9o=; b=hgIEncjOBJuYYD0prj1QS8sIwMDSbRrRCqre42QPtsPmkLiN5nOa4GjwDkbCZVf+Bo xXjXD3U/DS91i++Kfvpf8HFEZMZIWK7GbKp+dOu9UFFRUd+s1TbbmeWauAtMmwkVKrNC /x5hjY3PCYcZ7aZkT8KurBjDq1JqJz/Hb8IxrD36LMbn3YcUB4jwaCbhJzI+PDv9wDQq GZk2NTHdW5AmgyPzzMyhk4WgkgsS0+COUtZIVSKASqZtjQ5EAboJwMOaXTYcXXIm+eUV RPr9phhNefj5QEAmPTN1E+V0HyArRvS9psIW075lrHOlJ35Sm1ScSm1bQIpmGtCPAJq0 ENjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pQi7cWG1; 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 o12-20020a170902d4cc00b001a6ee332903si10771039plg.347.2023.06.17.08.06.08; Sat, 17 Jun 2023 08:06:31 -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=pQi7cWG1; 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 S233712AbjFQN5p (ORCPT + 99 others); Sat, 17 Jun 2023 09:57:45 -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 S234835AbjFQN5n (ORCPT ); Sat, 17 Jun 2023 09:57:43 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 355552D50 for ; Sat, 17 Jun 2023 06:57:22 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9877dfee81dso13741166b.0 for ; Sat, 17 Jun 2023 06:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010240; x=1689602240; 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=LMVVTdgUv6AYJZSJPcdnU5gv4Mtoi08C5m1hPrGDv9o=; b=pQi7cWG16wvjHcNDOkdA1lAC5WTuDEEPOs620xYRW0TK3ezqCzMdOU6YueRyxfB9OI r7ToJCByHqSzXGeAeUgI9fGYngr5VT5rIuanzti40T0wI1KkYTyc38ub+dsVQEkobFbo NFZzH9TMXAPF+siPjxbysYbnWUDPB/eAUGQchReAAOW9dyBi/R/RDWL5kNNsbbV73G6a ijxTxckwoWqVKsFkK/wz4PBzzkfoz9gdPKEzIb8mf31r7FqIIZG8qrIzKmBdBXeL7Tn+ elY0CkYHkYzaOTNwUeRG6//I66P8ZhwP1M4A8nhG8TUh5XkTtvO+IZkRYbCGLX0KNQhL 2pNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010240; x=1689602240; 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=LMVVTdgUv6AYJZSJPcdnU5gv4Mtoi08C5m1hPrGDv9o=; b=F2hntKJAIZJvqtaLYnZauBMeWTUOWj/jElGkFxEv1cyys/Ii9nBcxpR941+khwd43E IG1ey3fkgBMeP0IBsVs/UXVE9iQRJjJvPBWZ1Q+isI+6piyVNteyjbtPncZyG4Izcmm7 sdS93pbSkuNWIyKz7sfsoN9pg2RUpFB5pSTixvUplgjr9JxJka1tCWSW1UX9IUBRAifx apd/OFD05U+nu89ffkHY6sYbLUVEQbKM0kTLmNwDL3tuJDSbL6A7/r07Bpn/hJcQyChA 9bYCztUV532vdbgIaOtjnC7cErs2mNsePxp4u7kusgMzI+eauOhjeALXePjuyO+RWcoO pTwg== X-Gm-Message-State: AC+VfDzFZE9j2oatQlSbzHOeuL0+1OQej2CcYSYigjBtziOkyuhiNYrh nZrBBgsCiE9APG2S/Qtcz4YmfSg2nMs= X-Received: by 2002:a17:906:6493:b0:987:6960:36c5 with SMTP id e19-20020a170906649300b00987696036c5mr1352403ejm.6.1687010240035; Sat, 17 Jun 2023 06:57:20 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id s2-20020a170906960200b00982834553a6sm4382175ejx.165.2023.06.17.06.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:57:19 -0700 (PDT) Date: Sat, 17 Jun 2023 15:57:17 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 6/9] staging: rtl8192e: Rename state to link_state Message-ID: <9cf4d0b01c6a84a11939099b628754d4c6d54839.1687007788.git.philipp.g.hortmann@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?1768962802830890538?= X-GMAIL-MSGID: =?utf-8?q?1768962802830890538?= Rename state to link_state to align with rtlwifi driver and to increase readability as state is to general. Signed-off-by: Philipp Hortmann --- Note: Special care must be taken because state is used in more than one struct. --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 10 +-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 36 ++++---- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 16 ++-- .../staging/rtl8192e/rtl8192e/rtl_ethtool.c | 4 +- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 4 +- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 12 +-- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 14 ++-- drivers/staging/rtl8192e/rtllib_softmac.c | 82 +++++++++---------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 16 ++-- drivers/staging/rtl8192e/rtllib_wx.c | 2 +- 11 files changed, 99 insertions(+), 99 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index c20dfc81d549..b6c086047841 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -52,15 +52,15 @@ static void _rtl92e_update_msr(struct net_device *dev) switch (priv->rtllib->iw_mode) { case IW_MODE_INFRA: - if (priv->rtllib->state == RTLLIB_LINKED) + if (priv->rtllib->link_state == RTLLIB_LINKED) msr |= MSR_LINK_MANAGED; break; case IW_MODE_ADHOC: - if (priv->rtllib->state == RTLLIB_LINKED) + if (priv->rtllib->link_state == RTLLIB_LINKED) msr |= MSR_LINK_ADHOC; break; case IW_MODE_MASTER: - if (priv->rtllib->state == RTLLIB_LINKED) + if (priv->rtllib->link_state == RTLLIB_LINKED) msr |= MSR_LINK_MASTER; break; default: @@ -745,7 +745,7 @@ void rtl92e_link_change(struct net_device *dev) if (!priv->up) return; - if (ieee->state == RTLLIB_LINKED) { + if (ieee->link_state == RTLLIB_LINKED) { _rtl92e_net_update(dev); rtl92e_update_ratr_table(dev); if ((ieee->pairwise_key_type == KEY_TYPE_WEP40) || @@ -760,7 +760,7 @@ void rtl92e_link_change(struct net_device *dev) u32 reg; reg = rtl92e_readl(dev, RCR); - if (priv->rtllib->state == RTLLIB_LINKED) { + if (priv->rtllib->link_state == RTLLIB_LINKED) { if (ieee->intel_promiscuous_md_info.promiscuous_on) ; else diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 777ee2509e7d..7b7500c6b181 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -169,7 +169,7 @@ bool rtl92e_set_rf_state(struct net_device *dev, (priv->rtllib->iw_mode == IW_MODE_ADHOC)) { if ((priv->rtllib->rf_off_reason > RF_CHANGE_BY_IPS) || (change_source > RF_CHANGE_BY_IPS)) { - if (ieee->state == RTLLIB_LINKED) + if (ieee->link_state == RTLLIB_LINKED) priv->blinked_ingpio = true; else priv->blinked_ingpio = false; @@ -327,7 +327,7 @@ static void _rtl92e_qos_activate(void *data) int i; mutex_lock(&priv->mutex); - if (priv->rtllib->state != RTLLIB_LINKED) + if (priv->rtllib->link_state != RTLLIB_LINKED) goto success; for (i = 0; i < QOS_QUEUE_NUM; i++) @@ -344,7 +344,7 @@ static int _rtl92e_qos_handle_probe_response(struct r8192_priv *priv, int ret = 0; u32 size = sizeof(struct rtllib_qos_parameters); - if (priv->rtllib->state != RTLLIB_LINKED) + if (priv->rtllib->link_state != RTLLIB_LINKED) return ret; if (priv->rtllib->iw_mode != IW_MODE_INFRA) @@ -400,7 +400,7 @@ static int _rtl92e_qos_assoc_resp(struct r8192_priv *priv, if (!priv || !network) return 0; - if (priv->rtllib->state != RTLLIB_LINKED) + if (priv->rtllib->link_state != RTLLIB_LINKED) return 0; if (priv->rtllib->iw_mode != IW_MODE_INFRA) @@ -635,7 +635,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset) if (priv->polling_timer_on == 0) rtl92e_check_rfctrl_gpio_timer(&priv->gpio_polling_timer); - if (priv->rtllib->state != RTLLIB_LINKED) + if (priv->rtllib->link_state != RTLLIB_LINKED) rtllib_softmac_start_protocol(priv->rtllib, 0); rtllib_reset_queue(priv->rtllib); _rtl92e_watchdog_timer_cb(&priv->watch_dog_timer); @@ -660,7 +660,7 @@ static int _rtl92e_sta_down(struct net_device *dev, bool shutdownrf) priv->rtllib->rtllib_ips_leave(dev); - if (priv->rtllib->state == RTLLIB_LINKED) + if (priv->rtllib->link_state == RTLLIB_LINKED) rtl92e_leisure_ps_leave(dev); priv->up = 0; @@ -1009,7 +1009,7 @@ static enum reset_type _rtl92e_if_check_reset(struct net_device *dev) if (rfState == rf_on && (priv->rtllib->iw_mode == IW_MODE_INFRA) && - (priv->rtllib->state == RTLLIB_LINKED)) + (priv->rtllib->link_state == RTLLIB_LINKED)) RxResetType = _rtl92e_rx_check_stuck(dev); if (TxResetType == RESET_TYPE_NORMAL || @@ -1051,7 +1051,7 @@ static void _rtl92e_if_silent_reset(struct net_device *dev) mutex_lock(&priv->wx_mutex); - if (priv->rtllib->state == RTLLIB_LINKED) + if (priv->rtllib->link_state == RTLLIB_LINKED) rtl92e_leisure_ps_leave(dev); if (priv->up) { @@ -1073,9 +1073,9 @@ static void _rtl92e_if_silent_reset(struct net_device *dev) rtl92e_dm_deinit(dev); rtllib_stop_scan_syncro(ieee); - if (ieee->state == RTLLIB_LINKED) { + if (ieee->link_state == RTLLIB_LINKED) { mutex_lock(&ieee->wx_mutex); - netdev_info(dev, "ieee->state is RTLLIB_LINKED\n"); + netdev_info(dev, "ieee->link_state is RTLLIB_LINKED\n"); rtllib_stop_send_beacons(priv->rtllib); del_timer_sync(&ieee->associate_timer); cancel_delayed_work(&ieee->associate_retry_wq); @@ -1083,7 +1083,7 @@ static void _rtl92e_if_silent_reset(struct net_device *dev) netif_carrier_off(dev); mutex_unlock(&ieee->wx_mutex); } else { - netdev_info(dev, "ieee->state is NOT LINKED\n"); + netdev_info(dev, "ieee->link_state is NOT LINKED\n"); rtllib_softmac_stop_protocol(priv->rtllib, 0, true); } @@ -1110,14 +1110,14 @@ static void _rtl92e_if_silent_reset(struct net_device *dev) rtl92e_enable_hw_security_config(dev); - if (ieee->state == RTLLIB_LINKED && ieee->iw_mode == + if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_INFRA) { ieee->set_chan(ieee->dev, ieee->current_network.channel); schedule_work(&ieee->associate_complete_wq); - } else if (ieee->state == RTLLIB_LINKED && ieee->iw_mode == + } else if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_ADHOC) { ieee->set_chan(ieee->dev, ieee->current_network.channel); @@ -1181,7 +1181,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) if (!priv->up || priv->hw_radio_off) return; - if (priv->rtllib->state >= RTLLIB_LINKED) { + if (priv->rtllib->link_state >= RTLLIB_LINKED) { if (priv->rtllib->CntAfterLink < 2) priv->rtllib->CntAfterLink++; } else { @@ -1191,7 +1191,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) rtl92e_dm_watchdog(dev); if (!rtllib_act_scanning(priv->rtllib, false)) { - if ((ieee->iw_mode == IW_MODE_INFRA) && (ieee->state == + if ((ieee->iw_mode == IW_MODE_INFRA) && (ieee->link_state == RTLLIB_NOLINK) && (ieee->rf_power_state == rf_on) && !ieee->is_set_key && (!ieee->proto_stoppping) && !ieee->wx_set_enc) { @@ -1202,7 +1202,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) } } } - if ((ieee->state == RTLLIB_LINKED) && (ieee->iw_mode == + if ((ieee->link_state == RTLLIB_LINKED) && (ieee->iw_mode == IW_MODE_INFRA) && (!ieee->net_promiscuous_md)) { if (ieee->link_detect_info.NumRxOkInPeriod > 100 || ieee->link_detect_info.NumTxOkInPeriod > 100) @@ -1244,7 +1244,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic; ieee->link_detect_info.bHigherBusyRxTraffic = bHigherBusyRxTraffic; - if (ieee->state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_INFRA) { + if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_INFRA) { u32 TotalRxBcnNum = 0; u32 TotalRxDataNum = 0; @@ -1263,7 +1263,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) "===>%s(): AP is power off, chan:%d, connect another one\n", __func__, priv->chan); - ieee->state = RTLLIB_ASSOCIATING; + ieee->link_state = RTLLIB_ASSOCIATING; RemovePeerTS(priv->rtllib, priv->rtllib->current_network.bssid); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 70b7d7825c6d..74715e254df3 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -291,7 +291,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev) if (priv->rtllib->mode != WIRELESS_MODE_N_24G) return; - if (priv->rtllib->state == RTLLIB_LINKED) { + if (priv->rtllib->link_state == RTLLIB_LINKED) { bshort_gi_enabled = (ht_info->cur_tx_bw40mhz && ht_info->bCurShortGI40MHz) || (!ht_info->cur_tx_bw40mhz && @@ -1075,7 +1075,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev) dm_digtable.dig_state = DM_STA_DIG_OFF; } - if (priv->rtllib->state == RTLLIB_LINKED) + if (priv->rtllib->link_state == RTLLIB_LINKED) dm_digtable.cur_sta_connect_state = DIG_STA_CONNECT; else dm_digtable.cur_sta_connect_state = DIG_STA_DISCONNECT; @@ -1105,7 +1105,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev) dm_digtable.dig_algorithm_switch = 0; } - if (priv->rtllib->state != RTLLIB_LINKED) + if (priv->rtllib->link_state != RTLLIB_LINKED) return; if ((priv->undecorated_smoothed_pwdb > dm_digtable.rssi_low_thresh) && @@ -1406,7 +1406,7 @@ static void _rtl92e_dm_check_edca_turbo(struct net_device *dev) if (priv->rtllib->iw_mode == IW_MODE_ADHOC) goto dm_CheckEdcaTurbo_EXIT; - if (priv->rtllib->state != RTLLIB_LINKED) + if (priv->rtllib->link_state != RTLLIB_LINKED) goto dm_CheckEdcaTurbo_EXIT; if (priv->rtllib->ht_info->iot_action & HT_IOT_ACT_DISABLE_EDCA_TURBO) goto dm_CheckEdcaTurbo_EXIT; @@ -1820,7 +1820,7 @@ static void _rtl92e_dm_fsync_timer_callback(struct timer_list *t) bool bSwitchFromCountDiff = false; bool bDoubleTimeInterval = false; - if (priv->rtllib->state == RTLLIB_LINKED && + if (priv->rtllib->link_state == RTLLIB_LINKED && priv->rtllib->bfsync_enable && (priv->rtllib->ht_info->iot_action & HT_IOT_ACT_CDD_FSYNC)) { u32 rate_bitmap; @@ -1990,7 +1990,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) static u8 reg_c38_State = RegC38_Default; static u32 reset_cnt; - if (priv->rtllib->state == RTLLIB_LINKED && + if (priv->rtllib->link_state == RTLLIB_LINKED && priv->rtllib->ht_info->IOTPeer == HT_IOT_PEER_BROADCOM) { if (priv->rtllib->bfsync_enable == 0) { switch (priv->rtllib->fsync_state) { @@ -2043,7 +2043,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) break; } - if (priv->rtllib->state == RTLLIB_LINKED) { + if (priv->rtllib->link_state == RTLLIB_LINKED) { if (priv->undecorated_smoothed_pwdb <= RegC38_TH) { if (reg_c38_State != @@ -2112,7 +2112,7 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev) txlowpower_threshold = TX_POWER_NEAR_FIELD_THRESH_LOW; } - if (priv->rtllib->state == RTLLIB_LINKED) { + if (priv->rtllib->link_state == RTLLIB_LINKED) { if (priv->undecorated_smoothed_pwdb >= txhipower_threshold) { priv->dynamic_tx_high_pwr = true; priv->dynamic_tx_low_pwr = false; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c index f4f7b74c8cd1..543b0e9dfa88 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c @@ -27,8 +27,8 @@ static u32 _rtl92e_ethtool_get_link(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - return ((priv->rtllib->state == RTLLIB_LINKED) || - (priv->rtllib->state == RTLLIB_LINKED_SCANNING)); + return ((priv->rtllib->link_state == RTLLIB_LINKED) || + (priv->rtllib->link_state == RTLLIB_LINKED_SCANNING)); } const struct ethtool_ops rtl819x_ethtool_ops = { diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c index 54a21c14cc75..bb52a595f75c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c @@ -118,7 +118,7 @@ void rtl92e_ips_enter(struct net_device *dev) rt_state = priv->rtllib->rf_power_state; if (rt_state == rf_on && !psc->bSwRfProcessing && - (priv->rtllib->state != RTLLIB_LINKED) && + (priv->rtllib->link_state != RTLLIB_LINKED) && (priv->rtllib->iw_mode != IW_MODE_MASTER)) { psc->eInactivePowerState = rf_off; _rtl92e_ps_update_rf_state(dev); @@ -209,7 +209,7 @@ void rtl92e_leisure_ps_enter(struct net_device *dev) &priv->rtllib->pwr_save_ctrl; if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) && - (priv->rtllib->state == RTLLIB_LINKED)) + (priv->rtllib->link_state == RTLLIB_LINKED)) || (priv->rtllib->iw_mode == IW_MODE_ADHOC) || (priv->rtllib->iw_mode == IW_MODE_MASTER)) return; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index 3346c4d72c3e..2d99badfb224 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -169,7 +169,7 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev, priv->ps_force = false; psc->bLeisurePs = true; } else { - if (priv->rtllib->state == RTLLIB_LINKED) + if (priv->rtllib->link_state == RTLLIB_LINKED) rtl92e_leisure_ps_leave(dev); priv->ps_force = true; @@ -375,10 +375,10 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, int ret; if (!(ieee->softmac_features & IEEE_SOFTMAC_SCAN)) { - if ((ieee->state >= RTLLIB_ASSOCIATING) && - (ieee->state <= RTLLIB_ASSOCIATING_AUTHENTICATED)) + if ((ieee->link_state >= RTLLIB_ASSOCIATING) && + (ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED)) return 0; - if ((priv->rtllib->state == RTLLIB_LINKED) && + if ((priv->rtllib->link_state == RTLLIB_LINKED) && (priv->rtllib->CntAfterLink < 2)) return 0; } @@ -409,7 +409,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, priv->rtllib->FirstIe_InScan = true; - if (priv->rtllib->state != RTLLIB_LINKED) { + if (priv->rtllib->link_state != RTLLIB_LINKED) { if (rt_state == rf_off) { if (priv->rtllib->rf_off_reason > RF_CHANGE_BY_IPS) { @@ -1124,7 +1124,7 @@ static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev) int tmp_qual = 0; int tmp_noise = 0; - if (ieee->state < RTLLIB_LINKED) { + if (ieee->link_state < RTLLIB_LINKED) { wstats->qual.qual = 10; wstats->qual.level = 0; wstats->qual.noise = 0x100 - 100; /* -100 dBm */ diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 1aabbe11b484..933656e9fc8a 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1489,7 +1489,7 @@ struct rtllib_device { */ struct rtllib_network current_network; - enum rtl_link_state state; + enum rtl_link_state link_state; int short_slot; int mode; /* A, B, G */ diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 08782336d390..9beac92c613f 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1196,7 +1196,7 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast, u8 nr_subframes) { if (unicast) { - if (ieee->state == RTLLIB_LINKED) { + if (ieee->link_state == RTLLIB_LINKED) { if (((ieee->link_detect_info.NumRxUnicastOkInPeriod + ieee->link_detect_info.NumTxOkInPeriod) > 8) || (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) { @@ -2117,7 +2117,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, network->tim.tim_period = info_element->data[1]; network->dtim_period = info_element->data[1]; - if (ieee->state != RTLLIB_LINKED) + if (ieee->link_state != RTLLIB_LINKED) break; network->last_dtim_sta_time = jiffies; @@ -2585,7 +2585,7 @@ static inline void rtllib_process_probe_response( ieee->current_network.buseprotection = false; } if (is_beacon(frame_ctl)) { - if (ieee->state >= RTLLIB_LINKED) + if (ieee->link_state >= RTLLIB_LINKED) ieee->link_detect_info.NumRecvBcnInPeriod++; } } @@ -2643,7 +2643,7 @@ static inline void rtllib_process_probe_response( || ((ieee->current_network.ssid_len == network->ssid_len) && (strncmp(ieee->current_network.ssid, network->ssid, network->ssid_len) == 0) && - (ieee->state == RTLLIB_NOLINK)))) + (ieee->link_state == RTLLIB_NOLINK)))) renew = 1; update_network(ieee, target, network); if (renew && (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)) @@ -2654,7 +2654,7 @@ static inline void rtllib_process_probe_response( if (is_beacon(frame_ctl) && is_same_network(&ieee->current_network, network, (network->ssid_len ? 1 : 0)) && - (ieee->state == RTLLIB_LINKED)) { + (ieee->link_state == RTLLIB_LINKED)) { ieee->handle_beacon(ieee->dev, beacon, &ieee->current_network); } free_network: @@ -2683,7 +2683,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee, if (ieee->sta_sleep || (ieee->ps != RTLLIB_PS_DISABLED && ieee->iw_mode == IW_MODE_INFRA && - ieee->state == RTLLIB_LINKED)) + ieee->link_state == RTLLIB_LINKED)) schedule_work(&ieee->ps_task); break; @@ -2700,7 +2700,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee, if ((ieee->softmac_features & IEEE_SOFTMAC_PROBERS) && ((ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER) && - ieee->state == RTLLIB_LINKED)) + ieee->link_state == RTLLIB_LINKED)) rtllib_rx_probe_rq(ieee, skb); break; } diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 5609d1dbcf6a..242bb5c633e9 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -522,7 +522,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) * if the state become LINKED because of the #1 situation */ - if (ieee->state == RTLLIB_LINKED) + if (ieee->link_state == RTLLIB_LINKED) goto out; if (ieee->sync_scan_hurryup) { netdev_info(ieee->dev, @@ -543,7 +543,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) ieee->actscanning = false; ieee->sync_scan_hurryup = 0; - if (ieee->state >= RTLLIB_LINKED) { + if (ieee->link_state >= RTLLIB_LINKED) { if (IS_DOT11D_ENABLE(ieee)) dot11d_scan_complete(ieee); } @@ -1349,7 +1349,7 @@ static void rtllib_associate_abort(struct rtllib_device *ieee) * Here we will check if there are good nets to associate * with, so we retry or just get back to NO_LINK and scanning */ - if (ieee->state == RTLLIB_ASSOCIATING_AUTHENTICATING) { + if (ieee->link_state == RTLLIB_ASSOCIATING_AUTHENTICATING) { netdev_dbg(ieee->dev, "Authentication failed\n"); ieee->softmac_stats.no_auth_rs++; } else { @@ -1357,7 +1357,7 @@ static void rtllib_associate_abort(struct rtllib_device *ieee) ieee->softmac_stats.no_ass_rs++; } - ieee->state = RTLLIB_ASSOCIATING_RETRY; + ieee->link_state = RTLLIB_ASSOCIATING_RETRY; schedule_delayed_work(&ieee->associate_retry_wq, RTLLIB_SOFTMAC_ASSOC_RETRY_TIME); @@ -1386,7 +1386,7 @@ static void rtllib_associate_step1(struct rtllib_device *ieee, u8 *daddr) if (!skb) rtllib_associate_abort(ieee); else { - ieee->state = RTLLIB_ASSOCIATING_AUTHENTICATING; + ieee->link_state = RTLLIB_ASSOCIATING_AUTHENTICATING; netdev_dbg(ieee->dev, "Sending authentication request\n"); softmac_mgmt_xmit(skb, ieee); if (!timer_pending(&ieee->associate_timer)) { @@ -1508,7 +1508,7 @@ static void rtllib_associate_complete(struct rtllib_device *ieee) { del_timer_sync(&ieee->associate_timer); - ieee->state = RTLLIB_LINKED; + ieee->link_state = RTLLIB_LINKED; rtllib_sta_send_associnfo(ieee); schedule_work(&ieee->associate_complete_wq); @@ -1548,7 +1548,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, /* we are interested in new only if we are not associated * and we are not associating / authenticating */ - if (ieee->state != RTLLIB_NOLINK) + if (ieee->link_state != RTLLIB_NOLINK) return; if ((ieee->iw_mode == IW_MODE_INFRA) && !(net->capability & @@ -1646,7 +1646,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, ieee->ht_info->bCurrentHTSupport = false; - ieee->state = RTLLIB_ASSOCIATING; + ieee->link_state = RTLLIB_ASSOCIATING; schedule_delayed_work( &ieee->associate_procedure_wq, 0); } else { @@ -1664,7 +1664,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, "Using B rates\n"); } memset(ieee->dot11ht_oper_rate_set, 0, 16); - ieee->state = RTLLIB_LINKED; + ieee->link_state = RTLLIB_LINKED; } } } @@ -1682,7 +1682,7 @@ static void rtllib_softmac_check_all_nets(struct rtllib_device *ieee) * we had found what we are searching for */ - if (ieee->state != RTLLIB_NOLINK) + if (ieee->link_state != RTLLIB_NOLINK) break; if (ieee->scan_age == 0 || time_after(target->last_scanned + @@ -1985,7 +1985,7 @@ static inline void rtllib_sta_ps(struct work_struct *work) if ((ieee->ps == RTLLIB_PS_DISABLED || ieee->iw_mode != IW_MODE_INFRA || - ieee->state != RTLLIB_LINKED)) { + ieee->link_state != RTLLIB_LINKED)) { spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); rtllib_sta_wakeup(ieee, 1); @@ -2139,7 +2139,7 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, WLAN_FC_GET_STYPE(frame_ctl)); if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) && - ieee->state == RTLLIB_ASSOCIATING_AUTHENTICATED && + ieee->link_state == RTLLIB_ASSOCIATING_AUTHENTICATED && (ieee->iw_mode == IW_MODE_INFRA)) { errcode = assoc_parse(ieee, skb, &aid); if (!errcode) { @@ -2149,7 +2149,7 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, if (!network) return 1; - ieee->state = RTLLIB_LINKED; + ieee->link_state = RTLLIB_LINKED; ieee->assoc_id = aid; ieee->softmac_stats.rx_ass_ok++; /* station support qos */ @@ -2218,7 +2218,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb) } if (ieee->open_wep || !challenge) { - ieee->state = RTLLIB_ASSOCIATING_AUTHENTICATED; + ieee->link_state = RTLLIB_ASSOCIATING_AUTHENTICATED; ieee->softmac_stats.rx_auth_rs_ok++; if (!(ieee->ht_info->iot_action & HT_IOT_ACT_PURE_N_MODE)) { if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) { @@ -2258,7 +2258,7 @@ rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb, struct rtllib_rx_stats *rx_stats) { if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) { - if (ieee->state == RTLLIB_ASSOCIATING_AUTHENTICATING && + if (ieee->link_state == RTLLIB_ASSOCIATING_AUTHENTICATING && (ieee->iw_mode == IW_MODE_INFRA)) { netdev_dbg(ieee->dev, "Received authentication response"); @@ -2283,14 +2283,14 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb) * both for disassociation and deauthentication */ if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) && - ieee->state == RTLLIB_LINKED && + ieee->link_state == RTLLIB_LINKED && (ieee->iw_mode == IW_MODE_INFRA)) { frame_ctl = le16_to_cpu(header->frame_ctl); netdev_info(ieee->dev, "==========>received disassoc/deauth(%x) frame, reason code:%x\n", WLAN_FC_GET_STYPE(frame_ctl), ((struct rtllib_disassoc *)skb->data)->reason); - ieee->state = RTLLIB_ASSOCIATING; + ieee->link_state = RTLLIB_ASSOCIATING; ieee->softmac_stats.reassoc++; ieee->is_roaming = true; ieee->link_detect_info.bBusyTraffic = false; @@ -2458,7 +2458,7 @@ static void rtllib_start_master_bss(struct rtllib_device *ieee) ether_addr_copy(ieee->current_network.bssid, ieee->dev->dev_addr); ieee->set_chan(ieee->dev, ieee->current_network.channel); - ieee->state = RTLLIB_LINKED; + ieee->link_state = RTLLIB_LINKED; ieee->link_change(ieee->dev); notify_wx_assoc_event(ieee); netif_carrier_on(ieee->dev); @@ -2495,7 +2495,7 @@ static void rtllib_start_ibss_wq(void *data) ieee->ssid_set = 1; } - ieee->state = RTLLIB_NOLINK; + ieee->link_state = RTLLIB_NOLINK; ieee->mode = WIRELESS_MODE_G; /* check if we have this cell in our network list */ rtllib_softmac_check_all_nets(ieee); @@ -2507,18 +2507,18 @@ static void rtllib_start_ibss_wq(void *data) * after setting ad-hoc mode. So we have to give another try.. * Here, in ibss mode, should be safe to do this without extra care * (in bss mode we had to make sure no-one tried to associate when - * we had just checked the ieee->state and we was going to start the + * we had just checked the ieee->link_state and we was going to start the * scan) because in ibss mode the rtllib_new_net function, when - * finds a good net, just set the ieee->state to RTLLIB_LINKED, + * finds a good net, just set the ieee->link_state to RTLLIB_LINKED, * so, at worst, we waste a bit of time to initiate an unneeded syncro * scan, that will stop at the first round because it sees the state * associated. */ - if (ieee->state == RTLLIB_NOLINK) + if (ieee->link_state == RTLLIB_NOLINK) rtllib_start_scan_syncro(ieee, 0); /* the network definitively is not here.. create a new cell */ - if (ieee->state == RTLLIB_NOLINK) { + if (ieee->link_state == RTLLIB_NOLINK) { netdev_info(ieee->dev, "creating new IBSS cell\n"); ieee->current_network.channel = ieee->bss_start_channel; if (!ieee->wap_set) @@ -2579,9 +2579,9 @@ static void rtllib_start_ibss_wq(void *data) ieee->ht_info->bCurrentHTSupport = false; ieee->SetHwRegHandler(ieee->dev, HW_VAR_MEDIA_STATUS, - (u8 *)(&ieee->state)); + (u8 *)(&ieee->link_state)); - ieee->state = RTLLIB_LINKED; + ieee->link_state = RTLLIB_LINKED; ieee->link_change(ieee->dev); HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); @@ -2615,7 +2615,7 @@ static void rtllib_start_bss(struct rtllib_device *ieee) rtllib_softmac_check_all_nets(ieee); /* ensure no-one start an associating process (thus setting - * the ieee->state to rtllib_ASSOCIATING) while we + * the ieee->link_state to rtllib_ASSOCIATING) while we * have just checked it and we are going to enable scan. * The rtllib_new_net function is always called with * lock held (from both rtllib_softmac_check_all_nets and @@ -2623,7 +2623,7 @@ static void rtllib_start_bss(struct rtllib_device *ieee) */ spin_lock_irqsave(&ieee->lock, flags); - if (ieee->state == RTLLIB_NOLINK) + if (ieee->link_state == RTLLIB_NOLINK) rtllib_start_scan(ieee); spin_unlock_irqrestore(&ieee->lock, flags); } @@ -2643,7 +2643,7 @@ void rtllib_disassociate(struct rtllib_device *ieee) if (IS_DOT11D_ENABLE(ieee)) dot11d_reset(ieee); - ieee->state = RTLLIB_NOLINK; + ieee->link_state = RTLLIB_NOLINK; ieee->is_set_key = false; ieee->wap_set = 0; @@ -2662,13 +2662,13 @@ static void rtllib_associate_retry_wq(void *data) if (!ieee->proto_started) goto exit; - if (ieee->state != RTLLIB_ASSOCIATING_RETRY) + if (ieee->link_state != RTLLIB_ASSOCIATING_RETRY) goto exit; /* until we do not set the state to RTLLIB_NOLINK * there are no possibility to have someone else trying * to start an association procedure (we get here with - * ieee->state = RTLLIB_ASSOCIATING). + * ieee->link_state = RTLLIB_ASSOCIATING). * When we set the state to RTLLIB_NOLINK it is possible * that the RX path run an attempt to associate, but * both rtllib_softmac_check_all_nets and the @@ -2679,13 +2679,13 @@ static void rtllib_associate_retry_wq(void *data) * state and we are going to start the scan. */ ieee->beinretry = true; - ieee->state = RTLLIB_NOLINK; + ieee->link_state = RTLLIB_NOLINK; rtllib_softmac_check_all_nets(ieee); spin_lock_irqsave(&ieee->lock, flags); - if (ieee->state == RTLLIB_NOLINK) + if (ieee->link_state == RTLLIB_NOLINK) rtllib_start_scan(ieee); spin_unlock_irqrestore(&ieee->lock, flags); @@ -2762,10 +2762,10 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown) cancel_delayed_work_sync(&ieee->link_change_wq); rtllib_stop_scan(ieee); - if (ieee->state <= RTLLIB_ASSOCIATING_AUTHENTICATED) - ieee->state = RTLLIB_NOLINK; + if (ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED) + ieee->link_state = RTLLIB_NOLINK; - if (ieee->state == RTLLIB_LINKED) { + if (ieee->link_state == RTLLIB_LINKED) { if (ieee->iw_mode == IW_MODE_INFRA) SendDisassociation(ieee, 1, WLAN_REASON_DEAUTH_LEAVING); rtllib_disassociate(ieee); @@ -2845,7 +2845,7 @@ int rtllib_softmac_init(struct rtllib_device *ieee) memset(&ieee->current_network, 0, sizeof(struct rtllib_network)); - ieee->state = RTLLIB_NOLINK; + ieee->link_state = RTLLIB_NOLINK; for (i = 0; i < 5; i++) ieee->seq_ctrl[i] = 0; ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC); @@ -3036,7 +3036,7 @@ static void rtllib_MgntDisconnectIBSS(struct rtllib_device *rtllib) u8 i; bool bFilterOutNonAssociatedBSSID = false; - rtllib->state = RTLLIB_NOLINK; + rtllib->link_state = RTLLIB_NOLINK; for (i = 0; i < 6; i++) rtllib->current_network.bssid[i] = 0x55; @@ -3063,7 +3063,7 @@ static void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib, RemovePeerTS(rtllib, asSta); if (memcmp(rtllib->current_network.bssid, asSta, 6) == 0) { - rtllib->state = RTLLIB_NOLINK; + rtllib->link_state = RTLLIB_NOLINK; for (i = 0; i < 6; i++) rtllib->current_network.bssid[i] = 0x22; @@ -3092,7 +3092,7 @@ rtllib_MgntDisconnectAP( rtllib_MlmeDisassociateRequest(rtllib, rtllib->current_network.bssid, asRsn); - rtllib->state = RTLLIB_NOLINK; + rtllib->link_state = RTLLIB_NOLINK; } bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn) @@ -3100,7 +3100,7 @@ bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn) if (rtllib->ps != RTLLIB_PS_DISABLED) rtllib->sta_wake_up(rtllib->dev); - if (rtllib->state == RTLLIB_LINKED) { + if (rtllib->link_state == RTLLIB_LINKED) { if (rtllib->iw_mode == IW_MODE_ADHOC) rtllib_MgntDisconnectIBSS(rtllib); if (rtllib->iw_mode == IW_MODE_INFRA) @@ -3119,7 +3119,7 @@ void notify_wx_assoc_event(struct rtllib_device *ieee) return; wrqu.ap_addr.sa_family = ARPHRD_ETHER; - if (ieee->state == RTLLIB_LINKED) + if (ieee->link_state == RTLLIB_LINKED) memcpy(wrqu.ap_addr.sa_data, ieee->current_network.bssid, ETH_ALEN); else { diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index 8f2f0dca88e7..8e101b63ec75 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -53,7 +53,7 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a, if (ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER) - if (ieee->state == RTLLIB_LINKED) { + if (ieee->link_state == RTLLIB_LINKED) { rtllib_stop_send_beacons(ieee); rtllib_start_send_beacons(ieee); } @@ -95,8 +95,8 @@ int rtllib_wx_get_wap(struct rtllib_device *ieee, /* We want avoid to give to the user inconsistent infos*/ spin_lock_irqsave(&ieee->lock, flags); - if (ieee->state != RTLLIB_LINKED && - ieee->state != RTLLIB_LINKED_SCANNING && + if (ieee->link_state != RTLLIB_LINKED && + ieee->link_state != RTLLIB_LINKED_SCANNING && ieee->wap_set == 0) eth_zero_addr(wrqu->ap_addr.sa_data); @@ -184,8 +184,8 @@ int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a, goto out; } - if (ieee->state != RTLLIB_LINKED && - ieee->state != RTLLIB_LINKED_SCANNING && + if (ieee->link_state != RTLLIB_LINKED && + ieee->link_state != RTLLIB_LINKED_SCANNING && ieee->ssid_set == 0) { ret = -1; goto out; @@ -323,7 +323,7 @@ void rtllib_wx_sync_scan_wq(void *data) rtllib_stop_all_queues(ieee); rtllib_stop_send_beacons(ieee); - ieee->state = RTLLIB_LINKED_SCANNING; + ieee->link_state = RTLLIB_LINKED_SCANNING; ieee->link_change(ieee->dev); /* wait for ps packet to be kicked out successfully */ msleep(50); @@ -355,7 +355,7 @@ void rtllib_wx_sync_scan_wq(void *data) ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_RESTORE); - ieee->state = RTLLIB_LINKED; + ieee->link_state = RTLLIB_LINKED; ieee->link_change(ieee->dev); /* Notify AP that I wake up again */ @@ -385,7 +385,7 @@ int rtllib_wx_set_scan(struct rtllib_device *ieee, struct iw_request_info *a, goto out; } - if (ieee->state == RTLLIB_LINKED) { + if (ieee->link_state == RTLLIB_LINKED) { schedule_work(&ieee->wx_sync_scan_wq); /* intentionally forget to up sem */ return 0; diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index 184eba571741..a82fd64dbdce 100644 --- a/drivers/staging/rtl8192e/rtllib_wx.c +++ b/drivers/staging/rtl8192e/rtllib_wx.c @@ -619,7 +619,7 @@ int rtllib_wx_set_mlme(struct rtllib_device *ieee, bool deauth = false; struct iw_mlme *mlme = (struct iw_mlme *)extra; - if (ieee->state != RTLLIB_LINKED) + if (ieee->link_state != RTLLIB_LINKED) return -ENOLINK; mutex_lock(&ieee->wx_mutex); From patchwork Sat Jun 17 13:57:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109503 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2005612vqr; Sat, 17 Jun 2023 07:23:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4rCbCb7esIp98qbaG9YzBxROEygoOSMN0NgWWCzDNQYq1YWTmIHaMRRBqjxVLk8KmcO+7J X-Received: by 2002:a5e:da09:0:b0:76c:622e:3129 with SMTP id x9-20020a5eda09000000b0076c622e3129mr3147585ioj.5.1687011838565; Sat, 17 Jun 2023 07:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687011838; cv=none; d=google.com; s=arc-20160816; b=Sgejh1IhD/CRVw2rhaeNkaWbOGpremfFhAq6/Po1P1RGlm4Z+Z26xO7NGq6Z29YEJ4 HKZwLrlA3bMSZLf91sb8j2rbKojfmJQ+kWAO7q//KhfBnPW+4I0mRABybUllFTKBhusC JGA7QYa7H/xSPbP02sEDbcimxEd5MrxDQDxS4HKv7pZkhRmtJrLWg0n0Ajs+rYl0NeD6 stkPQqhNEWLZXh/dVjrLv1MxFd2TCDIDL5lsCH3Z5zy9GfthLEghGd2ifhhNuScww4je p2BdPbT31DV/3I39b7BrjidWvF5s6UUmVWzmda6NbjqcHGBKpMWV7wjQv3F44uZwdWZg JfoA== 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=5r8DhT5L5h8r0JwLA0gY98CPzBjOeUot4BZYb8MwDFg=; b=WwRQpMbPFxjRr/EJWwxG8Mm4GdUUyHbeh0cRo01KtPOULEmlAnH+Zf77Vs1GWRvpmA lOivMsb8Y2ClnhhbpcjLQOJ0r/m1iEbYblJ5BQ8f4fWaoTkZKdtEXdXec51VmG7kBNxe TsBM6j3vFobRbR5EaolSohSfZ/TEk1r9624SWn0K197wThryaO4W/OY9yQt5zkx8X/Y3 65X/jNs2ZtJb+p9Xj8nQOyiwt3kUxfL7HFxaBoRcxe2Fc/UUBT4MAXlbrBJIeh3Tq6sd +IW9TOAIUNu7xK71zkRVomI6V6gJ7Z+tx4qwWE16Y7KnKnYqhHvI/L0TtM2lgfEg6e+F G/HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="po6/GxT7"; 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 ei22-20020a17090ae55600b00252d84b7af0si2440383pjb.181.2023.06.17.07.23.45; Sat, 17 Jun 2023 07:23:58 -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="po6/GxT7"; 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 S237563AbjFQN6A (ORCPT + 99 others); Sat, 17 Jun 2023 09:58:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237280AbjFQN54 (ORCPT ); Sat, 17 Jun 2023 09:57:56 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E46B30E3 for ; Sat, 17 Jun 2023 06:57:27 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-97ea801b0d0so44276066b.1 for ; Sat, 17 Jun 2023 06:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010246; x=1689602246; 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=5r8DhT5L5h8r0JwLA0gY98CPzBjOeUot4BZYb8MwDFg=; b=po6/GxT79Pm4LMgotSpY2CrnosQiuatHhG2r+ox8rDNPiFx02/4VBAPMsg7qRulaT8 L9pPMyf82WjyPwbVdVo749dObJ8wijFGR6luwWbw5wZPinUZLa84i/2FrCg4lna97tK4 0P6v9mk5cow8xGHEDAlukGsncTt2T7wMgrjXaQnEB4vt2vDfCKE53x7VFO6D0s1GhU9Y nAL5Bscb1WmQhuNKAE0egkJ0ffmVwDRe9CVnSmrQiDBtuPKssDny2xc4ccPrfVB++iHw RwnPWReZl87ir4wnbnqD2V+9GCq4uM5FOzyOoLww81a04g6gF/CMPzZN4+6vMNPY3/Sa L6iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010246; x=1689602246; 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=5r8DhT5L5h8r0JwLA0gY98CPzBjOeUot4BZYb8MwDFg=; b=lzygR5W7Wbzn8mAx1OXLGeeINTjgYZs8OoOI9mivXdCdM4+7aUzUaPa2dEw5nCUcUY fFm+aV7EIFNnLoT/IRF3BH+LG8QRltbEjCXc8Nu+xQj7mipNfb/zyOoNKa6g3ffQT+AQ FheE/CfGLdbCV+kgcdOuXAUxZPCzLiERpGWwBMtaj40mtBvzJWZ1kIHFuB6aIuHBf/dF bHr2fFAPkN+x3viJsUr+nYcDQHMfBJyGGtZt4NDTdSrkm4jjTuFx+bFNhT+xtoYKZyNF 1Ogyf+gXOH3DfJuTP6ToAEivloDHaQ1EMjCfwq+05koSX5FBRJaagVUH9TAjvA2FOgJV 3qOQ== X-Gm-Message-State: AC+VfDxvSCpnwldT296ls0NRE4cHBaYpyy2kA1AXtBJ2L8hnu5owr6PM pu4OfmU0jV07gF3KqfYQTbUmlvgzOFw= X-Received: by 2002:a17:906:6493:b0:987:6960:36c5 with SMTP id e19-20020a170906649300b00987696036c5mr1352539ejm.6.1687010245981; Sat, 17 Jun 2023 06:57:25 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id q14-20020a1709066b0e00b00987435d6266sm982342ejr.190.2023.06.17.06.57.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:57:25 -0700 (PDT) Date: Sat, 17 Jun 2023 15:57:23 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 7/9] staging: rtl8192e: Rename RTLLIB_NOLINK to MAC80211_NOLINK Message-ID: <74feefdf800304deaf918efbc04344865f7aa01d.1687007788.git.philipp.g.hortmann@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?1768960125807821981?= X-GMAIL-MSGID: =?utf-8?q?1768960125807821981?= Rename RTLLIB_NOLINK to MAC80211_NOLINK to align with rtlwifi driver. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 2 +- drivers/staging/rtl8192e/rtllib_softmac.c | 34 ++++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 7b7500c6b181..b4c618d37a71 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1192,7 +1192,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) if (!rtllib_act_scanning(priv->rtllib, false)) { if ((ieee->iw_mode == IW_MODE_INFRA) && (ieee->link_state == - RTLLIB_NOLINK) && + MAC80211_NOLINK) && (ieee->rf_power_state == rf_on) && !ieee->is_set_key && (!ieee->proto_stoppping) && !ieee->wx_set_enc) { if ((ieee->pwr_save_ctrl.ReturnPoint == diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 933656e9fc8a..68f0e1426b35 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1121,7 +1121,7 @@ struct rtllib_network { enum rtl_link_state { /* the card is not linked at all */ - RTLLIB_NOLINK = 0, + MAC80211_NOLINK = 0, /* RTLLIB_ASSOCIATING* are for BSS client mode * the driver shall not perform RX filtering unless diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 9beac92c613f..68f1393b1b63 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -2643,7 +2643,7 @@ static inline void rtllib_process_probe_response( || ((ieee->current_network.ssid_len == network->ssid_len) && (strncmp(ieee->current_network.ssid, network->ssid, network->ssid_len) == 0) && - (ieee->link_state == RTLLIB_NOLINK)))) + (ieee->link_state == MAC80211_NOLINK)))) renew = 1; update_network(ieee, target, network); if (renew && (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 242bb5c633e9..bbb0f61c851d 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -508,7 +508,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) * performing a complete syncro scan before conclude * there are no interesting cell and to create a * new one. In this case the link state is - * RTLLIB_NOLINK until we found an interesting cell. + * MAC80211_NOLINK until we found an interesting cell. * If so the ieee8021_new_net, called by the RX path * will set the state to RTLLIB_LINKED, so we stop * scanning @@ -1548,7 +1548,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, /* we are interested in new only if we are not associated * and we are not associating / authenticating */ - if (ieee->link_state != RTLLIB_NOLINK) + if (ieee->link_state != MAC80211_NOLINK) return; if ((ieee->iw_mode == IW_MODE_INFRA) && !(net->capability & @@ -1682,7 +1682,7 @@ static void rtllib_softmac_check_all_nets(struct rtllib_device *ieee) * we had found what we are searching for */ - if (ieee->link_state != RTLLIB_NOLINK) + if (ieee->link_state != MAC80211_NOLINK) break; if (ieee->scan_age == 0 || time_after(target->last_scanned + @@ -2495,7 +2495,7 @@ static void rtllib_start_ibss_wq(void *data) ieee->ssid_set = 1; } - ieee->link_state = RTLLIB_NOLINK; + ieee->link_state = MAC80211_NOLINK; ieee->mode = WIRELESS_MODE_G; /* check if we have this cell in our network list */ rtllib_softmac_check_all_nets(ieee); @@ -2514,11 +2514,11 @@ static void rtllib_start_ibss_wq(void *data) * scan, that will stop at the first round because it sees the state * associated. */ - if (ieee->link_state == RTLLIB_NOLINK) + if (ieee->link_state == MAC80211_NOLINK) rtllib_start_scan_syncro(ieee, 0); /* the network definitively is not here.. create a new cell */ - if (ieee->link_state == RTLLIB_NOLINK) { + if (ieee->link_state == MAC80211_NOLINK) { netdev_info(ieee->dev, "creating new IBSS cell\n"); ieee->current_network.channel = ieee->bss_start_channel; if (!ieee->wap_set) @@ -2623,7 +2623,7 @@ static void rtllib_start_bss(struct rtllib_device *ieee) */ spin_lock_irqsave(&ieee->lock, flags); - if (ieee->link_state == RTLLIB_NOLINK) + if (ieee->link_state == MAC80211_NOLINK) rtllib_start_scan(ieee); spin_unlock_irqrestore(&ieee->lock, flags); } @@ -2643,7 +2643,7 @@ void rtllib_disassociate(struct rtllib_device *ieee) if (IS_DOT11D_ENABLE(ieee)) dot11d_reset(ieee); - ieee->link_state = RTLLIB_NOLINK; + ieee->link_state = MAC80211_NOLINK; ieee->is_set_key = false; ieee->wap_set = 0; @@ -2665,11 +2665,11 @@ static void rtllib_associate_retry_wq(void *data) if (ieee->link_state != RTLLIB_ASSOCIATING_RETRY) goto exit; - /* until we do not set the state to RTLLIB_NOLINK + /* until we do not set the state to MAC80211_NOLINK * there are no possibility to have someone else trying * to start an association procedure (we get here with * ieee->link_state = RTLLIB_ASSOCIATING). - * When we set the state to RTLLIB_NOLINK it is possible + * When we set the state to MAC80211_NOLINK it is possible * that the RX path run an attempt to associate, but * both rtllib_softmac_check_all_nets and the * RX path works with ieee->lock held so there are no @@ -2679,13 +2679,13 @@ static void rtllib_associate_retry_wq(void *data) * state and we are going to start the scan. */ ieee->beinretry = true; - ieee->link_state = RTLLIB_NOLINK; + ieee->link_state = MAC80211_NOLINK; rtllib_softmac_check_all_nets(ieee); spin_lock_irqsave(&ieee->lock, flags); - if (ieee->link_state == RTLLIB_NOLINK) + if (ieee->link_state == MAC80211_NOLINK) rtllib_start_scan(ieee); spin_unlock_irqrestore(&ieee->lock, flags); @@ -2763,7 +2763,7 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown) rtllib_stop_scan(ieee); if (ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED) - ieee->link_state = RTLLIB_NOLINK; + ieee->link_state = MAC80211_NOLINK; if (ieee->link_state == RTLLIB_LINKED) { if (ieee->iw_mode == IW_MODE_INFRA) @@ -2845,7 +2845,7 @@ int rtllib_softmac_init(struct rtllib_device *ieee) memset(&ieee->current_network, 0, sizeof(struct rtllib_network)); - ieee->link_state = RTLLIB_NOLINK; + ieee->link_state = MAC80211_NOLINK; for (i = 0; i < 5; i++) ieee->seq_ctrl[i] = 0; ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC); @@ -3036,7 +3036,7 @@ static void rtllib_MgntDisconnectIBSS(struct rtllib_device *rtllib) u8 i; bool bFilterOutNonAssociatedBSSID = false; - rtllib->link_state = RTLLIB_NOLINK; + rtllib->link_state = MAC80211_NOLINK; for (i = 0; i < 6; i++) rtllib->current_network.bssid[i] = 0x55; @@ -3063,7 +3063,7 @@ static void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib, RemovePeerTS(rtllib, asSta); if (memcmp(rtllib->current_network.bssid, asSta, 6) == 0) { - rtllib->link_state = RTLLIB_NOLINK; + rtllib->link_state = MAC80211_NOLINK; for (i = 0; i < 6; i++) rtllib->current_network.bssid[i] = 0x22; @@ -3092,7 +3092,7 @@ rtllib_MgntDisconnectAP( rtllib_MlmeDisassociateRequest(rtllib, rtllib->current_network.bssid, asRsn); - rtllib->link_state = RTLLIB_NOLINK; + rtllib->link_state = MAC80211_NOLINK; } bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn) From patchwork Sat Jun 17 13:57:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109501 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2000743vqr; Sat, 17 Jun 2023 07:14:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ78rJ2qKIs6lRoEEeTIF2DO/vdjeeWwzMaO03j/N1T54ATQI6iTxtclkjSAt+EiM9455OdL X-Received: by 2002:a17:903:2451:b0:1ac:a6b0:1c87 with SMTP id l17-20020a170903245100b001aca6b01c87mr6671501pls.48.1687011277927; Sat, 17 Jun 2023 07:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687011277; cv=none; d=google.com; s=arc-20160816; b=CLqdZIV7ZWT02iOGW5GgBpcb+WYpidNdw5HQBqm2IoQfskqaIdMV49rGVtEmCA0f+Q BZR5ZAMynUUwV5Ue9zj1vikkfMmsLQWbwIcCAyfnKmVVs8Nef42FOPS1ihFfvcANl6n9 7yaHtlfxXHjkDaGdIFhfzto2vDB7PF3Q2h3Y3DPUFK4pZyTqpYwG5WR3+qJeRZ+olrU2 FjPwM1rdxoqJDqUOv/Ew1cG+5TI8uepSvLLIgi1kTB89coKxolnTLELoi9VDpmHKOxGc N+7PtfNvntju99ns9OWAL7ETJwaK0d3IpB8XMwjZFKRshaPyoLmaUz9/wY7reZj0Ol3X 04nw== 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=VkmjazlAR0SOJnibuMAsrh0dHrzkB5jiHviyz5Pstgw=; b=u3FGrhLPmhXfk8SefYx357oB5A1qTGQbFFGRnqfcsjIbbpjkKc9QE15gauVCkgtTmZ 338ZupltqZYtmjDzNiN0lNAinDSJbyrfS3VE9uuNMvBU/LZAqpIIpBjR3vkTfDHR/sh2 xP5NCfo5Or6wmwceKiH0nAutx520iMMNMCAX618jC5583sxnu+MX3u3IhIBzmgUFYZCC exALG8rhrEzuwLN0wl1I2R/9jPO4i+z45mk+hjxgXQyu9UTTE5WF6aKmVlVjAPWyrTHY 7MTcfX0fA5zzSSw2SkRdFAKqyrtuW9tl42TmMyXI1UOo8GMKCKTpV9lbd7s5SRTVpjks 5gdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=rJRtS9mo; 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 a14-20020a170902ecce00b001b53029fee7si3630521plh.297.2023.06.17.07.14.23; Sat, 17 Jun 2023 07:14:37 -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=rJRtS9mo; 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 S1345770AbjFQN6F (ORCPT + 99 others); Sat, 17 Jun 2023 09:58:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232182AbjFQN6D (ORCPT ); Sat, 17 Jun 2023 09:58:03 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B41C82700 for ; Sat, 17 Jun 2023 06:57:33 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-516a0105121so402926a12.0 for ; Sat, 17 Jun 2023 06:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010252; x=1689602252; 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=VkmjazlAR0SOJnibuMAsrh0dHrzkB5jiHviyz5Pstgw=; b=rJRtS9moHqpXhI4Hk5iQvZgVkY+D9eUn5XNHCL3JfXtr0RhT/6VCRsnLvR721Y84b4 /lSzIHOlg1aTXigGz3SGJyiRPMqNkv/ijtVR0FKtmhnHJ8ANGDpyfbBM8Vj37bC3LnAr 8JzWJSKtBitls4qiIkfd3Umi1982q2/3D06NpDGmcqG32gtmi30aflgquHpBsog59ekc fn0jQvqKpqmIEZIf8ndtJfpV8YF91JwU1Pr7DjjB+a8vsWxvB8AebCL4/9w9LsdeyOzk WtUTRbzLmfRqWj7P9a0gh4eD8mW8wt1HG3w/aXkccNf7hL7v6xXOscQ6x8JZOnbIh8aF N+XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010252; x=1689602252; 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=VkmjazlAR0SOJnibuMAsrh0dHrzkB5jiHviyz5Pstgw=; b=LJFRQxEnjxgf2epwcscXp2cKtAKfpIoduUT3QZlKEDvGGNASC7KxcZZ+0ciNrVtbbL cqVX1zqCKfwfwKuJNsIrjZRo4cz2AK+nocUZ2zD5wyHb8H02zZo9FuFwr/whbgCdrvmo ZHiu8iDYZVxU5ND6PhFrCodZPBfHU3vAI8j8xugPHhyUVfx2vJlEWi4wJbfmlSFIey9b sye3ZAGzLqifhQ9wyGRLLykjA1XxfinpKLL3bQWZJ+RJ5gKSpAMOLhmnG6YC38eLo4O3 4gh7uATyOVCFWQ6fMPUu1LAbr548Qb4lGxEXaP/wgx1fe8RNfJHLH6M2AMoZ0efFnRz5 YaQg== X-Gm-Message-State: AC+VfDysJiDpcxtC8PFThmIcK1p/llhMtRyta4Fdx4Lcy8ojZz4L1HVL MEXMqA86pyLGZ5qlXB2V35/nWyH3OpE= X-Received: by 2002:a05:6402:2753:b0:509:c551:c00c with SMTP id z19-20020a056402275300b00509c551c00cmr4125835edd.2.1687010251968; Sat, 17 Jun 2023 06:57:31 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id eh9-20020a0564020f8900b0050a276e7ba8sm11024906edb.36.2023.06.17.06.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:57:31 -0700 (PDT) Date: Sat, 17 Jun 2023 15:57:29 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] staging: rtl8192e: Rename RTLLIB_LINKED to MAC80211_LINKED Message-ID: <532bd98301657b2a8329e95eccb993540ae9ba3f.1687007788.git.philipp.g.hortmann@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?1768959537814587223?= X-GMAIL-MSGID: =?utf-8?q?1768959537814587223?= Rename RTLLIB_LINKED to MAC80211_LINKED to align with rtlwifi driver. Signed-off-by: Philipp Hortmann --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 10 +++---- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 30 +++++++++---------- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 16 +++++----- .../staging/rtl8192e/rtl8192e/rtl_ethtool.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 4 +-- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 8 ++--- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 12 ++++---- drivers/staging/rtl8192e/rtllib_softmac.c | 28 ++++++++--------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 10 +++---- drivers/staging/rtl8192e/rtllib_wx.c | 2 +- 11 files changed, 62 insertions(+), 62 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index b6c086047841..7683853e7c46 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -52,15 +52,15 @@ static void _rtl92e_update_msr(struct net_device *dev) switch (priv->rtllib->iw_mode) { case IW_MODE_INFRA: - if (priv->rtllib->link_state == RTLLIB_LINKED) + if (priv->rtllib->link_state == MAC80211_LINKED) msr |= MSR_LINK_MANAGED; break; case IW_MODE_ADHOC: - if (priv->rtllib->link_state == RTLLIB_LINKED) + if (priv->rtllib->link_state == MAC80211_LINKED) msr |= MSR_LINK_ADHOC; break; case IW_MODE_MASTER: - if (priv->rtllib->link_state == RTLLIB_LINKED) + if (priv->rtllib->link_state == MAC80211_LINKED) msr |= MSR_LINK_MASTER; break; default: @@ -745,7 +745,7 @@ void rtl92e_link_change(struct net_device *dev) if (!priv->up) return; - if (ieee->link_state == RTLLIB_LINKED) { + if (ieee->link_state == MAC80211_LINKED) { _rtl92e_net_update(dev); rtl92e_update_ratr_table(dev); if ((ieee->pairwise_key_type == KEY_TYPE_WEP40) || @@ -760,7 +760,7 @@ void rtl92e_link_change(struct net_device *dev) u32 reg; reg = rtl92e_readl(dev, RCR); - if (priv->rtllib->link_state == RTLLIB_LINKED) { + if (priv->rtllib->link_state == MAC80211_LINKED) { if (ieee->intel_promiscuous_md_info.promiscuous_on) ; else diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index b4c618d37a71..9cb4ae9ba970 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -169,7 +169,7 @@ bool rtl92e_set_rf_state(struct net_device *dev, (priv->rtllib->iw_mode == IW_MODE_ADHOC)) { if ((priv->rtllib->rf_off_reason > RF_CHANGE_BY_IPS) || (change_source > RF_CHANGE_BY_IPS)) { - if (ieee->link_state == RTLLIB_LINKED) + if (ieee->link_state == MAC80211_LINKED) priv->blinked_ingpio = true; else priv->blinked_ingpio = false; @@ -327,7 +327,7 @@ static void _rtl92e_qos_activate(void *data) int i; mutex_lock(&priv->mutex); - if (priv->rtllib->link_state != RTLLIB_LINKED) + if (priv->rtllib->link_state != MAC80211_LINKED) goto success; for (i = 0; i < QOS_QUEUE_NUM; i++) @@ -344,7 +344,7 @@ static int _rtl92e_qos_handle_probe_response(struct r8192_priv *priv, int ret = 0; u32 size = sizeof(struct rtllib_qos_parameters); - if (priv->rtllib->link_state != RTLLIB_LINKED) + if (priv->rtllib->link_state != MAC80211_LINKED) return ret; if (priv->rtllib->iw_mode != IW_MODE_INFRA) @@ -400,7 +400,7 @@ static int _rtl92e_qos_assoc_resp(struct r8192_priv *priv, if (!priv || !network) return 0; - if (priv->rtllib->link_state != RTLLIB_LINKED) + if (priv->rtllib->link_state != MAC80211_LINKED) return 0; if (priv->rtllib->iw_mode != IW_MODE_INFRA) @@ -635,7 +635,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset) if (priv->polling_timer_on == 0) rtl92e_check_rfctrl_gpio_timer(&priv->gpio_polling_timer); - if (priv->rtllib->link_state != RTLLIB_LINKED) + if (priv->rtllib->link_state != MAC80211_LINKED) rtllib_softmac_start_protocol(priv->rtllib, 0); rtllib_reset_queue(priv->rtllib); _rtl92e_watchdog_timer_cb(&priv->watch_dog_timer); @@ -660,7 +660,7 @@ static int _rtl92e_sta_down(struct net_device *dev, bool shutdownrf) priv->rtllib->rtllib_ips_leave(dev); - if (priv->rtllib->link_state == RTLLIB_LINKED) + if (priv->rtllib->link_state == MAC80211_LINKED) rtl92e_leisure_ps_leave(dev); priv->up = 0; @@ -1009,7 +1009,7 @@ static enum reset_type _rtl92e_if_check_reset(struct net_device *dev) if (rfState == rf_on && (priv->rtllib->iw_mode == IW_MODE_INFRA) && - (priv->rtllib->link_state == RTLLIB_LINKED)) + (priv->rtllib->link_state == MAC80211_LINKED)) RxResetType = _rtl92e_rx_check_stuck(dev); if (TxResetType == RESET_TYPE_NORMAL || @@ -1051,7 +1051,7 @@ static void _rtl92e_if_silent_reset(struct net_device *dev) mutex_lock(&priv->wx_mutex); - if (priv->rtllib->link_state == RTLLIB_LINKED) + if (priv->rtllib->link_state == MAC80211_LINKED) rtl92e_leisure_ps_leave(dev); if (priv->up) { @@ -1073,9 +1073,9 @@ static void _rtl92e_if_silent_reset(struct net_device *dev) rtl92e_dm_deinit(dev); rtllib_stop_scan_syncro(ieee); - if (ieee->link_state == RTLLIB_LINKED) { + if (ieee->link_state == MAC80211_LINKED) { mutex_lock(&ieee->wx_mutex); - netdev_info(dev, "ieee->link_state is RTLLIB_LINKED\n"); + netdev_info(dev, "ieee->link_state is MAC80211_LINKED\n"); rtllib_stop_send_beacons(priv->rtllib); del_timer_sync(&ieee->associate_timer); cancel_delayed_work(&ieee->associate_retry_wq); @@ -1110,14 +1110,14 @@ static void _rtl92e_if_silent_reset(struct net_device *dev) rtl92e_enable_hw_security_config(dev); - if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode == + if (ieee->link_state == MAC80211_LINKED && ieee->iw_mode == IW_MODE_INFRA) { ieee->set_chan(ieee->dev, ieee->current_network.channel); schedule_work(&ieee->associate_complete_wq); - } else if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode == + } else if (ieee->link_state == MAC80211_LINKED && ieee->iw_mode == IW_MODE_ADHOC) { ieee->set_chan(ieee->dev, ieee->current_network.channel); @@ -1181,7 +1181,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) if (!priv->up || priv->hw_radio_off) return; - if (priv->rtllib->link_state >= RTLLIB_LINKED) { + if (priv->rtllib->link_state >= MAC80211_LINKED) { if (priv->rtllib->CntAfterLink < 2) priv->rtllib->CntAfterLink++; } else { @@ -1202,7 +1202,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) } } } - if ((ieee->link_state == RTLLIB_LINKED) && (ieee->iw_mode == + if ((ieee->link_state == MAC80211_LINKED) && (ieee->iw_mode == IW_MODE_INFRA) && (!ieee->net_promiscuous_md)) { if (ieee->link_detect_info.NumRxOkInPeriod > 100 || ieee->link_detect_info.NumTxOkInPeriod > 100) @@ -1244,7 +1244,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic; ieee->link_detect_info.bHigherBusyRxTraffic = bHigherBusyRxTraffic; - if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_INFRA) { + if (ieee->link_state == MAC80211_LINKED && ieee->iw_mode == IW_MODE_INFRA) { u32 TotalRxBcnNum = 0; u32 TotalRxDataNum = 0; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 74715e254df3..adb6f12c89d8 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -291,7 +291,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev) if (priv->rtllib->mode != WIRELESS_MODE_N_24G) return; - if (priv->rtllib->link_state == RTLLIB_LINKED) { + if (priv->rtllib->link_state == MAC80211_LINKED) { bshort_gi_enabled = (ht_info->cur_tx_bw40mhz && ht_info->bCurShortGI40MHz) || (!ht_info->cur_tx_bw40mhz && @@ -1075,7 +1075,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev) dm_digtable.dig_state = DM_STA_DIG_OFF; } - if (priv->rtllib->link_state == RTLLIB_LINKED) + if (priv->rtllib->link_state == MAC80211_LINKED) dm_digtable.cur_sta_connect_state = DIG_STA_CONNECT; else dm_digtable.cur_sta_connect_state = DIG_STA_DISCONNECT; @@ -1105,7 +1105,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev) dm_digtable.dig_algorithm_switch = 0; } - if (priv->rtllib->link_state != RTLLIB_LINKED) + if (priv->rtllib->link_state != MAC80211_LINKED) return; if ((priv->undecorated_smoothed_pwdb > dm_digtable.rssi_low_thresh) && @@ -1406,7 +1406,7 @@ static void _rtl92e_dm_check_edca_turbo(struct net_device *dev) if (priv->rtllib->iw_mode == IW_MODE_ADHOC) goto dm_CheckEdcaTurbo_EXIT; - if (priv->rtllib->link_state != RTLLIB_LINKED) + if (priv->rtllib->link_state != MAC80211_LINKED) goto dm_CheckEdcaTurbo_EXIT; if (priv->rtllib->ht_info->iot_action & HT_IOT_ACT_DISABLE_EDCA_TURBO) goto dm_CheckEdcaTurbo_EXIT; @@ -1820,7 +1820,7 @@ static void _rtl92e_dm_fsync_timer_callback(struct timer_list *t) bool bSwitchFromCountDiff = false; bool bDoubleTimeInterval = false; - if (priv->rtllib->link_state == RTLLIB_LINKED && + if (priv->rtllib->link_state == MAC80211_LINKED && priv->rtllib->bfsync_enable && (priv->rtllib->ht_info->iot_action & HT_IOT_ACT_CDD_FSYNC)) { u32 rate_bitmap; @@ -1990,7 +1990,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) static u8 reg_c38_State = RegC38_Default; static u32 reset_cnt; - if (priv->rtllib->link_state == RTLLIB_LINKED && + if (priv->rtllib->link_state == MAC80211_LINKED && priv->rtllib->ht_info->IOTPeer == HT_IOT_PEER_BROADCOM) { if (priv->rtllib->bfsync_enable == 0) { switch (priv->rtllib->fsync_state) { @@ -2043,7 +2043,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) break; } - if (priv->rtllib->link_state == RTLLIB_LINKED) { + if (priv->rtllib->link_state == MAC80211_LINKED) { if (priv->undecorated_smoothed_pwdb <= RegC38_TH) { if (reg_c38_State != @@ -2112,7 +2112,7 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev) txlowpower_threshold = TX_POWER_NEAR_FIELD_THRESH_LOW; } - if (priv->rtllib->link_state == RTLLIB_LINKED) { + if (priv->rtllib->link_state == MAC80211_LINKED) { if (priv->undecorated_smoothed_pwdb >= txhipower_threshold) { priv->dynamic_tx_high_pwr = true; priv->dynamic_tx_low_pwr = false; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c index 543b0e9dfa88..1625d1326599 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c @@ -27,7 +27,7 @@ static u32 _rtl92e_ethtool_get_link(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - return ((priv->rtllib->link_state == RTLLIB_LINKED) || + return ((priv->rtllib->link_state == MAC80211_LINKED) || (priv->rtllib->link_state == RTLLIB_LINKED_SCANNING)); } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c index bb52a595f75c..5ecade840d75 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c @@ -118,7 +118,7 @@ void rtl92e_ips_enter(struct net_device *dev) rt_state = priv->rtllib->rf_power_state; if (rt_state == rf_on && !psc->bSwRfProcessing && - (priv->rtllib->link_state != RTLLIB_LINKED) && + (priv->rtllib->link_state != MAC80211_LINKED) && (priv->rtllib->iw_mode != IW_MODE_MASTER)) { psc->eInactivePowerState = rf_off; _rtl92e_ps_update_rf_state(dev); @@ -209,7 +209,7 @@ void rtl92e_leisure_ps_enter(struct net_device *dev) &priv->rtllib->pwr_save_ctrl; if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) && - (priv->rtllib->link_state == RTLLIB_LINKED)) + (priv->rtllib->link_state == MAC80211_LINKED)) || (priv->rtllib->iw_mode == IW_MODE_ADHOC) || (priv->rtllib->iw_mode == IW_MODE_MASTER)) return; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index 2d99badfb224..4436442b56dd 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -169,7 +169,7 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev, priv->ps_force = false; psc->bLeisurePs = true; } else { - if (priv->rtllib->link_state == RTLLIB_LINKED) + if (priv->rtllib->link_state == MAC80211_LINKED) rtl92e_leisure_ps_leave(dev); priv->ps_force = true; @@ -378,7 +378,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, if ((ieee->link_state >= RTLLIB_ASSOCIATING) && (ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED)) return 0; - if ((priv->rtllib->link_state == RTLLIB_LINKED) && + if ((priv->rtllib->link_state == MAC80211_LINKED) && (priv->rtllib->CntAfterLink < 2)) return 0; } @@ -409,7 +409,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, priv->rtllib->FirstIe_InScan = true; - if (priv->rtllib->link_state != RTLLIB_LINKED) { + if (priv->rtllib->link_state != MAC80211_LINKED) { if (rt_state == rf_off) { if (priv->rtllib->rf_off_reason > RF_CHANGE_BY_IPS) { @@ -1124,7 +1124,7 @@ static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev) int tmp_qual = 0; int tmp_noise = 0; - if (ieee->link_state < RTLLIB_LINKED) { + if (ieee->link_state < MAC80211_LINKED) { wstats->qual.qual = 10; wstats->qual.level = 0; wstats->qual.noise = 0x100 - 100; /* -100 dBm */ diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 68f0e1426b35..7758bfd90283 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1146,7 +1146,7 @@ enum rtl_link_state { /* the link is ok. the card associated to a BSS or linked * to a ibss cell or acting as an AP and creating the bss */ - RTLLIB_LINKED, + MAC80211_LINKED, /* same as LINKED, but the driver shall apply RX filter * rules as we are in NO_LINK mode. As the card is still diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 68f1393b1b63..78d13ff1f14e 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1196,7 +1196,7 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast, u8 nr_subframes) { if (unicast) { - if (ieee->link_state == RTLLIB_LINKED) { + if (ieee->link_state == MAC80211_LINKED) { if (((ieee->link_detect_info.NumRxUnicastOkInPeriod + ieee->link_detect_info.NumTxOkInPeriod) > 8) || (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) { @@ -2117,7 +2117,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, network->tim.tim_period = info_element->data[1]; network->dtim_period = info_element->data[1]; - if (ieee->link_state != RTLLIB_LINKED) + if (ieee->link_state != MAC80211_LINKED) break; network->last_dtim_sta_time = jiffies; @@ -2585,7 +2585,7 @@ static inline void rtllib_process_probe_response( ieee->current_network.buseprotection = false; } if (is_beacon(frame_ctl)) { - if (ieee->link_state >= RTLLIB_LINKED) + if (ieee->link_state >= MAC80211_LINKED) ieee->link_detect_info.NumRecvBcnInPeriod++; } } @@ -2654,7 +2654,7 @@ static inline void rtllib_process_probe_response( if (is_beacon(frame_ctl) && is_same_network(&ieee->current_network, network, (network->ssid_len ? 1 : 0)) && - (ieee->link_state == RTLLIB_LINKED)) { + (ieee->link_state == MAC80211_LINKED)) { ieee->handle_beacon(ieee->dev, beacon, &ieee->current_network); } free_network: @@ -2683,7 +2683,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee, if (ieee->sta_sleep || (ieee->ps != RTLLIB_PS_DISABLED && ieee->iw_mode == IW_MODE_INFRA && - ieee->link_state == RTLLIB_LINKED)) + ieee->link_state == MAC80211_LINKED)) schedule_work(&ieee->ps_task); break; @@ -2700,7 +2700,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee, if ((ieee->softmac_features & IEEE_SOFTMAC_PROBERS) && ((ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER) && - ieee->link_state == RTLLIB_LINKED)) + ieee->link_state == MAC80211_LINKED)) rtllib_rx_probe_rq(ieee, skb); break; } diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index bbb0f61c851d..d99b98a39cc7 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -510,7 +510,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) * new one. In this case the link state is * MAC80211_NOLINK until we found an interesting cell. * If so the ieee8021_new_net, called by the RX path - * will set the state to RTLLIB_LINKED, so we stop + * will set the state to MAC80211_LINKED, so we stop * scanning * 2- We are linked and the root uses run iwlist scan. * So we switch to RTLLIB_LINKED_SCANNING to remember @@ -522,7 +522,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) * if the state become LINKED because of the #1 situation */ - if (ieee->link_state == RTLLIB_LINKED) + if (ieee->link_state == MAC80211_LINKED) goto out; if (ieee->sync_scan_hurryup) { netdev_info(ieee->dev, @@ -543,7 +543,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) ieee->actscanning = false; ieee->sync_scan_hurryup = 0; - if (ieee->link_state >= RTLLIB_LINKED) { + if (ieee->link_state >= MAC80211_LINKED) { if (IS_DOT11D_ENABLE(ieee)) dot11d_scan_complete(ieee); } @@ -1508,7 +1508,7 @@ static void rtllib_associate_complete(struct rtllib_device *ieee) { del_timer_sync(&ieee->associate_timer); - ieee->link_state = RTLLIB_LINKED; + ieee->link_state = MAC80211_LINKED; rtllib_sta_send_associnfo(ieee); schedule_work(&ieee->associate_complete_wq); @@ -1664,7 +1664,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, "Using B rates\n"); } memset(ieee->dot11ht_oper_rate_set, 0, 16); - ieee->link_state = RTLLIB_LINKED; + ieee->link_state = MAC80211_LINKED; } } } @@ -1985,7 +1985,7 @@ static inline void rtllib_sta_ps(struct work_struct *work) if ((ieee->ps == RTLLIB_PS_DISABLED || ieee->iw_mode != IW_MODE_INFRA || - ieee->link_state != RTLLIB_LINKED)) { + ieee->link_state != MAC80211_LINKED)) { spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); rtllib_sta_wakeup(ieee, 1); @@ -2149,7 +2149,7 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, if (!network) return 1; - ieee->link_state = RTLLIB_LINKED; + ieee->link_state = MAC80211_LINKED; ieee->assoc_id = aid; ieee->softmac_stats.rx_ass_ok++; /* station support qos */ @@ -2283,7 +2283,7 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb) * both for disassociation and deauthentication */ if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) && - ieee->link_state == RTLLIB_LINKED && + ieee->link_state == MAC80211_LINKED && (ieee->iw_mode == IW_MODE_INFRA)) { frame_ctl = le16_to_cpu(header->frame_ctl); netdev_info(ieee->dev, @@ -2458,7 +2458,7 @@ static void rtllib_start_master_bss(struct rtllib_device *ieee) ether_addr_copy(ieee->current_network.bssid, ieee->dev->dev_addr); ieee->set_chan(ieee->dev, ieee->current_network.channel); - ieee->link_state = RTLLIB_LINKED; + ieee->link_state = MAC80211_LINKED; ieee->link_change(ieee->dev); notify_wx_assoc_event(ieee); netif_carrier_on(ieee->dev); @@ -2509,7 +2509,7 @@ static void rtllib_start_ibss_wq(void *data) * (in bss mode we had to make sure no-one tried to associate when * we had just checked the ieee->link_state and we was going to start the * scan) because in ibss mode the rtllib_new_net function, when - * finds a good net, just set the ieee->link_state to RTLLIB_LINKED, + * finds a good net, just set the ieee->link_state to MAC80211_LINKED, * so, at worst, we waste a bit of time to initiate an unneeded syncro * scan, that will stop at the first round because it sees the state * associated. @@ -2581,7 +2581,7 @@ static void rtllib_start_ibss_wq(void *data) ieee->SetHwRegHandler(ieee->dev, HW_VAR_MEDIA_STATUS, (u8 *)(&ieee->link_state)); - ieee->link_state = RTLLIB_LINKED; + ieee->link_state = MAC80211_LINKED; ieee->link_change(ieee->dev); HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); @@ -2765,7 +2765,7 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown) if (ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED) ieee->link_state = MAC80211_NOLINK; - if (ieee->link_state == RTLLIB_LINKED) { + if (ieee->link_state == MAC80211_LINKED) { if (ieee->iw_mode == IW_MODE_INFRA) SendDisassociation(ieee, 1, WLAN_REASON_DEAUTH_LEAVING); rtllib_disassociate(ieee); @@ -3100,7 +3100,7 @@ bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn) if (rtllib->ps != RTLLIB_PS_DISABLED) rtllib->sta_wake_up(rtllib->dev); - if (rtllib->link_state == RTLLIB_LINKED) { + if (rtllib->link_state == MAC80211_LINKED) { if (rtllib->iw_mode == IW_MODE_ADHOC) rtllib_MgntDisconnectIBSS(rtllib); if (rtllib->iw_mode == IW_MODE_INFRA) @@ -3119,7 +3119,7 @@ void notify_wx_assoc_event(struct rtllib_device *ieee) return; wrqu.ap_addr.sa_family = ARPHRD_ETHER; - if (ieee->link_state == RTLLIB_LINKED) + if (ieee->link_state == MAC80211_LINKED) memcpy(wrqu.ap_addr.sa_data, ieee->current_network.bssid, ETH_ALEN); else { diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index 8e101b63ec75..c1d1bf4d720a 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -53,7 +53,7 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a, if (ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER) - if (ieee->link_state == RTLLIB_LINKED) { + if (ieee->link_state == MAC80211_LINKED) { rtllib_stop_send_beacons(ieee); rtllib_start_send_beacons(ieee); } @@ -95,7 +95,7 @@ int rtllib_wx_get_wap(struct rtllib_device *ieee, /* We want avoid to give to the user inconsistent infos*/ spin_lock_irqsave(&ieee->lock, flags); - if (ieee->link_state != RTLLIB_LINKED && + if (ieee->link_state != MAC80211_LINKED && ieee->link_state != RTLLIB_LINKED_SCANNING && ieee->wap_set == 0) @@ -184,7 +184,7 @@ int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a, goto out; } - if (ieee->link_state != RTLLIB_LINKED && + if (ieee->link_state != MAC80211_LINKED && ieee->link_state != RTLLIB_LINKED_SCANNING && ieee->ssid_set == 0) { ret = -1; @@ -355,7 +355,7 @@ void rtllib_wx_sync_scan_wq(void *data) ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_RESTORE); - ieee->link_state = RTLLIB_LINKED; + ieee->link_state = MAC80211_LINKED; ieee->link_change(ieee->dev); /* Notify AP that I wake up again */ @@ -385,7 +385,7 @@ int rtllib_wx_set_scan(struct rtllib_device *ieee, struct iw_request_info *a, goto out; } - if (ieee->link_state == RTLLIB_LINKED) { + if (ieee->link_state == MAC80211_LINKED) { schedule_work(&ieee->wx_sync_scan_wq); /* intentionally forget to up sem */ return 0; diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index a82fd64dbdce..538cedb1dc02 100644 --- a/drivers/staging/rtl8192e/rtllib_wx.c +++ b/drivers/staging/rtl8192e/rtllib_wx.c @@ -619,7 +619,7 @@ int rtllib_wx_set_mlme(struct rtllib_device *ieee, bool deauth = false; struct iw_mlme *mlme = (struct iw_mlme *)extra; - if (ieee->link_state != RTLLIB_LINKED) + if (ieee->link_state != MAC80211_LINKED) return -ENOLINK; mutex_lock(&ieee->wx_mutex); From patchwork Sat Jun 17 13:57:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 109506 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2006476vqr; Sat, 17 Jun 2023 07:25:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6iEKgWWFPfV4kWgfeK8jxsGzPLPgWS0GNc+emBOrZmE+c+TV//afqQtlVrS4gaMW3wp3XB X-Received: by 2002:a17:90b:3cc:b0:25e:b055:220c with SMTP id go12-20020a17090b03cc00b0025eb055220cmr2924052pjb.33.1687011941315; Sat, 17 Jun 2023 07:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687011941; cv=none; d=google.com; s=arc-20160816; b=0e36MMFu/IriiMR17zCdvjJfkjq5Q0rAxPzS6gIS0Z0Wh2B24ZhIsHJsdCPzVEk5VX TgTNoq0940/IjeuAC7nKX9izmsziQCsPkeJQgI6pP5B3DBFu6ZKUURZ5lvq37xTNi79e 0Vqt/Z+TKb/b+awHEtqelz7/GfGnkK+iBH/l3wpvVednOHw9/NYJAhV0Ml1l8+7zw8nq p6ywnv4mpWxNtB5Jrnt/nNzvxQZ6BbLVAsPfUCGbGxch3TTuGk7VAdLLhjYJ0f+46Atl tNomZeF2hI5YmnSJ/0x7isYfDK495NxlWrSqh7yBnYEZANDQwa6gPEkiTvsoDuoeXWwS hIxA== 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=4r2Rtc1JlVK6mjrCqEQPoG1o3UJwlNrd+dUsSDnAhaQ=; b=Hnkgic7JNMBvz7ToG810gJwUVI0IE+z73PCsfgahMC/RII74QQgKVPFMPbmJZUyDye fvqzo9GdW994dhkknY0Vs9VKTmX6nNZAmPWDvMblxzlpTV165UET4MIQoUs2b9Sx1w+E 65t3TgzHjhbtrcQJluOnF1Olf9Un6xbDjQH6TisOC5ECvYVAK6AsnDhzrTAdQ4Uazg7Z rMNFJTxzZuEGjtFc2XOJ5HPxxPsTPdAmNwFBd6A2cUOjdx47MyHyNzwKcj2X8gBq928M 1X9GqEInFlnvFn2rfEzHaZV/NmHQXvg9RigkzfpZTD/JM8zY0f1II/uelhhopZsvhtOF 1msw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=OFCUBOB3; 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 s15-20020a17090ad48f00b0024e0eec665fsi3903035pju.73.2023.06.17.07.25.29; Sat, 17 Jun 2023 07:25:41 -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=OFCUBOB3; 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 S1345967AbjFQN6U (ORCPT + 99 others); Sat, 17 Jun 2023 09:58:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346279AbjFQN6O (ORCPT ); Sat, 17 Jun 2023 09:58:14 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D04630F1 for ; Sat, 17 Jun 2023 06:57:40 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-50d897af77bso402847a12.1 for ; Sat, 17 Jun 2023 06:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687010259; x=1689602259; 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=4r2Rtc1JlVK6mjrCqEQPoG1o3UJwlNrd+dUsSDnAhaQ=; b=OFCUBOB3tK8YMrZMCEcFDUX4/K/2+8MBIzkNowyo5rwwGwogE00yabvNwhldZXFld7 78d8PJrJZsbgA2s6gHcDaFbpWNKmFtFzONEqrN+NFbeSahi044PZjCsR5wdTo2P/41ob gO7W0Htt9aLTtaQFbf+QnXwxjf+GMoBiGiK8Ra1So3t2/CzWjzAV7Dx5b7EyAQuVGKjS G4vzHl5k0WMCQABZKJAUpMmaaqL6HJvuO0vUVZw8KVMVhIZJJlqVDeq75KFzyV0WHymN 3e3x8lIq/irH2blBobdLpMAlaH/XSTkn4XEgigdsYyO3sFt4jYYM1QnUCg7nqZPIkSD7 Ru/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687010259; x=1689602259; 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=4r2Rtc1JlVK6mjrCqEQPoG1o3UJwlNrd+dUsSDnAhaQ=; b=SJwNvNTu6wrPlRkXvc0Wnyr52QBFu3BRTjzkHMjtyJr9qIp1qMAMYJB2WlnCVPxIrn TREWozZRQXyiM79AQxNWixl8wNQbH+mtxwJLOiDCwa8jb5OBSBn6or3Ht66j4DB6F0yH dotYI8RqnIarRqz5yVO8EaJrqHJxPXQ5rD+UDnAlfPcMn/d1EoMAQ7EK3c7R0Rc3McdC b+0gvnqY6NN5ipkxImr9zyicAXxBkK7JScrzecnIOiWV8tgOHxyFEEBNKfNK5fhCGku1 gRF/t+T5kXhpJiwbde80baUsuMAMvzEXCRsm9hDfyHrZ+4HBaL1wnx48Gdv4i9FR2Q5z 5Ymw== X-Gm-Message-State: AC+VfDxeuVF4i0zoqA7bBqjtTM6kBS740EotsU1OTrAB9cL2DrVnnyFL Du/nNZx16xUMTk91rxtqT0I= X-Received: by 2002:a17:906:244:b0:982:caf8:7358 with SMTP id 4-20020a170906024400b00982caf87358mr3996330ejl.5.1687010258783; Sat, 17 Jun 2023 06:57:38 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id la4-20020a170906ad8400b00984822540c9sm2411486ejb.96.2023.06.17.06.57.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 06:57:38 -0700 (PDT) Date: Sat, 17 Jun 2023 15:57:36 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 9/9] staging: rtl8192e: Rename RTLLIB_LINKED_SCANNING Message-ID: <25b97cd436c636e750c50f0c03386fcc46e56610.1687007788.git.philipp.g.hortmann@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?1768960233144909390?= X-GMAIL-MSGID: =?utf-8?q?1768960233144909390?= Rename RTLLIB_LINKED_SCANNING to MAC80211_LINKED_SCANNING to align with rtlwifi driver. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_softmac.c | 2 +- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c index 1625d1326599..fab8932e67da 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c @@ -28,7 +28,7 @@ static u32 _rtl92e_ethtool_get_link(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); return ((priv->rtllib->link_state == MAC80211_LINKED) || - (priv->rtllib->link_state == RTLLIB_LINKED_SCANNING)); + (priv->rtllib->link_state == MAC80211_LINKED_SCANNING)); } const struct ethtool_ops rtl819x_ethtool_ops = { diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 7758bfd90283..cdd167de127f 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1153,7 +1153,7 @@ enum rtl_link_state { * logically linked, but it is doing a syncro site survey * then it will be back to LINKED state. */ - RTLLIB_LINKED_SCANNING, + MAC80211_LINKED_SCANNING, }; #define DEFAULT_MAX_SCAN_AGE (15 * HZ) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index d99b98a39cc7..7494c7e6fff6 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -513,7 +513,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) * will set the state to MAC80211_LINKED, so we stop * scanning * 2- We are linked and the root uses run iwlist scan. - * So we switch to RTLLIB_LINKED_SCANNING to remember + * So we switch to MAC80211_LINKED_SCANNING to remember * that we are still logically linked (not interested in * new network events, despite for updating the net list, * but we are temporarly 'unlinked' as the driver shall diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index c1d1bf4d720a..be82f0a655e8 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -96,7 +96,7 @@ int rtllib_wx_get_wap(struct rtllib_device *ieee, spin_lock_irqsave(&ieee->lock, flags); if (ieee->link_state != MAC80211_LINKED && - ieee->link_state != RTLLIB_LINKED_SCANNING && + ieee->link_state != MAC80211_LINKED_SCANNING && ieee->wap_set == 0) eth_zero_addr(wrqu->ap_addr.sa_data); @@ -185,7 +185,7 @@ int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a, } if (ieee->link_state != MAC80211_LINKED && - ieee->link_state != RTLLIB_LINKED_SCANNING && + ieee->link_state != MAC80211_LINKED_SCANNING && ieee->ssid_set == 0) { ret = -1; goto out; @@ -323,7 +323,7 @@ void rtllib_wx_sync_scan_wq(void *data) rtllib_stop_all_queues(ieee); rtllib_stop_send_beacons(ieee); - ieee->link_state = RTLLIB_LINKED_SCANNING; + ieee->link_state = MAC80211_LINKED_SCANNING; ieee->link_change(ieee->dev); /* wait for ps packet to be kicked out successfully */ msleep(50);