Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2712328rdb; Fri, 22 Sep 2023 06:36:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEaavT0DMrkKtF8tESD/Xjm/kOuC3b65jcwAsOiI/HulUFh5ypRBnCubCdLBccx+bRBoJYo X-Received: by 2002:a05:6358:7e11:b0:139:c75f:63eb with SMTP id o17-20020a0563587e1100b00139c75f63ebmr9692712rwm.21.1695389783393; Fri, 22 Sep 2023 06:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695389783; cv=none; d=google.com; s=arc-20160816; b=KiBlbsMTtfchyphwII7mYVFekq+byfMVluyscOUSKGkl3xoftd5AvDDOUjbJN2rOPZ /zRN/BmzrmHs0S/RKiT9FU6EyZYbdYpIMbq19TR6G0bdxzxCjaXO+PhEsj34rA0fWlaT ARJH3NV+5/v8G6F95fNWWphPLWh6H3pE6PlliVIVPeUBqdgaYKU8RymmTMKtQZM0NKbO ohoYEc95eR1Q1nLRHILuV0jaVddAe3oHxPKk1hLs4dyWcFA/sFHGhDvcBzRJ4tkwM2YV eWEXOgi7bmT4NztcG/bBmNVl3upMYHERQDpyeXKCXy+RdIq8nxE7juEoujXMt7rgDVE5 2eFA== 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 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l12-20020a63da4c000000b00573ffd278a0si3868705pgj.148.2023.09.22.06.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; 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 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 3430C8582FE5; Fri, 22 Sep 2023 06:30:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234124AbjIVNaJ (ORCPT + 99 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_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 (howler.vger.email [0.0.0.0]); Fri, 22 Sep 2023 06:30:09 -0700 (PDT) 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); } -- 2.42.0