linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support
@ 2023-05-02  9:49 Lorenzo Bianconi
  2023-05-03  6:06 ` Kalle Valo
  2023-06-27  6:31 ` Shiji Yang
  0 siblings, 2 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2023-05-02  9:49 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless

Get rid of WEP support in mt76x02_set_key routine since it is not longer
supported upstream.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support
  2023-05-02  9:49 [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support Lorenzo Bianconi
@ 2023-05-03  6:06 ` Kalle Valo
  2023-05-03  6:59   ` Felix Fietkau
  2023-05-03  7:52   ` Lorenzo Bianconi
  2023-06-27  6:31 ` Shiji Yang
  1 sibling, 2 replies; 6+ messages in thread
From: Kalle Valo @ 2023-05-03  6:06 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless

Lorenzo Bianconi <lorenzo@kernel.org> writes:

> Get rid of WEP support in mt76x02_set_key routine since it is not longer
> supported upstream.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

You marked this for wireless-next so should I take this directly?

Does this fix something or is just cleanup? It would be good to mention
that in the commit log.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support
  2023-05-03  6:06 ` Kalle Valo
@ 2023-05-03  6:59   ` Felix Fietkau
  2023-05-03  7:52   ` Lorenzo Bianconi
  1 sibling, 0 replies; 6+ messages in thread
From: Felix Fietkau @ 2023-05-03  6:59 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Lorenzo Bianconi, lorenzo.bianconi, linux-wireless


> On 3. May 2023, at 08:06, Kalle Valo <kvalo@kernel.org> wrote:
> 
> Lorenzo Bianconi <lorenzo@kernel.org> writes:
> 
>> Get rid of WEP support in mt76x02_set_key routine since it is not longer
>> supported upstream.
>> 
>> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> You marked this for wireless-next so should I take this directly?
> 
> Does this fix something or is just cleanup? It would be good to mention
> that in the commit log.
Not a fix, just cleanup. I will take this for the next cycle.

- Felix

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support
  2023-05-03  6:06 ` Kalle Valo
  2023-05-03  6:59   ` Felix Fietkau
@ 2023-05-03  7:52   ` Lorenzo Bianconi
  2023-05-03  9:34     ` Kalle Valo
  1 sibling, 1 reply; 6+ messages in thread
From: Lorenzo Bianconi @ 2023-05-03  7:52 UTC (permalink / raw)
  To: Kalle Valo; +Cc: nbd, lorenzo.bianconi, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

> Lorenzo Bianconi <lorenzo@kernel.org> writes:
> 
> > Get rid of WEP support in mt76x02_set_key routine since it is not longer
> > supported upstream.
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> You marked this for wireless-next so should I take this directly?

it is not a fix, "wireless-next" is just the default subjectprefix for my
git tree, sorry for the confusion. I think it can go through Felix's tree.

Regards,
Lorenzo

> 
> Does this fix something or is just cleanup? It would be good to mention
> that in the commit log.
> 
> -- 
> https://patchwork.kernel.org/project/linux-wireless/list/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support
  2023-05-03  7:52   ` Lorenzo Bianconi
@ 2023-05-03  9:34     ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2023-05-03  9:34 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless

Lorenzo Bianconi <lorenzo@kernel.org> writes:

>> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>> 
>> > Get rid of WEP support in mt76x02_set_key routine since it is not longer
>> > supported upstream.
>> >
>> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>> 
>> You marked this for wireless-next so should I take this directly?
>
> it is not a fix, "wireless-next" is just the default subjectprefix for my
> git tree, sorry for the confusion. I think it can go through Felix's tree.

Good, thanks for for the confirmation.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support
  2023-05-02  9:49 [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support Lorenzo Bianconi
  2023-05-03  6:06 ` Kalle Valo
@ 2023-06-27  6:31 ` Shiji Yang
  1 sibling, 0 replies; 6+ messages in thread
From: Shiji Yang @ 2023-06-27  6:31 UTC (permalink / raw)
  To: lorenzo; +Cc: linux-wireless, lorenzo.bianconi, nbd

Lorenzo Bianconi <lorenzo@kernel.org> writes:
>@@ -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);

`msta` may be a null pointer. This patch may cause data to be written to a
null pointer in `return mt76x02_mac_wcid_set_key(dev, msta->wcid.idx, key);`.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-27  6:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-02  9:49 [PATCH wireless-next] wifi: mt76: mt76x02: remove WEP support Lorenzo Bianconi
2023-05-03  6:06 ` Kalle Valo
2023-05-03  6:59   ` Felix Fietkau
2023-05-03  7:52   ` Lorenzo Bianconi
2023-05-03  9:34     ` Kalle Valo
2023-06-27  6:31 ` Shiji Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).