[PATCH] libertas: make mesh code configurable
Johannes Berg
johannes at sipsolutions.net
Thu Jun 19 11:32:36 EDT 2008
On Thu, 2008-06-19 at 17:04 +0200, Holger Schurig wrote:
> There are no known firmwares for CF and SDIO based devices that
> support MESH. For those devices, mesh-support in the driver is just
> a bit of bloat. Moreover, they're mostly used in embedded devices,
> where space counts.
Wow. That's more ifdefs than mac80211 needs to do this.
> +#ifdef CONFIG_LIBERTAS_MESH
> if (dev == priv->mesh_dev) {
> priv->mesh_open = 1;
> priv->mesh_connect_status = LBS_CONNECTED;
> netif_carrier_on(dev);
> - } else {
> + } else
> +#endif
> + {
and those are particularly ugly.
Especially for the mesh_dev thing, you should probably have a static
inline that returns priv->mesh_dev (mesh case) and NULL (non-mesh case)
and rely on the compiler to elide as much code as possible.
E.g. this:
> +#ifdef CONFIG_LIBERTAS_MESH
> if (priv->mesh_dev && (priv->mesh_connect_status == LBS_CONNECTED))
> netif_wake_queue(priv->mesh_dev);
> +#endif
wouldn't then need an ifdef.
johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://lists.infradead.org/pipermail/libertas-dev/attachments/20080619/c8bb75d4/attachment.bin
More information about the libertas-dev
mailing list