2019-11-04 09:49:43

by Stanislaw Gruszka

[permalink] [raw]
Subject: [PATCH] Revert "mt76: mt76x0e: don't use hw encryption for MT7630E"

This reverts commit 34b0e9b767bfa09ae233ca0d6ceb299bf2e24600.

Since 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")
is no longer necessary to disable HW encryption for MT7630E.

Disabling HW encryption helped previously because somehow fragmented
skb's are not created if mac80211 encrypt frames, so buffer unmap bug
of non-linear skbs was not triggered. Now since this bug if properly
fixed by 7bd0650be63c , we can enable HW encryption back.

Signed-off-by: Stanislaw Gruszka <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
index 7705e55aa3d1..f84a7df296ea 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
@@ -51,19 +51,6 @@ static void mt76x0e_stop(struct ieee80211_hw *hw)
mt76x0e_stop_hw(dev);
}

-static int
-mt76x0e_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
- struct ieee80211_vif *vif, struct ieee80211_sta *sta,
- struct ieee80211_key_conf *key)
-{
- struct mt76x02_dev *dev = hw->priv;
-
- if (is_mt7630(dev))
- return -EOPNOTSUPP;
-
- return mt76x02_set_key(hw, cmd, vif, sta, key);
-}
-
static void
mt76x0e_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 queues, bool drop)
@@ -80,7 +67,7 @@ static void mt76x0e_stop(struct ieee80211_hw *hw)
.configure_filter = mt76x02_configure_filter,
.bss_info_changed = mt76x02_bss_info_changed,
.sta_state = mt76_sta_state,
- .set_key = mt76x0e_set_key,
+ .set_key = mt76x02_set_key,
.conf_tx = mt76x02_conf_tx,
.sw_scan_start = mt76_sw_scan,
.sw_scan_complete = mt76x02_sw_scan_complete,
--
1.9.3


2019-11-04 10:06:39

by Lorenzo Bianconi

[permalink] [raw]
Subject: Re: [PATCH] Revert "mt76: mt76x0e: don't use hw encryption for MT7630E"

> This reverts commit 34b0e9b767bfa09ae233ca0d6ceb299bf2e24600.
>
> Since 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")
> is no longer necessary to disable HW encryption for MT7630E.
>
> Disabling HW encryption helped previously because somehow fragmented
> skb's are not created if mac80211 encrypt frames, so buffer unmap bug
> of non-linear skbs was not triggered. Now since this bug if properly
> fixed by 7bd0650be63c , we can enable HW encryption back.
>
> Signed-off-by: Stanislaw Gruszka <[email protected]>
> ---
> drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)

Acked-by: Lorenzo Bianconi <[email protected]>

>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
> index 7705e55aa3d1..f84a7df296ea 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
> @@ -51,19 +51,6 @@ static void mt76x0e_stop(struct ieee80211_hw *hw)
> mt76x0e_stop_hw(dev);
> }
>
> -static int
> -mt76x0e_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
> - struct ieee80211_vif *vif, struct ieee80211_sta *sta,
> - struct ieee80211_key_conf *key)
> -{
> - struct mt76x02_dev *dev = hw->priv;
> -
> - if (is_mt7630(dev))
> - return -EOPNOTSUPP;
> -
> - return mt76x02_set_key(hw, cmd, vif, sta, key);
> -}
> -
> static void
> mt76x0e_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> u32 queues, bool drop)
> @@ -80,7 +67,7 @@ static void mt76x0e_stop(struct ieee80211_hw *hw)
> .configure_filter = mt76x02_configure_filter,
> .bss_info_changed = mt76x02_bss_info_changed,
> .sta_state = mt76_sta_state,
> - .set_key = mt76x0e_set_key,
> + .set_key = mt76x02_set_key,
> .conf_tx = mt76x02_conf_tx,
> .sw_scan_start = mt76_sw_scan,
> .sw_scan_complete = mt76x02_sw_scan_complete,
> --
> 1.9.3
>


Attachments:
(No filename) (1.96 kB)
signature.asc (235.00 B)
Download all attachments

2019-11-05 08:24:51

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] Revert "mt76: mt76x0e: don't use hw encryption for MT7630E"

Stanislaw Gruszka <[email protected]> writes:

> This reverts commit 34b0e9b767bfa09ae233ca0d6ceb299bf2e24600.
>
> Since 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")
> is no longer necessary to disable HW encryption for MT7630E.
>
> Disabling HW encryption helped previously because somehow fragmented
> skb's are not created if mac80211 encrypt frames, so buffer unmap bug
> of non-linear skbs was not triggered. Now since this bug if properly
> fixed by 7bd0650be63c , we can enable HW encryption back.

This should be:

... fixed by commit 7bd0650be63c ("mt76: dma: fix buffer unmap with
non-linear skbs"), we can enable ...

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

2019-11-05 09:01:34

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: [PATCH] Revert "mt76: mt76x0e: don't use hw encryption for MT7630E"

On Tue, Nov 05, 2019 at 10:21:13AM +0200, Kalle Valo wrote:
> Stanislaw Gruszka <[email protected]> writes:
>
> > This reverts commit 34b0e9b767bfa09ae233ca0d6ceb299bf2e24600.
> >
> > Since 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")
> > is no longer necessary to disable HW encryption for MT7630E.
> >
> > Disabling HW encryption helped previously because somehow fragmented
> > skb's are not created if mac80211 encrypt frames, so buffer unmap bug
> > of non-linear skbs was not triggered. Now since this bug if properly
> > fixed by 7bd0650be63c , we can enable HW encryption back.
>
> This should be:
>
> ... fixed by commit 7bd0650be63c ("mt76: dma: fix buffer unmap with
> non-linear skbs"), we can enable ...

I provided the topic in the first reference of the commit at the top.
Should I do this anytime in the chenglog when a commit is referenced,
even if it's done already ?

Stanislaw

2019-11-05 09:15:49

by Petr Štetiar

[permalink] [raw]
Subject: Re: [PATCH] Revert "mt76: mt76x0e: don't use hw encryption for MT7630E"

Stanislaw Gruszka <[email protected]> [2019-11-05 10:00:44]:

Hi,

> I provided the topic in the first reference of the commit at the top.
> Should I do this anytime in the chenglog when a commit is referenced,
> even if it's done already ?

./scripts/checkpatch.pl 0001-Revert-mt76-mt76x0e-don-t-use-hw-encryption-for-MT76.patch
ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")'
#8:
Since 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")

ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")'
#14:
fixed by 7bd0650be63c , we can enable HW encryption back.

-- ynezz

2019-11-05 09:16:07

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] Revert "mt76: mt76x0e: don't use hw encryption for MT7630E"

Stanislaw Gruszka <[email protected]> writes:

> On Tue, Nov 05, 2019 at 10:21:13AM +0200, Kalle Valo wrote:
>> Stanislaw Gruszka <[email protected]> writes:
>>
>> > This reverts commit 34b0e9b767bfa09ae233ca0d6ceb299bf2e24600.
>> >
>> > Since 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")
>> > is no longer necessary to disable HW encryption for MT7630E.
>> >
>> > Disabling HW encryption helped previously because somehow fragmented
>> > skb's are not created if mac80211 encrypt frames, so buffer unmap bug
>> > of non-linear skbs was not triggered. Now since this bug if properly
>> > fixed by 7bd0650be63c , we can enable HW encryption back.
>>
>> This should be:
>>
>> ... fixed by commit 7bd0650be63c ("mt76: dma: fix buffer unmap with
>> non-linear skbs"), we can enable ...
>
> I provided the topic in the first reference of the commit at the top.
> Should I do this anytime in the chenglog when a commit is referenced,
> even if it's done already ?

Sorry, I missed that. Yes, you are right and ignore my comment.

--
Kalle Valo

2019-11-05 09:53:00

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: [PATCH] Revert "mt76: mt76x0e: don't use hw encryption for MT7630E"

On Tue, Nov 05, 2019 at 10:08:45AM +0100, Petr Štetiar wrote:
> Stanislaw Gruszka <[email protected]> [2019-11-05 10:00:44]:
>
> Hi,
>
> > I provided the topic in the first reference of the commit at the top.
> > Should I do this anytime in the chenglog when a commit is referenced,
> > even if it's done already ?
>
> ./scripts/checkpatch.pl 0001-Revert-mt76-mt76x0e-don-t-use-hw-encryption-for-MT76.patch
> ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")'
> #8:
> Since 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")

Okay, so I should add word 'commit' before HASH.

> ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")'
> #14:
> fixed by 7bd0650be63c , we can enable HW encryption back.

It's not clear if topic is need, but I can change it on the way.
BTW I hate checkpath.pl .

Stanislaw

2019-11-05 14:09:16

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] Revert "mt76: mt76x0e: don't use hw encryption for MT7630E"

Stanislaw Gruszka <[email protected]> writes:

> On Tue, Nov 05, 2019 at 10:08:45AM +0100, Petr Štetiar wrote:
>> Stanislaw Gruszka <[email protected]> [2019-11-05 10:00:44]:
>>
>> Hi,
>>
>> > I provided the topic in the first reference of the commit at the top.
>> > Should I do this anytime in the chenglog when a commit is referenced,
>> > even if it's done already ?
>>
>> ./scripts/checkpatch.pl
>> 0001-Revert-mt76-mt76x0e-don-t-use-hw-encryption-for-MT76.patch
>> ERROR: Please use git commit description style 'commit <12+ chars
>> of sha1> ("<title line>")' - ie: 'commit 7bd0650be63c ("mt76: dma:
>> fix buffer unmap with non-linear skbs")'
>> #8:
>> Since 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs")
>
> Okay, so I should add word 'commit' before HASH.
>
>> ERROR: Please use git commit description style 'commit <12+ chars
>> of sha1> ("<title line>")' - ie: 'commit 7bd0650be63c ("mt76: dma:
>> fix buffer unmap with non-linear skbs")'
>> #14:
>> fixed by 7bd0650be63c , we can enable HW encryption back.
>
> It's not clear if topic is need, but I can change it on the way.
> BTW I hate checkpath.pl .

checkpatch gives only hints, it's perfectly ok to ignore warnings which
don't make sense. So no need to change anything in this case as you have
provided the title already earlier in the commit log.

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