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
Attachment:
signature.asc
Description: This is a digitally signed message part