Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-07-04 Thread Kalle Valo
(I was on vacation and inbox exploded again) Brian Norris writes: > On Thu, Jun 22, 2017 at 03:02:34PM +0200, Johannes Berg wrote: >> On Wed, 2017-06-21 at 11:27 -0700, Brian Norris wrote: > >> > > Without checking the code now, it seems entirely plausible that >> > >

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-07-04 Thread Kalle Valo
(I was on vacation and inbox exploded again) Brian Norris writes: > On Thu, Jun 22, 2017 at 03:02:34PM +0200, Johannes Berg wrote: >> On Wed, 2017-06-21 at 11:27 -0700, Brian Norris wrote: > >> > > Without checking the code now, it seems entirely plausible that >> > > this is >> > > holding

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-29 Thread Brian Norris
Hi Johannes, On Wed, Jun 28, 2017 at 09:28:49AM +0200, Johannes Berg wrote: > On Tue, 2017-06-27 at 13:48 -0700, Brian Norris wrote: > > > > There isn't really a good way to do this. You can, of course, call > > > wiphy_unregister(), but if you could do that you'd already have the > > > problem

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-29 Thread Brian Norris
Hi Johannes, On Wed, Jun 28, 2017 at 09:28:49AM +0200, Johannes Berg wrote: > On Tue, 2017-06-27 at 13:48 -0700, Brian Norris wrote: > > > > There isn't really a good way to do this. You can, of course, call > > > wiphy_unregister(), but if you could do that you'd already have the > > > problem

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-28 Thread Johannes Berg
On Tue, 2017-06-27 at 13:48 -0700, Brian Norris wrote: > > There isn't really a good way to do this. You can, of course, call > > wiphy_unregister(), but if you could do that you'd already have the > > problem solved, I think? > > That's probably along the right track. There are still some

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-28 Thread Johannes Berg
On Tue, 2017-06-27 at 13:48 -0700, Brian Norris wrote: > > There isn't really a good way to do this. You can, of course, call > > wiphy_unregister(), but if you could do that you'd already have the > > problem solved, I think? > > That's probably along the right track. There are still some

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-28 Thread Johannes Berg
Hi Brian, > Wow, that's not exactly simple code; I expect it could be pretty > difficult to get that right today on mwifiex. Yeah, I have no doubt. You'd probably have to track a lot of state that you just pass down to the firmware too, and possibly can't even track some state that the firmware

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-28 Thread Johannes Berg
Hi Brian, > Wow, that's not exactly simple code; I expect it could be pretty > difficult to get that right today on mwifiex. Yeah, I have no doubt. You'd probably have to track a lot of state that you just pass down to the firmware too, and possibly can't even track some state that the firmware

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-27 Thread Brian Norris
On Thu, Jun 22, 2017 at 03:02:34PM +0200, Johannes Berg wrote: > On Wed, 2017-06-21 at 11:27 -0700, Brian Norris wrote: > > > Without checking the code now, it seems entirely plausible that > > > this is > > > holding some lock that would lock out the control path entirely, > > > for > > > the

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-27 Thread Brian Norris
On Thu, Jun 22, 2017 at 03:02:34PM +0200, Johannes Berg wrote: > On Wed, 2017-06-21 at 11:27 -0700, Brian Norris wrote: > > > Without checking the code now, it seems entirely plausible that > > > this is > > > holding some lock that would lock out the control path entirely, > > > for > > > the

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-27 Thread Brian Norris
(A little slow on follow-up here) On Thu, Jun 22, 2017 at 02:59:49PM +0200, Johannes Berg wrote: > On Wed, 2017-06-21 at 10:48 -0700, Brian Norris wrote: > > > > Yes, that all sounds nice. But for my sake, can you describe better > > what's actually going on there (e.g., can you point me at

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-27 Thread Brian Norris
(A little slow on follow-up here) On Thu, Jun 22, 2017 at 02:59:49PM +0200, Johannes Berg wrote: > On Wed, 2017-06-21 at 10:48 -0700, Brian Norris wrote: > > > > Yes, that all sounds nice. But for my sake, can you describe better > > what's actually going on there (e.g., can you point me at

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-22 Thread Johannes Berg
On Wed, 2017-06-21 at 11:27 -0700, Brian Norris wrote: > > > I'm not sure what you mean by "we need to atually stop all the > > virtual interfaces ([...]) first". > > Judging by your following comments, I may have been completely > mistaken. > (But that's why I asked you folks!) :) > > There

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-22 Thread Johannes Berg
On Wed, 2017-06-21 at 11:27 -0700, Brian Norris wrote: > > > I'm not sure what you mean by "we need to atually stop all the > > virtual interfaces ([...]) first". > > Judging by your following comments, I may have been completely > mistaken. > (But that's why I asked you folks!) :) > > There

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-22 Thread Johannes Berg
On Wed, 2017-06-21 at 10:48 -0700, Brian Norris wrote: > > Yes, that all sounds nice. But for my sake, can you describe better > what's actually going on there (e.g., can you point me at which code > does this)? It's much easier with mac80211, it has all the state. Basically the reconfig is in

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-22 Thread Johannes Berg
On Wed, 2017-06-21 at 10:48 -0700, Brian Norris wrote: > > Yes, that all sounds nice. But for my sake, can you describe better > what's actually going on there (e.g., can you point me at which code > does this)? It's much easier with mac80211, it has all the state. Basically the reconfig is in

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-21 Thread Brian Norris
Hi Johannes, On Fri, Jun 09, 2017 at 11:03:38AM +0200, Johannes Berg wrote: > On Mon, 2017-06-05 at 18:54 +0300, Kalle Valo wrote: > > > > BTW, since you're taking an interest in this code now, can I > > > trouble you with a question? Looking at mwifiex_uninit_sw() (after > > > this patchset),

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-21 Thread Brian Norris
Hi Johannes, On Fri, Jun 09, 2017 at 11:03:38AM +0200, Johannes Berg wrote: > On Mon, 2017-06-05 at 18:54 +0300, Kalle Valo wrote: > > > > BTW, since you're taking an interest in this code now, can I > > > trouble you with a question? Looking at mwifiex_uninit_sw() (after > > > this patchset),

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-21 Thread Brian Norris
Hi Kalle (and Johannes; I'll reply to Johannes response separately too), On Mon, Jun 05, 2017 at 06:54:18PM +0300, Kalle Valo wrote: > Brian Norris writes: > > That's not to say that there aren't such bugs out there. I'd still be > > willing to bet there are. And IMO,

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-21 Thread Brian Norris
Hi Kalle (and Johannes; I'll reply to Johannes response separately too), On Mon, Jun 05, 2017 at 06:54:18PM +0300, Kalle Valo wrote: > Brian Norris writes: > > That's not to say that there aren't such bugs out there. I'd still be > > willing to bet there are. And IMO, it seems wise to just do

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-09 Thread Johannes Berg
On Mon, 2017-06-05 at 18:54 +0300, Kalle Valo wrote: > > BTW, since you're taking an interest in this code now, can I > > trouble you with a question? Looking at mwifiex_uninit_sw() (after > > this patchset), you can see a loop like this: > > > > /* Stop data */ > > for (i = 0; i

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-09 Thread Johannes Berg
On Mon, 2017-06-05 at 18:54 +0300, Kalle Valo wrote: > > BTW, since you're taking an interest in this code now, can I > > trouble you with a question? Looking at mwifiex_uninit_sw() (after > > this patchset), you can see a loop like this: > > > > /* Stop data */ > > for (i = 0; i

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-05 Thread Kalle Valo
Brian Norris writes: > On Thu, Jun 01, 2017 at 12:15:45PM +0300, Kalle Valo wrote: >> Brian Norris writes: >> >> > In general, it's helpful to use the same code for device removal as for >> > device reset, as this tends to have fewer bugs.

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-05 Thread Kalle Valo
Brian Norris writes: > On Thu, Jun 01, 2017 at 12:15:45PM +0300, Kalle Valo wrote: >> Brian Norris writes: >> >> > In general, it's helpful to use the same code for device removal as for >> > device reset, as this tends to have fewer bugs. Let's move the wiphy >> > unregistration code into the

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-01 Thread Brian Norris
On Thu, Jun 01, 2017 at 12:15:45PM +0300, Kalle Valo wrote: > Brian Norris writes: > > > In general, it's helpful to use the same code for device removal as for > > device reset, as this tends to have fewer bugs. Let's move the wiphy > > unregistration code into the

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-01 Thread Brian Norris
On Thu, Jun 01, 2017 at 12:15:45PM +0300, Kalle Valo wrote: > Brian Norris writes: > > > In general, it's helpful to use the same code for device removal as for > > device reset, as this tends to have fewer bugs. Let's move the wiphy > > unregistration code into the common reset and removal

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-01 Thread Kalle Valo
Brian Norris writes: > In general, it's helpful to use the same code for device removal as for > device reset, as this tends to have fewer bugs. Let's move the wiphy > unregistration code into the common reset and removal code. > > In particular, it's very hard to

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-01 Thread Kalle Valo
Brian Norris writes: > In general, it's helpful to use the same code for device removal as for > device reset, as this tends to have fewer bugs. Let's move the wiphy > unregistration code into the common reset and removal code. > > In particular, it's very hard to properly handle the reset

[PATCH 05/14] mwifiex: re-register wiphy across reset

2017-05-24 Thread Brian Norris
In general, it's helpful to use the same code for device removal as for device reset, as this tends to have fewer bugs. Let's move the wiphy unregistration code into the common reset and removal code. In particular, it's very hard to properly handle the reset sequence when something fails.

[PATCH 05/14] mwifiex: re-register wiphy across reset

2017-05-24 Thread Brian Norris
In general, it's helpful to use the same code for device removal as for device reset, as this tends to have fewer bugs. Let's move the wiphy unregistration code into the common reset and removal code. In particular, it's very hard to properly handle the reset sequence when something fails.