Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6603576rwr; Tue, 2 May 2023 02:53:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7AuNeKuf86LQg0xGHO7yNsPMCeHOqloTitZrl+j/Ywwjqim+1ipStd/czYQ6nEPf9I3unq X-Received: by 2002:a17:902:ec84:b0:1ab:515:27c3 with SMTP id x4-20020a170902ec8400b001ab051527c3mr3795847plg.47.1683021187521; Tue, 02 May 2023 02:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683021187; cv=none; d=google.com; s=arc-20160816; b=ha7a3ooMsV/8Frd82Y2RpTe43uOUTHQ83xmH9L5X/UE/Bil7e7D0XpvufIYjjiYe17 ghi/hic/jH2KVxmkAEOIBXAp0rClNArRLKU7CrfEKNDwK5T0co7hYLzH64lYO0wj8Lqn jqCzoD78p+225rkhiX0WEyH7K0ecMxZxNUKSWqXxaSf7zIDtPTtyp6WwkQUkBflkvwCU Ms3zFuXW+onneuqO5DCBWwQ173ZFYdOLS2kWfgIIJ1creXdH0pGuSDTQs0QbrJFf2t2/ f0tOEVAp9fbo4rjU2ny6L/2UZFy9GGAuG+8M49OBrfP2eAYV1REutYkbQMY9KnK6LEgp zJxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sSwAfeXG1aakr31PsXaJtuUAD37fzAWjGVIAVhRJCyY=; b=Tss/uXnQN61b4gHB94m6Y/AyP4uZccrrVi+1PeNaiPU/jsaN+4b4PV/IxafYGsqskP 8CxzDhCK6L8+NjolA/w0ZycIljzyTw7OxsJ9OgK4S/6yfw/sR/7JO99+0D1f2Eg6ZxjU xFcl10JUtmBj6kNbhxprvvCscA+8k4x3x5RO4JpLtS0TAzttx+rZuZbiyWEK+fEeKErX MzkrZ5uFl7CFl3r0f+GQYJdlzyaQlJnT13V6Jfm+UhTZ2mEGc73EqdzQKzpP+3m9s4I6 OUq7i4tILyd/HcIIekLs8sllp/c+ynyetaE8Hl+Z79fEtzxHREhPx9UoX7EQiiWjuGhr cMfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K49UL84e; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a170902b20c00b001a6b5a7db52si7004197plr.596.2023.05.02.02.52.55; Tue, 02 May 2023 02:53:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@kernel.org header.s=k20201202 header.b=K49UL84e; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233523AbjEBJt1 (ORCPT + 61 others); Tue, 2 May 2023 05:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233644AbjEBJtS (ORCPT ); Tue, 2 May 2023 05:49:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F778527D for ; Tue, 2 May 2023 02:49:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C92786216E for ; Tue, 2 May 2023 09:49:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D506AC4339B; Tue, 2 May 2023 09:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683020953; bh=ZIpmGSH0TJPrlVHIEpiIMmL0R7hx6OvL5SWw+TDNq5g=; h=From:To:Cc:Subject:Date:From; b=K49UL84e5Tm56FlZ3kd9Qj6Zgj0xQialKTuKtyeTbEBsQjM4Tt4VXGoQwhqP2T2xM DNii4wWM66lZEePvOdKrpSkxgBy1ZI8l2ga291vpkLpqHoULoamvWh1w3C329j8ViZ Z+oGm7YXOmy5NCNiCMR7mB8jDxpht0mKc0POdKaSgBME14oUOXLHVNd+yrKclW3csh okw+b9Oa4wj5pDWVSAco/5RuDn34qrbT1HbFjMtfeDHk6D04mb8fwSFlrL9Z01GKYf Rf/yHjj1lJrdAvH1qXAa8Yd9BB/rT0IsTFCI6uJUV+toKhlXJQB3jqTxymZrbZnvVl U55YomKXbgCfA== From: Lorenzo Bianconi To: nbd@nbd.name Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org Subject: [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support Date: Tue, 2 May 2023 11:49:05 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-wireless@vger.kernel.org Get rid of WEP support in mt76x02_set_key routine since it is not longer supported upstream. Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c index dcbb5c605dfe..a9b770831844 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c @@ -413,12 +413,9 @@ int mt76x02_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, struct mt76x02_sta *msta; struct mt76_wcid *wcid; int idx = key->keyidx; - int ret; /* fall back to sw encryption for unsupported ciphers */ switch (key->cipher) { - case WLAN_CIPHER_SUITE_WEP40: - case WLAN_CIPHER_SUITE_WEP104: case WLAN_CIPHER_SUITE_TKIP: case WLAN_CIPHER_SUITE_CCMP: break; @@ -471,16 +468,6 @@ int mt76x02_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, } mt76_wcid_key_setup(&dev->mt76, wcid, key); - if (!msta) { - if (key || wcid->hw_key_idx == idx) { - ret = mt76x02_mac_wcid_set_key(dev, wcid->idx, key); - if (ret) - return ret; - } - - return mt76x02_mac_shared_key_setup(dev, mvif->idx, idx, key); - } - return mt76x02_mac_wcid_set_key(dev, msta->wcid.idx, key); } EXPORT_SYMBOL_GPL(mt76x02_set_key); -- 2.40.1