From patchwork Tue Nov 28 20:43: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: 170959 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp4214324vqx; Tue, 28 Nov 2023 12:43:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJSJtSkAORFVTV5WUM44KUg4eDy9IydKWSjOSkYB830NNACY3zbPweknImeMtBayQHa2vH X-Received: by 2002:a17:903:32cd:b0:1cf:b43f:a0c5 with SMTP id i13-20020a17090332cd00b001cfb43fa0c5mr12904281plr.54.1701204220178; Tue, 28 Nov 2023 12:43:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701204220; cv=none; d=google.com; s=arc-20160816; b=UZSMpspif/DmFL232x0mwadimiHBAVd+OW9LVrIDTgUtUjkDmITuR0Xo+5zkkiE77B GAwyJ+jEaWADR/685moLWq+mcJu5eV6vVyuLneUalY0ZLJ60KNaqxwN1+MVPVFq0NREL 0jyCjlWGX6uWUQ9O4n0cmBYAV5j4lMsmQi9Sl9nzAfWBFBHO5Sgn5wnPboj1A3D8Gug9 qydbL0+S46M5p0CbLrqwlgHU85sFR+/kknOTnYtPuqjtodtCfBsEuhJHX3lvt9v4F5tF 9C6qk8IMI22QeYKEnESCnmxOUqU/iwrAkc0G7p+W/oV0uK0Uv5nVTGMf93IPdo5QxCBL tqHw== 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=njp3hQuRezyJWSCVkGDJUsCKh4qNw0wNTvM+MC2XVcU=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=siMXYPOt5HCkZp7n+aAJvYTIQ7nOZz4YwgAmWcOK+ikn0UvrcrNgEi7/1qKp3XVhdj u/SDS12yLVa34zbhO5xrybamcLrOTSChyQ09SURkyePur51IThWgA0RnAu2RhmlZlGdn hlYuEe1e4DOGbw+/XgUdvTJKAUDZ4rmYuULtv3Od9Lrbn3RYXHiFJ2NJPCies2WVx+1B O09t2w5lwQdXIdQZcuaDtRfCsmio3qdYZ8hOT63uGjJbOIAJGmz5BsNqXuhSvj9l7l7p CpbcKlp+avIwQx1FZldKwK3bNDqOD+fWGX14Mlmv6jg3VQHNAr/BZ4kgLEaa8x4P732c 518Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CER2TLMb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id jb6-20020a170903258600b001cc41020674si2364056plb.518.2023.11.28.12.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 12:43:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CER2TLMb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 29BC880AE82C; Tue, 28 Nov 2023 12:43:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230115AbjK1UnW (ORCPT + 99 others); Tue, 28 Nov 2023 15:43:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbjK1UnU (ORCPT ); Tue, 28 Nov 2023 15:43:20 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D18819AC for ; Tue, 28 Nov 2023 12:43:26 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40b2a628c25so4631715e9.1 for ; Tue, 28 Nov 2023 12:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701204205; x=1701809005; darn=vger.kernel.org; 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=njp3hQuRezyJWSCVkGDJUsCKh4qNw0wNTvM+MC2XVcU=; b=CER2TLMbqP22diyDiifFbryA9wgYE0s5fF7U7j535TfYFnCtNJY3AApvJHU4hd8DW0 T9s0ygaCINSXnjzw/EE2x2ls5OepVIreHlX1L8W6mMTgxzIUI05p/gR/rlx/wX0zfajY 9cqSnirrAok6uuwG6DiJxyhcE9O70gGyC9jWeU+La557/kTPqXteD+BL9fuK5zaWFTZP 5Qb9lG+Ea/zYKIiWEd5Qq/EF9A0Ej2OCwSEIkxGlGFtIMIiTg2qlatwGazi5BG5GuUhk 3jhP4JOUB/MTT7dy7AvdKAjauzbbXLl5kpd9hItKnnP6q/LU1O665dfFVEV5p9Sd3vEl RpMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701204205; x=1701809005; 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=njp3hQuRezyJWSCVkGDJUsCKh4qNw0wNTvM+MC2XVcU=; b=XiD5GFgZyJySQu746LnySd0QeQ1JsEnCQXJ9KSH6k6Xk/CRvH+lPKTvx5GhHvrZD9b COyiCA9L0jZPMJIFktn2QfqIEsSjTyitT7kT6xgJr1kMwF1j/ASBSqnFWOBOSBw/ecb/ 8wZBX0dQXdRu0d90oUZOWRx/3d963GBsAqvBOkfqWcAkaETYQ8NuHNEPtlVszpcaaWl/ Dqhg4fvWZ3azGrLCJikqfatRJ9J4FJzG6ssDVIlK1gKE87Bp0TllquTIJ+Ano83ksd/1 WVkAcZVzoiECY6EZPADhDc8Eh31PdDyGgk51TWrhCMFpp6UsDBmAOP8xbX2wFhYTFCcH W6mQ== X-Gm-Message-State: AOJu0Yy8TLwrh5ZoQR4my3r5nOGAad767NdKLEklC2PdJyYu+bmHKUcr GGIlpuRUhd9OL3CNF4xE/s0= X-Received: by 2002:a05:600c:1d06:b0:40b:5150:c046 with SMTP id l6-20020a05600c1d0600b0040b5150c046mr404729wms.3.1701204204641; Tue, 28 Nov 2023 12:43:24 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p54a07fa0.dip0.t-ipconnect.de. [84.160.127.160]) by smtp.gmail.com with ESMTPSA id t6-20020a05600c450600b0040b379e8526sm12609152wmo.25.2023.11.28.12.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 12:43:24 -0800 (PST) Date: Tue, 28 Nov 2023 21:43:23 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] staging: rtl8192e: Remove unused function rtllib_rx_ADDBAReq() Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 28 Nov 2023 12:43:37 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783841916102005301 X-GMAIL-MSGID: 1783841916102005301 Remove unused function rtllib_rx_ADDBAReq(). Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl819x_BAProc.c | 89 ----------------------- drivers/staging/rtl8192e/rtllib.h | 1 - 2 files changed, 90 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c index 58a950ef77ce..7e4aeb10a2db 100644 --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c @@ -211,95 +211,6 @@ static void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst, netdev_dbg(ieee->dev, "Failed to generate DELBA packet.\n"); } -int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb) -{ - struct ieee80211_hdr_3addr *req = NULL; - u16 rc = 0; - u8 *dst = NULL, *dialog_token = NULL, *tag = NULL; - struct ba_record *ba = NULL; - union ba_param_set *ba_param_set = NULL; - u16 *ba_timeout_value = NULL; - union sequence_control *pBaStartSeqCtrl = NULL; - struct rx_ts_record *ts = NULL; - - if (skb->len < sizeof(struct ieee80211_hdr_3addr) + 9) { - netdev_warn(ieee->dev, "Invalid skb len in BAREQ(%d / %d)\n", - (int)skb->len, - (int)(sizeof(struct ieee80211_hdr_3addr) + 9)); - return -1; - } - -#ifdef VERBOSE_DEBUG - print_hex_dump_bytes("%s: ", DUMP_PREFIX_NONE, __func__, - skb->data, skb->len); -#endif - - req = (struct ieee80211_hdr_3addr *)skb->data; - tag = (u8 *)req; - dst = (u8 *)(&req->addr2[0]); - tag += sizeof(struct ieee80211_hdr_3addr); - dialog_token = tag + 2; - ba_param_set = (union ba_param_set *)(tag + 3); - ba_timeout_value = (u16 *)(tag + 5); - pBaStartSeqCtrl = (union sequence_control *)(req + 7); - - if (!ieee->current_network.qos_data.active || - !ieee->ht_info->current_ht_support || - (ieee->ht_info->iot_action & HT_IOT_ACT_REJECT_ADDBA_REQ)) { - rc = ADDBA_STATUS_REFUSED; - netdev_warn(ieee->dev, - "Failed to reply on ADDBA_REQ as some capability is not ready(%d, %d)\n", - ieee->current_network.qos_data.active, - ieee->ht_info->current_ht_support); - goto OnADDBAReq_Fail; - } - if (!rtllib_get_ts(ieee, (struct ts_common_info **)&ts, dst, - (u8)(ba_param_set->field.tid), RX_DIR, true)) { - rc = ADDBA_STATUS_REFUSED; - netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__); - goto OnADDBAReq_Fail; - } - ba = &ts->rx_admitted_ba_record; - - if (ba_param_set->field.ba_policy == BA_POLICY_DELAYED) { - rc = ADDBA_STATUS_INVALID_PARAM; - netdev_warn(ieee->dev, "%s(): BA Policy is not correct\n", - __func__); - goto OnADDBAReq_Fail; - } - - rtllib_FlushRxTsPendingPkts(ieee, ts); - - deactivate_ba_entry(ieee, ba); - ba->dialog_token = *dialog_token; - ba->ba_param_set = *ba_param_set; - ba->ba_timeout_value = *ba_timeout_value; - ba->ba_start_seq_ctrl = *pBaStartSeqCtrl; - - if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) || - (ieee->ht_info->iot_action & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT)) - ba->ba_param_set.field.buffer_size = 1; - else - ba->ba_param_set.field.buffer_size = 32; - - activate_ba_entry(ba, 0); - rtllib_send_ADDBARsp(ieee, dst, ba, ADDBA_STATUS_SUCCESS); - - return 0; - -OnADDBAReq_Fail: - { - struct ba_record BA; - - BA.ba_param_set = *ba_param_set; - BA.ba_timeout_value = *ba_timeout_value; - BA.dialog_token = *dialog_token; - BA.ba_param_set.field.ba_policy = BA_POLICY_IMMEDIATE; - rtllib_send_ADDBARsp(ieee, dst, &BA, rc); - return 0; - } -} - int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb) { struct ieee80211_hdr_3addr *rsp = NULL; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 0a8c44e497f5..44a937953db8 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1776,7 +1776,6 @@ u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame); void HTResetIOTSetting(struct rt_hi_throughput *ht_info); bool is_ht_half_nmode_aps(struct rtllib_device *ieee); u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate); -int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb); int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb); int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb); void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *ts,