Using net80211/IEEE80211_C_BITS macro

Fehmi Noyan ISI fnoyanisi at yahoo.com
Wed Nov 16 22:53:20 UTC 2016


Hiya,

I am working on an API (hopefully will post something about it soon) that, beyond other stuff, checks wlan driver capabilities (just like ifconfig(1) does). However, the capabilities macro, which is IEEE80211_C_BITS, is defined in sys/net80211/ieee80211_var.h and I am not sure whether #include'ing ieee80211_var.h just for this macro is a good idea or not.

I have noticed that IEEE80211_C_BITS is re-defined in sbin/ifconfig/ifieee80211.c to be used by list_capabilities() function; does this not require update of IEEE80211_C_BITS macro in multiple source files?

What would be the best approach to use IEEE80211_C_BITS in my source file; including ieee80211_var.h or re-defining the macro in the source file (similar to ifconfig(1))?

Thanks
Fehmi


More information about the freebsd-wireless mailing list