From patchwork Fri Sep 22 13:29:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 143562 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5768346vqi; Fri, 22 Sep 2023 10:58:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHdQWPGPNuVtksewCxatbzDSOlBXR4SfPo17K1JR7Pg0r3SZbXX5VwXKxIZJSfht8chxtIB X-Received: by 2002:a05:6a20:3cac:b0:14c:628b:4b98 with SMTP id b44-20020a056a203cac00b0014c628b4b98mr331365pzj.4.1695405528613; Fri, 22 Sep 2023 10:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695405528; cv=none; d=google.com; s=arc-20160816; b=DqWDfbcmk908i6KHt89FKlq52uurf+FDQ0+/IjFdSSVRZ2XXG4Y8cUp+BMS3nw9UB2 S8fYA49zzJAKGZnIkOxaLZCuGPw/1pFTuaFhxCr5uYkVRDVUyiXXRgsHFyV6Nf+1MRkn Ba1zu21z6qpF1l2eYuAKIzGzF1zPpDDM0LJWk6HDXimnAI6BBwcha3YKJePmeRFP5mSY 9NJgVGvuj1QoIFUjuyJU5wkIihNMOvczBWUZ0Pe+wyNjfHrhxzyI7jmI85/WpGymxt4u Dz6dwGQ9IpwIIxupwyV43FpVbVSfXpe5U2aOYDREnWVHNBkKUKu/xfsAJTr3ywo3niTN AW8Q== 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=HvA1NhHU9wJadRFvynpx4VWVmQWw3BozI/MwraHbSoM=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=SBVkzSVlbzXhQ81YBIWhsaHgO22F+NOAJ+rqDeJggDbu1QbdYFWmn9u1YWXaYoUZme 7MLbZBSEoP6C3J4lLXzN4nNckiVhsJPbEMLV4ng3LbpoMqd2Uho/VElVxVQcsBm5lWKp FGth4H5yqVP2iOF0FFEAbibXaBo/mECa1anfpXy1JZ5zku4WcgzsnJ0Mz3J3HcPpB0Ds ifPlWIliYhqmHd5pNYPD6kzcwPauJOIjt13TnRuCPRTWNllI1KqpTgSWyxGljrfMaLdq PhAoegpcprLVP8jMN0FjdWzN4YFCag/08UgOItGS6U0Y5E+J/xU3aGxDdVeVVK3ES+O1 egLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EJX4TusE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w4-20020a634744000000b005781e99d048si4156274pgk.889.2023.09.22.10.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 10:58:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EJX4TusE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 8131D804704E; Fri, 22 Sep 2023 06:29:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234037AbjIVN3n (ORCPT + 29 others); Fri, 22 Sep 2023 09:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234068AbjIVN3j (ORCPT ); Fri, 22 Sep 2023 09:29:39 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DFBC198 for ; Fri, 22 Sep 2023 06:29:32 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4053e6e8ca7so2047965e9.1 for ; Fri, 22 Sep 2023 06:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695389371; x=1695994171; 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=HvA1NhHU9wJadRFvynpx4VWVmQWw3BozI/MwraHbSoM=; b=EJX4TusEf5RigbrqseBFyHa1D3bfTmHVz8YXXHtccuFJq1iQbgt/E2mOQ5NYCWdSMa 7Enj9UHtW0asdsb7E22d5ccwWelhZTJH3JaE1PJaJolNzYZASwX2htwAZG2+6AIJiAHc H4T5DB/sHIzWz6qT9zvir2KPbeH3QQ1J48n2W5Qzz+zdAUZ6GKRq3E8cuWpEfdeg6Hrm rfQU9EBZVTSFPFDogPe9T23IqoPsX8S+KrR6GzIaPcxiT84OyGs7VCaitTaHfmU3qOFz Cn9dkuyOU8npPKTFe4mmxRKGsHzPvGU7Xkavu+YWD46MsMDXWG63Fmfd9jP6X9KqzULG xhkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695389371; x=1695994171; 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=HvA1NhHU9wJadRFvynpx4VWVmQWw3BozI/MwraHbSoM=; b=o8EuKWImVjmwM9xkUaPEwjYVefEjUgmRgZc0s3R1KXQ4l8C5FwHWJXLBP5PY0PJQup UJZ/vrT0fcx+qEDrSUeUOzDA/mVH/aJ5uPOoa0+5MsdP97AWL8yfuLcC0p9nTTaFCGRU 4WHl4GOASgIRxUXY06vkmnzNPLO6LZkcMgvqqBdTEpPR1tjpeq5YL6i1btiyUbcWUAlr SqWZPocCcLuROLbgMoYlvLT7IsrW5DLRmYY48vCPX60VWNJJrLyAo9q3I4y2lv3pjweY Se6EHK4Z0PGf/y0KDUKKVNAmEOdDuCfJ7q4ORXBRoGeONi5ZAK4uvy7zScjQnhtcwp9u 6uEg== X-Gm-Message-State: AOJu0Yw6WMkKmXNfW+akAsTq4AT1wpUykvdJDrvjn+iXmIFSG7q8oqBR dLf5c8jfVswojXKgO+ZS7jw= X-Received: by 2002:a05:600c:cc8:b0:401:c07f:72bd with SMTP id fk8-20020a05600c0cc800b00401c07f72bdmr7905417wmb.4.1695389370547; Fri, 22 Sep 2023 06:29:30 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id ay2-20020a05600c1e0200b003feea62440bsm1161020wmb.43.2023.09.22.06.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:29:30 -0700 (PDT) Date: Fri, 22 Sep 2023 15:29:28 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_rx.c Message-ID: <5400c68e17b86b1170ac997fae3fe1fb09220af8.1695387832.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_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 06:29:59 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777761547765181209 X-GMAIL-MSGID: 1777761547765181209 Remove unsupported mode IW_MODE_ADHOC from rtllib_rx.c and all related functions and structs. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtllib.h | 9 ---- drivers/staging/rtl8192e/rtllib_rx.c | 38 ------------- drivers/staging/rtl8192e/rtllib_softmac.c | 65 ----------------------- 3 files changed, 112 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 2a2eec192198..7dde428313c9 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -466,13 +466,6 @@ enum _REG_PREAMBLE_MODE { /* this is stolen from ipw2200 driver */ #define IEEE_IBSS_MAC_HASH_SIZE 31 -struct ieee_ibss_seq { - u8 mac[ETH_ALEN]; - u16 seq_num[17]; - u16 frag_num[17]; - unsigned long packet_time[17]; - struct list_head list; -}; /* NOTE: This data is for statistical purposes; not all hardware provides this * information for frames received. Not setting these will not cause @@ -1676,8 +1669,6 @@ void rtllib_txb_free(struct rtllib_txb *txb); /* rtllib_rx.c */ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, struct rtllib_rx_stats *rx_stats); -void rtllib_rx_probe_rq(struct rtllib_device *ieee, - struct sk_buff *skb); int rtllib_legal_channel(struct rtllib_device *rtllib, u8 channel); /* rtllib_wx.c */ diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index cba460c46285..456dd05e291d 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -375,37 +375,6 @@ static int is_duplicate_packet(struct rtllib_device *ieee, } switch (ieee->iw_mode) { - case IW_MODE_ADHOC: - { - struct list_head *p; - struct ieee_ibss_seq *entry = NULL; - u8 *mac = header->addr2; - int index = mac[5] % IEEE_IBSS_MAC_HASH_SIZE; - - list_for_each(p, &ieee->ibss_mac_hash[index]) { - entry = list_entry(p, struct ieee_ibss_seq, list); - if (!memcmp(entry->mac, mac, ETH_ALEN)) - break; - } - if (p == &ieee->ibss_mac_hash[index]) { - entry = kmalloc(sizeof(struct ieee_ibss_seq), - GFP_ATOMIC); - if (!entry) - return 0; - - ether_addr_copy(entry->mac, mac); - entry->seq_num[tid] = seq; - entry->frag_num[tid] = frag; - entry->packet_time[tid] = jiffies; - list_add(&entry->list, &ieee->ibss_mac_hash[index]); - return 0; - } - last_seq = &entry->seq_num[tid]; - last_frag = &entry->frag_num[tid]; - last_time = &entry->packet_time[tid]; - break; - } - case IW_MODE_INFRA: last_seq = &ieee->last_rxseq_num[tid]; last_frag = &ieee->last_rxfrag_num[tid]; @@ -1487,7 +1456,6 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, } switch (ieee->iw_mode) { - case IW_MODE_ADHOC: case IW_MODE_INFRA: ret = rtllib_rx_InfraAdhoc(ieee, skb, rx_stats); break; @@ -2654,11 +2622,5 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee, netdev_dbg(ieee->dev, "received PROBE RESPONSE\n"); rtllib_process_probe_response(ieee, (struct rtllib_probe_response *)header, stats); - } else if (ieee80211_is_probe_req(header->frame_control)) { - netdev_dbg(ieee->dev, "received PROBE REQUEST\n"); - if ((ieee->softmac_features & IEEE_SOFTMAC_PROBERS) && - (ieee->iw_mode == IW_MODE_ADHOC && - ieee->link_state == MAC80211_LINKED)) - rtllib_rx_probe_rq(ieee, skb); } } diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 61afce587812..d8d9d59664ed 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -956,14 +956,6 @@ static struct sk_buff *rtllib_pspoll_func(struct rtllib_device *ieee) return skb; } -static void rtllib_resp_to_probe(struct rtllib_device *ieee, u8 *dest) -{ - struct sk_buff *buf = rtllib_probe_resp(ieee, dest); - - if (buf) - softmac_mgmt_xmit(buf, ieee); -} - static inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid) { int i = 0; @@ -1613,52 +1605,6 @@ static inline int auth_parse(struct net_device *dev, struct sk_buff *skb, return 0; } -static short probe_rq_parse(struct rtllib_device *ieee, struct sk_buff *skb, - u8 *src) -{ - u8 *tag; - u8 *skbend; - u8 *ssid = NULL; - u8 ssidlen = 0; - struct ieee80211_hdr_3addr *header = - (struct ieee80211_hdr_3addr *)skb->data; - bool bssid_match; - - if (skb->len < sizeof(struct ieee80211_hdr_3addr)) - return -1; /* corrupted */ - - bssid_match = - (!ether_addr_equal(header->addr3, ieee->current_network.bssid)) && - (!is_broadcast_ether_addr(header->addr3)); - if (bssid_match) - return -1; - - ether_addr_copy(src, header->addr2); - - skbend = (u8 *)skb->data + skb->len; - - tag = skb->data + sizeof(struct ieee80211_hdr_3addr); - - while (tag + 1 < skbend) { - if (*tag == 0) { - ssid = tag + 2; - ssidlen = *(tag + 1); - break; - } - tag++; /* point to the len field */ - tag = tag + *(tag); /* point to the last data byte of the tag */ - tag++; /* point to the next tag */ - } - - if (ssidlen == 0) - return 1; - - if (!ssid) - return 1; /* ssid not found in tagged param */ - - return !strncmp(ssid, ieee->current_network.ssid, ssidlen); -} - static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb, int *aid) { @@ -1688,17 +1634,6 @@ static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb, return le16_to_cpu(response_head->status); } -void rtllib_rx_probe_rq(struct rtllib_device *ieee, struct sk_buff *skb) -{ - u8 dest[ETH_ALEN]; - - ieee->softmac_stats.rx_probe_rq++; - if (probe_rq_parse(ieee, skb, dest) > 0) { - ieee->softmac_stats.tx_probe_rs++; - rtllib_resp_to_probe(ieee, dest); - } -} - void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee, short pwr) { struct sk_buff *buf = rtllib_null_func(ieee, pwr); From patchwork Fri Sep 22 13:29:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 143735 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:81b:b0:402:e146:ef86 with SMTP id fz27csp1821340vqb; Fri, 22 Sep 2023 17:10:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHo0V7OvFNj8SqnfEjqsvxvPsKVySoLDsfndHI/dTY2OM4HzwsLMmYhHIKKi26W83+eyMs X-Received: by 2002:a17:902:ce92:b0:1c5:be64:2c71 with SMTP id f18-20020a170902ce9200b001c5be642c71mr1236365plg.8.1695427810642; Fri, 22 Sep 2023 17:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695427810; cv=none; d=google.com; s=arc-20160816; b=SSnP2LvjjWBoemEvEZQZ49b79sUr6HuqrNYJ//hAYXuZmyJZgpyZVn4Q40Y0zJpGML MDXwmia2bV1QyPBetC8jw3YFowDEjQHfarwweClZRkq/o3XjVI6ru5msca0qjejJ9EI1 dkzbshxq39TMGW4oZflyIGR/jMMZsNTBLYbHRPdG+0FvzrEdur2z7ldfMYRJdUdtrtV+ D/8UZNhevUrAO8GbdJ4tGwL+QlgeIZ8JJkpCptzdDaRV8MOofxkfv83FCPr6Oytjn9k8 7M6uyu/oahV4iG4ZTAlOAO86zdvR/MSRhFilNQVuMgCwIvPVm2amvE2o4eljErm4z6IH V1Iw== 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=HcI62QI75qSosGu186RGvSHgdJGB0VnvRx/uN1ATU0o=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=cugHduddGfA6/42GIsYzu/Xvj0Yh4nr8i8O5kBMLEcIaJsBHpPMQth100kXs1lgfLf Uft0H2riGog9MT76j2GLu4D01dkydnyjAtCoV8aL1MflnXzO7KjT9L0rciuCkAYO9EN1 86GUEVWCzwIQ9B8azWkF/ZiZjU4HmCQzhk85MDXcxeRHYTzvL96lydfibRBDqiDCNXgB VJdRUERgALnvPK9Wc7kXzHA7qqXwAg2A0VuSOtl9IXnYsWlt6HC/zq7rPXirBy9ALDzv tNX1wzo/I88e+MnzzrmWgb6KjIzv+H75C7BbMYeOJWn8e/e1rXNJbaIuXFGS88Ro6AjE TS9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EhaTXkQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id kj3-20020a17090306c300b001c5c34172e8si4507601plb.281.2023.09.22.17.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 17:10:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EhaTXkQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 032418047043; Fri, 22 Sep 2023 06:30:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234140AbjIVNaJ (ORCPT + 29 others); Fri, 22 Sep 2023 09:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234108AbjIVNaA (ORCPT ); Fri, 22 Sep 2023 09:30:00 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 300161B6 for ; Fri, 22 Sep 2023 06:29:52 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3200b181b67so194901f8f.0 for ; Fri, 22 Sep 2023 06:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695389390; x=1695994190; 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=HcI62QI75qSosGu186RGvSHgdJGB0VnvRx/uN1ATU0o=; b=EhaTXkQ2i1PJLdBJJgMUFo2vEdw7hsuZ2EyIaQBtTAGvwyiN+KaOEqNNxJrLRSrcYc nUIx/HCyUAx8+AOtKJZIzar6VprdPUJbnBLd58Wt7v6xOOQ9zLXwGB2nSDaL6Vvu2ufn PtbETHtbIyQzFZaN585D6C3xvuztPU/tiwL510FIpIFhyGkdPnOeu7KOoGcaPDL4jMkI DQ0Ecf5RIg4ecveCxivwDvY4IP+i4sPvmnnmHfI/MCaCpv4CfJMtXtdCYr0eY9GqPGuF LBqkEMk/E1F1Ov/J4w2AJDg4mKPVw/x4kXNsmXBVOADP0raaUY0m9+WMUx8wKhJgM7aO Uulw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695389390; x=1695994190; 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=HcI62QI75qSosGu186RGvSHgdJGB0VnvRx/uN1ATU0o=; b=JxBCekDk5I25TnLLMqDLq2Ylxoe6qb+3f2jmMRT/OboguQv4o/Ur6CazXcrI7nXHsS +CsbExEm9/DOHSjEIQDVkGTfoH+AnaejF6bT2YQdiD36KGq6lP71s9TlvU5fZwDPcMrE 2DTIDE3A5TXKEdDSMIIimy5wt/NeaTcTYk+CZXk0lppsEgIA9als6pdd4W6wshg/N0yn jsdwwN5bPXq8CPI7BSHegrZaNPgum4ddaUUhB5gvYdnaSD8Y5s+zHek/l7QU5t9vPSt6 B+Q+2u4/KaMDWEk4zlJvZNHG8ulOpxQYiB6uEeFOyR+cXNw0k6YapziEEEK9FG5cPlmm lPqg== X-Gm-Message-State: AOJu0YwN1eWlP74jvPLoeuxuYd6UBsPB+mfatWzrid3P1ZfraxB+VeLU FHi9MCzEz3/y4OIeYcLcRmM= X-Received: by 2002:a5d:5443:0:b0:317:8fd:f01a with SMTP id w3-20020a5d5443000000b0031708fdf01amr7696229wrv.7.1695389390611; Fri, 22 Sep 2023 06:29:50 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id p5-20020a056000018500b0031c855d52efsm4449243wrx.87.2023.09.22.06.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:29:50 -0700 (PDT) Date: Fri, 22 Sep 2023 15:29:47 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_softmac.c Message-ID: <4259c06deaf2e3f3cc615e8c55bcf6f70ce4e277.1695387832.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_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 06:30:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777784912034214853 X-GMAIL-MSGID: 1777784912034214853 Remove unsupported mode IW_MODE_ADHOC from rtllib_softmac.c. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtllib.h | 1 - drivers/staging/rtl8192e/rtllib_softmac.c | 45 +---------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 7dde428313c9..d10fddd4f9ad 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1702,7 +1702,6 @@ void rtllib_softmac_new_net(struct rtllib_device *ieee, void SendDisassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn); void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee); -void rtllib_start_ibss(struct rtllib_device *ieee); int rtllib_softmac_init(struct rtllib_device *ieee); void rtllib_softmac_free(struct rtllib_device *ieee); void rtllib_disassociate(struct rtllib_device *ieee); diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index d8d9d59664ed..434690eeed5c 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -901,8 +901,6 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_device *ieee, } if (wpa_ie_len) { - if (ieee->iw_mode == IW_MODE_ADHOC) - memcpy(&ieee->wpa_ie[14], &ieee->wpa_ie[8], 4); memcpy(tag, ieee->wpa_ie, ieee->wpa_ie_len); tag += ieee->wpa_ie_len; } @@ -1437,14 +1435,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, WLAN_CAPABILITY_ESS)) return; - if ((ieee->iw_mode == IW_MODE_ADHOC) && !(net->capability & - WLAN_CAPABILITY_IBSS)) - return; - - if ((ieee->iw_mode == IW_MODE_ADHOC) && - (net->channel > ieee->ibss_maxjoin_chal)) - return; - if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC) { + if (ieee->iw_mode == IW_MODE_INFRA) { /* if the user specified the AP MAC, we need also the essid * This could be obtained by beacons or, if the network does not * broadcast it, it can be put manually. @@ -2308,11 +2299,6 @@ static void rtllib_start_ibss_wq(void *data) mutex_unlock(&ieee->wx_mutex); } -inline void rtllib_start_ibss(struct rtllib_device *ieee) -{ - schedule_delayed_work(&ieee->start_ibss_wq, msecs_to_jiffies(150)); -} - /* this is called only in user context, with wx_mutex held */ static void rtllib_start_bss(struct rtllib_device *ieee) { @@ -2546,9 +2532,6 @@ void rtllib_start_protocol(struct rtllib_device *ieee) case IW_MODE_INFRA: rtllib_start_bss(ieee); break; - case IW_MODE_ADHOC: - rtllib_start_ibss(ieee); - break; case IW_MODE_MONITOR: rtllib_start_monitor_mode(ieee); break; @@ -2745,30 +2728,6 @@ u8 rtllib_ap_sec_type(struct rtllib_device *ieee) } } -static void rtllib_MgntDisconnectIBSS(struct rtllib_device *rtllib) -{ - u8 OpMode; - u8 i; - bool bFilterOutNonAssociatedBSSID = false; - - rtllib->link_state = MAC80211_NOLINK; - - for (i = 0; i < 6; i++) - rtllib->current_network.bssid[i] = 0x55; - - rtllib->OpMode = RT_OP_MODE_NO_LINK; - rtllib->SetHwRegHandler(rtllib->dev, HW_VAR_BSSID, - rtllib->current_network.bssid); - OpMode = RT_OP_MODE_NO_LINK; - rtllib->SetHwRegHandler(rtllib->dev, HW_VAR_MEDIA_STATUS, &OpMode); - rtllib_stop_send_beacons(rtllib); - - bFilterOutNonAssociatedBSSID = false; - rtllib->SetHwRegHandler(rtllib->dev, HW_VAR_CECHK_BSSID, - (u8 *)(&bFilterOutNonAssociatedBSSID)); - notify_wx_assoc_event(rtllib); -} - static void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib, u8 *asSta, u8 asRsn) { @@ -2816,8 +2775,6 @@ bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn) rtllib->sta_wake_up(rtllib->dev); if (rtllib->link_state == MAC80211_LINKED) { - if (rtllib->iw_mode == IW_MODE_ADHOC) - rtllib_MgntDisconnectIBSS(rtllib); if (rtllib->iw_mode == IW_MODE_INFRA) rtllib_MgntDisconnectAP(rtllib, asRsn); } From patchwork Fri Sep 22 13:29:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 143561 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5766678vqi; Fri, 22 Sep 2023 10:55:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/tVsFFwnMdvrcVZ6dYENG5vI3RkdaAx+R8l6Qo8zQtqN/yHKylwjGWEBQIQlh/h5A46DZ X-Received: by 2002:a05:6a20:13d1:b0:15d:8f1a:6a4c with SMTP id ho17-20020a056a2013d100b0015d8f1a6a4cmr292002pzc.20.1695405333171; Fri, 22 Sep 2023 10:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695405333; cv=none; d=google.com; s=arc-20160816; b=f+OLeuq6nhyiXVxtjoEEwb0Vzpkj4wUnsmSsIKxZJOi3aw1QvLVJ2eunYF0L0XyJYq aUFxySBzawBsrg9jr1IX0hQ5UC9/WYjYl6N014doOtfNHEslkIQV722e1kEhcHv+yw+T 2u3mAVyvo77SLtO1upWpBlG65i2Eae+k3GqWFPTLUxWjZroEpblm2jNTC6FY/1Hg/TCz E7542yrLAjnN01p37Gf82kA8sqQTsL5C1kv0GXP9oLq4gpiXrf9G1/obQ8z0+BeXAs6N TNfuJsMECT4616U0nI+njEVTPG0Y958m+tCNtKtHnCFM7pWi0p7ckkjK7TaYnnVujKyb twNQ== 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=mz7vqOg4bSrdsOFL9TDA4eOOpgVt67cGT+nTbiIM2lw=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=AzfWy23a7DecyP1RHvCSmnlzP+lJYilpORicVjlqxb0KC/DsTZxlAxQMni2uH+3zH+ Na4af1RQdyZsvll3XVeRQbks5zMpxdzYosNi/jDvQvfaU2z2hhpl+9XmKWZcF4xmmeN0 4k0Bt2+OpLK6W8E5xIUAGcri8jBCZ62/1RDTmsU9Q6SVRJ62PqBtHcHU+pDFoPBJzttC BqaoM6DnEj1tI4XM4ynhg5xDhWl81pEX/DbZd9D7Uzkx1rHqBNrwr3YE8xsZ+GsF2aNb 4RE6Oauw9Z7O5SK6+gWj/r12JEC9HGWjxfQAoxNLc8/lE9RvRFY738BvkdB3CnGevww5 mG6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cIWNZXbk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id g4-20020a056a0023c400b00690b6d83e0bsi4520496pfc.186.2023.09.22.10.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 10:55:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cIWNZXbk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 6901D839A54A; Fri, 22 Sep 2023 06:30:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234137AbjIVNaS (ORCPT + 29 others); Fri, 22 Sep 2023 09:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234105AbjIVNaE (ORCPT ); Fri, 22 Sep 2023 09:30:04 -0400 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 E64D61B3 for ; Fri, 22 Sep 2023 06:29:56 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-405101a02bcso7332285e9.1 for ; Fri, 22 Sep 2023 06:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695389395; x=1695994195; 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=mz7vqOg4bSrdsOFL9TDA4eOOpgVt67cGT+nTbiIM2lw=; b=cIWNZXbkCYHl3OB+3qZHp9lTDoD4yaxfUatCQPhnE7pRAP7p6IrFTd6xDX+t9/e6RC WQDF9qbXf5GNyNugi0d6tma2aLAy+nXuT8/4K53Oa+mYkXC8ZGM2DWIf6P1zTJhbqB0t QO4bnYpw/oW8fg5JHbpGYnFpI3LJzSoWheoqH7BJj3Vxzb69VY4Jk0pkKP715Oz2tlLT IpuhlHffqmUTQSrGZig6wk/tCPLo6IAuyFEqQDN2YQjj9uyHMmjdOE0Elu/Sq1qdw58k S1ZzGN++FcCnEWmcGVgaz/c681CC5KtlgMdPTCEnX1/0xXldqaIny7D3GsZvUqr//mxR t0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695389395; x=1695994195; 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=mz7vqOg4bSrdsOFL9TDA4eOOpgVt67cGT+nTbiIM2lw=; b=SQHzEcnKMssURnrxKUQay19zimwxNa5zn9DSeUhcQBkk57tpbT9HvcjEHf8UCYSw/l S/yedyscdzvzSkrJu6wpyQzSneIxzpq4XZ4tWlMj/Jhxqpn4RSrUsK5y+JFbKl+/Ge46 ZgMkxt92PbZelurIVs8UdSBgcVdFslwQhiXDTBXS69iFu4y/EhtMGUqWTgIUe4PiHJG8 jRFev9TsIf3LUMGfECbqJzARJJy2XoDV86YKaW4YOaWBqaO9rwYFQWKiCFYNBE2RATUg obXWdmH7jGgULihty2267ByVzdA3YbOhUGqr4NMC1c6UC2q1crfXwl6HwG1yigJrB/Uc DwhQ== X-Gm-Message-State: AOJu0YxVjvQZuyrQE4iq0cwILVsulnz9dGGdnNZbs2Di2Z2b6uBCG+lS 7IFQjR105+YGKFkCVau8zrY= X-Received: by 2002:a05:600c:1c20:b0:3fe:21a6:a18 with SMTP id j32-20020a05600c1c2000b003fe21a60a18mr7906722wms.3.1695389395254; Fri, 22 Sep 2023 06:29:55 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id ay2-20020a05600c1e0200b003feea62440bsm1161935wmb.43.2023.09.22.06.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:29:55 -0700 (PDT) Date: Fri, 22 Sep 2023 15:29:53 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] staging: rtl8192e: Remove delayed_work start_ibss_wq Message-ID: <805447a41feffb9da7d82830868dc1d47f9aa737.1695387832.git.philipp.g.hortmann@gmail.com> 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 06:30:38 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777761342691049134 X-GMAIL-MSGID: 1777761342691049134 Remove delayed_work start_ibss_wq and the related functions which are not needed anymore. Signed-off-by: Philipp Hortmann --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 24 ---- .../staging/rtl8192e/rtl8192e/r8192E_dev.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 32 ----- drivers/staging/rtl8192e/rtllib.h | 4 - drivers/staging/rtl8192e/rtllib_softmac.c | 133 ------------------ 6 files changed, 195 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index fe9f6585266b..9ffa9305ff5e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -18,30 +18,6 @@ static int WDCAPARA_ADD[] = {EDCAPARA_BE, EDCAPARA_BK, EDCAPARA_VI, EDCAPARA_VO}; -void rtl92e_start_beacon(struct net_device *dev) -{ - struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); - struct rtllib_network *net = &priv->rtllib->current_network; - u16 BcnTimeCfg = 0; - u16 BcnCW = 6; - u16 BcnIFS = 0xf; - - rtl92e_irq_disable(dev); - - rtl92e_writew(dev, ATIMWND, 2); - - rtl92e_writew(dev, BCN_INTERVAL, net->beacon_interval); - rtl92e_writew(dev, BCN_DRV_EARLY_INT, 10); - rtl92e_writew(dev, BCN_DMATIME, 256); - - rtl92e_writeb(dev, BCN_ERR_THRESH, 100); - - BcnTimeCfg |= BcnCW << BCN_TCFG_CW_SHIFT; - BcnTimeCfg |= BcnIFS << BCN_TCFG_IFS; - rtl92e_writew(dev, BCN_TCFG, BcnTimeCfg); - rtl92e_irq_enable(dev); -} - static void _rtl92e_update_msr(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h index 14a091ae1b7d..878c96236824 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h @@ -17,7 +17,6 @@ void rtl92e_ack_irq(struct net_device *dev, u32 *p_inta); void rtl92e_enable_rx(struct net_device *dev); void rtl92e_enable_tx(struct net_device *dev); void rtl92e_init_variables(struct net_device *dev); -void rtl92e_start_beacon(struct net_device *dev); void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val); void rtl92e_get_eeprom_size(struct net_device *dev); bool rtl92e_start_adapter(struct net_device *dev); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 03cabf88ce2b..208c7bfd9bfe 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -700,7 +700,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev) priv->rtllib->set_bw_mode_handler = rtl92e_set_bw_mode; priv->rf_set_chan = rtl92e_set_channel; - priv->rtllib->start_send_beacons = rtl92e_start_beacon; priv->rtllib->stop_send_beacons = _rtl92e_stop_beacon; priv->rtllib->sta_wake_up = rtl92e_hw_wakeup; diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 0f14d9eb4fcd..a7e356e90d0e 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -743,38 +743,6 @@ void HT_update_self_and_peer_setting(struct rtllib_device *ieee, } EXPORT_SYMBOL(HT_update_self_and_peer_setting); -void HTUseDefaultSetting(struct rtllib_device *ieee) -{ - struct rt_hi_throughput *ht_info = ieee->ht_info; - - if (ht_info->enable_ht) { - ht_info->bCurrentHTSupport = true; - ht_info->bCurSuppCCK = ht_info->bRegSuppCCK; - - ht_info->bCurBW40MHz = ht_info->bRegBW40MHz; - ht_info->bCurShortGI20MHz = ht_info->bRegShortGI20MHz; - - ht_info->bCurShortGI40MHz = ht_info->bRegShortGI40MHz; - ht_info->bCurrent_AMSDU_Support = ht_info->bAMSDU_Support; - ht_info->nCurrent_AMSDU_MaxSize = ht_info->nAMSDU_MaxSize; - - ht_info->bCurrentAMPDUEnable = ht_info->bAMPDUEnable; - ht_info->CurrentAMPDUFactor = ht_info->AMPDU_Factor; - - ht_info->current_mpdu_density = ht_info->current_mpdu_density; - - HTFilterMCSRate(ieee, ieee->reg_dot11tx_ht_oper_rate_set, - ieee->dot11ht_oper_rate_set); - ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee, - ieee->dot11ht_oper_rate_set, - MCS_FILTER_ALL); - ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate; - - } else { - ht_info->bCurrentHTSupport = false; - } -} - u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame) { if (ieee->ht_info->bCurrentHTSupport) { diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index d10fddd4f9ad..410401869ebb 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1445,7 +1445,6 @@ struct rtllib_device { struct delayed_work associate_procedure_wq; struct delayed_work softmac_scan_wq; struct delayed_work associate_retry_wq; - struct delayed_work start_ibss_wq; struct delayed_work hw_wakeup_wq; struct delayed_work hw_sleep_wq; struct delayed_work link_change_wq; @@ -1502,7 +1501,6 @@ struct rtllib_device { * stop_send_bacons is NOT guaranteed to be called only * after start_send_beacons. */ - void (*start_send_beacons)(struct net_device *dev); void (*stop_send_beacons)(struct net_device *dev); /* power save mode related */ @@ -1727,7 +1725,6 @@ void rtllib_reset_queue(struct rtllib_device *ieee); void rtllib_wake_all_queues(struct rtllib_device *ieee); void rtllib_stop_all_queues(struct rtllib_device *ieee); struct sk_buff *rtllib_get_beacon(struct rtllib_device *ieee); -void rtllib_start_send_beacons(struct rtllib_device *ieee); void rtllib_stop_send_beacons(struct rtllib_device *ieee); void notify_wx_assoc_event(struct rtllib_device *ieee); @@ -1869,7 +1866,6 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, void rtllib_indicate_packets(struct rtllib_device *ieee, struct rtllib_rxb **prxbIndicateArray, u8 index); -void HTUseDefaultSetting(struct rtllib_device *ieee); #define RT_ASOC_RETRY_LIMIT 5 u8 MgntQuery_TxRateExcludeCCKRates(struct rtllib_device *ieee); diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 434690eeed5c..4551071e9f1b 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -607,18 +607,6 @@ static void rtllib_softmac_scan_wq(void *data) mutex_unlock(&ieee->scan_mutex); } -static void rtllib_beacons_start(struct rtllib_device *ieee) -{ - unsigned long flags; - - spin_lock_irqsave(&ieee->beacon_lock, flags); - - ieee->beacon_txing = 1; - rtllib_send_beacon(ieee); - - spin_unlock_irqrestore(&ieee->beacon_lock, flags); -} - static void rtllib_beacons_stop(struct rtllib_device *ieee) { unsigned long flags; @@ -639,14 +627,6 @@ void rtllib_stop_send_beacons(struct rtllib_device *ieee) } EXPORT_SYMBOL(rtllib_stop_send_beacons); -void rtllib_start_send_beacons(struct rtllib_device *ieee) -{ - ieee->start_send_beacons(ieee->dev); - if (ieee->softmac_features & IEEE_SOFTMAC_BEACONS) - rtllib_beacons_start(ieee); -} -EXPORT_SYMBOL(rtllib_start_send_beacons); - static void rtllib_softmac_stop_scan(struct rtllib_device *ieee) { mutex_lock(&ieee->scan_mutex); @@ -2189,116 +2169,6 @@ static void rtllib_start_monitor_mode(struct rtllib_device *ieee) netif_carrier_on(ieee->dev); } -static void rtllib_start_ibss_wq(void *data) -{ - struct rtllib_device *ieee = container_of_dwork_rsl(data, - struct rtllib_device, start_ibss_wq); - /* iwconfig mode ad-hoc will schedule this and return - * on the other hand this will block further iwconfig SET - * operations because of the wx_mutex hold. - * Anyway some most set operations set a flag to speed-up - * (abort) this wq (when syncro scanning) before sleeping - * on the mutex - */ - if (!ieee->proto_started) { - netdev_info(ieee->dev, "==========oh driver down return\n"); - return; - } - mutex_lock(&ieee->wx_mutex); - - if (ieee->current_network.ssid_len == 0) { - strscpy(ieee->current_network.ssid, RTLLIB_DEFAULT_TX_ESSID, - sizeof(ieee->current_network.ssid)); - ieee->current_network.ssid_len = strlen(RTLLIB_DEFAULT_TX_ESSID); - ieee->ssid_set = 1; - } - - 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); - - /* if not then the state is not linked. Maybe the user switched to - * ad-hoc mode just after being in monitor mode, or just after - * being very few time in managed mode (so the card have had no - * time to scan all the chans..) or we have just run up the iface - * 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->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 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. - */ - if (ieee->link_state == MAC80211_NOLINK) - rtllib_start_scan_syncro(ieee); - - /* the network definitively is not here.. create a new cell */ - 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) - eth_random_addr(ieee->current_network.bssid); - - ieee->current_network.rates_len = 4; - ieee->current_network.rates[0] = - RTLLIB_BASIC_RATE_MASK | RTLLIB_CCK_RATE_1MB; - ieee->current_network.rates[1] = - RTLLIB_BASIC_RATE_MASK | RTLLIB_CCK_RATE_2MB; - ieee->current_network.rates[2] = - RTLLIB_BASIC_RATE_MASK | RTLLIB_CCK_RATE_5MB; - ieee->current_network.rates[3] = - RTLLIB_BASIC_RATE_MASK | RTLLIB_CCK_RATE_11MB; - - ieee->current_network.rates_ex_len = 8; - ieee->current_network.rates_ex[0] = - RTLLIB_OFDM_RATE_6MB; - ieee->current_network.rates_ex[1] = - RTLLIB_OFDM_RATE_9MB; - ieee->current_network.rates_ex[2] = - RTLLIB_OFDM_RATE_12MB; - ieee->current_network.rates_ex[3] = - RTLLIB_OFDM_RATE_18MB; - ieee->current_network.rates_ex[4] = - RTLLIB_OFDM_RATE_24MB; - ieee->current_network.rates_ex[5] = - RTLLIB_OFDM_RATE_36MB; - ieee->current_network.rates_ex[6] = - RTLLIB_OFDM_RATE_48MB; - ieee->current_network.rates_ex[7] = - RTLLIB_OFDM_RATE_54MB; - ieee->rate = 108; - - ieee->current_network.qos_data.supported = 0; - ieee->set_wireless_mode(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 == WIRELESS_MODE_N_24G) - HTUseDefaultSetting(ieee); - else - ieee->ht_info->bCurrentHTSupport = false; - - ieee->SetHwRegHandler(ieee->dev, HW_VAR_MEDIA_STATUS, - (u8 *)(&ieee->link_state)); - - ieee->link_state = MAC80211_LINKED; - ieee->link_change(ieee->dev); - - HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); - rtllib_start_send_beacons(ieee); - - notify_wx_assoc_event(ieee); - netif_carrier_on(ieee->dev); - - mutex_unlock(&ieee->wx_mutex); -} - /* this is called only in user context, with wx_mutex held */ static void rtllib_start_bss(struct rtllib_device *ieee) { @@ -2459,7 +2329,6 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown) rtllib_stop_send_beacons(ieee); del_timer_sync(&ieee->associate_timer); cancel_delayed_work_sync(&ieee->associate_retry_wq); - cancel_delayed_work_sync(&ieee->start_ibss_wq); cancel_delayed_work_sync(&ieee->link_change_wq); rtllib_stop_scan(ieee); @@ -2593,7 +2462,6 @@ int rtllib_softmac_init(struct rtllib_device *ieee) timer_setup(&ieee->beacon_timer, rtllib_send_beacon_cb, 0); INIT_DELAYED_WORK(&ieee->link_change_wq, (void *)rtllib_link_change_wq); - INIT_DELAYED_WORK(&ieee->start_ibss_wq, (void *)rtllib_start_ibss_wq); INIT_WORK(&ieee->associate_complete_wq, (void *)rtllib_associate_complete_wq); INIT_DELAYED_WORK(&ieee->associate_procedure_wq, (void *)rtllib_associate_procedure_wq); INIT_DELAYED_WORK(&ieee->softmac_scan_wq, (void *)rtllib_softmac_scan_wq); @@ -2622,7 +2490,6 @@ void rtllib_softmac_free(struct rtllib_device *ieee) cancel_delayed_work_sync(&ieee->associate_retry_wq); cancel_delayed_work_sync(&ieee->associate_procedure_wq); cancel_delayed_work_sync(&ieee->softmac_scan_wq); - cancel_delayed_work_sync(&ieee->start_ibss_wq); cancel_delayed_work_sync(&ieee->hw_wakeup_wq); cancel_delayed_work_sync(&ieee->hw_sleep_wq); cancel_delayed_work_sync(&ieee->link_change_wq); From patchwork Fri Sep 22 13:30:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 143780 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:910f:0:b0:403:3b70:6f57 with SMTP id r15csp31611vqg; Fri, 22 Sep 2023 18:55:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCQJlNn6NDAlFHwNLV7w5SZdy72JsAhcZwS6LJjhHxkultrqxMzfqh6onPe17b6EhMy9CD X-Received: by 2002:a17:90b:188c:b0:268:5620:cfc7 with SMTP id mn12-20020a17090b188c00b002685620cfc7mr1145824pjb.30.1695434120256; Fri, 22 Sep 2023 18:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695434120; cv=none; d=google.com; s=arc-20160816; b=B/XBup8T6X7LvNn0pcXqfvecLJkBKNwxQ0N+BYf/IeqedbopRc9GI1UKNzg44WGdI1 t54frgs/E3bz6q2/a/p5PDkK66MuKVugzYe6P38g+Fob9t64IHTfflPJ8RHUX9zAqWTi QgHGO1KobUnFSJRdywmqGzLT3pv45ij+EdaRD4LU2qj/+KKeHq3a25xlQvroOXq8ZDrn z3OZOqn/9VWhhMm1+++YkKajIX+AEZAMJx5GV+dr+dcs8WH/tUweWYGNzBHlBmKiO4dn Sqvg3oDw/w3qraKvRnZjxn3Tnm0kzoBmGbVs40KozwULWkJN9k/fRKnNDzkqVBExyhAr F9pA== 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=IU0umDeRj0qrz0iB2siEvqGentkzeL4EI2Vh5qfUxFY=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=O1sKwFA2uqaD2IP9QJxhhfJHuGvft/WTbP5KmtAzv0UwGliwZFwTc0eBGm8er5M0EW D9XJVnjF2mbEoIzVcQfeNAlKo0PEigJkisFeZSn2w6r/DuAtN7yWNgH+CKsOoT4mN/lk JqAJnIpM4zL5gI1OMKcEkEXcrrCn7w+4H+7cXeCvRZM7iI0pqe7gzQhOmcF8tdv+wz0+ ggD2pei8HcXeIcA8QAG7q0WPw+0CwKyR+wSf7oc3rJjQsLS70yhiYPArTpHIVOF/j2be XwhF6jNA7NgkI/Eqj0OMw0uojyWFz/vNsNLcOrjqM26hLAcvfttTk3vrHP1NwKZdQnqJ rnWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RD+rKfJv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id nh24-20020a17090b365800b0026b49dac834si4922214pjb.34.2023.09.22.18.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 18:55:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RD+rKfJv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 265068022C05; Fri, 22 Sep 2023 06:31:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234142AbjIVNaW (ORCPT + 29 others); Fri, 22 Sep 2023 09:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234145AbjIVNaL (ORCPT ); Fri, 22 Sep 2023 09:30:11 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 358F51A7 for ; Fri, 22 Sep 2023 06:30:04 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-405101a02bcso7332665e9.1 for ; Fri, 22 Sep 2023 06:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695389402; x=1695994202; 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=IU0umDeRj0qrz0iB2siEvqGentkzeL4EI2Vh5qfUxFY=; b=RD+rKfJvD73e033pOuFeQjlPG4yo+CxGK3XQpyChIdhUmMW5H+FVmCTYqwa2FWnwy/ RfEX1OFB6KPidw5RD2M//D4S8COJDLu224usRoDbswODhtAFQMfA8dKZIzvZXRskCk+4 mE1rxBEQ7bkVHYhkfhqEGHoqOn/xDSiCoyHK9W/LnyYRAorWd0GJMwlaqpPfMKHeKJIL 3AjvMxvQmuVSF/rmxvTdiJ92iOj9HTRzpiYGfileTNiBKTASQAwfn1iAqV/fR4gBqRep iPchyqyE0ZKDmjV+b2iS9Mn5Pio+lmOWsTcPjc/nui5+HfYjcjU3HIttlrJJAjN95Nw1 Yj9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695389402; x=1695994202; 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=IU0umDeRj0qrz0iB2siEvqGentkzeL4EI2Vh5qfUxFY=; b=AJRwcHVlxLW7EW88SyEaMvNknTQQUPYLeXyFlxu9gNZkck8AOlmjiRZ/ck3L386tuX sOX8cmyGtg8lQhCVTO+ky4nNxfakWh0S05IiX7dnED8gqEqucXjRThSB7esr0rKT0jjo F771PVR1mKo+EbpAm9hA2JnorW/YPJZ88ZKXfznx2XU2NFS1XRt7NxNh6avawvOiUOQa 9y9iEJix9YOvXbvfkdqC65v5eyKehiRi54fTXU6/Dq3cBoteC9yv6VFsrrKr3SVOElIr 1vgupJ5naDKcsV+/FvzLL4z/wO2p0RIZps4tiM6ZX+rOKor/hLPEpm79RVtzbPGcnxdA o5EQ== X-Gm-Message-State: AOJu0YxBtS3qN/+BtPh7wvlnW8fwZZvk/ZcCDcgiMAnW8PruMXaJLeeQ Iinez0GpM4iS+pzkx4gEcvY= X-Received: by 2002:a05:600c:511e:b0:405:4721:800 with SMTP id o30-20020a05600c511e00b0040547210800mr273667wms.1.1695389402540; Fri, 22 Sep 2023 06:30:02 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id v11-20020a5d610b000000b0031435731dfasm4454699wrt.35.2023.09.22.06.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:30:02 -0700 (PDT) Date: Fri, 22 Sep 2023 15:30:00 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] staging: rtl8192e: Remove rtllib_stop_send_beacons Message-ID: <17c5545102ad8f50ca320af17aafa555f8caec2d.1695387832.git.philipp.g.hortmann@gmail.com> 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Fri, 22 Sep 2023 06:31:29 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777791528176742789 X-GMAIL-MSGID: 1777791528176742789 rtllib_start_send_beacons() is removed so no need for rtllib_stop_send_beacons() anymore. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 7 ------- drivers/staging/rtl8192e/rtllib.h | 9 --------- drivers/staging/rtl8192e/rtllib_softmac.c | 21 -------------------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 1 - 4 files changed, 38 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 208c7bfd9bfe..87f5441fbb10 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -458,10 +458,6 @@ static void _rtl92e_prepare_beacon(struct tasklet_struct *t) pdesc->OWN = 1; } -static void _rtl92e_stop_beacon(struct net_device *dev) -{ -} - void rtl92e_config_rate(struct net_device *dev, u16 *rate_config) { struct r8192_priv *priv = rtllib_priv(dev); @@ -700,8 +696,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev) priv->rtllib->set_bw_mode_handler = rtl92e_set_bw_mode; priv->rf_set_chan = rtl92e_set_channel; - priv->rtllib->stop_send_beacons = _rtl92e_stop_beacon; - priv->rtllib->sta_wake_up = rtl92e_hw_wakeup; priv->rtllib->enter_sleep_state = rtl92e_enter_sleep; priv->rtllib->ps_is_queue_empty = _rtl92e_is_tx_queue_empty; @@ -1045,7 +1039,6 @@ static void _rtl92e_if_silent_reset(struct net_device *dev) if (ieee->link_state == MAC80211_LINKED) { mutex_lock(&ieee->wx_mutex); 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); rtllib_stop_scan(ieee); diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 410401869ebb..0597dcb759e0 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1495,14 +1495,6 @@ struct rtllib_device { */ void (*link_change)(struct net_device *dev); - /* these two function indicates to the HW when to start - * and stop to send beacons. This is used when the - * IEEE_SOFTMAC_BEACONS is not set. For now the - * stop_send_bacons is NOT guaranteed to be called only - * after start_send_beacons. - */ - void (*stop_send_beacons)(struct net_device *dev); - /* power save mode related */ void (*sta_wake_up)(struct net_device *dev); void (*enter_sleep_state)(struct net_device *dev, u64 time); @@ -1725,7 +1717,6 @@ void rtllib_reset_queue(struct rtllib_device *ieee); void rtllib_wake_all_queues(struct rtllib_device *ieee); void rtllib_stop_all_queues(struct rtllib_device *ieee); struct sk_buff *rtllib_get_beacon(struct rtllib_device *ieee); -void rtllib_stop_send_beacons(struct rtllib_device *ieee); void notify_wx_assoc_event(struct rtllib_device *ieee); void rtllib_ps_tx_ack(struct rtllib_device *ieee, short success); diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 4551071e9f1b..982578e1c0af 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -607,26 +607,6 @@ static void rtllib_softmac_scan_wq(void *data) mutex_unlock(&ieee->scan_mutex); } -static void rtllib_beacons_stop(struct rtllib_device *ieee) -{ - unsigned long flags; - - spin_lock_irqsave(&ieee->beacon_lock, flags); - - ieee->beacon_txing = 0; - - spin_unlock_irqrestore(&ieee->beacon_lock, flags); - del_timer_sync(&ieee->beacon_timer); -} - -void rtllib_stop_send_beacons(struct rtllib_device *ieee) -{ - ieee->stop_send_beacons(ieee->dev); - if (ieee->softmac_features & IEEE_SOFTMAC_BEACONS) - rtllib_beacons_stop(ieee); -} -EXPORT_SYMBOL(rtllib_stop_send_beacons); - static void rtllib_softmac_stop_scan(struct rtllib_device *ieee) { mutex_lock(&ieee->scan_mutex); @@ -2326,7 +2306,6 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown) ieee->rtllib_ips_leave(ieee->dev); } - rtllib_stop_send_beacons(ieee); del_timer_sync(&ieee->associate_timer); cancel_delayed_work_sync(&ieee->associate_retry_wq); cancel_delayed_work_sync(&ieee->link_change_wq); diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index 2b15251201ec..3c7c0f07ab0b 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -310,7 +310,6 @@ void rtllib_wx_sync_scan_wq(void *data) rtllib_sta_ps_send_null_frame(ieee, 1); rtllib_stop_all_queues(ieee); - rtllib_stop_send_beacons(ieee); ieee->link_state = MAC80211_LINKED_SCANNING; ieee->link_change(ieee->dev); /* wait for ps packet to be kicked out successfully */