All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.19] mt76x0: fix remove_interface
@ 2018-09-03 10:26 Stanislaw Gruszka
  2018-09-03 12:48 ` Kalle Valo
  2018-09-17 14:11 ` Kalle Valo
  0 siblings, 2 replies; 7+ messages in thread
From: Stanislaw Gruszka @ 2018-09-03 10:26 UTC (permalink / raw)
  To: linux-wireless; +Cc: Stanislaw Gruszka

We wrongly use wcid_mask instead of vif_mask

Fixes: 95e444098a7b ("mt76x0: main file")
Reported-and-tested-by: Sid Hayn <sidhayn@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
index cf6ffb1ba4a2..22bc9d368728 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
@@ -77,9 +77,8 @@ static void mt76x0_remove_interface(struct ieee80211_hw *hw,
 {
 	struct mt76x0_dev *dev = hw->priv;
 	struct mt76_vif *mvif = (struct mt76_vif *) vif->drv_priv;
-	unsigned int wcid = mvif->group_wcid.idx;
 
-	dev->wcid_mask[wcid / BITS_PER_LONG] &= ~BIT(wcid % BITS_PER_LONG);
+	dev->vif_mask &= ~BIT(mvif->idx);
 }
 
 static int mt76x0_config(struct ieee80211_hw *hw, u32 changed)
-- 
2.7.5

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

* Re: [PATCH 4.19] mt76x0: fix remove_interface
  2018-09-03 10:26 [PATCH 4.19] mt76x0: fix remove_interface Stanislaw Gruszka
@ 2018-09-03 12:48 ` Kalle Valo
  2018-09-03 15:30   ` Sid Hayn
       [not found]   ` <CAM0KTbAgj==H9SkoFF7WeSrh=TJHKFtuubf06JKSKoHoa4xV5w@mail.gmail.com>
  2018-09-17 14:11 ` Kalle Valo
  1 sibling, 2 replies; 7+ messages in thread
From: Kalle Valo @ 2018-09-03 12:48 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, sidhayn

Stanislaw Gruszka <sgruszka@redhat.com> writes:

> We wrongly use wcid_mask instead of vif_mask
>
> Fixes: 95e444098a7b ("mt76x0: main file")
> Reported-and-tested-by: Sid Hayn <sidhayn@gmail.com>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

For bug fixes please always try to describe the bug and symptoms. I can
add it this time. From the other thread I saw that 'ifconfig up' failed
like this:

SIOCSIFFLAGS: No space left on device

But in what cases did that happen? (I assume not always)

-- 
Kalle Valo

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

* Re: [PATCH 4.19] mt76x0: fix remove_interface
  2018-09-03 12:48 ` Kalle Valo
@ 2018-09-03 15:30   ` Sid Hayn
       [not found]   ` <CAM0KTbAgj==H9SkoFF7WeSrh=TJHKFtuubf06JKSKoHoa4xV5w@mail.gmail.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Sid Hayn @ 2018-09-03 15:30 UTC (permalink / raw)
  To: Kalle Valo; +Cc: sgruszka, linux-wireless

Best I can say is that it seemed to happen after a failed connection.
It would connect and disconnect a few times and work fine, but if it
failed to connect for any reason (mostly mismatched settings between
AP and wpa_supplicant.conf) then the bug would occur. So,
wpa_supplicant would up the interface, try to connect, fail, down the
interface and exit, then the next loop of my script (with a different
conf file) would start and wpa_supplicant would be unable to up the
interface.

Hope that made any sense, because it didn't to me :-)

-Zero
On Mon, Sep 3, 2018 at 12:48 PM Kalle Valo <kvalo@codeaurora.org> wrote:
>
> Stanislaw Gruszka <sgruszka@redhat.com> writes:
>
> > We wrongly use wcid_mask instead of vif_mask
> >
> > Fixes: 95e444098a7b ("mt76x0: main file")
> > Reported-and-tested-by: Sid Hayn <sidhayn@gmail.com>
> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
>
> For bug fixes please always try to describe the bug and symptoms. I can
> add it this time. From the other thread I saw that 'ifconfig up' failed
> like this:
>
> SIOCSIFFLAGS: No space left on device
>
> But in what cases did that happen? (I assume not always)
>
> --
> Kalle Valo

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

* Re: [PATCH 4.19] mt76x0: fix remove_interface
       [not found]   ` <CAM0KTbAgj==H9SkoFF7WeSrh=TJHKFtuubf06JKSKoHoa4xV5w@mail.gmail.com>
@ 2018-09-04 10:23     ` Stanislaw Gruszka
  2018-09-04 14:16       ` Sid Hayn
  2018-09-11 14:31       ` Kalle Valo
  0 siblings, 2 replies; 7+ messages in thread
From: Stanislaw Gruszka @ 2018-09-04 10:23 UTC (permalink / raw)
  To: Sid Hayn; +Cc: Kalle Valo, linux-wireless

On Mon, Sep 03, 2018 at 09:36:37AM -0400, Sid Hayn wrote:
> Best I can say is that it seemed to happen after a failed connection.  It
> would connect and disconnect a few times and work fine, but if it failed to
> connect for any reason (mostly mismatched settings between AP and
> wpa_supplicant.conf) then the bug would occur. So, wpa_supplicant would up
> the interface, try to connect, fail, down the interface and exit, then the
> next loop of my script (with a different conf file) would start and
> wpa_supplicant would be unable to up the interface.
<snip>
> > For bug fixes please always try to describe the bug and symptoms. I can
> > add it this time. From the other thread I saw that 'ifconfig up' failed
> > like this:
> >
> > SIOCSIFFLAGS: No space left on device
> >
> > But in what cases did that happen? (I assume not always)

Problem will happen when we remove interface more than 8 times.
I'm not sure at how this can be triggerd execpt by doing:

iw dev <devname> interface add <name> type <type>
iw dev <name> del

but looks somehow this is triggerd by Sid scripts
by just by using wpa_supplicant and ifconfig. 

Regards
Stanislaw

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

* Re: [PATCH 4.19] mt76x0: fix remove_interface
  2018-09-04 10:23     ` Stanislaw Gruszka
@ 2018-09-04 14:16       ` Sid Hayn
  2018-09-11 14:31       ` Kalle Valo
  1 sibling, 0 replies; 7+ messages in thread
From: Sid Hayn @ 2018-09-04 14:16 UTC (permalink / raw)
  To: sgruszka; +Cc: Kalle Valo, linux-wireless

confirmed, I didn't intentionally remove the interface, but I do see
something about the interface being removed in wpa_supplicant output.

Thanks,
Zero
On Tue, Sep 4, 2018 at 10:23 AM Stanislaw Gruszka <sgruszka@redhat.com> wrote:
>
> On Mon, Sep 03, 2018 at 09:36:37AM -0400, Sid Hayn wrote:
> > Best I can say is that it seemed to happen after a failed connection.  It
> > would connect and disconnect a few times and work fine, but if it failed to
> > connect for any reason (mostly mismatched settings between AP and
> > wpa_supplicant.conf) then the bug would occur. So, wpa_supplicant would up
> > the interface, try to connect, fail, down the interface and exit, then the
> > next loop of my script (with a different conf file) would start and
> > wpa_supplicant would be unable to up the interface.
> <snip>
> > > For bug fixes please always try to describe the bug and symptoms. I can
> > > add it this time. From the other thread I saw that 'ifconfig up' failed
> > > like this:
> > >
> > > SIOCSIFFLAGS: No space left on device
> > >
> > > But in what cases did that happen? (I assume not always)
>
> Problem will happen when we remove interface more than 8 times.
> I'm not sure at how this can be triggerd execpt by doing:
>
> iw dev <devname> interface add <name> type <type>
> iw dev <name> del
>
> but looks somehow this is triggerd by Sid scripts
> by just by using wpa_supplicant and ifconfig.
>
> Regards
> Stanislaw

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

* Re: [PATCH 4.19] mt76x0: fix remove_interface
  2018-09-04 10:23     ` Stanislaw Gruszka
  2018-09-04 14:16       ` Sid Hayn
@ 2018-09-11 14:31       ` Kalle Valo
  1 sibling, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2018-09-11 14:31 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Sid Hayn, linux-wireless

Stanislaw Gruszka <sgruszka@redhat.com> writes:

> On Mon, Sep 03, 2018 at 09:36:37AM -0400, Sid Hayn wrote:
>> Best I can say is that it seemed to happen after a failed connection.  It
>> would connect and disconnect a few times and work fine, but if it failed to
>> connect for any reason (mostly mismatched settings between AP and
>> wpa_supplicant.conf) then the bug would occur. So, wpa_supplicant would up
>> the interface, try to connect, fail, down the interface and exit, then the
>> next loop of my script (with a different conf file) would start and
>> wpa_supplicant would be unable to up the interface.
> <snip>
>> > For bug fixes please always try to describe the bug and symptoms. I can
>> > add it this time. From the other thread I saw that 'ifconfig up' failed
>> > like this:
>> >
>> > SIOCSIFFLAGS: No space left on device
>> >
>> > But in what cases did that happen? (I assume not always)
>
> Problem will happen when we remove interface more than 8 times.
> I'm not sure at how this can be triggerd execpt by doing:
>
> iw dev <devname> interface add <name> type <type>
> iw dev <name> del
>
> but looks somehow this is triggerd by Sid scripts
> by just by using wpa_supplicant and ifconfig. 

Good, thanks. So I'll use this as the commit message:

"We wrongly use wcid_mask instead of vif_mask. This creates problems
when the interface is removed more than 8 times, for example with iw:

iw dev <devname> interface add <name> type <type>
iw dev <name> del

This caused 'ifconfig up' to fail with error:

SIOCSIFFLAGS: No space left on device"

Does that look good?

-- 
Kalle Valo

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

* Re: [PATCH 4.19] mt76x0: fix remove_interface
  2018-09-03 10:26 [PATCH 4.19] mt76x0: fix remove_interface Stanislaw Gruszka
  2018-09-03 12:48 ` Kalle Valo
@ 2018-09-17 14:11 ` Kalle Valo
  1 sibling, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2018-09-17 14:11 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Stanislaw Gruszka

Stanislaw Gruszka <sgruszka@redhat.com> wrote:

> We wrongly use wcid_mask instead of vif_mask. This creates problems
> when the interface is removed more than 8 times, for example with iw:
> 
> iw dev <devname> interface add <name> type <type>
> iw dev <name> del
> 
> This caused 'ifconfig up' to fail with error:
> 
> SIOCSIFFLAGS: No space left on device
> 
> Fixes: 95e444098a7b ("mt76x0: main file")
> Reported-and-tested-by: Sid Hayn <sidhayn@gmail.com>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Patch applied to wireless-drivers.git, thanks.

3341ba9f0f26 mt76x0: fix remove_interface

-- 
https://patchwork.kernel.org/patch/10585737/

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

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

end of thread, other threads:[~2018-09-17 19:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 10:26 [PATCH 4.19] mt76x0: fix remove_interface Stanislaw Gruszka
2018-09-03 12:48 ` Kalle Valo
2018-09-03 15:30   ` Sid Hayn
     [not found]   ` <CAM0KTbAgj==H9SkoFF7WeSrh=TJHKFtuubf06JKSKoHoa4xV5w@mail.gmail.com>
2018-09-04 10:23     ` Stanislaw Gruszka
2018-09-04 14:16       ` Sid Hayn
2018-09-11 14:31       ` Kalle Valo
2018-09-17 14:11 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.