[RFC] Add namespacing to configs and includes to fix conflicts

Krishna Chaitanya chaitanya.mgit at gmail.com
Mon Sep 15 02:23:10 PDT 2025


On Mon, Sep 15, 2025 at 12:33 PM Johannes Berg
<johannes at sipsolutions.net> wrote:
>
> On Sat, 2025-09-13 at 22:12 +0530, Krishna Chaitanya wrote:
> > Hi,
> >
> > We have a hostap fork in ZephyrRTOS project
> > https://github.com/zephyrproject-rtos/hostap.
> > In the past and recently too, we have found conflicts in CONFIG
> > options and includes, so,
> > I would like to check the community's stance on the proposed solutions
> > below before we implement the below proposed solutions.
> >
> > Both are invasive (though a bit easier to implement), and may not
> > directly offer benefits to
> > Linux implementation, but other forks might benefit from this.
> >
> > Problem 1: Using CONFIG_ macros without any namespace can cause conflicts
> > with existing macros or Kconfig options.
> >
> > Solution 1: Use HOSTAP namespace for all config, e.g.,  `CONFIG_WNM`
> > -> `CONFIG_HOSTAP_WNM`.
> >
> > Problem 2: Using includes with filenames directly and using generic
> > names like "common.h"
> > and "includes.h" can cause conflicts with existing headers.
> >
> > Solution2: Use full paths, e.g., `common.h` -> `hostap/src/utils/common.h`
> >
> > WDYT?
>
> I'm thinking ... why is this even an issue? Can you really not fix your
> include paths/command lines in Zephyr?

We already have a few workarounds in Zephyr to address this. But isn't this
a proper solution to fix the root cause (helps any other such projects)?

IMHO, it also helps readability, esp. the header file paths giving some context,
instead of just the filename.



More information about the Hostap mailing list