mbox series

[0/3] brcmfmac: keep wiphy during PCIe driver lifetime

Message ID 20190903042928.18621-1-zajec5@gmail.com (mailing list archive)
Headers show
Series brcmfmac: keep wiphy during PCIe driver lifetime | expand

Message

Rafał Miłecki Sept. 3, 2019, 4:29 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

Driver's main init/attach function brcmf_attach() was handling both:
wiphy allocation and driver initialization. It meant getting a new wiphy
on every init (initial, resume, error recovery).

For supplicants/authenticators and Linux users it's move convenient to
have the same wiphy over driver's lifetime. It allows e.g. automatic
recovery after a firmware crash.

This patchset was tested on BCM4366 (PCIe) and BCM43430 (SDIO).

Right now only PCIe makes use of keeping the same wiphy. I got RPi Zero
W so I'm planning to add firmware crash recovery & keep wiphy for SDIO
in the future.

Rafał Miłecki (3):
  brcmfmac: move "cfg80211_ops" pointer to another struct
  brcmfmac: split brcmf_attach() and brcmf_detach() functions
  brcmfmac: don't realloc wiphy during PCIe reset

 .../broadcom/brcm80211/brcmfmac/bus.h         |  4 +-
 .../broadcom/brcm80211/brcmfmac/cfg80211.c    |  1 -
 .../broadcom/brcm80211/brcmfmac/cfg80211.h    |  1 -
 .../broadcom/brcm80211/brcmfmac/core.c        | 42 ++++++++++++++-----
 .../broadcom/brcm80211/brcmfmac/core.h        |  1 +
 .../broadcom/brcm80211/brcmfmac/pcie.c        | 13 +++++-
 .../broadcom/brcm80211/brcmfmac/sdio.c        | 15 +++++--
 .../broadcom/brcm80211/brcmfmac/usb.c         | 34 ++++++++++++---
 8 files changed, 87 insertions(+), 24 deletions(-)

Comments

Arend van Spriel Sept. 3, 2019, 6:51 p.m. UTC | #1
On 9/3/2019 6:29 AM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Driver's main init/attach function brcmf_attach() was handling both:
> wiphy allocation and driver initialization. It meant getting a new wiphy
> on every init (initial, resume, error recovery).
> 
> For supplicants/authenticators and Linux users it's move convenient to
> have the same wiphy over driver's lifetime. It allows e.g. automatic
> recovery after a firmware crash.

Typo: 'move' should be 'more'.

Regards,
Arend
Rafał Miłecki Sept. 9, 2019, 1:06 p.m. UTC | #2
On Tue, 3 Sep 2019 at 20:51, Arend Van Spriel
<arend.vanspriel@broadcom.com> wrote:
> On 9/3/2019 6:29 AM, Rafał Miłecki wrote:
> > From: Rafał Miłecki <rafal@milecki.pl>
> >
> > Driver's main init/attach function brcmf_attach() was handling both:
> > wiphy allocation and driver initialization. It meant getting a new wiphy
> > on every init (initial, resume, error recovery).
> >
> > For supplicants/authenticators and Linux users it's move convenient to
> > have the same wiphy over driver's lifetime. It allows e.g. automatic
> > recovery after a firmware crash.
>
> Typo: 'move' should be 'more'.

Well, it's just a cover letter (0/3), that message won't go anywhere
to the git repository.