Re: [PATCH] mt76: fix building without CONFIG_MT76x0U

From: Arnd Bergmann
Date: Wed Sep 26 2018 - 11:43:38 EST


On Wed, Sep 26, 2018 at 4:06 PM Stanislaw Gruszka <sgruszka@xxxxxxxxxx> wrote:
>
> On Wed, Sep 26, 2018 at 02:51:59PM +0200, Arnd Bergmann wrote:
> > The recent rework of the mt76 driver caused build failures in
> > configurations that leave the mt76x0u support disabled:
> >
> > ERROR: "mt76u_mcu_deinit" [drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.ko] undefined!
> > ERROR: "mt76x02u_set_txinfo" [drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.ko] undefined!
> > ERROR: "mt76u_queues_deinit" [drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.ko] undefined!
> > ERROR: "mt76u_stop_stat_wk" [drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0-common.ko] undefined!
> >
> > The mt76x0_push_txwi()/mt76x0_tx_prepare_skb()/mt76x0_cleanup() functions
> > that cause some of these are only called from the usb portion, and can
> > be hidden in an #ifdef in this case.
> >
> > mt76u_stop_stat_wk() is called mt76x0_mac_stop(), which is in turn
> > shared between multiple callers. Calling it only when the USB driver
> > is enabled avoids the link error but it is not clear to me whether this
> > can be called from a context where it would not do the right thing.
>
> I think there not yet posted Lorenzo patches that fix this build
> problem.

Ok, good. I assume that is a better fix than mine then. I also noticed
another problem that my patch does not address, but won't send a follow
up patch for that.

Please just ignore this version.

Arnd